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
29,000
my_hash_sort_utf16_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0) { my_tosort_utf16(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf16_nopad: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x48(%rbp), %rcx movb %al, -0x61(%rbp) jae 0xf2ace movq -0x38(%rbp), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0xf2ada jmp 0xf2b74 movq -0x50(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xf2b90 jmp 0xf2ae9 movq -0x58(%rbp), %rax andq $0x3f, %rax addq -0x60(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx imulq %rcx, %rax movq -0x58(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) jmp 0xf2b25 movq -0x58(%rbp), %rax andq $0x3f, %rax addq -0x60(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx imulq %rcx, %rax movq -0x58(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) jmp 0xf2b5e movl -0x3c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xf2a9d movq -0x58(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x60(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x70, %rsp popq %rbp retq
my_hash_sort_utf16_nopad: push rbp mov rbp, rsp sub rsp, 70h 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_8] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_60], rax loc_F2A9D: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_48] mov [rbp+var_61], al jnb short loc_F2ACE mov rax, [rbp+var_38] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_48] lea rsi, [rbp+var_30] call rax mov [rbp+var_3C], eax cmp eax, 0 setnle al mov [rbp+var_61], al loc_F2ACE: mov al, [rbp+var_61] test al, 1 jnz short loc_F2ADA jmp loc_F2B74 loc_F2ADA: mov rdi, [rbp+var_50] lea rsi, [rbp+var_30] call my_tosort_utf16 jmp short $+2 loc_F2AE9: mov rax, [rbp+var_58] and rax, 3Fh add rax, [rbp+var_60] mov rcx, [rbp+var_30] and rcx, 0FFh imul rax, rcx mov rcx, [rbp+var_58] shl rcx, 8 add rax, rcx xor rax, [rbp+var_58] mov [rbp+var_58], rax mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax jmp short $+2 loc_F2B25: mov rax, [rbp+var_58] and rax, 3Fh add rax, [rbp+var_60] mov rcx, [rbp+var_30] shr rcx, 8 imul rax, rcx mov rcx, [rbp+var_58] shl rcx, 8 add rax, rcx xor rax, [rbp+var_58] mov [rbp+var_58], rax mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax jmp short $+2 loc_F2B5E: mov ecx, [rbp+var_3C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_F2A9D loc_F2B74: mov rcx, [rbp+var_58] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_60] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 70h pop rbp retn
_QWORD * my_hash_sort_utf16_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5) { _QWORD *result; // rax bool v6; // [rsp+Fh] [rbp-61h] long long v7; // [rsp+10h] [rbp-60h] long long v8; // [rsp+10h] [rbp-60h] unsigned long long v9; // [rsp+18h] [rbp-58h] long long v10; // [rsp+18h] [rbp-58h] long long v11; // [rsp+20h] [rbp-50h] unsigned long long v12; // [rsp+28h] [rbp-48h] int v13; // [rsp+34h] [rbp-3Ch] long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h] unsigned long long v15; // [rsp+40h] [rbp-30h] BYREF _QWORD *v16; // [rsp+48h] [rbp-28h] unsigned long long *v17; // [rsp+50h] [rbp-20h] long long v18; // [rsp+58h] [rbp-18h] unsigned long long v19; // [rsp+60h] [rbp-10h] long long v20; // [rsp+68h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); v12 = a3 + a2; v11 = *(_QWORD *)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v6 = 0; if ( v19 < v12 ) { v13 = v14(v20, &v15, v19, v12); v6 = v13 > 0; } if ( !v6 ) break; my_tosort_utf16(v11, &v15); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v15 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + (v15 >> 8) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; v19 += v13; } *v17 = v9; result = v16; *v16 = v7; return result; }
my_hash_sort_utf16_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX LAB_001f2a9d: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x61],AL JNC 0x001f2ace MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x61],AL LAB_001f2ace: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x001f2ada JMP 0x001f2b74 LAB_001f2ada: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x30] CALL 0x001f2b90 JMP 0x001f2ae9 LAB_001f2ae9: MOV RAX,qword ptr [RBP + -0x58] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX JMP 0x001f2b25 LAB_001f2b25: MOV RAX,qword ptr [RBP + -0x58] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX JMP 0x001f2b5e LAB_001f2b5e: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001f2a9d LAB_001f2b74: MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x70 POP RBP RET
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { code *pcVar1; int8 uVar2; bool bVar3; long local_68; ulong local_60; int local_44; ulong local_38; long *local_30; ulong *local_28; long local_20; ulong local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = *(int8 *)(param_1 + 0x78); local_60 = *param_4; local_68 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar3 = false; if (local_18 < param_2 + param_3) { local_44 = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3); bVar3 = 0 < local_44; } if (!bVar3) break; my_tosort_utf16(uVar2,&local_38); local_60 = ((local_60 & 0x3f) + local_68) * (local_38 & 0xff) + local_60 * 0x100 ^ local_60; local_60 = ((local_60 & 0x3f) + local_68 + 3) * (local_38 >> 8) + local_60 * 0x100 ^ local_60; local_68 = local_68 + 6; local_18 = local_18 + (long)local_44; } *local_28 = local_60; *local_30 = local_68; return; }
29,001
nglog::FlushLogFilesUnsafe(nglog::LogSeverity)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::FlushLogFilesUnsafe(int min_severity) { // assume we have the log_mutex or we simply don't care // about it std::for_each(std::next(std::begin(log_destinations_), min_severity), std::end(log_destinations_), [now = std::chrono::system_clock::now()]( std::unique_ptr<LogDestination>& log) { if (log != nullptr) { // Flush the base fileobject_ logger directly instead of // going through any wrappers to reduce chance of deadlock. log->fileobject_.FlushUnlocked(now); } }); }
O1
cpp
nglog::FlushLogFilesUnsafe(nglog::LogSeverity): pushq %rbx movslq %edi, %rax leaq 0x248da(%rip), %rcx # 0x2fba0 leaq (%rcx,%rax,8), %rbx callq 0x7070 leaq 0x248ea(%rip), %rsi # 0x2fbc0 movq %rbx, %rdi movq %rax, %rdx popq %rbx jmp 0x11b1c
_ZN5nglog19FlushLogFilesUnsafeENS_11LogSeverityE: push rbx movsxd rax, edi lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea rbx, [rcx+rax*8] call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint mov rdi, rbx mov rdx, rax pop rbx jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
long long nglog::FlushLogFilesUnsafe(std::chrono::_V2::system_clock *a1) { long long v1; // rax v1 = std::chrono::_V2::system_clock::now(a1); return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>( (char *)&nglog::LogDestination::log_destinations_ + 8 * (int)a1, &nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11], v1); }
FlushLogFilesUnsafe: PUSH RBX MOVSXD RAX,EDI LEA RCX,[0x12fba0] LEA RBX,[RCX + RAX*0x8] CALL 0x00107070 LEA RSI,[0x12fbc0] MOV RDI,RBX MOV RDX,RAX POP RBX JMP 0x00111b1c
/* nglog::FlushLogFilesUnsafe(nglog::LogSeverity) */ void nglog::FlushLogFilesUnsafe(int param_1) { int8 uVar1; uVar1 = std::chrono::_V2::system_clock::now(); std:: for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_> (&LogDestination::log_destinations_ + param_1, &(anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1); return; }
29,002
nglog::FlushLogFilesUnsafe(nglog::LogSeverity)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::FlushLogFilesUnsafe(int min_severity) { // assume we have the log_mutex or we simply don't care // about it std::for_each(std::next(std::begin(log_destinations_), min_severity), std::end(log_destinations_), [now = std::chrono::system_clock::now()]( std::unique_ptr<LogDestination>& log) { if (log != nullptr) { // Flush the base fileobject_ logger directly instead of // going through any wrappers to reduce chance of deadlock. log->fileobject_.FlushUnlocked(now); } }); }
O3
cpp
nglog::FlushLogFilesUnsafe(nglog::LogSeverity): pushq %rbx movslq %edi, %rax leaq 0x249a0(%rip), %rcx # 0x2fba0 leaq (%rcx,%rax,8), %rbx callq 0x7070 leaq 0x249b0(%rip), %rsi # 0x2fbc0 movq %rbx, %rdi movq %rax, %rdx popq %rbx jmp 0x118aa
_ZN5nglog19FlushLogFilesUnsafeENS_11LogSeverityE: push rbx movsxd rax, edi lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea rbx, [rcx+rax*8] call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint mov rdi, rbx mov rdx, rax pop rbx jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
long long nglog::FlushLogFilesUnsafe(std::chrono::_V2::system_clock *a1) { long long v1; // rax v1 = std::chrono::_V2::system_clock::now(a1); return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>( &nglog::LogDestination::log_destinations_[(int)a1], &nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11], v1); }
FlushLogFilesUnsafe: PUSH RBX MOVSXD RAX,EDI LEA RCX,[0x12fba0] LEA RBX,[RCX + RAX*0x8] CALL 0x00107070 LEA RSI,[0x12fbc0] MOV RDI,RBX MOV RDX,RAX POP RBX JMP 0x001118aa
/* nglog::FlushLogFilesUnsafe(nglog::LogSeverity) */ void nglog::FlushLogFilesUnsafe(int param_1) { int8 uVar1; uVar1 = std::chrono::_V2::system_clock::now(); std:: for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_> (&LogDestination::log_destinations_ + param_1, &(anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1); return; }
29,003
testing::AssertionResult testing::internal::CmpHelperOpFailure<unsigned long, int>(char const*, char const*, unsigned long const&, int const&, char const*)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/include/gtest/gtest.h
AssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2, const T1& val1, const T2& val2, const char* op) { return AssertionFailure() << "Expected: (" << expr1 << ") " << op << " (" << expr2 << "), actual: " << FormatForComparisonFailureMessage(val1, val2) << " vs " << FormatForComparisonFailureMessage(val2, val1); }
O0
c
testing::AssertionResult testing::internal::CmpHelperOpFailure<unsigned long, int>(char const*, char const*, unsigned long const&, int const&, char const*): pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %rdi, -0xb0(%rbp) movq %rdi, %rax movq %rax, -0xa8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq -0x40(%rbp), %rdi movq %rdi, -0xa0(%rbp) callq 0x17ee0 movq -0xa0(%rbp), %rdi leaq 0x61d6f(%rip), %rsi # 0x785d1 callq 0x159a0 movq %rax, -0x98(%rbp) jmp 0x16870 movq -0x98(%rbp), %rdi leaq -0x10(%rbp), %rsi callq 0x15a20 movq %rax, -0xb8(%rbp) jmp 0x16889 movq -0xb8(%rbp), %rdi leaq 0x61d46(%rip), %rsi # 0x785dd callq 0x15aa0 movq %rax, -0xc0(%rbp) jmp 0x168a5 movq -0xc0(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x15a20 movq %rax, -0xc8(%rbp) jmp 0x168be movq -0xc8(%rbp), %rdi leaq 0x61d0e(%rip), %rsi # 0x785da callq 0x15aa0 movq %rax, -0xd0(%rbp) jmp 0x168da movq -0xd0(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x15a20 movq %rax, -0xd8(%rbp) jmp 0x168f3 movq -0xd8(%rbp), %rdi leaq 0x61cdf(%rip), %rsi # 0x785e0 callq 0x159a0 movq %rax, -0xe0(%rbp) jmp 0x1690f movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx leaq -0x70(%rbp), %rdi callq 0x150d0 jmp 0x16922 movq -0xe0(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0x15b20 movq %rax, -0xe8(%rbp) jmp 0x1693b movq -0xe8(%rbp), %rdi leaq 0x61ca3(%rip), %rsi # 0x785ec callq 0x15bd0 movq %rax, -0xf0(%rbp) jmp 0x16957 movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x90(%rbp), %rdi callq 0x150a0 jmp 0x1696d movq -0xf0(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x15b20 movq %rax, -0xf8(%rbp) jmp 0x16989 movq -0xf8(%rbp), %rsi movq -0xb0(%rbp), %rdi callq 0x17ce0 jmp 0x1699e leaq -0x90(%rbp), %rdi callq 0xad98 leaq -0x70(%rbp), %rdi callq 0xad98 leaq -0x40(%rbp), %rdi callq 0x12440 movq -0xa8(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x16a09 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x16a00 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x90(%rbp), %rdi callq 0xad98 leaq -0x70(%rbp), %rdi callq 0xad98 leaq -0x40(%rbp), %rdi callq 0x12440 movq -0x48(%rbp), %rdi callq 0xac00 nopl (%rax,%rax)
_ZN7testing8internal18CmpHelperOpFailureImiEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_: push rbp mov rbp, rsp sub rsp, 100h mov [rbp+var_B0], rdi mov rax, rdi mov [rbp+var_A8], rax 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 [rbp+var_30], r9 lea rdi, [rbp+var_40]; this mov [rbp+var_A0], rdi call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void) mov rdi, [rbp+var_A0] lea rsi, aExpected; "Expected: (" call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) mov [rbp+var_98], rax jmp short $+2 loc_16870: mov rdi, [rbp+var_98] lea rsi, [rbp+var_10] call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov [rbp+var_B8], rax jmp short $+2 loc_16889: mov rdi, [rbp+var_B8] lea rsi, asc_785DD; ") " call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) mov [rbp+var_C0], rax jmp short $+2 loc_168A5: mov rdi, [rbp+var_C0] lea rsi, [rbp+var_30] call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov [rbp+var_C8], rax jmp short $+2 loc_168BE: mov rdi, [rbp+var_C8] lea rsi, aExpected+9; " (" call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) mov [rbp+var_D0], rax jmp short $+2 loc_168DA: mov rdi, [rbp+var_D0] lea rsi, [rbp+var_18] call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov [rbp+var_D8], rax jmp short $+2 loc_168F3: mov rdi, [rbp+var_D8] lea rsi, aActual; "), actual: " call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) mov [rbp+var_E0], rax jmp short $+2 loc_1690F: mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] lea rdi, [rbp+var_70] call _ZN7testing8internal33FormatForComparisonFailureMessageImiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_; testing::internal::FormatForComparisonFailureMessage<ulong,int>(ulong const&,int const&) jmp short $+2 loc_16922: mov rdi, [rbp+var_E0] lea rsi, [rbp+var_70] call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) mov [rbp+var_E8], rax jmp short $+2 loc_1693B: mov rdi, [rbp+var_E8] lea rsi, aVs; " vs " call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&) mov [rbp+var_F0], rax jmp short $+2 loc_16957: mov rsi, [rbp+var_28] mov rdx, [rbp+var_20] lea rdi, [rbp+var_90] call _ZN7testing8internal33FormatForComparisonFailureMessageIimEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_; testing::internal::FormatForComparisonFailureMessage<int,ulong>(int const&,ulong const&) jmp short $+2 loc_1696D: mov rdi, [rbp+var_F0] lea rsi, [rbp+var_90] call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) mov [rbp+var_F8], rax jmp short $+2 loc_16989: mov rsi, [rbp+var_F8]; testing::AssertionResult * mov rdi, [rbp+var_B0]; this call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) jmp short $+2 loc_1699E: lea rdi, [rbp+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_40]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rax, [rbp+var_A8] add rsp, 100h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp short loc_16A09 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp short loc_16A00 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16A00: lea rdi, [rbp+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16A09: lea rdi, [rbp+var_40]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, [rbp+var_48] call __Unwind_Resume
testing::AssertionResult * testing::internal::CmpHelperOpFailure<unsigned long,int>( testing::AssertionResult *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { const testing::AssertionResult *v7; // [rsp+8h] [rbp-F8h] testing::AssertionResult *v8; // [rsp+10h] [rbp-F0h] testing::AssertionResult *v9; // [rsp+18h] [rbp-E8h] testing::AssertionResult *v10; // [rsp+20h] [rbp-E0h] testing::AssertionResult *v11; // [rsp+28h] [rbp-D8h] testing::AssertionResult *v12; // [rsp+30h] [rbp-D0h] testing::AssertionResult *v13; // [rsp+38h] [rbp-C8h] testing::AssertionResult *v14; // [rsp+40h] [rbp-C0h] testing::AssertionResult *v15; // [rsp+48h] [rbp-B8h] testing::AssertionResult *v16; // [rsp+68h] [rbp-98h] _BYTE v17[32]; // [rsp+70h] [rbp-90h] BYREF _BYTE v18[36]; // [rsp+90h] [rbp-70h] BYREF _BYTE v19[16]; // [rsp+C0h] [rbp-40h] BYREF long long v20; // [rsp+D0h] [rbp-30h] BYREF long long v21; // [rsp+D8h] [rbp-28h] long long v22; // [rsp+E0h] [rbp-20h] long long v23; // [rsp+E8h] [rbp-18h] BYREF _QWORD v24[2]; // [rsp+F0h] [rbp-10h] BYREF v24[1] = a1; v24[0] = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; testing::AssertionFailure((testing *)v19); v16 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v19, (long long)"Expected: ("); v15 = testing::AssertionResult::operator<<<char const*>(v16, (long long)v24); v14 = testing::AssertionResult::operator<<<char [3]>(v15, (long long)") "); v13 = testing::AssertionResult::operator<<<char const*>(v14, (long long)&v20); v12 = testing::AssertionResult::operator<<<char [3]>(v13, (long long)" ("); v11 = testing::AssertionResult::operator<<<char const*>(v12, (long long)&v23); v10 = testing::AssertionResult::operator<<<char [12]>(v11, (long long)"), actual: "); testing::internal::FormatForComparisonFailureMessage<unsigned long,int>((long long)v18, v22); v9 = testing::AssertionResult::operator<<<std::string>(v10, (long long)v18); v8 = testing::AssertionResult::operator<<<char [5]>(v9, (long long)" vs "); testing::internal::FormatForComparisonFailureMessage<int,unsigned long>((long long)v17, v21); v7 = testing::AssertionResult::operator<<<std::string>(v8, (long long)v17); testing::AssertionResult::AssertionResult(a1, v7); std::string::~string(v17); std::string::~string(v18); testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v19); return a1; }
AssertionResult: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RCX] AND CL,0x1 MOV byte ptr [RAX],CL ADD RAX,0x8 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 XOR EAX,EAX MOV ESI,EAX CALL 0x00113880 MOV byte ptr [RBP + -0x19],0x0 TEST AL,0x1 JNZ 0x00116852 JMP 0x00116897 LAB_00116852: MOV EDI,0x20 CALL 0x0010a610 MOV RCX,RAX MOV qword ptr [RBP + -0x48],RCX MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x19],0x1 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 LAB_00116873: CALL 0x00143300 MOV qword ptr [RBP + -0x40],RAX JMP 0x0011687e LAB_0011687e: MOV RSI,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x48] CALL 0x0010a280 LAB_0011688b: JMP 0x0011688d LAB_0011688d: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011689f LAB_00116897: XOR EAX,EAX MOV qword ptr [RBP + -0x50],RAX JMP 0x0011689f LAB_0011689f: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x50] CALL 0x001159f0 ADD RSP,0x50 POP RBP RET
/* testing::AssertionResult::AssertionResult(testing::AssertionResult const&) */ void __thiscall testing::AssertionResult::AssertionResult(AssertionResult *this,AssertionResult *param_1) { bool bVar1; string *psVar2; string *local_58; *this = (AssertionResult)((byte)*param_1 & 1); bVar1 = std::operator!=((unique_ptr *)(param_1 + 8),(_func_decltype_nullptr *)0x0); if (bVar1) { local_58 = (string *)operator_new(0x20); /* try { // try from 00116873 to 0011688a has its CatchHandler @ 001168b2 */ psVar2 = (string *) std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>:: operator*((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> * )(param_1 + 8)); std::__cxx11::string::string(local_58,psVar2); } else { local_58 = (string *)0x0; } std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>:: unique_ptr<std::default_delete<std::__cxx11::string>,void> ((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *) (this + 8),local_58); return; }
29,004
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void DefaultGlobalTestPartResultReporter::ReportTestPartResult( const TestPartResult& result) { unit_test_->current_test_result()->AddTestPartResult(result); unit_test_->listeners()->repeater()->OnTestPartResult(result); }
O1
cpp
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rax movq 0x1e0(%rax), %rdi testq %rdi, %rdi je 0x1c6b7 addq $0x90, %rdi jmp 0x1c6d5 movq 0x1d8(%rax), %rdi testq %rdi, %rdi je 0x1c6cc addq $0x88, %rdi jmp 0x1c6d5 addq $0x1e8, %rax # imm = 0x1E8 movq %rax, %rdi addq $0x38, %rdi movq %rbx, %rsi callq 0x32dc0 movq 0x8(%r14), %rax movq 0x268(%rax), %rdi movq (%rdi), %rax movq 0x50(%rax), %rax movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax nop
_ZN7testing8internal35DefaultGlobalTestPartResultReporter20ReportTestPartResultERKNS_14TestPartResultE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rdi+8] mov rdi, [rax+1E0h] test rdi, rdi jz short loc_1C6B7 add rdi, 90h jmp short loc_1C6D5 loc_1C6B7: mov rdi, [rax+1D8h] test rdi, rdi jz short loc_1C6CC add rdi, 88h jmp short loc_1C6D5 loc_1C6CC: add rax, 1E8h mov rdi, rax loc_1C6D5: add rdi, 38h ; '8' mov rsi, rbx call _ZNSt6vectorIN7testing14TestPartResultESaIS1_EE9push_backERKS1_; std::vector<testing::TestPartResult>::push_back(testing::TestPartResult const&) mov rax, [r14+8] mov rdi, [rax+268h] mov rax, [rdi] mov rax, [rax+50h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp rax
long long testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult( testing::internal::DefaultGlobalTestPartResultReporter *this, const testing::TestPartResult *a2) { long long v3; // rax long long v4; // rdi long long v5; // rdi long long v6; // rdi v3 = *((_QWORD *)this + 1); v4 = *(_QWORD *)(v3 + 480); if ( v4 ) { v5 = v4 + 144; } else { v6 = *(_QWORD *)(v3 + 472); if ( v6 ) v5 = v6 + 136; else v5 = v3 + 488; } std::vector<testing::TestPartResult>::push_back((testing::TestPartResultArray *)(v5 + 56), a2); return (*(long long ( **)(_QWORD, const testing::TestPartResult *))(**(_QWORD **)(*((_QWORD *)this + 1) + 616LL) + 80LL))( *(_QWORD *)(*((_QWORD *)this + 1) + 616LL), a2); }
ReportTestPartResult: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x1e0] TEST RDI,RDI JZ 0x0011c6b7 ADD RDI,0x90 JMP 0x0011c6d5 LAB_0011c6b7: MOV RDI,qword ptr [RAX + 0x1d8] TEST RDI,RDI JZ 0x0011c6cc ADD RDI,0x88 JMP 0x0011c6d5 LAB_0011c6cc: ADD RAX,0x1e8 MOV RDI,RAX LAB_0011c6d5: ADD RDI,0x38 MOV RSI,RBX CALL 0x00132dc0 MOV RAX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RAX + 0x268] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x50] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP RAX
/* testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&) */ void __thiscall testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult (DefaultGlobalTestPartResultReporter *this,TestPartResult *param_1) { long lVar1; lVar1 = *(long *)(this + 8); if (*(long *)(lVar1 + 0x1e0) == 0) { if (*(long *)(lVar1 + 0x1d8) == 0) { lVar1 = lVar1 + 0x1e8; } else { lVar1 = *(long *)(lVar1 + 0x1d8) + 0x88; } } else { lVar1 = *(long *)(lVar1 + 0x1e0) + 0x90; } std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::push_back ((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *) (lVar1 + 0x38),param_1); /* WARNING: Could not recover jumptable at 0x0011c6fd. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)(*(long *)(this + 8) + 0x268) + 0x50)) (*(long **)(*(long *)(this + 8) + 0x268),param_1); return; }
29,005
Table_map_log_event::rewrite_db(char const*, unsigned long, Format_description_log_event const*)
eloqsql/sql/log_event_client.cc
int Table_map_log_event::rewrite_db(const char* new_db, size_t new_len, const Format_description_log_event* desc) { DBUG_ENTER("Table_map_log_event::rewrite_db"); DBUG_ASSERT(temp_buf); uint header_len= MY_MIN(desc->common_header_len, LOG_EVENT_MINIMAL_HEADER_LEN) + TABLE_MAP_HEADER_LEN; int len_diff; if (!(len_diff= (int)(new_len - m_dblen))) { memcpy((void*) (temp_buf + header_len + 1), new_db, m_dblen + 1); memcpy((void*) m_dbnam, new_db, m_dblen + 1); DBUG_RETURN(0); } // Create new temp_buf ulong event_cur_len= uint4korr(temp_buf + EVENT_LEN_OFFSET); ulong event_new_len= event_cur_len + len_diff; uchar* new_temp_buf= (uchar*) my_malloc(PSI_NOT_INSTRUMENTED, event_new_len, MYF(MY_WME)); if (!new_temp_buf) { sql_print_error("Table_map_log_event::rewrite_db: " "failed to allocate new temp_buf (%d bytes required)", event_new_len); DBUG_RETURN(-1); } // Rewrite temp_buf uchar *ptr= new_temp_buf; size_t cnt= 0; // Copy header and change event length memcpy(ptr, temp_buf, header_len); int4store(ptr + EVENT_LEN_OFFSET, event_new_len); ptr += header_len; cnt += header_len; // Write new db name length and new name DBUG_ASSERT(new_len < 0xff); *ptr++ = (char)new_len; memcpy(ptr, new_db, new_len + 1); ptr += new_len + 1; cnt += m_dblen + 2; // Copy rest part memcpy(ptr, temp_buf + cnt, event_cur_len - cnt); // Reregister temp buf free_temp_buf(); register_temp_buf(new_temp_buf, TRUE); // Reset m_dbnam and m_dblen members m_dblen= new_len; // m_dbnam resides in m_memory together with m_tblnam and m_coltype uchar* memory= m_memory; char const* tblnam= m_tblnam; uchar* coltype= m_coltype; m_memory= (uchar*) my_multi_malloc(PSI_NOT_INSTRUMENTED, MYF(MY_WME), &m_dbnam, (uint) m_dblen + 1, &m_tblnam, (uint) m_tbllen + 1, &m_coltype, (uint) m_colcnt, NullS); if (!m_memory) { sql_print_error("Table_map_log_event::rewrite_db: " "failed to allocate new m_memory (%d + %d + %d bytes required)", m_dblen + 1, m_tbllen + 1, m_colcnt); DBUG_RETURN(-1); } memcpy((void*)m_dbnam, new_db, m_dblen + 1); memcpy((void*)m_tblnam, tblnam, m_tbllen + 1); memcpy(m_coltype, coltype, m_colcnt); my_free(memory); DBUG_RETURN(0); }
O0
cpp
Table_map_log_event::rewrite_db(char const*, unsigned long, Format_description_log_event const*): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x3f1f5 movq -0x28(%rbp), %rax movzbl 0xcd(%rax), %eax cmpl $0x13, %eax jge 0x3f218 movq -0x28(%rbp), %rax movzbl 0xcd(%rax), %eax movl %eax, -0x84(%rbp) jmp 0x3f225 movl $0x13, %eax movl %eax, -0x84(%rbp) jmp 0x3f225 movq -0x80(%rbp), %rcx movl -0x84(%rbp), %eax addl $0x8, %eax movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rax subq 0x98(%rcx), %rax movl %eax, -0x30(%rbp) cmpl $0x0, %eax jne 0x3f299 movq -0x80(%rbp), %rax movq 0x10(%rax), %rdi movl -0x2c(%rbp), %ecx addq %rcx, %rdi addq $0x1, %rdi movq -0x18(%rbp), %rsi movq 0x98(%rax), %rdx addq $0x1, %rdx callq 0x3b0c0 movq -0x80(%rbp), %rax movq 0x90(%rax), %rdi movq -0x18(%rbp), %rsi movq 0x98(%rax), %rdx addq $0x1, %rdx callq 0x3b0c0 movl $0x0, -0x4(%rbp) jmp 0x3f51a movq -0x80(%rbp), %rax movq 0x10(%rax), %rax movl 0x9(%rax), %eax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movslq -0x30(%rbp), %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rsi xorl %edi, %edi movl $0x10, %edx callq 0xba940 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x3f2f0 movq -0x40(%rbp), %rsi leaq 0xd2f6f(%rip), %rdi # 0x11224c movb $0x0, %al callq 0x40030 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3f51a movq -0x80(%rbp), %rax movq -0x48(%rbp), %rcx movq %rcx, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x50(%rbp), %rdi movq 0x10(%rax), %rsi movl -0x2c(%rbp), %eax movl %eax, %edx callq 0x3b0c0 movq -0x50(%rbp), %rax addq $0x9, %rax movq %rax, -0x60(%rbp) movq -0x40(%rbp), %rax movl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) movl -0x2c(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x2c(%rbp), %eax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x3f34b movq -0x20(%rbp), %rax movb %al, %cl movq -0x50(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x50(%rbp) movb %cl, (%rax) movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx addq $0x1, %rdx callq 0x3b0c0 movq -0x80(%rbp), %rax movq -0x20(%rbp), %rcx addq $0x1, %rcx addq -0x50(%rbp), %rcx movq %rcx, -0x50(%rbp) movq 0x98(%rax), %rcx addq $0x2, %rcx addq -0x58(%rbp), %rcx movq %rcx, -0x58(%rbp) movq -0x50(%rbp), %rdi movq 0x10(%rax), %rsi addq -0x58(%rbp), %rsi movq -0x38(%rbp), %rdx subq -0x58(%rbp), %rdx callq 0x3b0c0 movq -0x80(%rbp), %rdi callq 0x655c0 movq -0x80(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x1, %edx callq 0x65370 movq -0x80(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, 0x98(%rax) movq 0xc0(%rax), %rcx movq %rcx, -0x68(%rbp) movq 0xa0(%rax), %rcx movq %rcx, -0x70(%rbp) movq 0xb8(%rax), %rcx movq %rcx, -0x78(%rbp) movq %rax, %rdx addq $0x90, %rdx movq 0x98(%rax), %rcx addl $0x1, %ecx movq %rax, %r8 addq $0xa0, %r8 movq 0xa8(%rax), %rsi movl %esi, %r9d addl $0x1, %r9d movq %rax, %r10 addq $0xb8, %r10 movq 0xb0(%rax), %rax xorl %edi, %edi movl $0x10, %esi xorl %r11d, %r11d movq %r10, (%rsp) movl %eax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, %al callq 0xb20e0 movq %rax, %rcx movq -0x80(%rbp), %rax movq %rcx, 0xc0(%rax) cmpq $0x0, 0xc0(%rax) jne 0x3f4b1 movq -0x80(%rbp), %rax movq 0x98(%rax), %rsi addq $0x1, %rsi movq 0xa8(%rax), %rdx addq $0x1, %rdx movq 0xb0(%rax), %rcx leaq 0xd2e00(%rip), %rdi # 0x1122a1 movb $0x0, %al callq 0x40030 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3f51a movq -0x80(%rbp), %rax movq 0x90(%rax), %rdi movq -0x18(%rbp), %rsi movq 0x98(%rax), %rdx addq $0x1, %rdx callq 0x3b0c0 movq -0x80(%rbp), %rax movq 0xa0(%rax), %rdi movq -0x70(%rbp), %rsi movq 0xa8(%rax), %rdx addq $0x1, %rdx callq 0x3b0c0 movq -0x80(%rbp), %rax movq 0xb8(%rax), %rdi movq -0x78(%rbp), %rsi movq 0xb0(%rax), %rdx callq 0x3b0c0 movq -0x68(%rbp), %rdi callq 0xbacc0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN19Table_map_log_event10rewrite_dbEPKcmPK28Format_description_log_event: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rbp+var_80], rax jmp short $+2 loc_3F1F5: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+0CDh] cmp eax, 13h jge short loc_3F218 mov rax, [rbp+var_28] movzx eax, byte ptr [rax+0CDh] mov [rbp+var_84], eax jmp short loc_3F225 loc_3F218: mov eax, 13h mov [rbp+var_84], eax jmp short $+2 loc_3F225: mov rcx, [rbp+var_80] mov eax, [rbp+var_84] add eax, 8 mov [rbp+var_2C], eax mov rax, [rbp+var_20] sub rax, [rcx+98h] mov [rbp+var_30], eax cmp eax, 0 jnz short loc_3F299 mov rax, [rbp+var_80] mov rdi, [rax+10h] mov ecx, [rbp+var_2C] add rdi, rcx add rdi, 1 mov rsi, [rbp+var_18] mov rdx, [rax+98h] add rdx, 1 call _memcpy mov rax, [rbp+var_80] mov rdi, [rax+90h] mov rsi, [rbp+var_18] mov rdx, [rax+98h] add rdx, 1 call _memcpy mov [rbp+var_4], 0 jmp loc_3F51A loc_3F299: mov rax, [rbp+var_80] mov rax, [rax+10h] mov eax, [rax+9] mov [rbp+var_38], rax mov rax, [rbp+var_38] movsxd rcx, [rbp+var_30] add rax, rcx mov [rbp+var_40], rax mov rsi, [rbp+var_40] xor edi, edi mov edx, 10h call my_malloc mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_3F2F0 mov rsi, [rbp+var_40] lea rdi, aTableMapLogEve; "Table_map_log_event::rewrite_db: failed"... mov al, 0 call _ZL15sql_print_errorPKcz; sql_print_error(char const*,...) mov [rbp+var_4], 0FFFFFFFFh jmp loc_3F51A loc_3F2F0: mov rax, [rbp+var_80] mov rcx, [rbp+var_48] mov [rbp+var_50], rcx mov [rbp+var_58], 0 mov rdi, [rbp+var_50] mov rsi, [rax+10h] mov eax, [rbp+var_2C] mov edx, eax call _memcpy mov rax, [rbp+var_50] add rax, 9 mov [rbp+var_60], rax mov rax, [rbp+var_40] mov ecx, eax mov rax, [rbp+var_60] mov [rax], ecx mov ecx, [rbp+var_2C] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_2C] add rax, [rbp+var_58] mov [rbp+var_58], rax jmp short $+2 loc_3F34B: mov rax, [rbp+var_20] mov cl, al mov rax, [rbp+var_50] mov rdx, rax add rdx, 1 mov [rbp+var_50], rdx mov [rax], cl mov rdi, [rbp+var_50] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] add rdx, 1 call _memcpy mov rax, [rbp+var_80] mov rcx, [rbp+var_20] add rcx, 1 add rcx, [rbp+var_50] mov [rbp+var_50], rcx mov rcx, [rax+98h] add rcx, 2 add rcx, [rbp+var_58] mov [rbp+var_58], rcx mov rdi, [rbp+var_50] mov rsi, [rax+10h] add rsi, [rbp+var_58] mov rdx, [rbp+var_38] sub rdx, [rbp+var_58] call _memcpy mov rdi, [rbp+var_80]; this call _ZN9Log_event13free_temp_bufEv; Log_event::free_temp_buf(void) mov rdi, [rbp+var_80]; this mov rsi, [rbp+var_48]; unsigned __int8 * mov edx, 1; bool call _ZN9Log_event17register_temp_bufEPhb; Log_event::register_temp_buf(uchar *,bool) mov rax, [rbp+var_80] mov rcx, [rbp+var_20] mov [rax+98h], rcx mov rcx, [rax+0C0h] mov [rbp+var_68], rcx mov rcx, [rax+0A0h] mov [rbp+var_70], rcx mov rcx, [rax+0B8h] mov [rbp+var_78], rcx mov rdx, rax add rdx, 90h mov rcx, [rax+98h] add ecx, 1 mov r8, rax add r8, 0A0h mov rsi, [rax+0A8h] mov r9d, esi add r9d, 1 mov r10, rax add r10, 0B8h mov rax, [rax+0B0h] xor edi, edi mov esi, 10h xor r11d, r11d mov [rsp+0A0h+var_A0], r10 mov [rsp+0A0h+var_98], eax mov [rsp+0A0h+var_90], 0 mov al, 0 call my_multi_malloc mov rcx, rax mov rax, [rbp+var_80] mov [rax+0C0h], rcx cmp qword ptr [rax+0C0h], 0 jnz short loc_3F4B1 mov rax, [rbp+var_80] mov rsi, [rax+98h] add rsi, 1 mov rdx, [rax+0A8h] add rdx, 1 mov rcx, [rax+0B0h] lea rdi, aTableMapLogEve_0; "Table_map_log_event::rewrite_db: failed"... mov al, 0 call _ZL15sql_print_errorPKcz; sql_print_error(char const*,...) mov [rbp+var_4], 0FFFFFFFFh jmp short loc_3F51A loc_3F4B1: mov rax, [rbp+var_80] mov rdi, [rax+90h] mov rsi, [rbp+var_18] mov rdx, [rax+98h] add rdx, 1 call _memcpy mov rax, [rbp+var_80] mov rdi, [rax+0A0h] mov rsi, [rbp+var_70] mov rdx, [rax+0A8h] add rdx, 1 call _memcpy mov rax, [rbp+var_80] mov rdi, [rax+0B8h] mov rsi, [rbp+var_78] mov rdx, [rax+0B0h] call _memcpy mov rdi, [rbp+var_68] call my_free mov [rbp+var_4], 0 loc_3F51A: mov eax, [rbp+var_4] add rsp, 0A0h pop rbp retn
long long Table_map_log_event::rewrite_db( Table_map_log_event *this, const char *a2, long long a3, const Format_description_log_event *a4) { unsigned __int8 *v4; // rax int v6; // [rsp+1Ch] [rbp-84h] long long v7; // [rsp+28h] [rbp-78h] long long v8; // [rsp+30h] [rbp-70h] long long v9; // [rsp+38h] [rbp-68h] long long v10; // [rsp+48h] [rbp-58h] _BYTE *v11; // [rsp+50h] [rbp-50h] unsigned __int8 *v12; // [rsp+58h] [rbp-48h] int v13; // [rsp+60h] [rbp-40h] long long v14; // [rsp+68h] [rbp-38h] int v15; // [rsp+70h] [rbp-30h] unsigned int v16; // [rsp+74h] [rbp-2Ch] if ( *((unsigned __int8 *)a4 + 205) >= 0x13u ) v6 = 19; else v6 = *((unsigned __int8 *)a4 + 205); v16 = v6 + 8; v15 = a3 - *((_DWORD *)this + 38); if ( v15 ) { v14 = *(unsigned int *)(*((_QWORD *)this + 2) + 9LL); v13 = v15 + v14; v12 = (unsigned __int8 *)my_malloc(0LL, v15 + v14, 16LL); if ( v12 ) { memcpy(v12, *((_QWORD *)this + 2), v16); *(_DWORD *)(v12 + 9) = v13; v4 = &v12[v16]; v11 = v4 + 1; *v4 = a3; memcpy(v4 + 1, a2, a3 + 1); v10 = v16 + *((_QWORD *)this + 19) + 2LL; memcpy(&v11[a3 + 1], v10 + *((_QWORD *)this + 2), v14 - v10); Log_event::free_temp_buf(this); Log_event::register_temp_buf(this, v12, 1); *((_QWORD *)this + 19) = a3; v9 = *((_QWORD *)this + 24); v8 = *((_QWORD *)this + 20); v7 = *((_QWORD *)this + 23); *((_QWORD *)this + 24) = my_multi_malloc( 0, 16, (int)this + 144, (unsigned int)*((_QWORD *)this + 19) + 1, (int)this + 160, (unsigned int)*((_QWORD *)this + 21) + 1, (char *)this + 184, *((_QWORD *)this + 22), 0LL); if ( *((_QWORD *)this + 24) ) { memcpy(*((_QWORD *)this + 18), a2, *((_QWORD *)this + 19) + 1LL); memcpy(*((_QWORD *)this + 20), v8, *((_QWORD *)this + 21) + 1LL); memcpy(*((_QWORD *)this + 23), v7, *((_QWORD *)this + 22)); my_free(v9); return 0; } else { sql_print_error( "Table_map_log_event::rewrite_db: failed to allocate new m_memory (%d + %d + %d bytes required)", *((_DWORD *)this + 38) + 1, *((_QWORD *)this + 21) + 1, *((_QWORD *)this + 22)); return (unsigned int)-1; } } else { sql_print_error("Table_map_log_event::rewrite_db: failed to allocate new temp_buf (%d bytes required)", v13); return (unsigned int)-1; } } else { memcpy(v16 + *((_QWORD *)this + 2) + 1LL, a2, *((_QWORD *)this + 19) + 1LL); memcpy(*((_QWORD *)this + 18), a2, *((_QWORD *)this + 19) + 1LL); return 0; } }
rewrite_db: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x80],RAX JMP 0x0013f1f5 LAB_0013f1f5: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0xcd] CMP EAX,0x13 JGE 0x0013f218 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0xcd] MOV dword ptr [RBP + -0x84],EAX JMP 0x0013f225 LAB_0013f218: MOV EAX,0x13 MOV dword ptr [RBP + -0x84],EAX JMP 0x0013f225 LAB_0013f225: MOV RCX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RBP + -0x84] ADD EAX,0x8 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RCX + 0x98] MOV dword ptr [RBP + -0x30],EAX CMP EAX,0x0 JNZ 0x0013f299 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x2c] ADD RDI,RCX ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0x98] ADD RDX,0x1 CALL 0x0013b0c0 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0x90] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0x98] ADD RDX,0x1 CALL 0x0013b0c0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013f51a LAB_0013f299: MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX + 0x9] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,dword ptr [RBP + -0x30] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RSI,qword ptr [RBP + -0x40] XOR EDI,EDI MOV EDX,0x10 CALL 0x001ba940 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0013f2f0 MOV RSI,qword ptr [RBP + -0x40] LEA RDI,[0x21224c] MOV AL,0x0 CALL 0x00140030 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013f51a LAB_0013f2f0: MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RCX MOV qword ptr [RBP + -0x58],0x0 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX CALL 0x0013b0c0 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x9 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX JMP 0x0013f34b LAB_0013f34b: MOV RAX,qword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x50] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x50],RDX MOV byte ptr [RAX],CL MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x1 CALL 0x0013b0c0 MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x1 ADD RCX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RCX MOV RCX,qword ptr [RAX + 0x98] ADD RCX,0x2 ADD RCX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RCX MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX + 0x10] ADD RSI,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,qword ptr [RBP + -0x58] CALL 0x0013b0c0 MOV RDI,qword ptr [RBP + -0x80] CALL 0x001655c0 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x1 CALL 0x00165370 MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RAX + 0xc0] MOV qword ptr [RBP + -0x68],RCX MOV RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x70],RCX MOV RCX,qword ptr [RAX + 0xb8] MOV qword ptr [RBP + -0x78],RCX MOV RDX,RAX ADD RDX,0x90 MOV RCX,qword ptr [RAX + 0x98] ADD ECX,0x1 MOV R8,RAX ADD R8,0xa0 MOV RSI,qword ptr [RAX + 0xa8] MOV R9D,ESI ADD R9D,0x1 MOV R10,RAX ADD R10,0xb8 MOV RAX,qword ptr [RAX + 0xb0] XOR EDI,EDI MOV ESI,0x10 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV dword ptr [RSP + 0x8],EAX MOV qword ptr [RSP + 0x10],0x0 MOV AL,0x0 CALL 0x001b20e0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX + 0xc0],RCX CMP qword ptr [RAX + 0xc0],0x0 JNZ 0x0013f4b1 MOV RAX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RAX + 0x98] ADD RSI,0x1 MOV RDX,qword ptr [RAX + 0xa8] ADD RDX,0x1 MOV RCX,qword ptr [RAX + 0xb0] LEA RDI,[0x2122a1] MOV AL,0x0 CALL 0x00140030 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013f51a LAB_0013f4b1: MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0x90] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0x98] ADD RDX,0x1 CALL 0x0013b0c0 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0xa0] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RAX + 0xa8] ADD RDX,0x1 CALL 0x0013b0c0 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0xb8] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RAX + 0xb0] CALL 0x0013b0c0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x001bacc0 MOV dword ptr [RBP + -0x4],0x0 LAB_0013f51a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xa0 POP RBP RET
/* Table_map_log_event::rewrite_db(char const*, unsigned long, Format_description_log_event const*) */ int4 __thiscall Table_map_log_event::rewrite_db (Table_map_log_event *this,char *param_1,ulong param_2, Format_description_log_event *param_3) { uint uVar1; int8 uVar2; void *__src; void *__src_00; int iVar3; long lVar4; uchar *__dest; uchar *puVar5; int8 uVar6; uint local_8c; int4 local_c; if ((byte)param_3[0xcd] < 0x13) { local_8c = (uint)(byte)param_3[0xcd]; } else { local_8c = 0x13; } local_8c = local_8c + 8; iVar3 = (int)param_2 - (int)*(int8 *)(this + 0x98); if (iVar3 == 0) { memcpy((void *)(*(long *)(this + 0x10) + (ulong)local_8c + 1),param_1,*(long *)(this + 0x98) + 1 ); memcpy(*(void **)(this + 0x90),param_1,*(long *)(this + 0x98) + 1); local_c = 0; } else { uVar1 = *(uint *)(*(long *)(this + 0x10) + 9); lVar4 = (ulong)uVar1 + (long)iVar3; __dest = (uchar *)my_malloc(0,lVar4,0x10); if (__dest == (uchar *)0x0) { sql_print_error("Table_map_log_event::rewrite_db: failed to allocate new temp_buf (%d bytes required)" ,lVar4); local_c = 0xffffffff; } else { memcpy(__dest,*(void **)(this + 0x10),(ulong)local_8c); *(int *)(__dest + 9) = (int)lVar4; puVar5 = __dest + local_8c; *puVar5 = (uchar)param_2; memcpy(puVar5 + 1,param_1,param_2 + 1); lVar4 = *(long *)(this + 0x98) + 2 + (ulong)local_8c; memcpy(puVar5 + 1 + param_2 + 1,(void *)(*(long *)(this + 0x10) + lVar4),(ulong)uVar1 - lVar4) ; Log_event::free_temp_buf((Log_event *)this); Log_event::register_temp_buf((Log_event *)this,__dest,true); *(ulong *)(this + 0x98) = param_2; uVar2 = *(int8 *)(this + 0xc0); __src = *(void **)(this + 0xa0); __src_00 = *(void **)(this + 0xb8); uVar6 = my_multi_malloc(0,0x10,this + 0x90,(int)*(int8 *)(this + 0x98) + 1,this + 0xa0, (int)*(int8 *)(this + 0xa8) + 1,this + 0xb8, (int)*(int8 *)(this + 0xb0),0); *(int8 *)(this + 0xc0) = uVar6; if (*(long *)(this + 0xc0) == 0) { sql_print_error("Table_map_log_event::rewrite_db: failed to allocate new m_memory (%d + %d + %d bytes required)" ,*(long *)(this + 0x98) + 1,*(long *)(this + 0xa8) + 1, *(int8 *)(this + 0xb0)); local_c = 0xffffffff; } else { memcpy(*(void **)(this + 0x90),param_1,*(long *)(this + 0x98) + 1); memcpy(*(void **)(this + 0xa0),__src,*(long *)(this + 0xa8) + 1); memcpy(*(void **)(this + 0xb8),__src_00,*(size_t *)(this + 0xb0)); my_free(uVar2); local_c = 0; } } } return local_c; }
29,006
my_uca_charcmp
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { uint num_level= cs->levels_for_order; int ret; uint i; for (i= 0; i != num_level; i++) { ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i); if (ret) { return ret; } } return 0; }
O3
c
my_uca_charcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movzbl 0xb2(%rdi), %eax testq %rax, %rax je 0xbc98c movq 0x60(%rdi), %r12 movl %esi, %edi movq %rsi, %r8 shrq $0x8, %r8 movl $0xffffff, %r9d # imm = 0xFFFFFF movq %r8, -0x78(%rbp) andq %r9, %r8 movl $0xff, %ecx movq %rsi, %r10 andq %rcx, %r10 movl %edx, %r11d movq %rdx, %rbx shrq $0x8, %rbx movq %rbx, -0x70(%rbp) andq %rbx, %r9 andq %rdx, %rcx movq %rcx, -0x80(%rbp) cmpq %rdx, %rsi movl $0x0, %esi setne %sil imulq $0x38, %rax, %rdx xorl %r13d, %r13d movq %rdi, -0x68(%rbp) movq %r9, -0x60(%rbp) movq %r8, -0x58(%rbp) movq %r10, -0x50(%rbp) movq %r11, -0x48(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movq (%r12,%r13), %rax cmpq %rdi, %rax jb 0xbc86b movq 0x10(%r12,%r13), %rcx movq (%rcx,%r8,8), %rcx testq %rcx, %rcx je 0xbc86b movq 0x8(%r12,%r13), %rdx movzbl (%rdx,%r8), %edx imull %r10d, %edx leaq (%rcx,%rdx,2), %r14 movq -0x38(%rbp), %rdx jmp 0xbc86e xorl %r14d, %r14d movl %esi, %ebx cmpq %r11, %rax jb 0xbc97b movq 0x10(%r12,%r13), %rax movq (%rax,%r9,8), %rax movl %esi, %ebx testq %rax, %rax je 0xbc97b movl %esi, %ebx testq %r14, %r14 je 0xbc97b movq 0x8(%r12,%r13), %rcx movzbl (%rcx,%r9), %edx imull -0x80(%rbp), %edx leaq (%rax,%rdx,2), %r15 movzwl (%r14), %eax movl $0x1, %ebx cmpw (%r15), %ax jne 0xbc98e movq -0x78(%rbp), %rax movzbl (%rcx,%rax), %esi movq -0x70(%rbp), %rax movzbl (%rcx,%rax), %eax cmpb %al, %sil jbe 0xbc912 movq %rax, -0x40(%rbp) leal (%rax,%rax), %edx movq %r14, %rdi movq %r15, %rsi callq 0x29560 movl -0x2c(%rbp), %esi movq -0x48(%rbp), %r11 movq -0x50(%rbp), %r10 movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 movq -0x68(%rbp), %rdi testl %eax, %eax movq -0x38(%rbp), %rdx jne 0xbc98e movq -0x40(%rbp), %rax movzwl (%r14,%rax,2), %ebx jmp 0xbc97b leal (%rsi,%rsi), %edx cmpb %al, %sil jae 0xbc953 movq %rsi, -0x40(%rbp) movq %r14, %rdi movq %r15, %rsi callq 0x29560 testl %eax, %eax movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx jne 0xbc98e movq -0x40(%rbp), %rax movzwl (%r15,%rax,2), %ebx jmp 0xbc97b movq %r14, %rdi movq %r15, %rsi callq 0x29880 movl %eax, %ebx movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx testl %ebx, %ebx jne 0xbc98e addq $0x38, %r13 cmpq %r13, %rdx jne 0xbc83c xorl %ebx, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_uca_charcmp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movzx eax, byte ptr [rdi+0B2h] test rax, rax jz loc_BC98C mov r12, [rdi+60h] mov edi, esi mov r8, rsi shr r8, 8 mov r9d, 0FFFFFFh mov [rbp+var_78], r8 and r8, r9 mov ecx, 0FFh mov r10, rsi and r10, rcx mov r11d, edx mov rbx, rdx shr rbx, 8 mov [rbp+var_70], rbx and r9, rbx and rcx, rdx mov [rbp+var_80], rcx cmp rsi, rdx mov esi, 0 setnz sil imul rdx, rax, 38h ; '8' xor r13d, r13d mov [rbp+var_68], rdi mov [rbp+var_60], r9 mov [rbp+var_58], r8 mov [rbp+var_50], r10 mov [rbp+var_48], r11 mov [rbp+var_2C], esi mov [rbp+var_38], rdx loc_BC83C: mov rax, [r12+r13] cmp rax, rdi jb short loc_BC86B mov rcx, [r12+r13+10h] mov rcx, [rcx+r8*8] test rcx, rcx jz short loc_BC86B mov rdx, [r12+r13+8] movzx edx, byte ptr [rdx+r8] imul edx, r10d lea r14, [rcx+rdx*2] mov rdx, [rbp+var_38] jmp short loc_BC86E loc_BC86B: xor r14d, r14d loc_BC86E: mov ebx, esi cmp rax, r11 jb loc_BC97B mov rax, [r12+r13+10h] mov rax, [rax+r9*8] mov ebx, esi test rax, rax jz loc_BC97B mov ebx, esi test r14, r14 jz loc_BC97B mov rcx, [r12+r13+8] movzx edx, byte ptr [rcx+r9] imul edx, dword ptr [rbp+var_80] lea r15, [rax+rdx*2] movzx eax, word ptr [r14] mov ebx, 1 cmp ax, [r15] jnz loc_BC98E mov rax, [rbp+var_78] movzx esi, byte ptr [rcx+rax] mov rax, [rbp+var_70] movzx eax, byte ptr [rcx+rax] cmp sil, al jbe short loc_BC912 mov [rbp+var_40], rax lea edx, [rax+rax] mov rdi, r14 mov rsi, r15 call _bcmp mov esi, [rbp+var_2C] mov r11, [rbp+var_48] mov r10, [rbp+var_50] mov r8, [rbp+var_58] mov r9, [rbp+var_60] mov rdi, [rbp+var_68] test eax, eax mov rdx, [rbp+var_38] jnz loc_BC98E mov rax, [rbp+var_40] movzx ebx, word ptr [r14+rax*2] jmp short loc_BC97B loc_BC912: lea edx, [rsi+rsi] cmp sil, al jnb short loc_BC953 mov [rbp+var_40], rsi mov rdi, r14 mov rsi, r15 call _bcmp test eax, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] jnz short loc_BC98E mov rax, [rbp+var_40] movzx ebx, word ptr [r15+rax*2] jmp short loc_BC97B loc_BC953: mov rdi, r14 mov rsi, r15 call _memcmp mov ebx, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] loc_BC97B: test ebx, ebx jnz short loc_BC98E add r13, 38h ; '8' cmp rdx, r13 jnz loc_BC83C loc_BC98C: xor ebx, ebx loc_BC98E: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_uca_charcmp(long long a1, unsigned long long a2, unsigned long long a3) { long long v3; // rax long long v4; // r12 unsigned long long v5; // rdi long long v6; // r8 int v7; // r10d unsigned long long v8; // r11 long long v9; // r9 BOOL v10; // esi long long v11; // rdx long long v12; // r13 unsigned long long v13; // rax long long v14; // rcx _WORD *v15; // r14 unsigned int v16; // ebx long long v17; // rax long long v18; // rcx _WORD *v19; // r15 int v20; // esi int v21; // eax int v22; // eax long long v23; // rdx int v24; // eax int v26; // [rsp+0h] [rbp-80h] unsigned long long v27; // [rsp+8h] [rbp-78h] unsigned long long v28; // [rsp+10h] [rbp-70h] unsigned long long v29; // [rsp+18h] [rbp-68h] long long v30; // [rsp+20h] [rbp-60h] long long v31; // [rsp+28h] [rbp-58h] int v32; // [rsp+30h] [rbp-50h] unsigned long long v33; // [rsp+38h] [rbp-48h] long long v34; // [rsp+40h] [rbp-40h] long long v35; // [rsp+40h] [rbp-40h] long long v36; // [rsp+48h] [rbp-38h] BOOL v37; // [rsp+54h] [rbp-2Ch] v3 = *(unsigned __int8 *)(a1 + 178); if ( *(_BYTE *)(a1 + 178) ) { v4 = *(_QWORD *)(a1 + 96); v5 = (unsigned int)a2; v27 = a2 >> 8; v6 = (unsigned int)a2 >> 8; v7 = (unsigned __int8)a2; v8 = (unsigned int)a3; v28 = a3 >> 8; v9 = (unsigned int)a3 >> 8; v26 = (unsigned __int8)a3; v10 = a2 != a3; v11 = 56 * v3; v12 = 0LL; v29 = v5; v30 = v9; v31 = v6; v32 = v7; v33 = v8; v37 = v10; v36 = 56 * v3; while ( 1 ) { v13 = *(_QWORD *)(v4 + v12); if ( v13 >= v5 && (v14 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v6)) != 0 ) { v15 = (_WORD *)(v14 + 2LL * v7 * (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(v4 + v12 + 8) + v6)); v11 = v36; } else { v15 = 0LL; } v16 = v10; if ( v13 >= v8 ) { v17 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v9); v16 = v10; if ( v17 ) { v16 = v10; if ( v15 ) { v18 = *(_QWORD *)(v4 + v12 + 8); v19 = (_WORD *)(v17 + 2LL * v26 * (unsigned int)*(unsigned __int8 *)(v18 + v9)); v16 = 1; if ( *v15 != *v19 ) return v16; v20 = *(unsigned __int8 *)(v18 + v27); v21 = *(unsigned __int8 *)(v18 + v28); if ( (unsigned __int8)v20 <= (unsigned __int8)v21 ) { v23 = (unsigned int)(2 * v20); if ( (unsigned __int8)v20 >= (unsigned __int8)v21 ) { v16 = memcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; } else { v35 = *(unsigned __int8 *)(v18 + v27); v24 = bcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; if ( v24 ) return v16; v16 = (unsigned __int16)v19[v35]; } } else { v34 = *(unsigned __int8 *)(v18 + v28); v22 = bcmp(v15, v19, (unsigned int)(2 * v21)); v10 = v37; v8 = v33; v7 = v32; v6 = v31; v9 = v30; v5 = v29; v11 = v36; if ( v22 ) return v16; v16 = (unsigned __int16)v15[v34]; } } } } if ( v16 ) break; v12 += 56LL; if ( v11 == v12 ) return 0; } } else { return 0; } return v16; }
my_uca_charcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVZX EAX,byte ptr [RDI + 0xb2] TEST RAX,RAX JZ 0x001bc98c MOV R12,qword ptr [RDI + 0x60] MOV EDI,ESI MOV R8,RSI SHR R8,0x8 MOV R9D,0xffffff MOV qword ptr [RBP + -0x78],R8 AND R8,R9 MOV ECX,0xff MOV R10,RSI AND R10,RCX MOV R11D,EDX MOV RBX,RDX SHR RBX,0x8 MOV qword ptr [RBP + -0x70],RBX AND R9,RBX AND RCX,RDX MOV qword ptr [RBP + -0x80],RCX CMP RSI,RDX MOV ESI,0x0 SETNZ SIL IMUL RDX,RAX,0x38 XOR R13D,R13D MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x60],R9 MOV qword ptr [RBP + -0x58],R8 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x48],R11 MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX LAB_001bc83c: MOV RAX,qword ptr [R12 + R13*0x1] CMP RAX,RDI JC 0x001bc86b MOV RCX,qword ptr [R12 + R13*0x1 + 0x10] MOV RCX,qword ptr [RCX + R8*0x8] TEST RCX,RCX JZ 0x001bc86b MOV RDX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RDX + R8*0x1] IMUL EDX,R10D LEA R14,[RCX + RDX*0x2] MOV RDX,qword ptr [RBP + -0x38] JMP 0x001bc86e LAB_001bc86b: XOR R14D,R14D LAB_001bc86e: MOV EBX,ESI CMP RAX,R11 JC 0x001bc97b MOV RAX,qword ptr [R12 + R13*0x1 + 0x10] MOV RAX,qword ptr [RAX + R9*0x8] MOV EBX,ESI TEST RAX,RAX JZ 0x001bc97b MOV EBX,ESI TEST R14,R14 JZ 0x001bc97b MOV RCX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RCX + R9*0x1] IMUL EDX,dword ptr [RBP + -0x80] LEA R15,[RAX + RDX*0x2] MOVZX EAX,word ptr [R14] MOV EBX,0x1 CMP AX,word ptr [R15] JNZ 0x001bc98e MOV RAX,qword ptr [RBP + -0x78] MOVZX ESI,byte ptr [RCX + RAX*0x1] MOV RAX,qword ptr [RBP + -0x70] MOVZX EAX,byte ptr [RCX + RAX*0x1] CMP SIL,AL JBE 0x001bc912 MOV qword ptr [RBP + -0x40],RAX LEA EDX,[RAX + RAX*0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x00129560 MOV ESI,dword ptr [RBP + -0x2c] MOV R11,qword ptr [RBP + -0x48] MOV R10,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] TEST EAX,EAX MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001bc98e MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R14 + RAX*0x2] JMP 0x001bc97b LAB_001bc912: LEA EDX,[RSI + RSI*0x1] CMP SIL,AL JNC 0x001bc953 MOV qword ptr [RBP + -0x40],RSI MOV RDI,R14 MOV RSI,R15 CALL 0x00129560 TEST EAX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001bc98e MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R15 + RAX*0x2] JMP 0x001bc97b LAB_001bc953: MOV RDI,R14 MOV RSI,R15 CALL 0x00129880 MOV EBX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] LAB_001bc97b: TEST EBX,EBX JNZ 0x001bc98e ADD R13,0x38 CMP RDX,R13 JNZ 0x001bc83c LAB_001bc98c: XOR EBX,EBX LAB_001bc98e: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_uca_charcmp(long param_1,ulong param_2,ulong param_3) { short *__s2; byte bVar1; byte bVar2; byte bVar3; long lVar4; long lVar5; long lVar6; int iVar7; uint uVar8; ulong uVar9; ulong uVar10; long lVar11; short *__s1; uint local_88; bVar1 = *(byte *)(param_1 + 0xb2); if ((ulong)bVar1 != 0) { lVar4 = *(long *)(param_1 + 0x60); uVar9 = param_2 >> 8 & 0xffffff; uVar10 = param_3 >> 8 & 0xffffff; local_88 = (uint)param_3 & 0xff; lVar11 = 0; do { uVar8 = (uint)(param_2 != param_3); if ((*(ulong *)(lVar4 + lVar11) < (param_2 & 0xffffffff)) || (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar9 * 8), lVar5 == 0)) { __s1 = (short *)0x0; } else { __s1 = (short *)(lVar5 + (ulong)((uint)*(byte *)(*(long *)(lVar4 + 8 + lVar11) + uVar9) * ((uint)param_2 & 0xff)) * 2); } if ((((param_3 & 0xffffffff) <= *(ulong *)(lVar4 + lVar11)) && (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar10 * 8), lVar5 != 0)) && (__s1 != (short *)0x0)) { lVar6 = *(long *)(lVar4 + 8 + lVar11); __s2 = (short *)(lVar5 + (ulong)(*(byte *)(lVar6 + uVar10) * local_88) * 2); if (*__s1 != *__s2) { return 1; } bVar2 = *(byte *)(lVar6 + (param_2 >> 8)); bVar3 = *(byte *)(lVar6 + (param_3 >> 8)); if (bVar3 < bVar2) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar3 + (uint)bVar3)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s1[bVar3]; } else if (bVar2 < bVar3) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s2[bVar2]; } else { uVar8 = memcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); } } if (uVar8 != 0) { return uVar8; } lVar11 = lVar11 + 0x38; } while ((ulong)bVar1 * 0x38 != lVar11); } return 0; }
29,007
my_coll_rule_expand
eloqsql/strings/ctype-uca.c
static int my_coll_rule_expand(my_wc_t *wc, size_t limit, my_wc_t code) { size_t i; for (i= 0; i < limit; i++) { if (wc[i] == 0) { wc[i]= code; return 1; } } return 0; }
O0
c
my_coll_rule_expand: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0xcedca movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) jne 0xcedba movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl $0x1, -0x4(%rbp) jmp 0xcedd1 jmp 0xcedbc movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0xced88 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_rule_expand: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], 0 loc_CED88: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_CEDCA mov rax, [rbp+var_10] mov rcx, [rbp+var_28] cmp qword ptr [rax+rcx*8], 0 jnz short loc_CEDBA mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rbp+var_28] mov [rax+rcx*8], rdx mov [rbp+var_4], 1 jmp short loc_CEDD1 loc_CEDBA: jmp short $+2 loc_CEDBC: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_CED88 loc_CEDCA: mov [rbp+var_4], 0 loc_CEDD1: mov eax, [rbp+var_4] pop rbp retn
long long my_coll_rule_expand(long long a1, unsigned long long a2, long long a3) { unsigned long long i; // [rsp+0h] [rbp-28h] for ( i = 0LL; i < a2; ++i ) { if ( !*(_QWORD *)(a1 + 8 * i) ) { *(_QWORD *)(a1 + 8 * i) = a3; return 1; } } return 0; }
my_coll_rule_expand: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],0x0 LAB_001ced88: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001cedca MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x001cedba MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + RCX*0x8],RDX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001cedd1 LAB_001cedba: JMP 0x001cedbc LAB_001cedbc: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001ced88 LAB_001cedca: MOV dword ptr [RBP + -0x4],0x0 LAB_001cedd1: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_coll_rule_expand(long param_1,ulong param_2,int8 param_3) { ulong local_30; local_30 = 0; while( true ) { if (param_2 <= local_30) { return 0; } if (*(long *)(param_1 + local_30 * 8) == 0) break; local_30 = local_30 + 1; } *(int8 *)(param_1 + local_30 * 8) = param_3; return 1; }
29,008
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
monkey531[P]llama/common/minja.hpp
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) { return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent); }
O1
cpp
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq 0x10(%rsi), %rdx movq 0x20(%rsi), %rax movq %rax, %rcx orq %rdx, %rcx sete %cl cmpb $0x0, 0x40(%rsi) movq %rdi, %rbx sete %sil andb %cl, %sil movq 0x30(%r15), %rcx testq %rcx, %rcx sete %bpl andb %sil, %bpl cmpb $0x1, %bpl jne 0x9dc06 xorl %r12d, %r12d leaq 0x10(%rsp), %r15 movq %r12, (%r15) movl $0x30, %edi callq 0x1b8d0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x8f871(%rip), %rcx # 0x12d448 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %r12, 0x20(%rax) movq %rax, 0x8(%r15) movq %rcx, (%r15) leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x904d4 jmp 0x9dc91 leaq 0x40(%r15), %rdi xorps %xmm0, %xmm0 leaq 0x60(%rsp), %r12 movaps %xmm0, -0x40(%r12) movq %rdx, -0x30(%r12) xorl %r13d, %r13d movq %r13, -0x28(%r12) movq 0x18(%r15), %rdx movq %r13, 0x18(%r15) movq %rdx, -0x28(%r12) movq %r13, 0x10(%r15) movq %rax, -0x20(%r12) movq %r13, -0x18(%r12) movq 0x28(%r15), %rax movq %r13, 0x28(%r15) movq %rax, -0x18(%r12) movq %r13, 0x20(%r15) movq %rcx, -0x10(%r12) movq %r13, -0x8(%r12) movq 0x38(%r15), %rax movq %r13, 0x38(%r15) movq %rax, -0x8(%r12) movq %r13, 0x30(%r15) movups (%rdi), %xmm0 movaps %xmm0, (%r12) xorl %esi, %esi callq 0x59052 movb $0x0, 0x40(%r15) movq %r13, 0x48(%r15) movq %r12, %rdi movl $0x1, %esi callq 0x59052 movq $0x0, (%rbx) leaq 0x8(%rbx), %rdi leaq 0xf(%rsp), %rdx leaq 0x20(%rsp), %rcx movq %rbx, %rsi movq %r14, %r8 callq 0x9e000 movq (%rbx), %rsi movq %rbx, %rdi callq 0x9e082 leaq 0x60(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x59052 movq %r14, %rdi callq 0x5e83e movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x9dce1 callq 0x6e1aa movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x9dcf0 callq 0x6e1aa movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x9dcff callq 0x6e1aa movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x9dd35 movq 0x91278(%rip), %rax # 0x12ef88 cmpb $0x0, (%rax) je 0x9dd20 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9dd2a movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9dd35 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x9dd49 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x9dd49 callq 0x6e1aa movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x87856 testb %bpl, %bpl je 0x9dd7c movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x9dd7c callq 0x6e1aa movq %rbx, %rdi callq 0x1bfb0
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rdx, [rsi+10h] mov rax, [rsi+20h] mov rcx, rax or rcx, rdx setz cl cmp byte ptr [rsi+40h], 0 mov rbx, rdi setz sil and sil, cl mov rcx, [r15+30h] test rcx, rcx setz bpl and bpl, sil cmp bpl, 1 jnz short loc_9DC06 xor r12d, r12d lea r15, [rsp+0A8h+var_98] mov [r15], r12 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rax+20h], r12 mov [r15+8], rax mov [r15], rcx lea rdi, [rsp+0A8h+var_88] mov rsi, r15 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) jmp loc_9DC91 loc_9DC06: lea rdi, [r15+40h] xorps xmm0, xmm0 lea r12, [rsp+0A8h+var_48] movaps xmmword ptr [r12-40h], xmm0 mov [r12-30h], rdx xor r13d, r13d mov [r12-28h], r13 mov rdx, [r15+18h] mov [r15+18h], r13 mov [r12-28h], rdx mov [r15+10h], r13 mov [r12-20h], rax mov [r12-18h], r13 mov rax, [r15+28h] mov [r15+28h], r13 mov [r12-18h], rax mov [r15+20h], r13 mov [r12-10h], rcx mov [r12-8], r13 mov rax, [r15+38h] mov [r15+38h], r13 mov [r12-8], rax mov [r15+30h], r13 movups xmm0, xmmword ptr [rdi] movaps xmmword ptr [r12], 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 [r15+40h], 0 mov [r15+48h], r13 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_9DC91: mov qword ptr [rbx], 0 lea rdi, [rbx+8] lea rdx, [rsp+0A8h+var_99] lea rcx, [rsp+0A8h+var_88] mov rsi, rbx mov r8, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja7ContextESaIS5_EJNS4_5ValueERKSt10shared_ptrIS5_EEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>(minja::Context *&,std::_Sp_alloc_shared_tag<std::allocator<minja::Context>>,minja::Value,std::shared_ptr<minja::Context> const&) mov rsi, [rbx] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS1_S1_EENSt9enable_ifIXsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_ lea r14, [rsp+0A8h+var_48] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_9DCE1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DCE1: mov rdi, [rsp+0A8h+var_60] test rdi, rdi jz short loc_9DCF0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DCF0: mov rdi, [rsp+0A8h+var_70] test rdi, rdi jz short loc_9DCFF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DCFF: mov rdi, [rsp+0A8h+var_80] test rdi, rdi jz short loc_9DD35 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9DD20 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9DD2A loc_9DD20: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9DD2A: cmp eax, 1 jnz short loc_9DD35 mov rax, [rdi] call qword ptr [rax+18h] loc_9DD35: test bpl, bpl jz short loc_9DD49 mov rdi, [rsp+0A8h+var_90] test rdi, rdi jz short loc_9DD49 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DD49: mov rax, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_9DD7C mov rdi, [rsp+arg_10] test rdi, rdi jz short loc_9DD7C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DD7C: mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Context::make(_QWORD *a1, long long a2, long long a3) { __int128 v4; // rax long long v6; // rcx bool v7; // bp long long v8; // rax volatile signed __int32 *v9; // rax volatile signed __int32 *v10; // rax long long v11; // rdi signed __int32 v12; // eax char v14; // [rsp+Fh] [rbp-99h] BYREF long long v15; // [rsp+10h] [rbp-98h] BYREF volatile signed __int32 *v16; // [rsp+18h] [rbp-90h] __int128 v17; // [rsp+20h] [rbp-88h] BYREF long long v18; // [rsp+30h] [rbp-78h] volatile signed __int32 *v19; // [rsp+38h] [rbp-70h] long long v20; // [rsp+40h] [rbp-68h] volatile signed __int32 *v21; // [rsp+48h] [rbp-60h] long long v22; // [rsp+50h] [rbp-58h] volatile signed __int32 *v23; // [rsp+58h] [rbp-50h] _OWORD v24[4]; // [rsp+60h] [rbp-48h] BYREF *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16); *(_QWORD *)&v4 = *(_QWORD *)(a2 + 32); v6 = *(_QWORD *)(a2 + 48); v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0; if ( v7 ) { v15 = 0LL; v8 = operator new(0x30uLL); *(_QWORD *)(v8 + 8) = 0x100000001LL; *(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v8 + 16) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; v16 = (volatile signed __int32 *)v8; v15 = v8 + 16; minja::Value::Value((long long)&v17, &v15); } else { v17 = 0LL; v18 = *((_QWORD *)&v4 + 1); v19 = 0LL; *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24); *(_QWORD *)(a2 + 24) = 0LL; v19 = (volatile signed __int32 *)*((_QWORD *)&v4 + 1); *(_QWORD *)(a2 + 16) = 0LL; v20 = v4; v21 = 0LL; v9 = *(volatile signed __int32 **)(a2 + 40); *(_QWORD *)(a2 + 40) = 0LL; v21 = v9; *(_QWORD *)(a2 + 32) = 0LL; v22 = v6; v23 = 0LL; v10 = *(volatile signed __int32 **)(a2 + 56); *(_QWORD *)(a2 + 56) = 0LL; v23 = v10; *(_QWORD *)(a2 + 48) = 0LL; v24[0] = *(_OWORD *)(a2 + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64)); *(_BYTE *)(a2 + 64) = 0; *(_QWORD *)(a2 + 72) = 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 *)v24); } *a1 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>( a1 + 1, a1, &v14, &v17, a3); std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::_M_enable_shared_from_this_with<minja::Context,minja::Context>( a1, *a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v24); 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(v24); if ( v23 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v11 = *((_QWORD *)&v17 + 1); if ( *((_QWORD *)&v17 + 1) ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } if ( v7 && v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); return a1; }
make: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RDX,qword ptr [RSI + 0x10] MOV RAX,qword ptr [RSI + 0x20] MOV RCX,RAX OR RCX,RDX SETZ CL CMP byte ptr [RSI + 0x40],0x0 MOV RBX,RDI SETZ SIL AND SIL,CL MOV RCX,qword ptr [R15 + 0x30] TEST RCX,RCX SETZ BPL AND BPL,SIL CMP BPL,0x1 JNZ 0x0019dc06 XOR R12D,R12D LEA R15,[RSP + 0x10] MOV qword ptr [R15],R12 MOV EDI,0x30 CALL 0x0011b8d0 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x22d448] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],R12 MOV qword ptr [R15 + 0x8],RAX MOV qword ptr [R15],RCX LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x001904d4 JMP 0x0019dc91 LAB_0019dc06: LEA RDI,[R15 + 0x40] XORPS XMM0,XMM0 LEA R12,[RSP + 0x60] MOVAPS xmmword ptr [R12 + -0x40],XMM0 MOV qword ptr [R12 + -0x30],RDX XOR R13D,R13D MOV qword ptr [R12 + -0x28],R13 MOV RDX,qword ptr [R15 + 0x18] MOV qword ptr [R15 + 0x18],R13 MOV qword ptr [R12 + -0x28],RDX MOV qword ptr [R15 + 0x10],R13 MOV qword ptr [R12 + -0x20],RAX MOV qword ptr [R12 + -0x18],R13 MOV RAX,qword ptr [R15 + 0x28] MOV qword ptr [R15 + 0x28],R13 MOV qword ptr [R12 + -0x18],RAX MOV qword ptr [R15 + 0x20],R13 MOV qword ptr [R12 + -0x10],RCX MOV qword ptr [R12 + -0x8],R13 MOV RAX,qword ptr [R15 + 0x38] MOV qword ptr [R15 + 0x38],R13 MOV qword ptr [R12 + -0x8],RAX MOV qword ptr [R15 + 0x30],R13 MOVUPS XMM0,xmmword ptr [RDI] MOVAPS xmmword ptr [R12],XMM0 XOR ESI,ESI CALL 0x00159052 MOV byte ptr [R15 + 0x40],0x0 MOV qword ptr [R15 + 0x48],R13 MOV RDI,R12 MOV ESI,0x1 CALL 0x00159052 LAB_0019dc91: MOV qword ptr [RBX],0x0 LEA RDI,[RBX + 0x8] LAB_0019dc9c: LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x20] MOV RSI,RBX MOV R8,R14 CALL 0x0019e000 LAB_0019dcb1: MOV RSI,qword ptr [RBX] MOV RDI,RBX CALL 0x0019e082 LEA R14,[RSP + 0x60] MOV RDI,R14 XOR ESI,ESI CALL 0x00159052 MOV RDI,R14 CALL 0x0015e83e MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0019dce1 CALL 0x0016e1aa LAB_0019dce1: MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x0019dcf0 CALL 0x0016e1aa LAB_0019dcf0: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0019dcff CALL 0x0016e1aa LAB_0019dcff: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0019dd35 MOV RAX,qword ptr [0x0022ef88] CMP byte ptr [RAX],0x0 JZ 0x0019dd20 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019dd2a LAB_0019dd20: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019dd2a: CMP EAX,0x1 JNZ 0x0019dd35 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019dd35: TEST BPL,BPL JZ 0x0019dd49 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0019dd49 CALL 0x0016e1aa LAB_0019dd49: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */ Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2) { int *piVar1; Value VVar2; long lVar3; long lVar4; long lVar5; int iVar6; int1 local_99; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_90; int8 local_88; long *plStack_80; long local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; int8 local_48; int8 uStack_40; lVar3 = *(long *)(param_1 + 0x10); lVar4 = *(long *)(param_1 + 0x20); VVar2 = param_1[0x40]; lVar5 = *(long *)(param_1 + 0x30); if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) { local_88 = 0; plStack_80 = (long *)0x0; local_70 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x18); *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x10) = 0; local_60 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x28); *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x20) = 0; local_50 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x38); *(int8 *)(param_1 + 0x38) = 0; *(int8 *)(param_1 + 0x30) = 0; local_48 = *(int8 *)(param_1 + 0x40); uStack_40 = *(int8 *)(param_1 + 0x48); local_78 = lVar3; local_68 = lVar4; local_58 = lVar5; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1 + 0x40,0)); param_1[0x40] = (Value)0x0; *(int8 *)(param_1 + 0x48) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_48,0)); } else { local_98 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_90 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30); *(int8 *)(local_90 + 8) = 0x100000001; *(int ***)local_90 = &PTR___Sp_counted_ptr_inplace_0022d458; local_98 = local_90 + 0x10; *(int8 *)(local_90 + 0x10) = 0; *(int8 *)(local_90 + 0x18) = 0; *(int8 *)(local_90 + 0x20) = 0; Value::Value((Value *)&local_88,(shared_ptr *)&local_98); } *(int8 *)this = 0; /* try { // try from 0019dc9c to 0019dcb0 has its CatchHandler @ 0019dd5b */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context>const&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 8),this,&local_99,&local_88, param_2); std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>:: _M_enable_shared_from_this_with<minja::Context,minja::Context> ((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,*(Context **)this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_48,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } if (plStack_80 != (long *)0x0) { if (*PTR___libc_single_threaded_0022ef88 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_80 + 0xc); iVar6 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar6 = *(int *)((long)plStack_80 + 0xc); *(int *)((long)plStack_80 + 0xc) = iVar6 + -1; } if (iVar6 == 1) { (**(code **)(*plStack_80 + 0x18))(); } } if ((lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) && (local_90 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0)) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_90); } return this; }
29,009
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
monkey531[P]llama/common/minja.hpp
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) { return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent); }
O2
cpp
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi callq 0x637f6 movl %eax, %ebp testb %al, %al je 0x74403 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x67a5c leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x69d8c jmp 0x74410 leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x62eb8 leaq 0x18(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x746bb leaq 0x18(%rsp), %rdi callq 0x6301e testb %bpl, %bpl je 0x74439 leaq 0x10(%rsp), %rdi callq 0x4fa78 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x6301e testb %bpl, %bpl je 0x74463 leaq 0x10(%rsp), %rdi callq 0x4fa78 movq %rbx, %rdi callq 0x23fb0 nop
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) mov ebp, eax test al, al jz short loc_74403 lea r15, [rsp+88h+var_80] mov rdi, r15 call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>() lea rdi, [rsp+88h+var_70] mov rsi, r15 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) jmp short loc_74410 loc_74403: lea rdi, [rsp+88h+var_70] mov rsi, r15 call _ZN5minja5ValueC2EOS0_; minja::Value::Value(minja::Value&&) loc_74410: lea rsi, [rsp+88h+var_70] mov rdi, rbx mov rdx, r14 call _ZSt11make_sharedIN5minja7ContextEJNS0_5ValueERKSt10shared_ptrIS1_EEES3_IT_EDpOT0_; std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context> const&>(minja::Value,std::shared_ptr<minja::Context> const&) lea rdi, [rsp+88h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_74439 lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_74439: mov rax, rbx add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_74463 lea rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_74463: mov rdi, rbx call __Unwind_Resume
long long minja::Context::make(long long a1, minja::Value *a2, long long a3) { bool is_null; // bp long long v6; // [rsp+8h] [rbp-80h] BYREF long long v7; // [rsp+10h] [rbp-78h] BYREF _BYTE v8[112]; // [rsp+18h] [rbp-70h] BYREF is_null = minja::Value::is_null(a2); if ( is_null ) { std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>((long long)&v6); minja::Value::Value((long long)v8, &v6); } else { minja::Value::Value((long long)v8, (long long)a2); } std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context> const&>(a1, v8, a3); minja::Value::~Value((minja::Value *)v8); if ( is_null ) std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); return a1; }
make: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x001637f6 MOV EBP,EAX TEST AL,AL JZ 0x00174403 LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00167a5c LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x00169d8c JMP 0x00174410 LAB_00174403: LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x00162eb8 LAB_00174410: LEA RSI,[RSP + 0x18] MOV RDI,RBX MOV RDX,R14 CALL 0x001746bb LAB_00174420: LEA RDI,[RSP + 0x18] CALL 0x0016301e TEST BPL,BPL JZ 0x00174439 LEA RDI,[RSP + 0x10] CALL 0x0014fa78 LAB_00174439: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */ Value * minja::Context::make(Value *param_1,shared_ptr *param_2) { char cVar1; shared_ptr local_80 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [8]; Value local_70 [80]; cVar1 = Value::is_null((Value *)param_2); if (cVar1 == '\0') { Value::Value(local_70,(Value *)param_2); } else { std:: make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> (); Value::Value(local_70,local_80); } /* try { // try from 00174410 to 0017441f has its CatchHandler @ 00174447 */ std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context>const&> (param_1,local_70); Value::~Value(local_70); if (cVar1 != '\0') { std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78); } return param_1; }
29,010
my_init_mysys_psi_keys
eloqsql/mysys/my_init.c
void my_init_mysys_psi_keys() { const char* category= "mysys"; int count; count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]); mysql_mutex_register(category, all_mysys_mutexes, count); count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]); mysql_cond_register(category, all_mysys_conds, count); count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]); mysql_rwlock_register(category, all_mysys_rwlocks, count); count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]); mysql_thread_register(category, all_mysys_threads, count); count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]); mysql_file_register(category, all_mysys_files, count); count= array_elements(all_mysys_stages); mysql_stage_register(category, all_mysys_stages, count); }
O3
c
my_init_mysys_psi_keys: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x2c9a0b(%rip), %r14 # 0x2ef820 movq (%r14), %rax leaq 0x3653d(%rip), %rbx # 0x5c35c leaq 0x2c922a(%rip), %rsi # 0x2ef050 movq %rbx, %rdi movl $0x13, %edx callq *(%rax) movq (%r14), %rax leaq 0x2c93e6(%rip), %rsi # 0x2ef220 movq %rbx, %rdi movl $0x7, %edx callq *0x10(%rax) movq (%r14), %rax leaq 0x2c9481(%rip), %rsi # 0x2ef2d0 movq %rbx, %rdi movl $0x1, %edx callq *0x8(%rax) movq (%r14), %rax leaq 0x2c948c(%rip), %rsi # 0x2ef2f0 movq %rbx, %rdi movl $0x1, %edx callq *0x18(%rax) movq (%r14), %rax leaq 0x2c9497(%rip), %rsi # 0x2ef310 movq %rbx, %rdi movl $0x2, %edx callq *0x20(%rax) movq (%r14), %rax movq 0x28(%rax), %rax leaq 0x2c91ae(%rip), %rsi # 0x2ef040 movq %rbx, %rdi movl $0x1, %edx popq %rbx popq %r14 popq %rbp jmpq *%rax
my_init_mysys_psi_keys: push rbp mov rbp, rsp push r14 push rbx lea r14, PSI_server mov rax, [r14] lea rbx, aMysys; "mysys" lea rsi, all_mysys_mutexes mov rdi, rbx mov edx, 13h call qword ptr [rax] mov rax, [r14] lea rsi, all_mysys_conds mov rdi, rbx mov edx, 7 call qword ptr [rax+10h] mov rax, [r14] lea rsi, all_mysys_rwlocks mov rdi, rbx mov edx, 1 call qword ptr [rax+8] mov rax, [r14] lea rsi, all_mysys_threads mov rdi, rbx mov edx, 1 call qword ptr [rax+18h] mov rax, [r14] lea rsi, all_mysys_files mov rdi, rbx mov edx, 2 call qword ptr [rax+20h] mov rax, [r14] mov rax, [rax+28h] lea rsi, all_mysys_stages mov rdi, rbx mov edx, 1 pop rbx pop r14 pop rbp jmp rax
long long my_init_mysys_psi_keys() { (*(void ( **)(const char *, _UNKNOWN **, long long))PSI_server[0])("mysys", &all_mysys_mutexes, 19LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server[0] + 2))("mysys", &all_mysys_conds, 7LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server[0] + 1))("mysys", &all_mysys_rwlocks, 1LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server[0] + 3))("mysys", &all_mysys_threads, 1LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server[0] + 4))("mysys", &all_mysys_files, 2LL); return (*((long long ( **)(const char *, _UNKNOWN **, long long))PSI_server[0] + 5))( "mysys", &all_mysys_stages, 1LL); }
my_init_mysys_psi_keys: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA R14,[0x3ef820] MOV RAX,qword ptr [R14] LEA RBX,[0x15c35c] LEA RSI,[0x3ef050] MOV RDI,RBX MOV EDX,0x13 CALL qword ptr [RAX] MOV RAX,qword ptr [R14] LEA RSI,[0x3ef220] MOV RDI,RBX MOV EDX,0x7 CALL qword ptr [RAX + 0x10] MOV RAX,qword ptr [R14] LEA RSI,[0x3ef2d0] MOV RDI,RBX MOV EDX,0x1 CALL qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14] LEA RSI,[0x3ef2f0] MOV RDI,RBX MOV EDX,0x1 CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [R14] LEA RSI,[0x3ef310] MOV RDI,RBX MOV EDX,0x2 CALL qword ptr [RAX + 0x20] MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x28] LEA RSI,[0x3ef040] MOV RDI,RBX MOV EDX,0x1 POP RBX POP R14 POP RBP JMP RAX
void my_init_mysys_psi_keys(void) { (**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13); (**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7); (**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1); (**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1); (**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2); /* WARNING: Could not recover jumptable at 0x00125e9e. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1); return; }
29,011
mi_too_big_key_for_sort
eloqsql/storage/myisam/mi_check.c
my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows) { uint key_maxlength=key->maxlength; if (key->flag & HA_FULLTEXT) { uint ft_max_word_len_for_sort=FT_MAX_WORD_LEN_FOR_SORT* key->seg->charset->mbmaxlen; key_maxlength+=ft_max_word_len_for_sort-HA_FT_MAXBYTELEN; } return (key->flag & HA_SPATIAL) || (key->flag & (HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY | HA_FULLTEXT) && ((ulonglong) rows * key_maxlength > myisam_max_temp_length)); }
O0
c
mi_too_big_key_for_sort: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movzwl 0x16(%rax), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x3eb3c movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq (%rax), %rax imull $0x1f, 0x9c(%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax subl $0xfe, %eax addl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rax movzwl 0xa(%rax), %ecx andl $0x400, %ecx # imm = 0x400 movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x19(%rbp) jne 0x3eb8d movq -0x8(%rbp), %rax movzwl 0xa(%rax), %ecx andl $0xa8, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x1a(%rbp) je 0x3eb87 movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx imulq %rcx, %rax leaq 0x221dea(%rip), %rcx # 0x260968 cmpq (%rcx), %rax seta %al movb %al, -0x1a(%rbp) movb -0x1a(%rbp), %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopw (%rax,%rax)
mi_too_big_key_for_sort: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] movzx eax, word ptr [rax+16h] mov [rbp+var_14], eax mov rax, [rbp+var_8] movzx eax, word ptr [rax+0Ah] and eax, 80h cmp eax, 0 jz short loc_3EB3C mov rax, [rbp+var_8] mov rax, [rax+28h] mov rax, [rax] imul eax, [rax+9Ch], 1Fh mov [rbp+var_18], eax mov eax, [rbp+var_18] sub eax, 0FEh add eax, [rbp+var_14] mov [rbp+var_14], eax loc_3EB3C: mov rax, [rbp+var_8] movzx ecx, word ptr [rax+0Ah] and ecx, 400h mov al, 1 cmp ecx, 0 mov [rbp+var_19], al jnz short loc_3EB8D mov rax, [rbp+var_8] movzx ecx, word ptr [rax+0Ah] and ecx, 0A8h xor eax, eax cmp ecx, 0 mov [rbp+var_1A], al jz short loc_3EB87 mov rax, [rbp+var_10] mov ecx, [rbp+var_14] imul rax, rcx lea rcx, myisam_max_temp_length cmp rax, [rcx] setnbe al mov [rbp+var_1A], al loc_3EB87: mov al, [rbp+var_1A] mov [rbp+var_19], al loc_3EB8D: mov al, [rbp+var_19] and al, 1 movzx eax, al pop rbp retn
long long mi_too_big_key_for_sort(long long a1, long long a2) { bool v3; // [rsp+0h] [rbp-1Ah] char v4; // [rsp+1h] [rbp-19h] unsigned int v5; // [rsp+6h] [rbp-14h] v5 = *(unsigned __int16 *)(a1 + 22); if ( (*(_WORD *)(a1 + 10) & 0x80) != 0 ) v5 += 31 * *(_DWORD *)(**(_QWORD **)(a1 + 40) + 156LL) - 254; v4 = 1; if ( (*(_WORD *)(a1 + 10) & 0x400) == 0 ) { v3 = 0; if ( (*(_WORD *)(a1 + 10) & 0xA8) != 0 ) v3 = (unsigned long long)v5 * a2 > myisam_max_temp_length; v4 = v3; } return v4 & 1; }
mi_too_big_key_for_sort: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,word ptr [RAX + 0x16] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x80 CMP EAX,0x0 JZ 0x0013eb3c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RAX] IMUL EAX,dword ptr [RAX + 0x9c],0x1f MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0xfe ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX LAB_0013eb3c: MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,word ptr [RAX + 0xa] AND ECX,0x400 MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x19],AL JNZ 0x0013eb8d MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,word ptr [RAX + 0xa] AND ECX,0xa8 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x1a],AL JZ 0x0013eb87 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] IMUL RAX,RCX LEA RCX,[0x360968] CMP RAX,qword ptr [RCX] SETA AL MOV byte ptr [RBP + -0x1a],AL LAB_0013eb87: MOV AL,byte ptr [RBP + -0x1a] MOV byte ptr [RBP + -0x19],AL LAB_0013eb8d: MOV AL,byte ptr [RBP + -0x19] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool mi_too_big_key_for_sort(long param_1,long param_2) { int1 local_22; int1 local_21; int4 local_1c; local_1c = (uint)*(ushort *)(param_1 + 0x16); if ((*(ushort *)(param_1 + 10) & 0x80) != 0) { local_1c = *(int *)(**(long **)(param_1 + 0x28) + 0x9c) * 0x1f + -0xfe + local_1c; } local_21 = true; if ((*(ushort *)(param_1 + 10) & 0x400) == 0) { local_22 = false; if ((*(ushort *)(param_1 + 10) & 0xa8) != 0) { local_22 = myisam_max_temp_length <= param_2 * (ulong)local_1c && param_2 * (ulong)local_1c - myisam_max_temp_length != 0; } local_21 = local_22; } return local_21; }
29,012
ma_tls_start
eloqsql/libmariadb/libmariadb/secure/openssl.c
int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused))) { int rc= 1; char *p; if (ma_tls_initialized) return 0; /* lock mutex to prevent multiple initialization */ pthread_mutex_init(&LOCK_openssl_config, NULL); pthread_mutex_lock(&LOCK_openssl_config); #ifdef HAVE_OPENSSL_1_1_API if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL)) goto end; #else if (ssl_thread_init()) { strncpy(errmsg, "Not enough memory", errmsg_len); goto end; } SSL_library_init(); #if SSLEAY_VERSION_NUMBER >= 0x00907000L OPENSSL_config(NULL); #endif #endif #ifndef HAVE_OPENSSL_1_1_API /* load errors */ SSL_load_error_strings(); /* digests and ciphers */ OpenSSL_add_all_algorithms(); #endif disable_sigpipe(); #ifdef OPENSSL_USE_BIOMETHOD memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD)); ma_BIO_method.bread= ma_bio_read; ma_BIO_method.bwrite= ma_bio_write; #endif snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s", #if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API) SSLeay_version(SSLEAY_VERSION)); #else OpenSSL_version(OPENSSL_VERSION)); #endif /* remove date from version */ if ((p= strstr(tls_library_version, " "))) *p= 0; rc= 0; ma_tls_initialized= TRUE; end: pthread_mutex_unlock(&LOCK_openssl_config); return rc; }
O3
c
ma_tls_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0x23ecf(%rip), %r15 # 0x4e130 xorl %ebx, %ebx cmpb $0x0, (%r15) jne 0x2a2f7 leaq 0x2579c(%rip), %rbx # 0x4fa10 movq %rbx, %rdi xorl %esi, %esi callq 0x136b0 movq %rbx, %rdi callq 0x136a0 movl $0x40, %edi xorl %esi, %esi callq 0x133c0 testl %eax, %eax je 0x2a2e6 xorl %ebx, %ebx xorl %edi, %edi callq 0x13840 leaq 0x2579a(%rip), %r14 # 0x4fa40 leaq 0xcfb6(%rip), %r8 # 0x37263 movl $0x3f, %esi movl $0x40, %ecx movq %r14, %rdi movl $0x1, %edx movq %rax, %r9 xorl %eax, %eax callq 0x132c0 leaq 0xf3ca(%rip), %rsi # 0x3969a movq %r14, %rdi callq 0x13100 testq %rax, %rax je 0x2a2e0 movb $0x0, (%rax) movb $0x1, (%r15) jmp 0x2a2eb movl $0x1, %ebx leaq 0x2571e(%rip), %rdi # 0x4fa10 callq 0x13330 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_tls_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea r15, ma_tls_initialized xor ebx, ebx cmp byte ptr [r15], 0 jnz loc_2A2F7 lea rbx, LOCK_openssl_config mov rdi, rbx xor esi, esi call _pthread_mutex_init mov rdi, rbx call _pthread_mutex_lock mov edi, 40h ; '@' xor esi, esi call _OPENSSL_init_ssl test eax, eax jz short loc_2A2E6 xor ebx, ebx xor edi, edi call _OpenSSL_version lea r14, tls_library_version lea r8, aCouldnTSetOpti+23h; "%s" mov esi, 3Fh ; '?' mov ecx, 40h ; '@' mov rdi, r14 mov edx, 1 mov r9, rax xor eax, eax call ___snprintf_chk lea rsi, asc_3969A; " " mov rdi, r14 call _strstr test rax, rax jz short loc_2A2E0 mov byte ptr [rax], 0 loc_2A2E0: mov byte ptr [r15], 1 jmp short loc_2A2EB loc_2A2E6: mov ebx, 1 loc_2A2EB: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock loc_2A2F7: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_tls_start() { unsigned int v0; // ebx const char *v1; // rax _BYTE *v2; // rax v0 = 0; if ( !ma_tls_initialized ) { pthread_mutex_init(&LOCK_openssl_config, 0LL); pthread_mutex_lock(&LOCK_openssl_config); if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) ) { v0 = 0; v1 = (const char *)OpenSSL_version(0LL); __snprintf_chk(&tls_library_version, 63LL, 1LL, 64LL, "%s", v1); v2 = (_BYTE *)strstr(&tls_library_version, " "); if ( v2 ) *v2 = 0; ma_tls_initialized = 1; } else { v0 = 1; } pthread_mutex_unlock(&LOCK_openssl_config); } return v0; }
ma_tls_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA R15,[0x14e130] XOR EBX,EBX CMP byte ptr [R15],0x0 JNZ 0x0012a2f7 LEA RBX,[0x14fa10] MOV RDI,RBX XOR ESI,ESI CALL 0x001136b0 MOV RDI,RBX CALL 0x001136a0 MOV EDI,0x40 XOR ESI,ESI CALL 0x001133c0 TEST EAX,EAX JZ 0x0012a2e6 XOR EBX,EBX XOR EDI,EDI CALL 0x00113840 LEA R14,[0x14fa40] LEA R8,[0x137263] MOV ESI,0x3f MOV ECX,0x40 MOV RDI,R14 MOV EDX,0x1 MOV R9,RAX XOR EAX,EAX CALL 0x001132c0 LEA RSI,[0x13969a] MOV RDI,R14 CALL 0x00113100 TEST RAX,RAX JZ 0x0012a2e0 MOV byte ptr [RAX],0x0 LAB_0012a2e0: MOV byte ptr [R15],0x1 JMP 0x0012a2eb LAB_0012a2e6: MOV EBX,0x1 LAB_0012a2eb: LEA RDI,[0x14fa10] CALL 0x00113330 LAB_0012a2f7: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 ma_tls_start(void) { int iVar1; int8 uVar2; char *pcVar3; int8 uVar4; uVar4 = 0; if (ma_tls_initialized == '\0') { pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0); pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); iVar1 = OPENSSL_init_ssl(0x40,0); if (iVar1 == 0) { uVar4 = 1; } else { uVar4 = 0; uVar2 = OpenSSL_version(0); __snprintf_chk(tls_library_version,0x3f,1,0x40,"%s",uVar2); pcVar3 = strstr(tls_library_version," "); if (pcVar3 != (char *)0x0) { *pcVar3 = '\0'; } ma_tls_initialized = '\x01'; } pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); } return uVar4; }
29,013
stbiw__sbgrowf
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h
static void *stbiw__sbgrowf(void **arr, int increment, int itemsize) { int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1; void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2); STBIW_ASSERT(p); if (p) { if (!*arr) ((int *) p)[1] = 0; *arr = (void *) ((int *) p + 2); stbiw__sbm(*arr) = m; } return *arr; }
O2
c
stbiw__sbgrowf: pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax testq %rax, %rax je 0x16553 movl -0x8(%rax), %ecx leal 0x1(,%rcx,2), %ebp jmp 0x16556 pushq $0x2 popq %rbp leaq -0x8(%rax), %rdi testq %rax, %rax cmoveq %rax, %rdi imull %ebp, %esi movslq %esi, %rsi addq $0x8, %rsi callq 0x31f0 testq %rax, %rax je 0x16592 cmpq $0x0, (%rbx) jne 0x1657f andl $0x0, 0x4(%rax) movq %rax, %rcx addq $0x8, %rcx movq %rcx, (%rbx) movl %ebp, (%rax) addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0x7ef4(%rip), %rdi # 0x1e48d leaq 0xb572(%rip), %rsi # 0x21b12 leaq 0xb68f(%rip), %rcx # 0x21c36 movl $0x33e, %edx # imm = 0x33E callq 0x30a0
stbiw__sbgrowf: push rbp push rbx push rax mov rbx, rdi mov rax, [rdi] test rax, rax jz short loc_16553 mov ecx, [rax-8] lea ebp, ds:1[rcx*2] jmp short loc_16556 loc_16553: push 2 pop rbp loc_16556: lea rdi, [rax-8] test rax, rax cmovz rdi, rax imul esi, ebp movsxd rsi, esi add rsi, 8 call _realloc test rax, rax jz short loc_16592 cmp qword ptr [rbx], 0 jnz short loc_1657F and dword ptr [rax+4], 0 loc_1657F: mov rcx, rax add rcx, 8 mov [rbx], rcx mov [rax], ebp add rsp, 8 pop rbx pop rbp retn loc_16592: lea rdi, aCmap+3; "p" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidStbiwSbgro; "void *stbiw__sbgrowf(void **, int, int)" mov edx, 33Eh call ___assert_fail
int * stbiw__sbgrowf(long long *a1, int a2) { long long v3; // rax int v4; // ebp long long v5; // rdi int *result; // rax v3 = *a1; if ( *a1 ) v4 = 2 * *(_DWORD *)(v3 - 8) + 1; else v4 = 2; v5 = v3 - 8; if ( !v3 ) v5 = 0LL; result = (int *)realloc(v5, v4 * a2 + 8LL); if ( !result ) __assert_fail( "p", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h", 830LL, "void *stbiw__sbgrowf(void **, int, int)"); if ( !*a1 ) result[1] = 0; *a1 = (long long)(result + 2); *result = v4; return result; }
stbiw__sbgrowf: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00116553 MOV ECX,dword ptr [RAX + -0x8] LEA EBP,[0x1 + RCX*0x2] JMP 0x00116556 LAB_00116553: PUSH 0x2 POP RBP LAB_00116556: LEA RDI,[RAX + -0x8] TEST RAX,RAX CMOVZ RDI,RAX IMUL ESI,EBP MOVSXD RSI,ESI ADD RSI,0x8 CALL 0x001031f0 TEST RAX,RAX JZ 0x00116592 CMP qword ptr [RBX],0x0 JNZ 0x0011657f AND dword ptr [RAX + 0x4],0x0 LAB_0011657f: MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBX],RCX MOV dword ptr [RAX],EBP ADD RSP,0x8 POP RBX POP RBP RET LAB_00116592: LEA RDI,[0x11e48d] LEA RSI,[0x121b12] LEA RCX,[0x121c36] MOV EDX,0x33e CALL 0x001030a0
void stbiw__sbgrowf(long *param_1,int param_2) { long lVar1; int *piVar2; int iVar3; void *__ptr; lVar1 = *param_1; if (lVar1 == 0) { iVar3 = 2; } else { iVar3 = *(int *)(lVar1 + -8) * 2 + 1; } __ptr = (void *)(lVar1 + -8); if (lVar1 == 0) { __ptr = (void *)0x0; } piVar2 = (int *)realloc(__ptr,(long)(param_2 * iVar3) + 8); if (piVar2 != (int *)0x0) { if (*param_1 == 0) { piVar2[1] = 0; } *param_1 = (long)(piVar2 + 2); *piVar2 = iVar3; return; } /* WARNING: Subroutine does not return */ __assert_fail("p", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h" ,0x33e,"void *stbiw__sbgrowf(void **, int, int)"); }
29,014
DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SylCore-WoTLK/src/server/database/Database/DatabaseLoader.cpp
DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::string const& name) { bool const updatesEnabledForThis = DBUpdater<T>::IsEnabled(_updateFlags); _open.push([this, name, updatesEnabledForThis, &pool]() -> bool { std::string const dbString = sConfigMgr->GetOption<std::string>(name + "DatabaseInfo", ""); if (dbString.empty()) { LOG_ERROR(_logger, "Database {} not specified in configuration file!", name); return false; } uint8 const asyncThreads = sConfigMgr->GetOption<uint8>(name + "Database.WorkerThreads", 1); if (asyncThreads < 1 || asyncThreads > 32) { LOG_ERROR(_logger, "{} database: invalid number of worker threads specified. " "Please pick a value between 1 and 32.", name); return false; } uint8 const synchThreads = sConfigMgr->GetOption<uint8>(name + "Database.SynchThreads", 1); pool.SetConnectionInfo(dbString, asyncThreads, synchThreads); if (uint32 error = pool.Open()) { // Try reconnect if (error == CR_CONNECTION_ERROR) { uint8 const attempts = sConfigMgr->GetOption<uint8>("Database.Reconnect.Attempts", 20); Seconds reconnectSeconds = Seconds(sConfigMgr->GetOption<uint8>("Database.Reconnect.Seconds", 15)); uint8 reconnectCount = 0; while (reconnectCount < attempts) { LOG_WARN(_logger, "> Retrying after {} seconds", static_cast<uint32>(reconnectSeconds.count())); std::this_thread::sleep_for(reconnectSeconds); error = pool.Open(); if (error == CR_CONNECTION_ERROR) { reconnectCount++; } else { break; } } } // Database does not exist if ((error == ER_BAD_DB_ERROR) && updatesEnabledForThis && _autoSetup) { // Try to create the database and connect again if auto setup is enabled if (DBUpdater<T>::Create(pool) && (!pool.Open())) { error = 0; } } // If the error wasn't handled quit if (error) { LOG_ERROR(_logger, "DatabasePool {} NOT opened. There were errors opening the MySQL connections. " "Check your log file for specific errors", name); return false; } } // Add the close operation _close.push([&pool] { pool.Close(); }); return true; }); // Populate and update only if updates are enabled for this pool if (updatesEnabledForThis) { _populate.push([this, name, &pool]() -> bool { if (!DBUpdater<T>::Populate(pool)) { LOG_ERROR(_logger, "Could not populate the {} database, see log for details.", name); return false; } return true; }); _update.push([this, name, &pool]() -> bool { if (!DBUpdater<T>::Update(pool, _modulesList)) { LOG_ERROR(_logger, "Could not update the {} database, see log for details.", name); return false; } return true; }); } _prepare.push([this, name, &pool]() -> bool { if (!pool.PrepareStatements()) { LOG_ERROR(_logger, "Could not prepare statements of the {} database, see log for details.", name); return false; } return true; }); return *this; }
O3
cpp
DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movl 0x34(%rdi), %edi callq 0x835cc movl %eax, %ebp leaq 0x28(%rsp), %rdi movq %rbx, -0x8(%rdi) leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x3d2c2 movb %bpl, 0x10(%r13) movq %r14, 0x18(%r13) movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x55948 leaq 0x38(%rbx), %rdi movq %rsp, %rsi callq 0x5630c movq 0x10(%rsp), %rax testq %rax, %rax je 0x55714 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5572b movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 testb %bpl, %bpl je 0x55812 leaq 0x28(%rsp), %r12 movq %rbx, -0x8(%r12) movq %r13, (%r12) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x3d2c2 movq %r14, 0x20(%r12) movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x559a6 leaq 0x88(%rbx), %rdi movq %rsp, %rsi callq 0x5630c movq 0x10(%rsp), %rax testq %rax, %rax je 0x5578c movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x557a3 movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 leaq 0x28(%rsp), %r12 movq %rbx, -0x8(%r12) movq %r13, (%r12) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x3d2c2 movq %r14, 0x20(%r12) movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x55a04 leaq 0xd8(%rbx), %rdi movq %rsp, %rsi callq 0x5630c movq 0x10(%rsp), %rax testq %rax, %rax je 0x557fb movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x55812 movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 leaq 0x28(%rsp), %r12 movq %rbx, -0x8(%r12) movq %r13, (%r12) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x3d2c2 movq %r14, 0x20(%r12) movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x55a62 leaq 0x128(%rbx), %rdi movq %rsp, %rsi callq 0x5630c movq 0x10(%rsp), %rax testq %rax, %rax je 0x5586a movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x55881 movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5591d jmp 0x5591d movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x55928 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x55928 jmp 0x5591d jmp 0x55925 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x55928 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x55928 jmp 0x5591d jmp 0x55925 jmp 0x5591d jmp 0x5591d movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x55928 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x55928 jmp 0x5591d jmp 0x55925 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x55928 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x55928 movq %rax, %rdi callq 0x2841d movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5593f movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0 nop
_ZN14DatabaseLoader11AddDatabaseI27CharacterDatabaseConnectionEERS_R18DatabaseWorkerPoolIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rdx mov r14, rsi mov rbx, rdi mov edi, [rdi+34h] call _ZN9DBUpdaterI27CharacterDatabaseConnectionE9IsEnabledEj; DBUpdater<CharacterDatabaseConnection>::IsEnabled(uint) mov ebp, eax lea rdi, [rsp+88h+var_60] mov [rdi-8], rbx lea r13, [rsp+88h+var_50] mov [r13-10h], r13 mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [r13+10h], bpl mov [r13+18h], r14 mov rdi, rsp lea rsi, [rsp+88h+var_68] call _ZNSt8functionIFbvEEC2IZN14DatabaseLoader11AddDatabaseI27CharacterDatabaseConnectionEERS3_R18DatabaseWorkerPoolIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE_vEEOS8_; std::function<bool ()(void)>::function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#1},void>(CharacterDatabaseConnection&&) lea rdi, [rbx+38h] mov rsi, rsp call _ZNSt5dequeISt8functionIFbvEESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(std::function<bool ()(void)> &&) mov rax, [rsp+88h+var_78] test rax, rax jz short loc_55714 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_55714: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r13 jz short loc_5572B mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_5572B: test bpl, bpl jz loc_55812 lea r12, [rsp+88h+var_60] mov [r12-8], rbx mov [r12], r13 mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [r12+20h], r14 mov rdi, rsp lea rsi, [rsp+88h+var_68] call _ZNSt8functionIFbvEEC2IZN14DatabaseLoader11AddDatabaseI27CharacterDatabaseConnectionEERS3_R18DatabaseWorkerPoolIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE0_vEEOS8_; std::function<bool ()(void)>::function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#2},void>(CharacterDatabaseConnection&&) lea rdi, [rbx+88h] mov rsi, rsp call _ZNSt5dequeISt8functionIFbvEESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(std::function<bool ()(void)> &&) mov rax, [rsp+88h+var_78] test rax, rax jz short loc_5578C mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_5578C: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r13 jz short loc_557A3 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_557A3: lea r12, [rsp+88h+var_60] mov [r12-8], rbx mov [r12], r13 mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [r12+20h], r14 mov rdi, rsp lea rsi, [rsp+88h+var_68] call _ZNSt8functionIFbvEEC2IZN14DatabaseLoader11AddDatabaseI27CharacterDatabaseConnectionEERS3_R18DatabaseWorkerPoolIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE1_vEEOS8_; std::function<bool ()(void)>::function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#3},void>(CharacterDatabaseConnection&&) lea rdi, [rbx+0D8h] mov rsi, rsp call _ZNSt5dequeISt8functionIFbvEESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(std::function<bool ()(void)> &&) mov rax, [rsp+88h+var_78] test rax, rax jz short loc_557FB mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_557FB: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r13 jz short loc_55812 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_55812: lea r12, [rsp+88h+var_60] mov [r12-8], rbx mov [r12], r13 mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [r12+20h], r14 mov rdi, rsp lea rsi, [rsp+88h+var_68] call _ZNSt8functionIFbvEEC2IZN14DatabaseLoader11AddDatabaseI27CharacterDatabaseConnectionEERS3_R18DatabaseWorkerPoolIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE2_vEEOS8_; std::function<bool ()(void)>::function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#4},void>(CharacterDatabaseConnection&&) lea rdi, [rbx+128h] mov rsi, rsp call _ZNSt5dequeISt8functionIFbvEESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(std::function<bool ()(void)> &&) mov rax, [rsp+88h+var_78] test rax, rax jz short loc_5586A mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_5586A: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r13 jz short loc_55881 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_55881: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_5591D jmp loc_5591D mov rbx, rax mov rax, [rsp+88h+var_78] test rax, rax jz short loc_55928 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_55928 jmp short loc_5591D jmp short loc_55925 mov rbx, rax mov rax, [rsp+88h+var_78] test rax, rax jz short loc_55928 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_55928 jmp short loc_5591D jmp short loc_55925 jmp short loc_5591D jmp short loc_5591D mov rbx, rax mov rax, [rsp+88h+var_78] test rax, rax jz short loc_55928 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_55928 jmp short loc_5591D jmp short loc_55925 mov rbx, rax mov rax, [rsp+88h+var_78] test rax, rax jz short loc_55928 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_55928 loc_5591D: mov rdi, rax call __clang_call_terminate loc_55925: mov rbx, rax loc_55928: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r13 jz short loc_5593F mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_5593F: mov rdi, rbx call __Unwind_Resume
long long DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(long long a1, long long a2, _BYTE **a3) { char IsEnabled; // bp _BYTE v6[16]; // [rsp+0h] [rbp-88h] BYREF void ( *v7)(_BYTE *, _BYTE *, long long); // [rsp+10h] [rbp-78h] long long v8; // [rsp+20h] [rbp-68h] BYREF void *v9[2]; // [rsp+28h] [rbp-60h] BYREF _QWORD v10[2]; // [rsp+38h] [rbp-50h] BYREF long long v11; // [rsp+48h] [rbp-40h] long long v12; // [rsp+50h] [rbp-38h] IsEnabled = DBUpdater<CharacterDatabaseConnection>::IsEnabled(*(unsigned int *)(a1 + 52)); v8 = a1; v9[0] = v10; std::string::_M_construct<char *>(v9, *a3, (long long)&a3[1][(_QWORD)*a3]); LOBYTE(v11) = IsEnabled; v12 = a2; std::function<bool ()(void)>::function<DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#1},void>( v6, &v8); std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(a1 + 56, v6); if ( v7 ) v7(v6, v6, 3LL); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); if ( IsEnabled ) { v8 = a1; v9[0] = v10; std::string::_M_construct<char *>(v9, *a3, (long long)&a3[1][(_QWORD)*a3]); v11 = a2; std::function<bool ()(void)>::function<DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#2},void>( v6, &v8); std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(a1 + 136, v6); if ( v7 ) v7(v6, v6, 3LL); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); v8 = a1; v9[0] = v10; std::string::_M_construct<char *>(v9, *a3, (long long)&a3[1][(_QWORD)*a3]); v11 = a2; std::function<bool ()(void)>::function<DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#3},void>( v6, &v8); std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(a1 + 216, v6); if ( v7 ) v7(v6, v6, 3LL); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); } v8 = a1; v9[0] = v10; std::string::_M_construct<char *>(v9, *a3, (long long)&a3[1][(_QWORD)*a3]); v11 = a2; std::function<bool ()(void)>::function<DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection> &,std::string const&)::{lambda(void)#4},void>( v6, &v8); std::deque<std::function<bool ()(void)>>::emplace_back<std::function<bool ()(void)>>(a1 + 296, v6); if ( v7 ) v7(v6, v6, 3LL); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return a1; }
AddDatabase<CharacterDatabaseConnection>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV EDI,dword ptr [RDI + 0x34] CALL 0x001835cc MOV EBP,EAX LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + -0x8],RBX LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI CALL 0x0013d2c2 MOV byte ptr [R13 + 0x10],BPL MOV qword ptr [R13 + 0x18],R14 LAB_001556e4: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x00155948 LEA RDI,[RBX + 0x38] LAB_001556f5: MOV RSI,RSP CALL 0x0015630c MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x00155714 LAB_00155707: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00155714: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0015572b MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001d32e8 LAB_0015572b: TEST BPL,BPL JZ 0x00155812 LEA R12,[RSP + 0x28] MOV qword ptr [R12 + -0x8],RBX MOV qword ptr [R12],R13 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI MOV RDI,R12 CALL 0x0013d2c2 MOV qword ptr [R12 + 0x20],R14 LAB_00155759: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x001559a6 LEA RDI,[RBX + 0x88] LAB_0015576d: MOV RSI,RSP CALL 0x0015630c MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015578c LAB_0015577f: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015578c: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001557a3 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001d32e8 LAB_001557a3: LEA R12,[RSP + 0x28] MOV qword ptr [R12 + -0x8],RBX MOV qword ptr [R12],R13 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI MOV RDI,R12 CALL 0x0013d2c2 MOV qword ptr [R12 + 0x20],R14 LAB_001557c8: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x00155a04 LEA RDI,[RBX + 0xd8] LAB_001557dc: MOV RSI,RSP CALL 0x0015630c MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001557fb LAB_001557ee: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001557fb: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00155812 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001d32e8 LAB_00155812: LEA R12,[RSP + 0x28] MOV qword ptr [R12 + -0x8],RBX MOV qword ptr [R12],R13 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI MOV RDI,R12 CALL 0x0013d2c2 MOV qword ptr [R12 + 0x20],R14 LAB_00155837: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x00155a62 LEA RDI,[RBX + 0x128] LAB_0015584b: MOV RSI,RSP CALL 0x0015630c MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015586a LAB_0015585d: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015586a: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00155881 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001d32e8 LAB_00155881: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::__cxx11::string const&) */ DatabaseLoader * __thiscall DatabaseLoader::AddDatabase<CharacterDatabaseConnection> (DatabaseLoader *this,DatabaseWorkerPool *param_1,string *param_2) { char cVar1; _lambda___1_ a_Stack_88 [16]; code *local_78; DatabaseLoader *local_68; long *local_60 [2]; long local_50 [2]; DatabaseWorkerPool *local_40; DatabaseWorkerPool *local_38; cVar1 = DBUpdater<CharacterDatabaseConnection>::IsEnabled(*(uint *)(this + 0x34)); local_68 = this; local_60[0] = local_50; std::__cxx11::string::_M_construct<char*> (local_60,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); local_40 = (DatabaseWorkerPool *)CONCAT71(local_40._1_7_,cVar1); local_38 = param_1; /* try { // try from 001556e4 to 001556f0 has its CatchHandler @ 00155925 */ std::function<bool()>:: function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&,std::__cxx11::string_const&)::_lambda()_1_,void> (a_Stack_88); /* try { // try from 001556f5 to 001556fc has its CatchHandler @ 00155901 */ std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>:: emplace_back<std::function<bool()>> ((deque<std::function<bool()>,std::allocator<std::function<bool()>>> *)(this + 0x38), (function *)a_Stack_88); if (local_78 != (code *)0x0) { /* try { // try from 00155707 to 00155713 has its CatchHandler @ 001558df */ (*local_78)(a_Stack_88,a_Stack_88,3); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (cVar1 != '\0') { local_68 = this; local_60[0] = local_50; std::__cxx11::string::_M_construct<char*> (local_60,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); local_40 = param_1; /* try { // try from 00155759 to 00155765 has its CatchHandler @ 001558db */ std::function<bool()>:: function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&,std::__cxx11::string_const&)::_lambda()_2_,void> ((_lambda___2_ *)a_Stack_88); /* try { // try from 0015576d to 00155774 has its CatchHandler @ 001558bd */ std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>:: emplace_back<std::function<bool()>> ((deque<std::function<bool()>,std::allocator<std::function<bool()>>> *)(this + 0x88), (function *)a_Stack_88); if (local_78 != (code *)0x0) { /* try { // try from 0015577f to 0015578b has its CatchHandler @ 00155898 */ (*local_78)(a_Stack_88,a_Stack_88,3); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } local_68 = this; local_60[0] = local_50; std::__cxx11::string::_M_construct<char*> (local_60,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); local_40 = param_1; /* try { // try from 001557c8 to 001557d4 has its CatchHandler @ 001558bb */ std::function<bool()>:: function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&,std::__cxx11::string_const&)::_lambda()_3_,void> ((_lambda___3_ *)a_Stack_88); /* try { // try from 001557dc to 001557e3 has its CatchHandler @ 0015589d */ std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>:: emplace_back<std::function<bool()>> ((deque<std::function<bool()>,std::allocator<std::function<bool()>>> *)(this + 0xd8), (function *)a_Stack_88); if (local_78 != (code *)0x0) { /* try { // try from 001557ee to 001557fa has its CatchHandler @ 00155893 */ (*local_78)(a_Stack_88,a_Stack_88,3); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } } local_68 = this; local_60[0] = local_50; std::__cxx11::string::_M_construct<char*> (local_60,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); local_40 = param_1; /* try { // try from 00155837 to 00155843 has its CatchHandler @ 001558ff */ std::function<bool()>:: function<DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&,std::__cxx11::string_const&)::_lambda()_4_,void> ((_lambda___4_ *)a_Stack_88); /* try { // try from 0015584b to 00155852 has its CatchHandler @ 001558e1 */ std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>:: emplace_back<std::function<bool()>> ((deque<std::function<bool()>,std::allocator<std::function<bool()>>> *)(this + 0x128), (function *)a_Stack_88); if (local_78 != (code *)0x0) { /* try { // try from 0015585d to 00155869 has its CatchHandler @ 001558dd */ (*local_78)(a_Stack_88,a_Stack_88,3); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } return this; }
29,015
ast_create_program
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_program(Arena* arena, AstNode** exprs, size_t expr_count, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_PROGRAM, line, column); if (!node) { return NULL; } node->as.program.exprs = exprs; node->as.program.expr_count = expr_count; return node; }
O3
c
ast_create_program: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x1e, %esi movq %rcx, %rdx movq %r8, %rcx callq 0xa65c testq %rax, %rax je 0xac76 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_program: push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov esi, 1Eh mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_AC76 mov [rax+48h], r14 mov [rax+50h], rbx loc_AC76: add rsp, 8 pop rbx pop r14 retn
long long ast_create_program(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax result = ast_create_node(a1, 30, a4, a5); if ( result ) { *(_QWORD *)(result + 72) = a2; *(_QWORD *)(result + 80) = a3; } return result; }
ast_create_program: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV ESI,0x1e MOV RDX,RCX MOV RCX,R8 CALL 0x0010a65c TEST RAX,RAX JZ 0x0010ac76 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX LAB_0010ac76: ADD RSP,0x8 POP RBX POP R14 RET
void ast_create_program(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0x1e,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; } return; }
29,016
translog_purge
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge(TRANSLOG_ADDRESS low) { uint32 last_need_file= LSN_FILE_NO(low); uint32 min_unsync; int soft; TRANSLOG_ADDRESS horizon= translog_get_horizon(); int rc= 0; DBUG_ENTER("translog_purge"); DBUG_PRINT("enter", ("low: " LSN_FMT, LSN_IN_PARTS(low))); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); soft= soft_sync; min_unsync= soft_sync_min; DBUG_PRINT("info", ("min_unsync: %lu", (ulong) min_unsync)); if (soft && min_unsync < last_need_file) { last_need_file= min_unsync; DBUG_PRINT("info", ("last_need_file set to %lu", (ulong)last_need_file)); } mysql_mutex_lock(&log_descriptor.purger_lock); DBUG_PRINT("info", ("last_lsn_checked file: %lu:", (ulong) log_descriptor.last_lsn_checked)); if (LSN_FILE_NO(log_descriptor.last_lsn_checked) < last_need_file) { uint32 i; uint32 min_file= translog_first_file(horizon, 1); DBUG_ASSERT(min_file != 0); /* log is already started */ DBUG_PRINT("info", ("min_file: %lu:",(ulong) min_file)); for(i= min_file; i < last_need_file && rc == 0; i++) { LSN lsn= translog_get_file_max_lsn_stored(i); if (lsn == LSN_IMPOSSIBLE) break; /* files are still in writing */ if (lsn == LSN_ERROR) { rc= 1; break; } if (cmp_translog_addr(lsn, low) >= 0) break; DBUG_PRINT("info", ("purge file %lu", (ulong) i)); /* remove file descriptor from the cache */ /* log_descriptor.min_file can be changed only here during execution and the function is serialized, so we can access it without problems */ if (i >= log_descriptor.min_file) { TRANSLOG_FILE *file; mysql_rwlock_wrlock(&log_descriptor.open_files_lock); DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(log_descriptor.min_file == i); file= *((TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files)); DBUG_PRINT("info", ("Files : %d", log_descriptor.open_files.elements)); DBUG_ASSERT(i == file->number); log_descriptor.min_file++; DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); mysql_rwlock_unlock(&log_descriptor.open_files_lock); translog_close_log_file(file); } if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled) { char path[FN_REFLEN], *file_name; file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } } if (unlikely(rc == 1)) log_descriptor.min_need_file= 0; /* impossible value */ else log_descriptor.min_need_file= i; } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O3
c
translog_purge: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rdi, %r15 shrq $0x20, %r15 callq 0x4be60 movq %rax, %r14 movl 0xbb1c16(%rip), %r12d # 0xbff6ec cmpl %r15d, %r12d cmovael %r15d, %r12d cmpb $0x0, 0xbb1c04(%rip) # 0xbff6e8 cmovel %r15d, %r12d cmpq $0x0, 0xbb1b90(%rip) # 0xbff680 jne 0x4dcd1 leaq 0xbb1b43(%rip), %rdi # 0xbff640 callq 0x29220 cmpl 0xbb1b83(%rip), %r12d # 0xbff68c jbe 0x4dc75 movq %r14, %rdi movl $0x1, %esi callq 0x4a2e8 movl %eax, %r14d cmpl %r12d, %eax jae 0x4dc79 leaq -0x230(%rbp), %r15 movl %r14d, %edi callq 0x48bb0 testq %rax, %rax je 0x4dc79 cmpq $0x1, %rax je 0x4dcbd cmpq %rbx, %rax jge 0x4dc79 cmpl 0x3b0eba(%rip), %r14d # 0x3fea14 jb 0x4dbaf cmpq $0x0, 0x3b0f44(%rip) # 0x3feaa8 jne 0x4dc35 leaq 0x3b0ea7(%rip), %rdi # 0x3fea18 callq 0xa4329 leaq 0x3b0e6b(%rip), %rdi # 0x3fe9e8 callq 0x91b9f movq (%rax), %r13 incl 0x3b0e89(%rip) # 0x3fea14 movq 0x3b0f16(%rip), %rdi # 0x3feaa8 testq %rdi, %rdi jne 0x4dc3f leaq 0x3b0e76(%rip), %rdi # 0x3fea18 callq 0xa43ca movq %r13, %rdi callq 0x4bbec cmpq $0x0, 0x3af9e1(%rip) # 0x3fd598 movb $0x1, %al jne 0x4dc1c cmpl $0x0, 0x3af9ce(%rip) # 0x3fd590 jne 0x4dc1c movl %r14d, %edi movq %r15, %rsi callq 0x489c9 leaq 0x3af53e(%rip), %rax # 0x3fd114 movl (%rax), %esi leaq 0x338431(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x288(%rbp), %rdi movl $0xe, %edx movq %r15, %rcx leaq -0x240(%rbp), %r8 callq *0x148(%rax) movq %rax, -0x240(%rbp) testq %rax, %rax jne 0x4dc54 movl $0x10, %esi movq %r15, %rdi callq 0x9de44 testl %eax, %eax sete %al incl %r14d cmpl %r12d, %r14d jae 0x4dcc4 testb %al, %al jne 0x4db2f jmp 0x4dcc4 callq 0x2cbe4 jmp 0x4db76 leaq 0x3383ca(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x4db9b movq %rax, %rdi movq %r15, %rsi leaq -0x240(%rbp), %rdx leaq -0x234(%rbp), %rcx callq 0x2cc02 movl -0x234(%rbp), %eax jmp 0x4dc17 xorl %ebx, %ebx jmp 0x4dc82 xorl %ebx, %ebx movl %r14d, 0xbb19b6(%rip) # 0xbff638 movq 0xbb19f7(%rip), %rdi # 0xbff680 testq %rdi, %rdi jne 0x4dcdb leaq 0xbb19ab(%rip), %rdi # 0xbff640 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4dced movl %ebx, %eax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d movb $0x1, %bl jmp 0x4dc7b xorl %ebx, %ebx testb %al, %al jne 0x4dc7b movb $0x1, %bl xorl %r14d, %r14d jmp 0x4dc7b callq 0x2cbc7 jmp 0x4db02 leaq 0x33832e(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4dc8e callq 0x29270
translog_purge: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, rdi shr r15, 20h call translog_get_horizon mov r14, rax mov r12d, cs:soft_sync_min cmp r12d, r15d cmovnb r12d, r15d cmp cs:soft_sync, 0 cmovz r12d, r15d cmp cs:qword_BFF680, 0 jnz loc_4DCD1 lea rdi, unk_BFF640 call _pthread_mutex_lock loc_4DB02: cmp r12d, dword ptr cs:qword_BFF688+4 jbe loc_4DC75 mov rdi, r14 mov esi, 1 call translog_first_file mov r14d, eax cmp eax, r12d jnb loc_4DC79 lea r15, [rbp+var_230] loc_4DB2F: mov edi, r14d call translog_get_file_max_lsn_stored test rax, rax jz loc_4DC79 cmp rax, 1 jz loc_4DCBD cmp rax, rbx jge loc_4DC79 cmp r14d, dword ptr cs:qword_3FEA10+4 jb short loc_4DBAF cmp cs:qword_3FEAA8, 0 jnz loc_4DC35 lea rdi, unk_3FEA18 call my_rw_wrlock loc_4DB76: lea rdi, qword_3FE9E8 call pop_dynamic mov r13, [rax] inc dword ptr cs:qword_3FEA10+4 mov rdi, cs:qword_3FEAA8 test rdi, rdi jnz loc_4DC3F loc_4DB9B: lea rdi, unk_3FEA18 call my_rw_unlock mov rdi, r13 call translog_close_log_file loc_4DBAF: cmp cs:log_purge_type, 0 mov al, 1 jnz short loc_4DC1C cmp cs:log_purge_disabled, 0 jnz short loc_4DC1C mov edi, r14d mov rsi, r15 call translog_filename_by_fileno lea rax, key_file_translog mov esi, [rax] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_288] mov edx, 0Eh mov rcx, r15 lea r8, [rbp+var_240] call qword ptr [rax+148h] mov [rbp+var_240], rax test rax, rax jnz short loc_4DC54 mov esi, 10h mov rdi, r15 call my_delete loc_4DC17: test eax, eax setz al loc_4DC1C: inc r14d cmp r14d, r12d jnb loc_4DCC4 test al, al jnz loc_4DB2F jmp loc_4DCC4 loc_4DC35: call translog_purge_cold_2 jmp loc_4DB76 loc_4DC3F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_4DB9B loc_4DC54: mov rdi, rax mov rsi, r15 lea rdx, [rbp+var_240] lea rcx, [rbp+var_234] call translog_purge_cold_3 mov eax, [rbp+var_234] jmp short loc_4DC17 loc_4DC75: xor ebx, ebx jmp short loc_4DC82 loc_4DC79: xor ebx, ebx loc_4DC7B: mov dword ptr cs:qword_BFF638, r14d loc_4DC82: mov rdi, cs:qword_BFF680 test rdi, rdi jnz short loc_4DCDB loc_4DC8E: lea rdi, unk_BFF640 call _pthread_mutex_unlock mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4DCED mov eax, ebx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DCBD: xor r14d, r14d mov bl, 1 jmp short loc_4DC7B loc_4DCC4: xor ebx, ebx test al, al jnz short loc_4DC7B mov bl, 1 xor r14d, r14d jmp short loc_4DC7B loc_4DCD1: call translog_purge_cold_1 jmp loc_4DB02 loc_4DCDB: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4DC8E loc_4DCED: call ___stack_chk_fail
long long translog_purge(signed long long a1) { unsigned int v1; // ebx unsigned long long horizon; // r14 unsigned int v3; // r12d unsigned int file; // r14d signed long long file_max_lsn_stored; // rax long long v6; // rdx long long v7; // rcx int v8; // r8d int v9; // r9d long long v10; // r13 bool v11; // al long long v12; // rax unsigned int v13; // eax _BYTE v15[72]; // [rsp+8h] [rbp-288h] BYREF long long v16; // [rsp+50h] [rbp-240h] BYREF unsigned int v17; // [rsp+5Ch] [rbp-234h] BYREF _BYTE v18[512]; // [rsp+60h] [rbp-230h] BYREF unsigned long long v19; // [rsp+260h] [rbp-30h] v1 = a1; v19 = __readfsqword(0x28u); horizon = translog_get_horizon(); v3 = soft_sync_min; if ( (unsigned int)soft_sync_min >= HIDWORD(a1) ) v3 = HIDWORD(a1); if ( !soft_sync ) v3 = HIDWORD(a1); if ( qword_BFF680 ) translog_purge_cold_1(); else pthread_mutex_lock(&unk_BFF640); if ( v3 <= HIDWORD(qword_BFF688) ) { v1 = 0; } else { file = translog_first_file(horizon, 1); if ( file < v3 ) { while ( 1 ) { file_max_lsn_stored = translog_get_file_max_lsn_stored(file); if ( !file_max_lsn_stored ) break; if ( file_max_lsn_stored == 1 ) { file = 0; LOBYTE(v1) = 1; goto LABEL_30; } if ( file_max_lsn_stored >= a1 ) break; if ( file >= HIDWORD(qword_3FEA10) ) { if ( qword_3FEAA8 ) translog_purge_cold_2(); else my_rw_wrlock(&unk_3FEA18); v10 = *(_QWORD *)pop_dynamic(&qword_3FE9E8); ++HIDWORD(qword_3FEA10); if ( qword_3FEAA8 ) PSI_server[45](); my_rw_unlock(&unk_3FEA18); translog_close_log_file(v10); } v11 = 1; if ( !log_purge_type && !log_purge_disabled ) { translog_filename_by_fileno(file, (long long)v18, v6, v7, v8, v9); v12 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])( v15, key_file_translog, 14LL, v18, &v16); v16 = v12; if ( v12 ) { translog_purge_cold_3(v12, (long long)v18, &v16, &v17); v13 = v17; } else { v13 = my_delete(v18, 16LL); } v11 = v13 == 0; } if ( ++file >= v3 || !v11 ) { v1 = 0; if ( !v11 ) { LOBYTE(v1) = 1; file = 0; } goto LABEL_30; } } } v1 = 0; LABEL_30: LODWORD(qword_BFF638) = file; } if ( qword_BFF680 ) PSI_server[44](); pthread_mutex_unlock(&unk_BFF640); return v1; }
translog_purge: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,RDI SHR R15,0x20 CALL 0x0014be60 MOV R14,RAX MOV R12D,dword ptr [0x00cff6ec] CMP R12D,R15D CMOVNC R12D,R15D CMP byte ptr [0x00cff6e8],0x0 CMOVZ R12D,R15D CMP qword ptr [0x00cff680],0x0 JNZ 0x0014dcd1 LEA RDI,[0xcff640] CALL 0x00129220 LAB_0014db02: CMP R12D,dword ptr [0x00cff68c] JBE 0x0014dc75 MOV RDI,R14 MOV ESI,0x1 CALL 0x0014a2e8 MOV R14D,EAX CMP EAX,R12D JNC 0x0014dc79 LEA R15,[RBP + -0x230] LAB_0014db2f: MOV EDI,R14D CALL 0x00148bb0 TEST RAX,RAX JZ 0x0014dc79 CMP RAX,0x1 JZ 0x0014dcbd CMP RAX,RBX JGE 0x0014dc79 CMP R14D,dword ptr [0x004fea14] JC 0x0014dbaf CMP qword ptr [0x004feaa8],0x0 JNZ 0x0014dc35 LEA RDI,[0x4fea18] CALL 0x001a4329 LAB_0014db76: LEA RDI,[0x4fe9e8] CALL 0x00191b9f MOV R13,qword ptr [RAX] INC dword ptr [0x004fea14] MOV RDI,qword ptr [0x004feaa8] TEST RDI,RDI JNZ 0x0014dc3f LAB_0014db9b: LEA RDI,[0x4fea18] CALL 0x001a43ca MOV RDI,R13 CALL 0x0014bbec LAB_0014dbaf: CMP qword ptr [0x004fd598],0x0 MOV AL,0x1 JNZ 0x0014dc1c CMP dword ptr [0x004fd590],0x0 JNZ 0x0014dc1c MOV EDI,R14D MOV RSI,R15 CALL 0x001489c9 LEA RAX,[0x4fd114] MOV ESI,dword ptr [RAX] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x288] MOV EDX,0xe MOV RCX,R15 LEA R8,[RBP + -0x240] CALL qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x240],RAX TEST RAX,RAX JNZ 0x0014dc54 MOV ESI,0x10 MOV RDI,R15 CALL 0x0019de44 LAB_0014dc17: TEST EAX,EAX SETZ AL LAB_0014dc1c: INC R14D CMP R14D,R12D JNC 0x0014dcc4 TEST AL,AL JNZ 0x0014db2f JMP 0x0014dcc4 LAB_0014dc35: CALL 0x0012cbe4 JMP 0x0014db76 LAB_0014dc3f: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0014db9b LAB_0014dc54: MOV RDI,RAX MOV RSI,R15 LEA RDX,[RBP + -0x240] LEA RCX,[RBP + -0x234] CALL 0x0012cc02 MOV EAX,dword ptr [RBP + -0x234] JMP 0x0014dc17 LAB_0014dc75: XOR EBX,EBX JMP 0x0014dc82 LAB_0014dc79: XOR EBX,EBX LAB_0014dc7b: MOV dword ptr [0x00cff638],R14D LAB_0014dc82: MOV RDI,qword ptr [0x00cff680] TEST RDI,RDI JNZ 0x0014dcdb LAB_0014dc8e: LEA RDI,[0xcff640] CALL 0x001291e0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014dced MOV EAX,EBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014dcbd: XOR R14D,R14D MOV BL,0x1 JMP 0x0014dc7b LAB_0014dcc4: XOR EBX,EBX TEST AL,AL JNZ 0x0014dc7b MOV BL,0x1 XOR R14D,R14D JMP 0x0014dc7b LAB_0014dcd1: CALL 0x0012cbc7 JMP 0x0014db02 LAB_0014dcdb: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014dc8e LAB_0014dced: CALL 0x00129270
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong translog_purge(long param_1) { uint uVar1; int iVar2; int8 uVar3; long lVar4; int8 *puVar5; ulong uVar6; uint uVar7; long in_FS_OFFSET; bool bVar8; int1 local_290 [72]; long local_248; int local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = translog_get_horizon(); uVar1 = (uint)((ulong)param_1 >> 0x20); uVar7 = soft_sync_min; if (uVar1 <= soft_sync_min) { uVar7 = uVar1; } if (soft_sync == '\0') { uVar7 = uVar1; } if (DAT_00cff680 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff640); } else { translog_purge_cold_1(); } if (_DAT_00cff68c < uVar7) { uVar1 = translog_first_file(uVar3,1); if (uVar1 < uVar7) { do { lVar4 = translog_get_file_max_lsn_stored(uVar1); if (lVar4 == 0) goto LAB_0014dc79; if (lVar4 == 1) { DAT_00cff638 = 0; uVar6 = CONCAT71((int7)((ulong)param_1 >> 8),1); goto LAB_0014dc82; } if (param_1 <= lVar4) goto LAB_0014dc79; if (DAT_004fea14 <= uVar1) { if (DAT_004feaa8 == 0) { my_rw_wrlock(&DAT_004fea18); } else { translog_purge_cold_2(); } puVar5 = (int8 *)pop_dynamic(&DAT_004fe9e8); uVar3 = *puVar5; DAT_004fea14 = DAT_004fea14 + 1; if (DAT_004feaa8 != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(&DAT_004fea18); translog_close_log_file(uVar3); } bVar8 = true; if ((log_purge_type == 0) && (log_purge_disabled == 0)) { translog_filename_by_fileno(uVar1,local_238); local_248 = (**(code **)(PSI_server + 0x148)) (local_290,key_file_translog,0xe,local_238,&local_248); if (local_248 == 0) { iVar2 = my_delete(local_238,0x10); } else { translog_purge_cold_3(local_248,local_238,&local_248,&local_23c); iVar2 = local_23c; } bVar8 = iVar2 == 0; } uVar1 = uVar1 + 1; } while ((uVar1 < uVar7) && (bVar8)); uVar6 = 0; DAT_00cff638 = uVar1; if (!bVar8) { uVar6 = 1; DAT_00cff638 = 0; } } else { LAB_0014dc79: uVar6 = 0; DAT_00cff638 = uVar1; } } else { uVar6 = 0; } LAB_0014dc82: if (DAT_00cff680 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff640); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar6 & 0xffffffff; }
29,017
dynstr_append_mem
eloqsql/mysys/string.c
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, size_t length) { char *new_ptr; DBUG_ENTER("dynstr_append_mem"); if (str->length+length >= str->max_length) { size_t new_length=(str->length+length+str->alloc_increment)/ str->alloc_increment; new_length*=str->alloc_increment; if (!(new_ptr=(char*) my_realloc(key_memory_DYNAMIC_STRING, str->str, new_length, MYF(MY_WME)))) DBUG_RETURN(TRUE); str->str=new_ptr; str->max_length=new_length; } memcpy(str->str + str->length,append,length); str->length+=length; str->str[str->length]=0; /* Safety for C programs */ DBUG_RETURN(FALSE); }
O3
c
dynstr_append_mem: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rsi movq 0x8(%rdi), %rdi leaq (%rdi,%rdx), %r12 cmpq 0x10(%r14), %r12 jb 0x6cbe3 movq 0x18(%r14), %rcx addq %rcx, %r12 movq %r12, %rax xorl %edx, %edx divq %rcx subq %rdx, %r12 leaq 0x3638df(%rip), %rax # 0x3d04a0 movl (%rax), %edi movl $0x10, %ecx movq %r12, %rdx callq 0x6b14c testq %rax, %rax je 0x6cc0b movq %rax, %rsi movq %rax, (%r14) movq %r12, 0x10(%r14) movq 0x8(%r14), %rdi addq %rsi, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x370a0 addq 0x8(%r14), %rbx movq %rbx, 0x8(%r14) movq (%r14), %rax movb $0x0, (%rax,%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, %al jmp 0x6cc02
dynstr_append_mem: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi mov rsi, [rdi] mov rdi, [rdi+8] lea r12, [rdi+rdx] cmp r12, [r14+10h] jb short loc_6CBE3 mov rcx, [r14+18h] add r12, rcx mov rax, r12 xor edx, edx div rcx sub r12, rdx lea rax, key_memory_DYNAMIC_STRING mov edi, [rax] mov ecx, 10h mov rdx, r12 call my_realloc test rax, rax jz short loc_6CC0B mov rsi, rax mov [r14], rax mov [r14+10h], r12 mov rdi, [r14+8] loc_6CBE3: add rdi, rsi mov rsi, r15 mov rdx, rbx call _memcpy add rbx, [r14+8] mov [r14+8], rbx mov rax, [r14] mov byte ptr [rax+rbx], 0 xor eax, eax loc_6CC02: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6CC0B: mov al, 1 jmp short loc_6CC02
long long dynstr_append_mem(long long *a1, long long a2, long long a3) { long long v6; // rsi long long v7; // rdi unsigned long long v8; // r12 long long v9; // rax long long v10; // rbx v6 = *a1; v7 = a1[1]; if ( v7 + a3 < (unsigned long long)a1[2] ) goto LABEL_4; v8 = a1[3] + v7 + a3 - (a1[3] + v7 + a3) % (unsigned long long)a1[3]; my_realloc(key_memory_DYNAMIC_STRING, v6, v8, 16); if ( v9 ) { v6 = v9; *a1 = v9; a1[2] = v8; v7 = a1[1]; LABEL_4: memcpy(v6 + v7, a2, a3); v10 = a1[1] + a3; a1[1] = v10; *(_BYTE *)(*a1 + v10) = 0; return 0LL; } return 1LL; }
dynstr_append_mem: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RSI,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] LEA R12,[RDI + RDX*0x1] CMP R12,qword ptr [R14 + 0x10] JC 0x0016cbe3 MOV RCX,qword ptr [R14 + 0x18] ADD R12,RCX MOV RAX,R12 XOR EDX,EDX DIV RCX SUB R12,RDX LEA RAX,[0x4d04a0] MOV EDI,dword ptr [RAX] MOV ECX,0x10 MOV RDX,R12 CALL 0x0016b14c TEST RAX,RAX JZ 0x0016cc0b MOV RSI,RAX MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x10],R12 MOV RDI,qword ptr [R14 + 0x8] LAB_0016cbe3: ADD RDI,RSI MOV RSI,R15 MOV RDX,RBX CALL 0x001370a0 ADD RBX,qword ptr [R14 + 0x8] MOV qword ptr [R14 + 0x8],RBX MOV RAX,qword ptr [R14] MOV byte ptr [RAX + RBX*0x1],0x0 XOR EAX,EAX LAB_0016cc02: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016cc0b: MOV AL,0x1 JMP 0x0016cc02
int8 dynstr_append_mem(long *param_1,void *param_2,size_t param_3) { long lVar1; ulong uVar2; long lVar3; lVar1 = *param_1; lVar3 = param_1[1]; if ((ulong)param_1[2] <= lVar3 + param_3) { uVar2 = lVar3 + param_3 + param_1[3]; lVar3 = uVar2 - uVar2 % (ulong)param_1[3]; lVar1 = my_realloc(key_memory_DYNAMIC_STRING,lVar1,lVar3,0x10); if (lVar1 == 0) { return 1; } *param_1 = lVar1; param_1[2] = lVar3; lVar3 = param_1[1]; } memcpy((void *)(lVar3 + lVar1),param_2,param_3); lVar1 = param_1[1]; param_1[1] = param_3 + lVar1; *(int1 *)(*param_1 + param_3 + lVar1) = 0; return 0; }
29,018
minja::Value::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value& at(const Value & index) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); if (is_array()) return array_->at(index.get<int>()); if (is_object()) return object_->at(index.primitive_); throw std::runtime_error("Value is not an array or object: " + dump()); }
O1
cpp
minja::Value::at(minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rsi) jne 0x788a1 cmpq $0x0, 0x20(%rsi) jne 0x788a1 cmpq $0x0, 0x30(%rsi) jne 0x788a1 movq 0x10(%r14), %rbx testq %rbx, %rbx je 0x78887 movq %rsi, %rdi callq 0x75e5e movslq %eax, %rsi movq (%rbx), %rax movq 0x8(%rbx), %rcx subq %rax, %rcx sarq $0x4, %rcx movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD imulq %rcx, %rdx cmpq %rsi, %rdx jbe 0x788fe leaq (%rsi,%rsi,4), %rcx shlq $0x4, %rcx addq %rcx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x20(%r14), %rdi testq %rdi, %rdi je 0x7890c addq $0x40, %rsi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0x79d28 movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x45c2f(%rip), %rsi # 0xbe4f6 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3779b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x766fb(%rip), %rsi # 0xeefe8 movq 0x76674(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 jmp 0x78967 leaq 0x45d5f(%rip), %rdi # 0xbe664 xorl %eax, %eax callq 0x19a20 movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x45d10(%rip), %rsi # 0xbe642 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3779b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x76690(%rip), %rsi # 0xeefe8 movq 0x76609(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 jmp 0x7896d jmp 0x7898d jmp 0x789b0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78993 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x78993 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x789b6 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x789b6 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x789c3 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0 nop
_ZN5minja5Value2atERKS0_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rsi+10h], 0 jnz short loc_788A1 cmp qword ptr [rsi+20h], 0 jnz short loc_788A1 cmp qword ptr [rsi+30h], 0 jnz short loc_788A1 mov rbx, [r14+10h] test rbx, rbx jz short loc_78887 mov rdi, rsi call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) movsxd rsi, eax mov rax, [rbx] mov rcx, [rbx+8] sub rcx, rax sar rcx, 4 mov rdx, 0CCCCCCCCCCCCCCCDh imul rdx, rcx cmp rdx, rsi jbe loc_788FE lea rcx, [rsi+rsi*4] shl rcx, 4 add rax, rcx add rsp, 40h pop rbx pop r14 pop rbp retn loc_78887: mov rdi, [r14+20h] test rdi, rdi jz short loc_7890C add rsi, 40h ; '@' add rsp, 40h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_788A1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_78967 loc_788FE: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) loc_7890C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_78967: jmp short loc_7896D jmp short loc_7898D jmp short loc_789B0 loc_7896D: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78993 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78993 loc_7898D: mov r14, rax mov bpl, 1 loc_78993: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_789B6 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_789B6 loc_789B0: mov r14, rax mov bpl, 1 loc_789B6: test bpl, bpl jz short loc_789C3 mov rdi, rbx; void * call ___cxa_free_exception loc_789C3: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Value::at(minja::Value *this, const minja::Value *a2) { _QWORD *v3; // rbx unsigned long long v4; // rsi unsigned long long v5; // rdx long long v7; // rdi void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v11[16]; // [rsp+20h] [rbp-38h] BYREF if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = (_QWORD *)*((_QWORD *)this + 2); if ( v3 ) { v4 = (int)minja::Value::get<int>((long long)a2); v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4); if ( v5 <= v4 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v4, v5); return 80 * v4 + *v3; } else { v7 = *((_QWORD *)this + 4); if ( !v7 ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( v7, (char *)a2 + 64); } }
at: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001788a1 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x001788a1 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001788a1 MOV RBX,qword ptr [R14 + 0x10] TEST RBX,RBX JZ 0x00178887 MOV RDI,RSI CALL 0x00175e5e MOVSXD RSI,EAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] SUB RCX,RAX SAR RCX,0x4 MOV RDX,-0x3333333333333333 IMUL RDX,RCX CMP RDX,RSI JBE 0x001788fe LEA RCX,[RSI + RSI*0x4] SHL RCX,0x4 ADD RAX,RCX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00178887: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x0017890c ADD RSI,0x40 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x00179d28 LAB_001788a1: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_001788ae: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_001788c0: LEA RSI,[0x1be4f6] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013779b MOV BPL,0x1 LAB_001788d7: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70 LAB_001788fe: LEA RDI,[0x1be664] XOR EAX,EAX CALL 0x00119a20 LAB_0017890c: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00178919: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_0017892b: LEA RSI,[0x1be642] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013779b MOV BPL,0x1 LAB_00178942: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70
/* minja::Value::at(minja::Value const&) */ long __thiscall minja::Value::at(Value *this,Value *param_1) { long *plVar1; int iVar2; long lVar3; runtime_error *prVar4; ulong uVar5; ulong uVar6; int1 auStack_58 [32]; string local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { plVar1 = *(long **)(this + 0x10); if (plVar1 == (long *)0x0) { if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20) != (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)0x0) { lVar3 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); return lVar3; } } else { iVar2 = get<int>(param_1); uVar6 = (ulong)iVar2; uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333; if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) { return *plVar1 + uVar6 * 0x50; } std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178919 to 0017892a has its CatchHandler @ 0017896b */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0017892b to 0017893e has its CatchHandler @ 00178969 */ std::operator+((char *)local_38,(string *)"Value is not an array or object: "); /* try { // try from 00178942 to 00178966 has its CatchHandler @ 00178967 */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001788ae to 001788bf has its CatchHandler @ 001789b0 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001788c0 to 001788d3 has its CatchHandler @ 0017898d */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 001788d7 to 001788fb has its CatchHandler @ 0017896d */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); }
29,019
google::protobuf::MapIterator::~MapIterator()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h
~MapIterator() { map_->DeleteIterator(this); }
O3
c
google::protobuf::MapIterator::~MapIterator(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rdi movq (%rdi), %rax movq %rbx, %rsi callq *0x80(%rax) cmpl $0x9, 0x30(%rbx) jne 0x97c6d movq 0x10(%rbx), %rdi addq $0x20, %rbx cmpq %rbx, %rdi je 0x97c6d popq %rbx jmp 0x2d160 popq %rbx retq movq %rax, %rdi callq 0x33bfc
_ZN6google8protobuf11MapIteratorD2Ev: push rbx mov rbx, rdi mov rdi, [rdi+8] mov rax, [rdi] mov rsi, rbx call qword ptr [rax+80h] cmp dword ptr [rbx+30h], 9 jnz short loc_97C6D mov rdi, [rbx+10h]; void * add rbx, 20h ; ' ' cmp rdi, rbx jz short loc_97C6D pop rbx jmp __ZdlPv; operator delete(void *) loc_97C6D: pop rbx retn mov rdi, rax call __clang_call_terminate
void google::protobuf::MapIterator::~MapIterator(google::protobuf::MapIterator *this) { char *v2; // rdi (*(void ( **)(_QWORD, google::protobuf::MapIterator *))(**((_QWORD **)this + 1) + 128LL))( *((_QWORD *)this + 1), this); if ( *((_DWORD *)this + 12) == 9 ) { v2 = (char *)*((_QWORD *)this + 2); if ( v2 != (char *)this + 32 ) operator delete(v2); } }
~MapIterator: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI] LAB_00197c4b: MOV RSI,RBX CALL qword ptr [RAX + 0x80] CMP dword ptr [RBX + 0x30],0x9 JNZ 0x00197c6d MOV RDI,qword ptr [RBX + 0x10] ADD RBX,0x20 CMP RDI,RBX JZ 0x00197c6d POP RBX JMP 0x0012d160 LAB_00197c6d: POP RBX RET
/* google::protobuf::MapIterator::~MapIterator() */ void __thiscall google::protobuf::MapIterator::~MapIterator(MapIterator *this) { /* try { // try from 00197c4b to 00197c53 has its CatchHandler @ 00197c6f */ (**(code **)(**(long **)(this + 8) + 0x80))(*(long **)(this + 8),this); if ((*(int *)(this + 0x30) == 9) && (*(MapIterator **)(this + 0x10) != this + 0x20)) { operator_delete(*(MapIterator **)(this + 0x10)); return; } return; }
29,020
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O3
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp cmpl $0x7f, %esi jg 0x42aa4 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x42af2 movb %sil, (%rdx) movl $0x1, %eax jmp 0x42af2 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x42af2 leaq 0x8209a(%rip), %rdi # 0xc4b50 movzwl (%rdi,%rsi,2), %esi testw %si, %si je 0x42af2 movzwl %si, %eax cmpl $0xff, %eax ja 0x42ad8 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x42af2 movb %sil, (%rdx) jmp 0x42a9d leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x42af2 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax popq %rbp retq
my_wc_mb_cp932: push rbp mov rbp, rsp cmp esi, 7Fh jg short loc_42AA4 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_42AF2 mov [rdx], sil loc_42A9D: mov eax, 1 jmp short loc_42AF2 loc_42AA4: xor eax, eax cmp rsi, 0FFFFh ja short loc_42AF2 lea rdi, unicode_to_cp932 movzx esi, word ptr [rdi+rsi*2] test si, si jz short loc_42AF2 movzx eax, si cmp eax, 0FFh ja short loc_42AD8 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_42AF2 mov [rdx], sil jmp short loc_42A9D loc_42AD8: lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_42AF2 rol si, 8 mov [rdx], si mov eax, 2 loc_42AF2: pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax unsigned __int16 v5; // si if ( (int)a2 <= 127 ) { result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; *a3 = a2; return 1LL; } result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_cp932[a2]; if ( v5 ) { if ( v5 > 0xFFu ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1LL; } } } } return result; }
my_wc_mb_cp932: PUSH RBP MOV RBP,RSP CMP ESI,0x7f JG 0x00142aa4 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00142af2 MOV byte ptr [RDX],SIL LAB_00142a9d: MOV EAX,0x1 JMP 0x00142af2 LAB_00142aa4: XOR EAX,EAX CMP RSI,0xffff JA 0x00142af2 LEA RDI,[0x1c4b50] MOVZX ESI,word ptr [RDI + RSI*0x2] TEST SI,SI JZ 0x00142af2 MOVZX EAX,SI CMP EAX,0xff JA 0x00142ad8 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00142af2 MOV byte ptr [RDX],SIL JMP 0x00142a9d LAB_00142ad8: LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00142af2 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_00142af2: POP RBP RET
int8 my_wc_mb_cp932(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; if ((int)param_2 < 0x80) { if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)param_2; } else { if (0xffff < param_2) { return 0; } uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2); if (uVar1 == 0) { return 0; } if (0xff < uVar1) { if (param_4 < param_3 + 1) { return 0xffffff9a; } *param_3 = uVar1 << 8 | uVar1 >> 8; return 2; } if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)uVar1; } return 1; }
29,021
google::protobuf::SStringPrintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, ...)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/stringprintf.cc
const std::string& SStringPrintf(std::string* dst, const char* format, ...) { va_list ap; va_start(ap, format); dst->clear(); StringAppendV(dst, format, ap); va_end(ap); return *dst; }
O3
cpp
google::protobuf::SStringPrintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, ...): pushq %rbx subq $0xd0, %rsp movq %rdi, %rbx leaq 0x20(%rsp), %rdi movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0xa7c3f movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rdx movq %rdi, 0x10(%rdx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rdx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rdx) movq $0x0, 0x8(%rbx) movq (%rbx), %rax movb $0x0, (%rax) movq %rbx, %rdi callq 0xa7a68 movq %rbx, %rax addq $0xd0, %rsp popq %rbx retq
_ZN6google8protobuf13SStringPrintfEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcz: push rbx sub rsp, 0D0h mov rbx, rdi lea rdi, [rsp+0D8h+var_B8] mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_A7C3F movaps [rsp+0D8h+var_88], xmm0 movaps [rsp+0D8h+var_78], xmm1 movaps [rsp+0D8h+var_68], xmm2 movaps [rsp+0D8h+var_58], xmm3 movaps [rsp+0D8h+var_48], xmm4 movaps [rsp+0D8h+var_38], xmm5 movaps [rsp+0D8h+var_28], xmm6 movaps [rsp+0D8h+var_18], xmm7 loc_A7C3F: mov rdx, rsp mov [rdx+10h], rdi lea rax, [rsp+0D8h+arg_0] mov [rdx+8], rax mov rax, 3000000010h mov [rdx], rax mov qword ptr [rbx+8], 0 mov rax, [rbx] mov byte ptr [rax], 0 mov rdi, rbx call _ZN6google8protobuf13StringAppendVEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcP13__va_list_tag; google::protobuf::StringAppendV(std::string *,char const*,__va_list_tag *) mov rax, rbx add rsp, 0D0h pop rbx retn
_QWORD * google::protobuf::SStringPrintf( _QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { __int128 v16; // [rsp+0h] [rbp-D8h] BYREF char *v17; // [rsp+10h] [rbp-C8h] char v18; // [rsp+20h] [rbp-B8h] BYREF long long v19; // [rsp+30h] [rbp-A8h] long long v20; // [rsp+38h] [rbp-A0h] long long v21; // [rsp+40h] [rbp-98h] long long v22; // [rsp+48h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-88h] __m128 v24; // [rsp+60h] [rbp-78h] __m128 v25; // [rsp+70h] [rbp-68h] __m128 v26; // [rsp+80h] [rbp-58h] __m128 v27; // [rsp+90h] [rbp-48h] __m128 v28; // [rsp+A0h] [rbp-38h] __m128 v29; // [rsp+B0h] [rbp-28h] __m128 v30; // [rsp+C0h] [rbp-18h] v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v19 = a3; v20 = a4; v21 = a5; v22 = a6; v17 = &v18; *((_QWORD *)&v16 + 1) = &a15; *(_QWORD *)&v16 = 0x3000000010LL; a1[1] = 0LL; *(_BYTE *)*a1 = 0; google::protobuf::StringAppendV(a1, a2, &v16); return a1; }
SStringPrintf: PUSH RBX SUB RSP,0xd0 MOV RBX,RDI LEA RDI,[RSP + 0x20] MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x001a7c3f MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_001a7c3f: MOV RDX,RSP MOV qword ptr [RDX + 0x10],RDI LEA RAX,[RSP + 0xe0] MOV qword ptr [RDX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RDX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV RAX,qword ptr [RBX] MOV byte ptr [RAX],0x0 MOV RDI,RBX CALL 0x001a7a68 MOV RAX,RBX ADD RSP,0xd0 POP RBX RET
/* google::protobuf::SStringPrintf(std::__cxx11::string*, char const*, ...) */ string * google::protobuf::SStringPrintf(string *param_1,char *param_2,...) { char in_AL; int8 in_RCX; int8 in_RDX; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; int8 local_d8; int1 *local_d0; int1 *local_c8; int1 local_b8 [16]; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int8 local_18; local_c8 = local_b8; if (in_AL != '\0') { local_88 = in_XMM0_Qa; local_78 = in_XMM1_Qa; local_68 = in_XMM2_Qa; local_58 = in_XMM3_Qa; local_48 = in_XMM4_Qa; local_38 = in_XMM5_Qa; local_28 = in_XMM6_Qa; local_18 = in_XMM7_Qa; } local_d0 = &stack0x00000008; local_d8 = 0x3000000010; *(int8 *)(param_1 + 8) = 0; **(int1 **)param_1 = 0; local_a8 = in_RDX; local_a0 = in_RCX; local_98 = in_R8; local_90 = in_R9; StringAppendV(param_1,param_2,(__va_list_tag *)&local_d8); return param_1; }
29,022
my_strnncollsp_8bit_bin
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *end; size_t length; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) return ((int) a[-1] - (int) b[-1]); } return a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); }
O3
c
my_strnncollsp_8bit_bin: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %rdi cmovbq %rdx, %rdi leaq (%rsi,%rdi), %r9 cmpq %r9, %rsi jae 0xac0a1 movzbl (%rsi), %eax incq %rsi movzbl (%rcx), %r10d incq %rcx cmpb %r10b, %al je 0xac085 subl %r10d, %eax jmp 0xac0a8 xorl %eax, %eax cmpq %r8, %rdx jne 0xac0aa popq %rbp retq jae 0xac0c7 subq %rdi, %r8 je 0xac0a8 xorl %edx, %edx xorl %eax, %eax cmpb $0x20, (%rcx,%rdx) jb 0xac0e2 jne 0xac0e9 incq %rdx cmpq %rdx, %r8 jne 0xac0b5 jmp 0xac0a8 subq %rdi, %rdx je 0xac0a8 xorl %ecx, %ecx xorl %eax, %eax cmpb $0x20, (%rsi,%rcx) jb 0xac0e9 jne 0xac0e2 incq %rcx cmpq %rcx, %rdx jne 0xac0d0 jmp 0xac0a8 movl $0x1, %eax jmp 0xac0a8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0xac0a8
my_strnncollsp_8bit_bin: push rbp mov rbp, rsp cmp rdx, r8 mov rdi, r8 cmovb rdi, rdx lea r9, [rsi+rdi] loc_AC085: cmp rsi, r9 jnb short loc_AC0A1 movzx eax, byte ptr [rsi] inc rsi movzx r10d, byte ptr [rcx] inc rcx cmp al, r10b jz short loc_AC085 sub eax, r10d jmp short loc_AC0A8 loc_AC0A1: xor eax, eax cmp rdx, r8 jnz short loc_AC0AA loc_AC0A8: pop rbp retn loc_AC0AA: jnb short loc_AC0C7 sub r8, rdi jz short loc_AC0A8 xor edx, edx xor eax, eax loc_AC0B5: cmp byte ptr [rcx+rdx], 20h ; ' ' jb short loc_AC0E2 jnz short loc_AC0E9 inc rdx cmp r8, rdx jnz short loc_AC0B5 jmp short loc_AC0A8 loc_AC0C7: sub rdx, rdi jz short loc_AC0A8 xor ecx, ecx xor eax, eax loc_AC0D0: cmp byte ptr [rsi+rcx], 20h ; ' ' jb short loc_AC0E9 jnz short loc_AC0E2 inc rcx cmp rdx, rcx jnz short loc_AC0D0 jmp short loc_AC0A8 loc_AC0E2: mov eax, 1 jmp short loc_AC0A8 loc_AC0E9: mov eax, 0FFFFFFFFh jmp short loc_AC0A8
long long my_strnncollsp_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { unsigned long long v5; // rdi unsigned __int8 *v6; // r9 int v7; // eax int v8; // r10d long long result; // rax unsigned long long v10; // r8 long long v11; // rdx unsigned long long v12; // rdx long long v13; // rcx v5 = a5; if ( a3 < a5 ) v5 = a3; v6 = &a2[v5]; while ( a2 < v6 ) { v7 = *a2++; v8 = *a4++; if ( (_BYTE)v7 != (_BYTE)v8 ) return (unsigned int)(v7 - v8); } result = 0LL; if ( a3 != a5 ) { if ( a3 >= a5 ) { v12 = a3 - v5; if ( v12 ) { v13 = 0LL; result = 0LL; while ( a2[v13] >= 0x20u ) { if ( a2[v13] != 32 ) return 1LL; if ( v12 == ++v13 ) return result; } return 0xFFFFFFFFLL; } } else { v10 = a5 - v5; if ( v10 ) { v11 = 0LL; result = 0LL; while ( a4[v11] >= 0x20u ) { if ( a4[v11] != 32 ) return 0xFFFFFFFFLL; if ( v10 == ++v11 ) return result; } return 1LL; } } } return result; }
my_strnncollsp_8bit_bin: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV RDI,R8 CMOVC RDI,RDX LEA R9,[RSI + RDI*0x1] LAB_001ac085: CMP RSI,R9 JNC 0x001ac0a1 MOVZX EAX,byte ptr [RSI] INC RSI MOVZX R10D,byte ptr [RCX] INC RCX CMP AL,R10B JZ 0x001ac085 SUB EAX,R10D JMP 0x001ac0a8 LAB_001ac0a1: XOR EAX,EAX CMP RDX,R8 JNZ 0x001ac0aa LAB_001ac0a8: POP RBP RET LAB_001ac0aa: JNC 0x001ac0c7 SUB R8,RDI JZ 0x001ac0a8 XOR EDX,EDX XOR EAX,EAX LAB_001ac0b5: CMP byte ptr [RCX + RDX*0x1],0x20 JC 0x001ac0e2 JNZ 0x001ac0e9 INC RDX CMP R8,RDX JNZ 0x001ac0b5 JMP 0x001ac0a8 LAB_001ac0c7: SUB RDX,RDI JZ 0x001ac0a8 XOR ECX,ECX XOR EAX,EAX LAB_001ac0d0: CMP byte ptr [RSI + RCX*0x1],0x20 JC 0x001ac0e9 JNZ 0x001ac0e2 INC RCX CMP RDX,RCX JNZ 0x001ac0d0 JMP 0x001ac0a8 LAB_001ac0e2: MOV EAX,0x1 JMP 0x001ac0a8 LAB_001ac0e9: MOV EAX,0xffffffff JMP 0x001ac0a8
int my_strnncollsp_8bit_bin (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; ulong uVar5; uVar5 = param_5; if (param_3 < param_5) { uVar5 = param_3; } pbVar1 = param_2 + uVar5; while (param_2 < pbVar1) { bVar2 = *param_2; param_2 = param_2 + 1; bVar3 = *param_4; param_4 = param_4 + 1; if (bVar2 != bVar3) { return (uint)bVar2 - (uint)bVar3; } } if (param_3 == param_5) { return 0; } if (param_3 < param_5) { if (param_5 == uVar5) { return 0; } lVar4 = 0; while( true ) { if (param_4[lVar4] < 0x20) { return 1; } if (param_4[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_5 - uVar5 == lVar4) { return 0; } } return -1; } if (param_3 != uVar5) { lVar4 = 0; while( true ) { if (param_2[lVar4] < 0x20) { return -1; } if (param_2[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_3 - uVar5 == lVar4) { return 0; } } return 1; } return 0; }
29,023
js_promise_race
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_race(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue result_promise, resolving_funcs[2], item, next_promise, ret; JSValue next_method = JS_UNDEFINED, iter = JS_UNDEFINED; JSValue promise_resolve = JS_UNDEFINED; BOOL done; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val); if (JS_IsException(result_promise)) return result_promise; promise_resolve = JS_GetProperty(ctx, this_val, JS_ATOM_resolve); if (JS_IsException(promise_resolve) || check_function(ctx, promise_resolve)) goto fail_reject; iter = JS_GetIterator(ctx, argv[0], FALSE); if (JS_IsException(iter)) { JSValue error; fail_reject: error = JS_GetException(ctx); ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED, 1, &error); JS_FreeValue(ctx, error); if (JS_IsException(ret)) goto fail; JS_FreeValue(ctx, ret); } else { next_method = JS_GetProperty(ctx, iter, JS_ATOM_next); if (JS_IsException(next_method)) goto fail_reject; for(;;) { /* XXX: conformance: should close the iterator if error on 'done' access, but not on 'value' access */ item = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done); if (JS_IsException(item)) goto fail_reject; if (done) break; next_promise = JS_Call(ctx, promise_resolve, this_val, 1, &item); JS_FreeValue(ctx, item); if (JS_IsException(next_promise)) { fail_reject1: JS_IteratorClose(ctx, iter, TRUE); goto fail_reject; } ret = JS_InvokeFree(ctx, next_promise, JS_ATOM_then, 2, resolving_funcs); if (check_exception_free(ctx, ret)) goto fail_reject1; } } done: JS_FreeValue(ctx, promise_resolve); JS_FreeValue(ctx, next_method); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, resolving_funcs[0]); JS_FreeValue(ctx, resolving_funcs[1]); return result_promise; fail: //JS_FreeValue(ctx, next_method); // why not??? JS_FreeValue(ctx, result_promise); result_promise = JS_EXCEPTION; goto done; }
O3
c
js_promise_race: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdx, %r13 movq %rdi, %r15 cmpl $-0x1, %r13d jne 0x56741 movq %r8, %rbp movq %rsi, %r12 leaq 0x80(%rsp), %rsi movq %r15, %rdi movq %r12, %rdx movq %r13, %rcx callq 0x3687c movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d je 0x56b1a movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl $0x81, %ecx movq %r12, %r8 movq %r13, %r9 callq 0x22c0f movq %rax, %rcx movl $0x3, %eax movq %rax, 0x50(%rsp) xorl %edi, %edi cmpl $0x6, %edx movq %rcx, 0x38(%rsp) movq %rdx, 0x48(%rsp) jne 0x5675f movq $0x0, 0x30(%rsp) movq %rax, 0x28(%rsp) movq $0x0, 0x40(%rsp) jmp 0x5691f leaq 0x4a1a5(%rip), %rsi # 0xa08ed xorl %ebx, %ebx movq %r15, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %r14d jmp 0x56b1a movq %r15, %rdi movq %rcx, %rsi callq 0x42327 testl %eax, %eax je 0x5678f movq $0x0, 0x30(%rsp) movl $0x3, %eax movq %rax, 0x28(%rsp) movq $0x0, 0x40(%rsp) jmp 0x5691d movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq $0x0, 0x40(%rsp) movq %r15, %rdi xorl %ecx, %ecx callq 0x425d5 cmpl $0x6, %edx movq %rax, 0x30(%rsp) movq %rdx, 0x28(%rsp) je 0x5691d movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq %rax, %rsi movl $0x6b, %ecx movq %rax, %r8 movq %rdx, %r9 callq 0x22c0f movq %rax, 0x40(%rsp) movq %rdx, 0x50(%rsp) cmpl $0x6, %edx je 0x5691d leaq 0x5c(%rsp), %rax movq %rax, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq 0x30(%rsp), %rbp movq %rbp, %rsi movq 0x28(%rsp), %rdx movq 0x40(%rsp), %rcx movq 0x50(%rsp), %r8 xorl %r9d, %r9d callq 0x429ce movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) cmpl $0x6, %edx je 0x5691d cmpl $0x0, 0x5c(%rsp) jne 0x56b32 movl $0x0, 0x60(%rsp) movq $0x3, 0x68(%rsp) movups 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %r15, %rdi movq 0x38(%rsp), %rsi movq 0x48(%rsp), %rdx movq %r12, %rcx movq %r13, %r8 movl $0x1, %r9d callq 0x27eca movq %rdx, %rbp movq 0x78(%rsp), %rdx cmpl $-0x9, %edx jb 0x568cc movq 0x70(%rsp), %rsi movq 0x18(%r15), %rdi movl (%rsi), %r8d leal -0x1(%r8), %ecx movl %ecx, (%rsi) cmpl $0x1, %r8d jg 0x568cc movq %rax, 0xa8(%rsp) callq 0x20d90 movq 0xa8(%rsp), %rax cmpl $0x6, %ebp je 0x56906 movq %r15, %rdi movq %rax, %rsi movq %rbp, %rdx movl $0x80, %ecx movl $0x2, %r8d leaq 0x80(%rsp), %r9 callq 0x55929 movq 0x18(%r15), %rdi movq %rax, %rsi callq 0x4e233 testl %eax, %eax je 0x567f6 movq %r15, %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx movl $0x1, %ecx callq 0x406c5 xorl %edi, %edi movq 0x18(%r15), %rax movups 0xf0(%rax), %xmm0 movl %edi, 0xf0(%rax) movq $0x4, 0xf8(%rax) leaq 0xb0(%rsp), %rbp movaps %xmm0, (%rbp) movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx movl %edi, 0x60(%rsp) movq $0x3, 0x68(%rsp) movups 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rbp, 0x10(%rsp) movl $0x2, 0x18(%rsp) movl $0x3, %r8d movq %r15, %rdi xorl %ecx, %ecx movl $0x1, %r9d callq 0x27eca movq %rax, %r12 movq %rdx, %r13 movq 0x8(%rbp), %rdx cmpl $-0x9, %edx jb 0x569bc movq 0xb0(%rsp), %rsi movq 0x18(%r15), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x569bc callq 0x20d90 movq 0x18(%r15), %rdi cmpl $0x6, %r13d jne 0x56a0d cmpl $-0x9, %r14d movq 0x30(%rsp), %rbp movq 0x28(%rsp), %r13 movq 0x38(%rsp), %rsi movq 0x48(%rsp), %rdx jb 0x56a02 movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x56a02 movq %rbx, %rsi movq %rdx, %r12 movq %r14, %rdx callq 0x20d90 movq %r12, %rdx movq 0x38(%rsp), %rsi xorl %r12d, %r12d movl $0x6, %r14d jmp 0x56a50 cmpl $-0x9, %r13d movq 0x30(%rsp), %rbp movq 0x38(%rsp), %rsi movq 0x48(%rsp), %rdx jb 0x56a48 movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x56a48 movq %r12, %rsi movq %rdx, %r12 movq %r13, %rdx callq 0x20d90 movq %r12, %rdx movq 0x38(%rsp), %rsi movq %rbx, %r12 movq 0x28(%rsp), %r13 movq 0x18(%r15), %rdi cmpl $-0x9, %edx jb 0x56a6e movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x56a6e callq 0x20d90 movq 0x18(%r15), %rdi cmpl $-0x9, 0x50(%rsp) movq 0x40(%rsp), %rsi jb 0x56a94 movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x56a94 movq 0x50(%rsp), %rdx callq 0x20d90 movq 0x18(%r15), %rdi cmpl $-0x9, %r13d jb 0x56ab7 movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x56ab7 movq %rbp, %rsi movq %r13, %rdx callq 0x20d90 movq 0x18(%r15), %rdi movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000 movq 0x88(%rsp), %rdx cmpl $-0x9, %edx jb 0x56aeb movq 0x80(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x56aeb callq 0x20d90 movq 0x18(%r15), %rdi andq %r13, %rbx movq 0x98(%rsp), %rdx cmpl $-0x9, %edx jb 0x56b14 movq 0x90(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x56b14 callq 0x20d90 movl %r12d, %eax orq %rax, %rbx movq %rbx, %rax movq %r14, %rdx addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %r12 movq 0x28(%rsp), %r13 movq 0x38(%rsp), %rsi movq 0x48(%rsp), %rdx jmp 0x56a50
js_promise_race: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r13, rdx mov r15, rdi cmp r13d, 0FFFFFFFFh jnz loc_56741 mov rbp, r8 mov r12, rsi lea rsi, [rsp+0F8h+var_78] mov rdi, r15 mov rdx, r12 mov rcx, r13 call js_new_promise_capability mov rbx, rax mov r14, rdx cmp r14d, 6 jz loc_56B1A mov dword ptr [rsp+0F8h+var_F8+8], 0 mov qword ptr [rsp+0F8h+var_F8], 0 mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, 81h mov r8, r12 mov r9, r13 call JS_GetPropertyInternal2 mov rcx, rax mov eax, 3 mov [rsp+0F8h+var_A8], rax xor edi, edi cmp edx, 6 mov [rsp+0F8h+var_C0], rcx mov [rsp+0F8h+var_B0], rdx jnz short loc_5675F mov [rsp+0F8h+var_C8], 0 mov [rsp+0F8h+var_D0], rax mov [rsp+0F8h+var_B8], 0 jmp loc_5691F loc_56741: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov r14d, 6 jmp loc_56B1A loc_5675F: mov rdi, r15 mov rsi, rcx call check_function test eax, eax jz short loc_5678F mov [rsp+0F8h+var_C8], 0 mov eax, 3 mov [rsp+0F8h+var_D0], rax mov [rsp+0F8h+var_B8], 0 jmp loc_5691D loc_5678F: mov rsi, [rbp+0] mov rdx, [rbp+8] mov [rsp+0F8h+var_B8], 0 mov rdi, r15 xor ecx, ecx call JS_GetIterator cmp edx, 6 mov [rsp+0F8h+var_C8], rax mov [rsp+0F8h+var_D0], rdx jz loc_5691D mov dword ptr [rsp+0F8h+var_F8+8], 0 mov qword ptr [rsp+0F8h+var_F8], 0 mov rdi, r15 mov rsi, rax mov ecx, 6Bh ; 'k' mov r8, rax mov r9, rdx call JS_GetPropertyInternal2 mov [rsp+0F8h+var_B8], rax mov [rsp+0F8h+var_A8], rdx cmp edx, 6 jz loc_5691D loc_567F6: lea rax, [rsp+0F8h+var_9C] mov qword ptr [rsp+0F8h+var_F8+8], rax mov qword ptr [rsp+0F8h+var_F8], 0 mov rdi, r15 mov rbp, [rsp+0F8h+var_C8] mov rsi, rbp mov rdx, [rsp+0F8h+var_D0] mov rcx, [rsp+0F8h+var_B8] mov r8, [rsp+0F8h+var_A8] xor r9d, r9d call JS_IteratorNext mov [rsp+0F8h+var_88], rax mov [rsp+0F8h+var_80], rdx cmp edx, 6 jz loc_5691D cmp [rsp+0F8h+var_9C], 0 jnz loc_56B32 mov dword ptr [rsp+0F8h+var_98], 0 mov qword ptr [rsp+0F8h+var_98+8], 3 movups xmm0, [rsp+0F8h+var_98] movups [rsp+0F8h+var_F8], xmm0 lea rax, [rsp+0F8h+var_88] mov [rsp+0F8h+var_E8], rax mov [rsp+0F8h+var_E0], 2 mov rdi, r15 mov rsi, [rsp+0F8h+var_C0] mov rdx, [rsp+0F8h+var_B0] mov rcx, r12 mov r8, r13 mov r9d, 1 call JS_CallInternal mov rbp, rdx mov rdx, [rsp+0F8h+var_80] cmp edx, 0FFFFFFF7h jb short loc_568CC mov rsi, [rsp+0F8h+var_88] mov rdi, [r15+18h] mov r8d, [rsi] lea ecx, [r8-1] mov [rsi], ecx cmp r8d, 1 jg short loc_568CC mov [rsp+0F8h+var_50], rax call js_free_value_rt mov rax, [rsp+0F8h+var_50] loc_568CC: cmp ebp, 6 jz short loc_56906 mov rdi, r15 mov rsi, rax mov rdx, rbp mov ecx, 80h mov r8d, 2 lea r9, [rsp+0F8h+var_78] call JS_InvokeFree mov rdi, [r15+18h] mov rsi, rax call check_exception_free test eax, eax jz loc_567F6 loc_56906: mov rdi, r15 mov rsi, [rsp+0F8h+var_C8] mov rdx, [rsp+0F8h+var_D0] mov ecx, 1 call JS_IteratorClose loc_5691D: xor edi, edi loc_5691F: mov rax, [r15+18h] movups xmm0, xmmword ptr [rax+0F0h] mov [rax+0F0h], edi mov qword ptr [rax+0F8h], 4 lea rbp, [rsp+0F8h+var_48] movaps xmmword ptr [rbp+0], xmm0 mov rsi, [rsp+0F8h+var_68] mov rdx, [rsp+0F8h+var_60] mov dword ptr [rsp+0F8h+var_98], edi mov qword ptr [rsp+0F8h+var_98+8], 3 movups xmm0, [rsp+0F8h+var_98] movups [rsp+0F8h+var_F8], xmm0 mov [rsp+0F8h+var_E8], rbp mov [rsp+0F8h+var_E0], 2 mov r8d, 3 mov rdi, r15 xor ecx, ecx mov r9d, 1 call JS_CallInternal mov r12, rax mov r13, rdx mov rdx, [rbp+8] cmp edx, 0FFFFFFF7h jb short loc_569BC mov rsi, [rsp+0F8h+var_48] mov rdi, [r15+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_569BC call js_free_value_rt loc_569BC: mov rdi, [r15+18h] cmp r13d, 6 jnz short loc_56A0D cmp r14d, 0FFFFFFF7h mov rbp, [rsp+0F8h+var_C8] mov r13, [rsp+0F8h+var_D0] mov rsi, [rsp+0F8h+var_C0] mov rdx, [rsp+0F8h+var_B0] jb short loc_56A02 mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_56A02 mov rsi, rbx mov r12, rdx mov rdx, r14 call js_free_value_rt mov rdx, r12 mov rsi, [rsp+0F8h+var_C0] loc_56A02: xor r12d, r12d mov r14d, 6 jmp short loc_56A50 loc_56A0D: cmp r13d, 0FFFFFFF7h mov rbp, [rsp+0F8h+var_C8] mov rsi, [rsp+0F8h+var_C0] mov rdx, [rsp+0F8h+var_B0] jb short loc_56A48 mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_56A48 mov rsi, r12 mov r12, rdx mov rdx, r13 call js_free_value_rt mov rdx, r12 mov rsi, [rsp+0F8h+var_C0] loc_56A48: mov r12, rbx mov r13, [rsp+0F8h+var_D0] loc_56A50: mov rdi, [r15+18h] cmp edx, 0FFFFFFF7h jb short loc_56A6E mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_56A6E call js_free_value_rt mov rdi, [r15+18h] loc_56A6E: cmp dword ptr [rsp+0F8h+var_A8], 0FFFFFFF7h mov rsi, [rsp+0F8h+var_B8] jb short loc_56A94 mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_56A94 mov rdx, [rsp+0F8h+var_A8] call js_free_value_rt mov rdi, [r15+18h] loc_56A94: cmp r13d, 0FFFFFFF7h jb short loc_56AB7 mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_56AB7 mov rsi, rbp mov rdx, r13 call js_free_value_rt mov rdi, [r15+18h] loc_56AB7: mov r13, 0FFFFFFFF00000000h mov rdx, [rsp+0F8h+var_70] cmp edx, 0FFFFFFF7h jb short loc_56AEB mov rsi, [rsp+0F8h+var_78] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_56AEB call js_free_value_rt mov rdi, [r15+18h] loc_56AEB: and rbx, r13 mov rdx, [rsp+0F8h+var_60] cmp edx, 0FFFFFFF7h jb short loc_56B14 mov rsi, [rsp+0F8h+var_68] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_56B14 call js_free_value_rt loc_56B14: mov eax, r12d or rbx, rax loc_56B1A: mov rax, rbx mov rdx, r14 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_56B32: mov r12, rbx mov r13, [rsp+0F8h+var_D0] mov rsi, [rsp+0F8h+var_C0] mov rdx, [rsp+0F8h+var_B0] jmp loc_56A50
unsigned long long js_promise_race( _QWORD *a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v18; // rbx long long v19; // rdx long long v20; // r14 long long v21; // rdx unsigned long long PropertyInternal2; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 int *Iterator; // rax long long v28; // rdx long long v29; // rdx _QWORD *v30; // rbp long long v31; // r8 long long v32; // r9 long long v33; // rdx __m128 v34; // xmm0 _QWORD *v35; // rax long long v36; // r9 double v37; // xmm4_8 double v38; // xmm5_8 long long v39; // rdx long long v40; // rbp long long v41; // rdx _QWORD *v42; // rsi long long v43; // rdi long long v44; // r8 long long v45; // rcx _QWORD *v46; // rax long long v47; // rdx long long v48; // rcx long long v49; // r8 long long v50; // r9 long long v51; // rax __int128 v52; // xmm0 _QWORD *v53; // r12 long long v54; // rdx long long v55; // r13 long long v56; // rdx _QWORD *v57; // rsi long long v58; // rdi int v59; // eax long long v60; // rcx long long v61; // rdi long long v62; // r13 _QWORD *v63; // rsi long long v64; // rdx int v65; // eax long long v66; // rcx unsigned int v67; // r12d int v68; // eax long long v69; // rcx long long v70; // rdi int v71; // eax long long v72; // rcx int v73; // eax long long v74; // rcx int v75; // eax long long v76; // rcx long long v77; // rdx _QWORD *v78; // rsi int v79; // eax long long v80; // rcx unsigned long long v81; // rbx long long v82; // rdx _QWORD *v83; // rsi int v84; // eax long long v85; // rcx char v87; // [rsp+0h] [rbp-F8h] long long v88; // [rsp+28h] [rbp-D0h] long long v89; // [rsp+30h] [rbp-C8h] long long v90; // [rsp+38h] [rbp-C0h] _QWORD *v91; // [rsp+40h] [rbp-B8h] long long v92; // [rsp+48h] [rbp-B0h] long long v93; // [rsp+50h] [rbp-A8h] int v94; // [rsp+5Ch] [rbp-9Ch] BYREF __m128i v95; // [rsp+60h] [rbp-98h] _DWORD *v96; // [rsp+70h] [rbp-88h] BYREF long long v97; // [rsp+78h] [rbp-80h] _DWORD *v98; // [rsp+80h] [rbp-78h] BYREF long long v99; // [rsp+88h] [rbp-70h] _DWORD *v100; // [rsp+90h] [rbp-68h] long long v101; // [rsp+98h] [rbp-60h] _QWORD *v102; // [rsp+A8h] [rbp-50h] __int128 v103; // [rsp+B0h] [rbp-48h] BYREF if ( (_DWORD)a3 == -1 ) { v18 = js_new_promise_capability( a1, (long long)&v98, a2, a3, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14); v20 = v19; if ( (_DWORD)v19 != 6 ) { PropertyInternal2 = JS_GetPropertyInternal2((long long)a1, a2, a3, 0x81u, a2, a3, 0LL, 0); v93 = 3LL; v90 = PropertyInternal2; v92 = v21; if ( (_DWORD)v21 == 6 ) { v89 = 0LL; v88 = 3LL; v91 = 0LL; } else if ( (unsigned int)check_function( (long long)a1, PropertyInternal2, v21, PropertyInternal2, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14) ) { v89 = 0LL; v88 = 3LL; v91 = 0LL; } else { v91 = 0LL; Iterator = JS_GetIterator( (long long)a1, *a5, a5[1], 0, a7, a8, a9, a10, *(double *)v25.m128_u64, *(double *)v26.m128_u64, a13, a14); v89 = (long long)Iterator; v88 = v28; if ( (_DWORD)v28 != 6 ) { v91 = (_QWORD *)JS_GetPropertyInternal2( (long long)a1, (long long)Iterator, v28, 0x6Bu, (long long)Iterator, v28, 0LL, 0); v93 = v29; if ( (_DWORD)v29 != 6 ) { while ( 1 ) { v30 = (_QWORD *)v89; v96 = (_DWORD *)JS_IteratorNext((long long)a1, v89, v88, (int)v91, v93, 0, 0LL, &v94); v97 = v33; if ( (_DWORD)v33 == 6 ) break; if ( v94 ) { v67 = v18; v62 = v88; v63 = (_QWORD *)v90; v64 = v92; goto LABEL_30; } v95.m128i_i32[0] = 0; v95.m128i_i64[1] = 3LL; v34 = (__m128)v95; v35 = (_QWORD *)JS_CallInternal( (long long)a1, v90, v92, a2, a3, 1LL, v95, a8, a9, a10, v25, v26, a13, a14, 0, 3, (long long)&v96, 2u); v40 = v39; v41 = v97; if ( (unsigned int)v97 >= 0xFFFFFFF7 ) { v42 = v96; v43 = a1[3]; v44 = (unsigned int)*v96; v45 = (unsigned int)(v44 - 1); *v96 = v45; if ( (int)v44 <= 1 ) { v102 = v35; js_free_value_rt(v43, v42, v41, v45, v44, v36); v35 = v102; } } if ( (_DWORD)v40 != 6 ) { v46 = JS_InvokeFree((long long)a1, v35, v40, 0x80u, 2, (long long)&v98); if ( !check_exception_free(a1[3], v46, v47, v48, v49, v50) ) continue; } JS_IteratorClose((long long)a1, v89, v88, 1, v34, a8, a9, a10, v37, v38, a13, a14); break; } } } } v51 = a1[3]; v52 = *(_OWORD *)(v51 + 240); *(_DWORD *)(v51 + 240) = 0; *(_QWORD *)(v51 + 248) = 4LL; v103 = v52; v95.m128i_i32[0] = 0; v95.m128i_i64[1] = 3LL; v53 = (_QWORD *)JS_CallInternal( (long long)a1, (long long)v100, v101, 0LL, 3LL, 1LL, v95, a8, a9, a10, v25, v26, a13, a14, 0, 3, (long long)&v103, 2u); v55 = v54; v56 = *((_QWORD *)&v103 + 1); if ( DWORD2(v103) >= 0xFFFFFFF7 ) { v57 = (_QWORD *)v103; v58 = a1[3]; v59 = *(_DWORD *)v103; v60 = (unsigned int)(*(_DWORD *)v103 - 1); *(_DWORD *)v103 = v60; if ( v59 <= 1 ) js_free_value_rt(v58, v57, v56, v60, v31, v32); } v61 = a1[3]; if ( (_DWORD)v55 == 6 ) { v30 = (_QWORD *)v89; v62 = v88; v63 = (_QWORD *)v90; v64 = v92; if ( (unsigned int)v20 >= 0xFFFFFFF7 ) { v65 = *(_DWORD *)v18; v66 = (unsigned int)(*(_DWORD *)v18 - 1); *(_DWORD *)v18 = v66; if ( v65 <= 1 ) { js_free_value_rt(v61, (_QWORD *)v18, v20, v66, v31, v32); v64 = v92; v63 = (_QWORD *)v90; } } v67 = 0; } else { v30 = (_QWORD *)v89; v63 = (_QWORD *)v90; v64 = v92; if ( (unsigned int)v55 >= 0xFFFFFFF7 ) { v68 = *(_DWORD *)v53; v69 = (unsigned int)(*(_DWORD *)v53 - 1); *(_DWORD *)v53 = v69; if ( v68 <= 1 ) { js_free_value_rt(v61, v53, v55, v69, v31, v32); v64 = v92; v63 = (_QWORD *)v90; } } v67 = v18; v62 = v88; } LABEL_30: v70 = a1[3]; if ( (unsigned int)v64 >= 0xFFFFFFF7 ) { v71 = *(_DWORD *)v63; v72 = (unsigned int)(*(_DWORD *)v63 - 1); *(_DWORD *)v63 = v72; if ( v71 <= 1 ) { js_free_value_rt(v70, v63, v64, v72, v31, v32); v70 = a1[3]; } } if ( (unsigned int)v93 >= 0xFFFFFFF7 ) { v73 = *(_DWORD *)v91; v74 = (unsigned int)(*(_DWORD *)v91 - 1); *(_DWORD *)v91 = v74; if ( v73 <= 1 ) { js_free_value_rt(v70, v91, v93, v74, v31, v32); v70 = a1[3]; } } if ( (unsigned int)v62 >= 0xFFFFFFF7 ) { v75 = *(_DWORD *)v30; v76 = (unsigned int)(*(_DWORD *)v30 - 1); *(_DWORD *)v30 = v76; if ( v75 <= 1 ) { js_free_value_rt(v70, v30, v62, v76, v31, v32); v70 = a1[3]; } } v77 = v99; if ( (unsigned int)v99 >= 0xFFFFFFF7 ) { v78 = v98; v79 = *v98; v80 = (unsigned int)(*v98 - 1); *v98 = v80; if ( v79 <= 1 ) { js_free_value_rt(v70, v78, v77, v80, v31, v32); v70 = a1[3]; } } v81 = v18 & 0xFFFFFFFF00000000LL; v82 = v101; if ( (unsigned int)v101 >= 0xFFFFFFF7 ) { v83 = v100; v84 = *v100; v85 = (unsigned int)(*v100 - 1); *v100 = v85; if ( v84 <= 1 ) js_free_value_rt(v70, v83, v82, v85, v31, v32); } return v67 | v81; } } else { v18 = 0LL; JS_ThrowTypeError( (long long)a1, (long long)"not an object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v87); } return v18; }
js_promise_race: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R13,RDX MOV R15,RDI CMP R13D,-0x1 JNZ 0x00156741 MOV RBP,R8 MOV R12,RSI LEA RSI,[RSP + 0x80] MOV RDI,R15 MOV RDX,R12 MOV RCX,R13 CALL 0x0013687c MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x00156b1a MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,0x81 MOV R8,R12 MOV R9,R13 CALL 0x00122c0f MOV RCX,RAX MOV EAX,0x3 MOV qword ptr [RSP + 0x50],RAX XOR EDI,EDI CMP EDX,0x6 MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x48],RDX JNZ 0x0015675f MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x40],0x0 JMP 0x0015691f LAB_00156741: LEA RSI,[0x1a08ed] XOR EBX,EBX MOV RDI,R15 XOR EAX,EAX CALL 0x0012214f MOV R14D,0x6 JMP 0x00156b1a LAB_0015675f: MOV RDI,R15 MOV RSI,RCX CALL 0x00142327 TEST EAX,EAX JZ 0x0015678f MOV qword ptr [RSP + 0x30],0x0 MOV EAX,0x3 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x40],0x0 JMP 0x0015691d LAB_0015678f: MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV qword ptr [RSP + 0x40],0x0 MOV RDI,R15 XOR ECX,ECX CALL 0x001425d5 CMP EDX,0x6 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x28],RDX JZ 0x0015691d MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,RAX MOV ECX,0x6b MOV R8,RAX MOV R9,RDX CALL 0x00122c0f MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x50],RDX CMP EDX,0x6 JZ 0x0015691d LAB_001567f6: LEA RAX,[RSP + 0x5c] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RBP,qword ptr [RSP + 0x30] MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x50] XOR R9D,R9D CALL 0x001429ce MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX CMP EDX,0x6 JZ 0x0015691d CMP dword ptr [RSP + 0x5c],0x0 JNZ 0x00156b32 MOV dword ptr [RSP + 0x60],0x0 MOV qword ptr [RSP + 0x68],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,R12 MOV R8,R13 MOV R9D,0x1 CALL 0x00127eca MOV RBP,RDX MOV RDX,qword ptr [RSP + 0x78] CMP EDX,-0x9 JC 0x001568cc MOV RSI,qword ptr [RSP + 0x70] MOV RDI,qword ptr [R15 + 0x18] MOV R8D,dword ptr [RSI] LEA ECX,[R8 + -0x1] MOV dword ptr [RSI],ECX CMP R8D,0x1 JG 0x001568cc MOV qword ptr [RSP + 0xa8],RAX CALL 0x00120d90 MOV RAX,qword ptr [RSP + 0xa8] LAB_001568cc: CMP EBP,0x6 JZ 0x00156906 MOV RDI,R15 MOV RSI,RAX MOV RDX,RBP MOV ECX,0x80 MOV R8D,0x2 LEA R9,[RSP + 0x80] CALL 0x00155929 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RAX CALL 0x0014e233 TEST EAX,EAX JZ 0x001567f6 LAB_00156906: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV ECX,0x1 CALL 0x001406c5 LAB_0015691d: XOR EDI,EDI LAB_0015691f: MOV RAX,qword ptr [R15 + 0x18] MOVUPS XMM0,xmmword ptr [RAX + 0xf0] MOV dword ptr [RAX + 0xf0],EDI MOV qword ptr [RAX + 0xf8],0x4 LEA RBP,[RSP + 0xb0] MOVAPS xmmword ptr [RBP],XMM0 MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] MOV dword ptr [RSP + 0x60],EDI MOV qword ptr [RSP + 0x68],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RBP MOV dword ptr [RSP + 0x18],0x2 MOV R8D,0x3 MOV RDI,R15 XOR ECX,ECX MOV R9D,0x1 CALL 0x00127eca MOV R12,RAX MOV R13,RDX MOV RDX,qword ptr [RBP + 0x8] CMP EDX,-0x9 JC 0x001569bc MOV RSI,qword ptr [RSP + 0xb0] MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001569bc CALL 0x00120d90 LAB_001569bc: MOV RDI,qword ptr [R15 + 0x18] CMP R13D,0x6 JNZ 0x00156a0d CMP R14D,-0x9 MOV RBP,qword ptr [RSP + 0x30] MOV R13,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x48] JC 0x00156a02 MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x00156a02 MOV RSI,RBX MOV R12,RDX MOV RDX,R14 CALL 0x00120d90 MOV RDX,R12 MOV RSI,qword ptr [RSP + 0x38] LAB_00156a02: XOR R12D,R12D MOV R14D,0x6 JMP 0x00156a50 LAB_00156a0d: CMP R13D,-0x9 MOV RBP,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x48] JC 0x00156a48 MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x00156a48 MOV RSI,R12 MOV R12,RDX MOV RDX,R13 CALL 0x00120d90 MOV RDX,R12 MOV RSI,qword ptr [RSP + 0x38] LAB_00156a48: MOV R12,RBX MOV R13,qword ptr [RSP + 0x28] LAB_00156a50: MOV RDI,qword ptr [R15 + 0x18] CMP EDX,-0x9 JC 0x00156a6e MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00156a6e CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_00156a6e: CMP dword ptr [RSP + 0x50],-0x9 MOV RSI,qword ptr [RSP + 0x40] JC 0x00156a94 MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00156a94 MOV RDX,qword ptr [RSP + 0x50] CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_00156a94: CMP R13D,-0x9 JC 0x00156ab7 MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00156ab7 MOV RSI,RBP MOV RDX,R13 CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_00156ab7: MOV R13,-0x100000000 MOV RDX,qword ptr [RSP + 0x88] CMP EDX,-0x9 JC 0x00156aeb MOV RSI,qword ptr [RSP + 0x80] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00156aeb CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_00156aeb: AND RBX,R13 MOV RDX,qword ptr [RSP + 0x98] CMP EDX,-0x9 JC 0x00156b14 MOV RSI,qword ptr [RSP + 0x90] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00156b14 CALL 0x00120d90 LAB_00156b14: MOV EAX,R12D OR RBX,RAX LAB_00156b1a: MOV RAX,RBX MOV RDX,R14 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00156b32: MOV R12,RBX MOV R13,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x48] JMP 0x00156a50
int1 [16] js_promise_race(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int8 uVar1; long lVar2; int iVar3; int *piVar5; int8 uVar6; int8 uVar7; int *piVar8; int8 uVar9; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [16]; int8 in_stack_ffffffffffffff10; uint uVar16; ulong uVar15; int *local_b8; int8 local_a8; int local_9c [3]; int8 uStack_90; int1 local_88 [16]; int *local_78; uint local_70; int *local_68; int8 local_60; int8 local_50; int *local_48; int8 uStack_40; int *piVar4; uVar16 = (uint)((ulong)in_stack_ffffffffffffff10 >> 0x20); if ((int)param_3 == -1) { auVar10 = js_new_promise_capability(param_1,&local_78,param_2,param_3); piVar4 = auVar10._0_8_; if (auVar10._8_4_ != 6) { uVar15 = (ulong)uVar16 << 0x20; auVar11 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x81,param_2,param_3,0,uVar15); piVar5 = auVar11._0_8_; if (auVar11._8_4_ == 6) { auVar12 = ZEXT816(3) << 0x40; auVar13 = ZEXT816(3) << 0x40; } else { iVar3 = check_function(param_1,piVar5); if (iVar3 == 0) { auVar13 = ZEXT816(3) << 0x40; auVar12 = JS_GetIterator(param_1,*param_5,param_5[1],0); uVar7 = auVar12._8_8_; uVar9 = auVar12._0_8_; if (auVar12._8_4_ != 6) { auVar13 = JS_GetPropertyInternal2 (param_1,uVar9,uVar7,0x6b,uVar9,uVar7,0,uVar15 & 0xffffffff00000000) ; if (auVar13._8_4_ != 6) { do { auVar14 = JS_IteratorNext(param_1,uVar9,uVar7,auVar13._0_8_,auVar13._8_8_,0,0, local_9c); local_88 = auVar14; if (auVar14._8_4_ == 6) goto LAB_0015691f; if (local_9c[0] != 0) goto LAB_00156a50; local_9c[1] = 0; uStack_90 = 3; auVar14 = JS_CallInternal(param_1,piVar5,auVar11._8_8_,param_2,param_3,1, (ulong)(uint)local_9c[2] << 0x20,3,local_88,2); uVar6 = auVar14._0_8_; if (0xfffffff6 < local_88._8_4_) { uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *(int *)local_88._0_8_; *(int *)local_88._0_8_ = iVar3 + -1; if (iVar3 < 2) { local_50 = uVar6; js_free_value_rt(uVar1); uVar6 = local_50; } } if (auVar14._8_4_ == 6) break; uVar6 = JS_InvokeFree(param_1,uVar6,auVar14._8_8_,0x80,2); iVar3 = check_exception_free(*(int8 *)(param_1 + 0x18),uVar6); } while (iVar3 == 0); JS_IteratorClose(param_1,uVar9,uVar7,1); } } } else { auVar12 = ZEXT816(3) << 0x40; auVar13 = ZEXT816(3) << 0x40; } } LAB_0015691f: lVar2 = *(long *)(param_1 + 0x18); local_48 = *(int **)(lVar2 + 0xf0); uStack_40 = *(int8 *)(lVar2 + 0xf8); *(int4 *)(lVar2 + 0xf0) = 0; *(int8 *)(lVar2 + 0xf8) = 4; local_9c[1] = 0; uStack_90 = 3; auVar14 = JS_CallInternal(param_1,local_68,local_60,0,3,1,(ulong)(uint)local_9c[2] << 0x20,3, &local_48,2); piVar8 = auVar14._0_8_; if (0xfffffff6 < (uint)uStack_40) { uVar9 = *(int8 *)(param_1 + 0x18); iVar3 = *local_48; *local_48 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar9); } } uVar9 = *(int8 *)(param_1 + 0x18); if (auVar14._8_4_ == 6) { if ((0xfffffff6 < auVar10._8_4_) && (iVar3 = *piVar4, *piVar4 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9,piVar4,auVar10._8_8_); } auVar10 = ZEXT816(6) << 0x40; } else if ((0xfffffff6 < auVar14._8_4_) && (iVar3 = *piVar8, *piVar8 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9,piVar8,auVar14._8_8_); } LAB_00156a50: local_a8 = auVar13._8_8_; uVar7 = local_a8; local_b8 = auVar13._0_8_; piVar8 = auVar12._0_8_; uVar9 = *(int8 *)(param_1 + 0x18); if ((0xfffffff6 < auVar11._8_4_) && (iVar3 = *piVar5, *piVar5 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9); uVar9 = *(int8 *)(param_1 + 0x18); } local_a8._0_4_ = auVar13._8_4_; if ((0xfffffff6 < (uint)local_a8) && (iVar3 = *local_b8, *local_b8 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9,local_b8,uVar7); uVar9 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < auVar12._8_4_) && (iVar3 = *piVar8, *piVar8 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9,piVar8,auVar12._8_8_); uVar9 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < local_70) && (iVar3 = *local_78, *local_78 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9); uVar9 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < (uint)local_60) && (iVar3 = *local_68, *local_68 = iVar3 + -1, iVar3 < 2)) { js_free_value_rt(uVar9); } auVar10._8_8_ = auVar10._8_8_; auVar10._0_8_ = (ulong)piVar4 & 0xffffffff00000000 | auVar10._0_8_ & 0xffffffff; } } else { JS_ThrowTypeError(param_1,"not an object"); auVar10 = ZEXT816(6) << 0x40; } return auVar10; }
29,024
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
monkey531[P]llama/common/json.hpp
inline cached_power get_cached_power_for_binary_exponent(int e) { // Now // // alpha <= e_c + e + q <= gamma (1) // ==> f_c * 2^alpha <= c * 2^e * 2^q // // and since the c's are normalized, 2^(q-1) <= f_c, // // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) // // From the paper: // "In theory the result of the procedure could be wrong since c is rounded, // and the computation itself is approximated [...]. In practice, however, // this simple function is sufficient." // // For IEEE double precision floating-point numbers converted into // normalized diyfp's w = f * 2^e, with q = 64, // // e >= -1022 (min IEEE exponent) // -52 (p - 1) // -52 (p - 1, possibly normalize denormal IEEE numbers) // -11 (normalize the diyfp) // = -1137 // // and // // e <= +1023 (max IEEE exponent) // -52 (p - 1) // -11 (normalize the diyfp) // = 960 // // This binary exponent range [-1137,960] results in a decimal exponent // range [-307,324]. One does not need to store a cached power for each // k in this range. For each such k it suffices to find a cached power // such that the exponent of the product lies in [alpha,gamma]. // This implies that the difference of the decimal exponents of adjacent // table entries must be less than or equal to // // floor( (gamma - alpha) * log_10(2) ) = 8. // // (A smaller distance gamma-alpha would require a larger table.) // NB: // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. constexpr int kCachedPowersMinDecExp = -300; constexpr int kCachedPowersDecStep = 8; static constexpr std::array<cached_power, 79> kCachedPowers = { { { 0xAB70FE17C79AC6CA, -1060, -300 }, { 0xFF77B1FCBEBCDC4F, -1034, -292 }, { 0xBE5691EF416BD60C, -1007, -284 }, { 0x8DD01FAD907FFC3C, -980, -276 }, { 0xD3515C2831559A83, -954, -268 }, { 0x9D71AC8FADA6C9B5, -927, -260 }, { 0xEA9C227723EE8BCB, -901, -252 }, { 0xAECC49914078536D, -874, -244 }, { 0x823C12795DB6CE57, -847, -236 }, { 0xC21094364DFB5637, -821, -228 }, { 0x9096EA6F3848984F, -794, -220 }, { 0xD77485CB25823AC7, -768, -212 }, { 0xA086CFCD97BF97F4, -741, -204 }, { 0xEF340A98172AACE5, -715, -196 }, { 0xB23867FB2A35B28E, -688, -188 }, { 0x84C8D4DFD2C63F3B, -661, -180 }, { 0xC5DD44271AD3CDBA, -635, -172 }, { 0x936B9FCEBB25C996, -608, -164 }, { 0xDBAC6C247D62A584, -582, -156 }, { 0xA3AB66580D5FDAF6, -555, -148 }, { 0xF3E2F893DEC3F126, -529, -140 }, { 0xB5B5ADA8AAFF80B8, -502, -132 }, { 0x87625F056C7C4A8B, -475, -124 }, { 0xC9BCFF6034C13053, -449, -116 }, { 0x964E858C91BA2655, -422, -108 }, { 0xDFF9772470297EBD, -396, -100 }, { 0xA6DFBD9FB8E5B88F, -369, -92 }, { 0xF8A95FCF88747D94, -343, -84 }, { 0xB94470938FA89BCF, -316, -76 }, { 0x8A08F0F8BF0F156B, -289, -68 }, { 0xCDB02555653131B6, -263, -60 }, { 0x993FE2C6D07B7FAC, -236, -52 }, { 0xE45C10C42A2B3B06, -210, -44 }, { 0xAA242499697392D3, -183, -36 }, { 0xFD87B5F28300CA0E, -157, -28 }, { 0xBCE5086492111AEB, -130, -20 }, { 0x8CBCCC096F5088CC, -103, -12 }, { 0xD1B71758E219652C, -77, -4 }, { 0x9C40000000000000, -50, 4 }, { 0xE8D4A51000000000, -24, 12 }, { 0xAD78EBC5AC620000, 3, 20 }, { 0x813F3978F8940984, 30, 28 }, { 0xC097CE7BC90715B3, 56, 36 }, { 0x8F7E32CE7BEA5C70, 83, 44 }, { 0xD5D238A4ABE98068, 109, 52 }, { 0x9F4F2726179A2245, 136, 60 }, { 0xED63A231D4C4FB27, 162, 68 }, { 0xB0DE65388CC8ADA8, 189, 76 }, { 0x83C7088E1AAB65DB, 216, 84 }, { 0xC45D1DF942711D9A, 242, 92 }, { 0x924D692CA61BE758, 269, 100 }, { 0xDA01EE641A708DEA, 295, 108 }, { 0xA26DA3999AEF774A, 322, 116 }, { 0xF209787BB47D6B85, 348, 124 }, { 0xB454E4A179DD1877, 375, 132 }, { 0x865B86925B9BC5C2, 402, 140 }, { 0xC83553C5C8965D3D, 428, 148 }, { 0x952AB45CFA97A0B3, 455, 156 }, { 0xDE469FBD99A05FE3, 481, 164 }, { 0xA59BC234DB398C25, 508, 172 }, { 0xF6C69A72A3989F5C, 534, 180 }, { 0xB7DCBF5354E9BECE, 561, 188 }, { 0x88FCF317F22241E2, 588, 196 }, { 0xCC20CE9BD35C78A5, 614, 204 }, { 0x98165AF37B2153DF, 641, 212 }, { 0xE2A0B5DC971F303A, 667, 220 }, { 0xA8D9D1535CE3B396, 694, 228 }, { 0xFB9B7CD9A4A7443C, 720, 236 }, { 0xBB764C4CA7A44410, 747, 244 }, { 0x8BAB8EEFB6409C1A, 774, 252 }, { 0xD01FEF10A657842C, 800, 260 }, { 0x9B10A4E5E9913129, 827, 268 }, { 0xE7109BFBA19C0C9D, 853, 276 }, { 0xAC2820D9623BF429, 880, 284 }, { 0x80444B5E7AA7CF85, 907, 292 }, { 0xBF21E44003ACDD2D, 933, 300 }, { 0x8E679C2F5E44FF8F, 960, 308 }, { 0xD433179D9C8CB841, 986, 316 }, { 0x9E19DB92B4E31BA9, 1013, 324 }, } }; // This computation gives exactly the same results for k as // k = ceil((kAlpha - e - 1) * 0.30102999566398114) // for |e| <= 1500, but doesn't require floating-point operations. // NB: log_10(2) ~= 78913 / 2^18 JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; JSON_ASSERT(kAlpha <= cached.e + e + 64); JSON_ASSERT(kGamma >= cached.e + e + 64); return cached; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int): pushq %rax cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23 jle 0x87bfd cmpl $0x5dd, %edi # imm = 0x5DD jge 0x87c1c xorl %ecx, %ecx movl %edi, %eax subl $-0x3d, %eax setl %cl negl %eax imull $0x13441, %eax, %eax # imm = 0x13441 movl $0x40000, %esi # imm = 0x40000 cltd idivl %esi addl %eax, %ecx cmpl $0xfffffec5, %ecx # imm = 0xFFFFFEC5 jle 0x87c38 addl $0x133, %ecx # imm = 0x133 movl %ecx, %eax cwtd movw $0x8, %cx idivw %cx cmpw $0x4f, %ax jae 0x87c54 movzwl %ax, %eax shll $0x4, %eax leaq 0x2f0aa(%rip), %rcx # 0xb6c88 movq 0x8(%rcx,%rax), %rdx addl %edx, %edi cmpl $-0x7d, %edi jle 0x87c70 cmpl $-0x5f, %edi jge 0x87c8c movq (%rcx,%rax), %rax popq %rcx retq leaq 0x272cf(%rip), %rdi # 0xaeed3 leaq 0x27312(%rip), %rdx # 0xaef1d leaq 0x2cb19(%rip), %rcx # 0xb472b movl $0x43e4, %esi # imm = 0x43E4 jmp 0x87ca6 leaq 0x272b0(%rip), %rdi # 0xaeed3 leaq 0x272f3(%rip), %rdx # 0xaef1d leaq 0x2cb05(%rip), %rcx # 0xb4736 movl $0x43e5, %esi # imm = 0x43E5 jmp 0x87ca6 leaq 0x27294(%rip), %rdi # 0xaeed3 leaq 0x272d7(%rip), %rdx # 0xaef1d leaq 0x2caf3(%rip), %rcx # 0xb4740 movl $0x43ea, %esi # imm = 0x43EA jmp 0x87ca6 leaq 0x27278(%rip), %rdi # 0xaeed3 leaq 0x272bb(%rip), %rdx # 0xaef1d leaq 0x2cae2(%rip), %rcx # 0xb474b movl $0x43eb, %esi # imm = 0x43EB jmp 0x87ca6 leaq 0x2725c(%rip), %rdi # 0xaeed3 leaq 0x2729f(%rip), %rdx # 0xaef1d leaq 0x2cafd(%rip), %rcx # 0xb4782 movl $0x43ee, %esi # imm = 0x43EE jmp 0x87ca6 leaq 0x27240(%rip), %rdi # 0xaeed3 leaq 0x27283(%rip), %rdx # 0xaef1d leaq 0x2cafd(%rip), %rcx # 0xb479e movl $0x43ef, %esi # imm = 0x43EF xorl %eax, %eax callq 0x23e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi: push rax cmp edi, 0FFFFFA23h jle short loc_87BFD cmp edi, 5DDh jge loc_87C1C xor ecx, ecx mov eax, edi sub eax, 0FFFFFFC3h setl cl neg eax imul eax, 13441h mov esi, 40000h cdq idiv esi add ecx, eax cmp ecx, 0FFFFFEC5h jle loc_87C38 add ecx, 133h mov eax, ecx cwd mov cx, 8 idiv cx cmp ax, 4Fh ; 'O' jnb loc_87C54 movzx eax, ax shl eax, 4 lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers mov rdx, [rcx+rax+8] add edi, edx cmp edi, 0FFFFFF83h jle loc_87C70 cmp edi, 0FFFFFFA1h jge loc_87C8C mov rax, [rcx+rax] pop rcx retn loc_87BFD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500; "e >= -1500" mov esi, 43E4h jmp loc_87CA6 loc_87C1C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500_0; "e <= 1500" mov esi, 43E5h jmp short loc_87CA6 loc_87C38: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndex0; "index >= 0" mov esi, 43EAh jmp short loc_87CA6 loc_87C54: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"... mov esi, 43EBh jmp short loc_87CA6 loc_87C70: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64" mov esi, 43EEh jmp short loc_87CA6 loc_87C8C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64" mov esi, 43EFh loc_87CA6: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this) { int v1; // ecx unsigned __int16 v2; // ax long long v3; // rax int v4; // edi long long v6; // rsi if ( (int)this <= -1501 ) { v6 = 17380LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17380LL, "GGML_ASSERT(%s) failed", "e >= -1500"); } else if ( (int)this >= 1501 ) { v6 = 17381LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17381LL, "GGML_ASSERT(%s) failed", "e <= 1500"); } else { v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61); if ( v1 <= -315 ) { v6 = 17386LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17386LL, "GGML_ASSERT(%s) failed", "index >= 0"); } else { v2 = (__int16)(v1 + 307) / 8; if ( v2 >= 0x4Fu ) { v6 = 17387LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17387LL, "GGML_ASSERT(%s) failed", "static_cast<std::size_t>(index) < kCachedPowers.size()"); } else { v3 = 16 * (unsigned int)v2; v4 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3 + 8) + (_DWORD)this; if ( v4 <= -125 ) { v6 = 17390LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17390LL, "GGML_ASSERT(%s) failed", "kAlpha <= cached.e + e + 64"); } else { if ( v4 < -95 ) return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3); v6 = 17391LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17391LL, "GGML_ASSERT(%s) failed", "kGamma >= cached.e + e + 64"); } } } } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v6); }
get_cached_power_for_binary_exponent: PUSH RAX CMP EDI,0xfffffa23 JLE 0x00187bfd CMP EDI,0x5dd JGE 0x00187c1c XOR ECX,ECX MOV EAX,EDI SUB EAX,-0x3d SETL CL NEG EAX IMUL EAX,EAX,0x13441 MOV ESI,0x40000 CDQ IDIV ESI ADD ECX,EAX CMP ECX,0xfffffec5 JLE 0x00187c38 ADD ECX,0x133 MOV EAX,ECX CWD MOV CX,0x8 IDIV CX CMP AX,0x4f JNC 0x00187c54 MOVZX EAX,AX SHL EAX,0x4 LEA RCX,[0x1b6c88] MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8] ADD EDI,EDX CMP EDI,-0x7d JLE 0x00187c70 CMP EDI,-0x5f JGE 0x00187c8c MOV RAX,qword ptr [RCX + RAX*0x1] POP RCX RET LAB_00187bfd: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b472b] MOV ESI,0x43e4 JMP 0x00187ca6 LAB_00187c1c: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b4736] MOV ESI,0x43e5 JMP 0x00187ca6 LAB_00187c38: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b4740] MOV ESI,0x43ea JMP 0x00187ca6 LAB_00187c54: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b474b] MOV ESI,0x43eb JMP 0x00187ca6 LAB_00187c70: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b4782] MOV ESI,0x43ee JMP 0x00187ca6 LAB_00187c8c: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b479e] MOV ESI,0x43ef LAB_00187ca6: XOR EAX,EAX CALL 0x00123e90
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */ int8 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1) { ulong uVar1; int iVar2; uint uVar3; char *pcVar4; int8 uVar5; if (param_1 < -0x5dc) { pcVar4 = "e >= -1500"; uVar5 = 0x43e4; } else if (param_1 < 0x5dd) { iVar2 = (uint)(param_1 < -0x3d) + ((param_1 + 0x3d) * -0x13441) / 0x40000; if (iVar2 < -0x13a) { pcVar4 = "index >= 0"; uVar5 = 0x43ea; } else { uVar3 = iVar2 + 0x133; uVar3 = (int)((uint)(ushort)((short)uVar3 >> 0xf) << 0x10 | uVar3 & 0xffff) / 8; if ((ushort)uVar3 < 0x4f) { uVar1 = (ulong)((uVar3 & 0xffff) << 4); iVar2 = param_1 + (int)*(int8 *) (get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1 + 8); if (iVar2 < -0x7c) { pcVar4 = "kAlpha <= cached.e + e + 64"; uVar5 = 0x43ee; } else { if (iVar2 < -0x5f) { return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1) ; } pcVar4 = "kGamma >= cached.e + e + 64"; uVar5 = 0x43ef; } } else { pcVar4 = "static_cast<std::size_t>(index) < kCachedPowers.size()"; uVar5 = 0x43eb; } } } else { pcVar4 = "e <= 1500"; uVar5 = 0x43e5; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
29,025
ma_control_file_end
eloqsql/storage/maria/ma_control_file.c
int ma_control_file_end(void) { int close_error; DBUG_ENTER("ma_control_file_end"); if (control_file_fd < 0) /* already closed */ DBUG_RETURN(0); #ifndef _WIN32 (void) my_lock(control_file_fd, F_UNLCK, 0L, F_TO_EOF, MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK)); #endif close_error= mysql_file_close(control_file_fd, MYF(MY_WME)); /* As mysql_file_close() frees structures even if close() fails, we do the same, i.e. we mark the file as closed in all cases. */ control_file_fd= -1; /* As this module owns these variables, closing the module forbids access to them (just a safety): */ last_checkpoint_lsn= LSN_IMPOSSIBLE; last_logno= FILENO_IMPOSSIBLE; max_trid_in_control_file= recovery_failures= 0; DBUG_RETURN(close_error); }
O3
c
ma_control_file_end: movl 0x33c29d(%rip), %edi # 0x384190 testl %edi, %edi js 0x47f80 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movl $0xa0, %r8d movl $0x2, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x9fb2c movl 0x33c270(%rip), %ebx # 0x384190 leaq 0x33e0e9(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x60(%rbp), %rdi movl %ebx, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x47f83 movl $0x10, %esi movl %ebx, %edi callq 0xa055d movl $0xffffffff, 0x33c23a(%rip) # imm = 0xFFFFFFFF xorl %ecx, %ecx movq %rcx, 0x3b5609(%rip) # 0x3fd568 movl $0x0, 0x3b5607(%rip) # 0x3fd570 movb $0x0, 0x3b5610(%rip) # 0x3fd580 movq %rcx, 0x3b5601(%rip) # 0x3fd578 addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq xorl %eax, %eax retq leaq -0x14(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rdx callq 0x2a742 movl (%r14), %eax jmp 0x47f4c
ma_control_file_end: mov edi, cs:control_file_fd test edi, edi js loc_47F80 push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r8d, 0A0h mov esi, 2 xor edx, edx xor ecx, ecx call my_lock mov ebx, cs:control_file_fd lea rax, PSI_server mov rax, [rax] lea rdi, [rbp-60h] mov esi, ebx mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_47F83 mov esi, 10h mov edi, ebx call my_close loc_47F4C: mov cs:control_file_fd, 0FFFFFFFFh xor ecx, ecx mov cs:last_checkpoint_lsn, rcx mov cs:last_logno, 0 mov cs:recovery_failures, 0 mov cs:max_trid_in_control_file, rcx add rsp, 50h pop rbx pop r14 pop rbp retn loc_47F80: xor eax, eax retn loc_47F83: lea r14, [rbp-14h] mov rdi, rax mov esi, ebx mov rdx, r14 call ma_control_file_end_cold_1 mov eax, [r14] jmp short loc_47F4C
long long ma_control_file_end() { unsigned int v0; // ebx long long v1; // rax long long result; // rax long long v3; // [rsp-68h] [rbp-68h] BYREF unsigned int v4; // [rsp-1Ch] [rbp-1Ch] BYREF if ( control_file_fd < 0 ) return 0LL; my_lock((unsigned int)control_file_fd, 2LL, 0LL, 0LL, 160LL); v0 = control_file_fd; v1 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v3, (unsigned int)control_file_fd, 4LL); if ( v1 ) { ma_control_file_end_cold_1(v1, v0, &v4); result = v4; } else { result = my_close(v0, 16LL); } control_file_fd = -1; last_checkpoint_lsn = 0LL; last_logno = 0; recovery_failures = 0; max_trid_in_control_file = 0LL; return result; }
ma_control_file_end: MOV EDI,dword ptr [0x00484190] TEST EDI,EDI JS 0x00147f80 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R8D,0xa0 MOV ESI,0x2 XOR EDX,EDX XOR ECX,ECX CALL 0x0019fb2c MOV EBX,dword ptr [0x00484190] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x60] MOV ESI,EBX MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00147f83 MOV ESI,0x10 MOV EDI,EBX CALL 0x001a055d LAB_00147f4c: MOV dword ptr [0x00484190],0xffffffff XOR ECX,ECX MOV qword ptr [0x004fd568],RCX MOV dword ptr [0x004fd570],0x0 MOV byte ptr [0x004fd580],0x0 MOV qword ptr [0x004fd578],RCX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_00147f80: XOR EAX,EAX RET LAB_00147f83: LEA R14,[RBP + -0x14] MOV RDI,RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012a742 MOV EAX,dword ptr [R14] JMP 0x00147f4c
ulong ma_control_file_end(void) { int iVar1; long lVar2; ulong uVar3; int1 local_68 [76]; uint local_1c; if (-1 < control_file_fd) { my_lock(control_file_fd,2,0,0,0xa0); iVar1 = control_file_fd; lVar2 = (**(code **)(PSI_server + 0x158))(local_68,control_file_fd,4); if (lVar2 == 0) { uVar3 = my_close(iVar1,0x10); } else { ma_control_file_end_cold_1(lVar2,iVar1,&local_1c); uVar3 = (ulong)local_1c; } control_file_fd = 0xffffffff; last_checkpoint_lsn = 0; last_logno = 0; recovery_failures = 0; max_trid_in_control_file = 0; return uVar3; } return 0; }
29,026
js_get_length64
bluesky950520[P]quickjs/quickjs.c
static __exception int js_get_length64(JSContext *ctx, int64_t *pres, JSValue obj) { JSValue len_val; len_val = JS_GetProperty(ctx, obj, JS_ATOM_length); if (JS_IsException(len_val)) { *pres = 0; return -1; } return JS_ToLengthFree(ctx, pres, len_val); }
O0
c
js_get_length64: subq $0x48, %rsp movq %rdx, 0x30(%rsp) movq %rcx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movl $0x32, %ecx callq 0x28ac0 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x2cd17 movq 0x20(%rsp), %rax movq $0x0, (%rax) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x2cd34 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x7cf90 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
js_get_length64: sub rsp, 48h mov [rsp+48h+var_18], rdx mov [rsp+48h+var_10], rcx mov [rsp+48h+var_20], rdi mov [rsp+48h+var_28], rsi mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_18] mov rdx, [rsp+48h+var_10] mov ecx, 32h ; '2' call JS_GetProperty mov [rsp+48h+var_48], rax mov [rsp+48h+var_40], rdx mov rax, [rsp+48h+var_48] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_40] mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_38] mov rsi, [rsp+48h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_2CD17 mov rax, [rsp+48h+var_28] mov qword ptr [rax], 0 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_2CD34 loc_2CD17: mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_28] mov rdx, [rsp+48h+var_38] mov rcx, [rsp+48h+var_30] call JS_ToLengthFree mov [rsp+48h+var_4], eax loc_2CD34: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long js_get_length64(long long a1, _QWORD *a2, int a3, int a4) { long long v4; // rdx long long Property; // [rsp+0h] [rbp-48h] long long v7; // [rsp+18h] [rbp-30h] Property = JS_GetProperty(a1, a3, a4, 50); v7 = v4; if ( JS_IsException_1(Property, v4) ) { *a2 = 0LL; return (unsigned int)-1; } else { return (unsigned int)JS_ToLengthFree(a1, a2, Property, v7); } }
js_get_length64: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV ECX,0x32 CALL 0x00128ac0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00122a00 CMP EAX,0x0 JZ 0x0012cd17 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0012cd34 LAB_0012cd17: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] CALL 0x0017cf90 MOV dword ptr [RSP + 0x44],EAX LAB_0012cd34: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 js_get_length64(int8 param_1,int8 *param_2,int8 param_3,int8 param_4) { int iVar1; int1 auVar2 [16]; int4 local_4; auVar2 = JS_GetProperty(param_1,param_3,param_4,0x32); iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_); if (iVar1 == 0) { local_4 = JS_ToLengthFree(param_1,param_2,auVar2._0_8_,auVar2._8_8_); } else { *param_2 = 0; local_4 = 0xffffffff; } return local_4; }
29,027
js_get_length64
bluesky950520[P]quickjs/quickjs.c
static __exception int js_get_length64(JSContext *ctx, int64_t *pres, JSValue obj) { JSValue len_val; len_val = JS_GetProperty(ctx, obj, JS_ATOM_length); if (JS_IsException(len_val)) { *pres = 0; return -1; } return JS_ToLengthFree(ctx, pres, len_val); }
O1
c
js_get_length64: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %r9 movq %rdx, %r8 movq %rsi, %r14 movq %rdi, %rbx movq %rdx, %rsi movq %rcx, %rdx movl $0x32, %ecx pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %rdx, %r12 cmpl $0x6, %r12d jne 0x21f0b movq $0x0, (%r14) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x21f49 movq %rax, %r15 subq $0x8, %rsp movabsq $0x1fffffffffffff, %r9 # imm = 0x1FFFFFFFFFFFFF movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx movq %r12, %rcx xorl %r8d, %r8d pushq $0x0 callq 0x26c44 addq $0x10, %rsp movl %eax, %ebp movq 0x18(%rbx), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1ccb2 movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
js_get_length64: push rbp push r15 push r14 push r12 push rbx mov r9, rcx mov r8, rdx mov r14, rsi mov rbx, rdi mov rsi, rdx mov rdx, rcx mov ecx, 32h ; '2' push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rdx cmp r12d, 6 jnz short loc_21F0B mov qword ptr [r14], 0 mov eax, 0FFFFFFFFh jmp short loc_21F49 loc_21F0B: mov r15, rax sub rsp, 8 mov r9, 1FFFFFFFFFFFFFh mov rdi, rbx mov rsi, r14 mov rdx, rax mov rcx, r12 xor r8d, r8d push 0 call JS_ToInt64Clamp add rsp, 10h mov ebp, eax mov rdi, [rbx+18h] mov rsi, r15 mov rdx, r12 call JS_FreeValueRT mov eax, ebp loc_21F49: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long js_get_length64(long long a1, _QWORD *a2, int a3, int a4) { long long PropertyInternal2; // rax long long v5; // rdx long long v6; // r12 _DWORD *v8; // r15 unsigned int v9; // ebp PropertyInternal2 = JS_GetPropertyInternal2(a1, a3, a4, 50, a3, a4, 0LL, 0); v6 = v5; if ( (_DWORD)v5 == 6 ) { *a2 = 0LL; return 0xFFFFFFFFLL; } else { v8 = (_DWORD *)PropertyInternal2; v9 = JS_ToInt64Clamp(a1, (_DWORD)a2, PropertyInternal2, v5, 0, -1, 0LL); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v8, v6); return v9; } }
js_get_length64: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R9,RCX MOV R8,RDX MOV R14,RSI MOV RBX,RDI MOV RSI,RDX MOV RDX,RCX MOV ECX,0x32 PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV R12,RDX CMP R12D,0x6 JNZ 0x00121f0b MOV qword ptr [R14],0x0 MOV EAX,0xffffffff JMP 0x00121f49 LAB_00121f0b: MOV R15,RAX SUB RSP,0x8 MOV R9,0x1fffffffffffff MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX MOV RCX,R12 XOR R8D,R8D PUSH 0x0 CALL 0x00126c44 ADD RSP,0x10 MOV EBP,EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV RDX,R12 CALL 0x0011ccb2 MOV EAX,EBP LAB_00121f49: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 js_get_length64(long param_1,int8 *param_2,int8 param_3,int8 param_4) { int4 uVar1; int1 auVar2 [16]; auVar2 = JS_GetPropertyInternal2(param_1,param_3,param_4,0x32,param_3,param_4,0,0); if (auVar2._8_4_ == 6) { *param_2 = 0; uVar1 = 0xffffffff; } else { uVar1 = JS_ToInt64Clamp(param_1,param_2,auVar2._0_8_,auVar2._8_8_,0,0x1fffffffffffff,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar2._0_8_,auVar2._8_8_); } return uVar1; }
29,028
js_get_length64
bluesky950520[P]quickjs/quickjs.c
static __exception int js_get_length64(JSContext *ctx, int64_t *pres, JSValue obj) { JSValue len_val; len_val = JS_GetProperty(ctx, obj, JS_ATOM_length); if (JS_IsException(len_val)) { *pres = 0; return -1; } return JS_ToLengthFree(ctx, pres, len_val); }
O3
c
js_get_length64: pushq %r14 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r8 movq %rsi, %rbx movq %rdi, %r14 movq %rdx, %rsi movq %rcx, %rdx movl $0x32, %ecx pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %rdx, %rcx cmpl $0x6, %ecx jne 0x22723 movq $0x0, (%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x4864e
js_get_length64: push r14 push rbx push rax mov r9, rcx mov r8, rdx mov rbx, rsi mov r14, rdi mov rsi, rdx mov rdx, rcx mov ecx, 32h ; '2' push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rcx, rdx cmp ecx, 6 jnz short loc_22723 mov qword ptr [rbx], 0 mov eax, 0FFFFFFFFh add rsp, 8 pop rbx pop r14 retn loc_22723: mov rdi, r14 mov rsi, rbx mov rdx, rax add rsp, 8 pop rbx pop r14 jmp JS_ToLengthFree
long long js_get_length64(long long a1, _QWORD *a2, int a3, int a4) { long long PropertyInternal2; // rax int v5; // edx PropertyInternal2 = JS_GetPropertyInternal2(a1, a3, a4, 50, a3, a4, 0LL, 0); if ( v5 != 6 ) return JS_ToLengthFree(a1, a2, PropertyInternal2); *a2 = 0LL; return 0xFFFFFFFFLL; }
js_get_length64: PUSH R14 PUSH RBX PUSH RAX MOV R9,RCX MOV R8,RDX MOV RBX,RSI MOV R14,RDI MOV RSI,RDX MOV RDX,RCX MOV ECX,0x32 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV RCX,RDX CMP ECX,0x6 JNZ 0x00122723 MOV qword ptr [RBX],0x0 MOV EAX,0xffffffff ADD RSP,0x8 POP RBX POP R14 RET LAB_00122723: MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP 0x0014864e
int8 js_get_length64(int8 param_1,int8 *param_2,int8 param_3,int8 param_4) { int8 uVar1; int1 auVar2 [12]; auVar2 = JS_GetPropertyInternal2(param_1,param_3,param_4,0x32,param_3,param_4,0,0); if (auVar2._8_4_ == 6) { *param_2 = 0; return 0xffffffff; } uVar1 = JS_ToLengthFree(param_1,param_2,auVar2._0_8_); return uVar1; }
29,029
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; }
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>>>>>::get_codepoint(): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x75, 0x14(%rax) je 0xa620a leaq 0x169184(%rip), %rdi # 0x20f374 movl $0x1d79, %esi # imm = 0x1D79 leaq 0x162f4e(%rip), %rdx # 0x20914a leaq 0x169ea4(%rip), %rcx # 0x2100a7 movb $0x0, %al callq 0x5aed0 movl $0x0, 0x54(%rsp) movl $0xc, 0x30(%rsp) movl $0x8, 0x34(%rsp) movl $0x4, 0x38(%rsp) movl $0x0, 0x3c(%rsp) leaq 0x30(%rsp), %rax movq %rax, 0x40(%rsp) movq $0x4, 0x48(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0xa65f0 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xa6600 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax cmpq 0x18(%rsp), %rax je 0xa6348 movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rax movl (%rax), %eax movl %eax, 0x14(%rsp) callq 0xa5380 movq 0x8(%rsp), %rax cmpl $0x30, 0x14(%rax) jl 0xa62c3 movq 0x8(%rsp), %rax cmpl $0x39, 0x14(%rax) jg 0xa62c3 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x30, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xa6333 movq 0x8(%rsp), %rax cmpl $0x41, 0x14(%rax) jl 0xa62f4 movq 0x8(%rsp), %rax cmpl $0x46, 0x14(%rax) jg 0xa62f4 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x37, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xa6331 movq 0x8(%rsp), %rax cmpl $0x61, 0x14(%rax) jl 0xa6325 movq 0x8(%rsp), %rax cmpl $0x66, 0x14(%rax) jg 0xa6325 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x57, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xa632f movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0xa6383 jmp 0xa6331 jmp 0xa6333 jmp 0xa6335 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xa626d xorl %eax, %eax cmpl 0x54(%rsp), %eax jg 0xa635a cmpl $0xffff, 0x54(%rsp) # imm = 0xFFFF jle 0xa637b leaq 0x169013(%rip), %rdi # 0x20f374 movl $0x1d93, %esi # imm = 0x1D93 leaq 0x162ddd(%rip), %rdx # 0x20914a leaq 0x169d42(%rip), %rcx # 0x2100b6 movb $0x0, %al callq 0x5aed0 movl 0x54(%rsp), %eax movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %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_EEEEE13get_codepointEv: sub rsp, 68h mov [rsp+68h+var_10], rdi mov rax, [rsp+68h+var_10] mov [rsp+68h+var_60], rax cmp dword ptr [rax+14h], 75h ; 'u' jz short loc_A620A lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D79h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov al, 0 call _ggml_abort loc_A620A: mov [rsp+68h+var_14], 0 mov [rsp+68h+var_38], 0Ch mov [rsp+68h+var_34], 8 mov [rsp+68h+var_30], 4 mov [rsp+68h+var_2C], 0 lea rax, [rsp+68h+var_38] mov [rsp+68h+var_28], rax mov [rsp+68h+var_20], 4 lea rax, [rsp+68h+var_28] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void) mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void) mov [rsp+68h+var_50], rax loc_A626D: mov rax, [rsp+68h+var_48] cmp rax, [rsp+68h+var_50] jz loc_A6348 mov rdi, [rsp+68h+var_60] mov rax, [rsp+68h+var_48] mov eax, [rax] mov [rsp+68h+var_54], eax 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 rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 30h ; '0' jl short loc_A62C3 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 39h ; '9' jg short loc_A62C3 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 30h ; '0' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_A6333 loc_A62C3: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 41h ; 'A' jl short loc_A62F4 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 46h ; 'F' jg short loc_A62F4 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 37h ; '7' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_A6331 loc_A62F4: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 61h ; 'a' jl short loc_A6325 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 66h ; 'f' jg short loc_A6325 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 57h ; 'W' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_A632F loc_A6325: mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_A6383 loc_A632F: jmp short $+2 loc_A6331: jmp short $+2 loc_A6333: jmp short $+2 loc_A6335: mov rax, [rsp+68h+var_48] add rax, 4 mov [rsp+68h+var_48], rax jmp loc_A626D loc_A6348: xor eax, eax cmp eax, [rsp+68h+var_14] jg short loc_A635A cmp [rsp+68h+var_14], 0FFFFh jle short loc_A637B loc_A635A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D93h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"... mov al, 0 call _ggml_abort loc_A637B: mov eax, [rsp+68h+var_14] mov [rsp+68h+var_4], eax loc_A6383: mov eax, [rsp+68h+var_4] add rsp, 68h 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>>>::get_codepoint( long long a1) { int v2; // [rsp+14h] [rbp-54h] long long v3; // [rsp+18h] [rbp-50h] int *v4; // [rsp+20h] [rbp-48h] _DWORD v5[4]; // [rsp+30h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+40h] [rbp-28h] BYREF unsigned int v7; // [rsp+54h] [rbp-14h] long long v8; // [rsp+58h] [rbp-10h] v8 = a1; if ( *(_DWORD *)(a1 + 20) != 117 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); v7 = 0; v5[0] = 12; v5[1] = 8; v5[2] = 4; v5[3] = 0; v6[0] = v5; v6[1] = 4LL; v4 = (int *)std::initializer_list<unsigned int>::begin(v6); v3 = std::initializer_list<unsigned int>::end(v6); while ( v4 != (int *)v3 ) { v2 = *v4; 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); if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 ) { if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 ) { if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 ) return (unsigned int)-1; v7 += (*(_DWORD *)(a1 + 20) - 87) << v2; } else { v7 += (*(_DWORD *)(a1 + 20) - 55) << v2; } } else { v7 += (*(_DWORD *)(a1 + 20) - 48) << v2; } ++v4; } if ( v7 >= 0x10000 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7571LL, "GGML_ASSERT(%s) failed", "0x0000 <= codepoint && codepoint <= 0xFFFF"); return v7; }
~codecvt_utf8: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x002a61c0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x20 CALL 0x0015e1d0 ADD RSP,0x18 RET
/* std::codecvt_utf8<char32_t, 1114111ul, (std::codecvt_mode)0>::~codecvt_utf8() */ void __thiscall std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>::~codecvt_utf8 (codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0> *this) { ~codecvt_utf8(this); operator_delete(this,0x20); return; }
29,030
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x596e4 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x1b3de movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0x926de(%rip), %rdi # 0xebdc9 leaq 0x8cb18(%rip), %rdx # 0xe620a leaq 0x933e8(%rip), %rcx # 0xecae1 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x1aec0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_596E4 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_596E4: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( a1, &a1[1].m128i_u32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
29,031
LefDefParser::lefiVia::xh(int, int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
double lefiVia::xh(int layerNum, int rectNum) const { lefiViaLayer *vl; char msg[160]; if (layerNum < 0 || layerNum >= numLayers_) { sprintf(msg, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d", layerNum, numLayers_); lefiError(0, 1421, msg); return 0; } vl = layers_[layerNum]; return vl->xh(rectNum); }
O0
cpp
LefDefParser::lefiVia::xh(int, int) const: subq $0xd8, %rsp movq %rdi, 0xc8(%rsp) movl %esi, 0xc4(%rsp) movl %edx, 0xc0(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xc4(%rsp) jl 0x17c85 movq 0x8(%rsp), %rcx movl 0xc4(%rsp), %eax cmpl 0x48(%rcx), %eax jl 0x17cc6 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xc4(%rsp), %edx movl 0x48(%rax), %ecx leaq 0x5ff0e(%rip), %rsi # 0x77bae movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x58d, %esi # imm = 0x58D callq 0x3f4e0 xorps %xmm0, %xmm0 movsd %xmm0, 0xd0(%rsp) jmp 0x17d00 movq 0x8(%rsp), %rax movq 0x50(%rax), %rax movslq 0xc4(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0xb8(%rsp) movq 0xb8(%rsp), %rdi movl 0xc0(%rsp), %esi callq 0x15dc0 movsd %xmm0, 0xd0(%rsp) movsd 0xd0(%rsp), %xmm0 addq $0xd8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK12LefDefParser7lefiVia2xhEii: sub rsp, 0D8h mov [rsp+0D8h+var_10], rdi mov [rsp+0D8h+var_14], esi mov [rsp+0D8h+var_18], edx mov rax, [rsp+0D8h+var_10] mov [rsp+0D8h+var_D0], rax cmp [rsp+0D8h+var_14], 0 jl short loc_17C85 mov rcx, [rsp+0D8h+var_D0] mov eax, [rsp+0D8h+var_14] cmp eax, [rcx+48h] jl short loc_17CC6 loc_17C85: mov rax, [rsp+0D8h+var_D0] lea rdi, [rsp+0D8h+var_C8] mov edx, [rsp+0D8h+var_14] mov ecx, [rax+48h] lea rsi, aErrorLefpars14_1; "ERROR (LEFPARS-1421): The layer number "... mov al, 0 call _sprintf lea rdx, [rsp+0D8h+var_C8]; int xor edi, edi; this mov esi, 58Dh; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) xorps xmm0, xmm0 movsd [rsp+0D8h+var_8], xmm0 jmp short loc_17D00 loc_17CC6: mov rax, [rsp+0D8h+var_D0] mov rax, [rax+50h] movsxd rcx, [rsp+0D8h+var_14] mov rax, [rax+rcx*8] mov [rsp+0D8h+var_20], rax mov rdi, [rsp+0D8h+var_20]; this mov esi, [rsp+0D8h+var_18]; int call _ZN12LefDefParser12lefiViaLayer2xhEi; LefDefParser::lefiViaLayer::xh(int) movsd [rsp+0D8h+var_8], xmm0 loc_17D00: movsd xmm0, [rsp+0D8h+var_8] add rsp, 0D8h retn
double LefDefParser::lefiVia::xh(LefDefParser::lefiVia *this, int a2, int a3) { const char *v3; // rcx int v5[42]; // [rsp+10h] [rbp-C8h] BYREF int v6; // [rsp+C0h] [rbp-18h] int v7; // [rsp+C4h] [rbp-14h] LefDefParser::lefiVia *v8; // [rsp+C8h] [rbp-10h] v8 = this; v7 = a2; v6 = a3; if ( a2 >= 0 && v7 < *((_DWORD *)this + 18) ) return LefDefParser::lefiViaLayer::xh(*(LefDefParser::lefiViaLayer **)(*((_QWORD *)this + 10) + 8LL * v7), v6); sprintf( v5, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d", v7, *((_DWORD *)this + 18)); LefDefParser::lefiError(0LL, 1421, (int)v5, v3); return 0.0; }
xh: SUB RSP,0xd8 MOV qword ptr [RSP + 0xc8],RDI MOV dword ptr [RSP + 0xc4],ESI MOV dword ptr [RSP + 0xc0],EDX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xc4],0x0 JL 0x00117c85 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xc4] CMP EAX,dword ptr [RCX + 0x48] JL 0x00117cc6 LAB_00117c85: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc4] MOV ECX,dword ptr [RAX + 0x48] LEA RSI,[0x177bae] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x58d CALL 0x0013f4e0 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0xd0],XMM0 JMP 0x00117d00 LAB_00117cc6: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x50] MOVSXD RCX,dword ptr [RSP + 0xc4] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xb8] MOV ESI,dword ptr [RSP + 0xc0] CALL 0x00115dc0 MOVSD qword ptr [RSP + 0xd0],XMM0 LAB_00117d00: MOVSD XMM0,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
/* LefDefParser::lefiVia::xh(int, int) const */ int8 __thiscall LefDefParser::lefiVia::xh(lefiVia *this,int param_1,int param_2) { char local_c8 [168]; lefiViaLayer *local_20; int local_18; int local_14; lefiVia *local_10; int8 local_8; local_18 = param_2; local_14 = param_1; local_10 = this; if ((param_1 < 0) || (*(int *)(this + 0x48) <= param_1)) { sprintf(local_c8, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x48)); lefiError(0,0x58d,local_c8); local_8 = 0; } else { local_20 = *(lefiViaLayer **)(*(long *)(this + 0x50) + (long)param_1 * 8); local_8 = lefiViaLayer::xh(local_20,param_2); } return local_8; }
29,032
Log_event::read_log_event(st_io_cache*, Format_description_log_event const*, char)
eloqsql/sql/log_event.cc
Log_event* Log_event::read_log_event(IO_CACHE* file, const Format_description_log_event *fdle, my_bool crc_check) { DBUG_ENTER("Log_event::read_log_event(IO_CACHE*,Format_description_log_event*...)"); DBUG_ASSERT(fdle != 0); String event; const char *error= 0; Log_event *res= 0; switch (read_log_event(file, &event, fdle, BINLOG_CHECKSUM_ALG_OFF)) { case 0: break; case LOG_READ_EOF: // no error here; we are at the file's end goto err; case LOG_READ_BOGUS: error= "Event invalid"; goto err; case LOG_READ_IO: error= "read error"; goto err; case LOG_READ_MEM: error= "Out of memory"; goto err; case LOG_READ_TRUNC: error= "Event truncated"; goto err; case LOG_READ_TOO_LARGE: error= "Event too big"; goto err; case LOG_READ_DECRYPT: error= "Event decryption failure"; goto err; case LOG_READ_CHECKSUM_FAILURE: default: DBUG_ASSERT(0); error= "internal error"; goto err; } if ((res= read_log_event((uchar*) event.ptr(), event.length(), &error, fdle, crc_check))) res->register_temp_buf((uchar*) event.release(), true); err: if (unlikely(error)) { DBUG_ASSERT(!res); #ifdef MYSQL_CLIENT if (force_opt) DBUG_RETURN(new Unknown_log_event()); #endif if (event.length() >= OLD_HEADER_LEN) sql_print_error("Error in Log_event::read_log_event(): '%s'," " data_len: %lu, event_type: %u", error, (ulong) uint4korr(&event[EVENT_LEN_OFFSET]), (uint) (uchar)event[EVENT_TYPE_OFFSET]); else sql_print_error("Error in Log_event::read_log_event(): '%s'", error); /* The SQL slave thread will check if file->error<0 to know if there was an I/O error. Even if there is no "low-level" I/O errors with 'file', any of the high-level above errors is worrying enough to stop the SQL thread now ; as we are skipping the current event, going on with reading and successfully executing other events can only corrupt the slave's databases. So stop. */ file->error= -1; } DBUG_RETURN(res); }
O3
cpp
Log_event::read_log_event(st_io_cache*, Format_description_log_event const*, char): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %r13d movq %rsi, %r12 movq %rdi, %r14 leaq 0x32aed5(%rip), %rax # 0x373050 leaq -0x48(%rbp), %rbx movq %rax, -0x8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) xorl %eax, %eax movq %rax, 0xe(%rbx) movq %rax, -0x30(%rbp) leaq -0x50(%rbp), %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x47ca8 addl $0x9, %eax cmpl $0x9, %eax ja 0x481c5 xorl %r15d, %r15d leaq 0x70199(%rip), %rcx # 0xb834c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x7196b(%rip), %rsi # 0xb9b2e jmp 0x48242 leaq 0x7197b(%rip), %rsi # 0xb9b47 jmp 0x48242 leaq 0x71930(%rip), %rsi # 0xb9b05 jmp 0x48242 leaq 0x71919(%rip), %rsi # 0xb9af7 jmp 0x48245 movq -0x48(%rbp), %rdi movl -0x40(%rbp), %esi movsbl %r13b, %r8d leaq -0x30(%rbp), %rdx movq %r12, %rcx callq 0x3d796 movq %rax, %r15 testq %rax, %rax je 0x4821a movq -0x48(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0xe(%rbx) movq %rax, 0x10(%r15) movb $0x1, 0x18(%r15) movq -0x30(%rbp), %rsi testq %rsi, %rsi je 0x482df jmp 0x48245 leaq 0x718f0(%rip), %rsi # 0xb9b20 jmp 0x48242 leaq 0x718d7(%rip), %rsi # 0xb9b10 jmp 0x48242 leaq 0x70d64(%rip), %rsi # 0xb8fa6 xorl %r15d, %r15d cmpb $0x0, 0x39e579(%rip) # 0x3e67c5 je 0x482a5 movl 0x39e55c(%rip), %edi # 0x3e67b0 movl $0x90, %esi movl $0x18, %edx callq 0x84505 movq %rax, %r15 xorl %eax, %eax movq %rax, 0x10(%r15) movq %rax, 0x20(%r15) movw $0x0, 0x44(%r15) leaq 0x32add2(%rip), %rcx # 0x373050 movq %rcx, 0x68(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x70(%r15) movq %rax, 0x7e(%r15) leaq 0x313efb(%rip), %rax # 0x35c190 movq %rax, (%r15) movl $0x1, 0x8c(%r15) jmp 0x482df cmpl $0xd, -0x40(%rbp) jb 0x482c6 movq -0x48(%rbp), %rax movl 0x9(%rax), %edx movzbl 0x4(%rax), %ecx leaq 0x71899(%rip), %rdi # 0xb9b56 xorl %eax, %eax callq 0x40446 jmp 0x482d4 leaq 0x718d3(%rip), %rdi # 0xb9ba0 xorl %eax, %eax callq 0x40446 movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF movq %rbx, %rdi callq 0x57a1e movq %r15, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbx, %rdi callq 0x57a1e movq %r14, %rdi callq 0x3a740
_ZN9Log_event14read_log_eventEP11st_io_cachePK28Format_description_log_eventc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13d, edx mov r12, rsi mov r14, rdi lea rax, my_charset_bin lea rbx, [rbp+var_48] mov [rbx-8], rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 xor eax, eax mov [rbx+0Eh], rax mov qword ptr [rbp+var_30], rax lea rsi, [rbp+var_50] mov rdx, r12 xor ecx, ecx call _ZN9Log_event14read_log_eventEP11st_io_cacheP6StringPK28Format_description_log_event24enum_binlog_checksum_alg; Log_event::read_log_event(st_io_cache *,String *,Format_description_log_event const*,enum_binlog_checksum_alg) add eax, 9; switch 10 cases cmp eax, 9 ja short def_481BA; jumptable 00000000000481BA default case, cases -8,-4 xor r15d, r15d lea rcx, jpt_481BA movsxd rax, ds:(jpt_481BA - 0B834Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_481BC: lea rsi, aEventDecryptio; jumptable 00000000000481BA case -9 jmp short loc_48242 def_481BA: lea rsi, aInternalError; jumptable 00000000000481BA default case, cases -8,-4 jmp short loc_48242 loc_481CE: lea rsi, aReadError; jumptable 00000000000481BA case -3 jmp short loc_48242 loc_481D7: lea rsi, aEventInvalid; jumptable 00000000000481BA case -2 jmp short loc_48245 loc_481E0: mov rdi, [rbp+var_48]; jumptable 00000000000481BA case 0 mov esi, dword ptr [rbp+var_40]; unsigned __int8 * movsx r8d, r13b; Format_description_log_event * lea rdx, [rbp+var_30]; unsigned int mov rcx, r12; char ** call _ZN9Log_event14read_log_eventEPKhjPPKcPK28Format_description_log_eventc; Log_event::read_log_event(uchar const*,uint,char const**,Format_description_log_event const*,char) mov r15, rax test rax, rax jz short loc_4821A mov rax, [rbp+var_48] xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+0Eh], 0 mov [r15+10h], rax mov byte ptr [r15+18h], 1 loc_4821A: mov rsi, qword ptr [rbp+var_30] test rsi, rsi jz loc_482DF; jumptable 00000000000481BA case -1 jmp short loc_48245 loc_48229: lea rsi, aEventTooBig; jumptable 00000000000481BA case -7 jmp short loc_48242 loc_48232: lea rsi, aEventTruncated; jumptable 00000000000481BA case -6 jmp short loc_48242 loc_4823B: lea rsi, aOutOfMemory; jumptable 00000000000481BA case -5 loc_48242: xor r15d, r15d loc_48245: cmp cs:_ZL9force_opt, 0; force_opt jz short loc_482A5 mov edi, cs:key_memory_log_event mov esi, 90h mov edx, 18h call my_malloc mov r15, rax xor eax, eax mov [r15+10h], rax mov [r15+20h], rax mov word ptr [r15+44h], 0 lea rcx, my_charset_bin mov [r15+68h], rcx xorps xmm0, xmm0 movups xmmword ptr [r15+70h], xmm0 mov [r15+7Eh], rax lea rax, off_35C190 mov [r15], rax mov dword ptr [r15+8Ch], 1 jmp short loc_482DF; jumptable 00000000000481BA case -1 loc_482A5: cmp dword ptr [rbp+var_40], 0Dh jb short loc_482C6 mov rax, [rbp+var_48] mov edx, [rax+9] movzx ecx, byte ptr [rax+4] lea rdi, aErrorInLogEven; "Error in Log_event::read_log_event(): '"... xor eax, eax call _ZL15sql_print_errorPKcz; sql_print_error(char const*,...) jmp short loc_482D4 loc_482C6: lea rdi, aErrorInLogEven_0; "Error in Log_event::read_log_event(): '"... xor eax, eax call _ZL15sql_print_errorPKcz; sql_print_error(char const*,...) loc_482D4: mov dword ptr [r14+0E4h], 0FFFFFFFFh loc_482DF: mov rdi, rbx; jumptable 00000000000481BA case -1 call _ZN13Binary_stringD2Ev; Binary_string::~Binary_string() mov rax, r15 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbx; this call _ZN13Binary_stringD2Ev; Binary_string::~Binary_string() mov rdi, r14 call __Unwind_Resume
long long Log_event::read_log_event( long long a1, const char **a2, char a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { __m128 v12; // xmm0 long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long log_event; // r15 const char *v20; // rsi Log_event *v21; // rax void *v23; // [rsp+0h] [rbp-50h] BYREF Log_event *v24[3]; // [rsp+8h] [rbp-48h] BYREF unsigned int v25[2]; // [rsp+20h] [rbp-30h] BYREF v23 = &my_charset_bin; v12 = 0LL; memset(v24, 0, 22); *(_QWORD *)v25 = 0LL; log_event = 0LL; switch ( (unsigned int)Log_event::read_log_event(a1, (long long)&v23, (long long)a2, 0) ) { case 0xFFFFFFF7: v20 = "Event decryption failure"; goto LABEL_13; case 0xFFFFFFF9: v20 = "Event too big"; goto LABEL_13; case 0xFFFFFFFA: v20 = "Event truncated"; goto LABEL_13; case 0xFFFFFFFB: v20 = "Out of memory"; goto LABEL_13; case 0xFFFFFFFD: v20 = "read error"; goto LABEL_13; case 0xFFFFFFFE: v20 = "Event invalid"; goto LABEL_14; case 0xFFFFFFFF: goto LABEL_20; case 0u: log_event = Log_event::read_log_event( v24[0], (const unsigned __int8 *)LODWORD(v24[1]), v25, a2, (const Format_description_log_event *)(unsigned int)a3); if ( log_event ) { v21 = v24[0]; v12 = 0LL; memset(v24, 0, 22); *(_QWORD *)(log_event + 16) = v21; *(_BYTE *)(log_event + 24) = 1; } v20 = *(const char **)v25; if ( *(_QWORD *)v25 ) goto LABEL_14; goto LABEL_20; default: v20 = "internal error"; LABEL_13: log_event = 0LL; LABEL_14: if ( force_opt ) { log_event = my_malloc((unsigned int)key_memory_log_event, 144LL); *(_QWORD *)(log_event + 16) = 0LL; *(_QWORD *)(log_event + 32) = 0LL; *(_WORD *)(log_event + 68) = 0; *(_QWORD *)(log_event + 104) = &my_charset_bin; *(_OWORD *)(log_event + 112) = 0LL; *(_QWORD *)(log_event + 126) = 0LL; *(_QWORD *)log_event = &off_35C190; *(_DWORD *)(log_event + 140) = 1; } else { if ( LODWORD(v24[1]) < 0xD ) sql_print_error( "Error in Log_event::read_log_event(): '%s'", (long long)v20, v13, v14, v15, v16, v12, a5, a6, a7, v17, v18, a10, a11, (char)v23); else sql_print_error( "Error in Log_event::read_log_event(): '%s', data_len: %lu, event_type: %u", (long long)v20, *(unsigned int *)((char *)v24[0] + 9), *((unsigned __int8 *)v24[0] + 4), v15, v16, v12, a5, a6, a7, v17, v18, a10, a11, (char)v23); *(_DWORD *)(a1 + 228) = -1; } LABEL_20: Binary_string::~Binary_string((Binary_string *)v24); return log_event; } }
read_log_event: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13D,EDX MOV R12,RSI MOV R14,RDI LEA RAX,[0x473050] LEA RBX,[RBP + -0x48] MOV qword ptr [RBX + -0x8],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 XOR EAX,EAX MOV qword ptr [RBX + 0xe],RAX MOV qword ptr [RBP + -0x30],RAX LAB_00148193: LEA RSI,[RBP + -0x50] MOV RDX,R12 XOR ECX,ECX CALL 0x00147ca8 ADD EAX,0x9 CMP EAX,0x9 JA 0x001481c5 XOR R15D,R15D LEA RCX,[0x1b834c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fffffff7: LEA RSI,[0x1b9b2e] JMP 0x00148242 caseD_fffffff8: LEA RSI,[0x1b9b47] JMP 0x00148242 caseD_fffffffd: LEA RSI,[0x1b9b05] JMP 0x00148242 caseD_fffffffe: LEA RSI,[0x1b9af7] JMP 0x00148245 caseD_0: MOV RDI,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x40] MOVSX R8D,R13B LEA RDX,[RBP + -0x30] MOV RCX,R12 CALL 0x0013d796 MOV R15,RAX TEST RAX,RAX JZ 0x0014821a MOV RAX,qword ptr [RBP + -0x48] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0xe],0x0 MOV qword ptr [R15 + 0x10],RAX MOV byte ptr [R15 + 0x18],0x1 LAB_0014821a: MOV RSI,qword ptr [RBP + -0x30] TEST RSI,RSI JZ 0x001482df JMP 0x00148245 caseD_fffffff9: LEA RSI,[0x1b9b20] JMP 0x00148242 caseD_fffffffa: LEA RSI,[0x1b9b10] JMP 0x00148242 caseD_fffffffb: LEA RSI,[0x1b8fa6] LAB_00148242: XOR R15D,R15D LAB_00148245: CMP byte ptr [0x004e67c5],0x0 JZ 0x001482a5 MOV EDI,dword ptr [0x004e67b0] MOV ESI,0x90 MOV EDX,0x18 CALL 0x00184505 LAB_00148263: MOV R15,RAX XOR EAX,EAX MOV qword ptr [R15 + 0x10],RAX MOV qword ptr [R15 + 0x20],RAX MOV word ptr [R15 + 0x44],0x0 LEA RCX,[0x473050] MOV qword ptr [R15 + 0x68],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x70],XMM0 MOV qword ptr [R15 + 0x7e],RAX LEA RAX,[0x45c190] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8c],0x1 JMP 0x001482df LAB_001482a5: CMP dword ptr [RBP + -0x40],0xd JC 0x001482c6 MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RAX + 0x9] MOVZX ECX,byte ptr [RAX + 0x4] LEA RDI,[0x1b9b56] XOR EAX,EAX CALL 0x00140446 JMP 0x001482d4 LAB_001482c6: LEA RDI,[0x1b9ba0] XOR EAX,EAX CALL 0x00140446 LAB_001482d4: MOV dword ptr [R14 + 0xe4],0xffffffff caseD_ffffffff: MOV RDI,RBX CALL 0x00157a1e MOV RAX,R15 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Log_event::read_log_event(st_io_cache*, Format_description_log_event const*, char) */ int8 * Log_event::read_log_event(st_io_cache *param_1,Format_description_log_event *param_2,char param_3) { uchar *puVar1; int4 uVar2; int8 *puVar3; char *pcVar4; int4 *local_58; uchar *local_50; uint uStack_48; int2 uStack_44; int2 uStack_42; int6 uStack_40; char *local_38; local_58 = &my_charset_bin; local_50 = (uchar *)0x0; uStack_48 = 0; uStack_44 = 0; uStack_42 = 0; uStack_40 = 0; local_38 = (char *)0x0; /* try { // try from 00148193 to 00148262 has its CatchHandler @ 001482f9 */ uVar2 = read_log_event(param_1,&local_58,param_2,0); puVar3 = (int8 *)0x0; switch(uVar2) { case 0: puVar3 = (int8 *)read_log_event(local_50,uStack_48,&local_38,param_2,param_3); puVar1 = local_50; if (puVar3 != (int8 *)0x0) { local_50 = (uchar *)0x0; uStack_48 = 0; uStack_44 = 0; uStack_42 = 0; uStack_40 = 0; puVar3[2] = puVar1; *(int1 *)(puVar3 + 3) = 1; } pcVar4 = local_38; if (local_38 == (char *)0x0) goto switchD_001481ba_caseD_ffffffff; goto LAB_00148245; case 0xfffffff7: pcVar4 = "Event decryption failure"; break; default: pcVar4 = "internal error"; break; case 0xfffffff9: pcVar4 = "Event too big"; break; case 0xfffffffa: pcVar4 = "Event truncated"; break; case 0xfffffffb: pcVar4 = "Out of memory"; break; case 0xfffffffd: pcVar4 = "read error"; break; case 0xfffffffe: pcVar4 = "Event invalid"; goto LAB_00148245; case 0xffffffff: goto switchD_001481ba_caseD_ffffffff; } puVar3 = (int8 *)0x0; LAB_00148245: if (force_opt == '\0') { if (uStack_48 < 0xd) { sql_print_error("Error in Log_event::read_log_event(): \'%s\'",pcVar4); } else { sql_print_error("Error in Log_event::read_log_event(): \'%s\', data_len: %lu, event_type: %u", pcVar4,(ulong)*(uint *)(local_50 + 9),(ulong)local_50[4]); } *(int4 *)(param_1 + 0xe4) = 0xffffffff; } else { puVar3 = (int8 *)my_malloc(key_memory_log_event,0x90,0x18); puVar3[2] = 0; puVar3[4] = 0; *(int2 *)((long)puVar3 + 0x44) = 0; puVar3[0xd] = &my_charset_bin; puVar3[0xe] = 0; puVar3[0xf] = 0; *(int8 *)((long)puVar3 + 0x7e) = 0; *puVar3 = &PTR_print_0045c190; *(int4 *)((long)puVar3 + 0x8c) = 1; } switchD_001481ba_caseD_ffffffff: Binary_string::~Binary_string((Binary_string *)&local_50); return puVar3; }
29,033
mark_eval_captured_variables
bluesky950520[P]quickjs/quickjs.c
static void mark_eval_captured_variables(JSContext *ctx, JSFunctionDef *s, int scope_level) { int idx; JSVarDef *vd; for (idx = s->scopes[scope_level].first; idx >= 0;) { vd = &s->vars[idx]; vd->is_captured = 1; idx = vd->scope_next; } }
O0
c
mark_eval_captured_variables: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movl %edx, -0x14(%rsp) movq -0x10(%rsp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rsp), %rcx movl 0x4(%rax,%rcx,8), %eax movl %eax, -0x18(%rsp) cmpl $0x0, -0x18(%rsp) jl 0xb7baa movq -0x10(%rsp), %rax movq 0x90(%rax), %rax movslq -0x18(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax movl 0xc(%rax), %ecx andl $-0x5, %ecx orl $0x4, %ecx movl %ecx, 0xc(%rax) movq -0x20(%rsp), %rax movl 0x8(%rax), %eax movl %eax, -0x18(%rsp) jmp 0xb7b67 retq nopl (%rax,%rax)
mark_eval_captured_variables: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_14], edx mov rax, [rsp+var_10] mov rax, [rax+0F8h] movsxd rcx, [rsp+var_14] mov eax, [rax+rcx*8+4] mov [rsp+var_18], eax loc_B7B67: cmp [rsp+var_18], 0 jl short locret_B7BAA mov rax, [rsp+var_10] mov rax, [rax+90h] movsxd rcx, [rsp+var_18] shl rcx, 4 add rax, rcx mov [rsp+var_20], rax mov rax, [rsp+var_20] mov ecx, [rax+0Ch] and ecx, 0FFFFFFFBh or ecx, 4 mov [rax+0Ch], ecx mov rax, [rsp+var_20] mov eax, [rax+8] mov [rsp+var_18], eax jmp short loc_B7B67 locret_B7BAA: retn
long long mark_eval_captured_variables(long long a1, long long a2, int a3) { long long result; // rax long long v4; // [rsp+0h] [rbp-20h] int i; // [rsp+8h] [rbp-18h] result = *(unsigned int *)(*(_QWORD *)(a2 + 248) + 8LL * a3 + 4); for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 248) + 8LL * a3 + 4); i >= 0; i = *(_DWORD *)(v4 + 8) ) { v4 = 16LL * i + *(_QWORD *)(a2 + 144); *(_DWORD *)(v4 + 12) = *(_DWORD *)(v4 + 12) & 0xFFFFFFFB | 4; result = *(unsigned int *)(v4 + 8); } return result; }
mark_eval_captured_variables: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV dword ptr [RSP + -0x14],EDX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + -0x14] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4] MOV dword ptr [RSP + -0x18],EAX LAB_001b7b67: CMP dword ptr [RSP + -0x18],0x0 JL 0x001b7baa MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x20] MOV ECX,dword ptr [RAX + 0xc] AND ECX,0xfffffffb OR ECX,0x4 MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RSP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + -0x18],EAX JMP 0x001b7b67 LAB_001b7baa: RET
void mark_eval_captured_variables(int8 param_1,long param_2,int param_3) { long lVar1; int4 local_18; local_18 = *(int *)(*(long *)(param_2 + 0xf8) + 4 + (long)param_3 * 8); while (-1 < local_18) { lVar1 = *(long *)(param_2 + 0x90) + (long)local_18 * 0x10; *(uint *)(lVar1 + 0xc) = *(uint *)(lVar1 + 0xc) & 0xfffffffb | 4; local_18 = *(int *)(lVar1 + 8); } return; }
29,034
mark_eval_captured_variables
bluesky950520[P]quickjs/quickjs.c
static void mark_eval_captured_variables(JSContext *ctx, JSFunctionDef *s, int scope_level) { int idx; JSVarDef *vd; for (idx = s->scopes[scope_level].first; idx >= 0;) { vd = &s->vars[idx]; vd->is_captured = 1; idx = vd->scope_next; } }
O2
c
mark_eval_captured_variables: movq 0xf8(%rdi), %rax movl %esi, %ecx leaq (%rax,%rcx,8), %rax addq $0x4, %rax movslq (%rax), %rax testq %rax, %rax js 0x5b6f9 movq 0x90(%rdi), %rcx shlq $0x4, %rax addq %rcx, %rax addq $0x8, %rax orl $0x4, 0x4(%rax) jmp 0x5b6d9 retq
mark_eval_captured_variables: mov rax, [rdi+0F8h] mov ecx, esi lea rax, [rax+rcx*8] add rax, 4 loc_5B6D9: movsxd rax, dword ptr [rax] test rax, rax js short locret_5B6F9 mov rcx, [rdi+90h] shl rax, 4 add rax, rcx add rax, 8 or dword ptr [rax+4], 4 jmp short loc_5B6D9 locret_5B6F9: retn
long long mark_eval_captured_variables(long long a1, unsigned int a2) { int *i; // rax long long result; // rax for ( i = (int *)(*(_QWORD *)(a1 + 248) + 8LL * a2 + 4); ; i[1] |= 4u ) { result = *i; if ( result < 0 ) break; i = (int *)(*(_QWORD *)(a1 + 144) + 16 * result + 8); } return result; }
mark_eval_captured_variables: MOV RAX,qword ptr [RDI + 0xf8] MOV ECX,ESI LEA RAX,[RAX + RCX*0x8] ADD RAX,0x4 LAB_0015b6d9: MOVSXD RAX,dword ptr [RAX] TEST RAX,RAX JS 0x0015b6f9 MOV RCX,qword ptr [RDI + 0x90] SHL RAX,0x4 ADD RAX,RCX ADD RAX,0x8 OR dword ptr [RAX + 0x4],0x4 JMP 0x0015b6d9 LAB_0015b6f9: RET
void mark_eval_captured_variables(long param_1,uint param_2) { uint *puVar1; int *piVar2; long lVar3; piVar2 = (int *)(*(long *)(param_1 + 0xf8) + (ulong)param_2 * 8 + 4); while (-1 < (long)*piVar2) { lVar3 = (long)*piVar2 * 0x10 + *(long *)(param_1 + 0x90); puVar1 = (uint *)(lVar3 + 0xc); *puVar1 = *puVar1 | 4; piVar2 = (int *)(lVar3 + 8); } return; }
29,035
llava_image_embed_make_with_filename
monkey531[P]llama/examples/llava/llava.cpp
struct llava_image_embed * llava_image_embed_make_with_filename(struct clip_ctx * ctx_clip, int n_threads, const char * image_path) { unsigned char* image_bytes; long image_bytes_length; auto loaded = load_file_to_bytes(image_path, &image_bytes, &image_bytes_length); if (!loaded) { LOG_ERR("%s: failed to load %s\n", __func__, image_path); return NULL; } llava_image_embed *embed = llava_image_embed_make_with_bytes(ctx_clip, n_threads, image_bytes, image_bytes_length); free(image_bytes); return embed; }
O3
cpp
llava_image_embed_make_with_filename: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r15 leaq 0xe5dba(%rip), %rsi # 0x10d505 movq %rdx, %rdi callq 0x1de60 testq %rax, %rax je 0x2780c movq %rax, %r14 movq %rax, %rdi xorl %esi, %esi movl $0x2, %edx callq 0x1ddb0 movq %r14, %rdi callq 0x1d030 movq %rax, %r12 movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1ddb0 movq %r12, %rdi callq 0x1e010 testq %rax, %rax je 0x27830 movq %rax, %r13 movl %ebp, 0xc(%rsp) movq %rbx, 0x10(%rsp) callq 0x1d070 movq %rax, %rbx movl $0x0, (%rax) movl $0x1, %esi movq %r13, %rdi movq %r12, %rdx movq %r14, %rcx callq 0x1e270 movq %rax, %rbp movq %r14, %rdi callq 0x1e7f0 testl %eax, %eax jne 0x2786b cmpq %r12, %rbp jne 0x2787b movq %r14, %rdi callq 0x1dc10 movq %r15, %rdi movl 0xc(%rsp), %esi movq %r13, %rdx movl %r12d, %ecx callq 0x27690 movq %rax, %rbx movq %r13, %rdi callq 0x1de80 movq %rbx, %rax jmp 0x278af movq 0x12e775(%rip), %rax # 0x155f88 movq (%rax), %rdi leaq 0xe22ca(%rip), %rsi # 0x109ae7 leaq 0xe22db(%rip), %rdx # 0x109aff movq %rbx, %rcx xorl %eax, %eax callq 0x1e1e0 jmp 0x2788b movq 0x12e751(%rip), %rax # 0x155f88 movq (%rax), %rdi leaq 0xe22d1(%rip), %rsi # 0x109b12 leaq 0xe22b7(%rip), %rdx # 0x109aff movq %r12, %rcx movq %rbx, %r8 xorl %eax, %eax callq 0x1e1e0 leaq 0xe22e1(%rip), %rdi # 0x109b3d callq 0x1d9f0 movq %r14, %rdi callq 0x1dc10 jmp 0x2788b movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1eca2 jmp 0x27886 movq %r13, %rdi movq %r14, %rsi callq 0x1ece7 movq 0x10(%rsp), %rbx movq 0x12e6f6(%rip), %rax # 0x155f88 movq (%rax), %rdi leaq 0xe2048(%rip), %rsi # 0x1098e4 leaq 0xe2058(%rip), %rdx # 0x1098fb movq %rbx, %rcx xorl %eax, %eax callq 0x1e1e0 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
llava_image_embed_make_with_filename: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov ebp, esi mov r15, rdi lea rsi, aCrb+2; "rb" mov rdi, rdx call _fopen test rax, rax jz loc_2780C mov r14, rax mov rdi, rax xor esi, esi mov edx, 2 call _fseek mov rdi, r14 call _ftell mov r12, rax mov rdi, r14 xor esi, esi xor edx, edx call _fseek mov rdi, r12 call _malloc test rax, rax jz loc_27830 mov r13, rax mov [rsp+48h+var_3C], ebp mov [rsp+48h+var_38], rbx call ___errno_location mov rbx, rax mov dword ptr [rax], 0 mov esi, 1 mov rdi, r13 mov rdx, r12 mov rcx, r14 call _fread mov rbp, rax mov rdi, r14 call _ferror test eax, eax jnz loc_2786B cmp rbp, r12 jnz loc_2787B mov rdi, r14 call _fclose mov rdi, r15; int mov esi, [rsp+48h+var_3C] mov rdx, r13 mov ecx, r12d call llava_image_embed_make_with_bytes mov rbx, rax mov rdi, r13 call _free mov rax, rbx jmp loc_278AF loc_2780C: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSCanTReadFileS; "%s: can't read file %s\n" lea rdx, aLoadFileToByte; "load_file_to_bytes" mov rcx, rbx xor eax, eax call _fprintf jmp short loc_2788B loc_27830: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToAlloc; "%s: failed to alloc %ld bytes for file "... lea rdx, aLoadFileToByte; "load_file_to_bytes" mov rcx, r12 mov r8, rbx xor eax, eax call _fprintf lea rdi, aMemoryAllocati; "Memory allocation error" call _perror mov rdi, r14 call _fclose jmp short loc_2788B loc_2786B: mov rdi, rbx mov rsi, r13 mov rdx, r14 call llava_image_embed_make_with_filename_cold_1 jmp short loc_27886 loc_2787B: mov rdi, r13 mov rsi, r14 call llava_image_embed_make_with_filename_cold_2 loc_27886: mov rbx, [rsp+48h+var_38] loc_2788B: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToLoadS; "%s: failed to load %s\n" lea rdx, aLlavaImageEmbe_2; "llava_image_embed_make_with_filename" mov rcx, rbx xor eax, eax call _fprintf xor eax, eax loc_278AF: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long llava_image_embed_make_with_filename(long long a1, int a2, const char *a3) { const char *v3; // rbx long long v4; // rax long long v5; // r14 long long v6; // r12 long long v7; // rax long long v8; // r13 unsigned int *v9; // rbx long long v10; // rbp long long v11; // rbx const char *v13; // [rsp+10h] [rbp-38h] v3 = a3; v4 = fopen(a3, "rb"); if ( v4 ) { v5 = v4; fseek(v4, 0LL, 2LL); v6 = ftell(v5); fseek(v5, 0LL, 0LL); v7 = malloc(v6); if ( v7 ) { v8 = v7; v13 = v3; v9 = (unsigned int *)__errno_location(); *v9 = 0; v10 = fread(v8, 1LL, v6, v5); if ( (unsigned int)ferror(v5) ) { llava_image_embed_make_with_filename_cold_1(v9, v8, v5); } else { if ( v10 == v6 ) { fclose(v5); v11 = llava_image_embed_make_with_bytes(a1, a2, v8, v6); free(v8); return v11; } llava_image_embed_make_with_filename_cold_2(v8, v5); } v3 = v13; } else { fprintf(stderr, "%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes", v6, v3); perror("Memory allocation error"); fclose(v5); } } else { fprintf(stderr, "%s: can't read file %s\n", "load_file_to_bytes", v3); } fprintf(stderr, "%s: failed to load %s\n", "llava_image_embed_make_with_filename", v3); return 0LL; }
llava_image_embed_make_with_filename: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV EBP,ESI MOV R15,RDI LEA RSI,[0x20d505] MOV RDI,RDX CALL 0x0011de60 TEST RAX,RAX JZ 0x0012780c MOV R14,RAX MOV RDI,RAX XOR ESI,ESI MOV EDX,0x2 CALL 0x0011ddb0 MOV RDI,R14 CALL 0x0011d030 MOV R12,RAX MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x0011ddb0 MOV RDI,R12 CALL 0x0011e010 TEST RAX,RAX JZ 0x00127830 MOV R13,RAX MOV dword ptr [RSP + 0xc],EBP MOV qword ptr [RSP + 0x10],RBX CALL 0x0011d070 MOV RBX,RAX MOV dword ptr [RAX],0x0 MOV ESI,0x1 MOV RDI,R13 MOV RDX,R12 MOV RCX,R14 CALL 0x0011e270 MOV RBP,RAX MOV RDI,R14 CALL 0x0011e7f0 TEST EAX,EAX JNZ 0x0012786b CMP RBP,R12 JNZ 0x0012787b MOV RDI,R14 CALL 0x0011dc10 MOV RDI,R15 MOV ESI,dword ptr [RSP + 0xc] MOV RDX,R13 MOV ECX,R12D CALL 0x00127690 MOV RBX,RAX MOV RDI,R13 CALL 0x0011de80 MOV RAX,RBX JMP 0x001278af LAB_0012780c: MOV RAX,qword ptr [0x00255f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x209ae7] LEA RDX,[0x209aff] MOV RCX,RBX XOR EAX,EAX CALL 0x0011e1e0 JMP 0x0012788b LAB_00127830: MOV RAX,qword ptr [0x00255f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x209b12] LEA RDX,[0x209aff] MOV RCX,R12 MOV R8,RBX XOR EAX,EAX CALL 0x0011e1e0 LEA RDI,[0x209b3d] CALL 0x0011d9f0 MOV RDI,R14 CALL 0x0011dc10 JMP 0x0012788b LAB_0012786b: MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011eca2 JMP 0x00127886 LAB_0012787b: MOV RDI,R13 MOV RSI,R14 CALL 0x0011ece7 LAB_00127886: MOV RBX,qword ptr [RSP + 0x10] LAB_0012788b: MOV RAX,qword ptr [0x00255f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x2098e4] LEA RDX,[0x2098fb] MOV RCX,RBX XOR EAX,EAX CALL 0x0011e1e0 XOR EAX,EAX LAB_001278af: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 llava_image_embed_make_with_filename(int8 param_1,int4 param_2,char *param_3) { int iVar1; FILE *__stream; size_t __size; void *__ptr; int *piVar2; size_t sVar3; int8 uVar4; __stream = fopen(param_3,"rb"); if (__stream == (FILE *)0x0) { fprintf(*(FILE **)PTR_stderr_00255f88,"%s: can\'t read file %s\n","load_file_to_bytes",param_3); } else { fseek(__stream,0,2); __size = ftell(__stream); fseek(__stream,0,0); __ptr = malloc(__size); if (__ptr == (void *)0x0) { fprintf(*(FILE **)PTR_stderr_00255f88,"%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes",__size,param_3); perror("Memory allocation error"); fclose(__stream); } else { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = fread(__ptr,1,__size,__stream); iVar1 = ferror(__stream); if (iVar1 == 0) { if (sVar3 == __size) { fclose(__stream); uVar4 = llava_image_embed_make_with_bytes(param_1,param_2,__ptr,__size & 0xffffffff); free(__ptr); return uVar4; } llava_image_embed_make_with_filename_cold_2(__ptr,__stream); } else { llava_image_embed_make_with_filename_cold_1(piVar2,__ptr,__stream); } } } fprintf(*(FILE **)PTR_stderr_00255f88,"%s: failed to load %s\n", "llava_image_embed_make_with_filename",param_3); return 0; }
29,036
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0xdbe75 leaq 0xbad618(%rip), %rdi # 0xc89494 leaq -0xae3(%rip), %rsi # 0xdb3a0 callq 0x2a220 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xdb660 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0xdbed2 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xdb9f0 movq %rax, -0x258(%rbp) jmp 0xdbedd xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0xdbedd movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0xdbf40 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xdbf40 leaq -0x220(%rbp), %rdi callq 0xdb060 movq %rax, %rdi leaq 0x7de21(%rip), %rsi # 0x159d3d callq 0x2a720 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0xf1ba0 jmp 0xdbf42 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdbf72 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
my_charset_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_234], edx mov [rbp+var_240], rcx jmp short $+2 loc_DBE75: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov esi, [rbp+var_234] mov rdx, [rbp+var_240] call get_charset_number mov [rbp+var_244], eax cmp [rbp+var_244], 0 jz short loc_DBED2 mov rdi, [rbp+var_228] mov esi, [rbp+var_244] mov rdx, [rbp+var_240] call get_internal_charset mov [rbp+var_258], rax jmp short loc_DBEDD loc_DBED2: xor eax, eax mov [rbp+var_258], rax jmp short $+2 loc_DBEDD: mov rax, [rbp+var_258] mov [rbp+var_250], rax cmp [rbp+var_250], 0 jnz short loc_DBF40 mov rax, [rbp+var_240] and rax, 10h cmp rax, 0 jz short loc_DBF40 lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_DBF40: jmp short $+2 loc_DBF42: mov rax, [rbp+var_250] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DBF72 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_DBF72: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { long long charsets_dir; // rax int v5; // r8d int v6; // r9d long long internal_charset; // [rsp+8h] [rbp-258h] unsigned int charset_number; // [rsp+1Ch] [rbp-244h] _BYTE v12[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v13; // [rsp+258h] [rbp-8h] v13 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( !internal_charset && (a4 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v12); stpcpy(charsets_dir, "Index.xml"); my_error(22, 4, a2, (unsigned int)v12, v5, v6); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV dword ptr [RBP + -0x234],EDX MOV qword ptr [RBP + -0x240],RCX JMP 0x001dbe75 LAB_001dbe75: LEA RDI,[0xd89494] LEA RSI,[0x1db3a0] CALL 0x0012a220 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,dword ptr [RBP + -0x234] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001db660 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JZ 0x001dbed2 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001db9f0 MOV qword ptr [RBP + -0x258],RAX JMP 0x001dbedd LAB_001dbed2: XOR EAX,EAX MOV qword ptr [RBP + -0x258],RAX JMP 0x001dbedd LAB_001dbedd: MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x0 JNZ 0x001dbf40 MOV RAX,qword ptr [RBP + -0x240] AND RAX,0x10 CMP RAX,0x0 JZ 0x001dbf40 LEA RDI,[RBP + -0x220] CALL 0x001db060 MOV RDI,RAX LEA RSI,[0x259d3d] CALL 0x0012a720 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x001f1ba0 LAB_001dbf40: JMP 0x001dbf42 LAB_001dbf42: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dbf72 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_001dbf72: CALL 0x0012a250
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; char *__dest; long in_FS_OFFSET; long local_260; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { local_260 = 0; } else { local_260 = get_internal_charset(param_1,iVar1,param_4); } if ((local_260 == 0) && ((param_4 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x16,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_260; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
29,037
sp_get_polygon_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_linear_rings; uint n_points; n_linear_rings = uint4korr((*wkb)); (*wkb) += 4; for (; n_linear_rings > 0; --n_linear_rings) { n_points = uint4korr((*wkb)); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } } return 0; }
O3
c
sp_get_polygon_mbr: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movl (%rcx), %eax addq $0x4, %rcx movq %rcx, (%rdi) testl %eax, %eax je 0x8ed34 addq $-0x8, %rsi movq (%rdi), %r8 movl (%r8), %ecx addq $0x4, %r8 movq %r8, (%rdi) testl %ecx, %ecx je 0x8ed30 movb $0x1, %r8b xorl %r9d, %r9d movq (%rdi), %r10 cmpq %rsi, %r10 ja 0x8ed38 movsd (%r10), %xmm0 addq $0x8, %r10 movq %r10, (%rdi) movsd (%rdx,%r9), %xmm1 ucomisd %xmm0, %xmm1 jbe 0x8ed07 movsd %xmm0, (%rdx,%r9) ucomisd 0x8(%rdx,%r9), %xmm0 jbe 0x8ed1a orq $0x8, %r9 movsd %xmm0, (%rdx,%r9) movl $0x10, %r9d testb $0x1, %r8b movl $0x0, %r8d jne 0x8ece1 decl %ecx jne 0x8ecdb decl %eax jne 0x8ecca xorl %eax, %eax jmp 0x8ed3d movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq nop
sp_get_polygon_mbr_0: push rbp mov rbp, rsp mov rcx, [rdi] mov eax, [rcx] add rcx, 4 mov [rdi], rcx test eax, eax jz short loc_8ED34 add rsi, 0FFFFFFFFFFFFFFF8h loc_8ECCA: mov r8, [rdi] mov ecx, [r8] add r8, 4 mov [rdi], r8 test ecx, ecx jz short loc_8ED30 loc_8ECDB: mov r8b, 1 xor r9d, r9d loc_8ECE1: mov r10, [rdi] cmp r10, rsi ja short loc_8ED38 movsd xmm0, qword ptr [r10] add r10, 8 mov [rdi], r10 movsd xmm1, qword ptr [rdx+r9] ucomisd xmm1, xmm0 jbe short loc_8ED07 movsd qword ptr [rdx+r9], xmm0 loc_8ED07: ucomisd xmm0, qword ptr [rdx+r9+8] jbe short loc_8ED1A or r9, 8 movsd qword ptr [rdx+r9], xmm0 loc_8ED1A: mov r9d, 10h test r8b, 1 mov r8d, 0 jnz short loc_8ECE1 dec ecx jnz short loc_8ECDB loc_8ED30: dec eax jnz short loc_8ECCA loc_8ED34: xor eax, eax jmp short loc_8ED3D loc_8ED38: mov eax, 0FFFFFFFFh loc_8ED3D: pop rbp retn
long long sp_get_polygon_mbr_0(double **a1, long long a2, long long a3) { int v3; // eax unsigned long long v4; // rsi int v5; // ecx char v6; // r8 long long v7; // r9 double *v8; // r10 double v9; // xmm0_8 bool v10; // zf v3 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v3 ) { v4 = a2 - 8; do { v5 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v5 ) { while ( 2 ) { v6 = 1; v7 = 0LL; do { v8 = *a1; if ( (unsigned long long)*a1 > v4 ) return 0xFFFFFFFFLL; v9 = *v8; *a1 = v8 + 1; if ( *(double *)(a3 + v7) > v9 ) *(double *)(a3 + v7) = v9; if ( v9 > *(double *)(a3 + v7 + 8) ) *(double *)(a3 + (v7 | 8)) = v9; v7 = 16LL; v10 = (v6 & 1) == 0; v6 = 0; } while ( !v10 ); if ( --v5 ) continue; break; } } --v3; } while ( v3 ); } return 0LL; }
sp_get_polygon_mbr: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV EAX,dword ptr [RCX] ADD RCX,0x4 MOV qword ptr [RDI],RCX TEST EAX,EAX JZ 0x0018ed34 ADD RSI,-0x8 LAB_0018ecca: MOV R8,qword ptr [RDI] MOV ECX,dword ptr [R8] ADD R8,0x4 MOV qword ptr [RDI],R8 TEST ECX,ECX JZ 0x0018ed30 LAB_0018ecdb: MOV R8B,0x1 XOR R9D,R9D LAB_0018ece1: MOV R10,qword ptr [RDI] CMP R10,RSI JA 0x0018ed38 MOVSD XMM0,qword ptr [R10] ADD R10,0x8 MOV qword ptr [RDI],R10 MOVSD XMM1,qword ptr [RDX + R9*0x1] UCOMISD XMM1,XMM0 JBE 0x0018ed07 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_0018ed07: UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8] JBE 0x0018ed1a OR R9,0x8 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_0018ed1a: MOV R9D,0x10 TEST R8B,0x1 MOV R8D,0x0 JNZ 0x0018ece1 DEC ECX JNZ 0x0018ecdb LAB_0018ed30: DEC EAX JNZ 0x0018ecca LAB_0018ed34: XOR EAX,EAX JMP 0x0018ed3d LAB_0018ed38: MOV EAX,0xffffffff LAB_0018ed3d: POP RBP RET
int8 sp_get_polygon_mbr(int8 *param_1,long param_2,long param_3) { double dVar1; double *pdVar2; bool bVar3; int iVar4; int iVar5; bool bVar6; ulong uVar7; iVar4 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; if (iVar4 != 0) { do { iVar5 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; for (; iVar5 != 0; iVar5 = iVar5 + -1) { uVar7 = 0; bVar3 = true; do { bVar6 = bVar3; pdVar2 = (double *)*param_1; if ((double *)(param_2 + -8) < pdVar2) { return 0xffffffff; } dVar1 = *pdVar2; *param_1 = pdVar2 + 1; if (dVar1 < *(double *)(param_3 + uVar7)) { *(double *)(param_3 + uVar7) = dVar1; } pdVar2 = (double *)(param_3 + 8 + uVar7); if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *(double *)(param_3 + (uVar7 | 8)) = dVar1; } uVar7 = 0x10; bVar3 = false; } while (bVar6); } iVar4 = iVar4 + -1; } while (iVar4 != 0); } return 0; }
29,038
vsort_log
davidesantangelo[P]vsort/vsort_logger.c
void vsort_log(vsort_log_level_t level, const char *format, va_list args) { if (level == VSORT_LOG_NONE || level > current_log_level) return; // Get current time time_t now; char time_str[20]; time(&now); struct tm *tm_info = localtime(&now); strftime(time_str, sizeof(time_str), "%Y-%m-%d %H:%M:%S", tm_info); // Print log header with timestamp and level fprintf(stderr, "[%s] [%s] ", time_str, log_level_names[level]); // Print message vfprintf(stderr, format, args); fprintf(stderr, "\n"); }
O0
c
vsort_log: subq $0x48, %rsp movl %edi, 0x44(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) cmpl $0x0, 0x44(%rsp) je 0x4355 movl 0x44(%rsp), %eax cmpl 0x3e4d(%rip), %eax # 0x81a0 jbe 0x435a jmp 0x43ed leaq 0x28(%rsp), %rdi callq 0x1120 leaq 0x28(%rsp), %rdi callq 0x1040 movq %rax, 0x8(%rsp) leaq 0x10(%rsp), %rdi movq 0x8(%rsp), %rcx movl $0x14, %esi leaq 0x16ce(%rip), %rdx # 0x5a57 callq 0x1140 movq 0x3c63(%rip), %rax # 0x7ff8 movq (%rax), %rdi leaq 0x10(%rsp), %rdx movl 0x44(%rsp), %eax movl %eax, %ecx leaq 0x3e06(%rip), %rax # 0x81b0 movq (%rax,%rcx,8), %rcx leaq 0x16b4(%rip), %rsi # 0x5a69 movb $0x0, %al callq 0x1100 movq 0x3c35(%rip), %rax # 0x7ff8 movq (%rax), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x1170 movq 0x3c1c(%rip), %rax # 0x7ff8 movq (%rax), %rdi leaq 0xc3b(%rip), %rsi # 0x5021 movb $0x0, %al callq 0x1100 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
vsort_log: sub rsp, 48h mov [rsp+48h+var_4], edi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx cmp [rsp+48h+var_4], 0 jz short loc_4355 mov eax, [rsp+48h+var_4] cmp eax, cs:current_log_level jbe short loc_435A loc_4355: jmp loc_43ED loc_435A: lea rdi, [rsp+48h+var_20] call _time lea rdi, [rsp+48h+var_20] call _localtime mov [rsp+48h+var_40], rax lea rdi, [rsp+48h+var_38] mov rcx, [rsp+48h+var_40] mov esi, 14h lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S" call _strftime mov rax, cs:stderr_ptr mov rdi, [rax] lea rdx, [rsp+48h+var_38] mov eax, [rsp+48h+var_4] mov ecx, eax lea rax, log_level_names mov rcx, [rax+rcx*8] lea rsi, aSS; "[%s] [%s] " mov al, 0 call _fprintf mov rax, cs:stderr_ptr mov rdi, [rax] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_18] call _vfprintf mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aRunningBasicVs+1Dh; "\n" mov al, 0 call _fprintf loc_43ED: add rsp, 48h retn
void vsort_log(unsigned int a1, long long a2, long long a3) { long long v3; // [rsp+8h] [rbp-40h] char v4[24]; // [rsp+10h] [rbp-38h] BYREF char v5; // [rsp+28h] [rbp-20h] BYREF long long v6; // [rsp+30h] [rbp-18h] long long v7; // [rsp+38h] [rbp-10h] unsigned int v8; // [rsp+44h] [rbp-4h] v8 = a1; v7 = a2; v6 = a3; if ( a1 ) { if ( v8 <= current_log_level ) { time(&v5); v3 = localtime(&v5); strftime(v4, 20LL, "%Y-%m-%d %H:%M:%S", v3); fprintf(stderr, "[%s] [%s] ", v4, (&log_level_names)[v8]); vfprintf(stderr, v7, v6); fprintf(stderr, "\n"); } } }
vsort_log: SUB RSP,0x48 MOV dword ptr [RSP + 0x44],EDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX CMP dword ptr [RSP + 0x44],0x0 JZ 0x00104355 MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [0x001081a0] JBE 0x0010435a LAB_00104355: JMP 0x001043ed LAB_0010435a: LEA RDI,[RSP + 0x28] CALL 0x00101120 LEA RDI,[RSP + 0x28] CALL 0x00101040 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x10] MOV RCX,qword ptr [RSP + 0x8] MOV ESI,0x14 LEA RDX,[0x105a57] CALL 0x00101140 MOV RAX,qword ptr [0x00107ff8] MOV RDI,qword ptr [RAX] LEA RDX,[RSP + 0x10] MOV EAX,dword ptr [RSP + 0x44] MOV ECX,EAX LEA RAX,[0x1081b0] MOV RCX,qword ptr [RAX + RCX*0x8] LEA RSI,[0x105a69] MOV AL,0x0 CALL 0x00101100 MOV RAX,qword ptr [0x00107ff8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00101170 MOV RAX,qword ptr [0x00107ff8] MOV RDI,qword ptr [RAX] LEA RSI,[0x105021] MOV AL,0x0 CALL 0x00101100 LAB_001043ed: ADD RSP,0x48 RET
void vsort_log(uint param_1,char *param_2,__gnuc_va_list param_3) { tm *__tp; char local_38 [24]; time_t local_20; __gnuc_va_list local_18; char *local_10; uint local_4; if ((param_1 != 0) && (param_1 <= current_log_level)) { local_18 = param_3; local_10 = param_2; local_4 = param_1; time(&local_20); __tp = localtime(&local_20); strftime(local_38,0x14,"%Y-%m-%d %H:%M:%S",__tp); fprintf(*(FILE **)PTR_stderr_00107ff8,"[%s] [%s] ",local_38, *(int8 *)(log_level_names + (ulong)local_4 * 8)); vfprintf(*(FILE **)PTR_stderr_00107ff8,local_10,local_18); fprintf(*(FILE **)PTR_stderr_00107ff8,"\n"); } return; }
29,039
vsort_log
davidesantangelo[P]vsort/vsort_logger.c
void vsort_log(vsort_log_level_t level, const char *format, va_list args) { if (level == VSORT_LOG_NONE || level > current_log_level) return; // Get current time time_t now; char time_str[20]; time(&now); struct tm *tm_info = localtime(&now); strftime(time_str, sizeof(time_str), "%Y-%m-%d %H:%M:%S", tm_info); // Print log header with timestamp and level fprintf(stderr, "[%s] [%s] ", time_str, log_level_names[level]); // Print message vfprintf(stderr, format, args); fprintf(stderr, "\n"); }
O3
c
vsort_log: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movl %edi, %r15d leal -0x1(%r15), %eax cmpl 0x364d(%rip), %eax # 0x6190 jb 0x2b53 addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rdx, %rbx movq %rsi, %r14 leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x1120 movq %r12, %rdi callq 0x1040 leaq 0xee7(%rip), %rdx # 0x3a5c leaq 0x10(%rsp), %r12 movl $0x14, %esi movq %r12, %rdi movq %rax, %rcx callq 0x1140 movq 0x3467(%rip), %r13 # 0x5ff8 movq (%r13), %rdi movl %r15d, %eax leaq 0xef9(%rip), %rdx # 0x3a98 movslq (%rdx,%rax,4), %rcx addq %rdx, %rcx leaq 0xec1(%rip), %rsi # 0x3a6e movq %r12, %rdx xorl %eax, %eax callq 0x1100 movq (%r13), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1170 movq (%r13), %rsi movl $0xa, %edi callq 0x10d0 jmp 0x2b45
vsort_log: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r15d, edi lea eax, [r15-1] cmp eax, cs:current_log_level jb short loc_2B53 loc_2B45: add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_2B53: mov rbx, rdx mov r14, rsi lea r12, [rsp+58h+var_50] mov rdi, r12 call _time mov rdi, r12 call _localtime lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S" lea r12, [rsp+58h+var_48] mov esi, 14h mov rdi, r12 mov rcx, rax call _strftime mov r13, cs:stderr_ptr mov rdi, [r13+0] mov eax, r15d lea rdx, log_level_names_rel movsxd rcx, dword ptr [rdx+rax*4] add rcx, rdx lea rsi, aSS; "[%s] [%s] " mov rdx, r12 xor eax, eax call _fprintf mov rdi, [r13+0] mov rsi, r14 mov rdx, rbx call _vfprintf mov rsi, [r13+0] mov edi, 0Ah call _fputc jmp loc_2B45
long long vsort_log(unsigned int a1, long long a2, long long a3) { long long result; // rax long long v5; // rax char v6; // [rsp+8h] [rbp-50h] BYREF char v7[72]; // [rsp+10h] [rbp-48h] BYREF result = a1 - 1; if ( (unsigned int)result < current_log_level ) { time(&v6); v5 = localtime(&v6); strftime(v7, 20LL, "%Y-%m-%d %H:%M:%S", v5); fprintf(stderr, "[%s] [%s] ", v7, (const char *)&log_level_names_rel + *((int *)&log_level_names_rel + a1)); vfprintf(stderr, a2, a3); return fputc(10LL, stderr); } return result; }
vsort_log: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15D,EDI LEA EAX,[R15 + -0x1] CMP EAX,dword ptr [0x00106190] JC 0x00102b53 LAB_00102b45: ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00102b53: MOV RBX,RDX MOV R14,RSI LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x00101120 MOV RDI,R12 CALL 0x00101040 LEA RDX,[0x103a5c] LEA R12,[RSP + 0x10] MOV ESI,0x14 MOV RDI,R12 MOV RCX,RAX CALL 0x00101140 MOV R13,qword ptr [0x00105ff8] MOV RDI,qword ptr [R13] MOV EAX,R15D LEA RDX,[0x103a98] MOVSXD RCX,dword ptr [RDX + RAX*0x4] ADD RCX,RDX LEA RSI,[0x103a6e] MOV RDX,R12 XOR EAX,EAX CALL 0x00101100 MOV RDI,qword ptr [R13] MOV RSI,R14 MOV RDX,RBX CALL 0x00101170 MOV RSI,qword ptr [R13] MOV EDI,0xa CALL 0x001010d0 JMP 0x00102b45
void vsort_log(uint param_1,char *param_2,__gnuc_va_list param_3) { int *puVar1; tm *__tp; time_t local_50; char local_48 [32]; if (param_1 - 1 < current_log_level) { time(&local_50); __tp = localtime(&local_50); strftime(local_48,0x14,"%Y-%m-%d %H:%M:%S",__tp); puVar1 = PTR_stderr_00105ff8; fprintf(*(FILE **)PTR_stderr_00105ff8,"[%s] [%s] ",local_48, log_level_names_rel + *(int *)(log_level_names_rel + (ulong)param_1 * 4)); vfprintf(*(FILE **)puVar1,param_2,param_3); fputc(10,*(FILE **)puVar1); } return; }
29,040
my_copy_with_hex_escaping(charset_info_st const*, char*, unsigned long, char const*, unsigned long)
eloqsql/sql/sql_string.cc
size_t my_copy_with_hex_escaping(CHARSET_INFO *cs, char *dst, size_t dstlen, const char *src, size_t srclen) { const char *srcend= src + srclen; char *dst0= dst; for ( ; src < srcend ; ) { size_t chlen; if ((chlen= my_ismbchar(cs, src, srcend))) { if (dstlen < chlen) break; /* purecov: inspected */ memcpy(dst, src, chlen); src+= chlen; dst+= chlen; dstlen-= chlen; } else if (*src & 0x80) { if (dstlen < 4) break; /* purecov: inspected */ *dst++= '\\'; *dst++= 'x'; APPEND_HEX(dst, (uchar) *src); src++; dstlen-= 4; } else { if (dstlen < 1) break; /* purecov: inspected */ *dst++= *src++; dstlen--; } } return dst - dst0; }
O0
cpp
my_copy_with_hex_escaping(charset_info_st const*, char*, unsigned long, char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x29280 movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x292a0 movl %eax, %eax movq %rax, -0x40(%rbp) cmpq $0x0, %rax je 0x291d7 movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x2919a jmp 0x29280 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x25260 movq -0x40(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x40(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x40(%rbp), %rcx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x2927b movq -0x20(%rbp), %rax movsbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x29242 cmpq $0x4, -0x18(%rbp) jae 0x291f4 jmp 0x29280 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x5c, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x78, (%rax) movq -0x20(%rbp), %rax leaq -0x10(%rbp), %rdi movzbl (%rax), %esi callq 0x27490 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax subq $0x4, %rax movq %rax, -0x18(%rbp) jmp 0x29279 cmpq $0x1, -0x18(%rbp) jae 0x2924b jmp 0x29280 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x2927b jmp 0x29160 movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z25my_copy_with_hex_escapingPK15charset_info_stPcmPKcm: push rbp mov rbp, rsp sub rsp, 40h 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_20] add rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax loc_29160: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb loc_29280 mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_30] call _ZL11my_ismbcharPK15charset_info_stPKcS3_; my_ismbchar(charset_info_st const*,char const*,char const*) mov eax, eax mov [rbp+var_40], rax cmp rax, 0 jz short loc_291D7 mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jnb short loc_2919A jmp loc_29280 loc_2919A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call _memcpy mov rax, [rbp+var_40] add rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_40] add rax, [rbp+var_10] mov [rbp+var_10], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax jmp loc_2927B loc_291D7: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_29242 cmp [rbp+var_18], 4 jnb short loc_291F4 jmp loc_29280 loc_291F4: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 5Ch ; '\' mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 78h ; 'x' mov rax, [rbp+var_20] lea rdi, [rbp+var_10]; char ** movzx esi, byte ptr [rax]; unsigned __int8 call _ZL10APPEND_HEXRPch; APPEND_HEX(char *&,uchar) mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_18] sub rax, 4 mov [rbp+var_18], rax jmp short loc_29279 loc_29242: cmp [rbp+var_18], 1 jnb short loc_2924B jmp short loc_29280 loc_2924B: mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax loc_29279: jmp short $+2 loc_2927B: jmp loc_29160 loc_29280: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 40h pop rbp retn
long long my_copy_with_hex_escaping( const charset_info_st *a1, char *a2, unsigned long long a3, const char *a4, long long a5) { unsigned int v5; // eax char *v6; // rax char *v7; // rax char *v8; // rax char v9; // cl char *v10; // rax long long v12; // [rsp+0h] [rbp-40h] const char *v13; // [rsp+10h] [rbp-30h] const char *v14; // [rsp+20h] [rbp-20h] char *v16; // [rsp+30h] [rbp-10h] BYREF const charset_info_st *v17; // [rsp+38h] [rbp-8h] v17 = a1; v16 = a2; v14 = a4; v13 = &a4[a5]; while ( v14 < v13 ) { v5 = my_ismbchar(v17, v14, v13); v12 = v5; if ( v5 ) { if ( a3 < v5 ) return v16 - a2; memcpy(v16, v14, v5); v14 += v12; v16 += v12; a3 -= v12; } else if ( *v14 < 0 ) { if ( a3 < 4 ) return v16 - a2; v6 = v16++; *v6 = 92; v7 = v16++; *v7 = 120; APPEND_HEX(&v16, *v14++); a3 -= 4LL; } else { if ( !a3 ) return v16 - a2; v8 = (char *)v14++; v9 = *v8; v10 = v16++; *v10 = v9; --a3; } } return v16 - a2; }
my_copy_with_hex_escaping: PUSH RBP MOV RBP,RSP SUB RSP,0x40 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 + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LAB_00129160: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00129280 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001292a0 MOV EAX,EAX MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JZ 0x001291d7 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0012919a JMP 0x00129280 LAB_0012919a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00125260 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0012927b LAB_001291d7: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x00129242 CMP qword ptr [RBP + -0x18],0x4 JNC 0x001291f4 JMP 0x00129280 LAB_001291f4: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x5c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x10] MOVZX ESI,byte ptr [RAX] CALL 0x00127490 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x00129279 LAB_00129242: CMP qword ptr [RBP + -0x18],0x1 JNC 0x0012924b JMP 0x00129280 LAB_0012924b: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX LAB_00129279: JMP 0x0012927b LAB_0012927b: JMP 0x00129160 LAB_00129280: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
/* my_copy_with_hex_escaping(charset_info_st const*, char*, unsigned long, char const*, unsigned long) */ long my_copy_with_hex_escaping (charset_info_st *param_1,char *param_2,ulong param_3,char *param_4,ulong param_5) { uint uVar1; ulong __n; uchar *puVar2; uchar *local_28; ulong local_20; uchar *local_18; charset_info_st *local_10; local_28 = (uchar *)param_4; local_20 = param_3; local_18 = (uchar *)param_2; local_10 = param_1; while (local_28 < param_4 + param_5) { uVar1 = my_ismbchar(local_10,(char *)local_28,param_4 + param_5); __n = (ulong)uVar1; if (__n == 0) { if (((int)(char)*local_28 & 0x80U) == 0) { if (local_20 == 0) break; *local_18 = *local_28; local_20 = local_20 - 1; local_18 = local_18 + 1; } else { if (local_20 < 4) break; puVar2 = local_18 + 1; *local_18 = '\\'; local_18 = local_18 + 2; *puVar2 = 'x'; APPEND_HEX((char **)&local_18,*local_28); local_20 = local_20 - 4; } local_28 = local_28 + 1; } else { if (local_20 < __n) break; memcpy(local_18,local_28,__n); local_28 = local_28 + __n; local_18 = local_18 + __n; local_20 = local_20 - __n; } } return (long)local_18 - (long)param_2; }
29,041
list_free
eloqsql/libmariadb/libmariadb/ma_list.c
void list_free(LIST *root, unsigned int free_data) { LIST *next; while (root) { next=root->next; if (free_data) free(root->data); free(root); root=next; } }
O3
c
list_free: testq %rdi, %rdi je 0x1d89a pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movq 0x8(%r14), %r15 testl %ebx, %ebx je 0x1d880 movq 0x10(%r14), %rdi callq 0x13570 movq %r14, %rdi callq 0x13570 movq %r15, %r14 testq %r15, %r15 jne 0x1d86f addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
list_free: test rdi, rdi jz short locret_1D89A push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, esi mov r14, rdi loc_1D86F: mov r15, [r14+8] test ebx, ebx jz short loc_1D880 mov rdi, [r14+10h] call _free loc_1D880: mov rdi, r14 call _free mov r14, r15 test r15, r15 jnz short loc_1D86F add rsp, 8 pop rbx pop r14 pop r15 pop rbp locret_1D89A: retn
long long list_free(long long a1, int a2) { long long v2; // r14 long long v3; // r15 long long result; // rax if ( a1 ) { v2 = a1; do { v3 = *(_QWORD *)(v2 + 8); if ( a2 ) free(*(_QWORD *)(v2 + 16)); result = free(v2); v2 = v3; } while ( v3 ); } return result; }
list_free: TEST RDI,RDI JZ 0x0011d89a PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LAB_0011d86f: MOV R15,qword ptr [R14 + 0x8] TEST EBX,EBX JZ 0x0011d880 MOV RDI,qword ptr [R14 + 0x10] CALL 0x00113570 LAB_0011d880: MOV RDI,R14 CALL 0x00113570 MOV R14,R15 TEST R15,R15 JNZ 0x0011d86f ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP LAB_0011d89a: RET
void list_free(void *param_1,int param_2) { void *pvVar1; if (param_1 != (void *)0x0) { do { pvVar1 = *(void **)((long)param_1 + 8); if (param_2 != 0) { free(*(void **)((long)param_1 + 0x10)); } free(param_1); param_1 = pvVar1; } while (pvVar1 != (void *)0x0); } return; }
29,042
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp
void Parameterization::GetEdgeCoord(int edge, REAL t, REAL uv[2]) const { switch (GetType()) { case QUAD: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f; uv[1] = t; break; case 2: uv[0] = 1.0f - t; uv[1] = 1.0f; break; case 3: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case TRI: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f - t; uv[1] = t; break; case 2: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case QUAD_SUBFACES: if (t < 0.5f) { GetVertexCoord(edge, uv); uv[0] += t; } else { GetVertexCoord((edge + 1) % _faceSize, uv); uv[1] += 1.0f - t; } break; default: uv[0] = -1.0f; uv[1] = -1.0f; break; } }
O0
cpp
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movsd %xmm0, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) callq 0xd7690 movl %eax, %ecx movl %ecx, -0x24(%rbp) testl %eax, %eax je 0x19144f jmp 0x191430 movl -0x24(%rbp), %eax subl $0x1, %eax je 0x1914fd jmp 0x19143e movl -0x24(%rbp), %eax subl $0x2, %eax je 0x191583 jmp 0x1915ee movl -0xc(%rbp), %eax movq %rax, -0x38(%rbp) subq $0x3, %rax ja 0x1914f8 movq -0x38(%rbp), %rax leaq 0x65e2d(%rip), %rcx # 0x1f7298 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movsd %xmm0, 0x8(%rax) jmp 0x1914f8 movq -0x20(%rbp), %rax movsd 0x5b0fd(%rip), %xmm0 # 0x1ec598 movsd %xmm0, (%rax) movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x8(%rax) jmp 0x1914f8 movsd 0x5b0e1(%rip), %xmm0 # 0x1ec598 subsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movq -0x20(%rbp), %rax movsd 0x5b0c8(%rip), %xmm0 # 0x1ec598 movsd %xmm0, 0x8(%rax) jmp 0x1914f8 movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movsd %xmm0, (%rax) movsd 0x5b0ae(%rip), %xmm0 # 0x1ec598 subsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x8(%rax) jmp 0x19160f movl -0xc(%rbp), %eax movl %eax, -0x3c(%rbp) testl %eax, %eax je 0x19151d jmp 0x191509 movl -0x3c(%rbp), %eax subl $0x1, %eax je 0x191538 jmp 0x191513 movl -0x3c(%rbp), %eax subl $0x2, %eax je 0x19155d jmp 0x19157e movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movsd %xmm0, 0x8(%rax) jmp 0x19157e movsd 0x5b058(%rip), %xmm0 # 0x1ec598 subsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x8(%rax) jmp 0x19157e movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movsd %xmm0, (%rax) movsd 0x5b028(%rip), %xmm0 # 0x1ec598 subsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x8(%rax) jmp 0x19160f movsd 0x5b01d(%rip), %xmm0 # 0x1ec5a8 ucomisd -0x18(%rbp), %xmm0 jbe 0x1915b5 movq -0x30(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xcc5c0 movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax addsd (%rax), %xmm0 movsd %xmm0, (%rax) jmp 0x1915ec movq -0x30(%rbp), %rdi movl -0xc(%rbp), %eax addl $0x1, %eax movzwl 0x2(%rdi), %ecx cltd idivl %ecx movl %edx, %esi movq -0x20(%rbp), %rdx callq 0xcc5c0 movsd 0x5afbf(%rip), %xmm0 # 0x1ec598 subsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax addsd 0x8(%rax), %xmm0 movsd %xmm0, 0x8(%rax) jmp 0x19160f movq -0x20(%rbp), %rax movsd 0x5b046(%rip), %xmm0 # 0x1ec640 movsd %xmm0, (%rax) movq -0x20(%rbp), %rax movsd 0x5b036(%rip), %xmm0 # 0x1ec640 movsd %xmm0, 0x8(%rax) addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization12GetEdgeCoordIdEEviT_PS4_: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi movsd [rbp+var_18], xmm0 mov [rbp+var_20], rdx mov rdi, [rbp+var_8]; this mov [rbp+var_30], rdi call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization7GetTypeEv; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetType(void) mov ecx, eax mov [rbp+var_24], ecx test eax, eax jz short loc_19144F jmp short $+2 loc_191430: mov eax, [rbp+var_24] sub eax, 1 jz loc_1914FD jmp short $+2 loc_19143E: mov eax, [rbp+var_24] sub eax, 2 jz loc_191583 jmp loc_1915EE loc_19144F: mov eax, [rbp+var_C] mov [rbp+var_38], rax sub rax, 3; switch 4 cases ja def_191472; jumptable 0000000000191472 default case mov rax, [rbp+var_38] lea rcx, jpt_191472 movsxd rax, ds:(jpt_191472 - 1F7298h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_191474: movsd xmm0, [rbp+var_18]; jumptable 0000000000191472 case 0 mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 mov rax, [rbp+var_20] xorps xmm0, xmm0 movsd qword ptr [rax+8], xmm0 jmp short def_191472; jumptable 0000000000191472 default case loc_19148F: mov rax, [rbp+var_20]; jumptable 0000000000191472 case 1 movsd xmm0, cs:qword_1EC598 movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax+8], xmm0 jmp short def_191472; jumptable 0000000000191472 default case loc_1914AF: movsd xmm0, cs:qword_1EC598; jumptable 0000000000191472 case 2 subsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 mov rax, [rbp+var_20] movsd xmm0, cs:qword_1EC598 movsd qword ptr [rax+8], xmm0 jmp short def_191472; jumptable 0000000000191472 default case loc_1914D7: mov rax, [rbp+var_20]; jumptable 0000000000191472 case 3 xorps xmm0, xmm0 movsd qword ptr [rax], xmm0 movsd xmm0, cs:qword_1EC598 subsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax+8], xmm0 def_191472: jmp loc_19160F; jumptable 0000000000191472 default case loc_1914FD: mov eax, [rbp+var_C] mov [rbp+var_3C], eax test eax, eax jz short loc_19151D jmp short $+2 loc_191509: mov eax, [rbp+var_3C] sub eax, 1 jz short loc_191538 jmp short $+2 loc_191513: mov eax, [rbp+var_3C] sub eax, 2 jz short loc_19155D jmp short loc_19157E loc_19151D: movsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 mov rax, [rbp+var_20] xorps xmm0, xmm0 movsd qword ptr [rax+8], xmm0 jmp short loc_19157E loc_191538: movsd xmm0, cs:qword_1EC598 subsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax+8], xmm0 jmp short loc_19157E loc_19155D: mov rax, [rbp+var_20] xorps xmm0, xmm0 movsd qword ptr [rax], xmm0 movsd xmm0, cs:qword_1EC598 subsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax+8], xmm0 loc_19157E: jmp loc_19160F loc_191583: movsd xmm0, cs:qword_1EC5A8 ucomisd xmm0, [rbp+var_18] jbe short loc_1915B5 mov rdi, [rbp+var_30] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] addsd xmm0, qword ptr [rax] movsd qword ptr [rax], xmm0 jmp short loc_1915EC loc_1915B5: mov rdi, [rbp+var_30] mov eax, [rbp+var_C] add eax, 1 movzx ecx, word ptr [rdi+2] cdq idiv ecx mov esi, edx mov rdx, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, cs:qword_1EC598 subsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] addsd xmm0, qword ptr [rax+8] movsd qword ptr [rax+8], xmm0 loc_1915EC: jmp short loc_19160F loc_1915EE: mov rax, [rbp+var_20] movsd xmm0, cs:qword_1EC640 movsd qword ptr [rax], xmm0 mov rax, [rbp+var_20] movsd xmm0, cs:qword_1EC640 movsd qword ptr [rax+8], xmm0 loc_19160F: add rsp, 40h pop rbp retn
double * OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>( unsigned __int16 *a1, unsigned int a2, double *a3, double a4) { double *result; // rax int Type; // [rsp+1Ch] [rbp-24h] Type = OpenSubdiv::v3_6_0::Bfr::Parameterization::GetType((OpenSubdiv::v3_6_0::Bfr::Parameterization *)a1); if ( Type ) { if ( Type == 1 ) { if ( a2 ) { if ( a2 == 1 ) { *a3 = 1.0 - a4; result = a3; a3[1] = a4; } else { result = (double *)(a2 - 2); if ( a2 == 2 ) { *a3 = 0.0; result = a3; a3[1] = 1.0 - a4; } } } else { *a3 = a4; result = a3; a3[1] = 0.0; } } else if ( Type == 2 ) { if ( a4 >= 0.5 ) { OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>( (unsigned __int8 *)a1, (int)(a2 + 1) % a1[1], a3); result = a3; a3[1] = 1.0 - a4 + a3[1]; } else { OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>((unsigned __int8 *)a1, a2, a3); result = a3; *a3 = a4 + *a3; } } else { *a3 = -1.0; result = a3; a3[1] = -1.0; } } else { result = (double *)a2; switch ( a2 ) { case 0u: *a3 = a4; result = a3; a3[1] = 0.0; break; case 1u: *a3 = 1.0; result = a3; a3[1] = a4; break; case 2u: *a3 = 1.0 - a4; result = a3; a3[1] = 1.0; break; case 3u: *a3 = 0.0; result = a3; a3[1] = 1.0 - a4; break; default: return result; } } return result; }
29,043
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp
void Parameterization::GetEdgeCoord(int edge, REAL t, REAL uv[2]) const { switch (GetType()) { case QUAD: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f; uv[1] = t; break; case 2: uv[0] = 1.0f - t; uv[1] = 1.0f; break; case 3: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case TRI: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f - t; uv[1] = t; break; case 2: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case QUAD_SUBFACES: if (t < 0.5f) { GetVertexCoord(edge, uv); uv[0] += t; } else { GetVertexCoord((edge + 1) % _faceSize, uv); uv[1] += 1.0f - t; } break; default: uv[0] = -1.0f; uv[1] = -1.0f; break; } }
O2
cpp
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const: pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movzbl (%rdi), %eax cmpl $0x2, %eax je 0x9a110 cmpl $0x1, %eax je 0x9a0e8 testl %eax, %eax jne 0x9a13c cmpl $0x3, %esi ja 0x9a1a0 movl %esi, %eax leaq 0x2f3fb(%rip), %rcx # 0xc94c8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, (%rbx) jmp 0x9a19b cmpl $0x2, %esi je 0x9a174 cmpl $0x1, %esi je 0x9a18b testl %esi, %esi jne 0x9a1a0 movsd %xmm0, (%rbx) andq $0x0, 0x8(%rbx) jmp 0x9a1a0 movsd 0x243d8(%rip), %xmm1 # 0xbe4f0 ucomisd %xmm0, %xmm1 movsd %xmm0, 0x8(%rsp) jbe 0x9a14a movq %rbx, %rdx callq 0x523c0 movsd 0x8(%rsp), %xmm0 addsd (%rbx), %xmm0 movsd %xmm0, (%rbx) jmp 0x9a1a0 movapd 0x2f32c(%rip), %xmm0 # 0xc9470 movupd %xmm0, (%rbx) jmp 0x9a1a0 incl %esi movzwl 0x2(%rdi), %ecx movl %esi, %eax cltd idivl %ecx movl %edx, %esi movq %rbx, %rdx callq 0x523c0 movsd 0x243a1(%rip), %xmm0 # 0xbe508 subsd 0x8(%rsp), %xmm0 addsd 0x8(%rbx), %xmm0 jmp 0x9a19b andq $0x0, (%rbx) movsd 0x24388(%rip), %xmm1 # 0xbe508 subsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rbx) jmp 0x9a1a0 movsd 0x24375(%rip), %xmm1 # 0xbe508 subsd %xmm0, %xmm1 movsd %xmm1, (%rbx) movsd %xmm0, 0x8(%rbx) addq $0x10, %rsp popq %rbx retq movsd 0x2435a(%rip), %xmm1 # 0xbe508 subsd %xmm0, %xmm1 movsd %xmm1, (%rbx) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, 0x8(%rbx) jmp 0x9a1a0
_ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization12GetEdgeCoordIdEEviT_PS4_: push rbx sub rsp, 10h mov rbx, rdx movzx eax, byte ptr [rdi] cmp eax, 2 jz short loc_9A110 cmp eax, 1 jz short loc_9A0E8 test eax, eax jnz loc_9A13C cmp esi, 3; switch 4 cases ja def_9A0D4; jumptable 000000000009A0D4 default case mov eax, esi lea rcx, jpt_9A0D4 movsxd rax, ds:(jpt_9A0D4 - 0C94C8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9A0D6: mov rax, 3FF0000000000000h; jumptable 000000000009A0D4 case 1 mov [rbx], rax jmp loc_9A19B loc_9A0E8: cmp esi, 2 jz loc_9A174; jumptable 000000000009A0D4 case 3 cmp esi, 1 jz loc_9A18B test esi, esi jnz def_9A0D4; jumptable 000000000009A0D4 default case loc_9A102: movsd qword ptr [rbx], xmm0; jumptable 000000000009A0D4 case 0 and qword ptr [rbx+8], 0 jmp def_9A0D4; jumptable 000000000009A0D4 default case loc_9A110: movsd xmm1, cs:qword_BE4F0 ucomisd xmm1, xmm0 movsd [rsp+18h+var_10], xmm0 jbe short loc_9A14A mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, [rsp+18h+var_10] addsd xmm0, qword ptr [rbx] movsd qword ptr [rbx], xmm0 jmp short def_9A0D4; jumptable 000000000009A0D4 default case loc_9A13C: movapd xmm0, cs:xmmword_C9470 movupd xmmword ptr [rbx], xmm0 jmp short def_9A0D4; jumptable 000000000009A0D4 default case loc_9A14A: inc esi movzx ecx, word ptr [rdi+2] mov eax, esi cdq idiv ecx mov esi, edx mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, cs:qword_BE508 subsd xmm0, [rsp+18h+var_10] addsd xmm0, qword ptr [rbx+8] jmp short loc_9A19B loc_9A174: and qword ptr [rbx], 0; jumptable 000000000009A0D4 case 3 movsd xmm1, cs:qword_BE508 subsd xmm1, xmm0 movsd qword ptr [rbx+8], xmm1 jmp short def_9A0D4; jumptable 000000000009A0D4 default case loc_9A18B: movsd xmm1, cs:qword_BE508 subsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 loc_9A19B: movsd qword ptr [rbx+8], xmm0 def_9A0D4: add rsp, 10h; jumptable 000000000009A0D4 default case pop rbx retn loc_9A1A6: movsd xmm1, cs:qword_BE508; jumptable 000000000009A0D4 case 2 subsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 mov rax, 3FF0000000000000h mov [rbx+8], rax jmp short def_9A0D4; jumptable 000000000009A0D4 default case
unsigned long long OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>( unsigned __int8 *a1, unsigned int a2, double *a3, double a4) { unsigned long long result; // rax result = *a1; if ( (_DWORD)result == 2 ) { if ( a4 < 0.5 ) { result = OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(a1, a2, a3); *a3 = a4 + *a3; return result; } result = OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>( a1, (int)(a2 + 1) % *((unsigned __int16 *)a1 + 1), a3); a4 = 1.0 - a4 + a3[1]; goto LABEL_16; } if ( (_DWORD)result != 1 ) { if ( *a1 ) { *(_OWORD *)a3 = xmmword_C9470; } else { result = a2; switch ( a2 ) { case 0u: goto LABEL_9; case 1u: result = 0x3FF0000000000000LL; *a3 = 1.0; goto LABEL_16; case 2u: *a3 = 1.0 - a4; result = 0x3FF0000000000000LL; a3[1] = 1.0; break; case 3u: goto LABEL_14; default: return result; } } return result; } switch ( a2 ) { case 2u: LABEL_14: *a3 = 0.0; a3[1] = 1.0 - a4; return result; case 1u: *a3 = 1.0 - a4; LABEL_16: a3[1] = a4; return result; case 0u: LABEL_9: *a3 = a4; a3[1] = 0.0; break; } return result; }
GetEdgeCoord<double>: PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOVZX EAX,byte ptr [RDI] CMP EAX,0x2 JZ 0x0019a110 CMP EAX,0x1 JZ 0x0019a0e8 TEST EAX,EAX JNZ 0x0019a13c CMP ESI,0x3 JA 0x0019a1a0 MOV EAX,ESI LEA RCX,[0x1c94c8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,0x3ff0000000000000 MOV qword ptr [RBX],RAX JMP 0x0019a19b LAB_0019a0e8: CMP ESI,0x2 JZ 0x0019a174 CMP ESI,0x1 JZ 0x0019a18b TEST ESI,ESI JNZ 0x0019a1a0 caseD_0: MOVSD qword ptr [RBX],XMM0 AND qword ptr [RBX + 0x8],0x0 JMP 0x0019a1a0 LAB_0019a110: MOVSD XMM1,qword ptr [0x001be4f0] UCOMISD XMM1,XMM0 MOVSD qword ptr [RSP + 0x8],XMM0 JBE 0x0019a14a MOV RDX,RBX CALL 0x001523c0 MOVSD XMM0,qword ptr [RSP + 0x8] ADDSD XMM0,qword ptr [RBX] MOVSD qword ptr [RBX],XMM0 JMP 0x0019a1a0 LAB_0019a13c: MOVAPD XMM0,xmmword ptr [0x001c9470] MOVUPD xmmword ptr [RBX],XMM0 JMP 0x0019a1a0 LAB_0019a14a: INC ESI MOVZX ECX,word ptr [RDI + 0x2] MOV EAX,ESI CDQ IDIV ECX MOV ESI,EDX MOV RDX,RBX CALL 0x001523c0 MOVSD XMM0,qword ptr [0x001be508] SUBSD XMM0,qword ptr [RSP + 0x8] ADDSD XMM0,qword ptr [RBX + 0x8] JMP 0x0019a19b caseD_3: AND qword ptr [RBX],0x0 MOVSD XMM1,qword ptr [0x001be508] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX + 0x8],XMM1 JMP 0x0019a1a0 LAB_0019a18b: MOVSD XMM1,qword ptr [0x001be508] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 LAB_0019a19b: MOVSD qword ptr [RBX + 0x8],XMM0 default: ADD RSP,0x10 POP RBX RET caseD_2: MOVSD XMM1,qword ptr [0x001be508] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 MOV RAX,0x3ff0000000000000 MOV qword ptr [RBX + 0x8],RAX JMP 0x0019a1a0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double> (Parameterization *this,int param_1,double param_2,double *param_3) { Parameterization PVar1; double dVar2; dVar2 = _UNK_001c9478; PVar1 = *this; if (PVar1 == (Parameterization)0x2) { if (param_2 < DAT_001be4f0) { GetVertexCoord<double>(this,param_1,param_3); *param_3 = param_2 + *param_3; return; } GetVertexCoord<double>(this,(param_1 + 1) % (int)(uint)*(ushort *)(this + 2),param_3); param_2 = (DAT_001be508 - param_2) + param_3[1]; } else if (PVar1 == (Parameterization)0x1) { if (param_1 == 2) { switchD_0019a0d4_caseD_3: *param_3 = 0.0; param_3[1] = DAT_001be508 - param_2; return; } if (param_1 != 1) { if (param_1 != 0) { return; } goto switchD_0019a0d4_caseD_0; } *param_3 = DAT_001be508 - param_2; } else { if (PVar1 != (Parameterization)0x0) { *param_3 = _DAT_001c9470; param_3[1] = dVar2; return; } switch(param_1) { case 0: switchD_0019a0d4_caseD_0: *param_3 = param_2; param_3[1] = 0.0; return; case 1: *param_3 = 1.0; break; case 2: *param_3 = DAT_001be508 - param_2; param_3[1] = 1.0; return; case 3: goto switchD_0019a0d4_caseD_3; default: return; } } param_3[1] = param_2; return; }
29,044
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp
void Parameterization::GetEdgeCoord(int edge, REAL t, REAL uv[2]) const { switch (GetType()) { case QUAD: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f; uv[1] = t; break; case 2: uv[0] = 1.0f - t; uv[1] = 1.0f; break; case 3: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case TRI: switch (edge) { case 0: uv[0] = t; uv[1] = 0.0f; break; case 1: uv[0] = 1.0f - t; uv[1] = t; break; case 2: uv[0] = 0.0f; uv[1] = 1.0f - t; break; } break; case QUAD_SUBFACES: if (t < 0.5f) { GetVertexCoord(edge, uv); uv[0] += t; } else { GetVertexCoord((edge + 1) % _faceSize, uv); uv[1] += 1.0f - t; } break; default: uv[0] = -1.0f; uv[1] = -1.0f; break; } }
O3
cpp
void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const: pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movzbl (%rdi), %eax cmpl $0x2, %eax je 0x8e21d cmpl $0x1, %eax je 0x8e1f2 testl %eax, %eax jne 0x8e249 cmpl $0x3, %esi ja 0x8e2b0 movl %esi, %eax leaq 0x34241(%rip), %rcx # 0xc2418 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, (%rbx) jmp 0x8e2ab cmpl $0x2, %esi je 0x8e281 cmpl $0x1, %esi je 0x8e29b testl %esi, %esi jne 0x8e2b0 movsd %xmm0, (%rbx) movq $0x0, 0x8(%rbx) jmp 0x8e2b0 movsd 0x2939b(%rip), %xmm1 # 0xb75c0 ucomisd %xmm0, %xmm1 movsd %xmm0, 0x8(%rsp) jbe 0x8e257 movq %rbx, %rdx callq 0x39fc0 movsd 0x8(%rsp), %xmm0 addsd (%rbx), %xmm0 movsd %xmm0, (%rbx) jmp 0x8e2b0 movapd 0x3416f(%rip), %xmm0 # 0xc23c0 movupd %xmm0, (%rbx) jmp 0x8e2b0 incl %esi movzwl 0x2(%rdi), %ecx movl %esi, %eax cltd idivl %ecx movl %edx, %esi movq %rbx, %rdx callq 0x39fc0 movsd 0x29324(%rip), %xmm0 # 0xb7598 subsd 0x8(%rsp), %xmm0 addsd 0x8(%rbx), %xmm0 jmp 0x8e2ab movq $0x0, (%rbx) movsd 0x29308(%rip), %xmm1 # 0xb7598 subsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rbx) jmp 0x8e2b0 movsd 0x292f5(%rip), %xmm1 # 0xb7598 subsd %xmm0, %xmm1 movsd %xmm1, (%rbx) movsd %xmm0, 0x8(%rbx) addq $0x10, %rsp popq %rbx retq movsd 0x292da(%rip), %xmm1 # 0xb7598 subsd %xmm0, %xmm1 movsd %xmm1, (%rbx) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, 0x8(%rbx) jmp 0x8e2b0
_ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization12GetEdgeCoordIdEEviT_PS4_: push rbx sub rsp, 10h mov rbx, rdx movzx eax, byte ptr [rdi] cmp eax, 2 jz short loc_8E21D cmp eax, 1 jz short loc_8E1F2 test eax, eax jnz loc_8E249 cmp esi, 3; switch 4 cases ja def_8E1DE; jumptable 000000000008E1DE default case mov eax, esi lea rcx, jpt_8E1DE movsxd rax, ds:(jpt_8E1DE - 0C2418h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_8E1E0: mov rax, 3FF0000000000000h; jumptable 000000000008E1DE case 1 mov [rbx], rax jmp loc_8E2AB loc_8E1F2: cmp esi, 2 jz loc_8E281; jumptable 000000000008E1DE case 3 cmp esi, 1 jz loc_8E29B test esi, esi jnz def_8E1DE; jumptable 000000000008E1DE default case loc_8E20C: movsd qword ptr [rbx], xmm0; jumptable 000000000008E1DE case 0 mov qword ptr [rbx+8], 0 jmp def_8E1DE; jumptable 000000000008E1DE default case loc_8E21D: movsd xmm1, cs:qword_B75C0 ucomisd xmm1, xmm0 movsd [rsp+18h+var_10], xmm0 jbe short loc_8E257 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, [rsp+18h+var_10] addsd xmm0, qword ptr [rbx] movsd qword ptr [rbx], xmm0 jmp short def_8E1DE; jumptable 000000000008E1DE default case loc_8E249: movapd xmm0, cs:xmmword_C23C0 movupd xmmword ptr [rbx], xmm0 jmp short def_8E1DE; jumptable 000000000008E1DE default case loc_8E257: inc esi movzx ecx, word ptr [rdi+2] mov eax, esi cdq idiv ecx mov esi, edx mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization14GetVertexCoordIdEEviPT_; OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(int,double *) movsd xmm0, cs:qword_B7598 subsd xmm0, [rsp+18h+var_10] addsd xmm0, qword ptr [rbx+8] jmp short loc_8E2AB loc_8E281: mov qword ptr [rbx], 0; jumptable 000000000008E1DE case 3 movsd xmm1, cs:qword_B7598 subsd xmm1, xmm0 movsd qword ptr [rbx+8], xmm1 jmp short def_8E1DE; jumptable 000000000008E1DE default case loc_8E29B: movsd xmm1, cs:qword_B7598 subsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 loc_8E2AB: movsd qword ptr [rbx+8], xmm0 def_8E1DE: add rsp, 10h; jumptable 000000000008E1DE default case pop rbx retn loc_8E2B6: movsd xmm1, cs:qword_B7598; jumptable 000000000008E1DE case 2 subsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 mov rax, 3FF0000000000000h mov [rbx+8], rax jmp short def_8E1DE; jumptable 000000000008E1DE default case
unsigned long long OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>( unsigned __int8 *a1, unsigned int a2, double *a3, double a4) { unsigned long long result; // rax result = *a1; if ( (_DWORD)result == 2 ) { if ( a4 < 0.5 ) { result = OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>(a1, a2, a3); *a3 = a4 + *a3; return result; } result = OpenSubdiv::v3_6_0::Bfr::Parameterization::GetVertexCoord<double>( a1, (int)(a2 + 1) % *((unsigned __int16 *)a1 + 1), a3); a4 = 1.0 - a4 + a3[1]; goto LABEL_16; } if ( (_DWORD)result != 1 ) { if ( *a1 ) { *(_OWORD *)a3 = xmmword_C23C0; } else { result = a2; switch ( a2 ) { case 0u: goto LABEL_9; case 1u: result = 0x3FF0000000000000LL; *a3 = 1.0; goto LABEL_16; case 2u: *a3 = 1.0 - a4; result = 0x3FF0000000000000LL; a3[1] = 1.0; break; case 3u: goto LABEL_14; default: return result; } } return result; } switch ( a2 ) { case 2u: LABEL_14: *a3 = 0.0; a3[1] = 1.0 - a4; return result; case 1u: *a3 = 1.0 - a4; LABEL_16: a3[1] = a4; return result; case 0u: LABEL_9: *a3 = a4; a3[1] = 0.0; break; } return result; }
GetEdgeCoord<double>: PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOVZX EAX,byte ptr [RDI] CMP EAX,0x2 JZ 0x0018e21d CMP EAX,0x1 JZ 0x0018e1f2 TEST EAX,EAX JNZ 0x0018e249 CMP ESI,0x3 JA 0x0018e2b0 MOV EAX,ESI LEA RCX,[0x1c2418] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,0x3ff0000000000000 MOV qword ptr [RBX],RAX JMP 0x0018e2ab LAB_0018e1f2: CMP ESI,0x2 JZ 0x0018e281 CMP ESI,0x1 JZ 0x0018e29b TEST ESI,ESI JNZ 0x0018e2b0 caseD_0: MOVSD qword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x8],0x0 JMP 0x0018e2b0 LAB_0018e21d: MOVSD XMM1,qword ptr [0x001b75c0] UCOMISD XMM1,XMM0 MOVSD qword ptr [RSP + 0x8],XMM0 JBE 0x0018e257 MOV RDX,RBX CALL 0x00139fc0 MOVSD XMM0,qword ptr [RSP + 0x8] ADDSD XMM0,qword ptr [RBX] MOVSD qword ptr [RBX],XMM0 JMP 0x0018e2b0 LAB_0018e249: MOVAPD XMM0,xmmword ptr [0x001c23c0] MOVUPD xmmword ptr [RBX],XMM0 JMP 0x0018e2b0 LAB_0018e257: INC ESI MOVZX ECX,word ptr [RDI + 0x2] MOV EAX,ESI CDQ IDIV ECX MOV ESI,EDX MOV RDX,RBX CALL 0x00139fc0 MOVSD XMM0,qword ptr [0x001b7598] SUBSD XMM0,qword ptr [RSP + 0x8] ADDSD XMM0,qword ptr [RBX + 0x8] JMP 0x0018e2ab caseD_3: MOV qword ptr [RBX],0x0 MOVSD XMM1,qword ptr [0x001b7598] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX + 0x8],XMM1 JMP 0x0018e2b0 LAB_0018e29b: MOVSD XMM1,qword ptr [0x001b7598] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 LAB_0018e2ab: MOVSD qword ptr [RBX + 0x8],XMM0 default: ADD RSP,0x10 POP RBX RET caseD_2: MOVSD XMM1,qword ptr [0x001b7598] SUBSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 MOV RAX,0x3ff0000000000000 MOV qword ptr [RBX + 0x8],RAX JMP 0x0018e2b0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double>(int, double, double*) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Parameterization::GetEdgeCoord<double> (Parameterization *this,int param_1,double param_2,double *param_3) { Parameterization PVar1; double dVar2; dVar2 = _UNK_001c23c8; PVar1 = *this; if (PVar1 == (Parameterization)0x2) { if (param_2 < DAT_001b75c0) { GetVertexCoord<double>(this,param_1,param_3); *param_3 = param_2 + *param_3; return; } GetVertexCoord<double>(this,(param_1 + 1) % (int)(uint)*(ushort *)(this + 2),param_3); param_2 = (DAT_001b7598 - param_2) + param_3[1]; } else if (PVar1 == (Parameterization)0x1) { if (param_1 == 2) { switchD_0018e1de_caseD_3: *param_3 = 0.0; param_3[1] = DAT_001b7598 - param_2; return; } if (param_1 != 1) { if (param_1 != 0) { return; } goto switchD_0018e1de_caseD_0; } *param_3 = DAT_001b7598 - param_2; } else { if (PVar1 != (Parameterization)0x0) { *param_3 = _DAT_001c23c0; param_3[1] = dVar2; return; } switch(param_1) { case 0: switchD_0018e1de_caseD_0: *param_3 = param_2; param_3[1] = 0.0; return; case 1: *param_3 = 1.0; break; case 2: *param_3 = DAT_001b7598 - param_2; param_3[1] = 1.0; return; case 3: goto switchD_0018e1de_caseD_3; default: return; } } param_3[1] = param_2; return; }
29,045
inline_mysql_rwlock_unlock
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_unlock( mysql_rwlock_t *that) { int result; #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi); #endif result= rw_unlock(&that->m_rwlock); return result; }
O0
c
inline_mysql_rwlock_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%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 0xfea21 leaq 0x1c16ae(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0xfa120 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_8: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 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_FEA21 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_FEA21: mov rdi, [rbp+var_8] call my_rw_unlock mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_unlock_8(long long a1) { if ( *(_QWORD *)(a1 + 144) ) ((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144)); return (unsigned int)my_rw_unlock(a1); }
inline_mysql_rwlock_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],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 0x001fea21 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX LAB_001fea21: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fa120 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 inline_mysql_rwlock_unlock(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90)); } uVar1 = my_rw_unlock(param_1); return uVar1; }
29,046
FTB_WORD_cmp_list
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word, ndepth */ int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1, (uchar*) (*b)->word + 1, (*b)->len - 1, 0); if (!i) i= CMP_NUM((*a)->ndepth, (*b)->ndepth); return i; }
O3
c
FTB_WORD_cmp_list: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %rsi movl 0x48(%rsi), %edx addq $0x4e, %rsi decl %edx movq (%rbx), %rcx movl 0x48(%rcx), %r8d addq $0x4e, %rcx decl %r8d xorl %r9d, %r9d callq 0x9fda8 testl %eax, %eax jne 0x7361a movq (%r14), %rax movl 0x44(%rax), %eax movq (%rbx), %rcx xorl %edx, %edx cmpl 0x44(%rcx), %eax setne %dl movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovael %edx, %eax popq %rbx popq %r14 popq %rbp retq
FTB_WORD_cmp_list: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rsi mov rsi, [rsi] mov edx, [rsi+48h] add rsi, 4Eh ; 'N' dec edx mov rcx, [rbx] mov r8d, [rcx+48h] add rcx, 4Eh ; 'N' dec r8d xor r9d, r9d call ha_compare_text test eax, eax jnz short loc_7361A mov rax, [r14] mov eax, [rax+44h] mov rcx, [rbx] xor edx, edx cmp eax, [rcx+44h] setnz dl mov eax, 0FFFFFFFFh cmovnb eax, edx loc_7361A: pop rbx pop r14 pop rbp retn
long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3) { long long result; // rax unsigned int v5; // eax bool v6; // cf BOOL v7; // edx result = ha_compare_text( a1, *(_QWORD *)a2 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1), *(_QWORD *)a3 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1), 0LL); if ( !(_DWORD)result ) { v5 = *(_DWORD *)(*(_QWORD *)a2 + 68LL); v6 = v5 < *(_DWORD *)(*(_QWORD *)a3 + 68LL); v7 = v5 != *(_DWORD *)(*(_QWORD *)a3 + 68LL); result = 0xFFFFFFFFLL; if ( !v6 ) return v7; } return result; }
FTB_WORD_cmp_list: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV RSI,qword ptr [RSI] MOV EDX,dword ptr [RSI + 0x48] ADD RSI,0x4e DEC EDX MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RCX + 0x48] ADD RCX,0x4e DEC R8D XOR R9D,R9D CALL 0x0019fda8 TEST EAX,EAX JNZ 0x0017361a MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x44] MOV RCX,qword ptr [RBX] XOR EDX,EDX CMP EAX,dword ptr [RCX + 0x44] SETNZ DL MOV EAX,0xffffffff CMOVNC EAX,EDX LAB_0017361a: POP RBX POP R14 POP RBP RET
ulong FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3) { ulong uVar1; uVar1 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e, *(int *)(*param_3 + 0x48) + -1,0); if ((int)uVar1 == 0) { uVar1 = 0xffffffff; if (*(uint *)(*param_3 + 0x44) <= *(uint *)(*param_2 + 0x44)) { uVar1 = (ulong)(*(uint *)(*param_2 + 0x44) != *(uint *)(*param_3 + 0x44)); } } return uVar1; }
29,047
json_get
corpus-core[P]colibri-stateless/src/util/json.c
json_t json_get(json_t parent, const char* property) { if (parent.type != JSON_TYPE_OBJECT) return json(JSON_TYPE_INVALID, parent.start, 0); bytes_t property_name = NULL_BYTES; size_t len = strlen(property); json_for_each_property(parent, val, property_name) { if (property_name.len == len && property_name.data && memcmp(property_name.data, property, len) == 0) return val; } return json(JSON_TYPE_NOT_FOUND, parent.start, 0); }
O0
c
json_get: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x50(%rbp) movq %rdi, -0x48(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq %rsi, -0x8(%rbp) cmpl $0x3, 0x10(%rax) je 0xa59f4 movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa5afc leaq -0x18(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x231c0 movq -0x8(%rbp), %rdi callq 0x23220 movq -0x50(%rbp), %rdi movq %rax, %rcx movq -0x40(%rbp), %rax movq %rcx, -0x20(%rbp) leaq -0x18(%rbp), %rsi xorl %edx, %edx movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa5740 movq -0x50(%rbp), %rcx xorl %eax, %eax cmpl $-0x1, 0x10(%rcx) movb %al, -0x51(%rbp) je 0xa5a5d movq -0x50(%rbp), %rax cmpl $0x0, 0x10(%rax) setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0xa5a66 jmp 0xa5adf movl -0x18(%rbp), %eax cmpq -0x20(%rbp), %rax jne 0xa5a8e cmpq $0x0, -0x10(%rbp) je 0xa5a8e movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x23540 cmpl $0x0, %eax jne 0xa5a8e jmp 0xa5afc jmp 0xa5a90 movq -0x50(%rbp), %rax leaq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi movl $0x1, %edx movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa5740 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rcx movq %rcx, 0x10(%rax) jmp 0xa5a40 movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x48(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
json_get: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_50], rdi mov [rbp+var_48], rdi lea rax, [rbp+arg_0] mov [rbp+var_40], rax mov [rbp+var_8], rsi cmp dword ptr [rax+10h], 3 jz short loc_A59F4 mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rcx, [rcx] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp loc_A5AFC loc_A59F4: lea rdi, [rbp+var_18] xor esi, esi mov edx, 10h call _memset mov rdi, [rbp+var_8] call _strlen mov rdi, [rbp+var_50] mov rcx, rax mov rax, [rbp+var_40] mov [rbp+var_20], rcx lea rsi, [rbp+var_18] xor edx, edx mov rcx, [rax] mov [rsp+70h+var_70], rcx mov rcx, [rax+8] mov [rsp+70h+var_68], rcx mov rax, [rax+10h] mov [rsp+70h+var_60], rax call json_next_value loc_A5A40: mov rcx, [rbp+var_50] xor eax, eax cmp dword ptr [rcx+10h], 0FFFFFFFFh mov [rbp+var_51], al jz short loc_A5A5D mov rax, [rbp+var_50] cmp dword ptr [rax+10h], 0 setnz al mov [rbp+var_51], al loc_A5A5D: mov al, [rbp+var_51] test al, 1 jnz short loc_A5A66 jmp short loc_A5ADF loc_A5A66: mov eax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_A5A8E cmp [rbp+var_10], 0 jz short loc_A5A8E mov rdi, [rbp+var_10] mov rsi, [rbp+var_8] mov rdx, [rbp+var_20] call _memcmp cmp eax, 0 jnz short loc_A5A8E jmp short loc_A5AFC loc_A5A8E: jmp short $+2 loc_A5A90: mov rax, [rbp+var_50] lea rdi, [rbp+var_38] lea rsi, [rbp+var_18] mov edx, 1 mov rcx, [rax] mov [rsp+70h+var_70], rcx mov rcx, [rax+8] mov [rsp+70h+var_68], rcx mov rax, [rax+10h] mov [rsp+70h+var_60], rax call json_next_value mov rax, [rbp+var_50] mov rcx, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_30] mov [rax+8], rcx mov rcx, [rbp+var_28] mov [rax+10h], rcx jmp loc_A5A40 loc_A5ADF: mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rcx, [rcx] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0FFFFFFFFh loc_A5AFC: mov rax, [rbp+var_48] add rsp, 70h pop rbp retn
long long * json_get( long long *a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, long long a8, long long a9) { int v9; // r8d int v10; // r9d int v11; // r8d int v12; // r9d bool v14; // [rsp+1Fh] [rbp-51h] _QWORD v15[3]; // [rsp+38h] [rbp-38h] BYREF long long v16; // [rsp+50h] [rbp-20h] int v17; // [rsp+58h] [rbp-18h] BYREF long long v18; // [rsp+60h] [rbp-10h] long long v19; // [rsp+68h] [rbp-8h] v19 = a2; if ( (_DWORD)a9 == 3 ) { memset(&v17, 0LL, 16LL); v16 = strlen(v19); json_next_value((long long)a1, (long long)&v17, 0, a8, v9, v10, a7, a8, a9); while ( 1 ) { v14 = 0; if ( *((_DWORD *)a1 + 4) != -1 ) v14 = *((_DWORD *)a1 + 4) != 0; if ( !v14 ) break; if ( v17 == v16 && v18 && !(unsigned int)memcmp(v18, v19, v16) ) return a1; json_next_value((long long)v15, (long long)&v17, 1, a1[1], v11, v12, *a1, a1[1], a1[2]); *a1 = v15[0]; a1[1] = v15[1]; a1[2] = v15[2]; } *a1 = a7; a1[1] = 0LL; *((_DWORD *)a1 + 4) = -1; } else { *a1 = a7; a1[1] = 0LL; *((_DWORD *)a1 + 4) = 0; } return a1; }
json_get: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x50],RDI MOV qword ptr [RBP + -0x48],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x8],RSI CMP dword ptr [RAX + 0x10],0x3 JZ 0x001a59f4 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a5afc LAB_001a59f4: LEA RDI,[RBP + -0x18] XOR ESI,ESI MOV EDX,0x10 CALL 0x001231c0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00123220 MOV RDI,qword ptr [RBP + -0x50] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x20],RCX LEA RSI,[RBP + -0x18] XOR EDX,EDX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a5740 LAB_001a5a40: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP dword ptr [RCX + 0x10],-0x1 MOV byte ptr [RBP + -0x51],AL JZ 0x001a5a5d MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX + 0x10],0x0 SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_001a5a5d: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x001a5a66 JMP 0x001a5adf LAB_001a5a66: MOV EAX,dword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001a5a8e CMP qword ptr [RBP + -0x10],0x0 JZ 0x001a5a8e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00123540 CMP EAX,0x0 JNZ 0x001a5a8e JMP 0x001a5afc LAB_001a5a8e: JMP 0x001a5a90 LAB_001a5a90: MOV RAX,qword ptr [RBP + -0x50] LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x18] MOV EDX,0x1 MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a5740 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x10],RCX JMP 0x001a5a40 LAB_001a5adf: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0xffffffff LAB_001a5afc: MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x70 POP RBP RET
int8 * json_get(int8 *param_1,char *param_2) { int iVar1; bool bVar2; int8 in_stack_00000008; int in_stack_00000018; int8 local_40; int8 local_38; int8 local_30; size_t local_28; uint local_20 [2]; void *local_18; char *local_10; if (in_stack_00000018 == 3) { local_10 = param_2; memset(local_20,0,0x10); local_28 = strlen(local_10); json_next_value(param_1,local_20,0); while( true ) { bVar2 = false; if (*(int *)(param_1 + 2) != -1) { bVar2 = *(int *)(param_1 + 2) != 0; } if (!bVar2) break; if (((local_20[0] == local_28) && (local_18 != (void *)0x0)) && (iVar1 = memcmp(local_18,local_10,local_28), iVar1 == 0)) { return param_1; } json_next_value(&local_40,local_20,1); *param_1 = local_40; param_1[1] = local_38; param_1[2] = local_30; } *param_1 = in_stack_00000008; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0xffffffff; } else { *param_1 = in_stack_00000008; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; } return param_1; }
29,048
json_get
corpus-core[P]colibri-stateless/src/util/json.c
json_t json_get(json_t parent, const char* property) { if (parent.type != JSON_TYPE_OBJECT) return json(JSON_TYPE_INVALID, parent.start, 0); bytes_t property_name = NULL_BYTES; size_t len = strlen(property); json_for_each_property(parent, val, property_name) { if (property_name.len == len && property_name.data && memcmp(property_name.data, property, len) == 0) return val; } return json(JSON_TYPE_NOT_FOUND, parent.start, 0); }
O2
c
json_get: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x80(%rsp), %r13 cmpl $0x3, 0x10(%r13) jne 0x4f60b movq %rsi, %r14 xorps %xmm0, %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %rsi, %rdi callq 0x22210 movq %rax, %r12 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x4f40c leaq 0x30(%rsp), %r13 pushq $0x1 popq %rbp movl 0x10(%rbx), %eax decl %eax cmpl $-0x3, %eax ja 0x4f61d movl 0x20(%rsp), %eax cmpq %rax, %r12 sete %al movq 0x28(%rsp), %rdi testq %rdi, %rdi setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x4f5db movq %r14, %rsi movq %r12, %rdx callq 0x22380 testl %eax, %eax je 0x4f634 movq 0x10(%rbx), %rax movq %rax, 0x10(%rsp) movups (%rbx), %xmm0 movups %xmm0, (%rsp) movq %r13, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x4f40c movq 0x40(%rsp), %rax movq %rax, 0x10(%rbx) movups 0x30(%rsp), %xmm0 movups %xmm0, (%rbx) jmp 0x4f5a6 movq (%r13), %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) andl $0x0, 0x10(%rbx) jmp 0x4f634 leaq 0x80(%rsp), %rax movq (%rax), %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) orl $-0x1, 0x10(%rbx) movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
json_get: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi lea r13, [rsp+78h+arg_0] cmp dword ptr [r13+10h], 3 jnz loc_4F60B mov r14, rsi xorps xmm0, xmm0 lea r15, [rsp+78h+var_58] movaps xmmword ptr [r15], xmm0 mov rdi, rsi call _strlen mov r12, rax mov rax, [r13+10h] mov [rsp+78h+var_68], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+78h+var_78], xmm0 mov rdi, rbx mov rsi, r15 xor edx, edx call json_next_value lea r13, [rsp+78h+var_48] push 1 pop rbp loc_4F5A6: mov eax, [rbx+10h] dec eax cmp eax, 0FFFFFFFDh ja short loc_4F61D mov eax, [rsp+78h+var_58] cmp r12, rax setz al mov rdi, [rsp+78h+var_50] test rdi, rdi setnz cl and cl, al cmp cl, 1 jnz short loc_4F5DB mov rsi, r14 mov rdx, r12 call _bcmp test eax, eax jz short loc_4F634 loc_4F5DB: mov rax, [rbx+10h] mov [rsp+78h+var_68], rax movups xmm0, xmmword ptr [rbx] movups [rsp+78h+var_78], xmm0 mov rdi, r13 mov rsi, r15 mov edx, ebp call json_next_value mov rax, [rsp+78h+var_38] mov [rbx+10h], rax movups xmm0, [rsp+78h+var_48] movups xmmword ptr [rbx], xmm0 jmp short loc_4F5A6 loc_4F60B: mov rax, [r13+0] mov [rbx], rax and qword ptr [rbx+8], 0 and dword ptr [rbx+10h], 0 jmp short loc_4F634 loc_4F61D: lea rax, [rsp+78h+arg_0] mov rax, [rax] mov [rbx], rax and qword ptr [rbx+8], 0 or dword ptr [rbx+10h], 0FFFFFFFFh loc_4F634: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long json_get( long long a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, __int128 a7, long long a8) { long long v8; // r12 int v9; // ecx int v10; // r8d int v11; // r9d int v12; // ecx int v13; // r8d int v14; // r9d __int128 v16; // [rsp+20h] [rbp-58h] BYREF __int128 v17; // [rsp+30h] [rbp-48h] BYREF long long v18; // [rsp+40h] [rbp-38h] if ( (_DWORD)a8 == 3 ) { v16 = 0LL; v8 = strlen(a2); json_next_value(a1, (long long)&v16, 0, v9, v10, v11, a7, a8); while ( (unsigned int)(*(_DWORD *)(a1 + 16) - 1) <= 0xFFFFFFFD ) { LOBYTE(v12) = v8 == (unsigned int)v16 && *((_QWORD *)&v16 + 1) != 0LL; if ( (_BYTE)v12 == 1 && !(unsigned int)bcmp(*((_QWORD *)&v16 + 1), a2, v8) ) return a1; json_next_value((long long)&v17, (long long)&v16, 1, v12, v13, v14, *(_OWORD *)a1, *(_QWORD *)(a1 + 16)); *(_QWORD *)(a1 + 16) = v18; *(_OWORD *)a1 = v17; } *(_QWORD *)a1 = a7; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = -1; } else { *(_QWORD *)a1 = a7; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; } return a1; }
json_get: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA R13,[RSP + 0x80] CMP dword ptr [R13 + 0x10],0x3 JNZ 0x0014f60b MOV R14,RSI XORPS XMM0,XMM0 LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,RSI CALL 0x00122210 MOV R12,RAX MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL 0x0014f40c LEA R13,[RSP + 0x30] PUSH 0x1 POP RBP LAB_0014f5a6: MOV EAX,dword ptr [RBX + 0x10] DEC EAX CMP EAX,-0x3 JA 0x0014f61d MOV EAX,dword ptr [RSP + 0x20] CMP R12,RAX SETZ AL MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x0014f5db MOV RSI,R14 MOV RDX,R12 CALL 0x00122380 TEST EAX,EAX JZ 0x0014f634 LAB_0014f5db: MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R13 MOV RSI,R15 MOV EDX,EBP CALL 0x0014f40c MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RBX + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RBX],XMM0 JMP 0x0014f5a6 LAB_0014f60b: MOV RAX,qword ptr [R13] MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 AND dword ptr [RBX + 0x10],0x0 JMP 0x0014f634 LAB_0014f61d: LEA RAX,[RSP + 0x80] MOV RAX,qword ptr [RAX] MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 OR dword ptr [RBX + 0x10],0xffffffff LAB_0014f634: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * json_get(int8 *param_1,char *param_2) { int iVar1; size_t __n; int8 in_stack_00000008; int in_stack_00000018; ulong local_58; void *pvStack_50; int8 local_48; int8 uStack_40; int8 local_38; if (in_stack_00000018 == 3) { local_58 = 0; pvStack_50 = (void *)0x0; __n = strlen(param_2); json_next_value(param_1,&local_58,0); while (*(int *)(param_1 + 2) - 1U < 0xfffffffe) { if ((pvStack_50 != (void *)0x0 && __n == (local_58 & 0xffffffff)) && (iVar1 = bcmp(pvStack_50,param_2,__n), iVar1 == 0)) { return param_1; } json_next_value(&local_48,&local_58,1); param_1[2] = local_38; *param_1 = local_48; param_1[1] = uStack_40; } *param_1 = in_stack_00000008; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0xffffffff; } else { *param_1 = in_stack_00000008; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; } return param_1; }
29,049
bfdec_get_int32
bluesky950520[P]quickjs/libbf.c
int bfdec_get_int32(int *pres, const bfdec_t *a) { uint32_t v; int ret; if (a->expn >= BF_EXP_INF) { ret = 0; if (a->expn == BF_EXP_INF) { v = (uint32_t)INT32_MAX + a->sign; /* XXX: return overflow ? */ } else { v = INT32_MAX; } } else if (a->expn <= 0) { v = 0; ret = 0; } else if (a->expn <= 9) { v = fast_shr_dec(a->tab[a->len - 1], LIMB_DIGITS - a->expn); if (a->sign) v = -v; ret = 0; } else if (a->expn == 10) { uint64_t v1; uint32_t v_max; #if LIMB_BITS == 64 v1 = fast_shr_dec(a->tab[a->len - 1], LIMB_DIGITS - a->expn); #else v1 = (uint64_t)a->tab[a->len - 1] * 10 + get_digit(a->tab, a->len, (a->len - 1) * LIMB_DIGITS - 1); #endif v_max = (uint32_t)INT32_MAX + a->sign; if (v1 > v_max) { v = v_max; ret = BF_ST_OVERFLOW; } else { v = v1; if (a->sign) v = -v; ret = 0; } } else { v = (uint32_t)INT32_MAX + a->sign; ret = BF_ST_OVERFLOW; } *pres = v; return ret; }
O3
c
bfdec_get_int32: movabsq $0x7ffffffffffffffd, %rdx # imm = 0x7FFFFFFFFFFFFFFD movq 0x10(%rsi), %rcx cmpq %rdx, %rcx jle 0x91f5d incq %rdx movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %r8d, %r8d cmpq %rdx, %rcx jne 0x92021 addl 0x8(%rsi), %eax jmp 0x92021 xorl %r8d, %r8d testq %rcx, %rcx jle 0x91fba cmpq $0x9, %rcx ja 0x91fbe movq 0x18(%rsi), %rax movq 0x20(%rsi), %rdx movq -0x8(%rdx,%rax,8), %r9 movl $0x13, %r10d subl %ecx, %r10d shll $0x4, %r10d leaq 0x12844(%rip), %r11 # 0xa47d0 movq %r9, %rax mulq (%r10,%r11) subq %rdx, %r9 movb 0x8(%r10,%r11), %cl movb 0x9(%r10,%r11), %al shrq %cl, %r9 addq %rdx, %r9 movl %eax, %ecx shrq %cl, %r9 movl %r9d, %eax negl %eax cmpl $0x0, 0x8(%rsi) cmovel %r9d, %eax jmp 0x92021 xorl %eax, %eax jmp 0x92021 cmpq $0xa, %rcx jne 0x92013 movq 0x20(%rsi), %rax movq 0x18(%rsi), %rcx movq -0x8(%rax,%rcx,8), %rcx movabsq $0x12e0be826d694b2f, %rdx # imm = 0x12E0BE826D694B2F movq %rcx, %rax mulq %rdx subq %rdx, %rcx shrq %rcx addq %rdx, %rcx shrq $0x1d, %rcx movl 0x8(%rsi), %edx leal 0x7fffffff(%rdx), %esi movl %ecx, %eax negl %eax testl %edx, %edx cmovel %ecx, %eax xorl %r8d, %r8d cmpq %rsi, %rcx seta %r8b cmoval %esi, %eax shll $0x2, %r8d jmp 0x92021 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF addl 0x8(%rsi), %eax movl $0x4, %r8d movl %eax, (%rdi) movl %r8d, %eax retq
bfdec_get_int32: mov rdx, 7FFFFFFFFFFFFFFDh mov rcx, [rsi+10h] cmp rcx, rdx jle short loc_91F5D inc rdx mov eax, 7FFFFFFFh xor r8d, r8d cmp rcx, rdx jnz loc_92021 add eax, [rsi+8] jmp loc_92021 loc_91F5D: xor r8d, r8d test rcx, rcx jle short loc_91FBA cmp rcx, 9 ja short loc_91FBE mov rax, [rsi+18h] mov rdx, [rsi+20h] mov r9, [rdx+rax*8-8] mov r10d, 13h sub r10d, ecx shl r10d, 4 lea r11, mp_pow_div mov rax, r9 mul qword ptr [r10+r11] sub r9, rdx mov cl, [r10+r11+8] mov al, [r10+r11+9] shr r9, cl add r9, rdx mov ecx, eax shr r9, cl mov eax, r9d neg eax cmp dword ptr [rsi+8], 0 cmovz eax, r9d jmp short loc_92021 loc_91FBA: xor eax, eax jmp short loc_92021 loc_91FBE: cmp rcx, 0Ah jnz short loc_92013 mov rax, [rsi+20h] mov rcx, [rsi+18h] mov rcx, [rax+rcx*8-8] mov rdx, 12E0BE826D694B2Fh mov rax, rcx mul rdx sub rcx, rdx shr rcx, 1 add rcx, rdx shr rcx, 1Dh mov edx, [rsi+8] lea esi, [rdx+7FFFFFFFh] mov eax, ecx neg eax test edx, edx cmovz eax, ecx xor r8d, r8d cmp rcx, rsi setnbe r8b cmova eax, esi shl r8d, 2 jmp short loc_92021 loc_92013: mov eax, 7FFFFFFFh add eax, [rsi+8] mov r8d, 4 loc_92021: mov [rdi], eax mov eax, r8d retn
long long bfdec_get_int32(int *a1, long long a2) { long long v2; // rcx int v3; // eax unsigned int v4; // r8d long long v5; // r10 long long v6; // rdx unsigned long long v7; // rcx int v8; // edx unsigned long long v9; // rsi v2 = *(_QWORD *)(a2 + 16); if ( v2 <= 0x7FFFFFFFFFFFFFFDLL ) { v4 = 0; if ( v2 <= 0 ) { v3 = 0; } else if ( (unsigned long long)v2 > 9 ) { if ( v2 == 10 ) { v7 = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) / 0x3B9ACA00uLL; v8 = *(_DWORD *)(a2 + 8); v9 = (unsigned int)(v8 + 0x7FFFFFFF); v3 = -(int)v7; if ( !v8 ) v3 = v7; if ( v7 > v9 ) v3 = v8 + 0x7FFFFFFF; v4 = 4 * (v7 > v9); } else { v3 = *(_DWORD *)(a2 + 8) + 0x7FFFFFFF; v4 = 4; } } else { v5 = (unsigned int)(16 * (19 - v2)); v6 = (*(unsigned long long *)&mp_pow_div[v5] * (unsigned __int128)*(unsigned long long *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8)) >> 64; v3 = -(int)((v6 + ((unsigned long long)(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) - v6) >> mp_pow_div[v5 + 8])) >> mp_pow_div[v5 + 9]); if ( !*(_DWORD *)(a2 + 8) ) v3 = (v6 + ((unsigned long long)(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) - v6) >> mp_pow_div[v5 + 8])) >> mp_pow_div[v5 + 9]; } } else { v3 = 0x7FFFFFFF; v4 = 0; if ( v2 == 0x7FFFFFFFFFFFFFFELL ) v3 = *(_DWORD *)(a2 + 8) + 0x7FFFFFFF; } *a1 = v3; return v4; }
bfdec_get_int32: MOV RDX,0x7ffffffffffffffd MOV RCX,qword ptr [RSI + 0x10] CMP RCX,RDX JLE 0x00191f5d INC RDX MOV EAX,0x7fffffff XOR R8D,R8D CMP RCX,RDX JNZ 0x00192021 ADD EAX,dword ptr [RSI + 0x8] JMP 0x00192021 LAB_00191f5d: XOR R8D,R8D TEST RCX,RCX JLE 0x00191fba CMP RCX,0x9 JA 0x00191fbe MOV RAX,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RSI + 0x20] MOV R9,qword ptr [RDX + RAX*0x8 + -0x8] MOV R10D,0x13 SUB R10D,ECX SHL R10D,0x4 LEA R11,[0x1a47d0] MOV RAX,R9 MUL qword ptr [R10 + R11*0x1] SUB R9,RDX MOV CL,byte ptr [R10 + R11*0x1 + 0x8] MOV AL,byte ptr [R10 + R11*0x1 + 0x9] SHR R9,CL ADD R9,RDX MOV ECX,EAX SHR R9,CL MOV EAX,R9D NEG EAX CMP dword ptr [RSI + 0x8],0x0 CMOVZ EAX,R9D JMP 0x00192021 LAB_00191fba: XOR EAX,EAX JMP 0x00192021 LAB_00191fbe: CMP RCX,0xa JNZ 0x00192013 MOV RAX,qword ptr [RSI + 0x20] MOV RCX,qword ptr [RSI + 0x18] MOV RCX,qword ptr [RAX + RCX*0x8 + -0x8] MOV RDX,0x12e0be826d694b2f MOV RAX,RCX MUL RDX SUB RCX,RDX SHR RCX,0x1 ADD RCX,RDX SHR RCX,0x1d MOV EDX,dword ptr [RSI + 0x8] LEA ESI,[RDX + 0x7fffffff] MOV EAX,ECX NEG EAX TEST EDX,EDX CMOVZ EAX,ECX XOR R8D,R8D CMP RCX,RSI SETA R8B CMOVA EAX,ESI SHL R8D,0x2 JMP 0x00192021 LAB_00192013: MOV EAX,0x7fffffff ADD EAX,dword ptr [RSI + 0x8] MOV R8D,0x4 LAB_00192021: MOV dword ptr [RDI],EAX MOV EAX,R8D RET
int bfdec_get_int32(uint *param_1,long param_2) { ulong uVar1; int1 auVar2 [16]; int1 auVar3 [16]; uint uVar4; ulong uVar5; long lVar6; int iVar7; uint uVar8; uVar5 = *(ulong *)(param_2 + 0x10); if ((long)uVar5 < 0x7ffffffffffffffe) { iVar7 = 0; if ((long)uVar5 < 1) { uVar4 = 0; } else if (uVar5 < 10) { uVar1 = *(ulong *)(*(long *)(param_2 + 0x20) + -8 + *(long *)(param_2 + 0x18) * 8); uVar5 = (ulong)(uint)((0x13 - (int)uVar5) * 0x10); auVar2._8_8_ = 0; auVar2._0_8_ = uVar1; auVar3._8_8_ = 0; auVar3._0_8_ = *(ulong *)(mp_pow_div + uVar5); lVar6 = SUB168(auVar2 * auVar3,8); uVar8 = (uint)((uVar1 - lVar6 >> (mp_pow_div[uVar5 + 8] & 0x3f)) + lVar6 >> (mp_pow_div[uVar5 + 9] & 0x3f)); uVar4 = -uVar8; if (*(int *)(param_2 + 8) == 0) { uVar4 = uVar8; } } else if (uVar5 == 10) { uVar5 = *(ulong *)(*(long *)(param_2 + 0x20) + -8 + *(long *)(param_2 + 0x18) * 8) / 1000000000; uVar8 = *(int *)(param_2 + 8) + 0x7fffffff; uVar4 = -(uint)uVar5; if (*(int *)(param_2 + 8) == 0) { uVar4 = (uint)uVar5; } if (uVar8 < uVar5) { uVar4 = uVar8; } iVar7 = (uint)(uVar8 < uVar5) << 2; } else { iVar7 = 4; uVar4 = *(int *)(param_2 + 8) + 0x7fffffff; } } else { uVar4 = 0x7fffffff; iVar7 = 0; if (uVar5 == 0x7ffffffffffffffe) { uVar4 = *(int *)(param_2 + 8) + 0x7fffffff; iVar7 = 0; } } *param_1 = uVar4; return iVar7; }
29,050
OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::Resize(int, int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h
inline void SparseMatrix<REAL>::Resize(int numRows, int numCols, int numElementsToReserve) { _numRows = numRows; _numColumns = numCols; _numElements = 0; _rowOffsets.resize(0); _rowOffsets.resize(_numRows + 1, -1); _rowOffsets[0] = 0; if (numElementsToReserve > GetCapacity()) { _columns.resize(numElementsToReserve); _elements.resize(numElementsToReserve); } }
O2
c
OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::Resize(int, int, int): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl %ecx, %ebx movq %rdi, %r14 movl %esi, (%rdi) movl %edx, 0x4(%rdi) andl $0x0, 0x8(%rdi) leaq 0x10(%rdi), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x514b0 movslq (%r14), %rsi incq %rsi leaq 0xc(%rsp), %rdx orl $-0x1, (%rdx) movq %r15, %rdi callq 0x50850 movq 0x10(%r14), %rax andl $0x0, (%rax) movq 0x48(%r14), %rax subq 0x40(%r14), %rax shrq $0x3, %rax cmpl %ebx, %eax jge 0x695bf leaq 0x40(%r14), %r15 addq $0x28, %r14 movslq %ebx, %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x514b0 movq %r15, %rdi movq %rbx, %rsi callq 0x52900 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE6ResizeEiii: push r15 push r14 push rbx sub rsp, 10h mov ebx, ecx mov r14, rdi mov [rdi], esi mov [rdi+4], edx and dword ptr [rdi+8], 0 lea r15, [rdi+10h] mov rdi, r15 xor esi, esi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [r14] inc rsi lea rdx, [rsp+28h+var_1C] or dword ptr [rdx], 0FFFFFFFFh mov rdi, r15 call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&) mov rax, [r14+10h] and dword ptr [rax], 0 mov rax, [r14+48h] sub rax, [r14+40h] shr rax, 3 cmp eax, ebx jge short loc_695BF lea r15, [r14+40h] add r14, 28h ; '(' movsxd rbx, ebx mov rdi, r14 mov rsi, rbx call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rdi, r15 mov rsi, rbx call __ZNSt6vectorIdSaIdEE6resizeEm; std::vector<double>::resize(ulong) loc_695BF: add rsp, 10h pop rbx pop r14 pop r15 retn
long long OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(int *a1, int a2, int a3, int a4) { long long v5; // rsi long long result; // rax int v7[7]; // [rsp+Ch] [rbp-1Ch] BYREF *a1 = a2; a1[1] = a3; a1[2] = 0; std::vector<int>::resize(a1 + 4, 0LL); v5 = *a1 + 1LL; v7[0] = -1; std::vector<int>::resize(a1 + 4, v5, v7); **((_DWORD **)a1 + 2) = 0; result = (*((_QWORD *)a1 + 9) - *((_QWORD *)a1 + 8)) >> 3; if ( (int)result < a4 ) { std::vector<int>::resize(a1 + 10, a4); return std::vector<double>::resize(a1 + 16, a4); } return result; }
Resize: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBX,ECX MOV R14,RDI MOV dword ptr [RDI],ESI MOV dword ptr [RDI + 0x4],EDX AND dword ptr [RDI + 0x8],0x0 LEA R15,[RDI + 0x10] MOV RDI,R15 XOR ESI,ESI CALL 0x001514b0 MOVSXD RSI,dword ptr [R14] INC RSI LEA RDX,[RSP + 0xc] OR dword ptr [RDX],0xffffffff MOV RDI,R15 CALL 0x00150850 MOV RAX,qword ptr [R14 + 0x10] AND dword ptr [RAX],0x0 MOV RAX,qword ptr [R14 + 0x48] SUB RAX,qword ptr [R14 + 0x40] SHR RAX,0x3 CMP EAX,EBX JGE 0x001695bf LEA R15,[R14 + 0x40] ADD R14,0x28 MOVSXD RBX,EBX MOV RDI,R14 MOV RSI,RBX CALL 0x001514b0 MOV RDI,R15 MOV RSI,RBX CALL 0x00152900 LAB_001695bf: ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(int, int, int) */ void __thiscall OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize (SparseMatrix<double> *this,int param_1,int param_2,int param_3) { int local_1c; *(int *)this = param_1; *(int *)(this + 4) = param_2; *(int4 *)(this + 8) = 0; std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)(this + 0x10),0); local_1c = -1; std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x10),(long)*(int *)this + 1,&local_1c); **(int4 **)(this + 0x10) = 0; if ((int)((ulong)(*(long *)(this + 0x48) - *(long *)(this + 0x40)) >> 3) < param_3) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x28),(long)param_3); std::vector<double,std::allocator<double>>::resize ((vector<double,std::allocator<double>> *)(this + 0x40),(long)param_3); } return; }
29,051
ParseInit
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/tool/parse.c
int ParseInit (void) { uint32_t i; struct clist * np ; _parser_strings = collection_init (heapParser, 43); _parser_declared = collection_init (heapParser, 83); _parser_declared_local = collection_init (heapParser, 31) ; _parser_undeclared = collection_init (heapParser, 5); _parser_reserved = collection_init (heapParser, 43); for (i = 0; i < sizeof(ReservedWords) / sizeof(struct ReservedWord); i++) { np = collection_install_size( _parser_reserved, ReservedWords[i].Word, 0, sizeof(unsigned int)); if (!np) return ENGINE_NOMEM ; *(unsigned int*)collection_get_value (_parser_reserved, np) = ReservedWords[i].Token ; } struct Value Value ; parse_install_identifier(_parser_declared, "a", 0, parseVariable, ENGINE_VARIABLE_ACCUMULATOR, &Value) ; parse_install_identifier(_parser_declared, "r", 0, parseVariable, ENGINE_VARIABLE_REGISTER, &Value) ; parse_install_identifier(_parser_declared, "p", 0, parseVariable, ENGINE_VARIABLE_PARAMETER, &Value) ; parse_install_identifier(_parser_declared, "e", 0, parseVariable, ENGINE_VARIABLE_EVENT, &Value) ; _parser_events = STATES_EVENT_DECL_START ; _parser_variables = 0 ; _parser_statemachines = 0 ; return 0 ; }
O3
c
ParseInit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl $0x1, %edi movl $0x2b, %esi callq 0xa598 movq %rax, 0x3255c(%rip) # 0x3f0b8 movl $0x1, %edi movl $0x53, %esi callq 0xa598 movq %rax, 0x3255e(%rip) # 0x3f0d0 movl $0x1, %edi movl $0x1f, %esi callq 0xa598 movq %rax, 0x32538(%rip) # 0x3f0c0 movl $0x1, %edi movl $0x5, %esi callq 0xa598 movq %rax, 0x3252a(%rip) # 0x3f0c8 movl $0x1, %edi movl $0x2b, %esi callq 0xa598 movq %rax, 0x32524(%rip) # 0x3f0d8 movl $0x8, %ebx leaq 0x30ae0(%rip), %r14 # 0x3d6a0 movq 0x32511(%rip), %rdi # 0x3f0d8 movq -0x8(%rbx,%r14), %rsi xorl %edx, %edx movl $0x4, %ecx callq 0xa5ed testq %rax, %rax je 0xccac movl (%rbx,%r14), %r15d movq 0x324ec(%rip), %rdi # 0x3f0d8 movq %rax, %rsi callq 0xaa03 movl %r15d, (%rax) addq $0x10, %rbx cmpq $0x198, %rbx # imm = 0x198 jne 0xcbc0 movq 0x324c5(%rip), %rdi # 0x3f0d0 leaq 0x190e5(%rip), %rsi # 0x25cf7 xorl %ebx, %ebx leaq -0x30(%rbp), %r14 xorl %edx, %edx movl $0x2, %ecx xorl %r8d, %r8d movq %r14, %r9 callq 0xccbe movq 0x3249f(%rip), %rdi # 0x3f0d0 leaq 0x192d2(%rip), %rsi # 0x25f0a xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movq %r14, %r9 callq 0xccbe movq 0x3247c(%rip), %rdi # 0x3f0d0 leaq 0x17deb(%rip), %rsi # 0x24a46 xorl %edx, %edx movl $0x2, %ecx movl $0x2, %r8d movq %r14, %r9 callq 0xccbe movq 0x32459(%rip), %rdi # 0x3f0d0 leaq 0x1a27b(%rip), %rsi # 0x26ef9 xorl %edx, %edx movl $0x2, %ecx movl $0x3, %r8d movq %r14, %r9 callq 0xccbe movw $0x700, 0x316d4(%rip) # imm = 0x700 movw %bx, 0x3243d(%rip) # 0x3f0e0 movw %bx, 0x32438(%rip) # 0x3f0e2 jmp 0xccb1 movl $0xfffffff8, %ebx # imm = 0xFFFFFFF8 movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ParseInit: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov edi, 1 mov esi, 2Bh ; '+' call collection_init mov cs:_parser_strings, rax mov edi, 1 mov esi, 53h ; 'S' call collection_init mov cs:_parser_declared, rax mov edi, 1 mov esi, 1Fh call collection_init mov cs:_parser_declared_local, rax mov edi, 1 mov esi, 5 call collection_init mov cs:_parser_undeclared, rax mov edi, 1 mov esi, 2Bh ; '+' call collection_init mov cs:_parser_reserved, rax mov ebx, 8 lea r14, ReservedWords loc_CBC0: mov rdi, cs:_parser_reserved mov rsi, [rbx+r14-8] xor edx, edx mov ecx, 4 call collection_install_size test rax, rax jz loc_CCAC mov r15d, [rbx+r14] mov rdi, cs:_parser_reserved mov rsi, rax call collection_get_value mov [rax], r15d add rbx, 10h cmp rbx, 198h jnz short loc_CBC0 mov rdi, cs:_parser_declared lea rsi, aA; "a" xor ebx, ebx lea r14, [rbp+var_30] xor edx, edx mov ecx, 2 xor r8d, r8d mov r9, r14 call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aEventIfR+9; "r" xor edx, edx mov ecx, 2 mov r8d, 1 mov r9, r14 call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aASwap+5; "p" xor edx, edx mov ecx, 2 mov r8d, 2 mov r9, r14 call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aTictactoeE+0Ah; "e" xor edx, edx mov ecx, 2 mov r8d, 3 mov r9, r14 call parse_install_identifier mov cs:_parser_events, 700h mov cs:_parser_variables, bx mov cs:_parser_statemachines, bx jmp short loc_CCB1 loc_CCAC: mov ebx, 0FFFFFFF8h loc_CCB1: mov eax, ebx add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long ParseInit() { long long v0; // rbx int v1; // r15d unsigned int v2; // ebx _BYTE v4[48]; // [rsp+0h] [rbp-30h] BYREF parser_strings = collection_init(1LL, 0x2Bu); parser_declared = collection_init(1LL, 0x53u); parser_declared_local = collection_init(1LL, 0x1Fu); parser_undeclared = collection_init(1LL, 5u); parser_reserved = collection_init(1LL, 0x2Bu); v0 = 1LL; while ( collection_install_size((_DWORD *)parser_reserved, (long long)(&ReservedWords)[v0 - 1], 0, 4u) ) { v1 = (int)(&ReservedWords)[v0]; *(_DWORD *)collection_get_value(parser_reserved) = v1; v0 += 2LL; if ( v0 == 51 ) { v2 = 0; parse_install_identifier(parser_declared, aA, 0LL, 2LL, 0LL, v4); parse_install_identifier(parser_declared, &aEventIfR[9], 0LL, 2LL, 1LL, v4); parse_install_identifier(parser_declared, &aASwap[5], 0LL, 2LL, 2LL, v4); parse_install_identifier(parser_declared, &aTictactoeE[10], 0LL, 2LL, 3LL, v4); parser_events = 1792; parser_variables = 0; parser_statemachines = 0; return v2; } } return (unsigned int)-8; }
ParseInit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV EDI,0x1 MOV ESI,0x2b CALL 0x0010a598 MOV qword ptr [0x0013f0b8],RAX MOV EDI,0x1 MOV ESI,0x53 CALL 0x0010a598 MOV qword ptr [0x0013f0d0],RAX MOV EDI,0x1 MOV ESI,0x1f CALL 0x0010a598 MOV qword ptr [0x0013f0c0],RAX MOV EDI,0x1 MOV ESI,0x5 CALL 0x0010a598 MOV qword ptr [0x0013f0c8],RAX MOV EDI,0x1 MOV ESI,0x2b CALL 0x0010a598 MOV qword ptr [0x0013f0d8],RAX MOV EBX,0x8 LEA R14,[0x13d6a0] LAB_0010cbc0: MOV RDI,qword ptr [0x0013f0d8] MOV RSI,qword ptr [RBX + R14*0x1 + -0x8] XOR EDX,EDX MOV ECX,0x4 CALL 0x0010a5ed TEST RAX,RAX JZ 0x0010ccac MOV R15D,dword ptr [RBX + R14*0x1] MOV RDI,qword ptr [0x0013f0d8] MOV RSI,RAX CALL 0x0010aa03 MOV dword ptr [RAX],R15D ADD RBX,0x10 CMP RBX,0x198 JNZ 0x0010cbc0 MOV RDI,qword ptr [0x0013f0d0] LEA RSI,[0x125cf7] XOR EBX,EBX LEA R14,[RBP + -0x30] XOR EDX,EDX MOV ECX,0x2 XOR R8D,R8D MOV R9,R14 CALL 0x0010ccbe MOV RDI,qword ptr [0x0013f0d0] LEA RSI,[0x125f0a] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x1 MOV R9,R14 CALL 0x0010ccbe MOV RDI,qword ptr [0x0013f0d0] LEA RSI,[0x124a46] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x2 MOV R9,R14 CALL 0x0010ccbe MOV RDI,qword ptr [0x0013f0d0] LEA RSI,[0x126ef9] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x3 MOV R9,R14 CALL 0x0010ccbe MOV word ptr [0x0013e370],0x700 MOV word ptr [0x0013f0e0],BX MOV word ptr [0x0013f0e2],BX JMP 0x0010ccb1 LAB_0010ccac: MOV EBX,0xfffffff8 LAB_0010ccb1: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
int8 ParseInit(void) { int4 uVar1; long lVar2; int4 *puVar3; long lVar4; int1 local_38 [24]; _parser_strings = collection_init(1,0x2b); _parser_declared = collection_init(1,0x53); _parser_declared_local = collection_init(1,0x1f); _parser_undeclared = collection_init(1,5); _parser_reserved = collection_init(1,0x2b); lVar4 = 8; do { lVar2 = collection_install_size (_parser_reserved,*(int8 *)(collection_init_str_key + lVar4 + 0x28),0,4) ; if (lVar2 == 0) { return 0xfffffff8; } uVar1 = *(int4 *)((long)&ReservedWords + lVar4); puVar3 = (int4 *)collection_get_value(_parser_reserved,lVar2); *puVar3 = uVar1; lVar4 = lVar4 + 0x10; } while (lVar4 != 0x198); parse_install_identifier(_parser_declared,&DAT_00125cf7,0,2,0,local_38); parse_install_identifier(_parser_declared,s_event_if_r_00125f01 + 9,0,2,1,local_38); parse_install_identifier(_parser_declared,&DAT_00124a46,0,2,2,local_38); parse_install_identifier(_parser_declared,s_tictactoe_e_00126eef + 10,0,2,3,local_38); _parser_statemachines = 0; _parser_variables = 0; _parser_events = 0x700; return 0; }
29,052
exchange_int64s
bluesky950520[P]quickjs/cutils.c
static void exchange_int64s(void *a, void *b, size_t size) { uint64_t *ap = (uint64_t *)a; uint64_t *bp = (uint64_t *)b; for (size /= sizeof(uint64_t); size-- != 0;) { uint64_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O1
c
exchange_int64s: cmpq $0x8, %rdx jb 0x1c90a shrq $0x3, %rdx xorl %eax, %eax movq (%rdi,%rax,8), %rcx movq (%rsi,%rax,8), %r8 movq %r8, (%rdi,%rax,8) movq %rcx, (%rsi,%rax,8) incq %rax cmpq %rax, %rdx jne 0x1c8f2 retq
exchange_int64s: cmp rdx, 8 jb short locret_1C90A shr rdx, 3 xor eax, eax loc_1C8F2: mov rcx, [rdi+rax*8] mov r8, [rsi+rax*8] mov [rdi+rax*8], r8 mov [rsi+rax*8], rcx inc rax cmp rdx, rax jnz short loc_1C8F2 locret_1C90A: retn
void exchange_int64s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long v4; // rax long long v5; // rcx if ( a3 >= 8 ) { v3 = a3 >> 3; v4 = 0LL; do { v5 = *(_QWORD *)(a1 + 8 * v4); *(_QWORD *)(a1 + 8 * v4) = *(_QWORD *)(a2 + 8 * v4); *(_QWORD *)(a2 + 8 * v4++) = v5; } while ( v3 != v4 ); } }
29,053
exchange_int64s
bluesky950520[P]quickjs/cutils.c
static void exchange_int64s(void *a, void *b, size_t size) { uint64_t *ap = (uint64_t *)a; uint64_t *bp = (uint64_t *)b; for (size /= sizeof(uint64_t); size-- != 0;) { uint64_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O2
c
exchange_int64s: shrq $0x3, %rdx xorl %eax, %eax cmpq %rax, %rdx je 0x16f16 movq (%rdi,%rax,8), %rcx movq (%rsi,%rax,8), %r8 movq %r8, (%rdi,%rax,8) movq %rcx, (%rsi,%rax,8) incq %rax jmp 0x16efc retq
exchange_int64s: shr rdx, 3 xor eax, eax loc_16EFC: cmp rdx, rax jz short locret_16F16 mov rcx, [rdi+rax*8] mov r8, [rsi+rax*8] mov [rdi+rax*8], r8 mov [rsi+rax*8], rcx inc rax jmp short loc_16EFC locret_16F16: retn
long long exchange_int64s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long result; // rax long long v5; // rcx v3 = a3 >> 3; for ( result = 0LL; v3 != result; ++result ) { v5 = *(_QWORD *)(a1 + 8 * result); *(_QWORD *)(a1 + 8 * result) = *(_QWORD *)(a2 + 8 * result); *(_QWORD *)(a2 + 8 * result) = v5; } return result; }
exchange_int64s: SHR RDX,0x3 XOR EAX,EAX LAB_00116efc: CMP RDX,RAX JZ 0x00116f16 MOV RCX,qword ptr [RDI + RAX*0x8] MOV R8,qword ptr [RSI + RAX*0x8] MOV qword ptr [RDI + RAX*0x8],R8 MOV qword ptr [RSI + RAX*0x8],RCX INC RAX JMP 0x00116efc LAB_00116f16: RET
void exchange_int64s(long param_1,long param_2,ulong param_3) { int8 uVar1; ulong uVar2; for (uVar2 = 0; param_3 >> 3 != uVar2; uVar2 = uVar2 + 1) { uVar1 = *(int8 *)(param_1 + uVar2 * 8); *(int8 *)(param_1 + uVar2 * 8) = *(int8 *)(param_2 + uVar2 * 8); *(int8 *)(param_2 + uVar2 * 8) = uVar1; } return; }
29,054
exchange_int64s
bluesky950520[P]quickjs/cutils.c
static void exchange_int64s(void *a, void *b, size_t size) { uint64_t *ap = (uint64_t *)a; uint64_t *bp = (uint64_t *)b; for (size /= sizeof(uint64_t); size-- != 0;) { uint64_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O3
c
exchange_int64s: cmpq $0x8, %rdx jb 0x1d208 shrq $0x3, %rdx xorl %eax, %eax movq (%rdi,%rax,8), %rcx movq (%rsi,%rax,8), %r8 movq %r8, (%rdi,%rax,8) movq %rcx, (%rsi,%rax,8) incq %rax cmpq %rax, %rdx jne 0x1d1f0 retq
exchange_int64s: cmp rdx, 8 jb short locret_1D208 shr rdx, 3 xor eax, eax loc_1D1F0: mov rcx, [rdi+rax*8] mov r8, [rsi+rax*8] mov [rdi+rax*8], r8 mov [rsi+rax*8], rcx inc rax cmp rdx, rax jnz short loc_1D1F0 locret_1D208: retn
void exchange_int64s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long v4; // rax long long v5; // rcx if ( a3 >= 8 ) { v3 = a3 >> 3; v4 = 0LL; do { v5 = *(_QWORD *)(a1 + 8 * v4); *(_QWORD *)(a1 + 8 * v4) = *(_QWORD *)(a2 + 8 * v4); *(_QWORD *)(a2 + 8 * v4++) = v5; } while ( v3 != v4 ); } }
exchange_int64s: CMP RDX,0x8 JC 0x0011d208 SHR RDX,0x3 XOR EAX,EAX LAB_0011d1f0: MOV RCX,qword ptr [RDI + RAX*0x8] MOV R8,qword ptr [RSI + RAX*0x8] MOV qword ptr [RDI + RAX*0x8],R8 MOV qword ptr [RSI + RAX*0x8],RCX INC RAX CMP RDX,RAX JNZ 0x0011d1f0 LAB_0011d208: RET
void exchange_int64s(long param_1,long param_2,ulong param_3) { int8 uVar1; ulong uVar2; if (7 < param_3) { uVar2 = 0; do { uVar1 = *(int8 *)(param_1 + uVar2 * 8); *(int8 *)(param_1 + uVar2 * 8) = *(int8 *)(param_2 + uVar2 * 8); *(int8 *)(param_2 + uVar2 * 8) = uVar1; uVar2 = uVar2 + 1; } while (param_3 >> 3 != uVar2); } return; }
29,055
ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/inverted.cpp
void Render(Screen& screen) override { Node::Render(screen); for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { screen.PixelAt(x, y).inverted ^= true; } } }
O0
cpp
ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x20(%rbp) movq -0x10(%rbp), %rsi callq 0x446a0 movq -0x20(%rbp), %rax movl 0x54(%rax), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rcx movl -0x14(%rbp), %eax cmpl 0x58(%rcx), %eax jg 0x85c6a movq -0x20(%rbp), %rax movl 0x4c(%rax), %eax movl %eax, -0x18(%rbp) movq -0x20(%rbp), %rcx movl -0x18(%rbp), %eax cmpl 0x50(%rcx), %eax jg 0x85c5d movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x14(%rbp), %edx callq 0x882f0 movb (%rax), %cl shrb $0x3, %cl andb $0x1, %cl andb $0x1, %cl movzbl %cl, %ecx xorl $0x1, %ecx cmpl $0x0, %ecx setne %dl andb $0x1, %dl movb (%rax), %cl shlb $0x3, %dl andb $-0x9, %cl orb %dl, %cl movb %cl, (%rax) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x85c11 jmp 0x85c5f movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x85bfb addq $0x20, %rsp popq %rbp retq
_ZN5ftxui12_GLOBAL__N_18Inverted6RenderERNS_6ScreenE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; this mov [rbp+var_20], rdi mov rsi, [rbp+var_10]; ftxui::Screen * call _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &) mov rax, [rbp+var_20] mov eax, [rax+54h] mov [rbp+var_14], eax loc_85BFB: mov rcx, [rbp+var_20] mov eax, [rbp+var_14] cmp eax, [rcx+58h] jg short loc_85C6A mov rax, [rbp+var_20] mov eax, [rax+4Ch] mov [rbp+var_18], eax loc_85C11: mov rcx, [rbp+var_20] mov eax, [rbp+var_18] cmp eax, [rcx+50h] jg short loc_85C5D mov rdi, [rbp+var_10]; this mov esi, [rbp+var_18]; int mov edx, [rbp+var_14]; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov cl, [rax] shr cl, 3 and cl, 1 and cl, 1 movzx ecx, cl xor ecx, 1 cmp ecx, 0 setnz dl and dl, 1 mov cl, [rax] shl dl, 3 and cl, 0F7h or cl, dl mov [rax], cl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_85C11 loc_85C5D: jmp short $+2 loc_85C5F: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_85BFB loc_85C6A: add rsp, 20h pop rbp retn
long long ftxui::`anonymous namespace'::Inverted::Render( ftxui::_anonymous_namespace_::Inverted *this, ftxui::Screen *a2) { long long result; // rax _BYTE *v3; // rax int j; // [rsp+8h] [rbp-18h] int i; // [rsp+Ch] [rbp-14h] ftxui::Node::Render(this, a2); for ( i = *((_DWORD *)this + 21); ; ++i ) { result = (unsigned int)i; if ( i > *((_DWORD *)this + 22) ) break; for ( j = *((_DWORD *)this + 19); j <= *((_DWORD *)this + 20); ++j ) { v3 = (_BYTE *)ftxui::Screen::PixelAt(a2, j, i); *v3 = (8 * ((*v3 & 8) == 0)) | *v3 & 0xF7; } } return result; }
Render: 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 + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV RSI,qword ptr [RBP + -0x10] CALL 0x001446a0 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x54] MOV dword ptr [RBP + -0x14],EAX LAB_00185bfb: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RCX + 0x58] JG 0x00185c6a MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4c] MOV dword ptr [RBP + -0x18],EAX LAB_00185c11: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x50] JG 0x00185c5d MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x14] CALL 0x001882f0 MOV CL,byte ptr [RAX] SHR CL,0x3 AND CL,0x1 AND CL,0x1 MOVZX ECX,CL XOR ECX,0x1 CMP ECX,0x0 SETNZ DL AND DL,0x1 MOV CL,byte ptr [RAX] SHL DL,0x3 AND CL,0xf7 OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x00185c11 LAB_00185c5d: JMP 0x00185c5f LAB_00185c5f: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00185bfb LAB_00185c6a: ADD RSP,0x20 POP RBP RET
/* ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::Inverted::Render(Inverted *this,Screen *param_1) { byte *pbVar1; int local_20; int local_1c; Node::Render((Node *)this,param_1); for (local_1c = *(int *)(this + 0x54); local_1c <= *(int *)(this + 0x58); local_1c = local_1c + 1) { for (local_20 = *(int *)(this + 0x4c); local_20 <= *(int *)(this + 0x50); local_20 = local_20 + 1) { pbVar1 = (byte *)Screen::PixelAt(param_1,local_20,local_1c); *pbVar1 = *pbVar1 & 0xf7 | ((*pbVar1 >> 3 & 1) != 1) << 3; } } return; }
29,056
mysql_rollback_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_rollback_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_rollback, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_rollback_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x48a30 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_rollback_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_rollback mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_rollback_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_rollback(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_rollback_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00148a30 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_rollback_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_rollback(*param_1); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
29,057
google::protobuf::compiler::CodeGeneratorRequest::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc
void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { auto* const _this = static_cast<CodeGeneratorRequest*>(&to_msg); auto& from = static_cast<const CodeGeneratorRequest&>(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; _this->_impl_.file_to_generate_.MergeFrom(from._impl_.file_to_generate_); _this->_impl_.proto_file_.MergeFrom(from._impl_.proto_file_); cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { _this->_internal_set_parameter(from._internal_parameter()); } if (cached_has_bits & 0x00000002u) { _this->_internal_mutable_compiler_version()->::PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom( from._internal_compiler_version()); } } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); }
O0
cpp
google::protobuf::compiler::CodeGeneratorRequest::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0xb8(%rsp) movq %rsi, 0xb0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xa0(%rsp) xorl %eax, %eax testb $0x1, %al jne 0xab5b2 jmp 0xab65c movq 0xa0(%rsp), %rax movq 0xa8(%rsp), %rcx movb $0x0, 0x67(%rsp) cmpq %rcx, %rax je 0xab5ce jmp 0xab61e leaq 0x30a440(%rip), %rdx # 0x3b5a15 leaq 0x68(%rsp), %rdi movq %rdi, 0x38(%rsp) movl $0x3, %esi movl $0x357, %ecx # imm = 0x357 callq 0x219560 movq 0x38(%rsp), %rdi movb $0x1, 0x67(%rsp) leaq 0x30a485(%rip), %rsi # 0x3b5a84 callq 0x218e20 movq %rax, 0x40(%rsp) jmp 0xab60b movq 0x40(%rsp), %rsi leaq 0x53(%rsp), %rdi callq 0x218fd0 jmp 0xab61c jmp 0xab61e testb $0x1, 0x67(%rsp) jne 0xab627 jmp 0xab631 leaq 0x68(%rsp), %rdi callq 0x2195a0 jmp 0xab5a7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) testb $0x1, 0x67(%rsp) jne 0xab64d jmp 0xab657 leaq 0x68(%rsp), %rdi callq 0x2195a0 jmp 0xab8e1 movl $0x0, 0x4c(%rsp) movq 0xa8(%rsp), %rdi addq $0x10, %rdi addq $0x8, %rdi movq 0xa0(%rsp), %rsi addq $0x10, %rsi addq $0x8, %rsi callq 0x211740 movq 0xa8(%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi movq 0xa0(%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi callq 0xafdb0 movq 0xa0(%rsp), %rax addq $0x10, %rax movq %rax, 0xd8(%rsp) movl $0x0, 0xd4(%rsp) movq 0xd8(%rsp), %rax movslq 0xd4(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax andl $0x3, %eax cmpl $0x0, %eax je 0xab7dc movl 0x4c(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xab7a2 movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0xa0(%rsp), %rdi callq 0xaf7d0 movq 0x20(%rsp), %rcx movq %rcx, 0x110(%rsp) movq %rax, 0x108(%rsp) movq 0x110(%rsp), %rdi movq %rdi, %rax addq $0x10, %rax movq %rax, 0x120(%rsp) movl $0x0, 0x11c(%rsp) movq 0x120(%rsp), %rax movslq 0x11c(%rsp), %rcx movl (%rax,%rcx,4), %edx orl $0x1, %edx movl %edx, (%rax,%rcx,4) movq %rdi, %rax addq $0x10, %rax addq $0x38, %rax movq %rax, 0x28(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x30(%rsp) callq 0x292e0 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rax, %rdx callq 0x1e7090 movl 0x4c(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xab7da movq 0xa8(%rsp), %rdi callq 0x3d1c0 movq %rax, 0x18(%rsp) movq 0xa0(%rsp), %rdi callq 0xafde0 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0xaf580 jmp 0xab7dc movq 0xa8(%rsp), %rcx addq $0x8, %rcx movq 0xa0(%rsp), %rax addq $0x8, %rax movq %rcx, 0xc8(%rsp) movq %rax, 0xc0(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xab8d9 movq 0xc0(%rsp), %rax movq %rax, 0xf0(%rsp) movq $0x0, 0xe8(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x100(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x128(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xab8b8 movq 0x8(%rsp), %rdi callq 0xb1a70 addq $0x8, %rax movq %rax, 0xf8(%rsp) jmp 0xab8c7 callq *0xe8(%rsp) movq %rax, 0xf8(%rsp) movq 0x10(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0xb25d0 addq $0x138, %rsp # imm = 0x138 retq movq 0x58(%rsp), %rdi callq 0x21700 nopl (%rax,%rax)
_ZN6google8protobuf8compiler20CodeGeneratorRequest9MergeImplERNS0_7MessageERKS3_: sub rsp, 138h mov [rsp+138h+var_80], rdi mov [rsp+138h+var_88], rsi mov rax, [rsp+138h+var_80] mov [rsp+138h+var_90], rax mov rax, [rsp+138h+var_88] mov [rsp+138h+var_98], rax loc_AB5A7: xor eax, eax test al, 1 jnz short loc_AB5B2 jmp loc_AB65C loc_AB5B2: mov rax, [rsp+138h+var_98] mov rcx, [rsp+138h+var_90] mov [rsp+138h+var_D1], 0 cmp rax, rcx jz short loc_AB5CE jmp short loc_AB61E loc_AB5CE: lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_D0] mov [rsp+138h+var_100], rdi mov esi, 3 mov ecx, 357h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_100] mov [rsp+138h+var_D1], 1 lea rsi, aCheckFailedFro; "CHECK failed: (&from) != (_this): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_F8], rax jmp short $+2 loc_AB60B: mov rsi, [rsp+138h+var_F8] lea rdi, [rsp+138h+var_E5] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_AB61C: jmp short $+2 loc_AB61E: test [rsp+138h+var_D1], 1 jnz short loc_AB627 jmp short loc_AB631 loc_AB627: lea rdi, [rsp+138h+var_D0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_AB631: jmp loc_AB5A7 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax test [rsp+arg_5F], 1 jnz short loc_AB64D jmp short loc_AB657 loc_AB64D: lea rdi, [rsp+arg_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_AB657: jmp loc_AB8E1 loc_AB65C: mov [rsp+138h+var_EC], 0 mov rdi, [rsp+138h+var_90] add rdi, 10h add rdi, 8 mov rsi, [rsp+138h+var_98] add rsi, 10h add rsi, 8 call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE9MergeFromERKS8_; google::protobuf::RepeatedPtrField<std::string>::MergeFrom(google::protobuf::RepeatedPtrField<std::string> const&) mov rdi, [rsp+138h+var_90] add rdi, 10h add rdi, 20h ; ' ' mov rsi, [rsp+138h+var_98] add rsi, 10h add rsi, 20h ; ' ' call _ZN6google8protobuf16RepeatedPtrFieldINS0_19FileDescriptorProtoEE9MergeFromERKS3_; google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::MergeFrom(google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto> const&) mov rax, [rsp+138h+var_98] add rax, 10h mov [rsp+138h+var_60], rax mov [rsp+138h+var_64], 0 mov rax, [rsp+138h+var_60] movsxd rcx, [rsp+138h+var_64] mov eax, [rax+rcx*4] mov [rsp+138h+var_EC], eax mov eax, [rsp+138h+var_EC] and eax, 3 cmp eax, 0 jz loc_AB7DC mov eax, [rsp+138h+var_EC] and eax, 1 cmp eax, 0 jz loc_AB7A2 mov rax, [rsp+138h+var_90] mov [rsp+138h+var_118], rax mov rdi, [rsp+138h+var_98] call _ZNK6google8protobuf8compiler20CodeGeneratorRequest19_internal_parameterB5cxx11Ev; google::protobuf::compiler::CodeGeneratorRequest::_internal_parameter(void) mov rcx, [rsp+138h+var_118] mov [rsp+138h+var_28], rcx mov [rsp+138h+var_30], rax mov rdi, [rsp+138h+var_28]; this mov rax, rdi add rax, 10h mov [rsp+138h+var_18], rax mov [rsp+138h+var_1C], 0 mov rax, [rsp+138h+var_18] movsxd rcx, [rsp+138h+var_1C] mov edx, [rax+rcx*4] or edx, 1 mov [rax+rcx*4], edx mov rax, rdi add rax, 10h add rax, 38h ; '8' mov qword ptr [rsp+138h+var_110], rax mov rax, [rsp+138h+var_30] mov qword ptr [rsp+138h+var_108], rax call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov rdi, qword ptr [rsp+138h+var_110]; int mov rsi, qword ptr [rsp+138h+var_108]; int mov rdx, rax; int call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *) loc_AB7A2: mov eax, [rsp+138h+var_EC] and eax, 2 cmp eax, 0 jz short loc_AB7DA mov rdi, [rsp+138h+var_90]; this call _ZN6google8protobuf8compiler20CodeGeneratorRequest34_internal_mutable_compiler_versionEv; google::protobuf::compiler::CodeGeneratorRequest::_internal_mutable_compiler_version(void) mov [rsp+138h+var_120], rax mov rdi, [rsp+138h+var_98]; this call _ZNK6google8protobuf8compiler20CodeGeneratorRequest26_internal_compiler_versionEv; google::protobuf::compiler::CodeGeneratorRequest::_internal_compiler_version(void) mov rdi, [rsp+138h+var_120]; this mov rsi, rax; google::protobuf::compiler::Version * call _ZN6google8protobuf8compiler7Version9MergeFromERKS2_; google::protobuf::compiler::Version::MergeFrom(google::protobuf::compiler::Version const&) loc_AB7DA: jmp short $+2 loc_AB7DC: mov rcx, [rsp+138h+var_90] add rcx, 8 mov rax, [rsp+138h+var_98] add rax, 8 mov [rsp+138h+var_70], rcx mov [rsp+138h+var_78], rax mov rax, [rsp+138h+var_70] mov [rsp+138h+var_128], rax mov rax, [rsp+138h+var_78] mov [rsp+138h+var_58], rax mov rax, [rsp+138h+var_58] mov [rsp+138h+var_8], rax mov rax, [rsp+138h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_AB8D9 mov rax, [rsp+138h+var_78] mov [rsp+138h+var_48], rax mov [rsp+138h+var_50], 0 mov rax, [rsp+138h+var_48] mov [rsp+138h+var_130], rax mov [rsp+138h+var_38], rax mov rax, [rsp+138h+var_38] mov [rsp+138h+var_10], rax mov rax, [rsp+138h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_AB8B8 mov rdi, [rsp+138h+var_130] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov qword ptr [rsp+138h+var_40], rax jmp short loc_AB8C7 loc_AB8B8: call [rsp+138h+var_50] mov qword ptr [rsp+138h+var_40], rax loc_AB8C7: mov rdi, [rsp+138h+var_128]; void * mov rsi, qword ptr [rsp+138h+var_40]; int call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) loc_AB8D9: add rsp, 138h retn loc_AB8E1: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long google::protobuf::compiler::CodeGeneratorRequest::MergeImpl( google::protobuf::compiler::CodeGeneratorRequest *this, google::protobuf::Message *a2, const google::protobuf::Message *a3) { int ArenaForAllocation; // eax google::protobuf::compiler::Version *v4; // rdi const google::protobuf::compiler::Version *v5; // rsi long long result; // rax int v7; // [rsp+4Ch] [rbp-ECh] _QWORD *v10; // [rsp+C0h] [rbp-78h] int v11[2]; // [rsp+F8h] [rbp-40h] int v12; // [rsp+108h] [rbp-30h] google::protobuf::RepeatedPtrField<std::string>::MergeFrom((char *)this + 24, (char *)a2 + 24, a3); google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::MergeFrom( (char *)this + 48, (char *)a2 + 48); v7 = *((_DWORD *)a2 + 4); if ( (v7 & 3) != 0 ) { if ( (v7 & 1) != 0 ) { v12 = google::protobuf::compiler::CodeGeneratorRequest::_internal_parameter[abi:cxx11](a2); *((_DWORD *)this + 4) |= 1u; ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this); google::protobuf::internal::ArenaStringPtr::Set((_DWORD)this + 72, v12, ArenaForAllocation); } if ( (v7 & 2) != 0 ) { v4 = (google::protobuf::compiler::Version *)google::protobuf::compiler::CodeGeneratorRequest::_internal_mutable_compiler_version(this); v5 = (const google::protobuf::compiler::Version *)google::protobuf::compiler::CodeGeneratorRequest::_internal_compiler_version(a2); google::protobuf::compiler::Version::MergeFrom(v4, v5); } } v10 = (_QWORD *)((char *)a2 + 8); result = *((_QWORD *)a2 + 1) & 1LL; if ( result ) { if ( (*v10 & 1LL) != 0 ) *(_QWORD *)v11 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v10) + 8; else v11[0] = ((long long (*)(void))dword_0)(); return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (char *)this + 8, v11[0]); } return result; }
MergeImpl: SUB RSP,0x138 MOV qword ptr [RSP + 0xb8],RDI MOV qword ptr [RSP + 0xb0],RSI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xa0],RAX LAB_001ab5a7: XOR EAX,EAX TEST AL,0x1 JNZ 0x001ab5b2 JMP 0x001ab65c LAB_001ab5b2: MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] MOV byte ptr [RSP + 0x67],0x0 CMP RAX,RCX JZ 0x001ab5ce JMP 0x001ab61e LAB_001ab5ce: LEA RDX,[0x4b5a15] LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x38],RDI MOV ESI,0x3 MOV ECX,0x357 CALL 0x00319560 MOV RDI,qword ptr [RSP + 0x38] MOV byte ptr [RSP + 0x67],0x1 LAB_001ab5f8: LEA RSI,[0x4b5a84] CALL 0x00318e20 MOV qword ptr [RSP + 0x40],RAX JMP 0x001ab60b LAB_001ab60b: MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x53] CALL 0x00318fd0 LAB_001ab61a: JMP 0x001ab61c LAB_001ab61c: JMP 0x001ab61e LAB_001ab61e: TEST byte ptr [RSP + 0x67],0x1 JNZ 0x001ab627 JMP 0x001ab631 LAB_001ab627: LEA RDI,[RSP + 0x68] CALL 0x003195a0 LAB_001ab631: JMP 0x001ab5a7 LAB_001ab65c: MOV dword ptr [RSP + 0x4c],0x0 MOV RDI,qword ptr [RSP + 0xa8] ADD RDI,0x10 ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0xa0] ADD RSI,0x10 ADD RSI,0x8 CALL 0x00311740 MOV RDI,qword ptr [RSP + 0xa8] ADD RDI,0x10 ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0xa0] ADD RSI,0x10 ADD RSI,0x20 CALL 0x001afdb0 MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,0x10 MOV qword ptr [RSP + 0xd8],RAX MOV dword ptr [RSP + 0xd4],0x0 MOV RAX,qword ptr [RSP + 0xd8] MOVSXD RCX,dword ptr [RSP + 0xd4] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x3 CMP EAX,0x0 JZ 0x001ab7dc MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001ab7a2 MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001af7d0 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x110],RCX MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x110] MOV RAX,RDI ADD RAX,0x10 MOV qword ptr [RSP + 0x120],RAX MOV dword ptr [RSP + 0x11c],0x0 MOV RAX,qword ptr [RSP + 0x120] MOVSXD RCX,dword ptr [RSP + 0x11c] MOV EDX,dword ptr [RAX + RCX*0x4] OR EDX,0x1 MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,RDI ADD RAX,0x10 ADD RAX,0x38 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x30],RAX CALL 0x001292e0 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,RAX CALL 0x002e7090 LAB_001ab7a2: MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x2 CMP EAX,0x0 JZ 0x001ab7da MOV RDI,qword ptr [RSP + 0xa8] CALL 0x0013d1c0 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001afde0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX CALL 0x001af580 LAB_001ab7da: JMP 0x001ab7dc LAB_001ab7dc: MOV RCX,qword ptr [RSP + 0xa8] ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,0x8 MOV qword ptr [RSP + 0xc8],RCX MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001ab8d9 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0xf0],RAX MOV qword ptr [RSP + 0xe8],0x0 MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x128] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001ab8b8 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001b1a70 ADD RAX,0x8 MOV qword ptr [RSP + 0xf8],RAX JMP 0x001ab8c7 LAB_001ab8b8: CALL qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xf8],RAX LAB_001ab8c7: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0xf8] CALL 0x001b25d0 LAB_001ab8d9: ADD RSP,0x138 RET
/* WARNING: Removing unreachable block (ram,0x001ab5b2) */ /* WARNING: Removing unreachable block (ram,0x001ab5ce) */ /* WARNING: Removing unreachable block (ram,0x001ab5cc) */ /* WARNING: Removing unreachable block (ram,0x001ab61e) */ /* WARNING: Removing unreachable block (ram,0x001ab627) */ /* WARNING: Removing unreachable block (ram,0x001ab625) */ /* WARNING: Removing unreachable block (ram,0x001ab631) */ /* google::protobuf::compiler::CodeGeneratorRequest::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&) */ void google::protobuf::compiler::CodeGeneratorRequest::MergeImpl(Message *param_1,Message *param_2) { uint uVar1; string *psVar2; Arena *pAVar3; Version *this; Version *pVVar4; InternalMetadata *this_00; UnknownFieldSet *local_40; RepeatedPtrField<std::__cxx11::string>::MergeFrom ((RepeatedPtrField<std::__cxx11::string> *)(param_1 + 0x18), (RepeatedPtrField *)(param_2 + 0x18)); RepeatedPtrField<google::protobuf::FileDescriptorProto>::MergeFrom ((RepeatedPtrField<google::protobuf::FileDescriptorProto> *)(param_1 + 0x30), (RepeatedPtrField *)(param_2 + 0x30)); uVar1 = *(uint *)(param_2 + 0x10); if ((uVar1 & 3) != 0) { if ((uVar1 & 1) != 0) { psVar2 = (string *)_internal_parameter_abi_cxx11_((CodeGeneratorRequest *)param_2); *(uint *)(param_1 + 0x10) = *(uint *)(param_1 + 0x10) | 1; pAVar3 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)param_1); internal::ArenaStringPtr::Set((ArenaStringPtr *)(param_1 + 0x48),psVar2,pAVar3); } if ((uVar1 & 2) != 0) { this = (Version *)_internal_mutable_compiler_version((CodeGeneratorRequest *)param_1); pVVar4 = (Version *)_internal_compiler_version((CodeGeneratorRequest *)param_2); Version::MergeFrom(this,pVVar4); } } this_00 = (InternalMetadata *)(param_2 + 8); if ((*(ulong *)this_00 & 1) != 0) { if ((*(ulong *)this_00 & 1) == 0) { local_40 = (UnknownFieldSet *)(*(code *)0x0)(); } else { local_40 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (this_00); local_40 = (UnknownFieldSet *)((Container *)local_40 + 8); } internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(param_1 + 8),local_40); } return; }
29,058
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::AddChunk(unsigned long)
mnn-tts/MNN/3rd_party/rapidjson/allocators.h
bool AddChunk(size_t capacity) { if (!baseAllocator_) ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator)(); if (ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity))) { chunk->capacity = capacity; chunk->size = 0; chunk->next = chunkHead_; chunkHead_ = chunk; return true; } else return false; }
O0
c
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::AddChunk(unsigned long): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rax movq %rax, (%rsp) cmpq $0x0, 0x18(%rax) jne 0x1d107 movl $0x1, %edi callq 0x40e0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x18(%rax) movq %rcx, 0x20(%rax) movq (%rsp), %rax movq 0x18(%rax), %rdi movq 0x10(%rsp), %rsi addq $0x18, %rsi callq 0x1d180 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) je 0x1d163 movq (%rsp), %rax movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rcx movq %rdx, (%rcx) movq 0x8(%rsp), %rcx movq $0x0, 0x8(%rcx) movq (%rax), %rdx movq 0x8(%rsp), %rcx movq %rdx, 0x10(%rcx) movq 0x8(%rsp), %rcx movq %rcx, (%rax) movb $0x1, 0x27(%rsp) jmp 0x1d168 movb $0x0, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN9rapidjson19MemoryPoolAllocatorINS_12CrtAllocatorEE8AddChunkEm: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_28], rax cmp qword ptr [rax+18h], 0 jnz short loc_1D107 mov edi, 1; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+18h], rcx mov [rax+20h], rcx loc_1D107: mov rax, [rsp+28h+var_28] mov rdi, [rax+18h]; this mov rsi, [rsp+28h+var_18] add rsi, 18h; unsigned __int64 call _ZN9rapidjson12CrtAllocator6MallocEm; rapidjson::CrtAllocator::Malloc(ulong) mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jz short loc_1D163 mov rax, [rsp+28h+var_28] mov rdx, [rsp+28h+var_18] mov rcx, [rsp+28h+var_20] mov [rcx], rdx mov rcx, [rsp+28h+var_20] mov qword ptr [rcx+8], 0 mov rdx, [rax] mov rcx, [rsp+28h+var_20] mov [rcx+10h], rdx mov rcx, [rsp+28h+var_20] mov [rax], rcx mov [rsp+28h+var_1], 1 jmp short loc_1D168 loc_1D163: mov [rsp+28h+var_1], 0 loc_1D168: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::AddChunk(long long a1, long long a2) { long long v2; // rax _QWORD *v4; // [rsp+8h] [rbp-20h] if ( !*(_QWORD *)(a1 + 24) ) { v2 = operator new(1uLL); *(_QWORD *)(a1 + 24) = v2; *(_QWORD *)(a1 + 32) = v2; } v4 = (_QWORD *)rapidjson::CrtAllocator::Malloc(*(rapidjson::CrtAllocator **)(a1 + 24), a2 + 24); if ( !v4 ) return 0; *v4 = a2; v4[1] = 0LL; v4[2] = *(_QWORD *)a1; *(_QWORD *)a1 = v4; return 1; }
AddChunk: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RAX CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0011d107 MOV EDI,0x1 CALL 0x001040e0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x18],RCX MOV qword ptr [RAX + 0x20],RCX LAB_0011d107: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x18 CALL 0x0011d180 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011d163 MOV RAX,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX],RDX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x8],0x0 MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x10],RDX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV byte ptr [RSP + 0x27],0x1 JMP 0x0011d168 LAB_0011d163: MOV byte ptr [RSP + 0x27],0x0 LAB_0011d168: MOV AL,byte ptr [RSP + 0x27] AND AL,0x1 ADD RSP,0x28 RET
/* rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::AddChunk(unsigned long) */ bool __thiscall rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::AddChunk (MemoryPoolAllocator<rapidjson::CrtAllocator> *this,ulong param_1) { void *pvVar1; ulong *puVar2; if (*(long *)(this + 0x18) == 0) { pvVar1 = operator_new(1); *(void **)(this + 0x18) = pvVar1; *(void **)(this + 0x20) = pvVar1; } puVar2 = (ulong *)CrtAllocator::Malloc(*(CrtAllocator **)(this + 0x18),param_1 + 0x18); if (puVar2 != (ulong *)0x0) { *puVar2 = param_1; puVar2[1] = 0; puVar2[2] = *(ulong *)this; *(ulong **)this = puVar2; } return puVar2 != (ulong *)0x0; }
29,059
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR auto write(OutputIt out, const Char* s, const format_specs<Char>& specs, locale_ref) -> OutputIt { if (specs.type == presentation_type::pointer) return write_ptr<Char>(out, bit_cast<uintptr_t>(s), &specs); if (!s) throw_format_error("string pointer is null"); return write(out, basic_string_view<Char>(s), specs, {}); }
O3
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpb $0x11, 0x8(%rdx) jne 0x4d388 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx popq %rbx popq %r14 popq %r15 jmp 0x4908b testq %r14, %r14 je 0x4d3ab movq %r14, %rdi callq 0x114d0 movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx movq %rbx, %rcx popq %rbx popq %r14 popq %r15 jmp 0x4d3b7 leaq 0x36dbf(%rip), %rdi # 0x84171 callq 0x40276
_ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_PKT_RKNS0_12format_specsIS5_EENS1_10locale_refE: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi cmp byte ptr [rdx+8], 11h jnz short loc_4D388 mov rdi, r15 mov rsi, r14 mov rdx, rbx pop rbx pop r14 pop r15 jmp _ZN3fmt3v106detail9write_ptrIcNS0_8appenderEmEET0_S4_T1_PKNS0_12format_specsIT_EE; fmt::v10::detail::write_ptr<char,fmt::v10::appender,ulong>(fmt::v10::appender,ulong,fmt::v10::format_specs<char> const*) loc_4D388: test r14, r14 jz short loc_4D3AB mov rdi, r14 call _strlen mov rdi, r15 mov rsi, r14; char * mov rdx, rax mov rcx, rbx pop rbx pop r14 pop r15 jmp _ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS6_EE; fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&) loc_4D3AB: lea rdi, aStringPointerI; "string pointer is null" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
long long fmt::v10::detail::write<char,fmt::v10::appender>(long long a1, unsigned long long a2, long long a3) { long long v5; // rax if ( *(_BYTE *)(a3 + 8) == 17 ) return fmt::v10::detail::write_ptr<char,fmt::v10::appender,unsigned long>(a1, a2, a3); if ( !a2 ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"string pointer is null", 0LL); v5 = strlen(a2); return fmt::v10::detail::write<char,fmt::v10::appender>(a1, a2, v5, a3); }
write<char,fmt::v10::appender>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP byte ptr [RDX + 0x8],0x11 JNZ 0x0014d388 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX POP RBX POP R14 POP R15 JMP 0x0014908b LAB_0014d388: TEST R14,R14 JZ 0x0014d3ab MOV RDI,R14 CALL 0x001114d0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RAX MOV RCX,RBX POP RBX POP R14 POP R15 JMP 0x0014d3b7 LAB_0014d3ab: LEA RDI,[0x184171] CALL 0x00140276
/* fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref) */ void fmt::v10::detail::write<char,fmt::v10::appender>(detail *param_1,char *param_2,long param_3) { size_t sVar1; if (*(char *)(param_3 + 8) == '\x11') { write_ptr<char,fmt::v10::appender,unsigned_long>(param_1,param_2,param_3); return; } if (param_2 != (char *)0x0) { sVar1 = strlen(param_2); write<char,fmt::v10::appender>(param_1,param_2,sVar1,param_3); return; } /* WARNING: Subroutine does not return */ throw_format_error("string pointer is null"); }
29,060
key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int return_buffer) { if (keycache->can_be_used) return keycache->interface_funcs->read(keycache->keycache_cb, file, filepos, level, buff, length, block_length, return_buffer); /* We can't use mutex here as the key cache may not be initialized */ if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) return (uchar *) 0; return buff; }
O0
c
key_cache_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x49(%rax) je 0x130f57d movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) callq *%rax movq %rax, -0x8(%rbp) jmp 0x130f5b0 movl -0x14(%rbp), %edi movq -0x30(%rbp), %rsi movl -0x34(%rbp), %eax movl %eax, %edx movq -0x20(%rbp), %rcx movl $0x4, %r8d callq 0x13250b0 cmpq $0x0, %rax je 0x130f5a8 movq $0x0, -0x8(%rbp) jmp 0x130f5b0 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
key_cache_read: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_10] cmp byte ptr [rax+49h], 0 jz short loc_130F57D mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+18h] mov rcx, [rbp+var_10] mov rdi, [rcx+8] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov [rsp+50h+var_50], r11d mov [rsp+50h+var_48], r10d call rax mov [rbp+var_8], rax jmp short loc_130F5B0 loc_130F57D: mov edi, [rbp+var_14] mov rsi, [rbp+var_30] mov eax, [rbp+var_34] mov edx, eax mov rcx, [rbp+var_20] mov r8d, 4 call my_pread cmp rax, 0 jz short loc_130F5A8 mov [rbp+var_8], 0 jmp short loc_130F5B0 loc_130F5A8: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_130F5B0: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long key_cache_read( long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5, unsigned int a6, int a7, int a8) { if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, long long, _QWORD, int, int))(*(_QWORD *)(a1 + 16) + 24LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5, a6, a7, a8); if ( my_pread(a2, a5, a6, a3, 4LL) ) return 0LL; return a5; }
trx_undo_roll_ptr_is_insert: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI JMP 0x0130f51a LAB_0130f51a: JMP 0x0130f51c LAB_0130f51c: JMP 0x0130f51e LAB_0130f51e: MOV RAX,qword ptr [RBP + -0x8] SHR RAX,0x37 CMP RAX,0x0 SETNZ AL AND AL,0x1 POP RBP RET
/* trx_undo_roll_ptr_is_insert(unsigned long) */ int8 trx_undo_roll_ptr_is_insert(ulong param_1) { return CONCAT71((uint7)(param_1 >> 0x3f),param_1 >> 0x37 != 0); }
29,061
key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int return_buffer) { if (keycache->can_be_used) return keycache->interface_funcs->read(keycache->keycache_cb, file, filepos, level, buff, length, block_length, return_buffer); /* We can't use mutex here as the key cache may not be initialized */ if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) return (uchar *) 0; return buff; }
O3
c
key_cache_read: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %r8, %rbx movq %rdx, %rax cmpb $0x0, 0x49(%rdi) je 0xceb2f4 movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rdi movq 0x18(%rdi), %r11 movq %rdx, %rdi movq %rax, %rdx movq %rbx, %r8 addq $0x8, %rsp popq %rbx popq %rbp jmpq *%r11 movl %r9d, %edx movl $0x4, %r8d movl %esi, %edi movq %rbx, %rsi movq %rax, %rcx callq 0xcf6eb8 xorl %ecx, %ecx testq %rax, %rax cmoveq %rbx, %rcx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
key_cache_read: push rbp mov rbp, rsp push rbx push rax mov rbx, r8 mov rax, rdx cmp byte ptr [rdi+49h], 0 jz short loc_CEB2F4 mov rdx, [rdi+8] mov rdi, [rdi+10h] mov r11, [rdi+18h] mov rdi, rdx mov rdx, rax mov r8, rbx add rsp, 8 pop rbx pop rbp jmp r11 loc_CEB2F4: mov edx, r9d mov r8d, 4 mov edi, esi mov rsi, rbx mov rcx, rax call my_pread xor ecx, ecx test rax, rax cmovz rcx, rbx mov rax, rcx add rsp, 8 pop rbx pop rbp retn
long long key_cache_read(long long a1, long long a2, long long a3, long long a4, long long a5, unsigned int a6) { long long v8; // rax long long v9; // rcx if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD, long long, long long, long long, long long))(*(_QWORD *)(a1 + 16) + 24LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5); v8 = my_pread((unsigned int)a2, a5, a6, a3, 4LL); v9 = 0LL; if ( !v8 ) return a5; return v9; }
29,062
google::protobuf::internal::ArenaStringPtr::ClearToEmpty()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arenastring.h
uintptr_t as_int() const { return reinterpret_cast<uintptr_t>(ptr_); }
O3
c
google::protobuf::internal::ArenaStringPtr::ClearToEmpty(): movq (%rdi), %rax testb $0x3, %al je 0x9342d andq $-0x4, %rax movq $0x0, 0x8(%rax) movq (%rax), %rax movb $0x0, (%rax) retq
_ZN6google8protobuf8internal14ArenaStringPtr12ClearToEmptyEv: mov rax, [rdi] test al, 3 jz short locret_9342D and rax, 0FFFFFFFFFFFFFFFCh mov qword ptr [rax+8], 0 mov rax, [rax] mov byte ptr [rax], 0 locret_9342D: retn
long long google::protobuf::internal::ArenaStringPtr::ClearToEmpty( google::protobuf::internal::ArenaStringPtr *this) { long long result; // rax long long *v2; // rax result = *(_QWORD *)this; if ( (*(_QWORD *)this & 3) != 0 ) { v2 = (long long *)(result & 0xFFFFFFFFFFFFFFFCLL); v2[1] = 0LL; result = *v2; *(_BYTE *)result = 0; } return result; }
ClearToEmpty: MOV RAX,qword ptr [RDI] TEST AL,0x3 JZ 0x0019342d AND RAX,-0x4 MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RAX] MOV byte ptr [RAX],0x0 LAB_0019342d: RET
/* google::protobuf::internal::ArenaStringPtr::ClearToEmpty() */ void __thiscall google::protobuf::internal::ArenaStringPtr::ClearToEmpty(ArenaStringPtr *this) { int8 *puVar1; if ((*(ulong *)this & 3) != 0) { puVar1 = (int8 *)(*(ulong *)this & 0xfffffffffffffffc); puVar1[1] = 0; *(int1 *)*puVar1 = 0; } return; }
29,063
(anonymous namespace)::msgpack23_int64Packing_Test::msgpack23_int64Packing_Test()
msgpack23/tests/int64_tests.cpp
TEST(msgpack23, int64Packing) { for (std::int64_t i = -10; i < 10; ++i) { msgpack23::Packer packer{}; auto const expected = static_cast<std::int64_t>(i * (std::numeric_limits<std::int64_t>::max() / 10)); auto data = packer(expected); msgpack23::Unpacker unpacker{data}; std::int64_t actual{}; unpacker(actual); EXPECT_EQ(actual, expected); } }
O0
cpp
(anonymous namespace)::msgpack23_int64Packing_Test::msgpack23_int64Packing_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x5a850 movq -0x10(%rbp), %rdi movl $0x10, %esi callq 0x16580 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN12_GLOBAL__N_127msgpack23_int64Packing_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 _ZN12_GLOBAL__N_127msgpack23_int64Packing_TestD2Ev; `anonymous namespace'::msgpack23_int64Packing_Test::~msgpack23_int64Packing_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 `anonymous namespace'::msgpack23_int64Packing_Test::~msgpack23_int64Packing_Test( _anonymous_namespace_::msgpack23_int64Packing_Test *this) { `anonymous namespace'::msgpack23_int64Packing_Test::~msgpack23_int64Packing_Test(this); operator delete(this, 0x10uLL); }
~msgpack23_int64Packing_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 0x0015a850 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x10 CALL 0x00116580 ADD RSP,0x10 POP RBP RET
/* (anonymous namespace)::msgpack23_int64Packing_Test::~msgpack23_int64Packing_Test() */ void __thiscall (anonymous_namespace)::msgpack23_int64Packing_Test::~msgpack23_int64Packing_Test (msgpack23_int64Packing_Test *this) { ~msgpack23_int64Packing_Test(this); operator_delete(this,0x10); return; }
29,064
mysql_read_query_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_read_query_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_read_query_result, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O3
c
mysql_read_query_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x1e128 movb %al, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_read_query_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_read_query_result mov [rbx+8], al mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
bool mysql_read_query_result_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx bool result; // al v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_read_query_result(v1); *(_BYTE *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_read_query_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0011e128 MOV byte ptr [RBX + 0x8],AL MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_read_query_result_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_read_query_result(); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
29,065
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/delegation.cpp
std::optional<evmc::address> get_delegate_address( const evmc::HostInterface& host, const evmc::address& addr) noexcept { // Load the code prefix up to the delegation designation size. // The HostInterface::copy_code() copies up to the addr's code size // and returns the number of bytes copied. uint8_t designation_buffer[std::size(DELEGATION_MAGIC) + sizeof(evmc::address)]; const auto size = host.copy_code(addr, 0, designation_buffer, std::size(designation_buffer)); const bytes_view designation{designation_buffer, size}; if (!is_code_delegated(designation)) return {}; // Copy the delegate address from the designation buffer. evmc::address delegate_address; // Assume the designation with the valid magic has also valid length. assert(designation.size() == std::size(designation_buffer)); std::ranges::copy(designation.substr(std::size(DELEGATION_MAGIC)), delegate_address.bytes); return delegate_address; }
O3
cpp
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq (%rsi), %rax xorl %r14d, %r14d movq %rsp, %rcx movl $0x17, %r8d movq %rsi, %rdi movq %rdx, %rsi xorl %edx, %edx callq *0x40(%rax) cmpq $0x3, %rax jb 0x4eb47 xorl %ecx, %ecx leaq 0x3b040(%rip), %rdx # 0x89b57 movb (%rcx,%rdx), %sil cmpb (%rsp,%rcx), %sil jne 0x4eb44 incq %rcx cmpq $0x3, %rcx jne 0x4eb17 cmpq $0x17, %rax jne 0x4eb56 movl 0x13(%rsp), %eax movl %eax, 0x10(%rbx) movups 0x3(%rsp), %xmm0 movups %xmm0, (%rbx) movb $0x1, %r14b jmp 0x4eb47 xorl %r14d, %r14d movb %r14b, 0x14(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq leaq 0x3aed3(%rip), %rdi # 0x89a30 leaq 0x3af00(%rip), %rsi # 0x89a64 leaq 0x3af7e(%rip), %rcx # 0x89ae9 movl $0x19, %edx callq 0x21130 nopl (%rax)
_ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE: push r14 push rbx sub rsp, 18h mov rbx, rdi mov rax, [rsi] xor r14d, r14d mov rcx, rsp mov r8d, 17h mov rdi, rsi mov rsi, rdx xor edx, edx call qword ptr [rax+40h] cmp rax, 3 jb short loc_4EB47 xor ecx, ecx lea rdx, _ZN6evmoneL22DELEGATION_MAGIC_BYTESE; evmone::DELEGATION_MAGIC_BYTES loc_4EB17: mov sil, [rcx+rdx] cmp sil, [rsp+rcx+28h+var_28] jnz short loc_4EB44 inc rcx cmp rcx, 3 jnz short loc_4EB17 cmp rax, 17h jnz short loc_4EB56 mov eax, [rsp+28h+var_15] mov [rbx+10h], eax movups xmm0, [rsp+28h+var_25] movups xmmword ptr [rbx], xmm0 mov r14b, 1 jmp short loc_4EB47 loc_4EB44: xor r14d, r14d loc_4EB47: mov [rbx+14h], r14b mov rax, rbx add rsp, 18h pop rbx pop r14 retn loc_4EB56: lea rdi, aDesignationSiz; "designation.size() == std::size(designa"... lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStdOptionalEvm; "std::optional<evmc::address> evmone::ge"... mov edx, 19h call ___assert_fail
long long evmone::get_delegate_address(long long a1, long long a2, long long a3) { char v3; // r14 unsigned long long v4; // rax long long i; // rcx _BYTE v7[3]; // [rsp+0h] [rbp-28h] BYREF __int128 v8; // [rsp+3h] [rbp-25h] int v9; // [rsp+13h] [rbp-15h] v3 = 0; v4 = (*(long long ( **)(long long, long long, _QWORD, _BYTE *, long long))(*(_QWORD *)a2 + 64LL))( a2, a3, 0LL, v7, 23LL); if ( v4 >= 3 ) { for ( i = 0LL; i != 3; ++i ) { if ( evmone::DELEGATION_MAGIC_BYTES[i] != v7[i] ) { v3 = 0; goto LABEL_8; } } if ( v4 != 23 ) __assert_fail( "designation.size() == std::size(designation_buffer)", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/e" "vmone/delegation.cpp", 25LL, "std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)"); *(_DWORD *)(a1 + 16) = v9; *(_OWORD *)a1 = v8; v3 = 1; } LABEL_8: *(_BYTE *)(a1 + 20) = v3; return a1; }
get_delegate_address: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr [RSI] XOR R14D,R14D MOV RCX,RSP MOV R8D,0x17 MOV RDI,RSI MOV RSI,RDX XOR EDX,EDX CALL qword ptr [RAX + 0x40] CMP RAX,0x3 JC 0x0014eb47 XOR ECX,ECX LEA RDX,[0x189b57] LAB_0014eb17: MOV SIL,byte ptr [RCX + RDX*0x1] CMP SIL,byte ptr [RSP + RCX*0x1] JNZ 0x0014eb44 INC RCX CMP RCX,0x3 JNZ 0x0014eb17 CMP RAX,0x17 JNZ 0x0014eb56 MOV EAX,dword ptr [RSP + 0x13] MOV dword ptr [RBX + 0x10],EAX MOVUPS XMM0,xmmword ptr [RSP + 0x3] MOVUPS xmmword ptr [RBX],XMM0 MOV R14B,0x1 JMP 0x0014eb47 LAB_0014eb44: XOR R14D,R14D LAB_0014eb47: MOV byte ptr [RBX + 0x14],R14B MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET LAB_0014eb56: LEA RDI,[0x189a30] LEA RSI,[0x189a64] LEA RCX,[0x189ae9] MOV EDX,0x19 CALL 0x00121130
/* evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&) */ evmone * __thiscall evmone::get_delegate_address(evmone *this,HostInterface *param_1,address *param_2) { ulong uVar1; long lVar2; evmone eVar3; char local_28 [3]; int8 local_25; int8 uStack_1d; int4 local_15; eVar3 = (evmone)0x0; uVar1 = (**(code **)(*(long *)param_1 + 0x40))(param_1,param_2,0,local_28,0x17); if (2 < uVar1) { lVar2 = 0; do { if ((&DELEGATION_MAGIC_BYTES)[lVar2] != local_28[lVar2]) { eVar3 = (evmone)0x0; goto LAB_0014eb47; } lVar2 = lVar2 + 1; } while (lVar2 != 3); if (uVar1 != 0x17) { /* WARNING: Subroutine does not return */ __assert_fail("designation.size() == std::size(designation_buffer)", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/delegation.cpp" ,0x19, "std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)" ); } *(int4 *)(this + 0x10) = local_15; *(int8 *)this = local_25; *(int8 *)(this + 8) = uStack_1d; eVar3 = (evmone)0x1; } LAB_0014eb47: this[0x14] = eVar3; return this; }
29,066
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O0
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) leaq 0x212141(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x10, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%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 0xaf0a5 leaq 0x2120fe(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf6ea0 movl %eax, -0x24(%rbp) leaq 0x2120cf(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xaf0ba movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf6ea0 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_sync_5: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], 0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 10h call rax mov [rbp+var_30], rax cmp [rbp+var_30], 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_AF0A5 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_AF0BA loc_AF0A5: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_AF0BA: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_sync_5(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] unsigned int v7; // [rsp+5Ch] [rbp-24h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL); if ( v6 ) { ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_sync(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); } else { return (unsigned int)my_sync(v9, v8); } return v7; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x10 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -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 0x001af0a5 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f6ea0 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x001af0ba LAB_001af0a5: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f6ea0 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001af0ba: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_2c = 0; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10); if (local_38 == 0) { local_c = my_sync(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_2c = my_sync(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_c = local_2c; } return local_c; }
29,067
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O3
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x3412b3(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x46e38 movl %ebx, %edi xorl %esi, %esi callq 0xa23d0 addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq -0x1c(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movl %ebx, %edx movq %r15, %rcx callq 0x2a2a8 movl (%r15), %eax jmp 0x46e2d
inline_mysql_file_sync_0: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 58h mov ebx, esi mov r14d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_68] mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_46E38 mov edi, ebx xor esi, esi call my_sync loc_46E2D: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_46E38: lea r15, [rbp+var_1C] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_sync_cold_1 mov eax, [r15] jmp short loc_46E2D
long long inline_mysql_file_sync_0(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF _DWORD v5[7]; // [rsp+54h] [rbp-1Ch] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 16LL); if ( !v2 ) return my_sync((unsigned int)a2, 0LL); inline_mysql_file_sync_cold_1(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00146e38 MOV EDI,EBX XOR ESI,ESI CALL 0x001a23d0 LAB_00146e2d: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_00146e38: LEA R15,[RBP + -0x1c] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012a2a8 MOV EAX,dword ptr [R15] JMP 0x00146e2d
ulong inline_mysql_file_sync(int4 param_1,ulong param_2) { long lVar1; ulong uVar2; int1 local_70 [76]; uint local_24; lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,0x10); if (lVar1 == 0) { uVar2 = my_sync(param_2 & 0xffffffff,0); } else { inline_mysql_file_sync_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24); uVar2 = (ulong)local_24; } return uVar2; }
29,068
compare_bin
eloqsql/mysys/my_compare.c
static int compare_bin(const uchar *a, uint a_length, const uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) { uint length= MY_MIN(a_length,b_length); const uchar *end= a+ length; int flag; while (a < end) if ((flag= (int) *a++ - (int) *b++)) return flag; if (part_key && b_length < a_length) return 0; if (skip_end_space && a_length != b_length) { int swap= 1; /* We are using space compression. We have to check if longer key has next character < ' ', in which case it's less than the shorter key that has an implicite space afterwards. This code is identical to the one in strings/ctype-simple.c:my_strnncollsp_simple */ if (a_length < b_length) { /* put shorter key in a */ a_length= b_length; a= b; swap= -1; /* swap sign of result */ } for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') return (*a < ' ') ? -swap : swap; } return 0; } return (int) (a_length-b_length); }
O0
c
compare_bin: pushq %rbp movq %rsp, %rbp movl %r8d, -0x58(%rbp) movl %ecx, %eax movl -0x58(%rbp), %ecx movl %eax, -0x54(%rbp) movq %rdx, %rax movl -0x54(%rbp), %edx movq %rax, -0x50(%rbp) movl %esi, %eax movq -0x50(%rbp), %rsi movl %eax, -0x44(%rbp) movq %rdi, %r8 movl -0x44(%rbp), %edi movb %r9b, %al movq %r8, -0x10(%rbp) movl %edi, -0x14(%rbp) movq %rsi, -0x20(%rbp) movl %edx, -0x24(%rbp) movb %cl, -0x25(%rbp) movb %al, -0x26(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xf37a0 movl -0x14(%rbp), %eax movl %eax, -0x5c(%rbp) jmp 0xf37a6 movl -0x24(%rbp), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xf37ff movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movzbl (%rax), %eax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0xf37fd movl -0x3c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xf38d0 jmp 0xf37ba movsbl -0x25(%rbp), %eax cmpl $0x0, %eax je 0xf381c movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xf381c movl $0x0, -0x4(%rbp) jmp 0xf38d0 movsbl -0x26(%rbp), %eax cmpl $0x0, %eax je 0xf38c7 movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax je 0xf38c7 movl $0x1, -0x40(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xf3859 movl -0x24(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx addq %rcx, %rax movl -0x2c(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xf38be movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax je 0xf38ae movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0xf38a0 xorl %eax, %eax subl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) jmp 0xf38a6 movl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xf38d0 jmp 0xf38b0 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xf3874 movl $0x0, -0x4(%rbp) jmp 0xf38d0 movl -0x14(%rbp), %eax subl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
compare_bin: push rbp mov rbp, rsp mov [rbp+var_58], r8d mov eax, ecx mov ecx, [rbp+var_58] mov [rbp+var_54], eax mov rax, rdx mov edx, [rbp+var_54] mov [rbp+var_50], rax mov eax, esi mov rsi, [rbp+var_50] mov [rbp+var_44], eax mov r8, rdi mov edi, [rbp+var_44] mov al, r9b mov [rbp+var_10], r8 mov [rbp+var_14], edi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_25], cl mov [rbp+var_26], al mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_F37A0 mov eax, [rbp+var_14] mov [rbp+var_5C], eax jmp short loc_F37A6 loc_F37A0: mov eax, [rbp+var_24] mov [rbp+var_5C], eax loc_F37A6: mov eax, [rbp+var_5C] mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov ecx, [rbp+var_2C] add rax, rcx mov [rbp+var_38], rax loc_F37BA: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_F37FF mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_3C], eax cmp eax, 0 jz short loc_F37FD mov eax, [rbp+var_3C] mov [rbp+var_4], eax jmp loc_F38D0 loc_F37FD: jmp short loc_F37BA loc_F37FF: movsx eax, [rbp+var_25] cmp eax, 0 jz short loc_F381C mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_F381C mov [rbp+var_4], 0 jmp loc_F38D0 loc_F381C: movsx eax, [rbp+var_26] cmp eax, 0 jz loc_F38C7 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jz loc_F38C7 mov [rbp+var_40], 1 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_F3859 mov eax, [rbp+var_24] mov [rbp+var_14], eax mov rax, [rbp+var_20] mov [rbp+var_10], rax mov [rbp+var_40], 0FFFFFFFFh loc_F3859: mov rax, [rbp+var_10] mov ecx, [rbp+var_14] add rax, rcx mov ecx, [rbp+var_2C] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_38], rax loc_F3874: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_F38BE mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_F38AE mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_F38A0 xor eax, eax sub eax, [rbp+var_40] mov [rbp+var_60], eax jmp short loc_F38A6 loc_F38A0: mov eax, [rbp+var_40] mov [rbp+var_60], eax loc_F38A6: mov eax, [rbp+var_60] mov [rbp+var_4], eax jmp short loc_F38D0 loc_F38AE: jmp short $+2 loc_F38B0: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_F3874 loc_F38BE: mov [rbp+var_4], 0 jmp short loc_F38D0 loc_F38C7: mov eax, [rbp+var_14] sub eax, [rbp+var_24] mov [rbp+var_4], eax loc_F38D0: mov eax, [rbp+var_4] pop rbp retn
long long compare_bin( unsigned __int8 *a1, unsigned int a2, unsigned __int8 *a3, unsigned int a4, char a5, char a6) { unsigned __int8 *v6; // rax unsigned __int8 *v7; // rcx unsigned int v10; // [rsp+4h] [rbp-5Ch] unsigned int v11; // [rsp+20h] [rbp-40h] unsigned __int8 *v12; // [rsp+28h] [rbp-38h] unsigned int v15; // [rsp+4Ch] [rbp-14h] unsigned __int8 *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; if ( a2 >= a4 ) v10 = a4; else v10 = a2; while ( v16 < &a1[v10] ) { v6 = v16++; v7 = a3++; if ( *v6 != *v7 ) return (unsigned int)(*v6 - *v7); } if ( a5 && a4 < a2 ) { return 0; } else if ( !a6 || a2 == a4 ) { return a2 - a4; } else { v11 = 1; if ( a2 < a4 ) { v15 = a4; v16 = a3; v11 = -1; } v12 = &v16[v15 - v10]; while ( 1 ) { if ( v16 >= v12 ) return 0; if ( *v16 != 32 ) break; ++v16; } if ( *v16 >= 0x20u ) return v11; else return -v11; } }
compare_bin: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x58],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x50],RAX MOV EAX,ESI MOV RSI,qword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x44],EAX MOV R8,RDI MOV EDI,dword ptr [RBP + -0x44] MOV AL,R9B MOV qword ptr [RBP + -0x10],R8 MOV dword ptr [RBP + -0x14],EDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV byte ptr [RBP + -0x25],CL MOV byte ptr [RBP + -0x26],AL MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001f37a0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x5c],EAX JMP 0x001f37a6 LAB_001f37a0: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x5c],EAX LAB_001f37a6: MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001f37ba: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001f37ff MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x001f37fd MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001f38d0 LAB_001f37fd: JMP 0x001f37ba LAB_001f37ff: MOVSX EAX,byte ptr [RBP + -0x25] CMP EAX,0x0 JZ 0x001f381c MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001f381c MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f38d0 LAB_001f381c: MOVSX EAX,byte ptr [RBP + -0x26] CMP EAX,0x0 JZ 0x001f38c7 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JZ 0x001f38c7 MOV dword ptr [RBP + -0x40],0x1 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001f3859 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x40],0xffffffff LAB_001f3859: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x2c] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001f3874: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001f38be MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001f38ae MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x001f38a0 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x60],EAX JMP 0x001f38a6 LAB_001f38a0: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x60],EAX LAB_001f38a6: MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x4],EAX JMP 0x001f38d0 LAB_001f38ae: JMP 0x001f38b0 LAB_001f38b0: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001f3874 LAB_001f38be: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f38d0 LAB_001f38c7: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001f38d0: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int compare_bin(byte *param_1,uint param_2,byte *param_3,uint param_4,char param_5,char param_6) { byte bVar1; byte bVar2; byte *pbVar3; int local_68; uint local_64; int local_48; byte *local_28; uint local_1c; byte *local_18; local_64 = param_4; if (param_2 < param_4) { local_64 = param_2; } local_28 = param_3; local_18 = param_1; while (local_18 < param_1 + local_64) { bVar1 = *local_18; bVar2 = *local_28; local_28 = local_28 + 1; local_18 = local_18 + 1; if ((uint)bVar1 - (uint)bVar2 != 0) { return (uint)bVar1 - (uint)bVar2; } } if ((param_5 != '\0') && (param_4 < param_2)) { return 0; } if ((param_6 != '\0') && (param_2 != param_4)) { local_48 = 1; local_1c = param_2; if (param_2 < param_4) { local_18 = local_28; local_48 = -1; local_1c = param_4; } pbVar3 = local_18 + ((ulong)local_1c - (ulong)local_64); while( true ) { if (pbVar3 <= local_18) { return 0; } if (*local_18 != 0x20) break; local_18 = local_18 + 1; } if (*local_18 < 0x20) { local_68 = -local_48; } else { local_68 = local_48; } return local_68; } return param_2 - param_4; }
29,069
delete_tree_element
eloqsql/mysys/tree.c
static int delete_tree_element(TREE *tree, TREE_ELEMENT *element, my_bool abort) { int error, first_error= 0; if (element != &null_element) { if ((first_error= delete_tree_element(tree, element->left, abort))) abort= 1; if (!abort && tree->free) { if ((error= (*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg))) { first_error= first_error ? first_error : error; abort= 1; } } if ((error= delete_tree_element(tree, element->right, abort))) first_error= first_error ? first_error : error; if (tree->with_delete) my_free(element); } return first_error; }
O3
c
delete_tree_element: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx leaq 0x2d0284(%rip), %rax # 0x32fa00 cmpq %rax, %rsi je 0x5f7c8 movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rsi movsbl %dl, %r12d movl %r12d, %edx callq 0x5f76a movl %eax, %r15d testl %eax, %eax movzbl %r12b, %eax movl $0x1, %ecx cmovel %eax, %ecx testb %cl, %cl jne 0x5f7f3 movq 0x280(%r14), %rax testq %rax, %rax je 0x5f7cd movl 0x208(%r14), %edi testq %rdi, %rdi je 0x5f7d1 addq %rbx, %rdi jmp 0x5f7d5 xorl %r12d, %r12d jmp 0x5f824 xorl %ecx, %ecx jmp 0x5f7f3 movq 0x18(%rbx), %rdi movq 0x230(%r14), %rdx movl $0x1, %esi callq *%rax testl %eax, %eax cmovel %r15d, %eax setne %cl testl %r15d, %r15d cmovel %eax, %r15d movq 0x8(%rbx), %rsi movsbl %cl, %edx movq %r14, %rdi callq 0x5f76a testl %r15d, %r15d movl %r15d, %r12d cmovel %eax, %r12d testl %eax, %eax cmovel %r15d, %r12d cmpb $0x0, 0x278(%r14) je 0x5f824 movq %rbx, %rdi callq 0x5a3fa movl %r12d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_tree_element: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx lea rax, null_element cmp rsi, rax jz short loc_5F7C8 mov rbx, rsi mov r14, rdi mov rsi, [rsi] movsx r12d, dl mov edx, r12d call delete_tree_element mov r15d, eax test eax, eax movzx eax, r12b mov ecx, 1 cmovz ecx, eax test cl, cl jnz short loc_5F7F3 mov rax, [r14+280h] test rax, rax jz short loc_5F7CD mov edi, [r14+208h] test rdi, rdi jz short loc_5F7D1 add rdi, rbx jmp short loc_5F7D5 loc_5F7C8: xor r12d, r12d jmp short loc_5F824 loc_5F7CD: xor ecx, ecx jmp short loc_5F7F3 loc_5F7D1: mov rdi, [rbx+18h] loc_5F7D5: mov rdx, [r14+230h] mov esi, 1 call rax test eax, eax cmovz eax, r15d setnz cl test r15d, r15d cmovz r15d, eax loc_5F7F3: mov rsi, [rbx+8] movsx edx, cl mov rdi, r14 call delete_tree_element test r15d, r15d mov r12d, r15d cmovz r12d, eax test eax, eax cmovz r12d, r15d cmp byte ptr [r14+278h], 0 jz short loc_5F824 mov rdi, rbx call my_free loc_5F824: mov eax, r12d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_tree_element(long long a1, _QWORD *a2, bool a3) { unsigned int v5; // r15d bool v6; // cl long long ( *v7)(char *, long long, _QWORD); // rax long long v8; // rdi char *v9; // rdi unsigned int v10; // r12d unsigned int v11; // eax bool v12; // zf unsigned int v13; // eax if ( a2 == (_QWORD *)&null_element ) { return 0; } else { v5 = delete_tree_element(a1, *a2, a3); v6 = 1; if ( !v5 ) v6 = a3; if ( !v6 ) { v7 = *(long long ( **)(char *, long long, _QWORD))(a1 + 640); if ( v7 ) { v8 = *(unsigned int *)(a1 + 520); if ( *(_DWORD *)(a1 + 520) ) v9 = (char *)a2 + v8; else v9 = (char *)a2[3]; v11 = v7(v9, 1LL, *(_QWORD *)(a1 + 560)); v12 = v11 == 0; if ( !v11 ) v11 = v5; v6 = !v12; if ( !v5 ) v5 = v11; } else { v6 = 0; } } v13 = delete_tree_element(a1, a2[1], v6); v10 = v5; if ( !v5 ) v10 = v13; if ( !v13 ) v10 = v5; if ( *(_BYTE *)(a1 + 632) ) my_free((long long)a2); } return v10; }
delete_tree_element: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX LEA RAX,[0x42fa00] CMP RSI,RAX JZ 0x0015f7c8 MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI] MOVSX R12D,DL MOV EDX,R12D CALL 0x0015f76a MOV R15D,EAX TEST EAX,EAX MOVZX EAX,R12B MOV ECX,0x1 CMOVZ ECX,EAX TEST CL,CL JNZ 0x0015f7f3 MOV RAX,qword ptr [R14 + 0x280] TEST RAX,RAX JZ 0x0015f7cd MOV EDI,dword ptr [R14 + 0x208] TEST RDI,RDI JZ 0x0015f7d1 ADD RDI,RBX JMP 0x0015f7d5 LAB_0015f7c8: XOR R12D,R12D JMP 0x0015f824 LAB_0015f7cd: XOR ECX,ECX JMP 0x0015f7f3 LAB_0015f7d1: MOV RDI,qword ptr [RBX + 0x18] LAB_0015f7d5: MOV RDX,qword ptr [R14 + 0x230] MOV ESI,0x1 CALL RAX TEST EAX,EAX CMOVZ EAX,R15D SETNZ CL TEST R15D,R15D CMOVZ R15D,EAX LAB_0015f7f3: MOV RSI,qword ptr [RBX + 0x8] MOVSX EDX,CL MOV RDI,R14 CALL 0x0015f76a TEST R15D,R15D MOV R12D,R15D CMOVZ R12D,EAX TEST EAX,EAX CMOVZ R12D,R15D CMP byte ptr [R14 + 0x278],0x0 JZ 0x0015f824 MOV RDI,RBX CALL 0x0015a3fa LAB_0015f824: MOV EAX,R12D POP RBX POP R12 POP R14 POP R15 POP RBP RET
int delete_tree_element(long param_1,int8 *param_2,char param_3) { int iVar1; int iVar2; int iVar3; long lVar4; char cVar5; if (param_2 == (int8 *)null_element) { iVar2 = 0; } else { iVar1 = delete_tree_element(param_1,*param_2,(int)param_3); cVar5 = '\x01'; if (iVar1 == 0) { cVar5 = param_3; } if (cVar5 == '\0') { if (*(code **)(param_1 + 0x280) == (code *)0x0) { cVar5 = '\0'; } else { if ((ulong)*(uint *)(param_1 + 0x208) == 0) { lVar4 = param_2[3]; } else { lVar4 = (ulong)*(uint *)(param_1 + 0x208) + (long)param_2; } iVar2 = (**(code **)(param_1 + 0x280))(lVar4,1,*(int8 *)(param_1 + 0x230)); cVar5 = iVar2 != 0; if (!(bool)cVar5) { iVar2 = iVar1; } if (iVar1 == 0) { iVar1 = iVar2; } } } iVar3 = delete_tree_element(param_1,param_2[1],(int)cVar5); iVar2 = iVar1; if (iVar1 == 0) { iVar2 = iVar3; } if (iVar3 == 0) { iVar2 = iVar1; } if (*(char *)(param_1 + 0x278) != '\0') { my_free(param_2); } } return iVar2; }
29,070
CustomAllocTest_ReallocZero_Test::~CustomAllocTest_ReallocZero_Test()
seiftnesse[P]memoryallocator/tests/test_allocator.cpp
TEST_F(CustomAllocTest, ReallocZero) { const size_t size = 1024; // Allocate memory void *ptr = _malloc(size); ASSERT_NE(ptr, nullptr); // realloc to zero should free and return null void *newPtr = _realloc(ptr, 0); EXPECT_EQ(newPtr, nullptr); }
O1
cpp
CustomAllocTest_ReallocZero_Test::~CustomAllocTest_ReallocZero_Test(): pushq %rbx movq %rdi, %rbx callq 0x242c6 movl $0x10, %esi movq %rbx, %rdi popq %rbx jmp 0x94c0 nop
_ZN32CustomAllocTest_ReallocZero_TestD0Ev: push rbx mov rbx, rdi call _ZN7testing4TestD2Ev; testing::Test::~Test() mov esi, 10h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void CustomAllocTest_ReallocZero_Test::~CustomAllocTest_ReallocZero_Test( CustomAllocTest_ReallocZero_Test *this) { testing::Test::~Test(this); operator delete(this, 0x10uLL); }
~CustomAllocTest_ReallocZero_Test: PUSH RBX MOV RBX,RDI CALL 0x001242c6 MOV ESI,0x10 MOV RDI,RBX POP RBX JMP 0x001094c0
/* CustomAllocTest_ReallocZero_Test::~CustomAllocTest_ReallocZero_Test() */ void __thiscall CustomAllocTest_ReallocZero_Test::~CustomAllocTest_ReallocZero_Test (CustomAllocTest_ReallocZero_Test *this) { testing::Test::~Test((Test *)this); operator_delete(this,0x10); return; }
29,071
minja::Value::to_bool() const
monkey531[P]llama/common/minja.hpp
bool to_bool() const { if (is_null()) return false; if (is_boolean()) return get<bool>(); if (is_number()) return get<double>() != 0; if (is_string()) return !get<std::string>().empty(); if (is_array()) return !empty(); return true; }
O0
cpp
minja::Value::to_bool() const: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rdi movq %rdi, (%rsp) callq 0x11ac20 testb $0x1, %al jne 0x11984d jmp 0x119857 movb $0x0, 0x37(%rsp) jmp 0x11990b movq (%rsp), %rdi callq 0x11b220 testb $0x1, %al jne 0x119866 jmp 0x11987a movq (%rsp), %rdi callq 0x11b790 andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x11990b movq (%rsp), %rdi callq 0x11b8a0 testb $0x1, %al jne 0x119889 jmp 0x1198a9 movq (%rsp), %rdi callq 0x119c90 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 setne %al setp %cl orb %cl, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x11990b movq (%rsp), %rdi callq 0x11b240 testb $0x1, %al jne 0x1198b8 jmp 0x1198e4 movq (%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x11b8c0 leaq 0x8(%rsp), %rdi callq 0x5b510 xorb $-0x1, %al andb $0x1, %al movb %al, 0x37(%rsp) leaq 0x8(%rsp), %rdi callq 0x5c7f8 jmp 0x11990b movq (%rsp), %rdi callq 0x11b9f0 testb $0x1, %al jne 0x1198f3 jmp 0x119906 movq (%rsp), %rdi callq 0x11ba10 xorb $-0x1, %al andb $0x1, %al movb %al, 0x37(%rsp) jmp 0x11990b movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
_ZNK5minja5Value7to_boolEv: sub rsp, 38h mov [rsp+38h+var_10], rdi; __int64 mov rdi, [rsp+38h+var_10]; this mov [rsp+38h+var_38], rdi; void * call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, 1 jnz short loc_11984D jmp short loc_119857 loc_11984D: mov [rsp+38h+var_1], 0 jmp loc_11990B loc_119857: mov rdi, [rsp+38h+var_38]; this call _ZNK5minja5Value10is_booleanEv; minja::Value::is_boolean(void) test al, 1 jnz short loc_119866 jmp short loc_11987A loc_119866: mov rdi, [rsp+38h+var_38] call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) and al, 1 mov [rsp+38h+var_1], al jmp loc_11990B loc_11987A: mov rdi, [rsp+38h+var_38]; this call _ZNK5minja5Value9is_numberEv; minja::Value::is_number(void) test al, 1 jnz short loc_119889 jmp short loc_1198A9 loc_119889: mov rdi, [rsp+38h+var_38] call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorps xmm1, xmm1 ucomisd xmm0, xmm1 setnz al setp cl or al, cl and al, 1 mov [rsp+38h+var_1], al jmp short loc_11990B loc_1198A9: mov rdi, [rsp+38h+var_38]; this call _ZNK5minja5Value9is_stringEv; minja::Value::is_string(void) test al, 1 jnz short loc_1198B8 jmp short loc_1198E4 loc_1198B8: mov rsi, [rsp+38h+var_38]; int lea rdi, [rsp+38h+var_30]; int call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+38h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor al, 0FFh and al, 1 mov [rsp+38h+var_1], al lea rdi, [rsp+38h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_11990B loc_1198E4: mov rdi, [rsp+38h+var_38]; this call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void) test al, 1 jnz short loc_1198F3 jmp short loc_119906 loc_1198F3: mov rdi, [rsp+38h+var_38]; this call _ZNK5minja5Value5emptyEv; minja::Value::empty(void) xor al, 0FFh and al, 1 mov [rsp+38h+var_1], al jmp short loc_11990B loc_119906: mov [rsp+38h+var_1], 1 loc_11990B: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
29,072
minja::Value::to_bool() const
monkey531[P]llama/common/minja.hpp
bool to_bool() const { if (is_null()) return false; if (is_boolean()) return get<bool>(); if (is_number()) return get<double>() != 0; if (is_string()) return !get<std::string>().empty(); if (is_array()) return !empty(); return true; }
O2
cpp
minja::Value::to_bool() const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx callq 0x66168 testb %al, %al je 0x658f5 xorl %ebx, %ebx movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movb 0x40(%rbx), %al cmpb $0x4, %al jne 0x6590b movq %rbx, %rdi addq $0x28, %rsp popq %rbx popq %r14 jmp 0x664fc leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0x6592e movq %rbx, %rdi callq 0x65a9a xorpd %xmm1, %xmm1 cmpneqsd %xmm0, %xmm1 movq %xmm1, %rbx andl $0x1, %ebx jmp 0x658eb cmpb $0x3, %al jne 0x65954 leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x665b2 cmpq $0x0, 0x8(%r14) setne %bl movq %r14, %rdi callq 0x25478 jmp 0x658eb cmpq $0x0, 0x10(%rbx) je 0x6596a movq %rbx, %rdi callq 0x66676 movl %eax, %ebx xorb $0x1, %bl jmp 0x658eb movb $0x1, %bl jmp 0x658eb nop
_ZNK5minja5Value7to_boolEv: push r14 push rbx sub rsp, 28h mov rbx, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_658F5 xor ebx, ebx loc_658EB: mov eax, ebx add rsp, 28h pop rbx pop r14 retn loc_658F5: mov al, [rbx+40h] cmp al, 4 jnz short loc_6590B mov rdi, rbx add rsp, 28h pop rbx pop r14 jmp _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) loc_6590B: lea ecx, [rax-5] cmp cl, 2 ja short loc_6592E mov rdi, rbx call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorpd xmm1, xmm1 cmpneqsd xmm1, xmm0 movq rbx, xmm1 and ebx, 1 jmp short loc_658EB loc_6592E: cmp al, 3 jnz short loc_65954 lea r14, [rsp+38h+var_30] mov rdi, r14 mov rsi, rbx call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) cmp qword ptr [r14+8], 0 setnz bl mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_658EB loc_65954: cmp qword ptr [rbx+10h], 0 jz short loc_6596A mov rdi, rbx; this call _ZNK5minja5Value5emptyEv; minja::Value::empty(void) mov ebx, eax xor bl, 1 jmp short loc_658EB loc_6596A: mov bl, 1 jmp loc_658EB
long long minja::Value::to_bool(minja::Value *this) { unsigned int v1; // ebx char v3; // al __m128d v4; // xmm0 _BYTE v5[8]; // [rsp+8h] [rbp-30h] BYREF long long v6; // [rsp+10h] [rbp-28h] v1 = (unsigned int)this; if ( (unsigned __int8)minja::Value::is_null(this) ) return 0; v3 = *((_BYTE *)this + 64); if ( v3 != 4 ) { if ( (unsigned __int8)(v3 - 5) > 2u ) { if ( v3 == 3 ) { minja::Value::get<std::string>(v5, this); LOBYTE(v1) = v6 != 0; std::string::~string(v5); } else if ( *((_QWORD *)this + 2) ) { v1 = minja::Value::empty(this); LOBYTE(v1) = v1 ^ 1; } else { LOBYTE(v1) = 1; } } else { v4.m128d_f64[0] = minja::Value::get<double>(this); return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v4) & 1; } return v1; } return minja::Value::get<bool>(this); }
to_bool: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI CALL 0x00166168 TEST AL,AL JZ 0x001658f5 XOR EBX,EBX LAB_001658eb: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R14 RET LAB_001658f5: MOV AL,byte ptr [RBX + 0x40] CMP AL,0x4 JNZ 0x0016590b MOV RDI,RBX ADD RSP,0x28 POP RBX POP R14 JMP 0x001664fc LAB_0016590b: LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x0016592e MOV RDI,RBX CALL 0x00165a9a XORPD XMM1,XMM1 CMPNEQSD XMM1,XMM0 MOVQ RBX,XMM1 AND EBX,0x1 JMP 0x001658eb LAB_0016592e: CMP AL,0x3 JNZ 0x00165954 LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RBX CALL 0x001665b2 CMP qword ptr [R14 + 0x8],0x0 SETNZ BL MOV RDI,R14 CALL 0x00125478 JMP 0x001658eb LAB_00165954: CMP qword ptr [RBX + 0x10],0x0 JZ 0x0016596a MOV RDI,RBX CALL 0x00166676 MOV EBX,EAX XOR BL,0x1 JMP 0x001658eb LAB_0016596a: MOV BL,0x1 JMP 0x001658eb
/* minja::Value::to_bool() const */ byte __thiscall minja::Value::to_bool(Value *this) { Value VVar1; char cVar2; bool bVar3; byte bVar4; double dVar5; string local_30 [8]; long local_28; cVar2 = is_null(this); if (cVar2 == '\0') { VVar1 = this[0x40]; if (VVar1 == (Value)0x4) { bVar3 = get<bool>(this); return bVar3; } if ((byte)((char)VVar1 - 5U) < 3) { dVar5 = get<double>(this); bVar4 = -(dVar5 != 0.0) & 1; } else if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); bVar4 = local_28 != 0; std::__cxx11::string::~string(local_30); } else if (*(long *)(this + 0x10) == 0) { bVar4 = 1; } else { bVar4 = empty(this); bVar4 = bVar4 ^ 1; } } else { bVar4 = 0; } return bVar4; }
29,073
minja::Value::insert(unsigned long, minja::Value const&)
monkey531[P]llama/common/minja.hpp
void insert(size_t index, const Value& v) { if (!array_) throw std::runtime_error("Value is not an array: " + dump()); array_->insert(array_->begin() + index, v); }
O0
cpp
minja::Value::insert(unsigned long, minja::Value const&): subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq 0xa0(%rsp), %rdi movq %rdi, 0x18(%rsp) addq $0x10, %rdi callq 0xa16a0 testb $0x1, %al jne 0xda9cb movb $0x1, 0x43(%rsp) movl $0x10, %edi callq 0x50540 movq 0x18(%rsp), %rsi movq %rax, 0x10(%rsp) leaq 0x50(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xa15d0 jmp 0xda929 leaq 0xdf119(%rip), %rsi # 0x1b9a49 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x63980 jmp 0xda941 movq 0x10(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x50390 jmp 0xda952 movq 0x10(%rsp), %rdi movb $0x0, 0x43(%rsp) movq 0x15c64d(%rip), %rsi # 0x236fb0 movq 0x15c60e(%rip), %rdx # 0x236f78 callq 0x50900 jmp 0xdaa4d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xda9b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xda9ac movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x70(%rsp), %rdi callq 0x510e0 leaq 0x50(%rsp), %rdi callq 0x510e0 testb $0x1, 0x43(%rsp) jne 0xda9bf jmp 0xda9c9 movq 0x10(%rsp), %rdi callq 0x50c50 jmp 0xdaa43 movq 0x18(%rsp), %rdi addq $0x10, %rdi callq 0xa2e30 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rsp) addq $0x10, %rdi callq 0xa2e30 movq %rax, %rdi callq 0xccaf0 movq %rax, 0x28(%rsp) movq 0x98(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0xdd3d0 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xdd480 movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rdx movq 0x38(%rsp), %rsi callq 0xde210 movq %rax, 0x20(%rsp) addq $0xa8, %rsp retq movq 0x48(%rsp), %rdi callq 0x50950 nopl (%rax)
_ZN5minja5Value6insertEmRKS0_: sub rsp, 0A8h mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx mov rdi, [rsp+0A8h+var_8] mov [rsp+0A8h+var_90], rdi add rdi, 10h call _ZNKSt12__shared_ptrISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_DA9CB mov [rsp+0A8h+var_65], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0A8h+var_90] mov [rsp+0A8h+var_98], rax lea rdi, [rsp+0A8h+var_58] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_DA929: lea rsi, aValueIsNotAnAr; "Value is not an array: " lea rdi, [rsp+0A8h+var_38] lea rdx, [rsp+0A8h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_DA941: mov rdi, [rsp+0A8h+var_98] lea rsi, [rsp+0A8h+var_38] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_DA952: mov rdi, [rsp+0A8h+var_98]; void * mov [rsp+0A8h+var_65], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_DAA4D mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_DA9B6 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_DA9AC mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DA9AC: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DA9B6: test [rsp+arg_3B], 1 jnz short loc_DA9BF jmp short loc_DA9C9 loc_DA9BF: mov rdi, [rsp+arg_8]; void * call ___cxa_free_exception loc_DA9C9: jmp short loc_DAA43 loc_DA9CB: mov rdi, [rsp+0A8h+var_90] add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, [rsp+0A8h+var_90] mov [rsp+0A8h+var_A0], rax add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax call _ZNSt6vectorIN5minja5ValueESaIS1_EE5beginEv; std::vector<minja::Value>::begin(void) mov [rsp+0A8h+var_80], rax mov rsi, [rsp+0A8h+var_10] lea rdi, [rsp+0A8h+var_80] call _ZNK9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEplEl; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator+(long) mov [rsp+0A8h+var_78], rax lea rdi, [rsp+0A8h+var_70] lea rsi, [rsp+0A8h+var_78] call _ZN9__gnu_cxx17__normal_iteratorIPKN5minja5ValueESt6vectorIS2_SaIS2_EEEC2IPS2_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISB_SA_EE7__valueES7_E6__typeEEE mov rdi, [rsp+0A8h+var_A0] mov rdx, [rsp+0A8h+var_18] mov rsi, [rsp+0A8h+var_70] call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&) mov [rsp+0A8h+var_88], rax add rsp, 0A8h retn loc_DAA43: mov rdi, [rsp+arg_40] call __Unwind_Resume loc_DAA4D: nop dword ptr [rax]
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3) { long long v3; // rax int v4; // ecx int v5; // r8d int v6; // r9d int v8; // [rsp+8h] [rbp-A0h] void *exception; // [rsp+10h] [rbp-98h] long long v10; // [rsp+28h] [rbp-80h] BYREF long long v11; // [rsp+30h] [rbp-78h] BYREF long long v12; // [rsp+38h] [rbp-70h] BYREF char v13; // [rsp+43h] [rbp-65h] _BYTE v14[32]; // [rsp+50h] [rbp-58h] BYREF _BYTE v15[32]; // [rsp+70h] [rbp-38h] BYREF const minja::Value *v16; // [rsp+90h] [rbp-18h] long long v17; // [rsp+98h] [rbp-10h] minja::Value *v18; // [rsp+A0h] [rbp-8h] v18 = this; v17 = a2; v16 = a3; if ( !std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)this + 2) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v15, (long long)"Value is not an array: ", (long long)v14); std::runtime_error::runtime_error(exception, v15); v13 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v8 = std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 16); v3 = std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 16); v10 = std::vector<minja::Value>::begin(v3); v11 = __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator+(&v10, v17); __gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>::__normal_iterator<minja::Value*>( &v12, &v11); return std::vector<minja::Value>::insert(v8, v12, (_DWORD)v16, v4, v5, v6); }
insert: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0x90],RDX MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x18],RDI ADD RDI,0x10 CALL 0x001a16a0 TEST AL,0x1 JNZ 0x001da9cb MOV byte ptr [RSP + 0x43],0x1 MOV EDI,0x10 CALL 0x00150540 MOV RSI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX LAB_001da916: LEA RDI,[RSP + 0x50] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001a15d0 JMP 0x001da929 LAB_001da929: LEA RSI,[0x2b9a49] LEA RDI,[RSP + 0x70] LEA RDX,[RSP + 0x50] CALL 0x00163980 JMP 0x001da941 LAB_001da941: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x70] CALL 0x00150390 JMP 0x001da952 LAB_001da952: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x43],0x0 MOV RSI,qword ptr [0x00336fb0] MOV RDX,qword ptr [0x00336f78] CALL 0x00150900 LAB_001da9cb: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x10 CALL 0x001a2e30 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX ADD RDI,0x10 CALL 0x001a2e30 MOV RDI,RAX CALL 0x001ccaf0 MOV qword ptr [RSP + 0x28],RAX MOV RSI,qword ptr [RSP + 0x98] LEA RDI,[RSP + 0x28] CALL 0x001dd3d0 MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x30] CALL 0x001dd480 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x38] CALL 0x001de210 MOV qword ptr [RSP + 0x20],RAX ADD RSP,0xa8 RET
/* minja::Value::insert(unsigned long, minja::Value const&) */ void __thiscall minja::Value::insert(Value *this,ulong param_1,Value *param_2) { runtime_error *this_00; vector<minja::Value,std::allocator<minja::Value>> *pvVar1; vector<minja::Value,std::allocator<minja::Value>> *this_01; bool bVar2; int8 local_80; int8 local_78; int8 local_70; int1 local_65; int1 local_58 [32]; string local_38 [32]; Value *local_18; ulong local_10; Value *local_8; local_18 = param_2; local_10 = param_1; local_8 = this; bVar2 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(this + 0x10)); if (!bVar2) { local_65 = 1; this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001da916 to 001da926 has its CatchHandler @ 001da974 */ dump_abi_cxx11_((int)local_58,SUB81(this,0)); /* try { // try from 001da929 to 001da93e has its CatchHandler @ 001da984 */ std::operator+((char *)local_38,(string *)"Value is not an array: "); /* try { // try from 001da941 to 001da96e has its CatchHandler @ 001da994 */ std::runtime_error::runtime_error(this_00,local_38); local_65 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00336fb0,PTR__runtime_error_00336f78); } pvVar1 = (vector<minja::Value,std::allocator<minja::Value>> *) std:: __shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); this_01 = (vector<minja::Value,std::allocator<minja::Value>> *) std:: __shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); local_80 = std::vector<minja::Value,std::allocator<minja::Value>>::begin(this_01); local_78 = __gnu_cxx:: __normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>> ::operator+((__normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>> *)&local_80,local_10); __gnu_cxx:: __normal_iterator<minja::Value_const*,std::vector<minja::Value,std::allocator<minja::Value>>>:: __normal_iterator<minja::Value*> ((__normal_iterator<minja::Value_const*,std::vector<minja::Value,std::allocator<minja::Value>>> *)&local_70,(__normal_iterator *)&local_78); std::vector<minja::Value,std::allocator<minja::Value>>::insert(pvVar1,local_70,local_18); return; }
29,074
my_wc_mb_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *r, uchar *e) { int count; if (r >= e) return MY_CS_TOOSMALL; if (wc < 0x80) count= 1; else if (wc < 0x800) count= 2; else if (wc < 0x10000) count= 3; else if (wc < 0x200000) count= 4; else return MY_CS_ILUNI; if (r + count > e) return MY_CS_TOOSMALLN(count); switch (count) { case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; /* fall through */ case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; /* fall through */ case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; /* fall through */ case 1: r[0] = (uchar) wc; } return count; }
O0
c
my_wc_mb_utf8mb4: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x75bba movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x75d06 cmpq $0x80, -0x18(%rbp) jae 0x75bcd movl $0x1, -0x2c(%rbp) jmp 0x75c18 cmpq $0x800, -0x18(%rbp) # imm = 0x800 jae 0x75be0 movl $0x2, -0x2c(%rbp) jmp 0x75c16 cmpq $0x10000, -0x18(%rbp) # imm = 0x10000 jae 0x75bf3 movl $0x3, -0x2c(%rbp) jmp 0x75c14 cmpq $0x200000, -0x18(%rbp) # imm = 0x200000 jae 0x75c06 movl $0x4, -0x2c(%rbp) jmp 0x75c12 movl $0x0, -0x4(%rbp) jmp 0x75d06 jmp 0x75c14 jmp 0x75c16 jmp 0x75c18 movq -0x20(%rbp), %rax movslq -0x2c(%rbp), %rcx addq %rcx, %rax cmpq -0x28(%rbp), %rax jbe 0x75c39 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C subl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x75d06 movl -0x2c(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x38(%rbp) subl $0x3, %eax ja 0x75d00 movq -0x38(%rbp), %rax leaq 0x14f3d8(%rip), %rcx # 0x1c5030 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax andq $0x3f, %rax orq $0x80, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x3(%rax) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax orq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax andq $0x3f, %rax orq $0x80, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax orq $0x800, %rax # imm = 0x800 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax andq $0x3f, %rax orq $0x80, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax orq $0xc0, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_wc_mb_utf8mb4: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_75BBA mov [rbp+var_4], 0FFFFFF9Bh jmp loc_75D06 loc_75BBA: cmp [rbp+var_18], 80h jnb short loc_75BCD mov [rbp+var_2C], 1 jmp short loc_75C18 loc_75BCD: cmp [rbp+var_18], 800h jnb short loc_75BE0 mov [rbp+var_2C], 2 jmp short loc_75C16 loc_75BE0: cmp [rbp+var_18], 10000h jnb short loc_75BF3 mov [rbp+var_2C], 3 jmp short loc_75C14 loc_75BF3: cmp [rbp+var_18], offset unk_200000 jnb short loc_75C06 mov [rbp+var_2C], 4 jmp short loc_75C12 loc_75C06: mov [rbp+var_4], 0 jmp loc_75D06 loc_75C12: jmp short $+2 loc_75C14: jmp short $+2 loc_75C16: jmp short $+2 loc_75C18: mov rax, [rbp+var_20] movsxd rcx, [rbp+var_2C] add rax, rcx cmp rax, [rbp+var_28] jbe short loc_75C39 mov eax, 0FFFFFF9Ch sub eax, [rbp+var_2C] mov [rbp+var_4], eax jmp loc_75D06 loc_75C39: mov eax, [rbp+var_2C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_38], rcx sub eax, 3 ja def_75C5F; jumptable 0000000000075C5F default case mov rax, [rbp+var_38] lea rcx, jpt_75C5F movsxd rax, ds:(jpt_75C5F - 1C5030h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_75C61: mov rax, [rbp+var_18]; jumptable 0000000000075C5F case 4 and rax, 3Fh or rax, 80h mov cl, al mov rax, [rbp+var_20] mov [rax+3], cl mov rax, [rbp+var_18] shr rax, 6 mov [rbp+var_18], rax mov rax, [rbp+var_18] or rax, 10000h mov [rbp+var_18], rax loc_75C92: mov rax, [rbp+var_18]; jumptable 0000000000075C5F case 3 and rax, 3Fh or rax, 80h mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov rax, [rbp+var_18] shr rax, 6 mov [rbp+var_18], rax mov rax, [rbp+var_18] or rax, 800h mov [rbp+var_18], rax loc_75CC3: mov rax, [rbp+var_18]; jumptable 0000000000075C5F case 2 and rax, 3Fh or rax, 80h mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 6 mov [rbp+var_18], rax mov rax, [rbp+var_18] or rax, 0C0h mov [rbp+var_18], rax loc_75CF4: mov rax, [rbp+var_18]; jumptable 0000000000075C5F case 1 mov cl, al mov rax, [rbp+var_20] mov [rax], cl def_75C5F: mov eax, [rbp+var_2C]; jumptable 0000000000075C5F default case mov [rbp+var_4], eax loc_75D06: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+Ch] [rbp-2Ch] unsigned long long v6; // [rsp+20h] [rbp-18h] v6 = a2; if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 0x80 ) { if ( a2 >= 0x800 ) { if ( a2 >= 0x10000 ) { if ( a2 >= (unsigned long long)&unk_200000 ) return 0; v5 = 4; } else { v5 = 3; } } else { v5 = 2; } } else { v5 = 1; } if ( (unsigned long long)&a3[v5] <= a4 ) { switch ( v5 ) { case 1: goto LABEL_18; case 2: goto LABEL_17; case 3: goto LABEL_16; case 4: a3[3] = a2 & 0x3F | 0x80; v6 = (a2 >> 6) | 0x10000; LABEL_16: a3[2] = v6 & 0x3F | 0x80; v6 = (v6 >> 6) | 0x800; LABEL_17: a3[1] = v6 & 0x3F | 0x80; v6 = (v6 >> 6) | 0xC0; LABEL_18: *a3 = v6; break; default: break; } return (unsigned int)v5; } else { return (unsigned int)(-100 - v5); } } else { return (unsigned int)-101; } }
my_wc_mb_utf8mb4: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00175bba MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00175d06 LAB_00175bba: CMP qword ptr [RBP + -0x18],0x80 JNC 0x00175bcd MOV dword ptr [RBP + -0x2c],0x1 JMP 0x00175c18 LAB_00175bcd: CMP qword ptr [RBP + -0x18],0x800 JNC 0x00175be0 MOV dword ptr [RBP + -0x2c],0x2 JMP 0x00175c16 LAB_00175be0: CMP qword ptr [RBP + -0x18],0x10000 JNC 0x00175bf3 MOV dword ptr [RBP + -0x2c],0x3 JMP 0x00175c14 LAB_00175bf3: CMP qword ptr [RBP + -0x18],0x200000 JNC 0x00175c06 MOV dword ptr [RBP + -0x2c],0x4 JMP 0x00175c12 LAB_00175c06: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00175d06 LAB_00175c12: JMP 0x00175c14 LAB_00175c14: JMP 0x00175c16 LAB_00175c16: JMP 0x00175c18 LAB_00175c18: MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0x2c] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x28] JBE 0x00175c39 MOV EAX,0xffffff9c SUB EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00175d06 LAB_00175c39: MOV EAX,dword ptr [RBP + -0x2c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x38],RCX SUB EAX,0x3 JA 0x00175d00 MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x2c5030] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_4: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3f OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x6 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] OR RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX caseD_3: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3f OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x6 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] OR RAX,0x800 MOV qword ptr [RBP + -0x18],RAX caseD_2: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3f OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x6 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] OR RAX,0xc0 MOV qword ptr [RBP + -0x18],RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL default: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_00175d06: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int my_wc_mb_utf8mb4(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int local_34; ulong local_20; int local_c; if (param_3 < param_4) { if (param_2 < 0x80) { local_34 = 1; } else if (param_2 < 0x800) { local_34 = 2; } else if (param_2 < 0x10000) { local_34 = 3; } else { if (0x1fffff < param_2) { return 0; } local_34 = 4; } if (param_4 < param_3 + local_34) { local_c = -100 - local_34; } else { local_20 = param_2; switch(local_34) { case 4: param_3[3] = (byte)param_2 & 0x3f | 0x80; local_20 = param_2 >> 6 | 0x10000; case 3: param_3[2] = (byte)local_20 & 0x3f | 0x80; local_20 = local_20 >> 6 | 0x800; case 2: param_3[1] = (byte)local_20 & 0x3f | 0x80; local_20 = local_20 >> 6 | 0xc0; case 1: *param_3 = (char)local_20; default: local_c = local_34; } } } else { local_c = -0x65; } return local_c; }
29,075
testing::internal::StreamingListener::UrlEncode[abi:cxx11](char const*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
std::string StreamingListener::UrlEncode(const char* str) { std::string result; result.reserve(strlen(str) + 1); for (char ch = *str; ch != '\0'; ch = *++str) { switch (ch) { case '%': case '=': case '&': case '\n': result.push_back('%'); result.append(String::FormatByte(static_cast<unsigned char>(ch))); break; default: result.push_back(ch); break; } } return result; }
O0
cpp
testing::internal::StreamingListener::UrlEncode[abi:cxx11](char const*): subq $0x68, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movb $0x0, 0x57(%rsp) callq 0x117b0 movq 0x58(%rsp), %rdi callq 0xb1d0 movq 0x18(%rsp), %rdi movq %rax, %rsi incq %rsi callq 0x4a270 jmp 0x3afc1 movq 0x58(%rsp), %rax movb (%rax), %al movb %al, 0x43(%rsp) movsbl 0x43(%rsp), %eax cmpl $0x0, %eax je 0x3b0a1 movsbl 0x43(%rsp), %eax movl %eax, 0xc(%rsp) subl $0xa, %eax je 0x3b016 jmp 0x3afea movl 0xc(%rsp), %eax addl $-0x25, %eax subl $0x2, %eax jb 0x3b016 jmp 0x3aff8 movl 0xc(%rsp), %eax subl $0x3d, %eax je 0x3b016 jmp 0x3b06f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x3b0c1 movq 0x18(%rsp), %rdi movl $0x25, %esi callq 0x4c9a0 jmp 0x3b027 movzbl 0x43(%rsp), %esi leaq 0x20(%rsp), %rdi callq 0x27540 jmp 0x3b038 movq 0x18(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x4cdc0 jmp 0x3b049 leaq 0x20(%rsp), %rdi callq 0xec60 jmp 0x3b082 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x20(%rsp), %rdi callq 0xec60 jmp 0x3b0c1 movq 0x18(%rsp), %rdi movsbl 0x43(%rsp), %esi callq 0x4c9a0 jmp 0x3b080 jmp 0x3b082 jmp 0x3b084 movq 0x58(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x58(%rsp) movb 0x1(%rax), %al movb %al, 0x43(%rsp) jmp 0x3afcc movb $0x1, 0x57(%rsp) testb $0x1, 0x57(%rsp) jne 0x3b0b7 movq 0x18(%rsp), %rdi callq 0xec60 movq 0x10(%rsp), %rax addq $0x68, %rsp retq movq 0x18(%rsp), %rdi callq 0xec60 movq 0x48(%rsp), %rdi callq 0xb910 nopw %cs:(%rax,%rax)
_ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc: sub rsp, 68h mov [rsp+68h+var_50], 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_11], 0 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void) mov rdi, [rsp+68h+var_10] call _strlen mov rdi, [rsp+68h+var_50] mov rsi, rax inc rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_3AFC1: mov rax, [rsp+68h+var_10] mov al, [rax] mov [rsp+68h+var_25], al loc_3AFCC: movsx eax, [rsp+68h+var_25] cmp eax, 0 jz loc_3B0A1 movsx eax, [rsp+68h+var_25] mov [rsp+68h+var_5C], eax sub eax, 0Ah jz short loc_3B016 jmp short $+2 loc_3AFEA: mov eax, [rsp+68h+var_5C] add eax, 0FFFFFFDBh sub eax, 2 jb short loc_3B016 jmp short $+2 loc_3AFF8: mov eax, [rsp+68h+var_5C] sub eax, 3Dh ; '=' jz short loc_3B016 jmp short loc_3B06F mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp loc_3B0C1 loc_3B016: mov rdi, [rsp+68h+var_50] mov esi, 25h ; '%' call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short $+2 loc_3B027: movzx esi, [rsp+68h+var_25] lea rdi, [rsp+68h+var_48] call _ZN7testing8internal6String10FormatByteB5cxx11Eh; testing::internal::String::FormatByte(uchar) jmp short $+2 loc_3B038: mov rdi, [rsp+68h+var_50] lea rsi, [rsp+68h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) jmp short $+2 loc_3B049: lea rdi, [rsp+68h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_3B082 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_3B0C1 loc_3B06F: mov rdi, [rsp+68h+var_50] movsx esi, [rsp+68h+var_25] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short $+2 loc_3B080: jmp short $+2 loc_3B082: jmp short $+2 loc_3B084: mov rax, [rsp+68h+var_10] mov rcx, rax add rcx, 1 mov [rsp+68h+var_10], rcx mov al, [rax+1] mov [rsp+68h+var_25], al jmp loc_3AFCC loc_3B0A1: mov [rsp+68h+var_11], 1 test [rsp+68h+var_11], 1 jnz short loc_3B0B7 mov rdi, [rsp+68h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3B0B7: mov rax, [rsp+68h+var_58] add rsp, 68h retn loc_3B0C1: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_40] call __Unwind_Resume
_QWORD * testing::internal::StreamingListener::UrlEncode[abi:cxx11](_QWORD *a1, signed __int8 *a2) { long long v2; // rax signed __int8 *v3; // rax _BYTE v5[35]; // [rsp+20h] [rbp-48h] BYREF signed __int8 i; // [rsp+43h] [rbp-25h] char v7; // [rsp+57h] [rbp-11h] signed __int8 *v8; // [rsp+58h] [rbp-10h] _QWORD *v9; // [rsp+60h] [rbp-8h] v9 = a1; v8 = a2; v7 = 0; std::string::basic_string(a1); v2 = strlen(a2); std::string::reserve(a1, v2 + 1); for ( i = *a2; i; i = v3[1] ) { if ( i == 10 || (unsigned int)(i - 37) < 2 || i == 61 ) { std::string::push_back(a1, 37LL); testing::internal::String::FormatByte[abi:cxx11]((long long)v5, i); std::string::append(a1, v5); std::string::~string(v5); } else { std::string::push_back(a1, (unsigned int)i); } v3 = v8++; } return a1; }
UrlEncode[abi:cxx11]: SUB RSP,0x68 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV byte ptr [RSP + 0x57],0x0 CALL 0x001117b0 MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010b1d0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX INC RSI LAB_0013afba: CALL 0x0014a270 JMP 0x0013afc1 LAB_0013afc1: MOV RAX,qword ptr [RSP + 0x58] MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x43],AL LAB_0013afcc: MOVSX EAX,byte ptr [RSP + 0x43] CMP EAX,0x0 JZ 0x0013b0a1 MOVSX EAX,byte ptr [RSP + 0x43] MOV dword ptr [RSP + 0xc],EAX SUB EAX,0xa JZ 0x0013b016 JMP 0x0013afea LAB_0013afea: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,-0x25 SUB EAX,0x2 JC 0x0013b016 JMP 0x0013aff8 LAB_0013aff8: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x3d JZ 0x0013b016 JMP 0x0013b06f LAB_0013b016: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x25 CALL 0x0014c9a0 JMP 0x0013b027 LAB_0013b027: MOVZX ESI,byte ptr [RSP + 0x43] LEA RDI,[RSP + 0x20] CALL 0x00127540 JMP 0x0013b038 LAB_0013b038: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x20] CALL 0x0014cdc0 JMP 0x0013b049 LAB_0013b049: LEA RDI,[RSP + 0x20] CALL 0x0010ec60 JMP 0x0013b082 LAB_0013b06f: MOV RDI,qword ptr [RSP + 0x18] MOVSX ESI,byte ptr [RSP + 0x43] LAB_0013b079: CALL 0x0014c9a0 LAB_0013b07e: JMP 0x0013b080 LAB_0013b080: JMP 0x0013b082 LAB_0013b082: JMP 0x0013b084 LAB_0013b084: MOV RAX,qword ptr [RSP + 0x58] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x58],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RSP + 0x43],AL JMP 0x0013afcc LAB_0013b0a1: MOV byte ptr [RSP + 0x57],0x1 TEST byte ptr [RSP + 0x57],0x1 JNZ 0x0013b0b7 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010ec60 LAB_0013b0b7: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x68 RET
/* WARNING: Removing unreachable block (ram,0x0013b0ad) */ /* testing::internal::StreamingListener::UrlEncode[abi:cxx11](char const*) */ StreamingListener * __thiscall testing::internal::StreamingListener::UrlEncode_abi_cxx11_(StreamingListener *this,char *param_1) { int iVar1; size_t sVar2; String local_48 [35]; uchar local_25; int1 local_11; uchar *local_10; StreamingListener *local_8; local_11 = 0; local_10 = (uchar *)param_1; local_8 = this; std::__cxx11::string::string((string *)this); sVar2 = strlen((char *)local_10); /* try { // try from 0013afba to 0013b035 has its CatchHandler @ 0013b003 */ std::__cxx11::string::reserve((string *)this,sVar2 + 1); local_25 = *local_10; while (local_25 != '\0') { iVar1 = (int)(char)local_25; if (((iVar1 == 10) || (iVar1 - 0x25U < 2)) || (iVar1 == 0x3d)) { std::__cxx11::string::push_back((string *)this,'%'); String::FormatByte_abi_cxx11_(local_48,local_25); /* try { // try from 0013b038 to 0013b046 has its CatchHandler @ 0013b055 */ std::__cxx11::string::append((string *)this,(string *)local_48); std::__cxx11::string::~string((string *)local_48); } else { /* try { // try from 0013b079 to 0013b07d has its CatchHandler @ 0013b003 */ std::__cxx11::string::push_back((string *)this,local_25); } local_25 = local_10[1]; local_10 = local_10 + 1; } return this; }
29,076
safe_hash_set
eloqsql/mysys/my_safehash.c
my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, uchar *data) { SAFE_HASH_ENTRY *entry; my_bool error= 0; DBUG_ENTER("safe_hash_set"); DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data)); mysql_rwlock_wrlock(&hash->mutex); entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length); if (data == hash->default_value) { /* The key is to be associated with the default entry. In this case we can just delete the entry (if it existed) from the hash as a search will return the default entry */ if (!entry) /* nothing to do */ goto end; /* unlink entry from list */ if ((*entry->prev= entry->next)) entry->next->prev= entry->prev; my_hash_delete(&hash->hash, (uchar*) entry); goto end; } if (entry) { /* Entry existed; Just change the pointer to point at the new data */ entry->data= data; } else { if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY, sizeof(*entry) + length, MYF(MY_WME)))) { error= 1; goto end; } entry->key= (uchar*) (entry +1); memcpy((char*) entry->key, (char*) key, length); entry->length= length; entry->data= data; /* Link entry to list */ if ((entry->next= hash->root)) entry->next->prev= &entry->next; entry->prev= &hash->root; hash->root= entry; if (my_hash_insert(&hash->hash, (uchar*) entry)) { /* This can only happen if hash got out of memory */ my_free(entry); error= 1; goto end; } } end: mysql_rwlock_unlock(&hash->mutex); DBUG_RETURN(error); }
O3
c
safe_hash_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x90(%rdi) jne 0x5fd20 movq %rbx, %rdi callq 0x5e9a9 leaq 0x98(%rbx), %r13 movl %r15d, -0x2c(%rbp) movl %r15d, %r15d movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x4f01e cmpq %r12, 0x108(%rbx) je 0x5fc3e testq %rax, %rax je 0x5fc93 movq %r12, 0x10(%rax) jmp 0x5fc66 testq %rax, %rax je 0x5fc66 movq 0x18(%rax), %rcx movq 0x20(%rax), %rdx movq %rcx, (%rdx) testq %rcx, %rcx je 0x5fc5b movq 0x20(%rax), %rdx movq %rdx, 0x20(%rcx) movq %r13, %rdi movq %rax, %rsi callq 0x4f582 xorl %r14d, %r14d movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0x5fd39 movq %rbx, %rdi callq 0x5ea4a movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x38(%rbp) leaq 0x34f716(%rip), %rax # 0x3af3b4 movl (%rax), %edi leaq 0x28(%r15), %rsi movl $0x10, %edx callq 0x5a3c5 testq %rax, %rax je 0x5fd18 movq %rax, %r13 leaq 0x28(%rax), %rdi movq %rdi, (%rax) movq %r14, %rsi movq %r15, %rdx callq 0x282a0 movl -0x2c(%rbp), %eax movl %eax, 0x8(%r13) movq %r12, 0x10(%r13) leaq 0x110(%rbx), %rax movq 0x110(%rbx), %rcx movq %rcx, 0x18(%r13) testq %rcx, %rcx je 0x5fcf5 movq %r13, %rdx addq $0x18, %rdx movq %rdx, 0x20(%rcx) movq %rax, 0x20(%r13) movq %r13, (%rax) movq -0x38(%rbp), %rdi movq %r13, %rsi callq 0x4f27e testb %al, %al je 0x5fc66 movq %r13, %rdi callq 0x5a5f2 movb $0x1, %r14b jmp 0x5fc69 leaq 0x33273(%rip), %rsi # 0x92f9a movq %rbx, %rdi movl $0xcf, %edx callq 0x2a078 jmp 0x5fc0e leaq 0x2d0610(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x168(%rax) jmp 0x5fc79
safe_hash_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rcx mov r15d, edx mov r14, rsi mov rbx, rdi cmp qword ptr [rdi+90h], 0 jnz loc_5FD20 mov rdi, rbx call my_rw_wrlock loc_5FC0E: lea r13, [rbx+98h] mov [rbp+var_2C], r15d mov r15d, r15d mov rdi, r13 mov rsi, r14 mov rdx, r15 call my_hash_search cmp [rbx+108h], r12 jz short loc_5FC3E test rax, rax jz short loc_5FC93 mov [rax+10h], r12 jmp short loc_5FC66 loc_5FC3E: test rax, rax jz short loc_5FC66 mov rcx, [rax+18h] mov rdx, [rax+20h] mov [rdx], rcx test rcx, rcx jz short loc_5FC5B mov rdx, [rax+20h] mov [rcx+20h], rdx loc_5FC5B: mov rdi, r13 mov rsi, rax call my_hash_delete loc_5FC66: xor r14d, r14d loc_5FC69: mov rdi, [rbx+90h] test rdi, rdi jnz loc_5FD39 loc_5FC79: mov rdi, rbx call my_rw_unlock mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5FC93: mov [rbp+var_38], r13 lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rsi, [r15+28h] mov edx, 10h call my_malloc test rax, rax jz short loc_5FD18 mov r13, rax lea rdi, [rax+28h] mov [rax], rdi mov rsi, r14 mov rdx, r15 call _memcpy mov eax, [rbp+var_2C] mov [r13+8], eax mov [r13+10h], r12 lea rax, [rbx+110h] mov rcx, [rbx+110h] mov [r13+18h], rcx test rcx, rcx jz short loc_5FCF5 mov rdx, r13 add rdx, 18h mov [rcx+20h], rdx loc_5FCF5: mov [r13+20h], rax mov [rax], r13 mov rdi, [rbp+var_38] mov rsi, r13 call my_hash_insert test al, al jz loc_5FC66 mov rdi, r13 call my_free loc_5FD18: mov r14b, 1 jmp loc_5FC69 loc_5FD20: lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 0CFh call psi_rwlock_wrlock jmp loc_5FC0E loc_5FD39: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_5FC79
long long safe_hash_set(_QWORD *a1, long long a2, unsigned int a3, long long a4) { unsigned int v6; // r14d long long v7; // rax long long v8; // rcx _QWORD *v10; // rax long long v11; // r13 long long *v12; // rax long long v13; // rcx v6 = a2; if ( a1[18] ) psi_rwlock_wrlock((long long)a1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 0xCFu); else my_rw_wrlock((long long)a1); v7 = my_hash_search((long long)(a1 + 19), a2, a3); if ( a1[33] == a4 ) { if ( v7 ) { v8 = *(_QWORD *)(v7 + 24); **(_QWORD **)(v7 + 32) = v8; if ( v8 ) *(_QWORD *)(v8 + 32) = *(_QWORD *)(v7 + 32); my_hash_delete((long long)(a1 + 19), v7); } goto LABEL_10; } if ( v7 ) { *(_QWORD *)(v7 + 16) = a4; LABEL_10: v6 = 0; goto LABEL_11; } v10 = (_QWORD *)my_malloc(key_memory_SAFE_HASH_ENTRY, (const char *)(a3 + 40LL), 16); if ( v10 ) { v11 = (long long)v10; *v10 = v10 + 5; memcpy(v10 + 5, a2, a3); *(_DWORD *)(v11 + 8) = a3; *(_QWORD *)(v11 + 16) = a4; v12 = a1 + 34; v13 = a1[34]; *(_QWORD *)(v11 + 24) = v13; if ( v13 ) *(_QWORD *)(v13 + 32) = v11 + 24; *(_QWORD *)(v11 + 32) = v12; *v12 = v11; if ( !my_hash_insert((long long)(a1 + 19), v11) ) goto LABEL_10; my_free(v11); } LOBYTE(v6) = 1; LABEL_11: if ( a1[18] ) PSI_server[45](); my_rw_unlock((long long)a1); return v6; }
safe_hash_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RCX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RDI + 0x90],0x0 JNZ 0x0015fd20 MOV RDI,RBX CALL 0x0015e9a9 LAB_0015fc0e: LEA R13,[RBX + 0x98] MOV dword ptr [RBP + -0x2c],R15D MOV R15D,R15D MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 CALL 0x0014f01e CMP qword ptr [RBX + 0x108],R12 JZ 0x0015fc3e TEST RAX,RAX JZ 0x0015fc93 MOV qword ptr [RAX + 0x10],R12 JMP 0x0015fc66 LAB_0015fc3e: TEST RAX,RAX JZ 0x0015fc66 MOV RCX,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RDX],RCX TEST RCX,RCX JZ 0x0015fc5b MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RCX + 0x20],RDX LAB_0015fc5b: MOV RDI,R13 MOV RSI,RAX CALL 0x0014f582 LAB_0015fc66: XOR R14D,R14D LAB_0015fc69: MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x0015fd39 LAB_0015fc79: MOV RDI,RBX CALL 0x0015ea4a MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015fc93: MOV qword ptr [RBP + -0x38],R13 LEA RAX,[0x4af3b4] MOV EDI,dword ptr [RAX] LEA RSI,[R15 + 0x28] MOV EDX,0x10 CALL 0x0015a3c5 TEST RAX,RAX JZ 0x0015fd18 MOV R13,RAX LEA RDI,[RAX + 0x28] MOV qword ptr [RAX],RDI MOV RSI,R14 MOV RDX,R15 CALL 0x001282a0 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [R13 + 0x8],EAX MOV qword ptr [R13 + 0x10],R12 LEA RAX,[RBX + 0x110] MOV RCX,qword ptr [RBX + 0x110] MOV qword ptr [R13 + 0x18],RCX TEST RCX,RCX JZ 0x0015fcf5 MOV RDX,R13 ADD RDX,0x18 MOV qword ptr [RCX + 0x20],RDX LAB_0015fcf5: MOV qword ptr [R13 + 0x20],RAX MOV qword ptr [RAX],R13 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R13 CALL 0x0014f27e TEST AL,AL JZ 0x0015fc66 MOV RDI,R13 CALL 0x0015a5f2 LAB_0015fd18: MOV R14B,0x1 JMP 0x0015fc69 LAB_0015fd20: LEA RSI,[0x192f9a] MOV RDI,RBX MOV EDX,0xcf CALL 0x0012a078 JMP 0x0015fc0e LAB_0015fd39: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0015fc79
ulong safe_hash_set(long param_1,void *param_2,uint param_3,long param_4) { long lVar1; long lVar2; char cVar3; long lVar4; int8 *puVar5; ulong uVar6; if (*(long *)(param_1 + 0x90) == 0) { my_rw_wrlock(param_1); } else { psi_rwlock_wrlock(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xcf); } lVar1 = param_1 + 0x98; uVar6 = (ulong)param_3; lVar4 = my_hash_search(lVar1,param_2,uVar6); if (*(long *)(param_1 + 0x108) == param_4) { if (lVar4 != 0) { lVar2 = *(long *)(lVar4 + 0x18); **(long **)(lVar4 + 0x20) = lVar2; if (lVar2 != 0) { *(int8 *)(lVar2 + 0x20) = *(int8 *)(lVar4 + 0x20); } my_hash_delete(lVar1,lVar4); } } else { if (lVar4 == 0) { puVar5 = (int8 *)my_malloc(key_memory_SAFE_HASH_ENTRY,uVar6 + 0x28,0x10); if (puVar5 != (int8 *)0x0) { *puVar5 = puVar5 + 5; memcpy(puVar5 + 5,param_2,uVar6); *(uint *)(puVar5 + 1) = param_3; puVar5[2] = param_4; lVar4 = *(long *)(param_1 + 0x110); puVar5[3] = lVar4; if (lVar4 != 0) { *(int8 **)(lVar4 + 0x20) = puVar5 + 3; } puVar5[4] = (int8 *)(param_1 + 0x110); *(int8 *)(param_1 + 0x110) = puVar5; cVar3 = my_hash_insert(lVar1,puVar5); if (cVar3 == '\0') goto LAB_0015fc66; my_free(puVar5); } uVar6 = CONCAT71((int7)((ulong)param_2 >> 8),1); goto LAB_0015fc69; } *(long *)(lVar4 + 0x10) = param_4; } LAB_0015fc66: uVar6 = 0; LAB_0015fc69: if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(param_1); return uVar6 & 0xffffffff; }
29,077
DatabaseWorkerPool<CharacterDatabaseConnection>::Query(PreparedStatement<CharacterDatabaseConnection>*)
SylCore-WoTLK/src/server/database/Database/DatabaseWorkerPool.cpp
PreparedQueryResult DatabaseWorkerPool<T>::Query(PreparedStatement<T>* stmt) { auto connection = GetFreeConnection(); PreparedResultSet* ret = connection->Query(stmt); connection->Unlock(); //! Delete proxy-class. Not needed anymore delete stmt; if (!ret || !ret->GetRowCount()) { delete ret; return PreparedQueryResult(nullptr); } return PreparedQueryResult(ret); }
O0
cpp
DatabaseWorkerPool<CharacterDatabaseConnection>::Query(PreparedStatement<CharacterDatabaseConnection>*): subq $0x48, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0xd1f80 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x107cb0 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0x106100 movq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) cmpq $0x0, %rax je 0xd21c8 movq 0x18(%rsp), %rdi movq (%rdi), %rax callq *0x8(%rax) cmpq $0x0, 0x20(%rsp) je 0xd21e0 movq 0x20(%rsp), %rdi callq 0xc7d70 cmpq $0x0, %rax jne 0xd2216 movq 0x20(%rsp), %rax movq %rax, (%rsp) cmpq $0x0, %rax je 0xd2206 movq (%rsp), %rdi callq 0x12df30 movq (%rsp), %rdi movl $0x60, %esi callq 0x261a40 movq 0x8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xc7d80 jmp 0xd2225 movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0xc7da0 movq 0x10(%rsp), %rax addq $0x48, %rsp retq nop
_ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE5QueryEP17PreparedStatementIS0_E: sub rsp, 48h mov [rsp+48h+var_40], rdi mov rax, rdi mov [rsp+48h+var_38], rax mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov rdi, [rsp+48h+var_10] call _ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE17GetFreeConnectionEv; DatabaseWorkerPool<CharacterDatabaseConnection>::GetFreeConnection(void) mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_20]; this mov rsi, [rsp+48h+var_18]; PreparedStatementBase * call _ZN15MySQLConnection5QueryEP21PreparedStatementBase; MySQLConnection::Query(PreparedStatementBase *) mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_20]; this call _ZN15MySQLConnection6UnlockEv; MySQLConnection::Unlock(void) mov rax, [rsp+48h+var_18] mov [rsp+48h+var_30], rax cmp rax, 0 jz short loc_D21C8 mov rdi, [rsp+48h+var_30] mov rax, [rdi] call qword ptr [rax+8] loc_D21C8: cmp [rsp+48h+var_28], 0 jz short loc_D21E0 mov rdi, [rsp+48h+var_28]; this call _ZNK17PreparedResultSet11GetRowCountEv; PreparedResultSet::GetRowCount(void) cmp rax, 0 jnz short loc_D2216 loc_D21E0: mov rax, [rsp+48h+var_28] mov [rsp+48h+var_48], rax cmp rax, 0 jz short loc_D2206 mov rdi, [rsp+48h+var_48]; this call _ZN17PreparedResultSetD2Ev; PreparedResultSet::~PreparedResultSet() mov rdi, [rsp+48h+var_48]; void * mov esi, 60h ; '`'; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_D2206: mov rdi, [rsp+48h+var_40] xor eax, eax mov esi, eax call _ZNSt10shared_ptrI17PreparedResultSetEC2EDn; std::shared_ptr<PreparedResultSet>::shared_ptr(decltype(nullptr)) jmp short loc_D2225 loc_D2216: mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_28] call _ZNSt10shared_ptrI17PreparedResultSetEC2IS0_vEEPT_; std::shared_ptr<PreparedResultSet>::shared_ptr<PreparedResultSet,void>(PreparedResultSet *) loc_D2225: mov rax, [rsp+48h+var_38] add rsp, 48h retn
long long DatabaseWorkerPool<CharacterDatabaseConnection>::Query( long long a1, long long a2, PreparedStatementBase *a3) { PreparedResultSet *v4; // [rsp+20h] [rbp-28h] MySQLConnection *FreeConnection; // [rsp+28h] [rbp-20h] FreeConnection = DatabaseWorkerPool<CharacterDatabaseConnection>::GetFreeConnection(a2); v4 = (PreparedResultSet *)MySQLConnection::Query(FreeConnection, a3); MySQLConnection::Unlock(FreeConnection); if ( a3 ) (*(void ( **)(PreparedStatementBase *))(*(_QWORD *)a3 + 8LL))(a3); if ( v4 && PreparedResultSet::GetRowCount(v4) ) { std::shared_ptr<PreparedResultSet>::shared_ptr<PreparedResultSet,void>(a1, (long long)v4); } else { if ( v4 ) { PreparedResultSet::~PreparedResultSet(v4); operator delete(v4, 0x60uLL); } std::shared_ptr<PreparedResultSet>::shared_ptr(a1); } return a1; }
Query: SUB RSP,0x48 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001d1f80 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00207cb0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x00206100 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX CMP RAX,0x0 JZ 0x001d21c8 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001d21c8: CMP qword ptr [RSP + 0x20],0x0 JZ 0x001d21e0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001c7d70 CMP RAX,0x0 JNZ 0x001d2216 LAB_001d21e0: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX CMP RAX,0x0 JZ 0x001d2206 MOV RDI,qword ptr [RSP] CALL 0x0022df30 MOV RDI,qword ptr [RSP] MOV ESI,0x60 CALL 0x00361a40 LAB_001d2206: MOV RDI,qword ptr [RSP + 0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x001c7d80 JMP 0x001d2225 LAB_001d2216: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001c7da0 LAB_001d2225: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x48 RET
/* DatabaseWorkerPool<CharacterDatabaseConnection>::Query(PreparedStatement<CharacterDatabaseConnection>*) */ PreparedStatement * DatabaseWorkerPool<CharacterDatabaseConnection>::Query(PreparedStatement *param_1) { MySQLConnection *this; PreparedResultSet *this_00; long lVar1; PreparedStatementBase *in_RDX; DatabaseWorkerPool<CharacterDatabaseConnection> *in_RSI; this = (MySQLConnection *)GetFreeConnection(in_RSI); this_00 = (PreparedResultSet *)MySQLConnection::Query(this,in_RDX); MySQLConnection::Unlock(this); if (in_RDX != (PreparedStatementBase *)0x0) { (**(code **)(*(long *)in_RDX + 8))(); } if ((this_00 != (PreparedResultSet *)0x0) && (lVar1 = PreparedResultSet::GetRowCount(this_00), lVar1 != 0)) { std::shared_ptr<PreparedResultSet>::shared_ptr<PreparedResultSet,void> ((shared_ptr<PreparedResultSet> *)param_1,this_00); return param_1; } if (this_00 != (PreparedResultSet *)0x0) { PreparedResultSet::~PreparedResultSet(this_00); operator_delete(this_00,0x60); } std::shared_ptr<PreparedResultSet>::shared_ptr((_func_decltype_nullptr *)param_1); return param_1; }
29,078
maria_ft_linearize
eloqsql/storage/maria/ma_ft_parser.c
FT_WORD * maria_ft_linearize(TREE *wtree, MEM_ROOT *mem_root) { FT_WORD *wlist,*p; FT_DOCSTAT docstat; DBUG_ENTER("maria_ft_linearize"); if ((wlist=(FT_WORD *) alloc_root(mem_root, sizeof(FT_WORD)* (1+wtree->elements_in_tree)))) { docstat.list=wlist; docstat.uniq=wtree->elements_in_tree; docstat.sum=0; tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right); } delete_tree(wtree, 0); if (!wlist) DBUG_RETURN(NULL); docstat.list->pos=NULL; for (p=wlist;p->pos;p++) { p->weight=PRENORM_IN_USE; } for (p=wlist;p->pos;p++) { p->weight/=NORM_IN_USE; } DBUG_RETURN(wlist); }
O3
c
maria_ft_linearize: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %rax movq %rdi, %r14 movl 0x20c(%rdi), %ecx incl %ecx shlq $0x3, %rcx leaq (%rcx,%rcx,2), %rsi movq %rax, %rdi callq 0x9df2b movq %rax, %rbx testq %rax, %rax je 0x60644 leaq -0x38(%rbp), %r15 movq %rbx, (%r15) movl 0x20c(%r14), %eax movl %eax, 0x8(%r15) xorl %r12d, %r12d movq %r12, 0x10(%r15) leaq 0xa9(%rip), %rsi # 0x6065e movq %r14, %rdi movq %r15, %rdx xorl %ecx, %ecx callq 0xa6703 movq %r14, %rdi xorl %esi, %esi callq 0xa5b9e movq (%r15), %rax movq %r12, (%rax) cmpq %r12, (%rbx) je 0x6064e movl -0x30(%rbp), %eax cvtsi2sd %rax, %xmm0 movsd -0x28(%rbp), %xmm1 leaq 0x10(%rbx), %rax movsd (%rax), %xmm2 divsd %xmm1, %xmm2 mulsd %xmm0, %xmm2 movsd %xmm2, (%rax) cmpq $0x0, 0x8(%rax) leaq 0x18(%rax), %rax jne 0x605e8 cmpq $0x0, (%rbx) je 0x6064e movl -0x30(%rbp), %eax xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 mulsd 0x82054(%rip), %xmm0 # 0xe2670 addsd 0x82054(%rip), %xmm0 # 0xe2678 movq %rbx, %rax addq $0x10, %rax movsd (%rax), %xmm1 divsd %xmm0, %xmm1 movsd %xmm1, (%rax) cmpq $0x0, 0x8(%rax) leaq 0x18(%rax), %rax jne 0x6062b jmp 0x6064e movq %r14, %rdi xorl %esi, %esi callq 0xa5b9e movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
maria_ft_linearize: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov rax, rsi mov r14, rdi mov ecx, [rdi+20Ch] inc ecx shl rcx, 3 lea rsi, [rcx+rcx*2] mov rdi, rax call alloc_root mov rbx, rax test rax, rax jz loc_60644 lea r15, [rbp+var_38] mov [r15], rbx mov eax, [r14+20Ch] mov [r15+8], eax xor r12d, r12d mov [r15+10h], r12 lea rsi, walk_and_copy mov rdi, r14 mov rdx, r15 xor ecx, ecx call tree_walk mov rdi, r14 xor esi, esi call delete_tree mov rax, [r15] mov [rax], r12 cmp [rbx], r12 jz short loc_6064E mov eax, [rbp+var_30] cvtsi2sd xmm0, rax movsd xmm1, [rbp+var_28] lea rax, [rbx+10h] loc_605E8: movsd xmm2, qword ptr [rax] divsd xmm2, xmm1 mulsd xmm2, xmm0 movsd qword ptr [rax], xmm2 cmp qword ptr [rax+8], 0 lea rax, [rax+18h] jnz short loc_605E8 cmp qword ptr [rbx], 0 jz short loc_6064E mov eax, [rbp+var_30] xorps xmm0, xmm0 cvtsi2sd xmm0, rax mulsd xmm0, cs:qword_E2670 addsd xmm0, cs:qword_E2678 mov rax, rbx add rax, 10h loc_6062B: movsd xmm1, qword ptr [rax] divsd xmm1, xmm0 movsd qword ptr [rax], xmm1 cmp qword ptr [rax+8], 0 lea rax, [rax+18h] jnz short loc_6062B jmp short loc_6064E loc_60644: mov rdi, r14 xor esi, esi call delete_tree loc_6064E: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * maria_ft_linearize(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rbx double v4; // xmm0_8 double v5; // xmm1_8 double *v6; // rax bool v7; // zf double v8; // xmm0_8 double *v9; // rax _QWORD *v11; // [rsp+8h] [rbp-38h] BYREF int v12; // [rsp+10h] [rbp-30h] double v13; // [rsp+18h] [rbp-28h] v2 = alloc_root(a2, 24LL * (unsigned int)(*(_DWORD *)(a1 + 524) + 1)); v3 = (_QWORD *)v2; if ( v2 ) { v11 = (_QWORD *)v2; v12 = *(_DWORD *)(a1 + 524); v13 = 0.0; tree_walk(a1, walk_and_copy, &v11, 0LL); delete_tree(a1, 0LL); *v11 = 0LL; if ( *v3 ) { v4 = (double)v12; v5 = v13; v6 = (double *)(v3 + 2); do { *v6 = *v6 / v5 * v4; v7 = *((_QWORD *)v6 + 1) == 0LL; v6 += 3; } while ( !v7 ); if ( *v3 ) { v8 = (double)v12 * 0.0115 + 1.0; v9 = (double *)(v3 + 2); do { *v9 = *v9 / v8; v7 = *((_QWORD *)v9 + 1) == 0LL; v9 += 3; } while ( !v7 ); } } } else { delete_tree(a1, 0LL); } return v3; }
maria_ft_linearize: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RAX,RSI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x20c] INC ECX SHL RCX,0x3 LEA RSI,[RCX + RCX*0x2] MOV RDI,RAX CALL 0x0019df2b MOV RBX,RAX TEST RAX,RAX JZ 0x00160644 LEA R15,[RBP + -0x38] MOV qword ptr [R15],RBX MOV EAX,dword ptr [R14 + 0x20c] MOV dword ptr [R15 + 0x8],EAX XOR R12D,R12D MOV qword ptr [R15 + 0x10],R12 LEA RSI,[0x16065e] MOV RDI,R14 MOV RDX,R15 XOR ECX,ECX CALL 0x001a6703 MOV RDI,R14 XOR ESI,ESI CALL 0x001a5b9e MOV RAX,qword ptr [R15] MOV qword ptr [RAX],R12 CMP qword ptr [RBX],R12 JZ 0x0016064e MOV EAX,dword ptr [RBP + -0x30] CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [RBP + -0x28] LEA RAX,[RBX + 0x10] LAB_001605e8: MOVSD XMM2,qword ptr [RAX] DIVSD XMM2,XMM1 MULSD XMM2,XMM0 MOVSD qword ptr [RAX],XMM2 CMP qword ptr [RAX + 0x8],0x0 LEA RAX,[RAX + 0x18] JNZ 0x001605e8 CMP qword ptr [RBX],0x0 JZ 0x0016064e MOV EAX,dword ptr [RBP + -0x30] XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MULSD XMM0,qword ptr [0x001e2670] ADDSD XMM0,qword ptr [0x001e2678] MOV RAX,RBX ADD RAX,0x10 LAB_0016062b: MOVSD XMM1,qword ptr [RAX] DIVSD XMM1,XMM0 MOVSD qword ptr [RAX],XMM1 CMP qword ptr [RAX + 0x8],0x0 LEA RAX,[RAX + 0x18] JNZ 0x0016062b JMP 0x0016064e LAB_00160644: MOV RDI,R14 XOR ESI,ESI CALL 0x001a5b9e LAB_0016064e: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long * maria_ft_linearize(long param_1,int8 param_2) { double *pdVar1; long *plVar2; double *pdVar3; double dVar4; long *local_40; uint local_38; double local_30; plVar2 = (long *)alloc_root(param_2,(ulong)(*(int *)(param_1 + 0x20c) + 1) * 0x18); if (plVar2 == (long *)0x0) { delete_tree(param_1,0); } else { local_38 = *(uint *)(param_1 + 0x20c); local_30 = 0.0; local_40 = plVar2; tree_walk(param_1,walk_and_copy,&local_40,0); delete_tree(param_1,0); *local_40 = 0; if (*plVar2 != 0) { pdVar3 = (double *)(plVar2 + 2); do { *pdVar3 = (*pdVar3 / local_30) * (double)local_38; pdVar1 = pdVar3 + 1; pdVar3 = pdVar3 + 3; } while (*pdVar1 != 0.0); if (*plVar2 != 0) { dVar4 = (double)local_38 * _DAT_001e2670 + DAT_001e2678; pdVar3 = (double *)(plVar2 + 2); do { *pdVar3 = *pdVar3 / dVar4; pdVar1 = pdVar3 + 1; pdVar3 = pdVar3 + 3; } while (*pdVar1 != 0.0); } } } return plVar2; }
29,079
mysql_stmt_send_long_data_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_send_long_data_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status) { MK_ASYNC_CONT_BODY( stmt->mysql, TRUE, r_my_bool) }
O3
c
mysql_stmt_send_long_data_cont: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r15 cmpb $0x0, 0x15(%r15) je 0x8a3a5 movb $0x1, 0x14(%r15) movl %edx, 0x4(%r15) leaq 0x38(%r15), %rdi callq 0x8aefb movb $0x0, 0x14(%r15) testl %eax, %eax jle 0x8a408 movl (%r15), %r15d jmp 0x8a47e movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35ab61(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35ab46(%rip), %rax # 0x3e4f30 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, (%rbx) jmp 0x8a47e movb $0x0, 0x15(%r15) js 0x8a415 movb 0x8(%r15), %al jmp 0x8a479 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35aaed(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35aad2(%rip), %rax # 0x3e4f30 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_send_long_data_cont: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] mov rcx, [rax+480h] mov r15, [rcx+28h] cmp byte ptr [r15+15h], 0 jz short loc_8A3A5 mov byte ptr [r15+14h], 1 mov [r15+4], edx lea rdi, [r15+38h] call my_context_continue mov byte ptr [r15+14h], 0 test eax, eax jle short loc_8A408 mov r15d, [r15] jmp loc_8A47E loc_8A3A5: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov byte ptr [rbx], 1 jmp short loc_8A47E loc_8A408: mov byte ptr [r15+15h], 0 js short loc_8A415 mov al, [r15+8] jmp short loc_8A479 loc_8A415: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_8A479: mov [rbx], al xor r15d, r15d loc_8A47E: mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_send_long_data_cont(char *a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int *v4; // r15 int v5; // eax unsigned int v6; // r15d char v7; // al v3 = *(_QWORD *)(a2 + 56); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( *((_BYTE *)v4 + 21) ) { *((_BYTE *)v4 + 20) = 1; v4[1] = a3; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = *((_BYTE *)v4 + 8); } *a1 = v7; return 0; } else { return *v4; } } else { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; *a1 = 1; } return v6; }
mysql_stmt_send_long_data_cont: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] MOV RCX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RCX + 0x28] CMP byte ptr [R15 + 0x15],0x0 JZ 0x0018a3a5 MOV byte ptr [R15 + 0x14],0x1 MOV dword ptr [R15 + 0x4],EDX LEA RDI,[R15 + 0x38] CALL 0x0018aefb MOV byte ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0018a408 MOV R15D,dword ptr [R15] JMP 0x0018a47e LAB_0018a3a5: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV byte ptr [RBX],0x1 JMP 0x0018a47e LAB_0018a408: MOV byte ptr [R15 + 0x15],0x0 JS 0x0018a415 MOV AL,byte ptr [R15 + 0x8] JMP 0x0018a479 LAB_0018a415: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0018a479: MOV byte ptr [RBX],AL XOR R15D,R15D LAB_0018a47e: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_send_long_data_cont(int1 *param_1,long param_2,int4 param_3) { int4 *puVar1; int1 uVar2; int iVar3; int4 uVar4; puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); uVar4 = 0; *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_004e4fa0,0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; *param_1 = 1; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_3; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (iVar3 < 1) { *(int1 *)((long)puVar1 + 0x15) = 0; if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004e4f70, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } *param_1 = uVar2; uVar4 = 0; } else { uVar4 = *puVar1; } } return uVar4; }
29,080
ma_column_nr_write
eloqsql/storage/maria/ma_open.c
my_bool _ma_column_nr_write(File file, uint16 *offsets, uint columns) { uchar *buff, *ptr, *end; size_t size= columns*2; my_bool res; if (!(buff= (uchar*) my_alloca(size))) return 1; for (ptr= buff, end= ptr + size; ptr < end ; ptr+= 2, offsets++) int2store(ptr, *offsets); res= mysql_file_write(file, buff, size, MYF(MY_NABP)) != 0; my_afree(buff); return res; }
O3
c
ma_column_nr_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, %ebx movl %edi, %r14d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) addl %ebx, %ebx movq %rsp, %r15 leaq 0xf(%rbx), %rax andq $-0x10, %rax subq %rax, %r15 movq %r15, %rsp testl %ebx, %ebx je 0x6bea9 leaq (%r15,%rbx), %rax movq %r15, %rcx orq $0x2, %rcx cmpq %rcx, %rax cmovaq %rax, %rcx movq %r15, %rdx notq %rdx addq %rcx, %rdx andq $-0x2, %rdx addq $0x2, %rdx movq %r15, %rdi callq 0x29080 leaq 0x31a160(%rip), %r13 # 0x386010 movq (%r13), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x6bf05 movl $0x4, %ecx movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq 0x2efe4 movq %rax, %r14 testq %r14, %r14 setne %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x6bf52 leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq (%r13), %rax leaq 0x6eaff(%rip), %rdx # 0xdaa12 movq %r12, %rdi movq %rbx, %rsi movl $0x79a, %ecx # imm = 0x79A callq *0x210(%rax) movl $0x4, %ecx movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq 0x2efe4 movq %rax, %r14 xorl %esi, %esi testq %rax, %rax cmoveq %rbx, %rsi movq (%r13), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x6bee1 callq 0x29250
_ma_column_nr_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebx, edx mov r14d, edi mov rax, fs:28h mov [rbp+var_30], rax add ebx, ebx mov r15, rsp lea rax, [rbx+0Fh] and rax, 0FFFFFFFFFFFFFFF0h sub r15, rax mov rsp, r15 test ebx, ebx jz short loc_6BEA9 lea rax, [r15+rbx] mov rcx, r15 or rcx, 2 cmp rax, rcx cmova rcx, rax mov rdx, r15 not rdx add rdx, rcx and rdx, 0FFFFFFFFFFFFFFFEh add rdx, 2 mov rdi, r15 call _memcpy loc_6BEA9: lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_6BF05 mov ecx, 4 mov edi, r14d mov rsi, r15 mov rdx, rbx call my_write mov r14, rax loc_6BEE1: test r14, r14 setnz al mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_6BF52 lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6BF05: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, rbx mov ecx, 79Ah call qword ptr [rax+210h] mov ecx, 4 mov edi, r14d mov rsi, r15 mov rdx, rbx call my_write mov r14, rax xor esi, esi test rax, rax cmovz rsi, rbx mov rax, [r13+0] mov rdi, r12 call qword ptr [rax+218h] jmp short loc_6BEE1 loc_6BF52: call ___stack_chk_fail
// bad sp value at call has been detected, the output may be wrong! bool ma_column_nr_write(unsigned int a1, long long a2, int a3) { long long v3; // rbx unsigned long long v4; // r15 long long v5; // rcx long long v6; // rax long long v7; // r14 long long v9; // r12 long long v10; // rsi _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF unsigned long long v13; // [rsp+50h] [rbp-30h] v13 = __readfsqword(0x28u); v3 = (unsigned int)(2 * a3); v4 = (unsigned long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8]; if ( (_DWORD)v3 ) { v5 = v4 | 2; if ( v4 + v3 > (v4 | 2) ) v5 = v4 + v3; memcpy(&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], a2, ((v5 + ~v4) & 0xFFFFFFFFFFFFFFFELL) + 2); } v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, a1, 7LL); if ( v6 ) { v9 = v6; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v6, v3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 1946LL); v7 = my_write(a1, (long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], v3, 4LL); v10 = 0LL; if ( !v7 ) v10 = v3; ((void ( *)(long long, long long))PSI_server[67])(v9, v10); } else { v7 = my_write(a1, (long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], v3, 4LL); } return v7 != 0; }
_ma_column_nr_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBX,EDX MOV R14D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX ADD EBX,EBX MOV R15,RSP LEA RAX,[RBX + 0xf] AND RAX,-0x10 SUB R15,RAX MOV RSP,R15 TEST EBX,EBX JZ 0x0016bea9 LEA RAX,[R15 + RBX*0x1] MOV RCX,R15 OR RCX,0x2 CMP RAX,RCX CMOVA RCX,RAX MOV RDX,R15 NOT RDX ADD RDX,RCX AND RDX,-0x2 ADD RDX,0x2 MOV RDI,R15 CALL 0x00129080 LAB_0016bea9: LEA R13,[0x486010] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0016bf05 MOV ECX,0x4 MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL 0x0012efe4 MOV R14,RAX LAB_0016bee1: TEST R14,R14 SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0016bf52 LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016bf05: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1daa12] MOV RDI,R12 MOV RSI,RBX MOV ECX,0x79a CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL 0x0012efe4 MOV R14,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RBX MOV RAX,qword ptr [R13] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0016bee1 LAB_0016bf52: CALL 0x00129250
bool _ma_column_nr_write(int4 param_1,void *param_2,int param_3) { code *pcVar1; long lVar2; long lVar3; long lVar4; int1 *puVar5; ulong uVar6; ulong uVar7; int1 *__dest; long in_FS_OFFSET; int8 uStack_90; int1 auStack_88 [8]; int1 local_80 [72]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar6 = (ulong)(uint)(param_3 * 2); lVar2 = -(uVar6 + 0xf & 0xfffffffffffffff0); __dest = auStack_88 + lVar2; if (param_3 * 2 != 0) { puVar5 = (int1 *)((ulong)__dest | 2); if ((int1 *)((ulong)__dest | 2) < __dest + uVar6) { puVar5 = __dest + uVar6; } *(int8 *)((long)&uStack_90 + lVar2) = 0x16bea9; memcpy(__dest,param_2,((ulong)(puVar5 + ~(ulong)__dest) & 0xfffffffffffffffe) + 2); } pcVar1 = *(code **)(PSI_server + 0x158); *(int8 *)((long)&uStack_90 + lVar2) = 0x16bec6; lVar3 = (*pcVar1)(local_80,param_1,7); if (lVar3 == 0) { *(int8 *)((long)&uStack_90 + lVar2) = 0x16bede; lVar4 = my_write(param_1,__dest,uVar6,4); } else { pcVar1 = *(code **)(PSI_server + 0x210); *(int8 *)((long)&uStack_90 + lVar2) = 0x16bf24; (*pcVar1)(lVar3,uVar6,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x79a); *(int8 *)((long)&uStack_90 + lVar2) = 0x16bf37; lVar4 = my_write(param_1,__dest,uVar6,4); uVar7 = 0; if (lVar4 == 0) { uVar7 = uVar6; } pcVar1 = *(code **)(PSI_server + 0x218); *(int8 *)((long)&uStack_90 + lVar2) = 0x16bf50; (*pcVar1)(lVar3,uVar7); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return lVar4 != 0; } /* WARNING: Subroutine does not return */ *(code **)((long)&uStack_90 + lVar2) = _ma_set_data_pagecache_callbacks; __stack_chk_fail(); }
29,081
free_rw_handler
bluesky950520[P]quickjs/quickjs-libc.c
static void free_rw_handler(JSRuntime *rt, JSOSRWHandler *rh) { int i; list_del(&rh->link); for(i = 0; i < 2; i++) { JS_FreeValueRT(rt, rh->rw_func[i]); } js_free_rt(rt, rh); }
O3
c
free_rw_handler: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movq 0x18(%rsi), %rsi movq 0x20(%rbx), %rdx callq 0x1d5bd movq 0x28(%rbx), %rsi movq 0x30(%rbx), %rdx movq %r14, %rdi callq 0x1d5bd movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1c730
free_rw_handler: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov rsi, [rsi+18h] mov rdx, [rbx+20h] call JS_FreeValueRT mov rsi, [rbx+28h] mov rdx, [rbx+30h] mov rdi, r14 call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt
long long free_rw_handler(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; JS_FreeValueRT(a1, a2[3], a2[4]); JS_FreeValueRT(a1, a2[5], a2[6]); return js_free_rt(a1, a2); }
free_rw_handler: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RSI,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RBX + 0x20] CALL 0x0011d5bd MOV RSI,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RBX + 0x30] MOV RDI,R14 CALL 0x0011d5bd MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011c730
void free_rw_handler(int8 param_1,long *param_2) { long lVar1; long *plVar2; lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; JS_FreeValueRT(param_1,param_2[3],param_2[4]); JS_FreeValueRT(param_1,param_2[5],param_2[6]); js_free_rt(param_1,param_2); return; }
29,082
my_strnxfrm_win1250ch
eloqsql/strings/ctype-win1250ch.c
static size_t my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p; int pass = 0; size_t totlen = 0; p = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; while (totlen < len) { NEXT_CMP_VALUE(src, p, pass, value, (int)srclen); if (!value) break; if ((1 << pass) & flags) dest[totlen++] = value; } if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, 0x00, len - totlen); totlen= len; } return totlen; }
O3
c
my_strnxfrm_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, -0x50(%rbp) movl 0x10(%rbp), %eax movl %eax, %edx orl $0xf, %edx testb $0xf, %al cmovnel %eax, %edx xorl %r10d, %r10d testq %rbx, %rbx je 0x75658 movslq %r9d, %rdi movl $0x1, %eax subq %r8, %rax movq %rax, -0x60(%rbp) leaq 0x286495(%rip), %r14 # 0x2fb990 leaq 0x2a3f9e(%rip), %r15 # 0x3194a0 xorl %eax, %eax movq %r8, %r11 movq %rbx, -0x48(%rbp) movq %r9, -0x40(%rbp) movq %r8, -0x38(%rbp) movl %edx, -0x2c(%rbp) movq %r11, %rsi subq %r8, %rsi cmpq %rdi, %rsi jge 0x75532 testl %r10d, %r10d je 0x755f4 movl $0x9, %r12d jmp 0x75553 testl %r9d, %r9d jle 0x7565c testl %r10d, %r10d jne 0x7565c movl $0x1, %r10d movl $0x9, %r12d movq %r8, %r11 movq %r14, %rsi movzbl (%r11), %ecx movb (%rsi,%rcx), %sil cmpb $-0x1, %sil jne 0x75634 movq %r12, -0x68(%rbp) movq %r10, -0x58(%rbp) movq %r11, %rdx subq %r8, %rdx movq -0x60(%rbp), %rcx leaq (%rcx,%r11), %r13 xorl %r10d, %r10d movq %r10, %rbx shlq $0x4, %rbx movq (%rbx,%r15), %rsi movb (%rsi), %r9b testb %r9b, %r9b je 0x755c4 cmpq %rdi, %rdx jge 0x755c4 incq %rsi movq %r13, %r14 movq %r11, %r12 cmpb (%r12), %r9b jne 0x755cc incq %r12 movb (%rsi), %r9b testb %r9b, %r9b je 0x755c7 leaq 0x1(%r14), %rcx incq %rsi cmpq %rdi, %r14 movq %rcx, %r14 jl 0x755a2 jmp 0x755c7 movq %r11, %r12 testb %r9b, %r9b je 0x75609 incq %r10 cmpq $0x50, %r10 jne 0x75581 movb $-0x1, %sil movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28639e(%rip), %r14 # 0x2fb990 jmp 0x75639 xorl %r10d, %r10d movl $0x8, %r12d leaq 0x28628c(%rip), %rsi # 0x2fb890 jmp 0x75556 addq %r15, %rbx movq -0x68(%rbp), %rcx movb (%rbx,%rcx), %sil decq %r12 movq %r12, %r11 movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28635c(%rip), %r14 # 0x2fb990 testb %sil, %sil je 0x7565c btl %r10d, %edx jae 0x7564a movq -0x50(%rbp), %rcx movb %sil, (%rcx,%rax) incq %rax incq %r11 cmpq %rbx, %rax jb 0x75516 jmp 0x75677 xorl %eax, %eax jmp 0x75677 testb %dl, %dl jns 0x75677 movq -0x50(%rbp), %rdi addq %rax, %rdi movq %rbx, %rdx subq %rax, %rdx xorl %esi, %esi callq 0x261c0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov [rbp+var_50], rsi mov eax, [rbp+arg_0] mov edx, eax or edx, 0Fh test al, 0Fh cmovnz edx, eax xor r10d, r10d test rbx, rbx jz loc_75658 movsxd rdi, r9d mov eax, 1 sub rax, r8 mov [rbp+var_60], rax lea r14, _sort_order_win1250ch2 lea r15, doubles_0 xor eax, eax mov r11, r8 mov [rbp+var_48], rbx mov [rbp+var_40], r9 mov [rbp+var_38], r8 mov [rbp+var_2C], edx loc_75516: mov rsi, r11 sub rsi, r8 cmp rsi, rdi jge short loc_75532 test r10d, r10d jz loc_755F4 mov r12d, 9 jmp short loc_75553 loc_75532: test r9d, r9d jle loc_7565C test r10d, r10d jnz loc_7565C mov r10d, 1 mov r12d, 9 mov r11, r8 loc_75553: mov rsi, r14 loc_75556: movzx ecx, byte ptr [r11] mov sil, [rsi+rcx] cmp sil, 0FFh jnz loc_75634 mov [rbp+var_68], r12 mov [rbp+var_58], r10 mov rdx, r11 sub rdx, r8 mov rcx, [rbp+var_60] lea r13, [rcx+r11] xor r10d, r10d loc_75581: mov rbx, r10 shl rbx, 4 mov rsi, [rbx+r15] mov r9b, [rsi] test r9b, r9b jz short loc_755C4 cmp rdx, rdi jge short loc_755C4 inc rsi mov r14, r13 mov r12, r11 loc_755A2: cmp r9b, [r12] jnz short loc_755CC inc r12 mov r9b, [rsi] test r9b, r9b jz short loc_755C7 lea rcx, [r14+1] inc rsi cmp r14, rdi mov r14, rcx jl short loc_755A2 jmp short loc_755C7 loc_755C4: mov r12, r11 loc_755C7: test r9b, r9b jz short loc_75609 loc_755CC: inc r10 cmp r10, 50h ; 'P' jnz short loc_75581 mov sil, 0FFh mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 jmp short loc_75639 loc_755F4: xor r10d, r10d mov r12d, 8 lea rsi, _sort_order_win1250ch1 jmp loc_75556 loc_75609: add rbx, r15 mov rcx, [rbp+var_68] mov sil, [rbx+rcx] dec r12 mov r11, r12 mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 loc_75634: test sil, sil jz short loc_7565C loc_75639: bt edx, r10d jnb short loc_7564A mov rcx, [rbp+var_50] mov [rcx+rax], sil inc rax loc_7564A: inc r11 cmp rax, rbx jb loc_75516 jmp short loc_75677 loc_75658: xor eax, eax jmp short loc_75677 loc_7565C: test dl, dl jns short loc_75677 mov rdi, [rbp+var_50] add rdi, rax mov rdx, rbx sub rdx, rax xor esi, esi call _memset mov rax, rbx loc_75677: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_win1250ch( long long a1, long long a2, unsigned long long a3, long long a4, unsigned __int8 *a5, int a6, int a7) { int v8; // edx long long v9; // r10 long long v10; // rdi unsigned long long result; // rax unsigned __int8 *v12; // r11 long long v13; // r12 _BYTE *v14; // rsi char v15; // si long long v16; // r10 char *v17; // rsi char v18; // r9 char *v19; // rsi unsigned __int8 *v20; // r14 _BYTE *v21; // r12 long long v23; // [rsp+8h] [rbp-68h] long long v24; // [rsp+10h] [rbp-60h] long long v25; // [rsp+18h] [rbp-58h] unsigned long long v27; // [rsp+28h] [rbp-48h] int v28; // [rsp+30h] [rbp-40h] unsigned __int8 *v29; // [rsp+38h] [rbp-38h] int v30; // [rsp+44h] [rbp-2Ch] v8 = a7 | 0xF; if ( (a7 & 0xF) != 0 ) v8 = a7; v9 = 0LL; if ( !a3 ) return 0LL; v10 = a6; v24 = 1LL - (_QWORD)a5; result = 0LL; v12 = a5; v27 = a3; v28 = a6; v29 = a5; v30 = v8; while ( 2 ) { if ( v12 - a5 >= v10 ) { if ( a6 <= 0 || (_DWORD)v9 ) break; v9 = 1LL; v13 = 9LL; v12 = a5; } else { if ( !(_DWORD)v9 ) { v9 = 0LL; v13 = 8LL; v14 = &sort_order_win1250ch1; goto LABEL_12; } v13 = 9LL; } v14 = &sort_order_win1250ch2; LABEL_12: v15 = v14[*v12]; if ( v15 != -1 ) goto LABEL_27; v23 = v13; v25 = v9; v16 = 0LL; while ( 1 ) { v17 = (char *)*(&doubles_0 + 2 * v16); v18 = *v17; if ( !*v17 || v12 - a5 >= v10 ) break; v19 = v17 + 1; v20 = &v12[v24]; v21 = v12; while ( v18 == *v21 ) { ++v21; v18 = *v19; if ( *v19 ) { ++v19; if ( (long long)v20++ < v10 ) continue; } goto LABEL_22; } LABEL_23: if ( ++v16 == 80 ) { v15 = -1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; goto LABEL_28; } } v21 = v12; LABEL_22: if ( v18 ) goto LABEL_23; v15 = *((_BYTE *)&doubles_0 + 16 * v16 + v23); v12 = v21 - 1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; LABEL_27: if ( v15 ) { LABEL_28: if ( _bittest(&v8, v9) ) *(_BYTE *)(a2 + result++) = v15; ++v12; if ( result >= a3 ) return result; continue; } break; } if ( (v8 & 0x80u) != 0 ) { memset(result + a2, 0LL, a3 - result); return a3; } return result; }
my_strnxfrm_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV qword ptr [RBP + -0x50],RSI MOV EAX,dword ptr [RBP + 0x10] MOV EDX,EAX OR EDX,0xf TEST AL,0xf CMOVNZ EDX,EAX XOR R10D,R10D TEST RBX,RBX JZ 0x00175658 MOVSXD RDI,R9D MOV EAX,0x1 SUB RAX,R8 MOV qword ptr [RBP + -0x60],RAX LEA R14,[0x3fb990] LEA R15,[0x4194a0] XOR EAX,EAX MOV R11,R8 MOV qword ptr [RBP + -0x48],RBX MOV qword ptr [RBP + -0x40],R9 MOV qword ptr [RBP + -0x38],R8 MOV dword ptr [RBP + -0x2c],EDX LAB_00175516: MOV RSI,R11 SUB RSI,R8 CMP RSI,RDI JGE 0x00175532 TEST R10D,R10D JZ 0x001755f4 MOV R12D,0x9 JMP 0x00175553 LAB_00175532: TEST R9D,R9D JLE 0x0017565c TEST R10D,R10D JNZ 0x0017565c MOV R10D,0x1 MOV R12D,0x9 MOV R11,R8 LAB_00175553: MOV RSI,R14 LAB_00175556: MOVZX ECX,byte ptr [R11] MOV SIL,byte ptr [RSI + RCX*0x1] CMP SIL,0xff JNZ 0x00175634 MOV qword ptr [RBP + -0x68],R12 MOV qword ptr [RBP + -0x58],R10 MOV RDX,R11 SUB RDX,R8 MOV RCX,qword ptr [RBP + -0x60] LEA R13,[RCX + R11*0x1] XOR R10D,R10D LAB_00175581: MOV RBX,R10 SHL RBX,0x4 MOV RSI,qword ptr [RBX + R15*0x1] MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001755c4 CMP RDX,RDI JGE 0x001755c4 INC RSI MOV R14,R13 MOV R12,R11 LAB_001755a2: CMP R9B,byte ptr [R12] JNZ 0x001755cc INC R12 MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001755c7 LEA RCX,[R14 + 0x1] INC RSI CMP R14,RDI MOV R14,RCX JL 0x001755a2 JMP 0x001755c7 LAB_001755c4: MOV R12,R11 LAB_001755c7: TEST R9B,R9B JZ 0x00175609 LAB_001755cc: INC R10 CMP R10,0x50 JNZ 0x00175581 MOV SIL,0xff MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x3fb990] JMP 0x00175639 LAB_001755f4: XOR R10D,R10D MOV R12D,0x8 LEA RSI,[0x3fb890] JMP 0x00175556 LAB_00175609: ADD RBX,R15 MOV RCX,qword ptr [RBP + -0x68] MOV SIL,byte ptr [RBX + RCX*0x1] DEC R12 MOV R11,R12 MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x3fb990] LAB_00175634: TEST SIL,SIL JZ 0x0017565c LAB_00175639: BT EDX,R10D JNC 0x0017564a MOV RCX,qword ptr [RBP + -0x50] MOV byte ptr [RCX + RAX*0x1],SIL INC RAX LAB_0017564a: INC R11 CMP RAX,RBX JC 0x00175516 JMP 0x00175677 LAB_00175658: XOR EAX,EAX JMP 0x00175677 LAB_0017565c: TEST DL,DL JNS 0x00175677 MOV RDI,qword ptr [RBP + -0x50] ADD RDI,RAX MOV RDX,RBX SUB RDX,RAX XOR ESI,ESI CALL 0x001261c0 MOV RAX,RBX LAB_00175677: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_win1250ch (int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5, int param_6,uint param_7) { uint uVar1; byte *pbVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; char cVar6; int1 *puVar7; byte *pbVar8; byte bVar9; int iVar10; long lVar11; byte *pbVar12; byte *pbVar13; long lVar14; uVar1 = param_7 | 0xf; if ((param_7 & 0xf) != 0) { uVar1 = param_7; } iVar10 = 0; if (param_3 == 0) { uVar5 = 0; } else { uVar5 = 0; pbVar12 = param_5; do { if ((long)pbVar12 - (long)param_5 < (long)param_6) { if (iVar10 != 0) goto LAB_00175553; iVar10 = 0; lVar14 = 8; puVar7 = _sort_order_win1250ch1; } else { if ((param_6 < 1) || (iVar10 != 0)) goto LAB_0017565c; iVar10 = 1; pbVar12 = param_5; LAB_00175553: lVar14 = 9; puVar7 = _sort_order_win1250ch2; } cVar6 = puVar7[*pbVar12]; if (cVar6 == -1) { lVar11 = 0; do { pbVar8 = (&doubles)[lVar11 * 2]; bVar9 = *pbVar8; pbVar13 = pbVar12; pbVar4 = pbVar12 + (1 - (long)param_5); pbVar3 = pbVar12 + -(long)param_5; if (bVar9 != 0) { while (pbVar2 = pbVar4, (long)pbVar3 < (long)param_6) { pbVar8 = pbVar8 + 1; if (bVar9 != *pbVar13) goto LAB_001755cc; pbVar13 = pbVar13 + 1; bVar9 = *pbVar8; if (bVar9 == 0) break; pbVar4 = pbVar2 + 1; pbVar3 = pbVar2; } } if (bVar9 == 0) { cVar6 = *(char *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar12 = pbVar13 + -1; goto LAB_00175634; } LAB_001755cc: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); cVar6 = -1; } else { LAB_00175634: if (cVar6 == '\0') { LAB_0017565c: if (-1 < (char)uVar1) { return uVar5; } memset((void *)(param_2 + uVar5),0,param_3 - uVar5); return param_3; } } if ((uVar1 >> iVar10 & 1) != 0) { *(char *)(param_2 + uVar5) = cVar6; uVar5 = uVar5 + 1; } pbVar12 = pbVar12 + 1; } while (uVar5 < param_3); } return uVar5; }
29,083
my_char_weight_put
eloqsql/strings/ctype-uca.c
static my_bool my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst, uint16 *to, size_t to_length, size_t *nweights, my_wc_t *str, size_t len) { size_t count; int rc= FALSE; if (!to_length) { *nweights= 0; return len > 0; } to_length--; /* Without trailing zero */ for (count= 0; len; ) { size_t chlen; const uint16 *from= NULL; uint16 implicit_weights[3]; for (chlen= len; chlen > 1; chlen--) { const MY_CONTRACTION *cnt; if (chlen <= MY_UCA_MAX_CONTRACTION && (cnt= my_uca_contraction_find(&dst->contractions, str, chlen))) { from= cnt->weight; str+= chlen; len-= chlen; break; } } if (!from) { from= my_char_weight_addr(dst, *str); if (!from) { from= implicit_weights; my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno); } str++; len--; } for ( ; from && *from && count < to_length; ) { *to++= *from++; count++; } if (count == to_length && from && * from) rc= TRUE; /* All weights did not fit */ } *to= 0; *nweights= count; return rc; }
O3
c
my_char_weight_put: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x30(%rbp) testq %rdx, %rdx je 0xbebb4 movq %rcx, -0x68(%rbp) testq %r9, %r9 je 0xbebc3 movq %rdi, -0x60(%rbp) decq %rdx xorl %ecx, %ecx xorl %r13d, %r13d movq %rdx, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq %rsi, -0x58(%rbp) movq %r9, -0x40(%rbp) cmpq $0x2, %r9 jb 0xbea98 movq -0x40(%rbp), %rbx leaq (,%rbx,8), %r12 cmpq $0x6, %rbx ja 0xbea8b movq -0x60(%rbp), %rax movq 0x18(%rax), %rax testq %rax, %rax jle 0xbea8b movq -0x60(%rbp), %rcx movq 0x20(%rcx), %r15 imulq $0x58, %rax, %r14 addq %r15, %r14 leaq (,%rbx,8), %rax movq %rax, -0x70(%rbp) cmpq $0x6, %rbx je 0xbea63 cmpq $0x0, (%r15,%r12) jne 0xbea82 cmpb $0x0, 0x52(%r15) jne 0xbea82 movq %r15, %rdi movq -0x30(%rbp), %rsi movq -0x70(%rbp), %rdx callq 0x29560 testl %eax, %eax je 0xbeb3b addq $0x58, %r15 cmpq %r14, %r15 jb 0xbea56 decq %rbx addq $-0x8, %r12 cmpq $0x1, %rbx ja 0xbea28 movq -0x30(%rbp), %rax movq (%rax), %rax movl %eax, %ecx movq -0x60(%rbp), %rsi cmpq %rcx, (%rsi) jb 0xbead0 movq 0x10(%rsi), %rcx movl %eax, %edx shrl $0x8, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0xbead0 movzbl %al, %eax movq 0x8(%rsi), %rsi movzbl (%rsi,%rdx), %edx imull %eax, %edx leaq (%rcx,%rdx,2), %r15 jmp 0xbeb21 leaq -0x3400(%rax), %rcx leaq -0x4e00(%rax), %rdx xorl %esi, %esi cmpq $0x51a6, %rdx # imm = 0x51A6 setae %sil shll $0x7, %esi orl $0xfffffb40, %esi # imm = 0xFFFFFB40 cmpq $0x19b6, %rcx # imm = 0x19B6 movl $0xfb80, %ecx # imm = 0xFB80 cmovbl %ecx, %esi movl %eax, %ecx shrl $0xf, %ecx addl %esi, %ecx movw %cx, -0x36(%rbp) orl $0x8000, %eax # imm = 0x8000 movw %ax, -0x34(%rbp) movw $0x0, -0x32(%rbp) leaq -0x36(%rbp), %r15 movq -0x58(%rbp), %rsi movq -0x40(%rbp), %r9 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx addq $0x8, -0x30(%rbp) decq %r9 jmp 0xbeb5e addq $0x30, %r15 movq -0x30(%rbp), %rax leaq (%rax,%rbx,8), %rax movq %rax, -0x30(%rbp) movq -0x40(%rbp), %r9 subq %rbx, %r9 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movzwl (%r15), %eax testw %ax, %ax sete %cl cmpq %rdx, %r13 setae %r8b orb %cl, %r8b jne 0xbeb94 addq $0x2, %r15 movw %ax, (%rsi) addq $0x2, %rsi incq %r13 movzwl (%r15), %eax testw %ax, %ax je 0xbeb94 addq $0x2, %r15 cmpq %rdx, %r13 jb 0xbeb78 testw %ax, %ax movzbl %dil, %eax movl $0x1, %ecx cmovel %eax, %ecx cmpq %rdx, %r13 cmovnel %eax, %ecx testq %r9, %r9 jne 0xbea0a jmp 0xbebc8 movq $0x0, (%rcx) testq %r9, %r9 setne %cl jmp 0xbebd4 xorl %r13d, %r13d xorl %ecx, %ecx movw $0x0, (%rsi) movq -0x68(%rbp), %rax movq %r13, (%rax) movl %ecx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_char_weight_put: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_30], r8 test rdx, rdx jz loc_BEBB4 mov [rbp+var_68], rcx test r9, r9 jz loc_BEBC3 mov [rbp+var_60], rdi dec rdx xor ecx, ecx xor r13d, r13d mov [rbp+var_48], rdx loc_BEA0A: mov [rbp+var_50], rcx mov [rbp+var_58], rsi mov [rbp+var_40], r9 cmp r9, 2 jb short loc_BEA98 mov rbx, [rbp+var_40] lea r12, ds:0[rbx*8] loc_BEA28: cmp rbx, 6 ja short loc_BEA8B mov rax, [rbp+var_60] mov rax, [rax+18h] test rax, rax jle short loc_BEA8B mov rcx, [rbp+var_60] mov r15, [rcx+20h] imul r14, rax, 58h ; 'X' add r14, r15 lea rax, ds:0[rbx*8] mov [rbp+var_70], rax loc_BEA56: cmp rbx, 6 jz short loc_BEA63 cmp qword ptr [r15+r12], 0 jnz short loc_BEA82 loc_BEA63: cmp byte ptr [r15+52h], 0 jnz short loc_BEA82 mov rdi, r15 mov rsi, [rbp+var_30] mov rdx, [rbp+var_70] call _bcmp test eax, eax jz loc_BEB3B loc_BEA82: add r15, 58h ; 'X' cmp r15, r14 jb short loc_BEA56 loc_BEA8B: dec rbx add r12, 0FFFFFFFFFFFFFFF8h cmp rbx, 1 ja short loc_BEA28 loc_BEA98: mov rax, [rbp+var_30] mov rax, [rax] mov ecx, eax mov rsi, [rbp+var_60] cmp [rsi], rcx jb short loc_BEAD0 mov rcx, [rsi+10h] mov edx, eax shr edx, 8 mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_BEAD0 movzx eax, al mov rsi, [rsi+8] movzx edx, byte ptr [rsi+rdx] imul edx, eax lea r15, [rcx+rdx*2] jmp short loc_BEB21 loc_BEAD0: lea rcx, [rax-3400h] lea rdx, [rax-4E00h] xor esi, esi cmp rdx, 51A6h setnb sil shl esi, 7 or esi, 0FFFFFB40h cmp rcx, 19B6h mov ecx, 0FB80h cmovb esi, ecx mov ecx, eax shr ecx, 0Fh add ecx, esi mov [rbp+var_36], cx or eax, 8000h mov [rbp+var_34], ax mov [rbp+var_32], 0 lea r15, [rbp+var_36] loc_BEB21: mov rsi, [rbp+var_58] mov r9, [rbp+var_40] mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] add [rbp+var_30], 8 dec r9 jmp short loc_BEB5E loc_BEB3B: add r15, 30h ; '0' mov rax, [rbp+var_30] lea rax, [rax+rbx*8] mov [rbp+var_30], rax mov r9, [rbp+var_40] sub r9, rbx mov rsi, [rbp+var_58] mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] loc_BEB5E: movzx eax, word ptr [r15] test ax, ax setz cl cmp r13, rdx setnb r8b or r8b, cl jnz short loc_BEB94 add r15, 2 loc_BEB78: mov [rsi], ax add rsi, 2 inc r13 movzx eax, word ptr [r15] test ax, ax jz short loc_BEB94 add r15, 2 cmp r13, rdx jb short loc_BEB78 loc_BEB94: test ax, ax movzx eax, dil mov ecx, 1 cmovz ecx, eax cmp r13, rdx cmovnz ecx, eax test r9, r9 jnz loc_BEA0A jmp short loc_BEBC8 loc_BEBB4: mov qword ptr [rcx], 0 test r9, r9 setnz cl jmp short loc_BEBD4 loc_BEBC3: xor r13d, r13d xor ecx, ecx loc_BEBC8: mov word ptr [rsi], 0 mov rax, [rbp+var_68] mov [rax], r13 loc_BEBD4: mov eax, ecx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_char_weight_put( _QWORD *a1, _WORD *a2, long long a3, unsigned long long *a4, long long *a5, unsigned long long a6) { unsigned long long v6; // r13 unsigned long long v7; // rbx long long v8; // r12 long long v9; // rax unsigned long long v10; // r15 unsigned long long v11; // r14 long long v12; // rax long long v13; // rdx long long v14; // rcx __int16 *v15; // r15 __int16 v16; // si unsigned __int8 v17; // di unsigned long long v18; // rdx __int16 v19; // ax __int16 *v20; // r15 unsigned long long *v22; // [rsp+8h] [rbp-68h] _WORD *v24; // [rsp+18h] [rbp-58h] unsigned __int8 v25; // [rsp+20h] [rbp-50h] unsigned long long v26; // [rsp+28h] [rbp-48h] unsigned long long v27; // [rsp+30h] [rbp-40h] _WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF long long *v29; // [rsp+40h] [rbp-30h] v29 = a5; if ( a3 ) { v22 = a4; if ( a6 ) { LOBYTE(a4) = 0; v6 = 0LL; v26 = a3 - 1; do { v25 = (unsigned __int8)a4; v24 = a2; v27 = a6; if ( a6 < 2 ) { LABEL_15: v12 = *v29; if ( *a1 >= (unsigned long long)(unsigned int)*v29 && (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) ) { v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13)); } else { v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40; if ( (unsigned long long)(v12 - 13312) < 0x19B6 ) v16 = -1152; v28[0] = v16 + ((unsigned int)v12 >> 15); v28[1] = v12 | 0x8000; v28[2] = 0; v15 = v28; } a2 = v24; v17 = v25; v18 = v26; ++v29; a6 = v27 - 1; } else { v7 = a6; v8 = 8 * a6; while ( 1 ) { if ( v7 <= 6 ) { v9 = a1[3]; if ( v9 > 0 ) break; } LABEL_14: --v7; v8 -= 8LL; if ( v7 <= 1 ) goto LABEL_15; } v10 = a1[4]; v11 = v10 + 88 * v9; while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) ) { v10 += 88LL; if ( v10 >= v11 ) goto LABEL_14; } v15 = (__int16 *)(v10 + 48); v29 += v7; a6 = v27 - v7; v17 = v25; v18 = v26; } v19 = *v15; if ( *v15 != 0 && v6 < v18 ) { v20 = v15 + 1; do { *a2++ = v19; ++v6; v19 = *v20; if ( !*v20 ) break; ++v20; } while ( v6 < v18 ); } LODWORD(a4) = 1; if ( !v19 ) LODWORD(a4) = v17; if ( v6 != v18 ) LODWORD(a4) = v17; } while ( a6 ); } else { v6 = 0LL; LODWORD(a4) = 0; } *a2 = 0; *v22 = v6; } else { *a4 = 0LL; LOBYTE(a4) = a6 != 0; } return (unsigned int)a4; }
my_char_weight_put: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x30],R8 TEST RDX,RDX JZ 0x001bebb4 MOV qword ptr [RBP + -0x68],RCX TEST R9,R9 JZ 0x001bebc3 MOV qword ptr [RBP + -0x60],RDI DEC RDX XOR ECX,ECX XOR R13D,R13D MOV qword ptr [RBP + -0x48],RDX LAB_001bea0a: MOV qword ptr [RBP + -0x50],RCX MOV qword ptr [RBP + -0x58],RSI MOV qword ptr [RBP + -0x40],R9 CMP R9,0x2 JC 0x001bea98 MOV RBX,qword ptr [RBP + -0x40] LEA R12,[RBX*0x8] LAB_001bea28: CMP RBX,0x6 JA 0x001bea8b MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x18] TEST RAX,RAX JLE 0x001bea8b MOV RCX,qword ptr [RBP + -0x60] MOV R15,qword ptr [RCX + 0x20] IMUL R14,RAX,0x58 ADD R14,R15 LEA RAX,[RBX*0x8] MOV qword ptr [RBP + -0x70],RAX LAB_001bea56: CMP RBX,0x6 JZ 0x001bea63 CMP qword ptr [R15 + R12*0x1],0x0 JNZ 0x001bea82 LAB_001bea63: CMP byte ptr [R15 + 0x52],0x0 JNZ 0x001bea82 MOV RDI,R15 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x70] CALL 0x00129560 TEST EAX,EAX JZ 0x001beb3b LAB_001bea82: ADD R15,0x58 CMP R15,R14 JC 0x001bea56 LAB_001bea8b: DEC RBX ADD R12,-0x8 CMP RBX,0x1 JA 0x001bea28 LAB_001bea98: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RSI,qword ptr [RBP + -0x60] CMP qword ptr [RSI],RCX JC 0x001bead0 MOV RCX,qword ptr [RSI + 0x10] MOV EDX,EAX SHR EDX,0x8 MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x001bead0 MOVZX EAX,AL MOV RSI,qword ptr [RSI + 0x8] MOVZX EDX,byte ptr [RSI + RDX*0x1] IMUL EDX,EAX LEA R15,[RCX + RDX*0x2] JMP 0x001beb21 LAB_001bead0: LEA RCX,[RAX + -0x3400] LEA RDX,[RAX + -0x4e00] XOR ESI,ESI CMP RDX,0x51a6 SETNC SIL SHL ESI,0x7 OR ESI,0xfffffb40 CMP RCX,0x19b6 MOV ECX,0xfb80 CMOVC ESI,ECX MOV ECX,EAX SHR ECX,0xf ADD ECX,ESI MOV word ptr [RBP + -0x36],CX OR EAX,0x8000 MOV word ptr [RBP + -0x34],AX MOV word ptr [RBP + -0x32],0x0 LEA R15,[RBP + -0x36] LAB_001beb21: MOV RSI,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] ADD qword ptr [RBP + -0x30],0x8 DEC R9 JMP 0x001beb5e LAB_001beb3b: ADD R15,0x30 MOV RAX,qword ptr [RBP + -0x30] LEA RAX,[RAX + RBX*0x8] MOV qword ptr [RBP + -0x30],RAX MOV R9,qword ptr [RBP + -0x40] SUB R9,RBX MOV RSI,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] LAB_001beb5e: MOVZX EAX,word ptr [R15] TEST AX,AX SETZ CL CMP R13,RDX SETNC R8B OR R8B,CL JNZ 0x001beb94 ADD R15,0x2 LAB_001beb78: MOV word ptr [RSI],AX ADD RSI,0x2 INC R13 MOVZX EAX,word ptr [R15] TEST AX,AX JZ 0x001beb94 ADD R15,0x2 CMP R13,RDX JC 0x001beb78 LAB_001beb94: TEST AX,AX MOVZX EAX,DIL MOV ECX,0x1 CMOVZ ECX,EAX CMP R13,RDX CMOVNZ ECX,EAX TEST R9,R9 JNZ 0x001bea0a JMP 0x001bebc8 LAB_001bebb4: MOV qword ptr [RCX],0x0 TEST R9,R9 SETNZ CL JMP 0x001bebd4 LAB_001bebc3: XOR R13D,R13D XOR ECX,ECX LAB_001bebc8: MOV word ptr [RSI],0x0 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],R13 LAB_001bebd4: MOV EAX,ECX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5, ulong param_6) { ushort uVar1; short sVar2; int iVar3; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; void *pvVar10; void *__s1; short *psVar11; short local_3e; ushort local_3c; int2 local_3a; ulong *local_38; if (param_3 == 0) { *param_4 = 0; uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0); } else { if (param_6 == 0) { uVar9 = 0; uVar7 = 0; } else { uVar5 = param_3 - 1; uVar9 = 0; uVar4 = 0; local_38 = param_5; do { if (1 < param_6) { lVar8 = param_6 * 8; uVar7 = param_6; do { if ((uVar7 < 7) && (0 < (long)param_1[3])) { __s1 = (void *)param_1[4]; pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1); do { if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) && (*(char *)((long)__s1 + 0x52) == '\0')) && (iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) { psVar11 = (short *)((long)__s1 + 0x30); local_38 = local_38 + uVar7; param_6 = param_6 - uVar7; goto LAB_001beb5e; } __s1 = (void *)((long)__s1 + 0x58); } while (__s1 < pvVar10); } uVar7 = uVar7 - 1; lVar8 = lVar8 + -8; } while (1 < uVar7); } uVar7 = *local_38; if (*param_1 < (uVar7 & 0xffffffff)) { LAB_001bead0: uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40; if (uVar7 - 0x3400 < 0x19b6) { uVar1 = 0xfb80; } local_3e = (short)(uVar7 >> 0xf) + uVar1; local_3c = (ushort)uVar7 | 0x8000; local_3a = 0; psVar11 = &local_3e; } else { uVar6 = uVar7 >> 8 & 0xffffff; lVar8 = *(long *)(param_1[2] + uVar6 * 8); if (lVar8 == 0) goto LAB_001bead0; psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) * ((uint)uVar7 & 0xff)) * 2); } local_38 = local_38 + 1; param_6 = param_6 - 1; LAB_001beb5e: sVar2 = *psVar11; if (uVar9 < uVar5 && sVar2 != 0) { do { psVar11 = psVar11 + 1; *param_2 = sVar2; param_2 = param_2 + 1; uVar9 = uVar9 + 1; sVar2 = *psVar11; if (sVar2 == 0) break; } while (uVar9 < uVar5); } uVar7 = 1; if (sVar2 == 0) { uVar7 = uVar4; } if (uVar9 != uVar5) { uVar7 = uVar4; } uVar4 = uVar7; } while (param_6 != 0); } *param_2 = 0; *param_4 = uVar9; } return uVar7 & 0xffffffff; }
29,084
mi_ft_parse
eloqsql/storage/myisam/ft_update.c
uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const uchar *record, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { FT_SEG_ITERATOR ftsi; struct st_mysql_ftparser *parser; DBUG_ENTER("_mi_ft_parse"); _mi_ft_segiterator_init(info, keynr, record, &ftsi); ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset); parser= info->s->keyinfo[keynr].parser; while (_mi_ft_segiterator(&ftsi)) { if (ftsi.pos) if (ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param, mem_root)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O0
c
mi_ft_parse: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movq -0x28(%rbp), %rdx leaq -0x58(%rbp), %rcx callq 0xa3e90 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x28(%rax), %rax movq (%rax), %rsi callq 0xa38d0 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x38(%rax), %rax movq %rax, -0x60(%rbp) leaq -0x58(%rbp), %rdi callq 0xa3f50 cmpl $0x0, %eax je 0xa41d0 cmpq $0x0, -0x40(%rbp) je 0xa41ce movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rsi movl -0x54(%rbp), %edx movq -0x60(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x38(%rbp), %r9 callq 0xa3980 cmpl $0x0, %eax je 0xa41cc jmp 0xa41c3 movl $0x1, -0x4(%rbp) jmp 0xa41d9 jmp 0xa41ce jmp 0xa418b jmp 0xa41d2 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_ft_parse: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov rdx, [rbp+var_28] lea rcx, [rbp+var_58] call _mi_ft_segiterator_init mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+28h] mov rsi, [rax] call ft_parse_init mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+38h] mov [rbp+var_60], rax loc_A418B: lea rdi, [rbp+var_58] call _mi_ft_segiterator cmp eax, 0 jz short loc_A41D0 cmp [rbp+var_40], 0 jz short loc_A41CE mov rdi, [rbp+var_10] mov rsi, [rbp+var_40] mov edx, [rbp+var_54] mov rcx, [rbp+var_60] mov r8, [rbp+var_30] mov r9, [rbp+var_38] call ft_parse cmp eax, 0 jz short loc_A41CC jmp short $+2 loc_A41C3: mov [rbp+var_4], 1 jmp short loc_A41D9 loc_A41CC: jmp short $+2 loc_A41CE: jmp short loc_A418B loc_A41D0: jmp short $+2 loc_A41D2: mov [rbp+var_4], 0 loc_A41D9: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mi_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, _QWORD *a5, long long a6) { long long v7; // [rsp+0h] [rbp-60h] _BYTE v8[4]; // [rsp+8h] [rbp-58h] BYREF int v9; // [rsp+Ch] [rbp-54h] long long v10; // [rsp+20h] [rbp-40h] long long v11; // [rsp+28h] [rbp-38h] _QWORD *v12; // [rsp+30h] [rbp-30h] long long v13; // [rsp+38h] [rbp-28h] unsigned int v14; // [rsp+44h] [rbp-1Ch] long long v15; // [rsp+48h] [rbp-18h] _QWORD *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; mi_ft_segiterator_init(a2, a3, a4, (long long)v8); ft_parse_init(v16, **(_QWORD **)(112LL * v14 + *(_QWORD *)(*(_QWORD *)v15 + 536LL) + 40)); v7 = *(_QWORD *)(112LL * v14 + *(_QWORD *)(*(_QWORD *)v15 + 536LL) + 56); while ( (unsigned int)mi_ft_segiterator((long long)v8) ) { if ( v10 && (unsigned int)ft_parse((long long)v16, v10, v9, v7, v12, v11) ) return 1; } return 0; }
_mi_ft_parse: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x28] LEA RCX,[RBP + -0x58] CALL 0x001a3e90 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RAX] CALL 0x001a38d0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x60],RAX LAB_001a418b: LEA RDI,[RBP + -0x58] CALL 0x001a3f50 CMP EAX,0x0 JZ 0x001a41d0 CMP qword ptr [RBP + -0x40],0x0 JZ 0x001a41ce MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x54] MOV RCX,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x38] CALL 0x001a3980 CMP EAX,0x0 JZ 0x001a41cc JMP 0x001a41c3 LAB_001a41c3: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001a41d9 LAB_001a41cc: JMP 0x001a41ce LAB_001a41ce: JMP 0x001a418b LAB_001a41d0: JMP 0x001a41d2 LAB_001a41d2: MOV dword ptr [RBP + -0x4],0x0 LAB_001a41d9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 _mi_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; int iVar2; int1 local_60 [4]; int4 local_5c; long local_48; int8 local_40; int8 local_38; int8 local_30; uint local_24; long *local_20; int8 local_18; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; _mi_ft_segiterator_init(param_2,param_3,param_4,local_60); ft_parse_init(local_18,**(int8 **) (*(long *)(*local_20 + 0x218) + (ulong)local_24 * 0x70 + 0x28)); uVar1 = *(int8 *)(*(long *)(*local_20 + 0x218) + (ulong)local_24 * 0x70 + 0x38); do { iVar2 = _mi_ft_segiterator(local_60); if (iVar2 == 0) { return 0; } } while ((local_48 == 0) || (iVar2 = ft_parse(local_18,local_48,local_5c,uVar1,local_38,local_40), iVar2 == 0)); return 1; }
29,085
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
basic_json(const basic_json& other) : json_base_class_t(other) { m_data.m_type = other.m_data.m_type; // check of passed value is valid other.assert_invariant(); switch (m_data.m_type) { case value_t::object: { m_data.m_value = *other.m_data.m_value.object; break; } case value_t::array: { m_data.m_value = *other.m_data.m_value.array; break; } case value_t::string: { m_data.m_value = *other.m_data.m_value.string; break; } case value_t::boolean: { m_data.m_value = other.m_data.m_value.boolean; break; } case value_t::number_integer: { m_data.m_value = other.m_data.m_value.number_integer; break; } case value_t::number_unsigned: { m_data.m_value = other.m_data.m_value.number_unsigned; break; } case value_t::number_float: { m_data.m_value = other.m_data.m_value.number_float; break; } case value_t::binary: { m_data.m_value = *other.m_data.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movb (%rsi), %al movb %al, (%rdi) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3d8e2 movzbl (%rbx), %eax decl %eax cmpl $0x7, %eax ja 0x421d4 leaq 0x688b8(%rip), %rcx # 0xaaa48 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%r14), %rax jmp 0x421d0 movq 0x8(%r14), %rdi callq 0x429fc jmp 0x421d0 movq 0x8(%r14), %rdi callq 0x42a7e jmp 0x421d0 movzbl 0x8(%r14), %eax jmp 0x421d0 movq 0x8(%r14), %rdi callq 0x425dc jmp 0x421d0 movq 0x8(%r14), %rdi callq 0x4284a movq %rax, 0x8(%rbx) pushq $0x1 popq %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3d8e2 jmp 0x421ec jmp 0x421ec jmp 0x421ec movq %rax, %r14 movq %rbx, %rdi callq 0x425c4 movq %r14, %rdi callq 0x23fc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov al, [rsi] mov [rdi], al push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) movzx eax, byte ptr [rbx] dec eax; switch 8 cases cmp eax, 7 ja short def_42197; jumptable 0000000000042197 default case lea rcx, jpt_42197 movsxd rax, ds:(jpt_42197 - 0AAA48h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_42199: mov rax, [r14+8]; jumptable 0000000000042197 cases 5-7 jmp short loc_421D0 loc_4219F: mov rdi, [r14+8]; jumptable 0000000000042197 case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_421D0 loc_421AA: mov rdi, [r14+8]; jumptable 0000000000042197 case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_421D0 loc_421B5: movzx eax, byte ptr [r14+8]; jumptable 0000000000042197 case 4 jmp short loc_421D0 loc_421BC: mov rdi, [r14+8]; jumptable 0000000000042197 case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) jmp short loc_421D0 loc_421C7: mov rdi, [r14+8]; jumptable 0000000000042197 case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&>(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_421D0: mov [rbx+8], rax def_42197: push 1; jumptable 0000000000042197 default case pop rsi mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_421EC jmp short loc_421EC jmp short $+2 loc_421EC: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( unsigned __int8 *a1, unsigned __int8 *a2) { int v2; // eax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long result; // rax int v8; // [rsp-8h] [rbp-18h] v8 = v2; *(_OWORD *)a1 = 0LL; *a1 = *a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2); result = (unsigned int)*a1 - 1; switch ( *a1 ) { case 1u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>> const&>( *((_QWORD *)a2 + 1), 1, v3, v4, v5, v6, v8); goto LABEL_8; case 2u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&>( *((_QWORD *)a2 + 1), 1, v3, v4, v5, v6, v8); goto LABEL_8; case 3u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,std::string const&>( *((_QWORD *)a2 + 1), 1, v3, v4, v5, v6, v8); goto LABEL_8; case 4u: result = a2[8]; goto LABEL_8; case 5u: case 6u: case 7u: result = *((_QWORD *)a2 + 1); goto LABEL_8; case 8u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>( *((_QWORD *)a2 + 1), 1, v3, v4, v5, v6, v8); LABEL_8: *((_QWORD *)a1 + 1) = result; break; default: break; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013d8e2 MOVZX EAX,byte ptr [RBX] DEC EAX CMP EAX,0x7 JA 0x001421d4 LEA RCX,[0x1aaa48] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [R14 + 0x8] JMP 0x001421d0 caseD_3: MOV RDI,qword ptr [R14 + 0x8] LAB_001421a3: CALL 0x001429fc JMP 0x001421d0 caseD_8: MOV RDI,qword ptr [R14 + 0x8] LAB_001421ae: CALL 0x00142a7e JMP 0x001421d0 caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x001421d0 caseD_1: MOV RDI,qword ptr [R14 + 0x8] LAB_001421c0: CALL 0x001425dc JMP 0x001421d0 caseD_2: MOV RDI,qword ptr [R14 + 0x8] LAB_001421cb: CALL 0x0014284a LAB_001421d0: MOV qword ptr [RBX + 0x8],RAX default: PUSH 0x1 POP RSI MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0013d8e2
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { string *psVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )*param_1; assert_invariant(SUB81(param_1,0)); switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1: /* try { // try from 001421c0 to 001421c4 has its CatchHandler @ 001421e8 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: /* try { // try from 001421cb to 001421cf has its CatchHandler @ 001421e6 */ psVar1 = (string *) create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>const&> (*(vector **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: /* try { // try from 001421a3 to 001421a7 has its CatchHandler @ 001421ec */ psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: psVar1 = (string *)(ulong)(byte)param_1[8]; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: psVar1 = *(string **)(param_1 + 8); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: /* try { // try from 001421ae to 001421b2 has its CatchHandler @ 001421ea */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_00142197_default; } *(string **)(this + 8) = psVar1; switchD_00142197_default: assert_invariant(SUB81(this,0)); return; }
29,086
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
bool read(std::vector<T> & dst, const size_t n) const { dst.resize(n); for (size_t i = 0; i < dst.size(); ++i) { if constexpr (std::is_same<T, bool>::value) { bool tmp; if (!read(tmp)) { return false; } dst[i] = tmp; } else { if (!read(dst[i])) { return false; } } } return true; }
O0
cpp
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x439a0 movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) movq 0x20(%rsp), %rdi callq 0x471c0 movq %rax, %rcx movq (%rsp), %rax cmpq %rcx, %rax jae 0xa853d movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x47200 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x427e0 testb $0x1, %al jne 0xa852b movb $0x0, 0x37(%rsp) jmp 0xa8542 jmp 0xa852d movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0xa84e5 movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopl (%rax)
_ZNK11gguf_reader4readINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRSt6vectorIT_SaIS8_EEm: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov rax, [rsp+38h+var_10] mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_20] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong) mov [rsp+38h+var_28], 0 loc_A84E5: mov rax, [rsp+38h+var_28] mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_18] call __ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+38h+var_38] cmp rax, rcx jnb short loc_A853D mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_28] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rdi, [rsp+38h+var_30] mov rsi, rax call __ZNK11gguf_reader4readERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; gguf_reader::read(std::string &) test al, 1 jnz short loc_A852B mov [rsp+38h+var_1], 0 jmp short loc_A8542 loc_A852B: jmp short $+2 loc_A852D: mov rax, [rsp+38h+var_28] add rax, 1 mov [rsp+38h+var_28], rax jmp short loc_A84E5 loc_A853D: mov [rsp+38h+var_1], 1 loc_A8542: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
char gguf_reader::read<std::string>(long long a1, long long a2, long long a3) { long long v3; // rax unsigned long long i; // [rsp+10h] [rbp-28h] std::vector<std::string>::resize(a2, a3); for ( i = 0LL; i < std::vector<std::string>::size(a2); ++i ) { v3 = std::vector<std::string>::operator[](a2); if ( (gguf_reader::read(a1, v3) & 1) == 0 ) return 0; } return 1; }
read<std::__cxx11::string>: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001439a0 MOV qword ptr [RSP + 0x10],0x0 LAB_001a84e5: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001471c0 MOV RCX,RAX MOV RAX,qword ptr [RSP] CMP RAX,RCX JNC 0x001a853d MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00147200 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x001427e0 TEST AL,0x1 JNZ 0x001a852b MOV byte ptr [RSP + 0x37],0x0 JMP 0x001a8542 LAB_001a852b: JMP 0x001a852d LAB_001a852d: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x001a84e5 LAB_001a853d: MOV byte ptr [RSP + 0x37],0x1 LAB_001a8542: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* bool gguf_reader::read<std::__cxx11::string >(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&, unsigned long) const */ bool __thiscall gguf_reader::read<std::__cxx11::string>(gguf_reader *this,vector *param_1,ulong param_2) { ulong uVar1; string *psVar2; ulong local_28; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,param_2); local_28 = 0; while( true ) { uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1) ; if (uVar1 <= local_28) { return true; } psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1 ,local_28); uVar1 = read(this,psVar2); if ((uVar1 & 1) == 0) break; local_28 = local_28 + 1; } return false; }
29,087
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
bool read(std::vector<T> & dst, const size_t n) const { dst.resize(n); for (size_t i = 0; i < dst.size(); ++i) { if constexpr (std::is_same<T, bool>::value) { bool tmp; if (!read(tmp)) { return false; } dst[i] = tmp; } else { if (!read(dst[i])) { return false; } } } return true; }
O1
cpp
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0x16ba0 movq (%rbx), %rdi cmpq %rdi, 0x8(%rbx) sete %bpl je 0x4423e movq (%r14), %rcx movl $0x4, %r15d movl $0x1, %esi movl $0x4, %edx callq 0x17940 cmpq $0x4, %rax jne 0x4423e xorl %r12d, %r12d incq %r12 movq (%rbx), %rdi movq 0x8(%rbx), %rax subq %rdi, %rax sarq $0x2, %rax cmpq %rax, %r12 setae %bpl jae 0x4423e addq %r15, %rdi addq $0x4, %r15 movq (%r14), %rcx movl $0x1, %esi movl $0x4, %edx callq 0x17940 cmpq $0x4, %rax je 0x44205 movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZNK11gguf_reader4readIiEEbRSt6vectorIT_SaIS2_EEm: push rbp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi mov rsi, rdx call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rdi, [rbx] cmp [rbx+8], rdi setz bpl jz short loc_4423E mov rcx, [r14] mov r15d, 4 mov esi, 1 mov edx, 4 call _fread cmp rax, 4 jnz short loc_4423E xor r12d, r12d loc_44205: inc r12 mov rdi, [rbx] mov rax, [rbx+8] sub rax, rdi sar rax, 2 cmp r12, rax setnb bpl jnb short loc_4423E add rdi, r15 add r15, 4 mov rcx, [r14] mov esi, 1 mov edx, 4 call _fread cmp rax, 4 jz short loc_44205 loc_4423E: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long gguf_reader::read<int>(_QWORD *a1, _QWORD *a2, long long a3) { unsigned int v3; // ebp long long v6; // r15 unsigned long long v7; // r12 unsigned long long v8; // rax long long v9; // rdi std::vector<int>::resize(a2, a3); LOBYTE(v3) = a2[1] == *a2; if ( a2[1] != *a2 ) { v6 = 4LL; if ( fread(*a2, 1LL, 4LL, *a1) == 4 ) { v7 = 0LL; do { ++v7; v8 = (long long)(a2[1] - *a2) >> 2; LOBYTE(v3) = v7 >= v8; if ( v7 >= v8 ) break; v9 = v6 + *a2; v6 += 4LL; } while ( fread(v9, 1LL, 4LL, *a1) == 4 ); } } return v3; }
read<int>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x00116ba0 MOV RDI,qword ptr [RBX] CMP qword ptr [RBX + 0x8],RDI SETZ BPL JZ 0x0014423e MOV RCX,qword ptr [R14] MOV R15D,0x4 MOV ESI,0x1 MOV EDX,0x4 CALL 0x00117940 CMP RAX,0x4 JNZ 0x0014423e XOR R12D,R12D LAB_00144205: INC R12 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] SUB RAX,RDI SAR RAX,0x2 CMP R12,RAX SETNC BPL JNC 0x0014423e ADD RDI,R15 ADD R15,0x4 MOV RCX,qword ptr [R14] MOV ESI,0x1 MOV EDX,0x4 CALL 0x00117940 CMP RAX,0x4 JZ 0x00144205 LAB_0014423e: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* bool gguf_reader::read<int>(std::vector<int, std::allocator<int> >&, unsigned long) const */ bool __thiscall gguf_reader::read<int>(gguf_reader *this,vector *param_1,ulong param_2) { size_t sVar1; void *__ptr; ulong uVar2; long lVar3; bool bVar4; std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)param_1,param_2); bVar4 = *(void **)(param_1 + 8) == *(void **)param_1; if (!bVar4) { lVar3 = 4; sVar1 = fread(*(void **)param_1,1,4,*(FILE **)this); if (sVar1 == 4) { uVar2 = 0; do { uVar2 = uVar2 + 1; bVar4 = (ulong)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) <= uVar2; if (bVar4) { return bVar4; } __ptr = (void *)(*(long *)param_1 + lVar3); lVar3 = lVar3 + 4; sVar1 = fread(__ptr,1,4,*(FILE **)this); } while (sVar1 == 4); } } return bVar4; }
29,088
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
bool read(std::vector<T> & dst, const size_t n) const { dst.resize(n); for (size_t i = 0; i < dst.size(); ++i) { if constexpr (std::is_same<T, bool>::value) { bool tmp; if (!read(tmp)) { return false; } dst[i] = tmp; } else { if (!read(dst[i])) { return false; } } } return true; }
O2
cpp
bool gguf_reader::read<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0x1d200 pushq $-0x1 popq %r15 xorl %r12d, %r12d movq (%rbx), %rsi movq 0x8(%rbx), %r13 subq %rsi, %r13 sarq $0x2, %r13 incq %r15 cmpq %r13, %r15 jae 0x45d56 addq %r12, %rsi addq $0x4, %r12 movq %r14, %rdi callq 0x1cf90 testb %al, %al jne 0x45d2d cmpq %r13, %r15 setae %al popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZNK11gguf_reader4readIfEEbRSt6vectorIT_SaIS2_EEm: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi mov rsi, rdx call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) push 0FFFFFFFFFFFFFFFFh pop r15 xor r12d, r12d loc_45D2D: mov rsi, [rbx] mov r13, [rbx+8] sub r13, rsi sar r13, 2 inc r15 cmp r15, r13 jnb short loc_45D56 add rsi, r12 add r12, 4 mov rdi, r14 call __ZNK11gguf_reader4readIfEEbRT_; gguf_reader::read<float>(float &) test al, al jnz short loc_45D2D loc_45D56: cmp r15, r13 setnb al pop rbx pop r12 pop r13 pop r14 pop r15 retn
bool gguf_reader::read<float>(long long a1, _QWORD *a2, long long a3) { unsigned long long v4; // r15 long long v5; // r12 unsigned long long v6; // r13 long long v7; // rsi std::vector<float>::resize(a2, a3); v4 = -1LL; v5 = 0LL; do { v6 = (long long)(a2[1] - *a2) >> 2; if ( ++v4 >= v6 ) break; v7 = v5 + *a2; v5 += 4LL; } while ( (unsigned __int8)gguf_reader::read<float>(a1, v7) ); return v4 >= v6; }
read<float>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x0011d200 PUSH -0x1 POP R15 XOR R12D,R12D LAB_00145d2d: MOV RSI,qword ptr [RBX] MOV R13,qword ptr [RBX + 0x8] SUB R13,RSI SAR R13,0x2 INC R15 CMP R15,R13 JNC 0x00145d56 ADD RSI,R12 ADD R12,0x4 MOV RDI,R14 CALL 0x0011cf90 TEST AL,AL JNZ 0x00145d2d LAB_00145d56: CMP R15,R13 SETNC AL POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* bool gguf_reader::read<float>(std::vector<float, std::allocator<float> >&, unsigned long) const */ bool __thiscall gguf_reader::read<float>(gguf_reader *this,vector *param_1,ulong param_2) { bool bVar1; float *pfVar2; long lVar3; ulong uVar4; ulong uVar5; std::vector<float,std::allocator<float>>::resize ((vector<float,std::allocator<float>> *)param_1,param_2); uVar5 = 0xffffffffffffffff; lVar3 = 0; do { uVar4 = *(long *)(param_1 + 8) - *(long *)param_1 >> 2; uVar5 = uVar5 + 1; if (uVar4 <= uVar5) break; pfVar2 = (float *)(*(long *)param_1 + lVar3); lVar3 = lVar3 + 4; bVar1 = read<float>(this,pfVar2); } while (bVar1); return uVar4 <= uVar5; }
29,089
SettingValue_KeyBind::refresh_wids()
untodesu[P]voxelius/game/client/settings.cc
void SettingValue_KeyBind::refresh_wids(void) { wids[0] = fmt::format("...###{}", static_cast<const void *>(value)); wids[1] = fmt::format("{}###{}", value->get(), static_cast<const void *>(value)); }
O1
cpp
SettingValue_KeyBind::refresh_wids(): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movq 0xb8(%rdi), %rax movq %rsp, %r8 movq %rax, (%r8) leaq 0x135040(%rip), %rsi # 0x19e19a leaq 0x20(%rsp), %r14 movl $0x8, %edx movl $0xe, %ecx movq %r14, %rdi callq 0x147c0b leaq 0x78(%rbx), %rdi movq %r14, %rsi callq 0x26ac0 movq (%r14), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x69197 movq 0x30(%rsp), %rsi incq %rsi callq 0x268d0 movq 0xb8(%rbx), %rdi callq 0x52f0c movq 0xb8(%rbx), %rcx leaq 0x20(%rsp), %r8 movq %rax, (%r8) movq %rcx, 0x10(%r8) leaq 0x13227b(%rip), %rsi # 0x19b438 movq %rsp, %r14 movl $0x7, %edx movl $0xec, %ecx movq %r14, %rdi callq 0x147c0b addq $0x98, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x26ac0 movq (%r14), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x691fe movq 0x10(%rsp), %rsi incq %rsi callq 0x268d0 addq $0x48, %rsp popq %rbx popq %r14 retq
_ZN20SettingValue_KeyBind12refresh_widsEv: push r14 push rbx sub rsp, 48h mov rbx, rdi mov rax, [rdi+0B8h] mov r8, rsp mov [r8], rax lea rsi, asc_19E19A; "...###{}" lea r14, [rsp+58h+var_38] mov edx, 8 mov ecx, 0Eh mov rdi, r14 call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) lea rdi, [rbx+78h] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+58h+var_28] cmp rdi, rax jz short loc_69197 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69197: mov rdi, [rbx+0B8h]; this call _ZNK13ConfigKeyBind3getEv; ConfigKeyBind::get(void) mov rcx, [rbx+0B8h] lea r8, [rsp+58h+var_38] mov [r8], rax mov [r8+10h], rcx lea rsi, asc_19B438; "{}###{}" mov r14, rsp mov edx, 7 mov ecx, 0ECh mov rdi, r14 call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) add rbx, 98h mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+58h+var_48] cmp rdi, rax jz short loc_691FE mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_691FE: add rsp, 48h pop rbx pop r14 retn
void SettingValue_KeyBind::refresh_wids( SettingValue_KeyBind *this, double a2, long long a3, long long a4, long long a5, long long a6, int a7) { void *v7; // rax long long v8; // rcx int v9; // r9d void *v10[2]; // [rsp+0h] [rbp-58h] BYREF long long v11; // [rsp+10h] [rbp-48h] BYREF void *v12[2]; // [rsp+20h] [rbp-38h] BYREF long long v13; // [rsp+30h] [rbp-28h] BYREF v10[0] = *((void **)this + 23); fmt::v11::vformat[abi:cxx11]((unsigned int)v12, (unsigned int)"...###{}", 8, 14, (unsigned int)v10, a7); std::string::operator=((char *)this + 120, v12, a2); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); v7 = (void *)ConfigKeyBind::get(*((ConfigKeyBind **)this + 23)); v8 = *((_QWORD *)this + 23); v12[0] = v7; v13 = v8; fmt::v11::vformat[abi:cxx11]((unsigned int)v10, (unsigned int)"{}###{}", 7, 236, (unsigned int)v12, v9); std::string::operator=((char *)this + 152, v10, a2); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); }
refresh_wids: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R8,RSP MOV qword ptr [R8],RAX LEA RSI,[0x29e19a] LEA R14,[RSP + 0x20] MOV EDX,0x8 MOV ECX,0xe MOV RDI,R14 CALL 0x00247c0b LEA RDI,[RBX + 0x78] MOV RSI,R14 CALL 0x00126ac0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00169197 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001268d0 LAB_00169197: MOV RDI,qword ptr [RBX + 0xb8] CALL 0x00152f0c MOV RCX,qword ptr [RBX + 0xb8] LEA R8,[RSP + 0x20] MOV qword ptr [R8],RAX MOV qword ptr [R8 + 0x10],RCX LEA RSI,[0x29b438] MOV R14,RSP MOV EDX,0x7 MOV ECX,0xec MOV RDI,R14 CALL 0x00247c0b ADD RBX,0x98 MOV RDI,RBX MOV RSI,R14 CALL 0x00126ac0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001691fe MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001268d0 LAB_001691fe: ADD RSP,0x48 POP RBX POP R14 RET
/* SettingValue_KeyBind::refresh_wids() */ void __thiscall SettingValue_KeyBind::refresh_wids(SettingValue_KeyBind *this) { long *local_58 [2]; long local_48 [2]; long *local_38 [2]; long local_28 [3]; local_58[0] = *(long **)(this + 0xb8); fmt::v11::vformat_abi_cxx11_((string *)local_38,&DAT_0029e19a,8,0xe); std::__cxx11::string::operator=((string *)(this + 0x78),(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } local_38[0] = (long *)ConfigKeyBind::get(*(ConfigKeyBind **)(this + 0xb8)); local_28[0] = *(long *)(this + 0xb8); fmt::v11::vformat_abi_cxx11_(local_58,"{}###{}",7,0xec); std::__cxx11::string::operator=((string *)(this + 0x98),(string *)local_58); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } return; }
29,090
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
llama.cpp/common/json.hpp
boundaries compute_boundaries(FloatType value) { JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // Convert the IEEE representation into a diyfp. // // If v is denormal: // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) // If v is normalized: // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) static_assert(std::numeric_limits<FloatType>::is_iec559, "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); constexpr int kMinExp = 1 - kBias; constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); const std::uint64_t E = bits >> (kPrecision - 1); const std::uint64_t F = bits & (kHiddenBit - 1); const bool is_denormal = E == 0; const diyfp v = is_denormal ? diyfp(F, kMinExp) : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); // Compute the boundaries m- and m+ of the floating-point value // v = f * 2^e. // // Determine v- and v+, the floating-point predecessor and successor if v, // respectively. // // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) // // v+ = v + 2^e // // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ // between m- and m+ round to v, regardless of how the input rounding // algorithm breaks ties. // // ---+-------------+-------------+-------------+-------------+--- (A) // v- m- v m+ v+ // // -----------------+------+------+-------------+-------------+--- (B) // v- m- v m+ v+ const bool lower_boundary_is_closer = F == 0 && E > 1; const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); const diyfp m_minus = lower_boundary_is_closer ? diyfp(4 * v.f - 1, v.e - 2) // (B) : diyfp(2 * v.f - 1, v.e - 1); // (A) // Determine the normalized w+ = m+. const diyfp w_plus = diyfp::normalize(m_plus); // Determine w- = m- such that e_(w-) = e_(w+). const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); return {diyfp::normalize(v), w_minus, w_plus}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %xmm0, %rax movq %rax, %rcx btrq $0x3f, %rcx movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000 cmpq %rdx, %rcx jge 0x8ae5c xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x8ae78 movq %rdi, %rbx movabsq $0x10000000000000, %r14 # imm = 0x10000000000000 leaq -0x1(%r14), %rdx andq %rax, %rdx movq %rax, %rcx shrq $0x34, %rcx jne 0x8adb3 leaq 0x1(,%rax,2), %rdi addq %rax, %rax movl $0xfffffbce, 0x4(%rsp) # imm = 0xFFFFFBCE movl $0xfffffbcd, %esi # imm = 0xFFFFFBCD jmp 0x8adfb movq %rdx, %r8 orq %r14, %r8 leal -0x433(%rcx), %esi movl %esi, 0x4(%rsp) testq %rdx, %rdx setne %dl shrq $0x35, %rax sete %al leaq 0x1(,%r8,2), %rdi leal -0x434(%rcx), %esi orb %dl, %al jne 0x8adf4 addl $0xfffffbcb, %ecx # imm = 0xFFFFFBCB movabsq $0x3fffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFF jmp 0x8ae03 leaq (%r8,%r8), %rax movq %r8, %rdx decq %rax movl %esi, %ecx movq %rdx, %r14 leaq 0x8(%rsp), %r15 movq %rax, (%r15) movl %ecx, 0x8(%r15) callq 0x8afc8 movq %rax, %r12 movl %edx, %r13d movq %r15, %rdi movl %edx, %esi callq 0x8b00a movq %rax, %r15 movl %edx, %ebp movq %r14, %rdi movl 0x4(%rsp), %esi callq 0x8afc8 movq %rax, (%rbx) movl %edx, 0x8(%rbx) movq %r15, 0x10(%rbx) movl %ebp, 0x18(%rbx) movq %r12, 0x20(%rbx) movl %r13d, 0x28(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x477b7(%rip), %rdi # 0xd261a leaq 0x46eba(%rip), %rdx # 0xd1d24 leaq 0x4987e(%rip), %rcx # 0xd46ef movl $0x42cb, %esi # imm = 0x42CB jmp 0x8ae92 leaq 0x4779b(%rip), %rdi # 0xd261a leaq 0x46e9e(%rip), %rdx # 0xd1d24 leaq 0x4997b(%rip), %rcx # 0xd4808 movl $0x42cc, %esi # imm = 0x42CC xorl %eax, %eax callq 0x1dbf0
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h movq rax, xmm0 mov rcx, rax btr rcx, 3Fh ; '?' mov rdx, 7FF0000000000000h cmp rcx, rdx jge loc_8AE5C xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe loc_8AE78 mov rbx, rdi mov r14, 10000000000000h lea rdx, [r14-1] and rdx, rax mov rcx, rax shr rcx, 34h jnz short loc_8ADB3 lea rdi, ds:1[rax*2] add rax, rax mov [rsp+48h+var_44], 0FFFFFBCEh mov esi, 0FFFFFBCDh jmp short loc_8ADFB loc_8ADB3: mov r8, rdx or r8, r14 lea esi, [rcx-433h] mov [rsp+48h+var_44], esi test rdx, rdx setnz dl shr rax, 35h setz al lea rdi, ds:1[r8*2] lea esi, [rcx-434h] or al, dl jnz short loc_8ADF4 add ecx, 0FFFFFBCBh mov rax, 3FFFFFFFFFFFFFh jmp short loc_8AE03 loc_8ADF4: lea rax, [r8+r8] mov rdx, r8 loc_8ADFB: dec rax mov ecx, esi mov r14, rdx loc_8AE03: lea r15, [rsp+48h+var_40] mov [r15], rax mov [r15+8], ecx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov r12, rax mov r13d, edx mov rdi, r15 mov esi, edx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp12normalize_toERKS3_i; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,int) mov r15, rax mov ebp, edx mov rdi, r14 mov esi, [rsp+48h+var_44] call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rbx], rax mov [rbx+8], edx mov [rbx+10h], r15 mov [rbx+18h], ebp mov [rbx+20h], r12 mov [rbx+28h], r13d mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8AE5C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 42CBh jmp short loc_8AE92 loc_8AE78: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 42CCh loc_8AE92: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>( long long a1, double a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11) { long long v12; // r14 long long v13; // rdx long long v14; // rcx long long v15; // rdi long long v16; // rax long long v17; // rsi int v18; // ecx long long v19; // rax long long v20; // r12 unsigned int v21; // edx unsigned int v22; // r13d long long v23; // r15 int v24; // edx int v25; // ebp int v26; // edx long long v28; // rsi long long v29; // rdx long long v30; // rcx long long v31; // r8 long long v32; // r9 unsigned int v33; // [rsp+4h] [rbp-44h] long long v34; // [rsp+8h] [rbp-40h] BYREF int v35; // [rsp+10h] [rbp-38h] if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v28 = 17099LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17099LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); } else { if ( a2 > 0.0 ) { v12 = 0x10000000000000LL; v13 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL; v14 = *(_QWORD *)&a2 >> 52; if ( *(_QWORD *)&a2 >> 52 ) { v33 = v14 - 1075; v15 = 2 * (v13 | 0x10000000000000LL) + 1; v17 = (unsigned int)(v14 - 1076); if ( v13 == 0 && *(_QWORD *)&a2 >> 53 != 0LL ) { v18 = v14 - 1077; v19 = 0x3FFFFFFFFFFFFFLL; LABEL_9: v34 = v19; v35 = v18; v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v15, v17); v22 = v21; v23 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(&v34, v21); v25 = v24; *(_QWORD *)a1 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v12, v33); *(_DWORD *)(a1 + 8) = v26; *(_QWORD *)(a1 + 16) = v23; *(_DWORD *)(a1 + 24) = v25; *(_QWORD *)(a1 + 32) = v20; *(_DWORD *)(a1 + 40) = v22; return a1; } v16 = 2 * (v13 | 0x10000000000000LL); v13 |= 0x10000000000000uLL; } else { v15 = 2LL * *(_QWORD *)&a2 + 1; v16 = 2LL * *(_QWORD *)&a2; v33 = -1074; v17 = 4294966221LL; } v19 = v16 - 1; v18 = v17; v12 = v13; goto LABEL_9; } v28 = 17100LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17100LL, "GGML_ASSERT(%s) failed", "value > 0"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v28, v29, v30, v31, v32, a8, a9, a10, a11); }
compute_boundaries<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOVQ RAX,XMM0 MOV RCX,RAX BTR RCX,0x3f MOV RDX,0x7ff0000000000000 CMP RCX,RDX JGE 0x0018ae5c XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x0018ae78 MOV RBX,RDI MOV R14,0x10000000000000 LEA RDX,[R14 + -0x1] AND RDX,RAX MOV RCX,RAX SHR RCX,0x34 JNZ 0x0018adb3 LEA RDI,[0x1 + RAX*0x2] ADD RAX,RAX MOV dword ptr [RSP + 0x4],0xfffffbce MOV ESI,0xfffffbcd JMP 0x0018adfb LAB_0018adb3: MOV R8,RDX OR R8,R14 LEA ESI,[RCX + -0x433] MOV dword ptr [RSP + 0x4],ESI TEST RDX,RDX SETNZ DL SHR RAX,0x35 SETZ AL LEA RDI,[0x1 + R8*0x2] LEA ESI,[RCX + -0x434] OR AL,DL JNZ 0x0018adf4 ADD ECX,0xfffffbcb MOV RAX,0x3fffffffffffff JMP 0x0018ae03 LAB_0018adf4: LEA RAX,[R8 + R8*0x1] MOV RDX,R8 LAB_0018adfb: DEC RAX MOV ECX,ESI MOV R14,RDX LAB_0018ae03: LEA R15,[RSP + 0x8] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],ECX CALL 0x0018afc8 MOV R12,RAX MOV R13D,EDX MOV RDI,R15 MOV ESI,EDX CALL 0x0018b00a MOV R15,RAX MOV EBP,EDX MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x4] CALL 0x0018afc8 MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EDX MOV qword ptr [RBX + 0x10],R15 MOV dword ptr [RBX + 0x18],EBP MOV qword ptr [RBX + 0x20],R12 MOV dword ptr [RBX + 0x28],R13D MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018ae5c: LEA RDI,[0x1d261a] LEA RDX,[0x1d1d24] LEA RCX,[0x1d46ef] MOV ESI,0x42cb JMP 0x0018ae92 LAB_0018ae78: LEA RDI,[0x1d261a] LEA RDX,[0x1d1d24] LEA RCX,[0x1d4808] MOV ESI,0x42cc LAB_0018ae92: XOR EAX,EAX CALL 0x0011dbf0
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */ dtoa_impl * __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double> (dtoa_impl *this,double param_1) { uint uVar1; char *pcVar2; diyfp *pdVar3; int8 uVar4; diyfp *pdVar5; diyfp *pdVar6; diyfp *pdVar7; int1 auVar8 [12]; int1 auVar9 [12]; int1 auVar10 [12]; int local_44; long local_40; int local_38; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { pcVar2 = "std::isfinite(value)"; uVar4 = 0x42cb; LAB_0018ae92: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar4, "GGML_ASSERT(%s) failed",pcVar2); } if (param_1 <= 0.0) { pcVar2 = "value > 0"; uVar4 = 0x42cc; goto LAB_0018ae92; } pdVar7 = (diyfp *)0x10000000000000; pdVar3 = (diyfp *)((ulong)param_1 & 0xfffffffffffff); if ((ulong)param_1 >> 0x34 == 0) { pdVar5 = (diyfp *)((long)param_1 * 2 + 1); local_40 = (long)param_1 * 2; local_44 = -0x432; local_38 = -0x433; pdVar6 = pdVar3; } else { pdVar6 = (diyfp *)((ulong)pdVar3 | 0x10000000000000); uVar1 = (uint)((ulong)param_1 >> 0x20); local_44 = (uVar1 >> 0x14) - 0x433; pdVar5 = (diyfp *)((long)pdVar6 * 2 + 1); local_38 = (uVar1 >> 0x14) - 0x434; if ((ulong)param_1 >> 0x35 != 0 && pdVar3 == (diyfp *)0x0) { local_38 = (uVar1 >> 0x14) - 0x435; local_40 = 0x3fffffffffffff; goto LAB_0018ae03; } local_40 = (long)pdVar6 * 2; } local_40 = local_40 + -1; pdVar7 = pdVar6; LAB_0018ae03: auVar8 = diyfp::normalize(pdVar5); auVar9 = diyfp::normalize_to((diyfp *)&local_40,auVar8._8_4_); auVar10 = diyfp::normalize(pdVar7,local_44); *(int1 (*) [12])this = auVar10; *(int1 (*) [12])(this + 0x10) = auVar9; *(int1 (*) [12])(this + 0x20) = auVar8; return this; }
29,091
change_partitioned_key_cache_param
eloqsql/mysys/mf_keycache.c
static void change_partitioned_key_cache_param(PARTITIONED_KEY_CACHE_CB *keycache, uint division_limit, uint age_threshold) { uint i; uint partitions= keycache->partitions; DBUG_ENTER("partitioned_change_key_cache_param"); for (i= 0; i < partitions; i++) { change_simple_key_cache_param(keycache->partition_array[i], division_limit, age_threshold); } DBUG_VOID_RETURN; }
O0
c
change_partitioned_key_cache_param: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x18(%rbp) movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax cmpl -0x18(%rbp), %eax jae 0x798c0 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movl -0x14(%rbp), %ecx movq (%rax,%rcx,8), %rdi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx callq 0x77890 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x79893 jmp 0x798c2 jmp 0x798c4 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
change_partitioned_key_cache_param: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_18], eax mov [rbp+var_14], 0 loc_79893: mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jnb short loc_798C0 mov rax, [rbp+var_8] mov rax, [rax+8] mov ecx, [rbp+var_14] mov rdi, [rax+rcx*8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] call change_simple_key_cache_param mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_79893 loc_798C0: jmp short $+2 loc_798C2: jmp short $+2 loc_798C4: add rsp, 20h pop rbp retn
long long change_partitioned_key_cache_param(long long a1, int a2, int a3) { long long result; // rax unsigned int v4; // [rsp+8h] [rbp-18h] unsigned int i; // [rsp+Ch] [rbp-14h] v4 = *(_DWORD *)(a1 + 28); for ( i = 0; ; ++i ) { result = i; if ( i >= v4 ) break; change_simple_key_cache_param(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, a3); } return result; }
change_partitioned_key_cache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x18],EAX MOV dword ptr [RBP + -0x14],0x0 LAB_00179893: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JNC 0x001798c0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x14] MOV RDI,qword ptr [RAX + RCX*0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] CALL 0x00177890 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00179893 LAB_001798c0: JMP 0x001798c2 LAB_001798c2: JMP 0x001798c4 LAB_001798c4: ADD RSP,0x20 POP RBP RET
void change_partitioned_key_cache_param(long param_1,int4 param_2,int4 param_3) { uint uVar1; int4 local_1c; uVar1 = *(uint *)(param_1 + 0x1c); for (local_1c = 0; local_1c < uVar1; local_1c = local_1c + 1) { change_simple_key_cache_param (*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_1c * 8),param_2,param_3); } return; }
29,092
bitmap_is_prefix
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size) { uint prefix_mask= last_byte_mask(prefix_size); uchar *m= (uchar*) map->bitmap; uchar *end_prefix= m+(prefix_size-1)/8; uchar *end; DBUG_ASSERT(m); DBUG_ASSERT(prefix_size <= map->n_bits); /* Empty prefix is always true */ if (!prefix_size) return 1; while (m < end_prefix) if (*m++ != 0xff) return 0; end= ((uchar*) map->bitmap) + no_bytes_in_map(map) - 1; if (m == end) return ((*m & last_byte_mask(map->n_bits)) == prefix_mask); if (*m != prefix_mask) return 0; while (++m < end) if (*m != 0) return 0; return ((*m & last_byte_mask(map->n_bits)) == 0); }
O0
c
bitmap_is_prefix: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %edi callq 0xee080 movzbl %al, %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx subl $0x1, %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xedf70 jmp 0xedf72 jmp 0xedf74 cmpl $0x0, -0x14(%rbp) jne 0xedf83 movb $0x1, -0x1(%rbp) jmp 0xee076 jmp 0xedf85 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xedfb3 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movzbl (%rax), %eax cmpl $0xff, %eax je 0xedfb1 movb $0x0, -0x1(%rbp) jmp 0xee076 jmp 0xedf85 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x1c(%rcx), %ecx addl $0x7, %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax addq $-0x1, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0xee00e movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %edi callq 0xee080 movb %al, %cl movl -0x34(%rbp), %eax movzbl %cl, %ecx andl %ecx, %eax cmpl -0x18(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0xee076 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl -0x18(%rbp), %eax je 0xee020 movb $0x0, -0x1(%rbp) jmp 0xee076 jmp 0xee022 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) cmpq -0x30(%rbp), %rax jae 0xee048 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x0, %eax je 0xee046 movb $0x0, -0x1(%rbp) jmp 0xee076 jmp 0xee022 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %edi callq 0xee080 movb %al, %cl movl -0x38(%rbp), %eax movzbl %cl, %ecx andl %ecx, %eax cmpl $0x0, %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nop
bitmap_is_prefix: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov edi, [rbp+var_14] call last_byte_mask movzx eax, al mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov ecx, [rbp+var_14] sub ecx, 1 shr ecx, 3 mov ecx, ecx add rax, rcx mov [rbp+var_28], rax jmp short $+2 loc_EDF70: jmp short $+2 loc_EDF72: jmp short $+2 loc_EDF74: cmp [rbp+var_14], 0 jnz short loc_EDF83 mov [rbp+var_1], 1 jmp loc_EE076 loc_EDF83: jmp short $+2 loc_EDF85: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jnb short loc_EDFB3 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_EDFB1 mov [rbp+var_1], 0 jmp loc_EE076 loc_EDFB1: jmp short loc_EDF85 loc_EDFB3: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+1Ch] add ecx, 7 shr ecx, 3 mov ecx, ecx add rax, rcx add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnz short loc_EE00E mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_34], eax mov rax, [rbp+var_10] mov edi, [rax+1Ch] call last_byte_mask mov cl, al mov eax, [rbp+var_34] movzx ecx, cl and eax, ecx cmp eax, [rbp+var_18] setz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_EE076 loc_EE00E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, [rbp+var_18] jz short loc_EE020 mov [rbp+var_1], 0 jmp short loc_EE076 loc_EE020: jmp short $+2 loc_EE022: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax cmp rax, [rbp+var_30] jnb short loc_EE048 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 0 jz short loc_EE046 mov [rbp+var_1], 0 jmp short loc_EE076 loc_EE046: jmp short loc_EE022 loc_EE048: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov edi, [rax+1Ch] call last_byte_mask mov cl, al mov eax, [rbp+var_38] movzx ecx, cl and eax, ecx cmp eax, 0 setz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_EE076: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char bitmap_is_prefix(unsigned __int8 **a1, unsigned int a2) { unsigned __int8 *v2; // rax unsigned __int8 v4; // [rsp+8h] [rbp-38h] unsigned __int8 v5; // [rsp+Ch] [rbp-34h] unsigned long long v6; // [rsp+10h] [rbp-30h] unsigned __int8 *v7; // [rsp+20h] [rbp-20h] int byte_mask; // [rsp+28h] [rbp-18h] byte_mask = (unsigned __int8)last_byte_mask(a2); v7 = *a1; if ( !a2 ) return 1; while ( v7 < &(*a1)[(a2 - 1) >> 3] ) { v2 = v7++; if ( *v2 != 255 ) return 0; } v6 = (unsigned long long)&(*a1)[((unsigned int)(*((_DWORD *)a1 + 7) + 7) >> 3) - 1]; if ( v7 == (unsigned __int8 *)v6 ) { v5 = *v7; return (unsigned __int8)(last_byte_mask(*((unsigned int *)a1 + 7)) & v5) == byte_mask; } else if ( *v7 == byte_mask ) { while ( (unsigned long long)++v7 < v6 ) { if ( *v7 ) return 0; } v4 = *v7; return (unsigned __int8)(last_byte_mask(*((unsigned int *)a1 + 7)) & v4) == 0; } else { return 0; } }
bitmap_is_prefix: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EDI,dword ptr [RBP + -0x14] CALL 0x001ee080 MOVZX EAX,AL MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] SUB ECX,0x1 SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001edf70 LAB_001edf70: JMP 0x001edf72 LAB_001edf72: JMP 0x001edf74 LAB_001edf74: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001edf83 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001ee076 LAB_001edf83: JMP 0x001edf85 LAB_001edf85: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001edfb3 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x001edfb1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001ee076 LAB_001edfb1: JMP 0x001edf85 LAB_001edfb3: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x1c] ADD ECX,0x7 SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX ADD RAX,-0x1 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001ee00e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x1c] CALL 0x001ee080 MOV CL,AL MOV EAX,dword ptr [RBP + -0x34] MOVZX ECX,CL AND EAX,ECX CMP EAX,dword ptr [RBP + -0x18] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x001ee076 LAB_001ee00e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x18] JZ 0x001ee020 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001ee076 LAB_001ee020: JMP 0x001ee022 LAB_001ee022: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX CMP RAX,qword ptr [RBP + -0x30] JNC 0x001ee048 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001ee046 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001ee076 LAB_001ee046: JMP 0x001ee022 LAB_001ee048: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x1c] CALL 0x001ee080 MOV CL,AL MOV EAX,dword ptr [RBP + -0x38] MOVZX ECX,CL AND EAX,ECX CMP EAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001ee076: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int8 bitmap_is_prefix(long *param_1,int param_2) { byte bVar1; byte bVar2; byte bVar3; byte *pbVar4; byte *pbVar5; byte *local_28; bool local_9; bVar1 = last_byte_mask(param_2); pbVar4 = (byte *)*param_1 + (param_2 - 1U >> 3); local_28 = (byte *)*param_1; if (param_2 == 0) { local_9 = true; pbVar5 = pbVar4; } else { do { if (pbVar4 <= local_28) { pbVar4 = (byte *)(*param_1 + (ulong)(*(int *)((long)param_1 + 0x1c) + 7U >> 3) + -1); if (local_28 == pbVar4) { bVar3 = *local_28; bVar2 = last_byte_mask(*(int4 *)((long)param_1 + 0x1c)); local_9 = (bVar3 & bVar2) == bVar1; pbVar5 = (byte *)0x0; goto LAB_001ee076; } pbVar5 = (byte *)0x0; if (*local_28 == bVar1) goto LAB_001ee022; local_9 = false; goto LAB_001ee076; } bVar3 = *local_28; pbVar5 = (byte *)0x0; local_28 = local_28 + 1; } while (bVar3 == 0xff); local_9 = false; } goto LAB_001ee076; while (pbVar5 = (byte *)0x0, *local_28 == 0) { LAB_001ee022: local_28 = local_28 + 1; if (pbVar4 <= local_28) { bVar1 = *local_28; bVar3 = last_byte_mask(*(int4 *)((long)param_1 + 0x1c)); local_9 = (bVar1 & bVar3) == 0; pbVar5 = (byte *)0x0; goto LAB_001ee076; } } local_9 = false; LAB_001ee076: return CONCAT71((int7)((ulong)pbVar5 >> 8),local_9); }
29,093
common_sampler_sample(common_sampler*, llama_context*, int, bool)
monkey531[P]llama/common/sampling.cpp
llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) { gsmpl->set_logits(ctx, idx); auto & grmr = gsmpl->grmr; auto & chain = gsmpl->chain; auto & cur_p = gsmpl->cur_p; // initialized by set_logits if (grammar_first) { llama_sampler_apply(grmr, &cur_p); } llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration"); const llama_token id = cur_p.data[cur_p.selected].id; if (grammar_first) { return id; } // check if it the sampled token fits the grammar { llama_token_data single_token_data = { id, 1.0f, 0.0f }; llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false }; llama_sampler_apply(grmr, &single_token_data_array); const bool is_valid = single_token_data_array.data[0].logit != -INFINITY; if (is_valid) { return id; } } // resampling: // if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain gsmpl->set_logits(ctx, idx); llama_sampler_apply(grmr, &cur_p); llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration"); return cur_p.data[cur_p.selected].id; }
O2
cpp
common_sampler_sample(common_sampler*, llama_context*, int, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %r12d movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx callq 0x9a6cc leaq 0x198(%rbx), %r14 testl %r12d, %r12d je 0x99951 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x23e30 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x23e30 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0x99a2d movq (%r14), %rcx imulq $0xc, %rax, %rax movl (%rcx,%rax), %r13d testb %r12b, %r12b jne 0x99a1b leaq 0xc(%rsp), %rax movl %r13d, (%rax) leaq 0x18(%rsp), %r12 movq %rax, (%r12) movq $0x1, 0x8(%r12) orq $-0x1, 0x10(%r12) movss 0x1165b(%rip), %xmm0 # 0xab008 movlps %xmm0, 0x4(%rax) movb $0x0, 0x18(%r12) movq 0x138(%rbx), %rdi movq %r12, %rsi callq 0x23e30 movq (%r12), %rax movss 0x20d1e(%rip), %xmm0 # 0xba6f0 ucomiss 0x4(%rax), %xmm0 jb 0x99a1b movq %rbx, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x9a6cc movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x23e30 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x23e30 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0x99a49 movq (%r14), %rcx imulq $0xc, %rax, %rax movl (%rcx,%rax), %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x20e31(%rip), %rdi # 0xba865 leaq 0x11923(%rip), %rdx # 0xab35e leaq 0x20eed(%rip), %rcx # 0xba92f movl $0x133, %esi # imm = 0x133 jmp 0x99a63 leaq 0x20e15(%rip), %rdi # 0xba865 leaq 0x11907(%rip), %rdx # 0xab35e leaq 0x20f31(%rip), %rcx # 0xba98f movl $0x14f, %esi # imm = 0x14F xorl %eax, %eax callq 0x23f60
_Z21common_sampler_sampleP14common_samplerP13llama_contextib: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12d, ecx mov ebp, edx mov r15, rsi mov rbx, rdi call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) lea r14, [rbx+198h] test r12d, r12d jz short loc_99951 mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply loc_99951: mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_99A2D mov rcx, [r14] imul rax, 0Ch mov r13d, [rcx+rax] test r12b, r12b jnz loc_99A1B lea rax, [rsp+68h+var_5C] mov [rax], r13d lea r12, [rsp+68h+var_50] mov [r12], rax mov qword ptr [r12+8], 1 or qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh movss xmm0, cs:dword_AB008 movlps qword ptr [rax+4], xmm0 mov byte ptr [r12+18h], 0 mov rdi, [rbx+138h] mov rsi, r12 call _llama_sampler_apply mov rax, [r12] movss xmm0, cs:dword_BA6F0 ucomiss xmm0, dword ptr [rax+4] jb short loc_99A1B mov rdi, rbx mov rsi, r15 mov edx, ebp call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_99A49 mov rcx, [r14] imul rax, 0Ch mov r13d, [rcx+rax] loc_99A1B: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_99A2D: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"... mov esi, 133h jmp short loc_99A63 loc_99A49: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"... mov esi, 14Fh loc_99A63: xor eax, eax call _ggml_abort
long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4) { _QWORD *v6; // r14 long long v7; // rax unsigned int v8; // r13d long long v9; // rax int v11; // [rsp+Ch] [rbp-5Ch] BYREF double v12; // [rsp+10h] [rbp-58h] BYREF _QWORD v13[3]; // [rsp+18h] [rbp-50h] BYREF char v14; // [rsp+30h] [rbp-38h] ((void (*)(void))common_sampler::set_logits)(); v6 = a1 + 51; if ( a4 ) llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v7 = a1[53]; if ( v7 == -1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 307LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""); } else { v8 = *(_DWORD *)(*v6 + 12 * v7); if ( (_BYTE)a4 ) return v8; v11 = *(_DWORD *)(*v6 + 12 * v7); v13[0] = &v11; v13[1] = 1LL; v13[2] = -1LL; _mm_storel_ps(&v12, (__m128)0x3F800000u); v14 = 0; llama_sampler_apply(a1[39], v13); if ( *(float *)(v13[0] + 4LL) > -INFINITY ) return v8; common_sampler::set_logits(a1, a2, a3); llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v9 = a1[53]; if ( v9 != -1 ) return *(unsigned int *)(*v6 + 12 * v9); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 335LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""); } return common_sampler_sample_and_accept_n(); }
common_sampler_sample: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12D,ECX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI CALL 0x0019a6cc LEA R14,[RBX + 0x198] TEST R12D,R12D JZ 0x00199951 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x00123e30 LAB_00199951: MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x00123e30 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x00199a2d MOV RCX,qword ptr [R14] IMUL RAX,RAX,0xc MOV R13D,dword ptr [RCX + RAX*0x1] TEST R12B,R12B JNZ 0x00199a1b LEA RAX,[RSP + 0xc] MOV dword ptr [RAX],R13D LEA R12,[RSP + 0x18] MOV qword ptr [R12],RAX MOV qword ptr [R12 + 0x8],0x1 OR qword ptr [R12 + 0x10],-0x1 MOVSS XMM0,dword ptr [0x001ab008] MOVLPS qword ptr [RAX + 0x4],XMM0 MOV byte ptr [R12 + 0x18],0x0 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R12 CALL 0x00123e30 MOV RAX,qword ptr [R12] MOVSS XMM0,dword ptr [0x001ba6f0] UCOMISS XMM0,dword ptr [RAX + 0x4] JC 0x00199a1b MOV RDI,RBX MOV RSI,R15 MOV EDX,EBP CALL 0x0019a6cc MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x00123e30 MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x00123e30 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x00199a49 MOV RCX,qword ptr [R14] IMUL RAX,RAX,0xc MOV R13D,dword ptr [RCX + RAX*0x1] LAB_00199a1b: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00199a2d: LEA RDI,[0x1ba865] LEA RDX,[0x1ab35e] LEA RCX,[0x1ba92f] MOV ESI,0x133 JMP 0x00199a63 LAB_00199a49: LEA RDI,[0x1ba865] LEA RDX,[0x1ab35e] LEA RCX,[0x1ba98f] MOV ESI,0x14f LAB_00199a63: XOR EAX,EAX CALL 0x00123f60
/* common_sampler_sample(common_sampler*, llama_context*, int, bool) */ int4 common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4) { common_sampler *pcVar1; int7 in_register_00000009; char *pcVar2; int8 uVar3; int4 uVar4; int4 local_5c; ulong local_58; int4 *local_50; int8 local_48; int8 local_40; int1 local_38; common_sampler::set_logits(param_1,param_2,param_3); pcVar1 = param_1 + 0x198; if ((int)CONCAT71(in_register_00000009,param_4) != 0) { llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); } llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) != -1) { uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); if (!param_4) { local_50 = &local_5c; local_48 = 1; local_40 = 0xffffffffffffffff; local_58 = (ulong)DAT_001ab008; local_38 = 0; local_5c = uVar4; llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50); if ((float)local_50[1] <= DAT_001ba6f0) { common_sampler::set_logits(param_1,param_2,param_3); llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) == -1) { pcVar2 = "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"" ; uVar3 = 0x14f; goto LAB_00199a63; } uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); } } return uVar4; } pcVar2 = "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"" ; uVar3 = 0x133; LAB_00199a63: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
29,094
MainWindow::MainWindow(QWidget*)
The-SGR[P]silly-clicker/mainwindow.cpp
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&file); QString line; while (!in.atEnd()) { line = in.readLine(); clicks = line.toInt(); } file.close(); } }
O0
cpp
MainWindow::MainWindow(QWidget*): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x88(%rbp) leaq -0x14(%rbp), %rdi callq 0x5f60 movq -0x88(%rbp), %rsi movq -0x80(%rbp), %rdi movl -0x14(%rbp), %edx callq 0x40e0 movq -0x80(%rbp), %rax leaq 0xe293b(%rip), %rcx # 0xe7b28 movq %rcx, %rdx addq $0x10, %rdx movq %rdx, (%rax) addq $0x1c8, %rcx # imm = 0x1C8 movq %rcx, 0x10(%rax) addq $0x28, %rax movq %rax, -0x78(%rbp) movl $0x80, %edi callq 0x4340 movq %rax, -0x70(%rbp) jmp 0x521a movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) addq $0x30, %rdi movq %rdi, -0x90(%rbp) callq 0x42d0 jmp 0x523b movq -0x80(%rbp), %rsi movq 0x28(%rsi), %rdi callq 0x5f80 jmp 0x524a movl $0x1, %edi movl $0x10, %esi callq 0x7790 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %esi leaq 0xe3102(%rip), %rdi # 0xe8368 callq 0x4270 movb %al, -0x91(%rbp) jmp 0x5273 movb -0x91(%rbp), %al testb $0x1, %al jne 0x5282 jmp 0x5386 leaq 0xe30df(%rip), %rsi # 0xe8368 leaq -0x38(%rbp), %rdi callq 0x4210 jmp 0x5294 leaq -0x50(%rbp), %rdi callq 0x77d0 leaq -0x38(%rbp), %rdi callq 0x43e0 movb %al, -0x92(%rbp) jmp 0x52ae movb -0x92(%rbp), %al xorb $-0x1, %al testb $0x1, %al jne 0x52bf jmp 0x5366 xorl %eax, %eax movl %eax, %edx leaq -0x68(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x41c0 jmp 0x52d2 leaq -0x50(%rbp), %rdi movq %rdi, -0xa0(%rbp) leaq -0x68(%rbp), %rsi movq %rsi, -0xa8(%rbp) callq 0x77f0 movq -0xa8(%rbp), %rdi callq 0x4c90 movq -0xa0(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0xa, %edx callq 0x7820 movl %eax, -0x98(%rbp) jmp 0x5316 movl -0x98(%rbp), %ecx leaq 0xe303d(%rip), %rax # 0xe8360 movl %ecx, (%rax) jmp 0x529d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x539b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x538f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x50(%rbp), %rdi callq 0x4c90 leaq -0x38(%rbp), %rdi callq 0x4390 jmp 0x538f leaq 0xe2ffb(%rip), %rdi # 0xe8368 callq 0x4510 jmp 0x5374 leaq -0x50(%rbp), %rdi callq 0x4c90 leaq -0x38(%rbp), %rdi callq 0x4390 addq $0xb0, %rsp popq %rbp retq movq -0x90(%rbp), %rdi callq 0x4410 movq -0x80(%rbp), %rdi callq 0x4260 movq -0x20(%rbp), %rdi callq 0x4200 nopl (%rax)
_ZN10MainWindowC2EP7QWidget: push rbp; Alternative name is 'MainWindow::MainWindow(QWidget *)' mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_80], rax mov rax, [rbp+var_10] mov [rbp+var_88], rax lea rdi, [rbp+var_14] call _ZN6QFlagsIN2Qt10WindowTypeEEC2Ev; QFlags<Qt::WindowType>::QFlags(void) mov rsi, [rbp+var_88] mov rdi, [rbp+var_80] mov edx, [rbp+var_14] call __ZN11QMainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE; QMainWindow::QMainWindow(QWidget *,QFlags<Qt::WindowType>) mov rax, [rbp+var_80] lea rcx, _ZTV10MainWindow; `vtable for'MainWindow mov rdx, rcx add rdx, 10h mov [rax], rdx add rcx, 1C8h mov [rax+10h], rcx add rax, 28h ; '(' mov [rbp+var_78], rax mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_70], rax jmp short $+2 loc_521A: mov rdi, [rbp+var_80] mov rax, [rbp+var_78] mov rcx, [rbp+var_70] mov [rax], rcx add rdi, 30h ; '0'; this mov [rbp+var_90], rdi call __ZN12QSqlDatabaseC1Ev; QSqlDatabase::QSqlDatabase(void) jmp short $+2 loc_523B: mov rsi, [rbp+var_80]; QMainWindow * mov rdi, [rsi+28h]; this call _ZN13Ui_MainWindow7setupUiEP11QMainWindow; Ui_MainWindow::setupUi(QMainWindow *) jmp short $+2 loc_524A: mov edi, 1 mov esi, 10h call _ZorN13QIODeviceBase12OpenModeFlagES0_; operator|(QIODeviceBase::OpenModeFlag,QIODeviceBase::OpenModeFlag) mov [rbp+var_28], eax mov esi, [rbp+var_28] lea rdi, file call __ZN5QFile4openE6QFlagsIN13QIODeviceBase12OpenModeFlagEE; QFile::open(QFlags<QIODeviceBase::OpenModeFlag>) mov [rbp+var_91], al jmp short $+2 loc_5273: mov al, [rbp+var_91] test al, 1 jnz short loc_5282 jmp loc_5386 loc_5282: lea rsi, file lea rdi, [rbp+var_38] call __ZN11QTextStreamC1EP9QIODevice; QTextStream::QTextStream(QIODevice *) jmp short $+2 loc_5294: lea rdi, [rbp+var_50]; this call _ZN7QStringC2Ev; QString::QString(void) loc_529D: lea rdi, [rbp+var_38]; this call __ZNK11QTextStream5atEndEv; QTextStream::atEnd(void) mov [rbp+var_92], al jmp short $+2 loc_52AE: mov al, [rbp+var_92] xor al, 0FFh test al, 1 jnz short loc_52BF jmp loc_5366 loc_52BF: xor eax, eax mov edx, eax lea rdi, [rbp+var_68]; this lea rsi, [rbp+var_38]; __int64 call __ZN11QTextStream8readLineEx; QTextStream::readLine(long long) jmp short $+2 loc_52D2: lea rdi, [rbp+var_50] mov [rbp+var_A0], rdi lea rsi, [rbp+var_68] mov [rbp+var_A8], rsi call _ZN7QStringaSEOS_; QString::operator=(QString&&) mov rdi, [rbp+var_A8]; this call _ZN7QStringD2Ev; QString::~QString() mov rdi, [rbp+var_A0]; this xor eax, eax mov esi, eax; bool * mov edx, 0Ah; int call _ZNK7QString5toIntEPbi; QString::toInt(bool *,int) mov [rbp+var_98], eax jmp short $+2 loc_5316: mov ecx, [rbp+var_98] lea rax, clicks mov [rax], ecx jmp loc_529D mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_539B mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_538F mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_50]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_38]; this call __ZN11QTextStreamD1Ev; QTextStream::~QTextStream() jmp short loc_538F loc_5366: lea rdi, file; this call __ZN11QFileDevice5closeEv; QFileDevice::close(void) jmp short $+2 loc_5374: lea rdi, [rbp+var_50]; this call _ZN7QStringD2Ev; QString::~QString() lea rdi, [rbp+var_38]; this call __ZN11QTextStreamD1Ev; QTextStream::~QTextStream() loc_5386: add rsp, 0B0h pop rbp retn loc_538F: mov rdi, [rbp+var_90]; this call __ZN12QSqlDatabaseD1Ev; QSqlDatabase::~QSqlDatabase() loc_539B: mov rdi, [rbp+var_80]; this call __ZN11QMainWindowD2Ev; QMainWindow::~QMainWindow() mov rdi, [rbp+var_20] call __Unwind_Resume
void MainWindow::MainWindow(MainWindow *this, QWidget *a2) { _BYTE v2[24]; // [rsp+48h] [rbp-68h] BYREF _BYTE v3[24]; // [rsp+60h] [rbp-50h] BYREF long long v4[2]; // [rsp+78h] [rbp-38h] BYREF unsigned int v5; // [rsp+88h] [rbp-28h] unsigned int v6; // [rsp+9Ch] [rbp-14h] BYREF QWidget *v7; // [rsp+A0h] [rbp-10h] MainWindow *v8; // [rsp+A8h] [rbp-8h] v8 = this; v7 = a2; QFlags<Qt::WindowType>::QFlags(&v6); QMainWindow::QMainWindow(this, a2, v6); *(_QWORD *)this = &`vtable for'MainWindow + 2; *((_QWORD *)this + 2) = &`vtable for'MainWindow + 57; *((_QWORD *)this + 5) = operator new(0x80uLL); QSqlDatabase::QSqlDatabase((MainWindow *)((char *)this + 48)); Ui_MainWindow::setupUi(*((Ui_MainWindow **)this + 5), this); v5 = operator|(1LL, 16LL); if ( (QFile::open(&file, v5) & 1) != 0 ) { QTextStream::QTextStream(v4, &file); QString::QString((QString *)v3); while ( (QTextStream::atEnd((QTextStream *)v4) & 1) == 0 ) { QTextStream::readLine((QTextStream *)v2, (long long)v4); QString::operator=(); QString::~QString((QString *)v2); clicks = QString::toInt((QString *)v3, 0LL, 10); } QFileDevice::close((QFileDevice *)&file); QString::~QString((QString *)v3); QTextStream::~QTextStream((QTextStream *)v4); } }
MainWindow: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x88],RAX LEA RDI,[RBP + -0x14] CALL 0x00105f60 MOV RSI,qword ptr [RBP + -0x88] MOV RDI,qword ptr [RBP + -0x80] MOV EDX,dword ptr [RBP + -0x14] CALL 0x001040e0 MOV RAX,qword ptr [RBP + -0x80] LEA RCX,[0x1e7b28] MOV RDX,RCX ADD RDX,0x10 MOV qword ptr [RAX],RDX ADD RCX,0x1c8 MOV qword ptr [RAX + 0x10],RCX ADD RAX,0x28 MOV qword ptr [RBP + -0x78],RAX LAB_0010520a: MOV EDI,0x80 CALL 0x00104340 MOV qword ptr [RBP + -0x70],RAX JMP 0x0010521a LAB_0010521a: MOV RDI,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX ADD RDI,0x30 MOV qword ptr [RBP + -0x90],RDI CALL 0x001042d0 JMP 0x0010523b LAB_0010523b: MOV RSI,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RSI + 0x28] LAB_00105243: CALL 0x00105f80 JMP 0x0010524a LAB_0010524a: MOV EDI,0x1 MOV ESI,0x10 CALL 0x00107790 MOV dword ptr [RBP + -0x28],EAX MOV ESI,dword ptr [RBP + -0x28] LEA RDI,[0x1e8368] CALL 0x00104270 MOV byte ptr [RBP + -0x91],AL JMP 0x00105273 LAB_00105273: MOV AL,byte ptr [RBP + -0x91] TEST AL,0x1 JNZ 0x00105282 JMP 0x00105386 LAB_00105282: LEA RSI,[0x1e8368] LEA RDI,[RBP + -0x38] CALL 0x00104210 JMP 0x00105294 LAB_00105294: LEA RDI,[RBP + -0x50] CALL 0x001077d0 LAB_0010529d: LEA RDI,[RBP + -0x38] CALL 0x001043e0 MOV byte ptr [RBP + -0x92],AL JMP 0x001052ae LAB_001052ae: MOV AL,byte ptr [RBP + -0x92] XOR AL,0xff TEST AL,0x1 JNZ 0x001052bf JMP 0x00105366 LAB_001052bf: XOR EAX,EAX MOV EDX,EAX LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x38] CALL 0x001041c0 JMP 0x001052d2 LAB_001052d2: LEA RDI,[RBP + -0x50] MOV qword ptr [RBP + -0xa0],RDI LEA RSI,[RBP + -0x68] MOV qword ptr [RBP + -0xa8],RSI CALL 0x001077f0 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x00104c90 MOV RDI,qword ptr [RBP + -0xa0] XOR EAX,EAX MOV ESI,EAX MOV EDX,0xa CALL 0x00107820 MOV dword ptr [RBP + -0x98],EAX JMP 0x00105316 LAB_00105316: MOV ECX,dword ptr [RBP + -0x98] LEA RAX,[0x1e8360] MOV dword ptr [RAX],ECX JMP 0x0010529d LAB_00105366: LEA RDI,[0x1e8368] CALL 0x00104510 LAB_00105372: JMP 0x00105374 LAB_00105374: LEA RDI,[RBP + -0x50] CALL 0x00104c90 LEA RDI,[RBP + -0x38] CALL 0x00104390 LAB_00105386: ADD RSP,0xb0 POP RBP RET
/* MainWindow::MainWindow(QWidget*) */ void __thiscall MainWindow::MainWindow(MainWindow *this,QWidget *param_1) { byte bVar1; void *pvVar2; QString local_70 [24]; QString local_58 [24]; QTextStream local_40 [16]; int4 local_30; int4 local_1c; QWidget *local_18; MainWindow *local_10; local_18 = param_1; local_10 = this; QFlags<Qt::WindowType>::QFlags((QFlags<Qt::WindowType> *)&local_1c); QMainWindow::QMainWindow((QMainWindow *)this,param_1,local_1c); *(int ***)this = &PTR_metaObject_001e7b38; *(int **)(this + 0x10) = &DAT_001e7cf0; /* try { // try from 0010520a to 00105238 has its CatchHandler @ 0010532a */ pvVar2 = operator_new(0x80); *(void **)(this + 0x28) = pvVar2; QSqlDatabase::QSqlDatabase((QSqlDatabase *)(this + 0x30)); /* try { // try from 00105243 to 00105291 has its CatchHandler @ 00105338 */ Ui_MainWindow::setupUi(*(Ui_MainWindow **)(this + 0x28),(QMainWindow *)this); local_30 = operator|(1,0x10); bVar1 = QFile::open(file,local_30); if ((bVar1 & 1) != 0) { QTextStream::QTextStream(local_40,(QIODevice *)file); QString::QString(local_58); /* try { // try from 0010529d to 00105371 has its CatchHandler @ 00105346 */ while (bVar1 = QTextStream::atEnd(), ((bVar1 ^ 0xff) & 1) != 0) { QTextStream::readLine((longlong)local_70); QString::operator=(local_58,local_70); QString::~QString(local_70); clicks = QString::toInt(local_58,(bool *)0x0,10); } QFileDevice::close(); QString::~QString(local_58); QTextStream::~QTextStream(local_40); } return; }
29,095
MainWindow::MainWindow(QWidget*)
The-SGR[P]silly-clicker/mainwindow.cpp
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&file); QString line; while (!in.atEnd()) { line = in.readLine(); clicks = line.toInt(); } file.close(); } }
O3
cpp
MainWindow::MainWindow(QWidget*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx xorl %edx, %edx callq 0x40e0 leaq 0xdff61(%rip), %rax # 0xe4b38 leaq 0x10(%rax), %rcx movq %rcx, (%rbx) addq $0x1c8, %rax # imm = 0x1C8 movq %rax, 0x10(%rbx) movl $0x80, %edi callq 0x4320 movq %rax, 0x28(%rbx) leaq 0x30(%rbx), %r14 movq %r14, %rdi callq 0x42b0 movq 0x28(%rbx), %rdi movq %rbx, %rsi callq 0x59ba leaq 0xe073b(%rip), %rdi # 0xe5350 movl $0x11, %esi callq 0x4250 testb %al, %al je 0x4d16 movq %r14, 0x8(%rsp) movq %rbx, (%rsp) leaq 0xe0719(%rip), %rsi # 0xe5350 leaq 0x28(%rsp), %rdi callq 0x41f0 xorl %r15d, %r15d xorl %ebx, %ebx xorl %r12d, %r12d xorl %r13d, %r13d leaq 0x28(%rsp), %rdi callq 0x43c0 testb %al, %al jne 0x4ce3 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi xorl %edx, %edx callq 0x41a0 movq 0x10(%rsp), %r13 movq 0x18(%rsp), %rbp movq %r15, 0x10(%rsp) movq %rbx, 0x18(%rsp) movq 0x20(%rsp), %r14 movq %r12, 0x20(%rsp) testq %r15, %r15 je 0x4cac lock decl (%r15) jne 0x4cac movq 0x10(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 movq %r14, %rdi movq %rbp, %rsi xorl %edx, %edx movl $0xa, %ecx callq 0x4050 movslq %eax, %rcx cmpq %rax, %rcx movl $0x0, %eax cmovnel %eax, %ecx leaq 0xe0675(%rip), %rax # 0xe5348 movl %ecx, (%rax) movq %r13, %r15 movq %rbp, %rbx movq %r14, %r12 jmp 0x4c4c leaq 0xe0666(%rip), %rdi # 0xe5350 callq 0x44e0 testq %r15, %r15 je 0x4d0c lock decl (%r15) jne 0x4d0c movl $0x2, %esi movl $0x8, %edx movq %r15, %rdi callq 0x4260 leaq 0x28(%rsp), %rdi callq 0x4370 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4d40 jmp 0x4d32 movq %r14, 0x8(%rsp) movq %rbx, (%rsp) movq %rax, %r12 jmp 0x4d72 movq %rbx, (%rsp) movq %rax, %r12 jmp 0x4d7c movq %rax, %r12 jmp 0x4d4b movq %rax, %r12 movq %r13, %r15 testq %r15, %r15 je 0x4d68 lock decl (%r15) jne 0x4d68 movl $0x2, %esi movl $0x8, %edx movq %r15, %rdi callq 0x4260 leaq 0x28(%rsp), %rdi callq 0x4370 movq 0x8(%rsp), %rdi callq 0x43e0 movq (%rsp), %rdi callq 0x4240 movq %r12, %rdi callq 0x41e0 nop
_ZN10MainWindowC2EP7QWidget: push rbp; Alternative name is 'MainWindow::MainWindow(QWidget *)' push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi xor edx, edx call __ZN11QMainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE; QMainWindow::QMainWindow(QWidget *,QFlags<Qt::WindowType>) lea rax, _ZTV10MainWindow; `vtable for'MainWindow lea rcx, [rax+10h] mov [rbx], rcx add rax, 1C8h mov [rbx+10h], rax mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov [rbx+28h], rax lea r14, [rbx+30h] mov rdi, r14; this call __ZN12QSqlDatabaseC1Ev; QSqlDatabase::QSqlDatabase(void) mov rdi, [rbx+28h]; this mov rsi, rbx; QMainWindow * call _ZN13Ui_MainWindow7setupUiEP11QMainWindow; Ui_MainWindow::setupUi(QMainWindow *) lea rdi, file mov esi, 11h call __ZN5QFile4openE6QFlagsIN13QIODeviceBase12OpenModeFlagEE; QFile::open(QFlags<QIODeviceBase::OpenModeFlag>) test al, al jz loc_4D16 mov [rsp+68h+var_60], r14 mov [rsp+68h+var_68], rbx lea rsi, file lea rdi, [rsp+68h+var_40] call __ZN11QTextStreamC1EP9QIODevice; QTextStream::QTextStream(QIODevice *) xor r15d, r15d xor ebx, ebx xor r12d, r12d xor r13d, r13d loc_4C4C: lea rdi, [rsp+68h+var_40]; this call __ZNK11QTextStream5atEndEv; QTextStream::atEnd(void) test al, al jnz loc_4CE3 lea rdi, [rsp+68h+var_58]; this lea rsi, [rsp+68h+var_40]; __int64 xor edx, edx call __ZN11QTextStream8readLineEx; QTextStream::readLine(long long) mov r13, [rsp+68h+var_58] mov rbp, [rsp+68h+var_50] mov [rsp+68h+var_58], r15 mov [rsp+68h+var_50], rbx mov r14, [rsp+68h+var_48] mov [rsp+68h+var_48], r12 test r15, r15 jz short loc_4CAC lock dec dword ptr [r15] jnz short loc_4CAC mov rdi, [rsp+68h+var_58] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_4CAC: mov rdi, r14 mov rsi, rbp xor edx, edx mov ecx, 0Ah call __ZN7QString17toIntegral_helperE11QStringViewPbi; QString::toIntegral_helper(QStringView,bool *,int) movsxd rcx, eax cmp rcx, rax mov eax, 0 cmovnz ecx, eax lea rax, clicks mov [rax], ecx mov r15, r13 mov rbx, rbp mov r12, r14 jmp loc_4C4C loc_4CE3: lea rdi, file; this call __ZN11QFileDevice5closeEv; QFileDevice::close(void) test r15, r15 jz short loc_4D0C lock dec dword ptr [r15] jnz short loc_4D0C mov esi, 2 mov edx, 8 mov rdi, r15 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_4D0C: lea rdi, [rsp+68h+var_40]; this call __ZN11QTextStreamD1Ev; QTextStream::~QTextStream() loc_4D16: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4D40 jmp short loc_4D32 mov [rsp+arg_0], r14 mov [rsp+0], rbx loc_4D32: mov r12, rax jmp short loc_4D72 mov [rsp+0], rbx mov r12, rax jmp short loc_4D7C loc_4D40: mov r12, rax jmp short loc_4D4B mov r12, rax mov r15, r13 loc_4D4B: test r15, r15 jz short loc_4D68 lock dec dword ptr [r15] jnz short loc_4D68 mov esi, 2 mov edx, 8 mov rdi, r15 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_4D68: lea rdi, [rsp+arg_20]; this call __ZN11QTextStreamD1Ev; QTextStream::~QTextStream() loc_4D72: mov rdi, [rsp+arg_0]; this call __ZN12QSqlDatabaseD1Ev; QSqlDatabase::~QSqlDatabase() loc_4D7C: mov rdi, [rsp+0]; this call __ZN11QMainWindowD2Ev; QMainWindow::~QMainWindow() mov rdi, r12 call __Unwind_Resume
void MainWindow::MainWindow(MainWindow *this, QWidget *a2) { volatile signed __int32 *v2; // r15 long long v3; // rbx long long v4; // r12 volatile signed __int32 *v5; // r13 long long v6; // rbp long long v7; // r14 long long v8; // rax int v9; // ecx volatile signed __int32 *v10; // [rsp+10h] [rbp-58h] BYREF long long v11; // [rsp+18h] [rbp-50h] long long v12; // [rsp+20h] [rbp-48h] long long v13[8]; // [rsp+28h] [rbp-40h] BYREF QMainWindow::QMainWindow(this, a2, 0LL); *(_QWORD *)this = &`vtable for'MainWindow + 2; *((_QWORD *)this + 2) = &`vtable for'MainWindow + 57; *((_QWORD *)this + 5) = operator new(0x80uLL); QSqlDatabase::QSqlDatabase((MainWindow *)((char *)this + 48)); Ui_MainWindow::setupUi(*((Ui_MainWindow **)this + 5), this); if ( (unsigned __int8)QFile::open(&file, 17LL) ) { QTextStream::QTextStream(v13, &file); v2 = 0LL; v3 = 0LL; v4 = 0LL; while ( !(unsigned __int8)QTextStream::atEnd((QTextStream *)v13) ) { QTextStream::readLine((QTextStream *)&v10, (long long)v13); v5 = v10; v6 = v11; v10 = v2; v11 = v3; v7 = v12; v12 = v4; if ( v2 && !_InterlockedDecrement(v2) ) QArrayData::deallocate(v10, 2LL, 8LL); v8 = QString::toIntegral_helper(v7, v6, 0LL, 10LL); v9 = v8; if ( (int)v8 != v8 ) v9 = 0; clicks = v9; v2 = v5; v3 = v6; v4 = v7; } QFileDevice::close((QFileDevice *)&file); if ( v2 && !_InterlockedDecrement(v2) ) QArrayData::deallocate(v2, 2LL, 8LL); QTextStream::~QTextStream((QTextStream *)v13); } }
MainWindow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI XOR EDX,EDX CALL 0x001040e0 LEA RAX,[0x1e4b38] LEA RCX,[RAX + 0x10] MOV qword ptr [RBX],RCX ADD RAX,0x1c8 MOV qword ptr [RBX + 0x10],RAX LAB_00104be8: MOV EDI,0x80 CALL 0x00104320 MOV qword ptr [RBX + 0x28],RAX LEA R14,[RBX + 0x30] MOV RDI,R14 CALL 0x001042b0 MOV RDI,qword ptr [RBX + 0x28] LAB_00104c06: MOV RSI,RBX CALL 0x001059ba LEA RDI,[0x1e5350] MOV ESI,0x11 CALL 0x00104250 TEST AL,AL JZ 0x00104d16 LAB_00104c27: MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP],RBX LEA RSI,[0x1e5350] LEA RDI,[RSP + 0x28] CALL 0x001041f0 XOR R15D,R15D XOR EBX,EBX XOR R12D,R12D XOR R13D,R13D LAB_00104c4c: LEA RDI,[RSP + 0x28] CALL 0x001043c0 TEST AL,AL JNZ 0x00104ce3 LAB_00104c5e: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] XOR EDX,EDX CALL 0x001041a0 MOV R13,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x18],RBX MOV R14,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x20],R12 TEST R15,R15 JZ 0x00104cac DEC.LOCK dword ptr [R15] JNZ 0x00104cac MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_00104cac: MOV RDI,R14 MOV RSI,RBP XOR EDX,EDX MOV ECX,0xa CALL 0x00104050 MOVSXD RCX,EAX CMP RCX,RAX MOV EAX,0x0 CMOVNZ ECX,EAX LEA RAX,[0x1e5348] MOV dword ptr [RAX],ECX MOV R15,R13 MOV RBX,RBP MOV R12,R14 JMP 0x00104c4c LAB_00104ce3: LEA RDI,[0x1e5350] CALL 0x001044e0 LAB_00104cef: TEST R15,R15 JZ 0x00104d0c DEC.LOCK dword ptr [R15] JNZ 0x00104d0c MOV ESI,0x2 MOV EDX,0x8 MOV RDI,R15 CALL 0x00104260 LAB_00104d0c: LEA RDI,[RSP + 0x28] CALL 0x00104370 LAB_00104d16: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MainWindow::MainWindow(QWidget*) */ void __thiscall MainWindow::MainWindow(MainWindow *this,QWidget *param_1) { QArrayData *pQVar1; int8 uVar2; int8 uVar3; char cVar4; void *pvVar5; long lVar6; int8 uVar7; int8 uVar8; QArrayData *pQVar9; QArrayData *local_58; int8 local_50; int8 local_48; QTextStream local_40 [16]; QMainWindow::QMainWindow((QMainWindow *)this,param_1,0); *(int ***)this = &PTR_metaObject_001e4b48; *(int **)(this + 0x10) = &DAT_001e4d00; /* try { // try from 00104be8 to 00104c01 has its CatchHandler @ 00104d37 */ pvVar5 = operator_new(0x80); *(void **)(this + 0x28) = pvVar5; QSqlDatabase::QSqlDatabase((QSqlDatabase *)(this + 0x30)); /* try { // try from 00104c06 to 00104c1e has its CatchHandler @ 00104d29 */ Ui_MainWindow::setupUi(*(Ui_MainWindow **)(this + 0x28),(QMainWindow *)this); cVar4 = QFile::open(file,0x11); if (cVar4 != '\0') { /* try { // try from 00104c27 to 00104c40 has its CatchHandler @ 00104d27 */ QTextStream::QTextStream(local_40,(QIODevice *)file); uVar7 = 0; uVar8 = 0; pQVar9 = (QArrayData *)0x0; /* try { // try from 00104c4c to 00104c55 has its CatchHandler @ 00104d45 */ while (cVar4 = QTextStream::atEnd(), cVar4 == '\0') { /* try { // try from 00104c5e to 00104c6e has its CatchHandler @ 00104d40 */ QTextStream::readLine((longlong)&local_58); uVar3 = local_48; uVar2 = local_50; pQVar1 = local_58; local_58 = pQVar9; local_50 = uVar7; local_48 = uVar8; if (pQVar9 != (QArrayData *)0x0) { LOCK(); *(int *)pQVar9 = *(int *)pQVar9 + -1; UNLOCK(); if (*(int *)pQVar9 == 0) { QArrayData::deallocate(pQVar9,2,8); } } /* try { // try from 00104cac to 00104cbd has its CatchHandler @ 00104d45 */ lVar6 = QString::toIntegral_helper(uVar3,uVar2,0,10); clicks = (int)lVar6; uVar7 = uVar2; uVar8 = uVar3; pQVar9 = pQVar1; if (clicks != lVar6) { clicks = 0; } } /* try { // try from 00104ce3 to 00104cee has its CatchHandler @ 00104d25 */ QFileDevice::close(); if (pQVar9 != (QArrayData *)0x0) { LOCK(); *(int *)pQVar9 = *(int *)pQVar9 + -1; UNLOCK(); if (*(int *)pQVar9 == 0) { QArrayData::deallocate(pQVar9,2,8); } } QTextStream::~QTextStream(local_40); } return; }
29,096
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
monkey531[P]llama/common/json.hpp
void int_to_string( string_type& target, std::size_t value ) { // For ADL using std::to_string; target = to_string(value); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx movl $0x1, %esi cmpq $0xa, %r14 jb 0xadc96 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0xadc8f cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0xadc94 cmpq $0x2710, %rcx # imm = 0x2710 jb 0xadc96 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0xadc59 addl $-0x3, %esi jmp 0xadc96 addl $-0x2, %esi jmp 0xadc96 decl %esi movl %esi, %esi leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %edx, %edx callq 0x1ba00 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0x5e055 movq %rbx, %rdi movq %r15, %rsi callq 0x1ba80 movq (%r15), %rdi cmpq %r12, %rdi je 0xadce0 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi mov esi, 1 cmp r14, 0Ah jb short loc_ADC96 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r14 loc_ADC59: cmp rcx, 63h ; 'c' jbe short loc_ADC8F cmp rcx, 3E7h jbe short loc_ADC94 cmp rcx, 2710h jb short loc_ADC96 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_ADC59 add esi, 0FFFFFFFDh jmp short loc_ADC96 loc_ADC8F: add esi, 0FFFFFFFEh jmp short loc_ADC96 loc_ADC94: dec esi loc_ADC96: mov esi, esi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea r15, [rsp+48h+var_40] mov rdi, r15 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r12 jz short loc_ADCE0 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADCE0: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(long long a1, unsigned long long a2) { unsigned int v3; // esi unsigned long long v4; // rcx bool v5; // cc char *v6; // [rsp+8h] [rbp-40h] BYREF int v7; // [rsp+10h] [rbp-38h] _QWORD v8[6]; // [rsp+18h] [rbp-30h] BYREF v3 = 1; if ( a2 >= 0xA ) { v3 = 4; v4 = a2; while ( 1 ) { if ( v4 <= 0x63 ) { v3 -= 2; goto LABEL_10; } if ( v4 <= 0x3E7 ) break; if ( v4 < 0x2710 ) goto LABEL_10; v3 += 4; v5 = v4 <= 0x1869F; v4 /= 0x2710uLL; if ( v5 ) { v3 -= 3; goto LABEL_10; } } --v3; } LABEL_10: v6 = (char *)v8; std::string::_M_construct(&v6, v3, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v6, v7, a2); std::string::operator=(a1, &v6); if ( v6 != (char *)v8 ) operator delete(v6, v8[0] + 1LL); }
int_to_string<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI MOV ESI,0x1 CMP R14,0xa JC 0x001adc96 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R14 LAB_001adc59: CMP RCX,0x63 JBE 0x001adc8f CMP RCX,0x3e7 JBE 0x001adc94 CMP RCX,0x2710 JC 0x001adc96 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x001adc59 ADD ESI,-0x3 JMP 0x001adc96 LAB_001adc8f: ADD ESI,-0x2 JMP 0x001adc96 LAB_001adc94: DEC ESI LAB_001adc96: MOV ESI,ESI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LEA R15,[RSP + 0x8] MOV RDI,R15 XOR EDX,EDX CALL 0x0011ba00 MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0015e055 MOV RDI,RBX MOV RSI,R15 CALL 0x0011ba80 MOV RDI,qword ptr [R15] CMP RDI,R12 JZ 0x001adce0 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8c0 LAB_001adce0: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string >(std::__cxx11::string&, unsigned long) */ void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string> (string *param_1,ulong param_2) { bool bVar1; char cVar2; ulong uVar3; char cVar4; long *local_40; uint local_38; long local_30 [2]; cVar4 = '\x01'; if (9 < param_2) { uVar3 = param_2; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_001adc96; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_001adc96; } if (uVar3 < 10000) goto LAB_001adc96; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_001adc96: local_40 = local_30; std::__cxx11::string::_M_construct((ulong)&local_40,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,param_2); std::__cxx11::string::operator=(param_1,(string *)&local_40); if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } return; }
29,097
release_configuration_dirs
eloqsql/libmariadb/libmariadb/ma_default.c
void release_configuration_dirs() { if (configuration_dirs) { int i= 0; while (configuration_dirs[i]) free(configuration_dirs[i++]); free(configuration_dirs); } }
O0
c
release_configuration_dirs: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x1ad81(%rip), %rax # 0x61da0 cmpq $0x0, (%rax) je 0x47073 movl $0x0, -0x4(%rbp) leaq 0x1ad6d(%rip), %rax # 0x61da0 movq (%rax), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x47064 leaq 0x1ad58(%rip), %rax # 0x61da0 movq (%rax), %rax movl -0x4(%rbp), %ecx movl %ecx, %edx addl $0x1, %edx movl %edx, -0x4(%rbp) movslq %ecx, %rcx movq (%rax,%rcx,8), %rdi callq 0x13520 jmp 0x4702c leaq 0x1ad35(%rip), %rax # 0x61da0 movq (%rax), %rdi callq 0x13520 addq $0x10, %rsp popq %rbp retq nopl (%rax)
release_configuration_dirs: push rbp mov rbp, rsp sub rsp, 10h lea rax, configuration_dirs cmp qword ptr [rax], 0 jz short loc_47073 mov [rbp+var_4], 0 loc_4702C: lea rax, configuration_dirs mov rax, [rax] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8], 0 jz short loc_47064 lea rax, configuration_dirs mov rax, [rax] mov ecx, [rbp+var_4] mov edx, ecx add edx, 1 mov [rbp+var_4], edx movsxd rcx, ecx mov rdi, [rax+rcx*8] call _free jmp short loc_4702C loc_47064: lea rax, configuration_dirs mov rdi, [rax] call _free loc_47073: add rsp, 10h pop rbp retn
_QWORD *release_configuration_dirs() { _QWORD *result; // rax int v1; // ecx int i; // [rsp+Ch] [rbp-4h] result = configuration_dirs; if ( configuration_dirs[0] ) { for ( i = 0; *(_QWORD *)(configuration_dirs[0] + 8LL * i); ++i ) { v1 = i; free(*(_QWORD *)(configuration_dirs[0] + 8LL * v1)); } return (_QWORD *)free(configuration_dirs[0]); } return result; }
release_configuration_dirs: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x161da0] CMP qword ptr [RAX],0x0 JZ 0x00147073 MOV dword ptr [RBP + -0x4],0x0 LAB_0014702c: LEA RAX,[0x161da0] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x00147064 LEA RAX,[0x161da0] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x4] MOV EDX,ECX ADD EDX,0x1 MOV dword ptr [RBP + -0x4],EDX MOVSXD RCX,ECX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00113520 JMP 0x0014702c LAB_00147064: LEA RAX,[0x161da0] MOV RDI,qword ptr [RAX] CALL 0x00113520 LAB_00147073: ADD RSP,0x10 POP RBP RET
void release_configuration_dirs(void) { int4 local_c; if (configuration_dirs != (void *)0x0) { local_c = 0; while (*(long *)((long)configuration_dirs + (long)local_c * 8) != 0) { free(*(void **)((long)configuration_dirs + (long)local_c * 8)); local_c = local_c + 1; } free(configuration_dirs); } return; }
29,098
ma_read_pack_record
eloqsql/storage/maria/ma_packrec.c
int _ma_read_pack_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; File file; DBUG_ENTER("maria_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(my_errno); /* _search() didn't find record */ file= info->dfile.file; if (_ma_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, file, filepos)) goto err; if (mysql_file_read(file, info->rec_buff + block_info.offset , block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_ma_pack_rec_unpack(info,&info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); err: DBUG_RETURN(my_errno); }
O3
c
ma_read_pack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rdx je 0x455be movq %rsi, %r13 movq %rdi, %r14 movl 0x480(%rdi), %r12d leaq 0x290(%rdi), %r15 leaq 0x3a0(%rdi), %rbx leaq 0x460(%rdi), %r8 movq %rdx, (%rsp) leaq -0x88(%rbp), %rdx movq %r15, %rsi movq %rbx, %rcx movl %r12d, %r9d callq 0x45685 testl %eax, %eax jne 0x455be movq %r13, -0x98(%rbp) movl -0x34(%rbp), %eax movq (%rbx), %rbx addq %rax, %rbx movq -0x70(%rbp), %r13 subq %rax, %r13 leaq 0x34e4ea(%rip), %rax # 0x393a58 movq (%rax), %rax leaq -0xe0(%rbp), %rdi movl %r12d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x45619 movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xaad5c movq %rax, %rbx testq %rbx, %rbx movq -0x98(%rbp), %rdx je 0x455ea movq %r14, %rdi movl $0x7f, %esi callq 0x3c86c callq 0xac2be movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x45680 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq orb $0x2, 0x624(%r14) movq 0x3a0(%r14), %rax movq -0x70(%rbp), %rcx movb $0x0, (%rax,%rcx) movq 0x3a0(%r14), %rcx movq -0x70(%rbp), %r8 movq %r14, %rdi movq %r15, %rsi callq 0x45945 jmp 0x455c5 movq %rax, %rcx leaq 0x34e435(%rip), %rax # 0x393a58 movq (%rax), %rax leaq 0x9fba6(%rip), %rdx # 0xe51d3 movq %rcx, -0x90(%rbp) movq %rcx, %rdi movq %r13, %rsi movl $0x2f5, %ecx # imm = 0x2F5 callq *0x210(%rax) movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xaad5c movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmoveq %r13, %rsi leaq 0x34e3ed(%rip), %rax # 0x393a58 movq (%rax), %rax movq -0x90(%rbp), %rdi callq *0x218(%rax) jmp 0x455a5 callq 0x2a250
_ma_read_pack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rax, fs:28h mov [rbp+var_30], rax cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_455BE mov r13, rsi mov r14, rdi mov r12d, [rdi+480h] lea r15, [rdi+290h] lea rbx, [rdi+3A0h] lea r8, [rdi+460h] mov [rsp+0F0h+var_F0], rdx lea rdx, [rbp+var_88] mov rsi, r15 mov rcx, rbx mov r9d, r12d call _ma_pack_get_block_info test eax, eax jnz short loc_455BE mov [rbp+var_98], r13 mov eax, [rbp+var_34] mov rbx, [rbx] add rbx, rax mov r13, [rbp+var_70] sub r13, rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_E0] mov esi, r12d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_45619 mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rbx, rax loc_455A5: test rbx, rbx mov rdx, [rbp+var_98] jz short loc_455EA mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error loc_455BE: call _my_thread_var mov eax, [rax] loc_455C5: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_45680 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_455EA: or byte ptr [r14+624h], 2 mov rax, [r14+3A0h] mov rcx, [rbp+var_70] mov byte ptr [rax+rcx], 0 mov rcx, [r14+3A0h] mov r8, [rbp+var_70] mov rdi, r14 mov rsi, r15 call _ma_pack_rec_unpack jmp short loc_455C5 loc_45619: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_90], rcx mov rdi, rcx mov rsi, r13 mov ecx, 2F5h call qword ptr [rax+210h] mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rbx, rax xor esi, esi test rax, rax cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_90] call qword ptr [rax+218h] jmp loc_455A5 loc_45680: call ___stack_chk_fail
long long ma_read_pack_record(long long a1, long long a2, long long a3) { unsigned int v3; // r12d long long v4; // rbx long long v5; // r13 long long v6; // rax long long v7; // rcx long long v8; // rbx long long v9; // r8 int v10; // r9d long long v11; // rdx long long v13; // rsi _BYTE v14[72]; // [rsp+10h] [rbp-E0h] BYREF long long v15; // [rsp+58h] [rbp-98h] long long v16; // [rsp+60h] [rbp-90h] char v17; // [rsp+68h] [rbp-88h] BYREF long long v18; // [rsp+80h] [rbp-70h] unsigned int v19; // [rsp+BCh] [rbp-34h] unsigned long long v20; // [rsp+C0h] [rbp-30h] v20 = __readfsqword(0x28u); if ( a3 != -1 ) { v3 = *(_DWORD *)(a1 + 1152); if ( !(unsigned int)ma_pack_get_block_info( a1, (int)a1 + 656, (unsigned int)&v17, (int)a1 + 928, (int)a1 + 1120, v3, a3) ) { v15 = a2; v4 = v19 + *(_QWORD *)(a1 + 928); v5 = v18 - v19; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v14, v3, 6LL); if ( v6 ) { v16 = v6; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v6, v5, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 757LL); v8 = my_read(v3, v4, v5, 4LL); v13 = 0LL; if ( !v8 ) v13 = v5; ((void ( *)(long long, long long))PSI_server[67])(v16, v13); } else { v8 = my_read(v3, v4, v5, 4LL); } v11 = v15; if ( !v8 ) { *(_BYTE *)(a1 + 1572) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 928) + v18) = 0; return ma_pack_rec_unpack(a1, a1 + 656, v11, *(_QWORD *)(a1 + 928), v18); } ma_set_fatal_error((_DWORD *)a1, 127, v15, v7, v9, v10); } } return *(unsigned int *)my_thread_var(a1); }
_ma_read_pack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP RDX,-0x1 JZ 0x001455be MOV R13,RSI MOV R14,RDI MOV R12D,dword ptr [RDI + 0x480] LEA R15,[RDI + 0x290] LEA RBX,[RDI + 0x3a0] LEA R8,[RDI + 0x460] MOV qword ptr [RSP],RDX LEA RDX,[RBP + -0x88] MOV RSI,R15 MOV RCX,RBX MOV R9D,R12D CALL 0x00145685 TEST EAX,EAX JNZ 0x001455be MOV qword ptr [RBP + -0x98],R13 MOV EAX,dword ptr [RBP + -0x34] MOV RBX,qword ptr [RBX] ADD RBX,RAX MOV R13,qword ptr [RBP + -0x70] SUB R13,RAX LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xe0] MOV ESI,R12D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00145619 MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001aad5c MOV RBX,RAX LAB_001455a5: TEST RBX,RBX MOV RDX,qword ptr [RBP + -0x98] JZ 0x001455ea MOV RDI,R14 MOV ESI,0x7f CALL 0x0013c86c LAB_001455be: CALL 0x001ac2be MOV EAX,dword ptr [RAX] LAB_001455c5: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00145680 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001455ea: OR byte ptr [R14 + 0x624],0x2 MOV RAX,qword ptr [R14 + 0x3a0] MOV RCX,qword ptr [RBP + -0x70] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RCX,qword ptr [R14 + 0x3a0] MOV R8,qword ptr [RBP + -0x70] MOV RDI,R14 MOV RSI,R15 CALL 0x00145945 JMP 0x001455c5 LAB_00145619: MOV RCX,RAX LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] LEA RDX,[0x1e51d3] MOV qword ptr [RBP + -0x90],RCX MOV RDI,RCX MOV RSI,R13 MOV ECX,0x2f5 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001aad5c MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R13 LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x90] CALL qword ptr [RAX + 0x218] JMP 0x001455a5 LAB_00145680: CALL 0x0012a250
ulong _ma_read_pack_record(long param_1,int8 param_2,long param_3) { int4 uVar1; int iVar2; long lVar3; uint *puVar4; ulong uVar5; long lVar6; long lVar7; long in_FS_OFFSET; int1 local_e8 [72]; int8 local_a0; long local_98; int1 local_90 [24]; long local_78; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 != -1) { uVar1 = *(int4 *)(param_1 + 0x480); iVar2 = _ma_pack_get_block_info (param_1,param_1 + 0x290,local_90,(long *)(param_1 + 0x3a0),param_1 + 0x460, uVar1,param_3); if (iVar2 == 0) { lVar6 = *(long *)(param_1 + 0x3a0) + (ulong)local_3c; lVar7 = local_78 - (ulong)local_3c; local_a0 = param_2; lVar3 = (**(code **)(PSI_server + 0x158))(local_e8,uVar1,6); if (lVar3 == 0) { lVar6 = my_read(uVar1,lVar6,lVar7,4); } else { local_98 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,lVar7,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c" ,0x2f5); lVar6 = my_read(uVar1,lVar6,lVar7,4); lVar3 = 0; if (lVar6 == 0) { lVar3 = lVar7; } (**(code **)(PSI_server + 0x218))(local_98,lVar3); } if (lVar6 == 0) { *(byte *)(param_1 + 0x624) = *(byte *)(param_1 + 0x624) | 2; *(int1 *)(*(long *)(param_1 + 0x3a0) + local_78) = 0; uVar5 = _ma_pack_rec_unpack(param_1,param_1 + 0x290,local_a0, *(int8 *)(param_1 + 0x3a0),local_78); goto LAB_001455c5; } _ma_set_fatal_error(param_1,0x7f); } } puVar4 = (uint *)_my_thread_var(); uVar5 = (ulong)*puVar4; LAB_001455c5: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
29,099
js_string_toWellFormed
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_toWellFormed(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str; JSValue ret; JSString *p; uint32_t c, i, n; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return JS_EXCEPTION; p = JS_VALUE_GET_STRING(str); if (!p->is_wide_char || p->len == 0) return str; // by definition well-formed // TODO(bnoordhuis) don't clone when input is well-formed ret = js_new_string16_len(ctx, p->u.str16, p->len); JS_FreeValue(ctx, str); if (JS_IsException(ret)) return JS_EXCEPTION; p = JS_VALUE_GET_STRING(ret); for (i = 0, n = p->len; i < n; i++) { c = p->u.str16[i]; if (!is_surrogate(c)) continue; if (is_lo_surrogate(c) || i + 1 == n) { p->u.str16[i] = 0xFFFD; continue; } c = p->u.str16[++i]; if (!is_lo_surrogate(c)) p->u.str16[--i] = 0xFFFD; } return ret; }
O1
c
js_string_toWellFormed: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 callq 0x425ff movq %rdx, %r14 movq %rax, (%rsp) cmpl $0x6, %r14d jne 0x7b2f4 xorl %eax, %eax movl $0x6, %r14d jmp 0x7b3ad movq (%rsp), %rsi movq 0x4(%rsi), %rdx testl %edx, %edx jns 0x7b3a9 andl $0x7fffffff, %edx # imm = 0x7FFFFFFF je 0x7b3a9 addq $0x18, %rsi movq %r15, %rdi callq 0x3d734 movq %rdx, %rbx movq %rax, 0x8(%rsp) movq (%rsp), %rsi movq 0x18(%r15), %rdi movq %r14, %rdx callq 0x1d8c6 cmpl $0x6, %ebx je 0x7b2e7 movq 0x8(%rsp), %rax movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andl 0x4(%rax), %ecx je 0x7b39f xorl %edx, %edx movl %edx, %esi movzwl 0x18(%rax,%rsi,2), %edi movl %edi, %r8d andl $0xf800, %r8d # imm = 0xF800 cmpl $0xd800, %r8d # imm = 0xD800 jne 0x7b395 notl %edi testl $0xdc00, %edi # imm = 0xDC00 je 0x7b38e leal 0x1(%rdx), %edi cmpl %ecx, %edi je 0x7b38e movl %edi, %r8d movzwl 0x18(%rax,%r8,2), %r8d andl $0xfc00, %r8d # imm = 0xFC00 cmpl $0xdc00, %r8d # imm = 0xDC00 je 0x7b397 movw $0xfffd, 0x18(%rax,%rsi,2) # imm = 0xFFFD movl %edx, %edi incl %edi movl %edi, %edx cmpl %ecx, %edi jb 0x7b34a movq 0x8(%rsp), %rax movq %rbx, %r14 jmp 0x7b3ad movq (%rsp), %rax movq %r14, %rdx addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
js_string_toWellFormed: push r15 push r14 push rbx sub rsp, 10h mov r15, rdi call JS_ToStringCheckObject mov r14, rdx mov [rsp+28h+var_28], rax cmp r14d, 6 jnz short loc_7B2F4 loc_7B2E7: xor eax, eax mov r14d, 6 jmp loc_7B3AD loc_7B2F4: mov rsi, [rsp+28h+var_28] mov rdx, [rsi+4] test edx, edx jns loc_7B3A9 and edx, 7FFFFFFFh jz loc_7B3A9 add rsi, 18h mov rdi, r15 call js_new_string16_len mov rbx, rdx mov [rsp+28h+var_20], rax mov rsi, [rsp+28h+var_28] mov rdi, [r15+18h] mov rdx, r14 call JS_FreeValueRT cmp ebx, 6 jz short loc_7B2E7 mov rax, [rsp+28h+var_20] mov ecx, 7FFFFFFFh and ecx, [rax+4] jz short loc_7B39F xor edx, edx loc_7B34A: mov esi, edx movzx edi, word ptr [rax+rsi*2+18h] mov r8d, edi and r8d, 0F800h cmp r8d, 0D800h jnz short loc_7B395 not edi test edi, 0DC00h jz short loc_7B38E lea edi, [rdx+1] cmp edi, ecx jz short loc_7B38E mov r8d, edi movzx r8d, word ptr [rax+r8*2+18h] and r8d, 0FC00h cmp r8d, 0DC00h jz short loc_7B397 loc_7B38E: mov word ptr [rax+rsi*2+18h], 0FFFDh loc_7B395: mov edi, edx loc_7B397: inc edi mov edx, edi cmp edi, ecx jb short loc_7B34A loc_7B39F: mov rax, [rsp+28h+var_20] mov r14, rbx jmp short loc_7B3AD loc_7B3A9: mov rax, [rsp+28h+var_28] loc_7B3AD: mov rdx, r14 add rsp, 10h pop rbx pop r14 pop r15 retn
unsigned long long js_string_toWellFormed( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long result; // rax long long v15; // rdx long long v16; // r14 long long v17; // rdx unsigned int v18; // edx long long v19; // rax int v20; // edx int v21; // ebx unsigned int v22; // ecx unsigned int v23; // edx unsigned int v24; // edi _DWORD *v25; // [rsp+0h] [rbp-28h] long long v26; // [rsp+8h] [rbp-20h] result = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v16 = v15; v25 = (_DWORD *)result; if ( (_DWORD)v15 == 6 ) return 0LL; v17 = *(_QWORD *)(result + 4); if ( (int)v17 < 0 ) { v18 = v17 & 0x7FFFFFFF; if ( v18 ) { v19 = js_new_string16_len(a1, result + 24, v18); v21 = v20; v26 = v19; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v25, v16); if ( v21 == 6 ) return 0LL; v22 = *(_DWORD *)(v26 + 4) & 0x7FFFFFFF; if ( v22 ) { v23 = 0; do { if ( (*(_WORD *)(v26 + 2LL * v23 + 24) & 0xF800) == 0xD800 ) { if ( (~*(_WORD *)(v26 + 2LL * v23 + 24) & 0xDC00) != 0 ) { v24 = v23 + 1; if ( v23 + 1 != v22 && (*(_WORD *)(v26 + 2LL * v24 + 24) & 0xFC00) == 0xDC00 ) goto LABEL_14; } *(_WORD *)(v26 + 2LL * v23 + 24) = -3; } v24 = v23; LABEL_14: v23 = v24 + 1; } while ( v24 + 1 < v22 ); } return v26; } } return result; }
js_string_toWellFormed: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDI CALL 0x001425ff MOV R14,RDX MOV qword ptr [RSP],RAX CMP R14D,0x6 JNZ 0x0017b2f4 LAB_0017b2e7: XOR EAX,EAX MOV R14D,0x6 JMP 0x0017b3ad LAB_0017b2f4: MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSI + 0x4] TEST EDX,EDX JNS 0x0017b3a9 AND EDX,0x7fffffff JZ 0x0017b3a9 ADD RSI,0x18 MOV RDI,R15 CALL 0x0013d734 MOV RBX,RDX MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [R15 + 0x18] MOV RDX,R14 CALL 0x0011d8c6 CMP EBX,0x6 JZ 0x0017b2e7 MOV RAX,qword ptr [RSP + 0x8] MOV ECX,0x7fffffff AND ECX,dword ptr [RAX + 0x4] JZ 0x0017b39f XOR EDX,EDX LAB_0017b34a: MOV ESI,EDX MOVZX EDI,word ptr [RAX + RSI*0x2 + 0x18] MOV R8D,EDI AND R8D,0xf800 CMP R8D,0xd800 JNZ 0x0017b395 NOT EDI TEST EDI,0xdc00 JZ 0x0017b38e LEA EDI,[RDX + 0x1] CMP EDI,ECX JZ 0x0017b38e MOV R8D,EDI MOVZX R8D,word ptr [RAX + R8*0x2 + 0x18] AND R8D,0xfc00 CMP R8D,0xdc00 JZ 0x0017b397 LAB_0017b38e: MOV word ptr [RAX + RSI*0x2 + 0x18],0xfffd LAB_0017b395: MOV EDI,EDX LAB_0017b397: INC EDI MOV EDX,EDI CMP EDI,ECX JC 0x0017b34a LAB_0017b39f: MOV RAX,qword ptr [RSP + 0x8] MOV R14,RBX JMP 0x0017b3ad LAB_0017b3a9: MOV RAX,qword ptr [RSP] LAB_0017b3ad: MOV RDX,R14 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
int1 [16] js_string_toWellFormed(long param_1) { ushort uVar1; long lVar2; long lVar3; uint uVar4; uint uVar5; int1 auVar7 [16]; int1 auVar8 [16]; uint uVar6; auVar7 = JS_ToStringCheckObject(); lVar2 = auVar7._0_8_; if (auVar7._8_4_ != 6) { if (-1 < (int)*(ulong *)(lVar2 + 4)) { return auVar7; } if ((*(ulong *)(lVar2 + 4) & 0x7fffffff) == 0) { return auVar7; } auVar8 = js_new_string16_len(param_1,lVar2 + 0x18); lVar3 = auVar8._0_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar2,auVar7._8_8_); if (auVar8._8_4_ != 6) { uVar4 = *(uint *)(lVar3 + 4) & 0x7fffffff; if (uVar4 == 0) { return auVar8; } uVar5 = 0; do { uVar1 = *(ushort *)(lVar3 + 0x18 + (ulong)uVar5 * 2); uVar6 = uVar5; if (((uVar1 & 0xf800) == 0xd800) && ((((~uVar1 & 0xdc00) == 0 || (uVar6 = uVar5 + 1, uVar6 == uVar4)) || ((*(ushort *)(lVar3 + 0x18 + (ulong)uVar6 * 2) & 0xfc00) != 0xdc00)))) { *(int2 *)(lVar3 + 0x18 + (ulong)uVar5 * 2) = 0xfffd; uVar6 = uVar5; } uVar5 = uVar6 + 1; } while (uVar5 < uVar4); return auVar8; } } return ZEXT816(6) << 0x40; }