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
47,300
changed_account_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h
static void changed_account_free(changed_account_t* acc) { while (acc->storage) { changed_storage_t* storage = acc->storage; acc->storage = storage->next; safe_free(storage); } if (acc->code.data && acc->free_code) safe_free(acc->code.data); safe_free(acc); }
O0
c
changed_account_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x2c5ee movq -0x8(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x50(%rax) movq -0x10(%rbp), %rdi callq 0x9c5a0 jmp 0x2c5bc movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x2c610 movq -0x8(%rbp), %rax testb $0x1, 0x59(%rax) je 0x2c610 movq -0x8(%rbp), %rax movq 0x40(%rax), %rdi callq 0x9c5a0 movq -0x8(%rbp), %rdi callq 0x9c5a0 addq $0x10, %rsp popq %rbp retq nop
changed_account_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi loc_2C5BC: mov rax, [rbp+var_8] cmp qword ptr [rax+50h], 0 jz short loc_2C5EE mov rax, [rbp+var_8] mov rax, [rax+50h] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rcx, [rax+40h] mov rax, [rbp+var_8] mov [rax+50h], rcx mov rdi, [rbp+var_10] call safe_free jmp short loc_2C5BC loc_2C5EE: mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_2C610 mov rax, [rbp+var_8] test byte ptr [rax+59h], 1 jz short loc_2C610 mov rax, [rbp+var_8] mov rdi, [rax+40h] call safe_free loc_2C610: mov rdi, [rbp+var_8] call safe_free add rsp, 10h pop rbp retn
long long changed_account_free(long long a1) { long long v2; // [rsp+0h] [rbp-10h] while ( *(_QWORD *)(a1 + 80) ) { v2 = *(_QWORD *)(a1 + 80); *(_QWORD *)(a1 + 80) = *(_QWORD *)(v2 + 64); safe_free(v2); } if ( *(_QWORD *)(a1 + 64) && (*(_BYTE *)(a1 + 89) & 1) != 0 ) safe_free(*(_QWORD *)(a1 + 64)); return safe_free(a1); }
changed_account_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LAB_0012c5bc: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0012c5ee MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x50],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019c5a0 JMP 0x0012c5bc LAB_0012c5ee: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0012c610 MOV RAX,qword ptr [RBP + -0x8] TEST byte ptr [RAX + 0x59],0x1 JZ 0x0012c610 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x0019c5a0 LAB_0012c610: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0019c5a0 ADD RSP,0x10 POP RBP RET
void changed_account_free(long param_1) { long lVar1; while (*(long *)(param_1 + 0x50) != 0) { lVar1 = *(long *)(param_1 + 0x50); *(int8 *)(param_1 + 0x50) = *(int8 *)(lVar1 + 0x40); safe_free(lVar1); } if ((*(long *)(param_1 + 0x40) != 0) && ((*(byte *)(param_1 + 0x59) & 1) != 0)) { safe_free(*(int8 *)(param_1 + 0x40)); } safe_free(param_1); return; }
47,301
ha_resolve_by_legacy_type(THD*, legacy_db_type)
eloqsql/sql/handler.cc
handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type) { plugin_ref plugin; switch (db_type) { case DB_TYPE_DEFAULT: return ha_default_handlerton(thd); default: if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT && (plugin= ha_lock_engine(thd, installed_htons[db_type]))) return plugin_hton(plugin); /* fall through */ case DB_TYPE_UNKNOWN: return NULL; } }
O0
cpp
ha_resolve_by_legacy_type(THD*, legacy_db_type): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) testl %eax, %eax je 0xd08a94 jmp 0xd08a3b movl -0x24(%rbp), %eax subl $0x7f, %eax jne 0xd08a54 jmp 0xd08a45 movq -0x10(%rbp), %rdi callq 0xd08630 movq %rax, -0x8(%rbp) jmp 0xd08a9c cmpl $0x0, -0x14(%rbp) jle 0xd08a92 cmpl $0x7f, -0x14(%rbp) jge 0xd08a92 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, %ecx leaq 0x1074f80(%rip), %rax # 0x1d7d9f0 movq (%rax,%rcx,8), %rsi callq 0xd089c0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0xd08a92 movq -0x20(%rbp), %rdi callq 0xd086c0 movq %rax, -0x8(%rbp) jmp 0xd08a9c jmp 0xd08a94 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z25ha_resolve_by_legacy_typeP3THD14legacy_db_type: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov [rbp+var_24], eax test eax, eax jz short loc_D08A94 jmp short $+2 loc_D08A3B: mov eax, [rbp+var_24] sub eax, 7Fh jnz short loc_D08A54 jmp short $+2 loc_D08A45: mov rdi, [rbp+var_10]; THD * call _Z21ha_default_handlertonP3THD; ha_default_handlerton(THD *) mov [rbp+var_8], rax jmp short loc_D08A9C loc_D08A54: cmp [rbp+var_14], 0 jle short loc_D08A92 cmp [rbp+var_14], 7Fh jge short loc_D08A92 mov rdi, [rbp+var_10] mov eax, [rbp+var_14] mov ecx, eax lea rax, _ZL15installed_htons; installed_htons mov rsi, [rax+rcx*8] call _Z14ha_lock_engineP3THDPK10handlerton; ha_lock_engine(THD *,handlerton const*) mov [rbp+var_20], rax cmp rax, 0 jz short loc_D08A92 mov rdi, [rbp+var_20] call _ZL11plugin_htonP13st_plugin_int_22; plugin_hton(st_plugin_int *) mov [rbp+var_8], rax jmp short loc_D08A9C loc_D08A92: jmp short $+2 loc_D08A94: mov [rbp+var_8], 0 loc_D08A9C: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ha_resolve_by_legacy_type(THD *a1, int a2) { long long v3; // [rsp+10h] [rbp-20h] if ( !a2 ) return 0LL; if ( a2 != 127 ) { if ( a2 > 0 && a2 < 127 ) { v3 = ha_lock_engine((long long)a1, installed_htons[a2]); if ( v3 ) return plugin_hton(v3); } return 0LL; } return ha_default_handlerton(a1); }
type_handler: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x1e7b470] POP RBP RET
/* Item_timefunc::type_handler() const */ int1 * Item_timefunc::type_handler(void) { return type_handler_time2; }
47,302
ha_resolve_by_legacy_type(THD*, legacy_db_type)
eloqsql/sql/handler.cc
handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type) { plugin_ref plugin; switch (db_type) { case DB_TYPE_DEFAULT: return ha_default_handlerton(thd); default: if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT && (plugin= ha_lock_engine(thd, installed_htons[db_type]))) return plugin_hton(plugin); /* fall through */ case DB_TYPE_UNKNOWN: return NULL; } }
O3
cpp
ha_resolve_by_legacy_type(THD*, legacy_db_type): pushq %rbp movq %rsp, %rbp testl %esi, %esi je 0x99150b cmpl $0x7f, %esi jne 0x9914d3 movq 0xb30(%rdi), %rax testq %rax, %rax jne 0x991505 leaq 0xc13a3b(%rip), %rax # 0x15a4f00 movq 0x2f0(%rax), %rsi callq 0x7f4927 jmp 0x991505 leal -0x1(%rsi), %eax cmpl $0x7d, %eax ja 0x99150b movl %esi, %eax leaq 0xc4363c(%rip), %rcx # 0x15d4b20 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0x99150b movl 0x4(%rax), %eax leaq 0xc43409(%rip), %rcx # 0x15d4900 movq (%rcx,%rax,8), %rsi callq 0x7f4927 testq %rax, %rax je 0x99150b movq 0x38(%rax), %rax jmp 0x99150d xorl %eax, %eax popq %rbp retq
_Z25ha_resolve_by_legacy_typeP3THD14legacy_db_type: push rbp mov rbp, rsp test esi, esi jz short loc_99150B cmp esi, 7Fh jnz short loc_9914D3 mov rax, [rdi+0B30h] test rax, rax jnz short loc_991505 lea rax, global_system_variables mov rsi, [rax+2F0h] call _Z11plugin_lockP3THDP13st_plugin_int; plugin_lock(THD *,st_plugin_int *) jmp short loc_991505 loc_9914D3: lea eax, [rsi-1] cmp eax, 7Dh ; '}' ja short loc_99150B mov eax, esi lea rcx, _ZL15installed_htons; installed_htons mov rax, [rcx+rax*8] test rax, rax jz short loc_99150B mov eax, [rax+4] lea rcx, hton2plugin mov rsi, [rcx+rax*8] call _Z11plugin_lockP3THDP13st_plugin_int; plugin_lock(THD *,st_plugin_int *) test rax, rax jz short loc_99150B loc_991505: mov rax, [rax+38h] jmp short loc_99150D loc_99150B: xor eax, eax loc_99150D: pop rbp retn
long long ha_resolve_by_legacy_type(long long a1, int a2) { long long v2; // rax long long v3; // rax if ( a2 ) { if ( a2 == 127 ) { v2 = *(_QWORD *)(a1 + 2864); if ( !v2 ) v2 = plugin_lock(a1, *(_QWORD *)&global_system_variables[752]); return *(_QWORD *)(v2 + 56); } if ( (unsigned int)(a2 - 1) <= 0x7D ) { v3 = installed_htons[a2]; if ( v3 ) { v2 = plugin_lock(a1, hton2plugin[*(unsigned int *)(v3 + 4)]); if ( v2 ) return *(_QWORD *)(v2 + 56); } } } return 0LL; }
47,303
google::protobuf::internal::ExtensionSet::GetString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
const std::string& ExtensionSet::GetString( int number, const std::string& default_value) const { const Extension* extension = FindOrNull(number); if (extension == nullptr || extension->is_cleared) { // Not present. Return the default value. return default_value; } else { GOOGLE_DCHECK_TYPE(*extension, OPTIONAL_FIELD, STRING); return *extension->string_value; } }
O0
cpp
google::protobuf::internal::ExtensionSet::GetString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: subq $0xd8, %rsp movq %rdi, 0xc8(%rsp) movl %esi, 0xc4(%rsp) movq %rdx, 0xb8(%rsp) movq 0xc8(%rsp), %rdi movl 0xc4(%rsp), %esi callq 0x214b50 movq %rax, 0xb0(%rsp) cmpq $0x0, 0xb0(%rsp) je 0x222986 movq 0xb0(%rsp), %rax movb 0xa(%rax), %al andb $0xf, %al testb $0x1, %al je 0x22299b movq 0xb8(%rsp), %rax movq %rax, 0xd0(%rsp) jmp 0x222b20 jmp 0x22299d xorl %eax, %eax testb $0x1, %al jne 0x2229a8 jmp 0x222a5a movq 0xb0(%rsp), %rax movb 0x9(%rax), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movb $0x0, 0x77(%rsp) cmpl $0x1, %eax jne 0x2229cc jmp 0x222a1c leaq 0x1c7c95(%rip), %rdx # 0x3ea668 leaq 0x78(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x224, %ecx # imm = 0x224 callq 0x19a670 movq 0x10(%rsp), %rdi movb $0x1, 0x77(%rsp) leaq 0x1c7ea2(%rip), %rsi # 0x3ea89f callq 0x199f30 movq %rax, 0x18(%rsp) jmp 0x222a09 movq 0x18(%rsp), %rsi leaq 0x63(%rsp), %rdi callq 0x19a0e0 jmp 0x222a1a jmp 0x222a1c testb $0x1, 0x77(%rsp) jne 0x222a25 jmp 0x222a2f leaq 0x78(%rsp), %rdi callq 0x19a6b0 jmp 0x22299d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) testb $0x1, 0x77(%rsp) jne 0x222a4b jmp 0x222a55 leaq 0x78(%rsp), %rdi callq 0x19a6b0 jmp 0x222b30 jmp 0x222a5c xorl %eax, %eax testb $0x1, %al jne 0x222a67 jmp 0x222b0d movq 0xb0(%rsp), %rax movzbl 0x8(%rax), %edi callq 0x2155e0 movb $0x0, 0x27(%rsp) cmpl $0x9, %eax jne 0x222a84 jmp 0x222ad2 leaq 0x1c7bdd(%rip), %rdx # 0x3ea668 leaq 0x28(%rsp), %rdi movq %rdi, (%rsp) movl $0x3, %esi movl $0x224, %ecx # imm = 0x224 callq 0x19a670 movq (%rsp), %rdi movb $0x1, 0x27(%rsp) leaq 0x1c8443(%rip), %rsi # 0x3eaef6 callq 0x199f30 movq %rax, 0x8(%rsp) jmp 0x222abf movq 0x8(%rsp), %rsi leaq 0x26(%rsp), %rdi callq 0x19a0e0 jmp 0x222ad0 jmp 0x222ad2 testb $0x1, 0x27(%rsp) jne 0x222adb jmp 0x222ae5 leaq 0x28(%rsp), %rdi callq 0x19a6b0 jmp 0x222a5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) testb $0x1, 0x27(%rsp) jne 0x222b01 jmp 0x222b0b leaq 0x28(%rsp), %rdi callq 0x19a6b0 jmp 0x222b30 movq 0xb0(%rsp), %rax movq (%rax), %rax movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax addq $0xd8, %rsp retq movq 0x68(%rsp), %rdi callq 0x90db0 nopw (%rax,%rax)
_ZNK6google8protobuf8internal12ExtensionSet9GetStringEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0D8h mov [rsp+0D8h+var_10], rdi mov dword ptr [rsp+0D8h+var_14], esi mov [rsp+0D8h+var_20], rdx mov rdi, [rsp+0D8h+var_10]; this mov esi, dword ptr [rsp+0D8h+var_14]; unsigned __int8 call _ZNK6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int) mov [rsp+0D8h+var_28], rax cmp [rsp+0D8h+var_28], 0 jz short loc_222986 mov rax, [rsp+0D8h+var_28] mov al, [rax+0Ah] and al, 0Fh test al, 1 jz short loc_22299B loc_222986: mov rax, [rsp+0D8h+var_20] mov [rsp+0D8h+var_8], rax jmp loc_222B20 loc_22299B: jmp short $+2 loc_22299D: xor eax, eax test al, 1 jnz short loc_2229A8 jmp loc_222A5A loc_2229A8: mov rax, [rsp+0D8h+var_28] mov dl, [rax+9] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rsp+0D8h+var_61], 0 cmp eax, 1 jnz short loc_2229CC jmp short loc_222A1C loc_2229CC: lea rdx, aWorkspaceLlm4b_47; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0D8h+var_60] mov [rsp+0D8h+var_C8], rdi mov esi, 3 mov ecx, 224h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_61], 1 lea rsi, aCheckFailedExt_0; "CHECK failed: ((*extension).is_repeated"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0D8h+var_C0], rax jmp short $+2 loc_222A09: mov rsi, [rsp+0D8h+var_C0] lea rdi, [rsp+0D8h+var_75] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_222A1A: jmp short $+2 loc_222A1C: test [rsp+0D8h+var_61], 1 jnz short loc_222A25 jmp short loc_222A2F loc_222A25: lea rdi, [rsp+0D8h+var_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_222A2F: jmp loc_22299D mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax test [rsp+arg_6F], 1 jnz short loc_222A4B jmp short loc_222A55 loc_222A4B: lea rdi, [rsp+arg_70]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_222A55: jmp loc_222B30 loc_222A5A: jmp short $+2 loc_222A5C: xor eax, eax test al, 1 jnz short loc_222A67 jmp loc_222B0D loc_222A67: mov rax, [rsp+0D8h+var_28] movzx edi, byte ptr [rax+8]; this call _ZN6google8protobuf8internal12_GLOBAL__N_18cpp_typeEh; google::protobuf::internal::`anonymous namespace'::cpp_type(uchar) mov [rsp+0D8h+var_B1], 0 cmp eax, 9 jnz short loc_222A84 jmp short loc_222AD2 loc_222A84: lea rdx, aWorkspaceLlm4b_47; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_D8], rdi mov esi, 3 mov ecx, 224h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0D8h+var_D8] mov [rsp+0D8h+var_B1], 1 lea rsi, aCheckFailedCpp_15; "CHECK failed: (cpp_type((*extension).ty"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0D8h+var_D0], rax jmp short $+2 loc_222ABF: mov rsi, [rsp+0D8h+var_D0] lea rdi, [rsp+0D8h+var_B2] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_222AD0: jmp short $+2 loc_222AD2: test [rsp+0D8h+var_B1], 1 jnz short loc_222ADB jmp short loc_222AE5 loc_222ADB: lea rdi, [rsp+0D8h+var_B0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_222AE5: jmp loc_222A5C mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax test [rsp+arg_1F], 1 jnz short loc_222B01 jmp short loc_222B0B loc_222B01: lea rdi, [rsp+arg_20]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_222B0B: jmp short loc_222B30 loc_222B0D: mov rax, [rsp+0D8h+var_28] mov rax, [rax] mov [rsp+0D8h+var_8], rax loc_222B20: mov rax, [rsp+0D8h+var_8] add rsp, 0D8h retn loc_222B30: mov rdi, [rsp+arg_60] call __Unwind_Resume
long long google::protobuf::internal::ExtensionSet::GetString( google::protobuf::internal::ExtensionSet *a1, int a2, long long a3) { _BYTE *v4; // [rsp+B0h] [rbp-28h] long long v5; // [rsp+B8h] [rbp-20h] unsigned __int8 v6[4]; // [rsp+C4h] [rbp-14h] google::protobuf::internal::ExtensionSet *v7; // [rsp+C8h] [rbp-10h] v7 = a1; *(_DWORD *)v6 = a2; v5 = a3; v4 = google::protobuf::internal::ExtensionSet::FindOrNull(a1, a2); if ( v4 && (v4[10] & 1) == 0 ) return *(_QWORD *)v4; else return v5; }
_ZNSt12__shared_ptrIKN5aimrt9protocols6sensor17JointCommandArrayELN9__gnu_cxx12_Lock_policyE2EEC2IS4_ZZNS0_7channel9SubscribeITkSt12derived_fromIN6google8protobuf7MessageEES3_EEbNS9_13SubscriberRefEOSt8functionIFvRKSt10shared_ptrIKT_EEEENKUlPK28aimrt_channel_context_base_tPKvP21aimrt_function_base_tE_clESS_SU_SW_EUlPS4_E_vEEPSI_T0_: SUB RSP,0x78 MOV qword ptr [RSP + 0x8],RDX MOV RAX,RSI MOV RSI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x60],RSI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RSP + 0x68] MOV qword ptr [RAX],RCX ADD RAX,0x8 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x28],RDI CALL 0x00222900 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LAB_00222993: CALL 0x002229e0 LAB_00222998: JMP 0x0022299a LAB_0022299a: LEA RDI,[RSP + 0x40] CALL 0x00222850 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00222a70 ADD RSP,0x78 RET
void _ZNSt12__shared_ptrIKN5aimrt9protocols6sensor17JointCommandArrayELN9__gnu_cxx12_Lock_policyE2EEC2IS4_ZZNS0_7channel9SubscribeITkSt12derived_fromIN6google8protobuf7MessageEES3_EEbNS9_13SubscriberRefEOSt8functionIFvRKSt10shared_ptrIKT_EEEENKUlPK28aimrt_channel_context_base_tPKvP21aimrt_function_base_tE_clESS_SU_SW_EUlPS4_E_vEEPSI_T0_ (JointCommandArray *param_1,int8 param_2,int8 param_3) { int1 local_38 [32]; int8 local_18; int8 local_10; JointCommandArray *local_8; *(int8 *)param_1 = param_2; local_18 = param_3; local_10 = param_2; local_8 = param_1; _ZZZN5aimrt7channel9SubscribeITkSt12derived_fromIN6google8protobuf7MessageEENS_9protocols6sensor17JointCommandArrayEEEbNS0_13SubscriberRefEOSt8functionIFvRKSt10shared_ptrIKT_EEEENKUlPK28aimrt_channel_context_base_tPKvP21aimrt_function_base_tE_clESM_SO_SQ_ENUlPKS8_E_C2EOSU_ (); /* try { // try from 00222993 to 00222997 has its CatchHandler @ 002229b8 */ _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPKN5aimrt9protocols6sensor17JointCommandArrayEZZNS4_7channel9SubscribeITkSt12derived_fromIN6google8protobuf7MessageEES7_EEbNSA_13SubscriberRefEOSt8functionIFvRKSt10shared_ptrIKT_EEEENKUlPK28aimrt_channel_context_base_tPKvP21aimrt_function_base_tE_clEST_SV_SX_EUlS9_E_vEESJ_T0_ (param_1 + 8,param_2,local_38); _ZZZN5aimrt7channel9SubscribeITkSt12derived_fromIN6google8protobuf7MessageEENS_9protocols6sensor17JointCommandArrayEEEbNS0_13SubscriberRefEOSt8functionIFvRKSt10shared_ptrIKT_EEEENKUlPK28aimrt_channel_context_base_tPKvP21aimrt_function_base_tE_clESM_SO_SQ_ENUlPKS8_E_D2Ev (local_38); std::__shared_ptr<aimrt::protocols::sensor::JointCommandArray_const,(__gnu_cxx::_Lock_policy)2>:: _M_enable_shared_from_this_with<aimrt::protocols::sensor::JointCommandArray_const,aimrt::protocols::sensor::JointCommandArray> (param_1); return; }
47,304
my_numchars_mb
eloqsql/strings/ctype-mb.c
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end) { register size_t count= 0; while (pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; count++; } return count; }
O3
c
my_numchars_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq %rdx, %rsi jae 0xb36c1 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 xorl %r14d, %r14d movl $0x1, %r13d movq 0xb8(%r12), %rax movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r13d, %eax cmovll %r13d, %eax addq %rax, %r15 incq %r14 cmpq %rbx, %r15 jb 0xb3692 jmp 0xb36c4 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_numchars_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp rsi, rdx jnb short loc_B36C1 mov rbx, rdx mov r15, rsi mov r12, rdi xor r14d, r14d mov r13d, 1 loc_B3692: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r13d cmovl eax, r13d add r15, rax inc r14 cmp r15, rbx jb short loc_B3692 jmp short loc_B36C4 loc_B36C1: xor r14d, r14d loc_B36C4: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r15 long long v5; // r14 long long v6; // rax bool v7; // cc if ( a2 >= a3 ) return 0LL; v4 = a2; v5 = 0LL; do { v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, a3); v7 = (int)v6 < 2; if ( (unsigned int)v6 < 2 ) v6 = 1LL; if ( v7 ) v6 = 1LL; v4 += v6; ++v5; } while ( v4 < a3 ); return v5; }
my_numchars_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP RSI,RDX JNC 0x001b36c1 MOV RBX,RDX MOV R15,RSI MOV R12,RDI XOR R14D,R14D MOV R13D,0x1 LAB_001b3692: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R13D CMOVL EAX,R13D ADD R15,RAX INC R14 CMP R15,RBX JC 0x001b3692 JMP 0x001b36c4 LAB_001b36c1: XOR R14D,R14D LAB_001b36c4: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_numchars_mb(long param_1,ulong param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; if (param_2 < param_3) { lVar3 = 0; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } param_2 = param_2 + uVar2; lVar3 = lVar3 + 1; } while (param_2 < param_3); } else { lVar3 = 0; } return lVar3; }
47,305
R3D_SetLightTarget
r3d/src/r3d_lighting.c
void R3D_SetLightTarget(R3D_Light id, Vector3 target) { r3d_get_and_check_light(light, id); light->direction = Vector3Normalize(Vector3Subtract(target, light->position)); }
O3
c
R3D_SetLightTarget: pushq %rbp movq %rsp, %rbp movl %edi, %edx testl %edi, %edi je 0xbdef6 leaq 0xf1da4(%rip), %rsi # 0x1afc60 cmpl %edx, 0x168(%rsi) jbe 0xbdef6 movq 0x128(%rsi), %rcx leal -0x1(%rdx), %eax cmpb $0x1, (%rcx,%rax) jne 0xbdef6 movq 0x108(%rsi), %rcx cmpq %rax, 0x110(%rsi) setbe %dil testq %rcx, %rcx sete %r8b orb %dil, %r8b cmpb $0x1, %r8b jne 0xbdf0a leaq 0x53ee7(%rip), %rsi # 0x111de4 movl $0x5, %edi xorl %eax, %eax popq %rbp jmp 0xa9c09 imulq 0x120(%rsi), %rax movsd 0x74(%rcx,%rax), %xmm2 subps %xmm2, %xmm0 movaps %xmm0, %xmm2 shufps $0x55, %xmm0, %xmm2 # xmm2 = xmm2[1,1],xmm0[1,1] subss 0x7c(%rcx,%rax), %xmm1 movaps %xmm2, %xmm3 mulss %xmm2, %xmm3 movaps %xmm0, %xmm4 mulss %xmm0, %xmm4 addss %xmm3, %xmm4 movaps %xmm1, %xmm3 mulss %xmm1, %xmm3 addss %xmm4, %xmm3 sqrtss %xmm3, %xmm3 xorps %xmm4, %xmm4 ucomiss %xmm4, %xmm3 jne 0xbdf53 jnp 0xbdf6e movss 0x240a9(%rip), %xmm4 # 0xe2004 divss %xmm3, %xmm4 mulss %xmm4, %xmm0 mulss %xmm4, %xmm2 unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] mulss %xmm4, %xmm1 movlps %xmm0, 0x80(%rcx,%rax) movss %xmm1, 0x88(%rcx,%rax) popq %rbp retq
R3D_SetLightTarget: push rbp mov rbp, rsp mov edx, edi test edi, edi jz short loc_BDEF6 lea rsi, R3D cmp [rsi+168h], edx jbe short loc_BDEF6 mov rcx, [rsi+128h] lea eax, [rdx-1] cmp byte ptr [rcx+rax], 1 jnz short loc_BDEF6 mov rcx, [rsi+108h] cmp [rsi+110h], rax setbe dil test rcx, rcx setz r8b or r8b, dil cmp r8b, 1 jnz short loc_BDF0A loc_BDEF6: lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid" mov edi, 5 xor eax, eax pop rbp jmp TraceLog loc_BDF0A: imul rax, [rsi+120h] movsd xmm2, qword ptr [rcx+rax+74h] subps xmm0, xmm2 movaps xmm2, xmm0 shufps xmm2, xmm0, 55h ; 'U' subss xmm1, dword ptr [rcx+rax+7Ch] movaps xmm3, xmm2 mulss xmm3, xmm2 movaps xmm4, xmm0 mulss xmm4, xmm0 addss xmm4, xmm3 movaps xmm3, xmm1 mulss xmm3, xmm1 addss xmm3, xmm4 sqrtss xmm3, xmm3 xorps xmm4, xmm4 ucomiss xmm3, xmm4 jnz short loc_BDF53 jnp short loc_BDF6E loc_BDF53: movss xmm4, cs:dword_E2004 divss xmm4, xmm3 mulss xmm0, xmm4 mulss xmm2, xmm4 unpcklps xmm0, xmm2 mulss xmm1, xmm4 loc_BDF6E: movlps qword ptr [rcx+rax+80h], xmm0 movss dword ptr [rcx+rax+88h], xmm1 pop rbp retn
void R3D_SetLightTarget(unsigned int a1, __m128 a2, float a3) { unsigned long long v3; // rax long long v4; // rcx long long v5; // rax __m128 v6; // xmm0 __m128 v7; // xmm2 float v8; // xmm1_4 float v9; // xmm3_4 if ( a1 && *((_DWORD *)&R3D + 90) > a1 && (v3 = a1 - 1, *(_BYTE *)(*((_QWORD *)&R3D + 37) + v3) == 1) && (v4 = *((_QWORD *)&R3D + 33), *((_QWORD *)&R3D + 34) > v3 && v4 != 0) ) { v5 = *((_QWORD *)&R3D + 36) * v3; v6 = _mm_sub_ps(a2, (__m128)*(unsigned long long *)(v4 + v5 + 116)); v7 = _mm_shuffle_ps(v6, v6, 85); v8 = a3 - *(float *)(v4 + v5 + 124); v9 = fsqrt( (float)(v8 * v8) + (float)((float)(v6.m128_f32[0] * v6.m128_f32[0]) + (float)(v7.m128_f32[0] * v7.m128_f32[0]))); if ( v9 != 0.0 ) { v6.m128_f32[0] = v6.m128_f32[0] * (float)(1.0 / v9); v7.m128_f32[0] = v7.m128_f32[0] * (float)(1.0 / v9); v6 = _mm_unpacklo_ps(v6, v7); v8 = v8 * (float)(1.0 / v9); } _mm_storel_ps((double *)(v4 + v5 + 128), v6); *(float *)(v4 + v5 + 136) = v8; } else { TraceLog(5, (long long)"Light [ID %i] is not valid", a1); } }
R3D_SetLightTarget: PUSH RBP MOV RBP,RSP MOV EDX,EDI TEST EDI,EDI JZ 0x001bdef6 LEA RSI,[0x2afc60] CMP dword ptr [RSI + 0x168],EDX JBE 0x001bdef6 MOV RCX,qword ptr [RSI + 0x128] LEA EAX,[RDX + -0x1] CMP byte ptr [RCX + RAX*0x1],0x1 JNZ 0x001bdef6 MOV RCX,qword ptr [RSI + 0x108] CMP qword ptr [RSI + 0x110],RAX SETBE DIL TEST RCX,RCX SETZ R8B OR R8B,DIL CMP R8B,0x1 JNZ 0x001bdf0a LAB_001bdef6: LEA RSI,[0x211de4] MOV EDI,0x5 XOR EAX,EAX POP RBP JMP 0x001a9c09 LAB_001bdf0a: IMUL RAX,qword ptr [RSI + 0x120] MOVSD XMM2,qword ptr [RCX + RAX*0x1 + 0x74] SUBPS XMM0,XMM2 MOVAPS XMM2,XMM0 SHUFPS XMM2,XMM0,0x55 SUBSS XMM1,dword ptr [RCX + RAX*0x1 + 0x7c] MOVAPS XMM3,XMM2 MULSS XMM3,XMM2 MOVAPS XMM4,XMM0 MULSS XMM4,XMM0 ADDSS XMM4,XMM3 MOVAPS XMM3,XMM1 MULSS XMM3,XMM1 ADDSS XMM3,XMM4 SQRTSS XMM3,XMM3 XORPS XMM4,XMM4 UCOMISS XMM3,XMM4 JNZ 0x001bdf53 JNP 0x001bdf6e LAB_001bdf53: MOVSS XMM4,dword ptr [0x001e2004] DIVSS XMM4,XMM3 MULSS XMM0,XMM4 MULSS XMM2,XMM4 UNPCKLPS XMM0,XMM2 MULSS XMM1,XMM4 LAB_001bdf6e: MOVLPS qword ptr [RCX + RAX*0x1 + 0x80],XMM0 MOVSS dword ptr [RCX + RAX*0x1 + 0x88],XMM1 POP RBP RET
void R3D_SetLightTarget(int8 param_1,float param_2,uint param_3) { int8 uVar1; long lVar2; ulong uVar3; long lVar4; float fVar5; float fVar6; float fVar7; lVar2 = DAT_002afd68; if ((param_3 != 0) && (param_3 < DAT_002afdc8)) { uVar3 = (ulong)(param_3 - 1); if (*(char *)(DAT_002afd88 + uVar3) == '\x01') { if (DAT_002afd68 != 0 && uVar3 < DAT_002afd70) { lVar4 = uVar3 * DAT_002afd80; uVar1 = *(int8 *)(DAT_002afd68 + 0x74 + lVar4); fVar5 = (float)param_1 - (float)uVar1; fVar6 = (float)((ulong)param_1 >> 0x20) - (float)((ulong)uVar1 >> 0x20); param_2 = param_2 - *(float *)(DAT_002afd68 + 0x7c + lVar4); fVar7 = SQRT(param_2 * param_2 + fVar5 * fVar5 + fVar6 * fVar6); if ((fVar7 != 0.0) || (NAN(fVar7))) { fVar7 = DAT_001e2004 / fVar7; fVar5 = fVar5 * fVar7; fVar6 = fVar6 * fVar7; param_2 = param_2 * fVar7; } *(ulong *)(DAT_002afd68 + 0x80 + lVar4) = CONCAT44(fVar6,fVar5); *(float *)(lVar2 + 0x88 + lVar4) = param_2; return; } } } TraceLog(5,"Light [ID %i] is not valid"); return; }
47,306
mariadb_uncompress
eloqsql/libmariadb/libmariadb/ma_compress.c
my_bool _mariadb_uncompress (NET *net, unsigned char *packet, size_t *len, size_t *complen) { if (*complen) /* If compressed */ { unsigned char *compbuf = (unsigned char *) malloc (*complen); if (!compbuf) return 1; /* Not enough memory */ if (compression_plugin(net)->decompress(compression_ctx(net), compbuf, complen, packet, len)) { /* Probably wrong packet */ free(compbuf); return 1; } *len = *complen; memcpy(packet,compbuf,*len); free(compbuf); } else *complen= *len; return 0; }
O0
c
mariadb_uncompress: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0x2d27a movq -0x28(%rbp), %rax movq (%rax), %rdi callq 0x135b0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x2d206 movb $0x1, -0x1(%rbp) jmp 0x2d28c movq -0x10(%rbp), %rax movq 0x2a0(%rax), %rax movq 0x10(%rax), %rax movq 0x70(%rax), %rax movq -0x10(%rbp), %rcx movq 0x2a0(%rcx), %rcx movq 0x8(%rcx), %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq *%rax cmpb $0x0, %al je 0x2d24d movq -0x30(%rbp), %rdi callq 0x13520 movb $0x1, -0x1(%rbp) jmp 0x2d28c movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rax movq (%rax), %rdx callq 0x13360 movq -0x30(%rbp), %rdi callq 0x13520 jmp 0x2d288 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_mariadb_uncompress: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz loc_2D27A mov rax, [rbp+var_28] mov rdi, [rax] call _malloc mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_2D206 mov [rbp+var_1], 1 jmp loc_2D28C loc_2D206: mov rax, [rbp+var_10] mov rax, [rax+2A0h] mov rax, [rax+10h] mov rax, [rax+70h] mov rcx, [rbp+var_10] mov rcx, [rcx+2A0h] mov rdi, [rcx+8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call rax cmp al, 0 jz short loc_2D24D mov rdi, [rbp+var_30] call _free mov [rbp+var_1], 1 jmp short loc_2D28C loc_2D24D: mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_20] mov [rax], rcx mov rdi, [rbp+var_18] mov rsi, [rbp+var_30] mov rax, [rbp+var_20] mov rdx, [rax] call _memcpy mov rdi, [rbp+var_30] call _free jmp short loc_2D288 loc_2D27A: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx loc_2D288: mov [rbp+var_1], 0 loc_2D28C: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mariadb_uncompress(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-30h] if ( !*a4 ) { *a4 = *a3; return 0; } v5 = malloc(*a4); if ( v5 ) { if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD *))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) + 112LL))( *(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL), v5, a4, a2, a3) ) { free(v5); return 1; } *a3 = *a4; memcpy(a2, v5, *a3); free(v5); return 0; } return 1; }
_mariadb_uncompress: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x0012d27a MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] CALL 0x001135b0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0012d206 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012d28c LAB_0012d206: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2a0] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x2a0] MOV RDI,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL RAX CMP AL,0x0 JZ 0x0012d24d MOV RDI,qword ptr [RBP + -0x30] CALL 0x00113520 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012d28c LAB_0012d24d: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX] CALL 0x00113360 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00113520 JMP 0x0012d288 LAB_0012d27a: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX LAB_0012d288: MOV byte ptr [RBP + -0x1],0x0 LAB_0012d28c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 _mariadb_uncompress(long param_1,void *param_2,size_t *param_3,size_t *param_4) { char cVar1; void *__src; if (*param_4 == 0) { *param_4 = *param_3; } else { __src = malloc(*param_4); if (__src == (void *)0x0) { return 1; } cVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x70)) (*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),__src,param_4,param_2,param_3 ); if (cVar1 != '\0') { free(__src); return 1; } *param_3 = *param_4; memcpy(param_2,__src,*param_3); free(__src); } return 0; }
47,307
get_collation_name_alias
eloqsql/mysys/charset.c
static const char* get_collation_name_alias(const char *name, char *buf, size_t bufsize, myf flags) { if (!strncasecmp(name, "utf8_", 5)) { my_snprintf(buf, bufsize, "utf8mb%c_%s", flags & MY_UTF8_IS_UTF8MB3 ? '3' : '4', name + 5); return buf; } return NULL; }
O0
c
get_collation_name_alias: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi leaq 0x78287(%rip), %rsi # 0x15523a movl $0x5, %edx callq 0x2a740 cmpl $0x0, %eax jne 0xdd006 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx andq $0x400, %rdx # imm = 0x400 movl $0x34, %ecx movl $0x33, %eax cmpq $0x0, %rdx cmovnel %eax, %ecx movq -0x10(%rbp), %r8 addq $0x5, %r8 leaq 0x7824b(%rip), %rdx # 0x155240 movb $0x0, %al callq 0x14e6b0 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xdd00e movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
get_collation_name_alias: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] lea rsi, aUtf8_0; "utf8_" mov edx, 5 call _strncasecmp cmp eax, 0 jnz short loc_DD006 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] and rdx, 400h mov ecx, 34h ; '4' mov eax, 33h ; '3' cmp rdx, 0 cmovnz ecx, eax mov r8, [rbp+var_10] add r8, 5 lea rdx, aUtf8mbCS; "utf8mb%c_%s" mov al, 0 call my_snprintf mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_DD00E loc_DD006: mov [rbp+var_8], 0 loc_DD00E: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long get_collation_name_alias(long long a1, long long a2, int a3, __int16 a4) { int v4; // r9d int v5; // ecx if ( (unsigned int)strncasecmp(a1, "utf8_", 5LL) ) return 0LL; v5 = 52; if ( (a4 & 0x400) != 0 ) v5 = 51; my_snprintf(a2, a3, (unsigned int)"utf8mb%c_%s", v5, a1 + 5, v4); return a2; }
get_collation_name_alias: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x25523a] MOV EDX,0x5 CALL 0x0012a740 CMP EAX,0x0 JNZ 0x001dd006 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] AND RDX,0x400 MOV ECX,0x34 MOV EAX,0x33 CMP RDX,0x0 CMOVNZ ECX,EAX MOV R8,qword ptr [RBP + -0x10] ADD R8,0x5 LEA RDX,[0x255240] MOV AL,0x0 CALL 0x0024e6b0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001dd00e LAB_001dd006: MOV qword ptr [RBP + -0x8],0x0 LAB_001dd00e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int8 get_collation_name_alias(char *param_1,int8 param_2,int8 param_3,ulong param_4) { int iVar1; int8 uVar2; int8 local_10; iVar1 = strncasecmp(param_1,"utf8_",5); if (iVar1 == 0) { uVar2 = 0x34; if ((param_4 & 0x400) != 0) { uVar2 = 0x33; } my_snprintf(param_2,param_3,"utf8mb%c_%s",uVar2,param_1 + 5); local_10 = param_2; } else { local_10 = 0; } return local_10; }
47,308
my_hash_sort_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { /* Remove end space. We have to do this to be able to compare 'A ' and 'A' as identical */ const uchar *e= skip_trailing_space(s, slen); my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2); }
O3
c
my_hash_sort_utf8mb3: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r10 cmpq $0x15, %rdx jb 0x889a3 movq %r10, %r9 andq $-0x4, %r9 cmpq %rsi, %r9 jbe 0x889a3 leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r10, %rax movb -0x1(%r10), %r11b cmpq %r9, %r10 jbe 0x889c8 leaq -0x1(%rax), %r10 cmpb $0x20, %r11b je 0x8898b jmp 0x889a6 movq %r10, %rax movq %rax, %r9 subq %rsi, %r9 movq %r9, %rdx cmpq %rsi, %rax jbe 0x889c2 cmpb $0x20, -0x1(%rax) leaq -0x1(%rax), %rax leaq -0x1(%rdx), %r9 je 0x889ac popq %rbp jmp 0x88bad cmpb $0x20, %r11b setne %r10b cmpq %r9, %rdx setae %r9b orb %r10b, %r9b jne 0x889a6 movq %rax, %r9 movq %r9, %rax cmpq %rdx, %r9 jbe 0x889a6 leaq -0x4(%rax), %r9 cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0x889df jmp 0x889a6
my_hash_sort_utf8mb3: push rbp mov rbp, rsp lea r10, [rsi+rdx] cmp rdx, 15h jb short loc_889A3 mov r9, r10 and r9, 0FFFFFFFFFFFFFFFCh cmp r9, rsi jbe short loc_889A3 lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_8898B: mov rax, r10 mov r11b, [r10-1] cmp r10, r9 jbe short loc_889C8 lea r10, [rax-1] cmp r11b, 20h ; ' ' jz short loc_8898B jmp short loc_889A6 loc_889A3: mov rax, r10 loc_889A6: mov r9, rax sub r9, rsi loc_889AC: mov rdx, r9 cmp rax, rsi jbe short loc_889C2 cmp byte ptr [rax-1], 20h ; ' ' lea rax, [rax-1] lea r9, [rdx-1] jz short loc_889AC loc_889C2: pop rbp jmp my_hash_sort_utf8mb3_nopad loc_889C8: cmp r11b, 20h ; ' ' setnz r10b cmp rdx, r9 setnb r9b or r9b, r10b jnz short loc_889A6 mov r9, rax loc_889DF: mov rax, r9 cmp r9, rdx jbe short loc_889A6 lea r9, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_889DF jmp short loc_889A6
long long my_hash_sort_utf8mb3(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5) { unsigned long long v5; // r10 unsigned long long v6; // r9 unsigned long long v7; // rdx unsigned long long v8; // rax char v9; // r11 unsigned long long v10; // r9 unsigned long long v11; // rdx bool v12; // zf unsigned long long v14; // r9 v5 = a2 + a3; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) ) { v8 = a2 + a3; } else { v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v14 = v5; do { v8 = v14; if ( v14 <= v7 ) break; v14 -= 4LL; } while ( *(_DWORD *)(v8 - 4) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = v10; if ( v8 <= a2 ) break; v12 = *(_BYTE *)--v8 == 32; --v10; } while ( v12 ); return my_hash_sort_utf8mb3_nopad(a1, a2, v11, a4, a5, v10); }
my_hash_sort_utf8mb3: PUSH RBP MOV RBP,RSP LEA R10,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x001889a3 MOV R9,R10 AND R9,-0x4 CMP R9,RSI JBE 0x001889a3 LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_0018898b: MOV RAX,R10 MOV R11B,byte ptr [R10 + -0x1] CMP R10,R9 JBE 0x001889c8 LEA R10,[RAX + -0x1] CMP R11B,0x20 JZ 0x0018898b JMP 0x001889a6 LAB_001889a3: MOV RAX,R10 LAB_001889a6: MOV R9,RAX SUB R9,RSI LAB_001889ac: MOV RDX,R9 CMP RAX,RSI JBE 0x001889c2 CMP byte ptr [RAX + -0x1],0x20 LEA RAX,[RAX + -0x1] LEA R9,[RDX + -0x1] JZ 0x001889ac LAB_001889c2: POP RBP JMP 0x00188bad LAB_001889c8: CMP R11B,0x20 SETNZ R10B CMP RDX,R9 SETNC R9B OR R9B,R10B JNZ 0x001889a6 MOV R9,RAX LAB_001889df: MOV RAX,R9 CMP R9,RDX JBE 0x001889a6 LEA R9,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x001889df JMP 0x001889a6
void my_hash_sort_utf8mb3(int8 param_1,ulong param_2,ulong param_3) { char *pcVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar3 = param_2 + param_3; if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) { uVar4 = param_2 + 3 & 0xfffffffffffffffc; uVar2 = uVar3; do { uVar3 = uVar2; if (uVar3 <= uVar5) { uVar2 = uVar3; if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_001889df; break; } uVar2 = uVar3 - 1; } while (*(char *)(uVar3 - 1) == ' '); } goto LAB_001889ac; while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) { LAB_001889df: uVar3 = uVar2; if (uVar3 <= uVar4) break; } LAB_001889ac: do { if (uVar3 <= param_2) break; pcVar1 = (char *)(uVar3 - 1); uVar3 = uVar3 - 1; } while (*pcVar1 == ' '); my_hash_sort_utf8mb3_nopad(); return; }
47,309
google::protobuf::EnumOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumOptions>(google::protobuf::Arena*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::EnumOptions* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::EnumOptions >(Arena* arena) { return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::EnumOptions >(arena); }
O0
cpp
google::protobuf::EnumOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumOptions>(google::protobuf::Arena*): subq $0xb8, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0xd292f movl $0x50, %edi callq 0x13450 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) xorl %edx, %edx movl %edx, %esi callq 0xc43d0 jmp 0xd2920 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) callq 0x13400 movq 0x38(%rsp), %rdi callq 0x13750 movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) jmp 0xd2ae3 movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, (%rsp) movq %rax, 0x98(%rsp) movq $0x50, 0x90(%rsp) movq $0x8, 0x88(%rsp) movq $0x0, 0x80(%rsp) leaq 0x1a689b(%rip), %rax # 0x279210 movq %rax, 0x78(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x80(%rsp) jne 0xd29be movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x78(%rsp), %rcx callq 0xdf5f0 movq %rax, 0xa0(%rsp) jmp 0xd2ac3 cmpq $0x8, 0x88(%rsp) ja 0xd2a22 movq 0x90(%rsp), %rdi callq 0xdf6a0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x78(%rsp), %rdx callq 0x1816c0 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x68(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0xd2ac3 movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi addq 0x88(%rsp), %rsi subq $0x8, %rsi movq 0x78(%rsp), %rdx callq 0x1816c0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x88(%rsp), %rax movq %rcx, 0xb0(%rsp) movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax addq 0xa8(%rsp), %rax subq $0x1, %rax movq 0xa8(%rsp), %rcx xorq $-0x1, %rcx addq $0x1, %rcx andq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x50(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rsp), %rax movq 0xa0(%rsp), %rdi movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rsi callq 0xe3e10 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax addq $0xb8, %rsp retq
_ZN6google8protobuf5Arena18CreateMaybeMessageINS0_11EnumOptionsEJEEEPT_PS1_DpOT0_: sub rsp, 0B8h mov [rsp+0B8h+var_A0], rdi mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_98], rax cmp [rsp+0B8h+var_98], 0 jnz short loc_D292F mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_A8], rax xor edx, edx; bool mov esi, edx; google::protobuf::Arena * call _ZN6google8protobuf11EnumOptionsC2EPNS0_5ArenaEb; google::protobuf::EnumOptions::EnumOptions(google::protobuf::Arena *,bool) jmp short loc_D2920 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax call __ZdlPv; operator delete(void *) mov rdi, [rsp+arg_30] call __Unwind_Resume loc_D2920: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_90], rax jmp loc_D2AE3 loc_D292F: mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_70], rax mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_B8], rax mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 50h ; 'P' mov [rsp+0B8h+var_30], 8 mov [rsp+0B8h+var_38], 0 lea rax, _ZTIN6google8protobuf11EnumOptionsE; `typeinfo for'google::protobuf::EnumOptions mov [rsp+0B8h+var_40], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_B0], rax cmp [rsp+0B8h+var_38], 0 jnz short loc_D29BE mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28]; unsigned __int64 mov rdx, [rsp+0B8h+var_30]; unsigned __int64 mov rcx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,ulong,std::type_info const*) mov [rsp+0B8h+var_18], rax jmp loc_D2AC3 loc_D29BE: cmp [rsp+0B8h+var_30], 8 ja short loc_D2A22 mov rdi, [rsp+0B8h+var_28]; this call _ZN6google8protobuf8internal10AlignUpTo8Em; google::protobuf::internal::AlignUpTo8(ulong) mov rdi, [rsp+0B8h+var_B0]; this mov rsi, rax; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_50], rax mov [rsp+0B8h+var_48], rdx mov rcx, [rsp+0B8h+var_50] mov rax, [rsp+0B8h+var_48] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_48] mov [rax+8], rcx mov rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_18], rax jmp loc_D2AC3 loc_D2A22: mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28] add rsi, [rsp+0B8h+var_30] sub rsi, 8; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_60], rax mov [rsp+0B8h+var_58], rdx mov rcx, [rsp+0B8h+var_60] mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_8], rcx mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_8] add rax, [rsp+0B8h+var_10] sub rax, 1 mov rcx, [rsp+0B8h+var_10] xor rcx, 0FFFFFFFFFFFFFFFFh add rcx, 1 and rax, rcx mov [rsp+0B8h+var_68], rax mov rcx, [rsp+0B8h+var_68] mov rax, [rsp+0B8h+var_58] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_58] mov [rax+8], rcx mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_18], rax loc_D2AC3: mov rax, [rsp+0B8h+var_B8] mov rdi, [rsp+0B8h+var_18] mov [rsp+0B8h+var_78], rax lea rsi, [rsp+0B8h+var_78] call _ZN6google8protobuf5Arena14InternalHelperINS0_11EnumOptionsEE9ConstructIJPS1_EEEPS3_PvDpOT_; google::protobuf::Arena::InternalHelper<google::protobuf::EnumOptions>::Construct<google::protobuf::Arena*>(void *,google::protobuf::Arena* &&) mov [rsp+0B8h+var_90], rax loc_D2AE3: mov rax, [rsp+0B8h+var_90] add rsp, 0B8h retn
google::protobuf::EnumOptions * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumOptions>( google::protobuf::Arena *a1) { google::protobuf::EnumOptions *v2; // [rsp+10h] [rbp-A8h] _QWORD v4[12]; // [rsp+40h] [rbp-78h] BYREF long long AlignedWithHook; // [rsp+A0h] [rbp-18h] if ( a1 ) { v4[1] = a1; v4[11] = a1; v4[10] = 80LL; v4[9] = 8LL; v4[8] = 0LL; v4[7] = &`typeinfo for'google::protobuf::EnumOptions; AlignedWithHook = google::protobuf::Arena::AllocateAlignedWithHook( a1, 0x50uLL, 8uLL, (const type_info *)&`typeinfo for'google::protobuf::EnumOptions); v4[0] = a1; return (google::protobuf::EnumOptions *)google::protobuf::Arena::InternalHelper<google::protobuf::EnumOptions>::Construct<google::protobuf::Arena*>( AlignedWithHook, v4); } else { v2 = (google::protobuf::EnumOptions *)operator new(0x50uLL); google::protobuf::EnumOptions::EnumOptions(v2, 0LL, 0); return v2; } }
CreateMaybeMessage<google::protobuf::EnumOptions>: SUB RSP,0xb8 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001d292f MOV EDI,0x50 CALL 0x00113450 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX LAB_001d28f3: XOR EDX,EDX MOV ESI,EDX CALL 0x001c43d0 LAB_001d28fc: JMP 0x001d2920 LAB_001d2920: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX JMP 0x001d2ae3 LAB_001d292f: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0x90],0x50 MOV qword ptr [RSP + 0x88],0x8 MOV qword ptr [RSP + 0x80],0x0 LEA RAX,[0x379210] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x80],0x0 JNZ 0x001d29be MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x78] CALL 0x001df5f0 MOV qword ptr [RSP + 0xa0],RAX JMP 0x001d2ac3 LAB_001d29be: CMP qword ptr [RSP + 0x88],0x8 JA 0x001d2a22 MOV RDI,qword ptr [RSP + 0x90] CALL 0x001df6a0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x78] CALL 0x002816c0 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xa0],RAX JMP 0x001d2ac3 LAB_001d2a22: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] ADD RSI,qword ptr [RSP + 0x88] SUB RSI,0x8 MOV RDX,qword ptr [RSP + 0x78] CALL 0x002816c0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] ADD RAX,qword ptr [RSP + 0xa8] SUB RAX,0x1 MOV RCX,qword ptr [RSP + 0xa8] XOR RCX,-0x1 ADD RCX,0x1 AND RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa0],RAX LAB_001d2ac3: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x40],RAX LEA RSI,[RSP + 0x40] CALL 0x001e3e10 MOV qword ptr [RSP + 0x28],RAX LAB_001d2ae3: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0xb8 RET
/* WARNING: Removing unreachable block (ram,0x001d29be) */ /* WARNING: Removing unreachable block (ram,0x001d29c9) */ /* WARNING: Removing unreachable block (ram,0x001d2a22) */ /* google::protobuf::EnumOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumOptions>(google::protobuf::Arena*) */ EnumOptions * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumOptions>(Arena *param_1) { EnumOptions *local_90; Arena *local_78; Arena *local_70; pointer_____offset_0x10___ *local_40; int8 local_38; int8 local_30; int8 local_28; Arena *local_20; void *local_18; if (param_1 == (Arena *)0x0) { local_90 = (EnumOptions *)operator_new(0x50); /* try { // try from 001d28f3 to 001d28fb has its CatchHandler @ 001d28fe */ EnumOptions::EnumOptions(local_90,(Arena *)0x0,false); } else { local_28 = 0x50; local_30 = 8; local_38 = 0; local_40 = &EnumOptions::typeinfo; local_70 = param_1; local_20 = param_1; local_18 = (void *)AllocateAlignedWithHook(param_1,0x50,8,(type_info *)&EnumOptions::typeinfo); local_78 = param_1; local_90 = InternalHelper<google::protobuf::EnumOptions>::Construct<google::protobuf::Arena*> (local_18,&local_78); } return local_90; }
47,310
GetColor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Color GetColor(unsigned int hexValue) { Color color; color.r = (unsigned char)(hexValue >> 24) & 0xFF; color.g = (unsigned char)(hexValue >> 16) & 0xFF; color.b = (unsigned char)(hexValue >> 8) & 0xFF; color.a = (unsigned char)hexValue & 0xFF; return color; }
O1
c
GetColor: movl %edi, %eax bswapl %eax retq
GetColor: mov eax, edi bswap eax retn
long long GetColor(unsigned int a1) { return _byteswap_ulong(a1); }
GetColor: MOV EAX,EDI BSWAP EAX RET
uint GetColor(uint param_1) { return param_1 >> 0x18 | (param_1 & 0xff0000) >> 8 | (param_1 & 0xff00) << 8 | param_1 << 0x18; }
47,311
bitmap_exists_intersection
eloqsql/mysys/my_bitmap.c
my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array, uint bitmap_count, uint start_bit, uint end_bit) { uint i, j, start_idx, end_idx; my_bitmap_map cur_res; DBUG_ASSERT(bitmap_count); DBUG_ASSERT(end_bit >= start_bit); for (j= 0; j < bitmap_count; j++) DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits); start_idx= start_bit/8/sizeof(my_bitmap_map); end_idx= end_bit/8/sizeof(my_bitmap_map); for (i= start_idx; i < end_idx; i++) { cur_res= ~0; for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[i]; if (cur_res) return TRUE; } cur_res= ~last_word_mask(end_bit); for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[end_idx]; return cur_res != 0; }
O0
c
bitmap_exists_intersection: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) jmp 0xeea67 jmp 0xeea69 jmp 0xeea6b movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xeea8b jmp 0xeea7c jmp 0xeea7e jmp 0xeea80 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xeea72 movl -0x18(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x28(%rbp) movl -0x1c(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x2c(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x2c(%rbp), %eax jae 0xeeb23 movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x31(%rbp) je 0xeeadc movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al testb $0x1, %al jne 0xeeae5 jmp 0xeeb0a movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xeeac5 cmpl $0x0, -0x30(%rbp) je 0xeeb16 movb $0x1, -0x1(%rbp) jmp 0xeeb8c jmp 0xeeb18 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0xeeaaf movl -0x1c(%rbp), %edi callq 0xeeba0 xorl $-0x1, %eax movl %eax, -0x30(%rbp) movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x32(%rbp) je 0xeeb4f movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x32(%rbp) movb -0x32(%rbp), %al testb $0x1, %al jne 0xeeb58 jmp 0xeeb7d movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xeeb38 cmpl $0x0, -0x30(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_exists_intersection: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx jmp short $+2 loc_EEA67: jmp short $+2 loc_EEA69: jmp short $+2 loc_EEA6B: mov [rbp+var_24], 0 loc_EEA72: mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_EEA8B jmp short $+2 loc_EEA7C: jmp short $+2 loc_EEA7E: jmp short $+2 loc_EEA80: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EEA72 loc_EEA8B: mov eax, [rbp+var_18] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_28], eax mov eax, [rbp+var_1C] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_2C], eax mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_EEAAF: mov eax, [rbp+var_20] cmp eax, [rbp+var_2C] jnb short loc_EEB23 mov [rbp+var_30], 0FFFFFFFFh mov [rbp+var_24], 0 loc_EEAC5: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_31], al jz short loc_EEADC mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_31], al loc_EEADC: mov al, [rbp+var_31] test al, 1 jnz short loc_EEAE5 jmp short loc_EEB0A loc_EEAE5: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_20] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EEAC5 loc_EEB0A: cmp [rbp+var_30], 0 jz short loc_EEB16 mov [rbp+var_1], 1 jmp short loc_EEB8C loc_EEB16: jmp short $+2 loc_EEB18: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_EEAAF loc_EEB23: mov edi, [rbp+var_1C] call last_word_mask xor eax, 0FFFFFFFFh mov [rbp+var_30], eax mov [rbp+var_24], 0 loc_EEB38: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_32], al jz short loc_EEB4F mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_32], al loc_EEB4F: mov al, [rbp+var_32] test al, 1 jnz short loc_EEB58 jmp short loc_EEB7D loc_EEB58: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_2C] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_EEB38 loc_EEB7D: cmp [rbp+var_30], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_EEB8C: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4) { bool v5; // [rsp+Eh] [rbp-32h] bool v6; // [rsp+Fh] [rbp-31h] int v7; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+10h] [rbp-30h] unsigned int v9; // [rsp+14h] [rbp-2Ch] unsigned int i; // [rsp+1Ch] [rbp-24h] unsigned int k; // [rsp+1Ch] [rbp-24h] unsigned int m; // [rsp+1Ch] [rbp-24h] unsigned int j; // [rsp+20h] [rbp-20h] for ( i = 0; i < a2; ++i ) ; v9 = a4 >> 5; for ( j = a3 >> 5; j < v9; ++j ) { v7 = -1; for ( k = 0; ; ++k ) { v6 = 0; if ( v7 ) v6 = k < a2; if ( !v6 ) break; v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * k) + 4LL * j); } if ( v7 ) return 1; } v8 = ~(unsigned int)last_word_mask(a4); for ( m = 0; ; ++m ) { v5 = 0; if ( v8 ) v5 = m < a2; if ( !v5 ) break; v8 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * m) + 4LL * v9); } return v8 != 0; }
bitmap_exists_intersection: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX JMP 0x001eea67 LAB_001eea67: JMP 0x001eea69 LAB_001eea69: JMP 0x001eea6b LAB_001eea6b: MOV dword ptr [RBP + -0x24],0x0 LAB_001eea72: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001eea8b JMP 0x001eea7c LAB_001eea7c: JMP 0x001eea7e LAB_001eea7e: JMP 0x001eea80 LAB_001eea80: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001eea72 LAB_001eea8b: MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001eeaaf: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x2c] JNC 0x001eeb23 MOV dword ptr [RBP + -0x30],0xffffffff MOV dword ptr [RBP + -0x24],0x0 LAB_001eeac5: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x31],AL JZ 0x001eeadc MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x31],AL LAB_001eeadc: MOV AL,byte ptr [RBP + -0x31] TEST AL,0x1 JNZ 0x001eeae5 JMP 0x001eeb0a LAB_001eeae5: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001eeac5 LAB_001eeb0a: CMP dword ptr [RBP + -0x30],0x0 JZ 0x001eeb16 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001eeb8c LAB_001eeb16: JMP 0x001eeb18 LAB_001eeb18: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001eeaaf LAB_001eeb23: MOV EDI,dword ptr [RBP + -0x1c] CALL 0x001eeba0 XOR EAX,0xffffffff MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x24],0x0 LAB_001eeb38: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x32],AL JZ 0x001eeb4f MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x32],AL LAB_001eeb4f: MOV AL,byte ptr [RBP + -0x32] TEST AL,0x1 JNZ 0x001eeb58 JMP 0x001eeb7d LAB_001eeb58: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001eeb38 LAB_001eeb7d: CMP dword ptr [RBP + -0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001eeb8c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int8 bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4) { uint3 uVar1; uint7 uVar2; ulong uVar3; uint local_38; uint local_2c; uint local_28; bool local_9; for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) { } local_28 = param_3 >> 5; do { if (param_4 >> 5 <= local_28) { local_38 = last_word_mask(param_4); local_2c = 0; for (local_38 = local_38 ^ 0xffffffff; local_38 != 0 && local_2c < param_2; local_38 = *(uint *)(**(long **)(param_1 + uVar3 * 8) + (ulong)(param_4 >> 5) * 4) & local_38) { uVar3 = (ulong)local_2c; local_2c = local_2c + 1; } local_9 = local_38 != 0; uVar2 = 0; LAB_001eeb8c: return CONCAT71(uVar2,local_9); } local_38 = 0xffffffff; local_2c = 0; while( true ) { uVar1 = 0; if (local_38 != 0) { uVar1 = (uint3)(local_2c >> 8); } uVar2 = (uint7)uVar1; if (local_38 == 0 || param_2 <= local_2c) break; local_38 = *(uint *)(**(long **)(param_1 + (ulong)local_2c * 8) + (ulong)local_28 * 4) & local_38; local_2c = local_2c + 1; } if (local_38 != 0) { local_9 = true; goto LAB_001eeb8c; } local_28 = local_28 + 1; } while( true ); }
47,312
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O0
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4a890 cmpb $0x0, %al je 0x4bd27 movb $0x1, -0x1(%rbp) jmp 0x4bd4f movq -0x10(%rbp), %rdi callq 0x56880 cmpb $0x0, %al je 0x4bd4b movq -0x10(%rbp), %rdi leaq 0x275b81(%rip), %rsi # 0x2c18c0 leaq 0x275b9a(%rip), %rdx # 0x2c18e0 callq 0x568e0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_4BD27 mov [rbp+var_1], 1 jmp short loc_4BD4F loc_4BD27: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_4BD4B mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb3 lea rdx, my_uca_package_no_contractions_utf8mb3 call my_uca_handler_map loc_4BD4B: mov [rbp+var_1], 0 loc_4BD4F: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb3(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3); return 0; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014a890 CMP AL,0x0 JZ 0x0014bd27 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014bd4f LAB_0014bd27: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00156880 CMP AL,0x0 JZ 0x0014bd4b MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x3c18c0] LEA RDX,[0x3c18e0] CALL 0x001568e0 LAB_0014bd4b: MOV byte ptr [RBP + -0x1],0x0 LAB_0014bd4f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3); } local_9 = 0; } else { local_9 = 1; } return local_9; }
47,313
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; }
O0
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x4be7d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x4be65 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x4bf14 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4bf14 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x4be9e movq -0x18(%rbp), %rcx leaq 0x8171e(%rip), %rax # 0xcd5b0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x4bea7 movl $0x0, -0x4(%rbp) jmp 0x4bf14 cmpl $0xff, -0x2c(%rbp) jg 0x4bed7 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x4bec3 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x4bf14 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4bf14 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x4beee movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x4bf14 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_wc_mb_cp932: 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_18] cmp eax, 80h jge short loc_4BE7D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_4BE65 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_4BF14 loc_4BE65: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_4BF14 loc_4BE7D: cmp [rbp+var_18], 0FFFFh ja short loc_4BE9E mov rcx, [rbp+var_18] lea rax, unicode_to_cp932 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_4BEA7 loc_4BE9E: mov [rbp+var_4], 0 jmp short loc_4BF14 loc_4BEA7: cmp [rbp+var_2C], 0FFh jg short loc_4BED7 mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_4BEC3 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_4BF14 loc_4BEC3: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_4BF14 loc_4BED7: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_4BEEE mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_4BF14 loc_4BEEE: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_4BF14: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 ) { if ( unicode_to_cp932[a2] > 0xFFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_cp932: 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 + -0x18] CMP EAX,0x80 JGE 0x0014be7d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0014be65 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0014bf14 LAB_0014be65: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014bf14 LAB_0014be7d: CMP qword ptr [RBP + -0x18],0xffff JA 0x0014be9e MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x1cd5b0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0014bea7 LAB_0014be9e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014bf14 LAB_0014bea7: CMP dword ptr [RBP + -0x2c],0xff JG 0x0014bed7 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0014bec3 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0014bf14 LAB_0014bec3: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014bf14 LAB_0014bed7: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0014beee MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0014bf14 LAB_0014beee: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_0014bf14: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_cp932(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort uVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if ((param_2 < 0x10000) && (uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2), uVar1 != 0)) { if (uVar1 < 0x100) { if (param_3 < param_4) { *param_3 = (char)uVar1; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(uVar1 >> 8); param_3[1] = (char)uVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
47,314
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>>>>>::reset()
monkey531[P]llama/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax andq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x430b2 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x3909e popq %rax retq movq %rax, %rdi callq 0x23170 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi and qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_430B2 mov [rax+40h], rcx loc_430B2: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI AND qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x001430b2 MOV qword ptr [RAX + 0x40],RCX LAB_001430b2: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_001430bc: CALL 0x0013909e POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 001430bc to 001430c0 has its CatchHandler @ 001430c3 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
47,315
fmt_size(unsigned long)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static char * fmt_size(size_t size) { static char buffer[128]; if (size >= 1024*1024) { snprintf(buffer, sizeof(buffer), "%zuM", size/1024/1024); } else { snprintf(buffer, sizeof(buffer), "%zuK", size/1024); } return buffer; }
O1
cpp
fmt_size(unsigned long): movq %rdi, %rax cmpq $0x100000, %rdi # imm = 0x100000 leaq 0x25872(%rip), %rcx # 0x50352 leaq 0x25870(%rip), %rdx # 0x50357 cmovaeq %rcx, %rdx movl $0x14, %esi movl $0xa, %ecx cmovael %esi, %ecx shrq %cl, %rax leaq 0x8471e(%rip), %rdi # 0xaf220 movl $0x80, %esi movq %rax, %rcx xorl %eax, %eax jmp 0x18b20
_ZL8fmt_sizem: mov rax, rdi cmp rdi, 100000h lea rcx, aZum; "%zuM" lea rdx, aZuk; "%zuK" cmovnb rdx, rcx mov esi, 14h mov ecx, 0Ah cmovnb ecx, esi shr rax, cl lea rdi, _ZZL8fmt_sizemE6buffer; fmt_size(ulong)::buffer mov esi, 80h mov rcx, rax xor eax, eax jmp _snprintf
long long fmt_size(unsigned long long a1) { const char *v1; // rdx char v2; // cl v1 = "%zuK"; if ( a1 >= 0x100000 ) v1 = "%zuM"; v2 = 10; if ( a1 >= 0x100000 ) v2 = 20; return snprintf(&fmt_size(unsigned long)::buffer, 128LL, v1, a1 >> v2); }
fmt_size: MOV RAX,RDI CMP RDI,0x100000 LEA RCX,[0x150352] LEA RDX,[0x150357] CMOVNC RDX,RCX MOV ESI,0x14 MOV ECX,0xa CMOVNC ECX,ESI SHR RAX,CL LEA RDI,[0x1af220] MOV ESI,0x80 MOV RCX,RAX XOR EAX,EAX JMP 0x00118b20
/* fmt_size(unsigned long) */ void fmt_size(ulong param_1) { sbyte sVar1; char *__format; __format = "%zuK"; if (0xfffff < param_1) { __format = "%zuM"; } sVar1 = 10; if (0xfffff < param_1) { sVar1 = 0x14; } snprintf(fmt_size(unsigned_long)::buffer,0x80,__format,param_1 >> sVar1); return; }
47,316
fmt_size(unsigned long)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static char * fmt_size(size_t size) { static char buffer[128]; if (size >= 1024*1024) { snprintf(buffer, sizeof(buffer), "%zuM", size/1024/1024); } else { snprintf(buffer, sizeof(buffer), "%zuK", size/1024); } return buffer; }
O2
cpp
fmt_size(unsigned long): movq %rdi, %rax cmpq $0x100000, %rdi # imm = 0x100000 leaq 0x2372e(%rip), %rcx # 0x52362 leaq 0x2372c(%rip), %rdx # 0x52367 cmovaeq %rcx, %rdx pushq $0x14 popq %rsi pushq $0xa popq %rcx cmovael %esi, %ecx shrq %cl, %rax leaq 0x85dae(%rip), %rdi # 0xb4a00 movl $0x80, %esi movq %rax, %rcx xorl %eax, %eax jmp 0x1f740
_ZL8fmt_sizem: mov rax, rdi cmp rdi, 100000h lea rcx, aZum; "%zuM" lea rdx, aZuk; "%zuK" cmovnb rdx, rcx push 14h pop rsi push 0Ah pop rcx cmovnb ecx, esi shr rax, cl lea rdi, _ZZL8fmt_sizemE6buffer; fmt_size(ulong)::buffer mov esi, 80h mov rcx, rax xor eax, eax jmp _snprintf
long long fmt_size(unsigned long long a1) { const char *v1; // rdx char v2; // cl v1 = "%zuK"; if ( a1 >= 0x100000 ) v1 = "%zuM"; v2 = 10; if ( a1 >= 0x100000 ) v2 = 20; return snprintf(&fmt_size(unsigned long)::buffer, 128LL, v1, a1 >> v2); }
fmt_size: MOV RAX,RDI CMP RDI,0x100000 LEA RCX,[0x152362] LEA RDX,[0x152367] CMOVNC RDX,RCX PUSH 0x14 POP RSI PUSH 0xa POP RCX CMOVNC ECX,ESI SHR RAX,CL LEA RDI,[0x1b4a00] MOV ESI,0x80 MOV RCX,RAX XOR EAX,EAX JMP 0x0011f740
/* fmt_size(unsigned long) */ void fmt_size(ulong param_1) { sbyte sVar1; char *__format; __format = "%zuK"; if (0xfffff < param_1) { __format = "%zuM"; } sVar1 = 10; if (0xfffff < param_1) { sVar1 = 0x14; } snprintf(fmt_size(unsigned_long)::buffer,0x80,__format,param_1 >> sVar1); return; }
47,317
maria_init_bulk_insert
eloqsql/storage/maria/ma_write.c
int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows) { MARIA_SHARE *share= info->s; MARIA_KEYDEF *key=share->keyinfo; bulk_insert_param *params; uint i, num_keys, total_keylength; ulonglong key_map; DBUG_ENTER("_ma_init_bulk_insert"); DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size)); DBUG_ASSERT(!info->bulk_insert && (!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT)); maria_clear_all_keys_active(key_map); for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++) { if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) && maria_is_key_active(share->state.key_map, i)) { num_keys++; maria_set_key_active(key_map, i); total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE; } } if (num_keys==0 || num_keys * (size_t) MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size) DBUG_RETURN(0); if (rows && rows*total_keylength < cache_size) cache_size= (size_t)rows; else cache_size/=total_keylength*16; info->bulk_insert=(TREE *) my_malloc(PSI_INSTRUMENT_ME, (sizeof(TREE)*share->base.keys+ sizeof(bulk_insert_param)*num_keys),MYF(0)); if (!info->bulk_insert) DBUG_RETURN(HA_ERR_OUT_OF_MEM); params=(bulk_insert_param *)(info->bulk_insert+share->base.keys); for (i=0 ; i < share->base.keys ; i++) { if (maria_is_key_active(key_map, i)) { params->info=info; params->keynr=i; /* Only allocate a 16'th of the buffer at a time */ init_tree(&info->bulk_insert[i], cache_size * key[i].maxlength, cache_size * key[i].maxlength, 0, (qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0)); } else info->bulk_insert[i].root=0; } DBUG_RETURN(0); }
O3
c
maria_init_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x30(%rbp) movq (%rdi), %r13 movl 0x3e8(%r13), %edi testq %rdi, %rdi je 0x66ca6 movq %rdx, %rbx movq 0x570(%r13), %r14 xorl %ecx, %ecx xorl %r15d, %r15d xorl %r8d, %r8d xorl %eax, %eax imulq $0x118, %rcx, %r9 # imm = 0x118 testb $0x1, 0xa2(%r14,%r9) jne 0x66b7b movl 0x3ec(%r13), %r10d leaq 0x1(%rcx), %rdx cmpq %r10, %rdx je 0x66b81 movq 0x140(%r13), %r11 movl $0x1, %r10d shlq %cl, %r10 btq %rcx, %r11 jae 0x66b81 addq %r14, %r9 incl %eax orq %r10, %r15 movzwl 0xae(%r9), %ecx addl %ecx, %r8d addl $0x20, %r8d jmp 0x66b81 incq %rcx movq %rcx, %rdx movq %rdx, %rcx cmpq %rdi, %rdx jne 0x66b2a xorl %r12d, %r12d testl %eax, %eax je 0x66ca9 movq %r15, -0x40(%rbp) movl %eax, %ecx movq %rcx, %rax shlq $0xe, %rax cmpq %rsi, %rax ja 0x66ca9 testq %rbx, %rbx je 0x66bbb movl %r8d, %eax imulq %rbx, %rax cmpq %rsi, %rax jb 0x66bca shll $0x4, %r8d movq %rsi, %rax xorl %edx, %edx divq %r8 movq %rax, %rbx imulq $0x298, %rdi, %rax # imm = 0x298 shlq $0x4, %rcx addq %rax, %rcx xorl %r12d, %r12d xorl %edi, %edi movq %rcx, %rsi xorl %edx, %edx callq 0x9fd89 movq %rax, %r15 movq -0x30(%rbp), %rax movq %r15, 0x310(%rax) testq %r15, %r15 je 0x66cbb movl 0x3e8(%r13), %eax testq %rax, %rax je 0x66ca9 movq %rbx, -0x38(%rbp) imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %r15 addq $0xae, %r14 xorl %r12d, %r12d xorl %ebx, %ebx movq -0x40(%rbp), %rax btq %rbx, %rax jae 0x66c76 movq -0x30(%rbp), %rax movq %rax, (%r15) movl %ebx, 0x8(%r15) movq 0x310(%rax), %rdi addq %r12, %rdi movzwl (%r14), %edx imulq -0x38(%rbp), %rdx movq %rdx, %rsi xorl %ecx, %ecx leaq 0x67(%rip), %r8 # 0x66cc3 leaq 0xa1(%rip), %r9 # 0x66d04 pushq $0x0 pushq %r15 addq $0x10, %r15 callq 0xa4618 addq $0x10, %rsp jmp 0x66c89 movq -0x30(%rbp), %rax movq 0x310(%rax), %rax movq $0x0, (%rax,%r12) incq %rbx movl 0x3e8(%r13), %eax addq $0x298, %r12 # imm = 0x298 addq $0x118, %r14 # imm = 0x118 cmpq %rax, %rbx jb 0x66c28 xorl %r12d, %r12d movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x80, %r12d jmp 0x66ca9
maria_init_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], rdi mov r13, [rdi] mov edi, [r13+3E8h] test rdi, rdi jz loc_66CA6 mov rbx, rdx mov r14, [r13+570h] xor ecx, ecx xor r15d, r15d xor r8d, r8d xor eax, eax loc_66B2A: imul r9, rcx, 118h test byte ptr [r14+r9+0A2h], 1 jnz short loc_66B7B mov r10d, [r13+3ECh] lea rdx, [rcx+1] cmp rdx, r10 jz short loc_66B81 mov r11, [r13+140h] mov r10d, 1 shl r10, cl bt r11, rcx jnb short loc_66B81 add r9, r14 inc eax or r15, r10 movzx ecx, word ptr [r9+0AEh] add r8d, ecx add r8d, 20h ; ' ' jmp short loc_66B81 loc_66B7B: inc rcx mov rdx, rcx loc_66B81: mov rcx, rdx cmp rdx, rdi jnz short loc_66B2A xor r12d, r12d test eax, eax jz loc_66CA9 mov [rbp+var_40], r15 mov ecx, eax mov rax, rcx shl rax, 0Eh cmp rax, rsi ja loc_66CA9 test rbx, rbx jz short loc_66BBB mov eax, r8d imul rax, rbx cmp rax, rsi jb short loc_66BCA loc_66BBB: shl r8d, 4 mov rax, rsi xor edx, edx div r8 mov rbx, rax loc_66BCA: imul rax, rdi, 298h shl rcx, 4 add rcx, rax xor r12d, r12d xor edi, edi mov rsi, rcx xor edx, edx call my_malloc mov r15, rax mov rax, [rbp+var_30] mov [rax+310h], r15 test r15, r15 jz loc_66CBB mov eax, [r13+3E8h] test rax, rax jz loc_66CA9 mov [rbp+var_38], rbx imul rax, 298h add r15, rax add r14, 0AEh xor r12d, r12d xor ebx, ebx loc_66C28: mov rax, [rbp+var_40] bt rax, rbx jnb short loc_66C76 mov rax, [rbp+var_30] mov [r15], rax mov [r15+8], ebx mov rdi, [rax+310h] add rdi, r12 movzx edx, word ptr [r14] imul rdx, [rbp+var_38] mov rsi, rdx xor ecx, ecx lea r8, keys_compare lea r9, keys_free push 0 push r15 add r15, 10h call init_tree add rsp, 10h jmp short loc_66C89 loc_66C76: mov rax, [rbp+var_30] mov rax, [rax+310h] mov qword ptr [rax+r12], 0 loc_66C89: inc rbx mov eax, [r13+3E8h] add r12, 298h add r14, 118h cmp rbx, rax jb short loc_66C28 loc_66CA6: xor r12d, r12d loc_66CA9: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_66CBB: mov r12d, 80h jmp short loc_66CA9
long long maria_init_bulk_insert(_QWORD *a1, unsigned long long a2, unsigned long long a3) { long long v3; // r13 long long v4; // rdi long long v6; // r14 unsigned long long v7; // rcx long long v8; // r15 unsigned int v9; // r8d unsigned int v10; // eax unsigned long long v11; // rdx long long v12; // r11 unsigned int v13; // r12d long long v14; // r15 long long v15; // r15 unsigned __int16 *v16; // r14 long long v17; // r12 unsigned long long v18; // rbx long long v19; // rax long long v21; // [rsp-10h] [rbp-50h] long long v22; // [rsp+0h] [rbp-40h] int v23; // [rsp+8h] [rbp-38h] v3 = *a1; v4 = *(unsigned int *)(*a1 + 1000LL); if ( !v4 ) return 0; v6 = *(_QWORD *)(v3 + 1392); v7 = 0LL; v8 = 0LL; v9 = 0; v10 = 0; do { if ( (*(_BYTE *)(v6 + 280 * v7 + 162) & 1) != 0 ) { v11 = v7 + 1; } else { v11 = v7 + 1; if ( v7 + 1 != *(_DWORD *)(v3 + 1004) ) { v12 = *(_QWORD *)(v3 + 320); if ( _bittest64(&v12, v7) ) { ++v10; v8 |= 1LL << v7; v9 += *(unsigned __int16 *)(v6 + 280 * v7 + 174) + 32; } } } v7 = v11; } while ( v11 != v4 ); v13 = 0; if ( v10 ) { v22 = v8; if ( (unsigned long long)v10 << 14 <= a2 ) { if ( !a3 || a3 * v9 >= a2 ) a3 = a2 / (16 * v9); v13 = 0; v14 = my_malloc(0LL, 664 * v4 + 16LL * v10, 0LL); a1[98] = v14; if ( !v14 ) return 128; if ( *(_DWORD *)(v3 + 1000) ) { v23 = a3; v15 = 664LL * *(unsigned int *)(v3 + 1000) + v14; v16 = (unsigned __int16 *)(v6 + 174); v17 = 0LL; v18 = 0LL; do { v19 = v22; if ( _bittest64(&v19, v18) ) { *(_QWORD *)v15 = a1; *(_DWORD *)(v15 + 8) = v18; v21 = v15; v15 += 16LL; init_tree( v17 + *((_DWORD *)a1 + 196), v23 * *v16, v23 * *v16, 0, (unsigned int)keys_compare, (unsigned int)keys_free, v21, 0LL); } else { *(_QWORD *)(a1[98] + v17) = 0LL; } ++v18; v17 += 664LL; v16 += 140; } while ( v18 < *(unsigned int *)(v3 + 1000) ); return 0; } } } return v13; }
maria_init_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],RDI MOV R13,qword ptr [RDI] MOV EDI,dword ptr [R13 + 0x3e8] TEST RDI,RDI JZ 0x00166ca6 MOV RBX,RDX MOV R14,qword ptr [R13 + 0x570] XOR ECX,ECX XOR R15D,R15D XOR R8D,R8D XOR EAX,EAX LAB_00166b2a: IMUL R9,RCX,0x118 TEST byte ptr [R14 + R9*0x1 + 0xa2],0x1 JNZ 0x00166b7b MOV R10D,dword ptr [R13 + 0x3ec] LEA RDX,[RCX + 0x1] CMP RDX,R10 JZ 0x00166b81 MOV R11,qword ptr [R13 + 0x140] MOV R10D,0x1 SHL R10,CL BT R11,RCX JNC 0x00166b81 ADD R9,R14 INC EAX OR R15,R10 MOVZX ECX,word ptr [R9 + 0xae] ADD R8D,ECX ADD R8D,0x20 JMP 0x00166b81 LAB_00166b7b: INC RCX MOV RDX,RCX LAB_00166b81: MOV RCX,RDX CMP RDX,RDI JNZ 0x00166b2a XOR R12D,R12D TEST EAX,EAX JZ 0x00166ca9 MOV qword ptr [RBP + -0x40],R15 MOV ECX,EAX MOV RAX,RCX SHL RAX,0xe CMP RAX,RSI JA 0x00166ca9 TEST RBX,RBX JZ 0x00166bbb MOV EAX,R8D IMUL RAX,RBX CMP RAX,RSI JC 0x00166bca LAB_00166bbb: SHL R8D,0x4 MOV RAX,RSI XOR EDX,EDX DIV R8 MOV RBX,RAX LAB_00166bca: IMUL RAX,RDI,0x298 SHL RCX,0x4 ADD RCX,RAX XOR R12D,R12D XOR EDI,EDI MOV RSI,RCX XOR EDX,EDX CALL 0x0019fd89 MOV R15,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x310],R15 TEST R15,R15 JZ 0x00166cbb MOV EAX,dword ptr [R13 + 0x3e8] TEST RAX,RAX JZ 0x00166ca9 MOV qword ptr [RBP + -0x38],RBX IMUL RAX,RAX,0x298 ADD R15,RAX ADD R14,0xae XOR R12D,R12D XOR EBX,EBX LAB_00166c28: MOV RAX,qword ptr [RBP + -0x40] BT RAX,RBX JNC 0x00166c76 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],EBX MOV RDI,qword ptr [RAX + 0x310] ADD RDI,R12 MOVZX EDX,word ptr [R14] IMUL RDX,qword ptr [RBP + -0x38] MOV RSI,RDX XOR ECX,ECX LEA R8,[0x166cc3] LEA R9,[0x166d04] PUSH 0x0 PUSH R15 ADD R15,0x10 CALL 0x001a4618 ADD RSP,0x10 JMP 0x00166c89 LAB_00166c76: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x310] MOV qword ptr [RAX + R12*0x1],0x0 LAB_00166c89: INC RBX MOV EAX,dword ptr [R13 + 0x3e8] ADD R12,0x298 ADD R14,0x118 CMP RBX,RAX JC 0x00166c28 LAB_00166ca6: XOR R12D,R12D LAB_00166ca9: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00166cbb: MOV R12D,0x80 JMP 0x00166ca9
int8 maria_init_bulk_insert(long *param_1,ulong param_2,ulong param_3) { long lVar1; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ushort *puVar8; ulong uVar9; int8 *puVar10; lVar1 = *param_1; uVar5 = (ulong)*(uint *)(lVar1 + 1000); if (uVar5 != 0) { lVar7 = *(long *)(lVar1 + 0x570); uVar4 = 0; uVar9 = 0; uVar6 = 0; uVar2 = 0; do { if ((((*(byte *)(lVar7 + 0xa2 + uVar4 * 0x118) & 1) == 0) && (uVar4 + 1 != (ulong)*(uint *)(lVar1 + 0x3ec))) && ((*(ulong *)(lVar1 + 0x140) >> (uVar4 & 0x3f) & 1) != 0)) { uVar2 = uVar2 + 1; uVar9 = uVar9 | 1L << ((byte)uVar4 & 0x3f); uVar6 = (ulong)((int)uVar6 + (uint)*(ushort *)(uVar4 * 0x118 + lVar7 + 0xae) + 0x20); } uVar4 = uVar4 + 1; } while (uVar4 != uVar5); if (uVar2 == 0) { return 0; } if (param_2 < (ulong)uVar2 << 0xe) { return 0; } if ((param_3 == 0) || (param_2 <= uVar6 * param_3)) { param_3 = param_2 / (uint)((int)uVar6 << 4); } lVar3 = my_malloc(0,(ulong)uVar2 * 0x10 + uVar5 * 0x298,0); param_1[0x62] = lVar3; if (lVar3 == 0) { return 0x80; } if ((ulong)*(uint *)(lVar1 + 1000) == 0) { return 0; } puVar10 = (int8 *)(lVar3 + (ulong)*(uint *)(lVar1 + 1000) * 0x298); puVar8 = (ushort *)(lVar7 + 0xae); lVar7 = 0; uVar5 = 0; do { if ((uVar9 >> (uVar5 & 0x3f) & 1) == 0) { *(int8 *)(param_1[0x62] + lVar7) = 0; } else { *puVar10 = param_1; *(int *)(puVar10 + 1) = (int)uVar5; init_tree(param_1[0x62] + lVar7,*puVar8 * param_3,*puVar8 * param_3,0,keys_compare,keys_free ,puVar10,0,uVar9,param_3); puVar10 = puVar10 + 2; } uVar5 = uVar5 + 1; lVar7 = lVar7 + 0x298; puVar8 = puVar8 + 0x8c; } while (uVar5 < *(uint *)(lVar1 + 1000)); } return 0; }
47,318
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/renderer.cpp
Component Renderer(std::function<Element()> render) { class Impl : public ComponentBase { public: explicit Impl(std::function<Element()> render) : render_(std::move(render)) {} Element Render() override { return render_(); } std::function<Element()> render_; }; return Make<Impl>(std::move(render)); }
O3
cpp
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl(): pushq %rbx movq %rdi, %rbx leaq 0x2b733(%rip), %rax # 0x582a0 movq %rax, (%rdi) movq 0x38(%rdi), %rax testq %rax, %rax je 0x2cb87 leaq 0x28(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x26d94 movl $0x48, %esi movq %rbx, %rdi popq %rbx jmp 0xb400 movq %rax, %rdi callq 0x1049a nop
_ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD0Ev: push rbx mov rbx, rdi lea rax, off_582A0 mov [rdi], rax mov rax, [rdi+38h] test rax, rax jz short loc_2CB87 lea rdi, [rbx+28h] mov rsi, rdi mov edx, 3 call rax loc_2CB87: mov rdi, rbx; this call _ZN5ftxui13ComponentBaseD2Ev; ftxui::ComponentBase::~ComponentBase() mov esi, 48h ; 'H'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong) mov rdi, rax call __clang_call_terminate
void ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl( ftxui::ComponentBase *this) { void ( *v1)(char *, char *, long long); // rax *(_QWORD *)this = off_582A0; v1 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 7); if ( v1 ) v1((char *)this + 40, (char *)this + 40, 3LL); ftxui::ComponentBase::~ComponentBase(this); operator delete(this, 0x48uLL); }
~Impl: PUSH RBX MOV RBX,RDI LEA RAX,[0x1582a0] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RDI + 0x38] TEST RAX,RAX JZ 0x0012cb87 LEA RDI,[RBX + 0x28] LAB_0012cb7d: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0012cb87: MOV RDI,RBX CALL 0x00126d94 MOV ESI,0x48 MOV RDI,RBX POP RBX JMP 0x0010b400
/* ~Impl() */ void __thiscall ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>()>)::Impl::~Impl(Impl *this) { *(int ***)this = &PTR__Impl_001582a0; if (*(code **)(this + 0x38) != (code *)0x0) { /* try { // try from 0012cb7d to 0012cb86 has its CatchHandler @ 0012cb9d */ (**(code **)(this + 0x38))(this + 0x28,this + 0x28,3); } ComponentBase::~ComponentBase((ComponentBase *)this); operator_delete(this,0x48); return; }
47,319
json_parse_ident
bluesky950520[P]quickjs/quickjs.c
static JSAtom json_parse_ident(JSParseState *s, const uint8_t **pp, int c) { const uint8_t *p; char ident_buf[128], *buf; size_t ident_size, ident_pos; JSAtom atom; p = *pp; buf = ident_buf; ident_size = sizeof(ident_buf); ident_pos = 0; for(;;) { buf[ident_pos++] = c; c = *p; if (c >= 128 || !((lre_id_continue_table_ascii[c >> 5] >> (c & 31)) & 1)) break; p++; if (unlikely(ident_pos >= ident_size - UTF8_CHAR_LEN_MAX)) { if (ident_realloc(s->ctx, &buf, &ident_size, ident_buf)) { atom = JS_ATOM_NULL; goto done; } } } /* buf contains pure ASCII */ atom = JS_NewAtomLen(s->ctx, buf, ident_pos); done: if (unlikely(buf != ident_buf)) js_free(s->ctx, buf); *pp = p; return atom; }
O0
c
json_parse_ident: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movl %edx, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq (%rax), %rax movq %rax, 0xa8(%rsp) leaq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) movq $0x80, 0x10(%rsp) movq $0x0, 0x8(%rsp) movl 0xb4(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x8(%rsp) movb %dl, (%rax,%rcx) movq 0xa8(%rsp), %rax movzbl (%rax), %eax movl %eax, 0xb4(%rsp) cmpl $0x80, 0xb4(%rsp) jge 0x86909 movl 0xb4(%rsp), %eax sarl $0x5, %eax movslq %eax, %rcx leaq 0x8bf4e(%rip), %rax # 0x112840 movl (%rax,%rcx,4), %eax movl 0xb4(%rsp), %ecx andl $0x1f, %ecx shrl %cl, %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x8690b jmp 0x86979 movq 0xa8(%rsp), %rax addq $0x1, %rax movq %rax, 0xa8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx subq $0x4, %rcx cmpq %rcx, %rax setae %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x86974 movq 0xc0(%rsp), %rax movq (%rax), %rdi leaq 0x20(%rsp), %rcx leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x86df0 cmpl $0x0, %eax je 0x86972 movl $0x0, 0x4(%rsp) jmp 0x86997 jmp 0x86974 jmp 0x8689d movq 0xc0(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x28020 movl %eax, 0x4(%rsp) movq 0x18(%rsp), %rax leaq 0x20(%rsp), %rcx cmpq %rcx, %rax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x869cd movq 0xc0(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi callq 0x21db0 movq 0xa8(%rsp), %rcx movq 0xb8(%rsp), %rax movq %rcx, (%rax) movl 0x4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax)
json_parse_ident: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_14], edx mov rax, [rsp+0C8h+var_10] mov rax, [rax] mov [rsp+0C8h+var_20], rax lea rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_B8], 80h mov [rsp+0C8h+var_C0], 0 loc_8689D: mov eax, [rsp+0C8h+var_14] mov dl, al mov rax, [rsp+0C8h+var_B0] mov rcx, [rsp+0C8h+var_C0] mov rsi, rcx add rsi, 1 mov [rsp+0C8h+var_C0], rsi mov [rax+rcx], dl mov rax, [rsp+0C8h+var_20] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_14], eax cmp [rsp+0C8h+var_14], 80h jge short loc_86909 mov eax, [rsp+0C8h+var_14] sar eax, 5 movsxd rcx, eax lea rax, lre_id_continue_table_ascii mov eax, [rax+rcx*4] mov ecx, [rsp+0C8h+var_14] and ecx, 1Fh shr eax, cl and eax, 1 cmp eax, 0 jnz short loc_8690B loc_86909: jmp short loc_86979 loc_8690B: mov rax, [rsp+0C8h+var_20] add rax, 1 mov [rsp+0C8h+var_20], rax mov rax, [rsp+0C8h+var_C0] mov rcx, [rsp+0C8h+var_B8] sub rcx, 4 cmp rax, rcx setnb al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_86974 mov rax, [rsp+0C8h+var_8] mov rdi, [rax] lea rcx, [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_B0] lea rdx, [rsp+0C8h+var_B8] call ident_realloc cmp eax, 0 jz short loc_86972 mov [rsp+0C8h+var_C4], 0 jmp short loc_86997 loc_86972: jmp short $+2 loc_86974: jmp loc_8689D loc_86979: mov rax, [rsp+0C8h+var_8] mov rdi, [rax] mov rsi, [rsp+0C8h+var_B0] mov rdx, [rsp+0C8h+var_C0] call JS_NewAtomLen mov [rsp+0C8h+var_C4], eax loc_86997: mov rax, [rsp+0C8h+var_B0] lea rcx, [rsp+0C8h+var_A8] cmp rax, rcx setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_869CD mov rax, [rsp+0C8h+var_8] mov rdi, [rax] mov rsi, [rsp+0C8h+var_B0] call js_free loc_869CD: mov rcx, [rsp+0C8h+var_20] mov rax, [rsp+0C8h+var_10] mov [rax], rcx mov eax, [rsp+0C8h+var_C4] add rsp, 0C8h retn
long long json_parse_ident(long long *a1, unsigned __int8 **a2, int a3) { unsigned long long v3; // rcx unsigned int v5; // [rsp+4h] [rbp-C4h] unsigned long long v6; // [rsp+8h] [rbp-C0h] long long v7; // [rsp+10h] [rbp-B8h] BYREF unsigned __int8 *v8; // [rsp+18h] [rbp-B0h] BYREF _BYTE v9[136]; // [rsp+20h] [rbp-A8h] BYREF unsigned __int8 *v10; // [rsp+A8h] [rbp-20h] int v11; // [rsp+B4h] [rbp-14h] _QWORD *v12; // [rsp+B8h] [rbp-10h] long long *v13; // [rsp+C0h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = *a2; v8 = v9; v7 = 128LL; v6 = 0LL; do { v3 = v6++; v8[v3] = v11; v11 = *v10; if ( v11 >= 128 || ((lre_id_continue_table_ascii[v11 >> 5] >> (v11 & 0x1F)) & 1) == 0 ) { v5 = JS_NewAtomLen(*v13, v8, v6); goto LABEL_9; } ++v10; } while ( v6 < v7 - 4 || !(unsigned int)ident_realloc(*v13, &v8, &v7, v9) ); v5 = 0; LABEL_9: if ( v8 != v9 ) js_free(*v13, (long long)v8); *v12 = v10; return v5; }
json_parse_ident: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV dword ptr [RSP + 0xb4],EDX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xa8],RAX LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x80 MOV qword ptr [RSP + 0x8],0x0 LAB_0018689d: MOV EAX,dword ptr [RSP + 0xb4] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + 0x8],RSI MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0xa8] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0xb4],EAX CMP dword ptr [RSP + 0xb4],0x80 JGE 0x00186909 MOV EAX,dword ptr [RSP + 0xb4] SAR EAX,0x5 MOVSXD RCX,EAX LEA RAX,[0x212840] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,dword ptr [RSP + 0xb4] AND ECX,0x1f SHR EAX,CL AND EAX,0x1 CMP EAX,0x0 JNZ 0x0018690b LAB_00186909: JMP 0x00186979 LAB_0018690b: MOV RAX,qword ptr [RSP + 0xa8] ADD RAX,0x1 MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] SUB RCX,0x4 CMP RAX,RCX SETNC AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00186974 MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] LEA RCX,[RSP + 0x20] LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] CALL 0x00186df0 CMP EAX,0x0 JZ 0x00186972 MOV dword ptr [RSP + 0x4],0x0 JMP 0x00186997 LAB_00186972: JMP 0x00186974 LAB_00186974: JMP 0x0018689d LAB_00186979: MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00128020 MOV dword ptr [RSP + 0x4],EAX LAB_00186997: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RSP + 0x20] CMP RAX,RCX SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001869cd MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00121db0 LAB_001869cd: MOV RCX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0xc8 RET
int4 json_parse_ident(int8 *param_1,int8 *param_2,uint param_3) { int iVar1; ulong uVar2; int4 local_c4; ulong local_c0; long local_b8; int1 *local_b0; int1 local_a8 [136]; byte *local_20; uint local_14; int8 *local_10; int8 *local_8; local_20 = (byte *)*param_2; local_b0 = local_a8; local_b8 = 0x80; local_c0 = 0; local_14 = param_3; local_10 = param_2; local_8 = param_1; do { uVar2 = local_c0 + 1; local_b0[local_c0] = (char)local_14; local_14 = (uint)*local_20; if ((0x7f < local_14) || ((*(uint *)(lre_id_continue_table_ascii + (long)((int)local_14 >> 5) * 4) >> (*local_20 & 0x1f) & 1) == 0)) { local_c4 = JS_NewAtomLen(*local_8,local_b0,uVar2); goto LAB_00186997; } local_20 = local_20 + 1; local_c0 = uVar2; } while ((uVar2 < local_b8 - 4U) || (iVar1 = ident_realloc(*local_8,&local_b0,&local_b8,local_a8), iVar1 == 0)); local_c4 = 0; LAB_00186997: if (local_b0 != local_a8) { js_free(*local_8,local_b0); } *local_10 = local_20; return local_c4; }
47,320
LefDefParser::lefwLayerACWidth(int, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerACWidth(int numWidths, double *widths) { int i; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERACCURRENT) return LEFW_BAD_ORDER; if (numWidths <= 0) return LEFW_OK; // width is optional if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " WIDTH "); for (i = 0; i < numWidths; i++) { encPrint(lefwFile, (char*) "%.11g ", *widths++); } encPrint(lefwFile, (char*) ";\n"); } else { fprintf(lefwFile, " WIDTH "); for (i = 0; i < numWidths; i++) { fprintf(lefwFile, "%.11g ", *widths++); } fprintf(lefwFile, ";\n"); } lefwTableLen = numWidths; lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerACWidth(int, double*): subq $0x18, %rsp movl %edi, 0x10(%rsp) movq %rsi, 0x8(%rsp) leaq 0x1f23c(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x13bd7 movl $0x1, 0x14(%rsp) jmp 0x13d31 leaq 0x1f472(%rip), %rax # 0x33050 cmpl $0x1d, (%rax) je 0x13bf0 movl $0x2, 0x14(%rsp) jmp 0x13d31 cmpl $0x0, 0x10(%rsp) jg 0x13c04 movl $0x0, 0x14(%rsp) jmp 0x13d31 cmpl $0x0, 0x1f4e1(%rip) # 0x330ec je 0x13c8b leaq 0x1f1ec(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x16e0e(%rip), %rsi # 0x2aa2c movb $0x0, %al callq 0x289b0 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x13c71 leaq 0x1f1c2(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x8(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x8(%rsp) movsd (%rax), %xmm0 leaq 0x16c3d(%rip), %rsi # 0x2a89a movb $0x1, %al callq 0x289b0 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x13c2d leaq 0x1f188(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x162d2(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x289b0 jmp 0x13d07 leaq 0x1f16e(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x16d90(%rip), %rsi # 0x2aa2c movb $0x0, %al callq 0x1100 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x13cef leaq 0x1f144(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x8(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x8(%rsp) movsd (%rax), %xmm0 leaq 0x16bbf(%rip), %rsi # 0x2a89a movb $0x1, %al callq 0x1100 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x13cab leaq 0x1f10a(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x16254(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x1100 movl 0x10(%rsp), %ecx leaq 0x1f3ce(%rip), %rax # 0x330e0 movl %ecx, (%rax) leaq 0x1f331(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x1f325(%rip), %rax # 0x3304c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser16lefwLayerACWidthEiPd: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_10], rsi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_13BD7 mov [rsp+18h+var_4], 1 jmp loc_13D31 loc_13BD7: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Dh jz short loc_13BF0 mov [rsp+18h+var_4], 2 jmp loc_13D31 loc_13BF0: cmp [rsp+18h+var_8], 0 jg short loc_13C04 mov [rsp+18h+var_4], 0 jmp loc_13D31 loc_13C04: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_13C8B lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aWidth; " WIDTH " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov [rsp+18h+var_14], 0 loc_13C2D: mov eax, [rsp+18h+var_14] cmp eax, [rsp+18h+var_8] jge short loc_13C71 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+18h+var_10] mov rcx, rax add rcx, 8 mov [rsp+18h+var_10], rcx movsd xmm0, qword ptr [rax] lea rsi, aMinenclosedare+13h; "%.11g " mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax jmp short loc_13C2D loc_13C71: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_13D07 loc_13C8B: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aWidth; " WIDTH " mov al, 0 call _fprintf mov [rsp+18h+var_14], 0 loc_13CAB: mov eax, [rsp+18h+var_14] cmp eax, [rsp+18h+var_8] jge short loc_13CEF lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+18h+var_10] mov rcx, rax add rcx, 8 mov [rsp+18h+var_10], rcx movsd xmm0, qword ptr [rax] lea rsi, aMinenclosedare+13h; "%.11g " mov al, 1 call _fprintf mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax jmp short loc_13CAB loc_13CEF: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf loc_13D07: mov ecx, [rsp+18h+var_8] lea rax, _ZN12LefDefParser12lefwTableLenE; LefDefParser::lefwTableLen mov [rax], ecx lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_13D31: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerACWidth(LefDefParser *this, double *a2, double *a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d double *v10; // rax int i; // [rsp+4h] [rbp-14h] int j; // [rsp+4h] [rbp-14h] if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 29 ) { if ( (int)this > 0 ) { if ( LefDefParser::lefwWriteEncrypt ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" WIDTH ", (_DWORD)a3, a4, a5, a6); for ( i = 0; i < (int)this; ++i ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g ", v6, (_DWORD)++a2, v8, v9); LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v6, v7, v8, v9); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " WIDTH "); for ( j = 0; j < (int)this; ++j ) { v10 = a2++; fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g ", *v10); } fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n"); } LefDefParser::lefwTableLen = (_DWORD)this; ++LefDefParser::lefwLines; return 0; } else { return 0; } } else { return 2; } } else { return 1; } }
lefwLayerACWidth: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV qword ptr [RSP + 0x8],RSI LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00113bd7 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00113d31 LAB_00113bd7: LEA RAX,[0x133050] CMP dword ptr [RAX],0x1d JZ 0x00113bf0 MOV dword ptr [RSP + 0x14],0x2 JMP 0x00113d31 LAB_00113bf0: CMP dword ptr [RSP + 0x10],0x0 JG 0x00113c04 MOV dword ptr [RSP + 0x14],0x0 JMP 0x00113d31 LAB_00113c04: CMP dword ptr [0x001330ec],0x0 JZ 0x00113c8b LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x12aa2c] MOV AL,0x0 CALL 0x001289b0 MOV dword ptr [RSP + 0x4],0x0 LAB_00113c2d: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JGE 0x00113c71 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x8],RCX MOVSD XMM0,qword ptr [RAX] LEA RSI,[0x12a89a] MOV AL,0x1 CALL 0x001289b0 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00113c2d LAB_00113c71: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x001289b0 JMP 0x00113d07 LAB_00113c8b: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x12aa2c] MOV AL,0x0 CALL 0x00101100 MOV dword ptr [RSP + 0x4],0x0 LAB_00113cab: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JGE 0x00113cef LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x8],RCX MOVSD XMM0,qword ptr [RAX] LEA RSI,[0x12a89a] MOV AL,0x1 CALL 0x00101100 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00113cab LAB_00113cef: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x00101100 LAB_00113d07: MOV ECX,dword ptr [RSP + 0x10] LEA RAX,[0x1330e0] MOV dword ptr [RAX],ECX LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_00113d31: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerACWidth(int, double*) */ int4 LefDefParser::lefwLayerACWidth(int param_1,double *param_2) { int local_14; double *local_10; int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwState == 0x1d) { if (param_1 < 1) { local_4 = 0; } else { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," WIDTH "); local_10 = param_2; for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) { fprintf(lefwFile,"%.11g ",*local_10); local_10 = local_10 + 1; } fprintf(lefwFile,";\n"); } else { encPrint(lefwFile," WIDTH "); local_10 = param_2; for (local_14 = 0; local_14 < param_1; local_14 = local_14 + 1) { encPrint(lefwFile,"%.11g ",*local_10); local_10 = local_10 + 1; } encPrint(lefwFile,";\n"); } lefwLines = lefwLines + 1; local_4 = 0; lefwTableLen = param_1; } } else { local_4 = 2; } return local_4; }
47,321
arrayEndCB(LefDefParser::lefrCallbackType_e, char const*, void*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lefrw/lefrw.cpp
int arrayEndCB(lefrCallbackType_e c, const char* name, lefiUserData) { int status; checkType(c); // if ((long)ud != userData) dataError(); // use the lef writer to write the data out status = lefwEndArray(name); if (status != LEFW_OK) return status; return 0; }
O3
cpp
arrayEndCB(LefDefParser::lefrCallbackType_e, char const*, void*): pushq %rbx movq %rsi, %rbx cmpl $0x39, %edi jb 0x401b movq 0x890bb(%rip), %rcx # 0x8d0c0 leaq 0x5418f(%rip), %rdi # 0x5819b movl $0x27, %esi movl $0x1, %edx callq 0x23d0 movq %rbx, %rdi popq %rbx jmp 0x1b86c
_Z10arrayEndCBN12LefDefParser18lefrCallbackType_eEPKcPv: push rbx mov rbx, rsi cmp edi, 39h ; '9' jb short loc_401B mov rcx, cs:fout lea rdi, aErrorCallbackT; "ERROR: callback type is out of bounds!"... mov esi, (offset qword_20+7); char * mov edx, 1 call _fwrite loc_401B: mov rdi, rbx; this pop rbx jmp _ZN12LefDefParser12lefwEndArrayEPKc; LefDefParser::lefwEndArray(char const*)
long long arrayEndCB(unsigned int a1, const char *a2) { LefDefParser *v2; // rbx v2 = (LefDefParser *)a2; if ( a1 >= 0x39 ) { a2 = (char *)&qword_20 + 7; fwrite("ERROR: callback type is out of bounds!\n", (char *)&qword_20 + 7, 1LL, fout); } return LefDefParser::lefwEndArray(v2, a2); }
arrayEndCB: PUSH RBX MOV RBX,RSI CMP EDI,0x39 JC 0x0010401b MOV RCX,qword ptr [0x0018d0c0] LEA RDI,[0x15819b] MOV ESI,0x27 MOV EDX,0x1 CALL 0x001023d0 LAB_0010401b: MOV RDI,RBX POP RBX JMP 0x0011b86c
/* arrayEndCB(LefDefParser::lefrCallbackType_e, char const*, void*) */ void arrayEndCB(uint param_1,char *param_2) { if (0x38 < param_1) { fwrite("ERROR: callback type is out of bounds!\n",0x27,1,fout); } LefDefParser::lefwEndArray(param_2); return; }
47,322
uf_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); }
O3
c
uf_endspace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rsi, %r15 movl 0x4(%rsi), %ecx movl 0x1c(%rdi), %r13d cmpl %r13d, %ecx jae 0x3b106 subl %ecx, %r13d leaq 0x5c599(%rip), %rax # 0x97660 movl (%rax,%rcx,4), %r14d andl (%r15), %r14d movl %r13d, %ecx shll %cl, %r14d movq %rdi, -0x30(%rbp) movq %r15, %rdi movq %rdx, %r12 callq 0x3a1b5 movq -0x30(%rbp), %rdi movq %r12, %rdx movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %r14d, %eax jmp 0x3b11f movl (%r15), %eax subl %r13d, %ecx movl %ecx, 0x4(%r15) shrl %cl, %eax movl 0x1c(%rdi), %ecx leaq 0x5c544(%rip), %rsi # 0x97660 andl (%rsi,%rcx,4), %eax movl %eax, %r13d leaq (%rdx,%r13), %rax cmpq %rbx, %rax jbe 0x3b142 movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r14 negq %r14 cmpq %rbx, %rax je 0x3b159 leaq (%rbx,%r14), %rcx movq %r15, %rsi callq 0x3aaa6 addq %r14, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x281b0
uf_endspace: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r15, rsi mov ecx, [rsi+4] mov r13d, [rdi+1Ch] cmp ecx, r13d jnb short loc_3B106 sub r13d, ecx lea rax, mask mov r14d, [rax+rcx*4] and r14d, [r15] mov ecx, r13d shl r14d, cl mov [rbp+var_30], rdi mov rdi, r15 mov r12, rdx call fill_buffer mov rdi, [rbp+var_30] mov rdx, r12 mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add eax, r14d jmp short loc_3B11F loc_3B106: mov eax, [r15] sub ecx, r13d mov [r15+4], ecx shr eax, cl mov ecx, [rdi+1Ch] lea rsi, mask and eax, [rsi+rcx*4] loc_3B11F: mov r13d, eax lea rax, [rdx+r13] cmp rax, rbx jbe short loc_3B142 mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B142: mov r14, r13 neg r14 cmp rax, rbx jz short loc_3B159 lea rcx, [rbx+r14] mov rsi, r15 call decode_bytes loc_3B159: add rbx, r14 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
unsigned long long uf_endspace(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4) { long long v5; // rcx unsigned int v6; // r13d int v7; // r13d int v8; // r14d _BYTE *v9; // r12 unsigned int v10; // eax unsigned int v11; // eax unsigned int v12; // ecx long long v13; // r13 unsigned long long result; // rax v5 = a2[1]; v6 = *(_DWORD *)(a1 + 28); if ( (unsigned int)v5 >= v6 ) { v11 = *a2; v12 = v5 - v6; a2[1] = v12; v10 = mask[*(unsigned int *)(a1 + 28)] & (v11 >> v12); } else { v7 = v6 - v5; v8 = (*a2 & mask[v5]) << v7; v9 = a3; fill_buffer((long long)a2); a3 = v9; a2[1] = 32 - v7; v10 = v8 + (*a2 >> -(char)v7); } v13 = v10; result = (unsigned long long)&a3[v10]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes(a1, (long long)a2, a3, (_BYTE *)(a4 - v13)); return memset(a4 - v13, 32LL, v13); } else { a2[10] = 1; } return result; }
uf_endspace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R15,RSI MOV ECX,dword ptr [RSI + 0x4] MOV R13D,dword ptr [RDI + 0x1c] CMP ECX,R13D JNC 0x0013b106 SUB R13D,ECX LEA RAX,[0x197660] MOV R14D,dword ptr [RAX + RCX*0x4] AND R14D,dword ptr [R15] MOV ECX,R13D SHL R14D,CL MOV qword ptr [RBP + -0x30],RDI MOV RDI,R15 MOV R12,RDX CALL 0x0013a1b5 MOV RDI,qword ptr [RBP + -0x30] MOV RDX,R12 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD EAX,R14D JMP 0x0013b11f LAB_0013b106: MOV EAX,dword ptr [R15] SUB ECX,R13D MOV dword ptr [R15 + 0x4],ECX SHR EAX,CL MOV ECX,dword ptr [RDI + 0x1c] LEA RSI,[0x197660] AND EAX,dword ptr [RSI + RCX*0x4] LAB_0013b11f: MOV R13D,EAX LEA RAX,[RDX + R13*0x1] CMP RAX,RBX JBE 0x0013b142 MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b142: MOV R14,R13 NEG R14 CMP RAX,RBX JZ 0x0013b159 LEA RCX,[RBX + R14*0x1] MOV RSI,R15 CALL 0x0013aaa6 LAB_0013b159: ADD RBX,R14 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001281b0
void uf_endspace(long param_1,uint *param_2,long param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; byte bVar5; ulong __n; uVar4 = param_2[1]; uVar1 = *(uint *)(param_1 + 0x1c); if (uVar4 < uVar1) { uVar2 = (&mask)[uVar4]; uVar3 = *param_2; bVar5 = (byte)(uVar1 - uVar4); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar4); uVar4 = (*param_2 >> (-bVar5 & 0x1f)) + ((uVar2 & uVar3) << (bVar5 & 0x1f)); } else { param_2[1] = uVar4 - uVar1; uVar4 = *param_2 >> ((byte)(uVar4 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } __n = (ulong)uVar4; if (param_4 < param_3 + __n) { param_2[10] = 1; return; } if (param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } memset((void *)(param_4 + -__n),0x20,__n); return; }
47,323
minja::Value::operator>(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool operator>(const Value & other) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_number() && other.is_number()) return get<double>() > other.get<double>(); if (is_string() && other.is_string()) return get<std::string>() > other.get<std::string>(); throw std::runtime_error("Cannot compare values: " + dump() + " > " + other.dump()); }
O2
cpp
minja::Value::operator>(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %r15 callq 0x634ea testb %al, %al jne 0x709af movb 0x40(%r15), %al leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0x7094b movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x2, %al ja 0x709df movq %r15, %rdi callq 0x62e1c movsd %xmm0, (%rsp) movq %r14, %rdi callq 0x62e1c movsd (%rsp), %xmm1 ucomisd %xmm0, %xmm1 seta %bl jmp 0x7099f cmpb $0x3, %al jne 0x709df cmpb $0x3, 0x40(%r14) jne 0x709df leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x63934 leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x63934 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x70c6f movl %eax, %ebx movq %r15, %rdi callq 0x24208 movq %r14, %rdi callq 0x24208 movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x43319(%rip), %rsi # 0xb3cda movq %rax, %rdi callq 0x23340 movq 0x8d620(%rip), %rsi # 0xfdff0 movq 0x8d581(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x68(%rsp), %rdi pushq $-0x1 popq %rdx movq %r15, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x43ecc(%rip), %rsi # 0xb48cf leaq 0x88(%rsp), %rdi leaq 0x68(%rsp), %rdx callq 0x58626 leaq 0x43ecf(%rip), %rdx # 0xb48eb leaq 0x28(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0x38428 leaq 0x48(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x394b7 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x8d583(%rip), %rsi # 0xfdff0 movq 0x8d4e4(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x24208 jmp 0x70a91 movq %rax, %r14 movb $0x1, %bpl leaq 0x48(%rsp), %rdi callq 0x24208 jmp 0x70aa3 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi callq 0x24208 jmp 0x70ab5 movq %rax, %r14 movb $0x1, %bpl leaq 0x88(%rsp), %rdi callq 0x24208 jmp 0x70aca movq %rax, %r14 movb $0x1, %bpl leaq 0x68(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x70aef jmp 0x70af7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x24208 jmp 0x70af7 jmp 0x70aec movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23fd0 nop
_ZNK5minja5ValuegtERKS0_: push rbp push r15 push r14 push rbx sub rsp, 0A8h mov r14, rsi mov r15, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_709AF mov al, [r15+40h] lea ecx, [rax-5] cmp cl, 2 ja short loc_7094B mov al, [r14+40h] add al, 0FBh cmp al, 2 ja loc_709DF mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0C8h+var_C8], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+0C8h+var_C8] ucomisd xmm1, xmm0 setnbe bl jmp short loc_7099F loc_7094B: cmp al, 3 jnz loc_709DF cmp byte ptr [r14+40h], 3 jnz loc_709DF lea rdi, [rsp+0C8h+var_C0] mov rsi, r15 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+0C8h+var_A0] mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea r14, [rsp+0C8h+var_C0] lea r15, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, r15 call _ZStgtIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator><char>(std::string const&,std::string const&) mov ebx, eax mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_7099F: mov eax, ebx add rsp, 0A8h pop rbx pop r14 pop r15 pop rbp retn loc_709AF: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_709DF: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r15 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aCannotCompareV; "Cannot compare values: " lea rdi, [rsp+0C8h+var_40] lea rdx, [rsp+0C8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_B48EB; " > " lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+0C8h+var_80] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rdi, [rsp+0C8h+var_C0] lea rsi, [rsp+0C8h+var_A0] lea rdx, [rsp+0C8h+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 lea rsi, [rsp+0C8h+var_C0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70A91 mov r14, rax mov bpl, 1 loc_70A91: lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70AA3 mov r14, rax mov bpl, 1 loc_70AA3: lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70AB5 mov r14, rax mov bpl, 1 loc_70AB5: lea rdi, [rsp+0C8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70ACA mov r14, rax mov bpl, 1 loc_70ACA: lea rdi, [rsp+0C8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_70AEF jmp short loc_70AF7 mov r14, rax lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70AF7 jmp short $+2 loc_70AEC: mov r14, rax loc_70AEF: mov rdi, rbx; void * call ___cxa_free_exception loc_70AF7: mov rdi, r14 call __Unwind_Resume
long long minja::Value::operator>(minja::Value *a1, minja::Value *a2) { unsigned int v2; // ebx char v3; // al std::runtime_error *exception; // rbx void *v6; // rbx _BYTE v7[32]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v8[4]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v9[4]; // [rsp+48h] [rbp-80h] BYREF _BYTE v10[32]; // [rsp+68h] [rbp-60h] BYREF _BYTE v11[64]; // [rsp+88h] [rbp-40h] BYREF if ( minja::Value::is_null(a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = *((_BYTE *)a1 + 64); if ( (unsigned __int8)(v3 - 5) > 2u ) { if ( v3 == 3 && *((_BYTE *)a2 + 64) == 3 ) { minja::Value::get<std::string>((long long)v7, a1); minja::Value::get<std::string>((long long)v8, a2); v2 = std::operator><char>(v7, v8); std::string::~string(v8); std::string::~string(v7); return v2; } LABEL_10: v6 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Cannot compare values: ", (long long)v10); std::operator+<char>((long long)v8, (long long)v11, (long long)" > "); minja::Value::dump[abi:cxx11]((long long)v9, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, v8, v9); std::runtime_error::runtime_error(v6, v7); __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 2u ) goto LABEL_10; minja::Value::get<double>(a1); minja::Value::get<double>(a2); LOBYTE(v2) = 0; return v2; }
operator>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV R15,RDI CALL 0x001634ea TEST AL,AL JNZ 0x001709af MOV AL,byte ptr [R15 + 0x40] LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x0017094b MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x2 JA 0x001709df MOV RDI,R15 CALL 0x00162e1c MOVSD qword ptr [RSP],XMM0 MOV RDI,R14 CALL 0x00162e1c MOVSD XMM1,qword ptr [RSP] UCOMISD XMM1,XMM0 SETA BL JMP 0x0017099f LAB_0017094b: CMP AL,0x3 JNZ 0x001709df CMP byte ptr [R14 + 0x40],0x3 JNZ 0x001709df LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00163934 LAB_0017096b: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x00163934 LAB_00170978: LEA R14,[RSP + 0x8] LEA R15,[RSP + 0x28] MOV RDI,R14 MOV RSI,R15 CALL 0x00170c6f MOV EBX,EAX MOV RDI,R15 CALL 0x00124208 MOV RDI,R14 CALL 0x00124208 LAB_0017099f: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 POP R15 POP RBP RET LAB_001709af: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_001709ba: LEA RSI,[0x1b3cda] MOV RDI,RAX CALL 0x00123340 LAB_001709c9: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30 LAB_001709df: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_001709ea: LEA RDI,[RSP + 0x68] PUSH -0x1 POP RDX MOV RSI,R15 XOR ECX,ECX CALL 0x00162f00 LAB_001709fc: LEA RSI,[0x1b48cf] LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x68] CALL 0x00158626 LAB_00170a15: LEA RDX,[0x1b48eb] LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x88] CALL 0x00138428 LAB_00170a2e: LEA RDI,[RSP + 0x48] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_00170a40: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x48] CALL 0x001394b7 MOV BPL,0x1 LAB_00170a57: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall minja::Value::operator>(Value *this,Value *param_1) { char cVar1; bool bVar2; int7 extraout_var; runtime_error *prVar3; int8 unaff_RBX; ulong uVar4; double dVar5; double dVar6; string local_c0 [32]; string local_a0 [32]; int1 local_80 [32]; int1 local_60 [32]; char local_40 [32]; cVar1 = is_null(this); if (cVar1 != '\0') { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001709ba to 001709c8 has its CatchHandler @ 00170aec */ std::runtime_error::runtime_error(prVar3,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } if ((byte)((char)this[0x40] - 5U) < 3) { if (2 < (byte)((char)param_1[0x40] - 5U)) { LAB_001709df: prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001709ea to 001709fb has its CatchHandler @ 00170aea */ dump_abi_cxx11_((int)local_60,SUB81(this,0)); /* try { // try from 001709fc to 00170a14 has its CatchHandler @ 00170ac4 */ std::operator+(local_40,(string *)"Cannot compare values: "); /* try { // try from 00170a15 to 00170a2d has its CatchHandler @ 00170aaf */ std::operator+(local_a0,local_40); /* try { // try from 00170a2e to 00170a3f has its CatchHandler @ 00170a9d */ dump_abi_cxx11_((int)local_80,SUB81(param_1,0)); /* try { // try from 00170a40 to 00170a53 has its CatchHandler @ 00170a8b */ std::operator+(local_c0,local_a0); /* try { // try from 00170a57 to 00170a7b has its CatchHandler @ 00170a7c */ std::runtime_error::runtime_error(prVar3,local_c0); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } dVar5 = get<double>(this); dVar6 = get<double>(param_1); uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),dVar6 < dVar5); } else { if ((this[0x40] != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_001709df; get<std::__cxx11::string>(); /* try { // try from 0017096b to 00170977 has its CatchHandler @ 00170adb */ get<std::__cxx11::string>(); bVar2 = std::operator>(local_c0,local_a0); uVar4 = CONCAT71(extraout_var,bVar2) & 0xffffffff; std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string(local_c0); } return uVar4 & 0xffffffff; }
47,324
mbedtls_arc4_crypt
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/arc4.c
int mbedtls_arc4_crypt(mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output) { int x, y, a, b; size_t i; unsigned char *m; x = ctx->x; y = ctx->y; m = ctx->m; for (i = 0; i < length; i++) { x = (x + 1) & 0xFF; a = m[x]; y = (y + a) & 0xFF; b = m[y]; m[x] = (unsigned char) b; m[y] = (unsigned char) a; output[i] = (unsigned char) (input[i] ^ m[(unsigned char) (a + b)]); } ctx->x = x; ctx->y = y; return 0; }
O3
c
mbedtls_arc4_crypt: movl (%rdi), %eax movl 0x4(%rdi), %r8d testq %rsi, %rsi je 0x99baa pushq %rbx xorl %r9d, %r9d movl %r8d, %r10d incl %eax movzbl %al, %eax movb 0x8(%rdi,%rax), %r11b addb %r11b, %r10b movzbl %r10b, %r8d movb 0x8(%rdi,%r8), %bl movb %bl, 0x8(%rdi,%rax) movb %r11b, 0x8(%rdi,%r8) addb %r11b, %bl movzbl %bl, %r11d movb 0x8(%rdi,%r11), %r11b xorb (%rdx,%r9), %r11b movb %r11b, (%rcx,%r9) incq %r9 cmpq %r9, %rsi jne 0x99b6e popq %rbx movl %eax, (%rdi) movl %r8d, 0x4(%rdi) xorl %eax, %eax retq
mbedtls_arc4_crypt: mov eax, [rdi] mov r8d, [rdi+4] test rsi, rsi jz short loc_99BAA push rbx xor r9d, r9d mov r10d, r8d loc_99B6E: inc eax movzx eax, al mov r11b, [rdi+rax+8] add r10b, r11b movzx r8d, r10b mov bl, [rdi+r8+8] mov [rdi+rax+8], bl mov [rdi+r8+8], r11b add bl, r11b movzx r11d, bl mov r11b, [rdi+r11+8] xor r11b, [rdx+r9] mov [rcx+r9], r11b inc r9 cmp rsi, r9 jnz short loc_99B6E pop rbx loc_99BAA: mov [rdi], eax mov [rdi+4], r8d xor eax, eax retn
long long mbedtls_arc4_crypt(_DWORD *a1, long long a2, long long a3, long long a4) { long long v4; // rax int v5; // r8d long long v6; // r9 unsigned __int8 v7; // r10 char v8; // r11 char v9; // bl LODWORD(v4) = *a1; v5 = a1[1]; if ( a2 ) { v6 = 0LL; v7 = a1[1]; do { v4 = (unsigned __int8)(v4 + 1); v8 = *((_BYTE *)a1 + v4 + 8); v7 += v8; v5 = v7; v9 = *((_BYTE *)a1 + v7 + 8); *((_BYTE *)a1 + v4 + 8) = v9; *((_BYTE *)a1 + v7 + 8) = v8; *(_BYTE *)(a4 + v6) = *(_BYTE *)(a3 + v6) ^ *((_BYTE *)a1 + (unsigned __int8)(v8 + v9) + 8); ++v6; } while ( a2 != v6 ); } *a1 = v4; a1[1] = v5; return 0LL; }
mbedtls_arc4_crypt: MOV EAX,dword ptr [RDI] MOV R8D,dword ptr [RDI + 0x4] TEST RSI,RSI JZ 0x00199baa PUSH RBX XOR R9D,R9D MOV R10D,R8D LAB_00199b6e: INC EAX MOVZX EAX,AL MOV R11B,byte ptr [RDI + RAX*0x1 + 0x8] ADD R10B,R11B MOVZX R8D,R10B MOV BL,byte ptr [RDI + R8*0x1 + 0x8] MOV byte ptr [RDI + RAX*0x1 + 0x8],BL MOV byte ptr [RDI + R8*0x1 + 0x8],R11B ADD BL,R11B MOVZX R11D,BL MOV R11B,byte ptr [RDI + R11*0x1 + 0x8] XOR R11B,byte ptr [RDX + R9*0x1] MOV byte ptr [RCX + R9*0x1],R11B INC R9 CMP RSI,R9 JNZ 0x00199b6e POP RBX LAB_00199baa: MOV dword ptr [RDI],EAX MOV dword ptr [RDI + 0x4],R8D XOR EAX,EAX RET
int8 mbedtls_arc4_crypt(uint *param_1,long param_2,long param_3,long param_4) { char cVar1; char cVar2; uint uVar3; ulong uVar4; long lVar5; byte bVar6; uint uVar7; ulong uVar8; uVar3 = *param_1; uVar4 = (ulong)uVar3; uVar7 = param_1[1]; if (param_2 != 0) { lVar5 = 0; uVar8 = (ulong)uVar7; do { uVar3 = (int)uVar4 + 1U & 0xff; uVar4 = (ulong)uVar3; cVar1 = *(char *)((long)param_1 + uVar4 + 8); bVar6 = (char)uVar8 + cVar1; uVar8 = (ulong)bVar6; uVar7 = (uint)bVar6; cVar2 = *(char *)((long)param_1 + uVar8 + 8); *(char *)((long)param_1 + uVar4 + 8) = cVar2; *(char *)((long)param_1 + uVar8 + 8) = cVar1; *(byte *)(param_4 + lVar5) = *(byte *)((long)param_1 + (ulong)(byte)(cVar2 + cVar1) + 8) ^ *(byte *)(param_3 + lVar5); lVar5 = lVar5 + 1; } while (param_2 != lVar5); } *param_1 = uVar3; param_1[1] = uVar7; return 0; }
47,325
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, const std::string &) ) : args(args), value_hint(value_hint), help(help), handler_string(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x83ae2 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x83b64 movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x28252 movb $0x0, 0xb0(%rbx) movq $0x0, 0xb8(%rbx) movq %r14, 0xc0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x64444 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x20180 jmp 0x64444 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x83baa movq %rbx, %rdi callq 0x83baa movq %r14, %rdi callq 0x20b00 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax 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 byte ptr [rbx+0B0h], 0 mov qword ptr [rbx+0B8h], 0 mov [rbx+0C0h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C8h], xmm0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_64444 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_64444 mov r14, rax loc_64444: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 192) = a5; *(_OWORD *)(a1 + 200) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x00183ae2 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_001643b6: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x00183b64 MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_001643f0: CALL 0x00128252 LAB_001643f5: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],0x0 MOV qword ptr [RBX + 0xc0],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_string_ptr *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001643b6 to 001643c2 has its CatchHandler @ 00164441 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 001643f0 to 001643f4 has its CatchHandler @ 00164427 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
47,326
google::protobuf::compiler::java::Context::GetFieldGeneratorInfo(google::protobuf::FieldDescriptor const*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc
const FieldGeneratorInfo* Context::GetFieldGeneratorInfo( const FieldDescriptor* field) const { const FieldGeneratorInfo* result = FindOrNull(field_generator_info_map_, field); if (result == NULL) { GOOGLE_LOG(FATAL) << "Can not find FieldGeneratorInfo for field: " << field->full_name(); } return result; }
O3
cpp
google::protobuf::compiler::java::Context::GetFieldGeneratorInfo(google::protobuf::FieldDescriptor const*) const: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq 0x18(%rdi), %rcx testq %rcx, %rcx je 0xcef08 addq $0x10, %rdi movq %rdi, %rax xorl %edx, %edx cmpq %rbx, 0x20(%rcx) setb %dl cmovaeq %rcx, %rax movq 0x10(%rcx,%rdx,8), %rcx testq %rcx, %rcx jne 0xceee6 cmpq %rdi, %rax je 0xcef08 cmpq %rbx, 0x20(%rax) jbe 0xcef66 leaq 0x1016f0(%rip), %rdx # 0x1d05ff leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0xaf, %ecx callq 0x1072ba leaq 0x10176b(%rip), %rsi # 0x1d0698 movq %r14, %rdi callq 0x106db8 movq 0x8(%rbx), %rsi addq $0x20, %rsi movq %rax, %rdi callq 0x106dca leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x10(%rsp), %rdi callq 0x1072d8 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r14 retq addq $0x28, %rax jmp 0xcef5e jmp 0xcef6e movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1072d8 movq %rbx, %rdi callq 0x1f860 nop
_ZNK6google8protobuf8compiler4java7Context21GetFieldGeneratorInfoEPKNS0_15FieldDescriptorE: push r14 push rbx sub rsp, 48h mov rbx, rsi mov rcx, [rdi+18h] test rcx, rcx jz short loc_CEF08 add rdi, 10h mov rax, rdi loc_CEEE6: xor edx, edx cmp [rcx+20h], rbx setb dl cmovnb rax, rcx mov rcx, [rcx+rdx*8+10h] test rcx, rcx jnz short loc_CEEE6 cmp rax, rdi jz short loc_CEF08 cmp [rax+20h], rbx jbe short loc_CEF66 loc_CEF08: lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+58h+var_48] mov rdi, r14 mov esi, 3 mov ecx, 0AFh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCanNotFindFiel; "Can not find FieldGeneratorInfo for fie"... mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov rsi, [rbx+8] add rsi, 20h ; ' ' mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&) lea rdi, [rsp+58h+var_49] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() xor eax, eax loc_CEF5E: add rsp, 48h pop rbx pop r14 retn loc_CEF66: add rax, 28h ; '(' jmp short loc_CEF5E jmp short $+2 loc_CEF6E: mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
char * google::protobuf::compiler::java::Context::GetFieldGeneratorInfo( google::protobuf::compiler::java::Context *this, const google::protobuf::FieldDescriptor *a2) { char *v2; // rcx char *v3; // rdi char *v4; // rax long long v5; // rax long long v6; // rax char v8; // [rsp+Fh] [rbp-49h] BYREF _BYTE v9[72]; // [rsp+10h] [rbp-48h] BYREF v2 = (char *)*((_QWORD *)this + 3); if ( v2 ) { v3 = (char *)this + 16; v4 = v3; do { if ( *((_QWORD *)v2 + 4) >= (unsigned long long)a2 ) v4 = v2; v2 = *(char **)&v2[8 * (*((_QWORD *)v2 + 4) < (unsigned long long)a2) + 16]; } while ( v2 ); if ( v4 != v3 && *((_QWORD *)v4 + 4) <= (unsigned long long)a2 ) return v4 + 40; } google::protobuf::internal::LogMessage::LogMessage( v9, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc", 175LL); v5 = google::protobuf::internal::LogMessage::operator<<(v9, "Can not find FieldGeneratorInfo for field: "); v6 = google::protobuf::internal::LogMessage::operator<<(v5, *((_QWORD *)a2 + 1) + 32LL); google::protobuf::internal::LogFinisher::operator=(&v8, v6); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); return 0LL; }
GetFieldGeneratorInfo: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV RCX,qword ptr [RDI + 0x18] TEST RCX,RCX JZ 0x001cef08 ADD RDI,0x10 MOV RAX,RDI LAB_001ceee6: XOR EDX,EDX CMP qword ptr [RCX + 0x20],RBX SETC DL CMOVNC RAX,RCX MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10] TEST RCX,RCX JNZ 0x001ceee6 CMP RAX,RDI JZ 0x001cef08 CMP qword ptr [RAX + 0x20],RBX JBE 0x001cef66 LAB_001cef08: LEA RDX,[0x2d05ff] LEA R14,[RSP + 0x10] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0xaf CALL 0x002072ba LAB_001cef26: LEA RSI,[0x2d0698] MOV RDI,R14 CALL 0x00206db8 MOV RSI,qword ptr [RBX + 0x8] ADD RSI,0x20 MOV RDI,RAX CALL 0x00206dca LAB_001cef45: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x00206e92 LAB_001cef52: LEA RDI,[RSP + 0x10] CALL 0x002072d8 XOR EAX,EAX LAB_001cef5e: ADD RSP,0x48 POP RBX POP R14 RET LAB_001cef66: ADD RAX,0x28 JMP 0x001cef5e
/* google::protobuf::compiler::java::Context::GetFieldGeneratorInfo(google::protobuf::FieldDescriptor const*) const */ Context * __thiscall google::protobuf::compiler::java::Context::GetFieldGeneratorInfo (Context *this,FieldDescriptor *param_1) { Context *pCVar1; LogMessage *pLVar2; Context *pCVar3; LogFinisher local_49; LogMessage local_48 [56]; pCVar3 = *(Context **)(this + 0x18); if (pCVar3 != (Context *)0x0) { pCVar1 = this + 0x10; do { if (*(FieldDescriptor **)(pCVar3 + 0x20) >= param_1) { pCVar1 = pCVar3; } pCVar3 = *(Context **) (pCVar3 + (ulong)(*(FieldDescriptor **)(pCVar3 + 0x20) < param_1) * 8 + 0x10); } while (pCVar3 != (Context *)0x0); if ((pCVar1 != this + 0x10) && (*(FieldDescriptor **)(pCVar1 + 0x20) <= param_1)) { return pCVar1 + 0x28; } } internal::LogMessage::LogMessage (local_48,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc" ,0xaf); /* try { // try from 001cef26 to 001cef44 has its CatchHandler @ 001cef6e */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_48,"Can not find FieldGeneratorInfo for field: "); pLVar2 = (LogMessage *) internal::LogMessage::operator<<(pLVar2,(string *)(*(long *)(param_1 + 8) + 0x20)); /* try { // try from 001cef45 to 001cef51 has its CatchHandler @ 001cef6c */ internal::LogFinisher::operator=(&local_49,pLVar2); internal::LogMessage::~LogMessage(local_48); return (Context *)0x0; }
47,327
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O0
c
my_is_symlink: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x243c0 cmpl $0x0, %eax je 0x3eeed movl $0x0, -0x4(%rbp) jmp 0x3ef0c movl -0x88(%rbp), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0xa000, %eax # imm = 0xA000 sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopl (%rax,%rax)
my_is_symlink: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] lea rsi, [rbp+var_A0] call _lstat64 cmp eax, 0 jz short loc_3EEED mov [rbp+var_4], 0 jmp short loc_3EF0C loc_3EEED: mov eax, [rbp+var_88] and eax, 0F000h cmp eax, 0A000h setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_4], eax loc_3EF0C: mov eax, [rbp+var_4] add rsp, 0A0h pop rbp retn
_BOOL8 my_is_symlink(long long a1) { _BYTE v2[24]; // [rsp+0h] [rbp-A0h] BYREF int v3; // [rsp+18h] [rbp-88h] long long v4; // [rsp+90h] [rbp-10h] v4 = a1; return !(unsigned int)lstat64(a1, v2) && (v3 & 0xF000) == 40960; }
my_is_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0xa0] CALL 0x001243c0 CMP EAX,0x0 JZ 0x0013eeed MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013ef0c LAB_0013eeed: MOV EAX,dword ptr [RBP + -0x88] AND EAX,0xf000 CMP EAX,0xa000 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX LAB_0013ef0c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xa0 POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a8; char *local_18; local_18 = param_1; iVar1 = lstat64(param_1,&local_a8); return iVar1 == 0 && (local_a8.st_mode & 0xf000) == 0xa000; }
47,328
language::init_late()
untodesu[P]voxelius/game/client/language.cc
void language::init_late(void) { auto user_language = ietf_map.find(config_language.get()); if(user_language != ietf_map.cend()) { language::set(user_language->second); return; } auto fallback = ietf_map.find(DEFAULT_LANGUAGE); if(fallback != ietf_map.cend()) { language::set(fallback->second); return; } spdlog::critical("language: we're doomed!"); spdlog::critical("language: {} doesn't exist!", DEFAULT_LANGUAGE); std::terminate(); }
O3
cpp
language::init_late(): pushq %r14 pushq %rbx subq $0x28, %rsp leaq 0x206320(%rip), %rdi # 0x25a238 callq 0x12d72e leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %rax, %rsi callq 0x2f9b0 leaq 0x2062ca(%rip), %rdi # 0x25a200 leaq 0x8(%rsp), %rsi callq 0x5566e movq %rax, %rbx leaq 0x18(%rsp), %r14 movq -0x10(%r14), %rdi cmpq %r14, %rdi je 0x53f5e movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 testq %rbx, %rbx jne 0x53fae leaq 0x8(%rsp), %rdi movq %r14, (%rdi) leaq 0x1444f7(%rip), %rsi # 0x198469 leaq 0x1444f5(%rip), %rdx # 0x19846e callq 0x30770 leaq 0x20627b(%rip), %rdi # 0x25a200 leaq 0x8(%rsp), %rsi callq 0x5566e movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x53fa9 movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 testq %rbx, %rbx je 0x53fbf movq 0x28(%rbx), %rdi callq 0x54024 addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x1444f0(%rip), %rdi # 0x1984b6 callq 0x54660 leaq 0x1444fc(%rip), %rdi # 0x1984ce leaq 0x1fc867(%rip), %rdx # 0x250840 movl $0x1b, %esi callq 0x5458c callq 0x261e0 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi jne 0x5400a jmp 0x5401c jmp 0x54019 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5401c movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 jmp 0x5401c movq %rax, %rbx movq %rbx, %rdi callq 0x26ff0
_ZN8language9init_lateEv: push r14; int push rbx; __int64 sub rsp, 28h lea rdi, _ZL15config_language; this call _ZNK12ConfigString3getEv; ConfigString::get(void) lea rdi, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _ZL8ietf_mapB5cxx11; ietf_map lea rsi, [rsp+38h+var_30] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N9__gnu_cxx17__normal_iteratorIPK12LanguageInfoSt6vectorISA_SaISA_EEEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>,std::allocator<std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax lea r14, [rsp+38h+var_20] mov rdi, [r14-10h]; void * cmp rdi, r14 jz short loc_53F5E mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_53F5E: test rbx, rbx jnz short loc_53FAE lea rdi, [rsp+38h+var_30] mov [rdi], r14 lea rsi, aEnUs; "en_US" lea rdx, aEnUs+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, _ZL8ietf_mapB5cxx11; ietf_map lea rsi, [rsp+38h+var_30] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N9__gnu_cxx17__normal_iteratorIPK12LanguageInfoSt6vectorISA_SaISA_EEEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>,std::allocator<std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax mov rdi, [rsp+38h+var_30]; void * cmp rdi, r14 jz short loc_53FA9 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_53FA9: test rbx, rbx jz short loc_53FBF loc_53FAE: mov rdi, [rbx+28h]; int call _ZN8language3setEN9__gnu_cxx17__normal_iteratorIPK12LanguageInfoSt6vectorIS2_SaIS2_EEEE; language::set(__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>) add rsp, 28h pop rbx pop r14 retn loc_53FBF: lea rdi, aLanguageWeReDo; "language: we're doomed!" call _ZN6spdlog8criticalIA24_cEEvRKT_; spdlog::critical<char [24]>(char [24] const&) lea rdi, aLanguageDoesnT; "language: {} doesn't exist!" lea rdx, _ZL16DEFAULT_LANGUAGE; DEFAULT_LANGUAGE mov esi, 1Bh call _ZN6spdlog8criticalIJRKPKcEEEvN3fmt3v1119basic_format_stringIcJDpNS6_13type_identityIT_E4typeEEEEDpOS9_; spdlog::critical<char const* const&>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<char const* const&>::type>,char const* const&&&) call __ZSt9terminatev; std::terminate(void) mov rbx, rax mov rdi, [rsp+38h+var_30] cmp rdi, r14 jnz short loc_5400A jmp short loc_5401C jmp short loc_54019 mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5401C loc_5400A: mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5401C loc_54019: mov rbx, rax loc_5401C: mov rdi, rbx call __Unwind_Resume
init_late: PUSH R14 PUSH RBX SUB RSP,0x28 LEA RDI,[0x35a238] CALL 0x0022d72e LAB_00153f1d: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,RAX CALL 0x0012f9b0 LAB_00153f2f: LEA RDI,[0x35a200] LEA RSI,[RSP + 0x8] CALL 0x0015566e MOV RBX,RAX LEA R14,[RSP + 0x18] MOV RDI,qword ptr [R14 + -0x10] CMP RDI,R14 JZ 0x00153f5e MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001268e0 LAB_00153f5e: TEST RBX,RBX JNZ 0x00153fae LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R14 LAB_00153f6b: LEA RSI,[0x298469] LEA RDX,[0x29846e] CALL 0x00130770 LAB_00153f7e: LEA RDI,[0x35a200] LEA RSI,[RSP + 0x8] CALL 0x0015566e LAB_00153f8f: MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x00153fa9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001268e0 LAB_00153fa9: TEST RBX,RBX JZ 0x00153fbf LAB_00153fae: MOV RDI,qword ptr [RBX + 0x28] CALL 0x00154024 ADD RSP,0x28 POP RBX POP R14 RET LAB_00153fbf: LEA RDI,[0x2984b6] CALL 0x00154660 LEA RDI,[0x2984ce] LEA RDX,[0x350840] MOV ESI,0x1b CALL 0x0015458c CALL 0x001261e0
/* language::init_late() */ void language::init_late(void) { char *pcVar1; long lVar2; allocator local_31; long *local_30 [2]; long local_20 [2]; pcVar1 = (char *)ConfigString::get((ConfigString *)config_language); /* try { // try from 00153f1d to 00153f2e has its CatchHandler @ 00154019 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_30,pcVar1,&local_31); /* try { // try from 00153f2f to 00153f3f has its CatchHandler @ 00153ff9 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)ietf_map_abi_cxx11_,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } if (lVar2 == 0) { local_30[0] = local_20; /* try { // try from 00153f6b to 00153f7d has its CatchHandler @ 00153ff7 */ std::__cxx11::string::_M_construct<char_const*>(local_30,&DAT_00298469,&DAT_0029846e); /* try { // try from 00153f7e to 00153f8e has its CatchHandler @ 00153fe8 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)ietf_map_abi_cxx11_,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } if (lVar2 == 0) { spdlog::critical<char[24]>("language: we\'re doomed!"); spdlog::critical<char_const*const&>("language: {} doesn\'t exist!",0x1b,&DEFAULT_LANGUAGE); /* WARNING: Subroutine does not return */ std::terminate(); } } set(*(int8 *)(lVar2 + 0x28)); return; }
47,329
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq (%rsi), %r12 movq 0x8(%rsi), %r13 cmpq %r13, %r12 je 0x89e6b movq %rdi, %rbx leaq 0x18(%rsp), %rbp movq 0x18(%rbx), %rax movq 0x20(%rbx), %rsi subq %rsi, %rax movq 0x8(%r12), %rdx cmpq %rdx, %rax jl 0x89e5e addq %rsi, %rdx movq %rbp, 0x8(%rsp) leaq 0x8(%rsp), %rdi callq 0x70792 movq 0x10(%rsp), %rdx cmpq 0x8(%r12), %rdx jne 0x89e37 movq 0x8(%rsp), %r15 testq %rdx, %rdx je 0x89e41 movq (%r12), %rsi movq %r15, %rdi callq 0x1a930 testl %eax, %eax sete %r14b jmp 0x89e44 movq 0x8(%rsp), %r15 xorl %r14d, %r14d jmp 0x89e44 movb $0x1, %r14b cmpq %rbp, %r15 je 0x89e59 movq 0x18(%rsp), %rsi incq %rsi movq %r15, %rdi callq 0x1a8f0 testb %r14b, %r14b jne 0x89e6f addq $0x20, %r12 cmpq %r13, %r12 jne 0x89de6 xorl %eax, %eax jmp 0x89e71 movb $0x1, %al addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZNK5minja6Parser11peekSymbolsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, [rsi] mov r13, [rsi+8] cmp r12, r13 jz loc_89E6B mov rbx, rdi lea rbp, [rsp+58h+var_40] loc_89DE6: mov rax, [rbx+18h] mov rsi, [rbx+20h] sub rax, rsi mov rdx, [r12+8] cmp rax, rdx jl short loc_89E5E add rdx, rsi mov [rsp+58h+var_50], rbp lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdx, [rsp+58h+var_48] cmp rdx, [r12+8] jnz short loc_89E37 mov r15, [rsp+58h+var_50] test rdx, rdx jz short loc_89E41 mov rsi, [r12] mov rdi, r15 call _bcmp test eax, eax setz r14b jmp short loc_89E44 loc_89E37: mov r15, [rsp+58h+var_50] xor r14d, r14d jmp short loc_89E44 loc_89E41: mov r14b, 1 loc_89E44: cmp r15, rbp jz short loc_89E59 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_89E59: test r14b, r14b jnz short loc_89E6F loc_89E5E: add r12, 20h ; ' ' cmp r12, r13 jnz loc_89DE6 loc_89E6B: xor eax, eax jmp short loc_89E71 loc_89E6F: mov al, 1 loc_89E71: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char minja::Parser::peekSymbols(long long a1, _QWORD *a2) { _QWORD *v2; // r12 _QWORD *v3; // r13 _BYTE *v4; // rsi long long v5; // rdx _QWORD *v6; // r15 bool v7; // r14 void *v9; // [rsp+8h] [rbp-50h] BYREF long long v10; // [rsp+10h] [rbp-48h] _QWORD v11[8]; // [rsp+18h] [rbp-40h] BYREF v2 = (_QWORD *)*a2; v3 = (_QWORD *)a2[1]; if ( (_QWORD *)*a2 == v3 ) return 0; while ( 1 ) { v4 = *(_BYTE **)(a1 + 32); v5 = v2[1]; if ( *(_QWORD *)(a1 + 24) - (_QWORD)v4 >= v5 ) { v9 = v11; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>( (long long)&v9, v4, (long long)&v4[v5]); if ( v10 == v2[1] ) { v6 = v9; v7 = !v10 || (unsigned int)bcmp(v9, *v2) == 0; } else { v6 = v9; v7 = 0; } if ( v6 != v11 ) operator delete(v6, v11[0] + 1LL); if ( v7 ) break; } v2 += 4; if ( v2 == v3 ) return 0; } return 1; }
peekSymbols: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] CMP R12,R13 JZ 0x00189e6b MOV RBX,RDI LEA RBP,[RSP + 0x18] LAB_00189de6: MOV RAX,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x20] SUB RAX,RSI MOV RDX,qword ptr [R12 + 0x8] CMP RAX,RDX JL 0x00189e5e ADD RDX,RSI MOV qword ptr [RSP + 0x8],RBP LEA RDI,[RSP + 0x8] CALL 0x00170792 MOV RDX,qword ptr [RSP + 0x10] CMP RDX,qword ptr [R12 + 0x8] JNZ 0x00189e37 MOV R15,qword ptr [RSP + 0x8] TEST RDX,RDX JZ 0x00189e41 MOV RSI,qword ptr [R12] MOV RDI,R15 CALL 0x0011a930 TEST EAX,EAX SETZ R14B JMP 0x00189e44 LAB_00189e37: MOV R15,qword ptr [RSP + 0x8] XOR R14D,R14D JMP 0x00189e44 LAB_00189e41: MOV R14B,0x1 LAB_00189e44: CMP R15,RBP JZ 0x00189e59 MOV RSI,qword ptr [RSP + 0x18] INC RSI MOV RDI,R15 CALL 0x0011a8f0 LAB_00189e59: TEST R14B,R14B JNZ 0x00189e6f LAB_00189e5e: ADD R12,0x20 CMP R12,R13 JNZ 0x00189de6 LAB_00189e6b: XOR EAX,EAX JMP 0x00189e71 LAB_00189e6f: MOV AL,0x1 LAB_00189e71: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Parser::peekSymbols(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) const */ int8 __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1) { int8 *puVar1; long lVar2; long *plVar3; int iVar4; int8 *puVar5; bool bVar6; long *local_50; size_t local_48; long local_40 [2]; puVar5 = *(int8 **)param_1; puVar1 = *(int8 **)(param_1 + 8); if (puVar5 != puVar1) { do { lVar2 = *(long *)(this + 0x20); if ((long)puVar5[1] <= *(long *)(this + 0x18) - lVar2) { local_50 = local_40; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_50,lVar2,puVar5[1] + lVar2); plVar3 = local_50; if (local_48 == puVar5[1]) { if (local_48 == 0) { bVar6 = true; } else { iVar4 = bcmp(local_50,(void *)*puVar5,local_48); bVar6 = iVar4 == 0; } } else { bVar6 = false; } if (plVar3 != local_40) { operator_delete(plVar3,local_40[0] + 1); } if (bVar6) { return 1; } } puVar5 = puVar5 + 4; } while (puVar5 != puVar1); } return 0; }
47,330
re_parse_disjunction
bluesky950520[P]quickjs/libregexp.c
static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir) { int start, len, pos; if (lre_check_stack_overflow(s->opaque, 0)) return re_parse_error(s, "stack overflow"); start = s->byte_code.size; if (re_parse_alternative(s, is_backward_dir)) return -1; while (*s->buf_ptr == '|') { s->buf_ptr++; len = s->byte_code.size - start; /* insert a split before the first alternative */ if (dbuf_insert(&s->byte_code, start, 5)) { return re_parse_out_of_memory(s); } s->byte_code.buf[start] = REOP_split_next_first; put_u32(s->byte_code.buf + start + 1, len + 5); pos = re_emit_op_u32(s, REOP_goto, 0); if (re_parse_alternative(s, is_backward_dir)) return -1; /* patch the goto */ len = s->byte_code.size - (pos + 4); put_u32(s->byte_code.buf + pos, len); } return 0; }
O0
c
re_parse_disjunction: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq 0x18(%rsp), %rax movq 0x68(%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4dcb0 cmpl $0x0, %eax je 0xfd8c0 movq 0x18(%rsp), %rdi leaq 0x15053(%rip), %rsi # 0x112903 movb $0x0, %al callq 0xfda10 movl %eax, 0x24(%rsp) jmp 0xfd9f8 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movl %eax, 0x10(%rsp) movq 0x18(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x1002c0 cmpl $0x0, %eax je 0xfd8ed movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0xfd9f8 jmp 0xfd8ef movq 0x18(%rsp), %rax movq 0x30(%rax), %rax movzbl (%rax), %eax cmpl $0x7c, %eax jne 0xfd9f0 movq 0x18(%rsp), %rax movq 0x30(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x30(%rax) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movslq 0x10(%rsp), %rcx subq %rcx, %rax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rdi movl 0x10(%rsp), %esi movl $0x5, %edx callq 0x100400 cmpl $0x0, %eax je 0xfd955 movq 0x18(%rsp), %rdi callq 0xfdaf0 movl %eax, 0x24(%rsp) jmp 0xfd9f8 movq 0x18(%rsp), %rax movq (%rax), %rax movslq 0x10(%rsp), %rcx movb $0xa, (%rax,%rcx) movq 0x18(%rsp), %rax movq (%rax), %rdi movslq 0x10(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi movl 0xc(%rsp), %esi addl $0x5, %esi callq 0xfdc70 movq 0x18(%rsp), %rdi movl $0x8, %esi xorl %edx, %edx callq 0xfd7c0 movl %eax, 0x8(%rsp) movq 0x18(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x1002c0 cmpl $0x0, %eax je 0xfd9b8 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0xfd9f8 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movl 0x8(%rsp), %ecx addl $0x4, %ecx movslq %ecx, %rcx subq %rcx, %rax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rdi movslq 0x8(%rsp), %rax addq %rax, %rdi movl 0xc(%rsp), %esi callq 0xfdc70 jmp 0xfd8ef movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
re_parse_disjunction: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov rax, [rsp+28h+var_10] mov rdi, [rax+68h] xor eax, eax mov esi, eax call lre_check_stack_overflow cmp eax, 0 jz short loc_FD8C0 mov rdi, [rsp+28h+var_10] lea rsi, aStackOverflow; "stack overflow" mov al, 0 call re_parse_error mov [rsp+28h+var_4], eax jmp loc_FD9F8 loc_FD8C0: mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], eax mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_14] call re_parse_alternative cmp eax, 0 jz short loc_FD8ED mov [rsp+28h+var_4], 0FFFFFFFFh jmp loc_FD9F8 loc_FD8ED: jmp short $+2 loc_FD8EF: mov rax, [rsp+28h+var_10] mov rax, [rax+30h] movzx eax, byte ptr [rax] cmp eax, 7Ch ; '|' jnz loc_FD9F0 mov rax, [rsp+28h+var_10] mov rcx, [rax+30h] add rcx, 1 mov [rax+30h], rcx mov rax, [rsp+28h+var_10] mov rax, [rax+8] movsxd rcx, [rsp+28h+var_18] sub rax, rcx mov [rsp+28h+var_1C], eax mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_18] mov edx, 5 call dbuf_insert cmp eax, 0 jz short loc_FD955 mov rdi, [rsp+28h+var_10] call re_parse_out_of_memory mov [rsp+28h+var_4], eax jmp loc_FD9F8 loc_FD955: mov rax, [rsp+28h+var_10] mov rax, [rax] movsxd rcx, [rsp+28h+var_18] mov byte ptr [rax+rcx], 0Ah mov rax, [rsp+28h+var_10] mov rdi, [rax] movsxd rax, [rsp+28h+var_18] add rdi, rax add rdi, 1 mov esi, [rsp+28h+var_1C] add esi, 5 call put_u32_0 mov rdi, [rsp+28h+var_10] mov esi, 8 xor edx, edx call re_emit_op_u32 mov [rsp+28h+var_20], eax mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_14] call re_parse_alternative cmp eax, 0 jz short loc_FD9B8 mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_FD9F8 loc_FD9B8: mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov ecx, [rsp+28h+var_20] add ecx, 4 movsxd rcx, ecx sub rax, rcx mov [rsp+28h+var_1C], eax mov rax, [rsp+28h+var_10] mov rdi, [rax] movsxd rax, [rsp+28h+var_20] add rdi, rax mov esi, [rsp+28h+var_1C] call put_u32_0 jmp loc_FD8EF loc_FD9F0: mov [rsp+28h+var_4], 0 loc_FD9F8: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long re_parse_disjunction(_QWORD *a1, unsigned int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v7; // [rsp+8h] [rbp-20h] int v8; // [rsp+Ch] [rbp-1Ch] unsigned int v9; // [rsp+10h] [rbp-18h] if ( (unsigned int)lre_check_stack_overflow(a1[13], 0LL) ) { return (unsigned int)re_parse_error((_DWORD)a1, (unsigned int)"stack overflow", v2, v3, v4, v5); } else { v9 = a1[1]; if ( (unsigned int)re_parse_alternative(a1, a2) ) { return (unsigned int)-1; } else { while ( *(_BYTE *)a1[6] == 124 ) { ++a1[6]; v8 = a1[1] - v9; if ( (unsigned int)dbuf_insert(a1, v9, 5LL) ) return (unsigned int)re_parse_out_of_memory(a1); *(_BYTE *)(*a1 + (int)v9) = 10; put_u32_0((int)v9 + *a1 + 1LL, (unsigned int)(v8 + 5)); v7 = re_emit_op_u32(a1, 8, 0); if ( (unsigned int)re_parse_alternative(a1, a2) ) return (unsigned int)-1; put_u32_0(v7 + *a1, (unsigned int)a1[1] - (v7 + 4)); } return 0; } } }
re_parse_disjunction: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x68] XOR EAX,EAX MOV ESI,EAX CALL 0x0014dcb0 CMP EAX,0x0 JZ 0x001fd8c0 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x212903] MOV AL,0x0 CALL 0x001fda10 MOV dword ptr [RSP + 0x24],EAX JMP 0x001fd9f8 LAB_001fd8c0: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x14] CALL 0x002002c0 CMP EAX,0x0 JZ 0x001fd8ed MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x001fd9f8 LAB_001fd8ed: JMP 0x001fd8ef LAB_001fd8ef: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7c JNZ 0x001fd9f0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x30] ADD RCX,0x1 MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x10] SUB RAX,RCX MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x10] MOV EDX,0x5 CALL 0x00200400 CMP EAX,0x0 JZ 0x001fd955 MOV RDI,qword ptr [RSP + 0x18] CALL 0x001fdaf0 MOV dword ptr [RSP + 0x24],EAX JMP 0x001fd9f8 LAB_001fd955: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x10] MOV byte ptr [RAX + RCX*0x1],0xa MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOVSXD RAX,dword ptr [RSP + 0x10] ADD RDI,RAX ADD RDI,0x1 MOV ESI,dword ptr [RSP + 0xc] ADD ESI,0x5 CALL 0x001fdc70 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x8 XOR EDX,EDX CALL 0x001fd7c0 MOV dword ptr [RSP + 0x8],EAX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x14] CALL 0x002002c0 CMP EAX,0x0 JZ 0x001fd9b8 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x001fd9f8 LAB_001fd9b8: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RSP + 0x8] ADD ECX,0x4 MOVSXD RCX,ECX SUB RAX,RCX MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOVSXD RAX,dword ptr [RSP + 0x8] ADD RDI,RAX MOV ESI,dword ptr [RSP + 0xc] CALL 0x001fdc70 JMP 0x001fd8ef LAB_001fd9f0: MOV dword ptr [RSP + 0x24],0x0 LAB_001fd9f8: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 re_parse_disjunction(long *param_1,int4 param_2) { long lVar1; int iVar2; int iVar3; int4 uVar4; int iVar5; int4 local_4; iVar2 = lre_check_stack_overflow(param_1[0xd],0); if (iVar2 == 0) { iVar2 = (int)param_1[1]; iVar3 = re_parse_alternative(param_1,param_2); if (iVar3 == 0) { while (*(char *)param_1[6] == '|') { param_1[6] = param_1[6] + 1; lVar1 = param_1[1]; iVar3 = dbuf_insert(param_1,iVar2,5); if (iVar3 != 0) { uVar4 = re_parse_out_of_memory(param_1); return uVar4; } *(int1 *)(*param_1 + (long)iVar2) = 10; put_u32(*param_1 + (long)iVar2 + 1,((int)lVar1 - iVar2) + 5); iVar3 = re_emit_op_u32(param_1,8,0); iVar5 = re_parse_alternative(param_1,param_2); if (iVar5 != 0) { return 0xffffffff; } put_u32(*param_1 + (long)iVar3,(int)param_1[1] - (iVar3 + 4)); } local_4 = 0; } else { local_4 = 0xffffffff; } } else { local_4 = re_parse_error(param_1,"stack overflow"); } return local_4; }
47,331
re_parse_disjunction
bluesky950520[P]quickjs/libregexp.c
static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir) { int start, len, pos; if (lre_check_stack_overflow(s->opaque, 0)) return re_parse_error(s, "stack overflow"); start = s->byte_code.size; if (re_parse_alternative(s, is_backward_dir)) return -1; while (*s->buf_ptr == '|') { s->buf_ptr++; len = s->byte_code.size - start; /* insert a split before the first alternative */ if (dbuf_insert(&s->byte_code, start, 5)) { return re_parse_out_of_memory(s); } s->byte_code.buf[start] = REOP_split_next_first; put_u32(s->byte_code.buf + start + 1, len + 5); pos = re_emit_op_u32(s, REOP_goto, 0); if (re_parse_alternative(s, is_backward_dir)) return -1; /* patch the goto */ len = s->byte_code.size - (pos + 4); put_u32(s->byte_code.buf + pos, len); } return 0; }
O1
c
re_parse_disjunction: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq 0x68(%rdi), %rdi xorl %esi, %esi callq 0x3352e testl %eax, %eax je 0x94b8b leaq 0xe91b(%rip), %rsi # 0xa3491 movq %rbx, %rdi xorl %eax, %eax callq 0x94c6a movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x94c4c movq 0x8(%rbx), %r15 movq %rbx, %rdi movl %ebp, %esi callq 0x95ead movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x94c4c movq 0x30(%rbx), %rax cmpb $0x7c, (%rax) jne 0x94c49 movslq %r15d, %r13 incq %rax movq %rax, 0x30(%rbx) movq 0x8(%rbx), %r12 movq %rbx, %rdi movl %r15d, %esi movl $0x5, %edx callq 0x973da testl %eax, %eax jne 0x94c5e subl %r15d, %r12d movq (%rbx), %rax movb $0xa, (%rax,%r13) movq (%rbx), %rax addl $0x5, %r12d movl %r12d, 0x1(%rax,%r13) movq %rbx, %rdi movl $0x8, %esi callq 0x1b4d0 movq 0x8(%rbx), %r12 movl $0x0, 0x4(%rsp) movl $0x4, %edx movq %rbx, %rdi leaq 0x4(%rsp), %rsi callq 0x1b422 movq %rbx, %rdi movl %ebp, %esi callq 0x95ead testl %eax, %eax jne 0x94c4c movl 0x8(%rbx), %eax subl %r12d, %eax addl $-0x4, %eax movq (%rbx), %rcx movslq %r12d, %rdx movl %eax, (%rcx,%rdx) movq 0x30(%rbx), %rax cmpb $0x7c, (%rax) je 0x94bb7 xorl %r14d, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa01b(%rip), %rsi # 0x9ec80 jmp 0x94b76
re_parse_disjunction: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, esi mov rbx, rdi mov rdi, [rdi+68h] xor esi, esi call lre_check_stack_overflow test eax, eax jz short loc_94B8B lea rsi, aStackOverflow; "stack overflow" loc_94B76: mov rdi, rbx xor eax, eax call re_parse_error mov r14d, 0FFFFFFFFh jmp loc_94C4C loc_94B8B: mov r15, [rbx+8] mov rdi, rbx mov esi, ebp call re_parse_alternative mov r14d, 0FFFFFFFFh test eax, eax jnz loc_94C4C mov rax, [rbx+30h] cmp byte ptr [rax], 7Ch ; '|' jnz loc_94C49 movsxd r13, r15d loc_94BB7: inc rax mov [rbx+30h], rax mov r12, [rbx+8] mov rdi, rbx mov esi, r15d mov edx, 5 call dbuf_insert test eax, eax jnz loc_94C5E sub r12d, r15d mov rax, [rbx] mov byte ptr [rax+r13], 0Ah mov rax, [rbx] add r12d, 5 mov [rax+r13+1], r12d mov rdi, rbx mov esi, 8 call dbuf_putc mov r12, [rbx+8] mov [rsp+38h+var_34], 0 mov edx, 4 mov rdi, rbx lea rsi, [rsp+38h+var_34] call dbuf_put mov rdi, rbx mov esi, ebp call re_parse_alternative test eax, eax jnz short loc_94C4C mov eax, [rbx+8] sub eax, r12d add eax, 0FFFFFFFCh mov rcx, [rbx] movsxd rdx, r12d mov [rcx+rdx], eax mov rax, [rbx+30h] cmp byte ptr [rax], 7Ch ; '|' jz loc_94BB7 loc_94C49: xor r14d, r14d loc_94C4C: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_94C5E: lea rsi, aOutOfMemory; "out of memory" jmp loc_94B76
long long re_parse_disjunction(_QWORD *a1, unsigned int a2) { long long v2; // rax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d const char *v7; // rsi unsigned int v8; // r14d long long v9; // r15 _BYTE *v10; // rax long long v11; // r12 long long v12; // r12 _DWORD v14[13]; // [rsp+0h] [rbp-34h] BYREF v14[0] = HIDWORD(v2); if ( lre_check_stack_overflow(a1[13], 0LL) ) { v7 = "stack overflow"; } else { v9 = a1[1]; v8 = -1; if ( (unsigned int)re_parse_alternative(a1, a2) ) return v8; v10 = (_BYTE *)a1[6]; if ( *v10 != 124 ) return 0; while ( 1 ) { a1[6] = v10 + 1; v11 = a1[1]; if ( (unsigned int)dbuf_insert(a1, (unsigned int)v9, 5LL) ) break; *(_BYTE *)(*a1 + (int)v9) = 10; *(_DWORD *)(*a1 + (int)v9 + 1LL) = v11 - v9 + 5; dbuf_putc(a1, 8); v12 = a1[1]; v14[0] = 0; dbuf_put(a1, (long long)v14, 4LL); if ( (unsigned int)re_parse_alternative(a1, a2) ) return v8; *(_DWORD *)(*a1 + (int)v12) = *((_DWORD *)a1 + 2) - v12 - 4; v10 = (_BYTE *)a1[6]; if ( *v10 != 124 ) return 0; } v7 = "out of memory"; } re_parse_error((_DWORD)a1, (_DWORD)v7, v3, v4, v5, v6); return (unsigned int)-1; }
re_parse_disjunction: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x68] XOR ESI,ESI CALL 0x0013352e TEST EAX,EAX JZ 0x00194b8b LEA RSI,[0x1a3491] LAB_00194b76: MOV RDI,RBX XOR EAX,EAX CALL 0x00194c6a MOV R14D,0xffffffff JMP 0x00194c4c LAB_00194b8b: MOV R15,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,EBP CALL 0x00195ead MOV R14D,0xffffffff TEST EAX,EAX JNZ 0x00194c4c MOV RAX,qword ptr [RBX + 0x30] CMP byte ptr [RAX],0x7c JNZ 0x00194c49 MOVSXD R13,R15D LAB_00194bb7: INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R12,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,R15D MOV EDX,0x5 CALL 0x001973da TEST EAX,EAX JNZ 0x00194c5e SUB R12D,R15D MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R13*0x1],0xa MOV RAX,qword ptr [RBX] ADD R12D,0x5 MOV dword ptr [RAX + R13*0x1 + 0x1],R12D MOV RDI,RBX MOV ESI,0x8 CALL 0x0011b4d0 MOV R12,qword ptr [RBX + 0x8] MOV dword ptr [RSP + 0x4],0x0 MOV EDX,0x4 MOV RDI,RBX LEA RSI,[RSP + 0x4] CALL 0x0011b422 MOV RDI,RBX MOV ESI,EBP CALL 0x00195ead TEST EAX,EAX JNZ 0x00194c4c MOV EAX,dword ptr [RBX + 0x8] SUB EAX,R12D ADD EAX,-0x4 MOV RCX,qword ptr [RBX] MOVSXD RDX,R12D MOV dword ptr [RCX + RDX*0x1],EAX MOV RAX,qword ptr [RBX + 0x30] CMP byte ptr [RAX],0x7c JZ 0x00194bb7 LAB_00194c49: XOR R14D,R14D LAB_00194c4c: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00194c5e: LEA RSI,[0x19ec80] JMP 0x00194b76
int8 re_parse_disjunction(long *param_1,int4 param_2) { ulong uVar1; long lVar2; int iVar3; int iVar4; ulong in_RAX; char *pcVar5; int8 uVar6; int8 uStack_38; uStack_38 = in_RAX; iVar3 = lre_check_stack_overflow(param_1[0xd],0); if (iVar3 == 0) { uVar1 = param_1[1]; iVar3 = re_parse_alternative(param_1,param_2); uVar6 = 0xffffffff; if (iVar3 == 0) { pcVar5 = (char *)param_1[6]; if (*pcVar5 == '|') { iVar3 = (int)uVar1; do { param_1[6] = (long)(pcVar5 + 1); lVar2 = param_1[1]; iVar4 = dbuf_insert(param_1,uVar1 & 0xffffffff,5); if (iVar4 != 0) { pcVar5 = "out of memory"; goto LAB_00194b76; } *(int1 *)(*param_1 + (long)iVar3) = 10; *(int *)(*param_1 + 1 + (long)iVar3) = ((int)lVar2 - iVar3) + 5; dbuf_putc(param_1,8); lVar2 = param_1[1]; uStack_38 = uStack_38 & 0xffffffff; dbuf_put(param_1,(long)&uStack_38 + 4,4); iVar4 = re_parse_alternative(param_1,param_2); if (iVar4 != 0) { return 0xffffffff; } *(int *)(*param_1 + (long)(int)lVar2) = ((int)param_1[1] - (int)lVar2) + -4; pcVar5 = (char *)param_1[6]; } while (*pcVar5 == '|'); } uVar6 = 0; } } else { pcVar5 = "stack overflow"; LAB_00194b76: re_parse_error(param_1,pcVar5); uVar6 = 0xffffffff; } return uVar6; }
47,332
re_parse_disjunction
bluesky950520[P]quickjs/libregexp.c
static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir) { int start, len, pos; if (lre_check_stack_overflow(s->opaque, 0)) return re_parse_error(s, "stack overflow"); start = s->byte_code.size; if (re_parse_alternative(s, is_backward_dir)) return -1; while (*s->buf_ptr == '|') { s->buf_ptr++; len = s->byte_code.size - start; /* insert a split before the first alternative */ if (dbuf_insert(&s->byte_code, start, 5)) { return re_parse_out_of_memory(s); } s->byte_code.buf[start] = REOP_split_next_first; put_u32(s->byte_code.buf + start + 1, len + 5); pos = re_emit_op_u32(s, REOP_goto, 0); if (re_parse_alternative(s, is_backward_dir)) return -1; /* patch the goto */ len = s->byte_code.size - (pos + 4); put_u32(s->byte_code.buf + pos, len); } return 0; }
O2
c
re_parse_disjunction: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq 0x68(%rdi), %rdi xorl %esi, %esi callq 0x2cb89 testl %eax, %eax je 0x7bf15 leaq 0xe49e(%rip), %rsi # 0x8a3a3 movq %rbx, %rdi xorl %eax, %eax callq 0x7bfc4 pushq $-0x1 popq %r14 jmp 0x7bf2b movq 0x8(%rbx), %r15 movq %rbx, %rdi movl %ebp, %esi callq 0x7d18d pushq $-0x1 popq %r14 testl %eax, %eax je 0x7bf3d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq %r15d, %r12 movq 0x30(%rbx), %rax cmpb $0x7c, (%rax) jne 0x7bfaf incq %rax movq %rax, 0x30(%rbx) movq 0x8(%rbx), %r13 movq %rbx, %rdi movl %r15d, %esi pushq $0x5 popq %rdx callq 0x7e257 testl %eax, %eax jne 0x7bfb7 subl %r15d, %r13d movq (%rbx), %rax movb $0xa, (%rax,%r12) movq (%rbx), %rax addl $0x5, %r13d movl %r13d, 0x1(%rax,%r12) movq %rbx, %rdi pushq $0x8 popq %rsi xorl %edx, %edx callq 0x7be93 movl %eax, %r13d movq %rbx, %rdi movl %ebp, %esi callq 0x7d18d testl %eax, %eax jne 0x7bf2b movl 0x8(%rbx), %eax subl %r13d, %eax addl $-0x4, %eax movq (%rbx), %rcx movslq %r13d, %rdx movl %eax, (%rcx,%rdx) jmp 0x7bf40 xorl %r14d, %r14d jmp 0x7bf2b movq %rbx, %rdi callq 0x7c05a jmp 0x7bf2b
re_parse_disjunction: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, esi mov rbx, rdi mov rdi, [rdi+68h] xor esi, esi call lre_check_stack_overflow test eax, eax jz short loc_7BF15 lea rsi, aStackOverflow; "stack overflow" mov rdi, rbx xor eax, eax call re_parse_error push 0FFFFFFFFFFFFFFFFh pop r14 jmp short loc_7BF2B loc_7BF15: mov r15, [rbx+8] mov rdi, rbx mov esi, ebp call re_parse_alternative push 0FFFFFFFFFFFFFFFFh pop r14 test eax, eax jz short loc_7BF3D loc_7BF2B: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7BF3D: movsxd r12, r15d loc_7BF40: mov rax, [rbx+30h] cmp byte ptr [rax], 7Ch ; '|' jnz short loc_7BFAF inc rax mov [rbx+30h], rax mov r13, [rbx+8] mov rdi, rbx mov esi, r15d push 5 pop rdx call dbuf_insert test eax, eax jnz short loc_7BFB7 sub r13d, r15d mov rax, [rbx] mov byte ptr [rax+r12], 0Ah mov rax, [rbx] add r13d, 5 mov [rax+r12+1], r13d mov rdi, rbx push 8 pop rsi xor edx, edx call re_emit_op_u32 mov r13d, eax mov rdi, rbx mov esi, ebp call re_parse_alternative test eax, eax jnz short loc_7BF2B mov eax, [rbx+8] sub eax, r13d add eax, 0FFFFFFFCh mov rcx, [rbx] movsxd rdx, r13d mov [rcx+rdx], eax jmp short loc_7BF40 loc_7BFAF: xor r14d, r14d jmp loc_7BF2B loc_7BFB7: mov rdi, rbx call re_parse_out_of_memory jmp loc_7BF2B
long long re_parse_disjunction(_QWORD *a1, unsigned int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d unsigned int v6; // r14d long long v7; // r15 _BYTE *v9; // rax long long v10; // r13 int v11; // r13d if ( lre_check_stack_overflow(a1[13], 0LL) ) { re_parse_error((_DWORD)a1, (unsigned int)"stack overflow", v2, v3, v4, v5); return (unsigned int)-1; } else { v7 = a1[1]; v6 = -1; if ( !(unsigned int)re_parse_alternative(a1, a2) ) { while ( 1 ) { v9 = (_BYTE *)a1[6]; if ( *v9 != 124 ) return 0; a1[6] = v9 + 1; v10 = a1[1]; if ( (unsigned int)dbuf_insert(a1, (unsigned int)v7, 5LL) ) break; *(_BYTE *)(*a1 + (int)v7) = 10; *(_DWORD *)(*a1 + (int)v7 + 1LL) = v10 - v7 + 5; v11 = re_emit_op_u32((long long)a1, 8, 0); if ( (unsigned int)re_parse_alternative(a1, a2) ) return v6; *(_DWORD *)(*a1 + v11) = *((_DWORD *)a1 + 2) - v11 - 4; } re_parse_out_of_memory(a1); } } return v6; }
re_parse_disjunction: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x68] XOR ESI,ESI CALL 0x0012cb89 TEST EAX,EAX JZ 0x0017bf15 LEA RSI,[0x18a3a3] MOV RDI,RBX XOR EAX,EAX CALL 0x0017bfc4 PUSH -0x1 POP R14 JMP 0x0017bf2b LAB_0017bf15: MOV R15,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,EBP CALL 0x0017d18d PUSH -0x1 POP R14 TEST EAX,EAX JZ 0x0017bf3d LAB_0017bf2b: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017bf3d: MOVSXD R12,R15D LAB_0017bf40: MOV RAX,qword ptr [RBX + 0x30] CMP byte ptr [RAX],0x7c JNZ 0x0017bfaf INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R13,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,R15D PUSH 0x5 POP RDX CALL 0x0017e257 TEST EAX,EAX JNZ 0x0017bfb7 SUB R13D,R15D MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R12*0x1],0xa MOV RAX,qword ptr [RBX] ADD R13D,0x5 MOV dword ptr [RAX + R12*0x1 + 0x1],R13D MOV RDI,RBX PUSH 0x8 POP RSI XOR EDX,EDX CALL 0x0017be93 MOV R13D,EAX MOV RDI,RBX MOV ESI,EBP CALL 0x0017d18d TEST EAX,EAX JNZ 0x0017bf2b MOV EAX,dword ptr [RBX + 0x8] SUB EAX,R13D ADD EAX,-0x4 MOV RCX,qword ptr [RBX] MOVSXD RDX,R13D MOV dword ptr [RCX + RDX*0x1],EAX JMP 0x0017bf40 LAB_0017bfaf: XOR R14D,R14D JMP 0x0017bf2b LAB_0017bfb7: MOV RDI,RBX CALL 0x0017c05a JMP 0x0017bf2b
int4 re_parse_disjunction(long *param_1,int4 param_2) { ulong uVar1; long lVar2; int iVar3; int iVar4; int iVar5; int4 uVar6; iVar3 = lre_check_stack_overflow(param_1[0xd],0); if (iVar3 == 0) { uVar1 = param_1[1]; iVar3 = re_parse_alternative(param_1,param_2); uVar6 = 0xffffffff; if (iVar3 == 0) { iVar3 = (int)uVar1; while (*(char *)param_1[6] == '|') { param_1[6] = (long)((char *)param_1[6] + 1); lVar2 = param_1[1]; iVar4 = dbuf_insert(param_1,uVar1 & 0xffffffff,5); if (iVar4 != 0) { re_parse_out_of_memory(param_1); return 0xffffffff; } *(int1 *)(*param_1 + (long)iVar3) = 10; *(int *)(*param_1 + 1 + (long)iVar3) = ((int)lVar2 - iVar3) + 5; iVar4 = re_emit_op_u32(param_1,8,0); iVar5 = re_parse_alternative(param_1,param_2); if (iVar5 != 0) { return 0xffffffff; } *(int *)(*param_1 + (long)iVar4) = ((int)param_1[1] - iVar4) + -4; } uVar6 = 0; } } else { re_parse_error(param_1,"stack overflow"); uVar6 = 0xffffffff; } return uVar6; }
47,333
LefDefParser::defiNonDefault::numCuts(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
int defiNonDefault::numCuts(int index) const { char msg[160]; if (index < 0 || index >= numMinCuts_) { sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.", index, numLayers_); defiError(0, 6090, msg, defData); return 0; } return numCuts_[index]; }
O0
cpp
LefDefParser::defiNonDefault::numCuts(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x4577e movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x78(%rcx), %eax jl 0x457ca movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0xc(%rax), %ecx leaq 0x2cdd1(%rip), %rsi # 0x7256a movb $0x0, %al callq 0x7060 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdx movq 0xb8(%rax), %rcx xorl %edi, %edi movl $0x17ca, %esi # imm = 0x17CA callq 0x277e0 movl $0x0, 0xc4(%rsp) jmp 0x457e8 movq 0x8(%rsp), %rax movq 0x88(%rax), %rax movslq 0xb4(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopw (%rax,%rax)
_ZNK12LefDefParser14defiNonDefault7numCutsEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_4577E mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+78h] jl short loc_457CA loc_4577E: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+0Ch] lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "... mov al, 0 call _sprintf mov rax, [rsp+0C8h+var_C0] lea rdx, [rsp+0C8h+var_B8]; int mov rcx, [rax+0B8h]; char * xor edi, edi; this mov esi, 17CAh; int call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) mov [rsp+0C8h+var_4], 0 jmp short loc_457E8 loc_457CA: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+88h] movsxd rcx, [rsp+0C8h+var_14] mov eax, [rax+rcx*4] mov [rsp+0C8h+var_4], eax loc_457E8: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long LefDefParser::defiNonDefault::numCuts(LefDefParser::defrData **this, int a2) { LefDefParser::defrData *v2; // r8 char v4[164]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h] v6 = (LefDefParser::defiNonDefault *)this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 30) ) { return (unsigned int)*((_DWORD *)this[17] + v5); } else { sprintf( v4, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n" "Valid index is from 0 to %d. Specify a valid index number and then try again.", v5, *((_DWORD *)this + 3)); LefDefParser::defiError(0LL, 6090, v4, this[23], v2); return 0; } }
numCuts: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x0014577e MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x78] JL 0x001457ca LAB_0014577e: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0xc] LEA RSI,[0x17256a] MOV AL,0x0 CALL 0x00107060 MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RCX,qword ptr [RAX + 0xb8] XOR EDI,EDI MOV ESI,0x17ca CALL 0x001277e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x001457e8 LAB_001457ca: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x88] MOVSXD RCX,dword ptr [RSP + 0xb4] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0xc4],EAX LAB_001457e8: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::defiNonDefault::numCuts(int) const */ int4 __thiscall LefDefParser::defiNonDefault::numCuts(defiNonDefault *this,int param_1) { char local_b8 [164]; int local_14; defiNonDefault *local_10; int4 local_4; if ((param_1 < 0) || (*(int *)(this + 0x78) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again." ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc)); defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8)); local_4 = 0; } else { local_4 = *(int4 *)(*(long *)(this + 0x88) + (long)param_1 * 4); } return local_4; }
47,334
compare_by_handle
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/qshell/servicescmd.c
static int compare_by_handle(const void *a, const void *b) { SCV_SERVICE_HANDLE ha = *(SCV_SERVICE_HANDLE*)a ; SCV_SERVICE_HANDLE hb = *(SCV_SERVICE_HANDLE*)b ; const char * namea = svc_service_name(ha) ; const char * nameb = svc_service_name(hb) ; // Check for NULL pointers just in case svc_service_name can return NULL if (!namea && !nameb) return 0; if (!namea) return -1; // NULL should come before valid name if (!nameb) return 1; // valid name should come before NULL return strcmp(namea, nameb); }
O3
c
compare_by_handle: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl (%rdi), %edi movl (%rsi), %r14d callq 0x175ec movq %rax, %rbx movl %r14d, %edi callq 0x175ec testq %rax, %rax sete %dl xorl %esi, %esi movq %rbx, %rcx orq %rax, %rcx sete %sil decl %esi testq %rbx, %rbx sete %dil movl $0x1, %ecx cmovel %esi, %ecx orb %dl, %dil je 0x1c69e movl %ecx, %eax popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi movq %rax, %rsi popq %rbx popq %r14 popq %rbp jmp 0x6320 nopl (%rax)
compare_by_handle: push rbp mov rbp, rsp push r14 push rbx mov edi, [rdi] mov r14d, [rsi] call svc_service_name mov rbx, rax mov edi, r14d call svc_service_name test rax, rax setz dl xor esi, esi mov rcx, rbx or rcx, rax setz sil dec esi test rbx, rbx setz dil mov ecx, 1 cmovz ecx, esi or dil, dl jz short loc_1C69E mov eax, ecx pop rbx pop r14 pop rbp retn loc_1C69E: mov rdi, rbx mov rsi, rax pop rbx pop r14 pop rbp jmp _strcmp
long long compare_by_handle(unsigned int *a1, unsigned int *a2) { unsigned int v2; // r14d char *v3; // rbx char *v4; // rax unsigned int v5; // ecx v2 = *a2; v3 = svc_service_name(*a1); v4 = svc_service_name(v2); v5 = 1; if ( !v3 ) v5 = (v4 == 0LL) - 1; if ( v4 == 0LL || v3 == 0LL ) return v5; else return strcmp(v3, v4); }
compare_by_handle: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EDI,dword ptr [RDI] MOV R14D,dword ptr [RSI] CALL 0x001175ec MOV RBX,RAX MOV EDI,R14D CALL 0x001175ec TEST RAX,RAX SETZ DL XOR ESI,ESI MOV RCX,RBX OR RCX,RAX SETZ SIL DEC ESI TEST RBX,RBX SETZ DIL MOV ECX,0x1 CMOVZ ECX,ESI OR DIL,DL JZ 0x0011c69e MOV EAX,ECX POP RBX POP R14 POP RBP RET LAB_0011c69e: MOV RDI,RBX MOV RSI,RAX POP RBX POP R14 POP RBP JMP 0x00106320
int compare_by_handle(int4 *param_1,int4 *param_2) { int4 uVar1; int iVar2; char *__s1; char *__s2; uVar1 = *param_2; __s1 = (char *)svc_service_name(*param_1); __s2 = (char *)svc_service_name(uVar1); iVar2 = 1; if (__s1 == (char *)0x0) { iVar2 = (__s1 == (char *)0x0 && __s2 == (char *)0x0) - 1; } if (__s1 == (char *)0x0 || __s2 == (char *)0x0) { return iVar2; } iVar2 = strcmp(__s1,__s2); return iVar2; }
47,335
google::protobuf::MethodDescriptorProto::InternalSwap(google::protobuf::MethodDescriptorProto*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.input_type_, lhs_arena, &other->_impl_.input_type_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.output_type_, lhs_arena, &other->_impl_.output_type_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, _impl_.server_streaming_) + sizeof(MethodDescriptorProto::_impl_.server_streaming_) - PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, _impl_.options_)>( reinterpret_cast<char*>(&_impl_.options_), reinterpret_cast<char*>(&other->_impl_.options_)); }
O0
cpp
google::protobuf::MethodDescriptorProto::InternalSwap(google::protobuf::MethodDescriptorProto*): subq $0xb8, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rdi movq %rdi, (%rsp) callq 0x80180 movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rdi callq 0x80180 movq (%rsp), %rcx movq %rax, 0x8(%rsp) addq $0x8, %rcx movq 0x18(%rsp), %rax addq $0x8, %rax movq %rcx, 0x30(%rsp) movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0xde020 movq (%rsp), %rax addq $0x10, %rax movq %rax, 0x50(%rsp) movl $0x0, 0x4c(%rsp) movq 0x50(%rsp), %rdi movslq 0x4c(%rsp), %rax shlq $0x2, %rax addq %rax, %rdi movq 0x18(%rsp), %rax addq $0x10, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rsi movslq 0x3c(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi callq 0xd5790 movq (%rsp), %rsi addq $0x10, %rsi addq $0x8, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x8, %rcx movq 0x8(%rsp), %rax movq %rsi, 0xb0(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0xa0(%rsp) movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x10, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x10, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x90(%rsp) movq %rdx, 0x88(%rsp) movq %rcx, 0x80(%rsp) movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x18, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x18, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x70(%rsp) movq %rdx, 0x68(%rsp) movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi movq 0x18(%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi callq 0xd90c0 addq $0xb8, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf21MethodDescriptorProto12InternalSwapEPS1_: sub rsp, 0B8h mov [rsp+0B8h+var_98], rdi mov [rsp+0B8h+var_A0], rsi mov rdi, [rsp+0B8h+var_98]; this mov [rsp+0B8h+var_B8], rdi call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov [rsp+0B8h+var_A8], rax mov rdi, [rsp+0B8h+var_A0]; this call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov rcx, [rsp+0B8h+var_B8] mov [rsp+0B8h+var_B0], rax add rcx, 8 mov rax, [rsp+0B8h+var_A0] add rax, 8 mov [rsp+0B8h+var_88], rcx mov [rsp+0B8h+var_90], rax mov rdi, [rsp+0B8h+var_88] mov rsi, [rsp+0B8h+var_90] call _ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rax, [rsp+0B8h+var_B8] add rax, 10h mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_6C], 0 mov rdi, [rsp+0B8h+var_68] movsxd rax, [rsp+0B8h+var_6C] shl rax, 2 add rdi, rax mov rax, [rsp+0B8h+var_A0] add rax, 10h mov [rsp+0B8h+var_78], rax mov [rsp+0B8h+var_7C], 0 mov rsi, [rsp+0B8h+var_78] movsxd rax, [rsp+0B8h+var_7C] shl rax, 2 add rsi, rax call _ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 8 mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 8 mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_8], rsi mov [rsp+0B8h+var_10], rdx mov [rsp+0B8h+var_18], rcx mov [rsp+0B8h+var_20], rax mov rdi, [rsp+0B8h+var_18] mov rsi, [rsp+0B8h+var_8] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 10h mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 10h mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_28], rsi mov [rsp+0B8h+var_30], rdx mov [rsp+0B8h+var_38], rcx mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_28] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 18h mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 18h mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_48], rsi mov [rsp+0B8h+var_50], rdx mov [rsp+0B8h+var_58], rcx mov [rsp+0B8h+var_60], rax mov rdi, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_48] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rdi, [rsp+0B8h+var_B8] add rdi, 10h add rdi, 20h ; ' ' mov rsi, [rsp+0B8h+var_A0] add rsi, 10h add rsi, 20h ; ' ' call _ZN6google8protobuf8internal7memswapILi10EEENSt9enable_ifIXaageT_Lm8EltT_Li16EEvE4typeEPcS6_; google::protobuf::internal::memswap<10>(char *,char *) add rsp, 0B8h retn
long long google::protobuf::MethodDescriptorProto::InternalSwap( google::protobuf::MethodDescriptorProto *this, google::protobuf::MethodDescriptorProto *a2) { google::protobuf::MessageLite::GetArenaForAllocation(this); google::protobuf::MessageLite::GetArenaForAllocation(a2); std::swap<long>((char *)this + 8, (char *)a2 + 8); std::swap<unsigned int>((char *)this + 16, (char *)a2 + 16); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 24, (char *)this + 24); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 32, (char *)this + 32); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 40, (char *)this + 40); return google::protobuf::internal::memswap<10>((char *)this + 48, (char *)a2 + 48); }
InternalSwap: SUB RSP,0xb8 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RDI CALL 0x00180180 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x00180180 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001de020 MOV RAX,qword ptr [RSP] ADD RAX,0x10 MOV qword ptr [RSP + 0x50],RAX MOV dword ptr [RSP + 0x4c],0x0 MOV RDI,qword ptr [RSP + 0x50] MOVSXD RAX,dword ptr [RSP + 0x4c] SHL RAX,0x2 ADD RDI,RAX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x3c],0x0 MOV RSI,qword ptr [RSP + 0x40] MOVSXD RAX,dword ptr [RSP + 0x3c] SHL RAX,0x2 ADD RSI,RAX CALL 0x001d5790 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x8 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xb0],RSI MOV qword ptr [RSP + 0xa8],RDX MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x10 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x10 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x90],RSI MOV qword ptr [RSP + 0x88],RDX MOV qword ptr [RSP + 0x80],RCX MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x90] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x18 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x18 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RSI MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x70] CALL 0x001de4b0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x10 ADD RSI,0x20 CALL 0x001d90c0 ADD RSP,0xb8 RET
/* google::protobuf::MethodDescriptorProto::InternalSwap(google::protobuf::MethodDescriptorProto*) */ void __thiscall google::protobuf::MethodDescriptorProto::InternalSwap (MethodDescriptorProto *this,MethodDescriptorProto *param_1) { MessageLite::GetArenaForAllocation((MessageLite *)this); MessageLite::GetArenaForAllocation((MessageLite *)param_1); std::swap<long>((long *)(this + 8),(long *)(param_1 + 8)); std::swap<unsigned_int>((uint *)(this + 0x10),(uint *)(param_1 + 0x10)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x18),(TaggedStringPtr *)(this + 0x18)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x20),(TaggedStringPtr *)(this + 0x20)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x28),(TaggedStringPtr *)(this + 0x28)); internal::memswap<10>((char *)(this + 0x30),(char *)(param_1 + 0x30)); return; }
47,336
change_simple_key_cache_param
eloqsql/mysys/mf_keycache.c
static void change_simple_key_cache_param(SIMPLE_KEY_CACHE_CB *keycache, uint division_limit, uint age_threshold) { DBUG_ENTER("change_simple_key_cache_param"); keycache_pthread_mutex_lock(&keycache->cache_lock); if (division_limit) keycache->min_warm_blocks= (keycache->disk_blocks * division_limit / 100 + 1); if (age_threshold) keycache->age_threshold= (keycache->disk_blocks * age_threshold / 100); keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_VOID_RETURN; }
O3
c
change_simple_key_cache_param: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r15d movl %esi, %r12d movq %rdi, %r14 leaq 0xc0(%rdi), %rbx cmpq $0x0, 0x100(%rdi) jne 0x5456f movq %rbx, %rdi callq 0x28530 testl %r12d, %r12d je 0x5453a imull 0x48(%r14), %r12d imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F shrq $0x25, %rax incl %eax movq %rax, 0x20(%r14) testl %r15d, %r15d je 0x54553 imull 0x48(%r14), %r15d imulq $0x51eb851f, %r15, %rax # imm = 0x51EB851F shrq $0x25, %rax movq %rax, 0x28(%r14) movq 0x100(%r14), %rdi testq %rdi, %rdi jne 0x54585 movq %rbx, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x28260 leaq 0x3e4b5(%rip), %rsi # 0x92a2b movq %rbx, %rdi movl $0x399, %edx # imm = 0x399 callq 0x29e8c jmp 0x5451f leaq 0x2dbdc4(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x5455f
change_simple_key_cache_param: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r15d, edx mov r12d, esi mov r14, rdi lea rbx, [rdi+0C0h] cmp qword ptr [rdi+100h], 0 jnz short loc_5456F mov rdi, rbx call _pthread_mutex_lock loc_5451F: test r12d, r12d jz short loc_5453A imul r12d, [r14+48h] imul rax, r12, 51EB851Fh shr rax, 25h inc eax mov [r14+20h], rax loc_5453A: test r15d, r15d jz short loc_54553 imul r15d, [r14+48h] imul rax, r15, 51EB851Fh shr rax, 25h mov [r14+28h], rax loc_54553: mov rdi, [r14+100h] test rdi, rdi jnz short loc_54585 loc_5455F: mov rdi, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_5456F: lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 399h call psi_mutex_lock jmp short loc_5451F loc_54585: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_5455F
long long change_simple_key_cache_param(long long a1, int a2, int a3) { if ( *(_QWORD *)(a1 + 256) ) psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x399u); else pthread_mutex_lock(a1 + 192); if ( a2 ) *(_QWORD *)(a1 + 32) = *(_DWORD *)(a1 + 72) * a2 / 0x64u + 1; if ( a3 ) *(_QWORD *)(a1 + 40) = (unsigned int)(*(_DWORD *)(a1 + 72) * a3) / 0x64uLL; if ( *(_QWORD *)(a1 + 256) ) PSI_server[44](); return pthread_mutex_unlock(a1 + 192); }
change_simple_key_cache_param: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15D,EDX MOV R12D,ESI MOV R14,RDI LEA RBX,[RDI + 0xc0] CMP qword ptr [RDI + 0x100],0x0 JNZ 0x0015456f MOV RDI,RBX CALL 0x00128530 LAB_0015451f: TEST R12D,R12D JZ 0x0015453a IMUL R12D,dword ptr [R14 + 0x48] IMUL RAX,R12,0x51eb851f SHR RAX,0x25 INC EAX MOV qword ptr [R14 + 0x20],RAX LAB_0015453a: TEST R15D,R15D JZ 0x00154553 IMUL R15D,dword ptr [R14 + 0x48] IMUL RAX,R15,0x51eb851f SHR RAX,0x25 MOV qword ptr [R14 + 0x28],RAX LAB_00154553: MOV RDI,qword ptr [R14 + 0x100] TEST RDI,RDI JNZ 0x00154585 LAB_0015455f: MOV RDI,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00128260 LAB_0015456f: LEA RSI,[0x192a2b] MOV RDI,RBX MOV EDX,0x399 CALL 0x00129e8c JMP 0x0015451f LAB_00154585: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015455f
void change_simple_key_cache_param(long param_1,int param_2,int param_3) { pthread_mutex_t *__mutex; __mutex = (pthread_mutex_t *)(param_1 + 0xc0); if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x399); } if (param_2 != 0) { *(ulong *)(param_1 + 0x20) = (ulong)((uint)(param_2 * *(int *)(param_1 + 0x48)) / 100 + 1); } if (param_3 != 0) { *(ulong *)(param_1 + 0x28) = (ulong)(uint)(param_3 * *(int *)(param_1 + 0x48)) / 100; } if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return; }
47,337
vemit_tap
eloqsql/unittest/mytap/tap.c
static void vemit_tap(int pass, char const *fmt, va_list ap) { fprintf(tapout, "%sok %d%s", pass ? "" : "not ", ++g_test.last, (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); fflush(tapout); }
O0
c
vemit_tap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq 0x1e3026(%rip), %rax # 0x2bcfd0 movq (%rax), %rax movq %rax, -0x30(%rbp) movl -0x4(%rbp), %edx leaq 0x79e7b(%rip), %rax # 0x153e36 leaq 0x7dce2(%rip), %rcx # 0x157ca4 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x28(%rbp) movl 0xba0641(%rip), %eax # 0xc7a614 addl $0x1, %eax movl %eax, -0x20(%rbp) movl %eax, 0xba0635(%rip) # 0xc7a614 xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0xd9ffb movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x19(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rdi movb -0x19(%rbp), %sil leaq 0x7dc93(%rip), %r8 # 0x157ca4 leaq 0x79e23(%rip), %rax # 0x153e3b testb $0x1, %sil cmovneq %rax, %r8 leaq 0x79e05(%rip), %rsi # 0x153e2c movb $0x0, %al callq 0x2a180 cmpq $0x0, -0x10(%rbp) je 0xda058 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xda058 movq 0x1e2f88(%rip), %rax # 0x2bcfd0 movq (%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a7e0 movq 0x1e2f71(%rip), %rax # 0x2bcfd0 movq (%rax), %rdi callq 0x2a3e0 addq $0x30, %rsp popq %rbp retq nopl (%rax)
vemit_tap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, cs:stdout_ptr mov rax, [rax] mov [rbp+var_30], rax mov edx, [rbp+var_4] lea rax, aNot; "not " lea rcx, asc_157CA0+4; "" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_28], rax mov eax, cs:dword_C7A614 add eax, 1 mov [rbp+var_20], eax mov cs:dword_C7A614, eax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_D9FFB mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_19], al loc_D9FFB: mov ecx, [rbp+var_20] mov rdx, [rbp+var_28] mov rdi, [rbp+var_30] mov sil, [rbp+var_19] lea r8, asc_157CA0+4; "" lea rax, asc_153E3B; " - " test sil, 1 cmovnz r8, rax lea rsi, aSokDS; "%sok %d%s" mov al, 0 call _fprintf cmp [rbp+var_10], 0 jz short loc_DA058 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_DA058 mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _vfprintf loc_DA058: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 30h pop rbp retn
long long vemit_tap(int a1, _BYTE *a2, long long a3) { const char *v3; // rax const char *v4; // r8 int v6; // [rsp+10h] [rbp-20h] bool v7; // [rsp+17h] [rbp-19h] v3 = "not "; if ( a1 ) v3 = ""; v6 = ++dword_C7A614; v7 = 0; if ( a2 ) v7 = *a2 != 0; v4 = ""; if ( v7 ) v4 = " - "; fprintf(stdout, "%sok %d%s", v3, v6, v4); if ( a2 && *a2 ) vfprintf(stdout, a2, a3); return fflush(stdout); }
vemit_tap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [0x003bcfd0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV EDX,dword ptr [RBP + -0x4] LEA RAX,[0x253e36] LEA RCX,[0x257ca4] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [0x00d7a614] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [0x00d7a614],EAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x001d9ffb MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_001d9ffb: MOV ECX,dword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x30] MOV SIL,byte ptr [RBP + -0x19] LEA R8,[0x257ca4] LEA RAX,[0x253e3b] TEST SIL,0x1 CMOVNZ R8,RAX LEA RSI,[0x253e2c] MOV AL,0x0 CALL 0x0012a180 CMP qword ptr [RBP + -0x10],0x0 JZ 0x001da058 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001da058 MOV RAX,qword ptr [0x003bcfd0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012a7e0 LAB_001da058: MOV RAX,qword ptr [0x003bcfd0] MOV RDI,qword ptr [RAX] CALL 0x0012a3e0 ADD RSP,0x30 POP RBP RET
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3) { int *puVar1; int *puVar2; bool bVar3; puVar1 = &DAT_00253e36; if (param_1 != 0) { puVar1 = &DAT_00257ca4; } DAT_00d7a614 = DAT_00d7a614 + 1; bVar3 = false; if (param_2 != (char *)0x0) { bVar3 = *param_2 != '\0'; } puVar2 = &DAT_00257ca4; if (bVar3) { puVar2 = &DAT_00253e3b; } fprintf(*(FILE **)PTR_stdout_003bcfd0,"%sok %d%s",puVar1,(ulong)DAT_00d7a614,puVar2); if ((param_2 != (char *)0x0) && (*param_2 != '\0')) { vfprintf(*(FILE **)PTR_stdout_003bcfd0,param_2,param_3); } fflush(*(FILE **)PTR_stdout_003bcfd0); return; }
47,338
get_charset_number_internal
eloqsql/mysys/charset.c
static uint get_charset_number_internal(const char *charset_name, uint cs_flags) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name)) return cs[0]->number; } return 0; }
O3
c
get_charset_number_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movq $-0x8, %r12 leaq 0xb73d83(%rip), %r13 # 0xc0d170 leaq 0x32057c(%rip), %r15 # 0x3b9970 movq 0x8(%r13,%r12), %rax testq %rax, %rax je 0x99420 movq 0x10(%rax), %rsi testq %rsi, %rsi je 0x99420 testl %ebx, 0xc(%rax) je 0x99420 movq 0xc0(%r15), %rax movq %r15, %rdi movq %r14, %rdx callq *0x40(%rax) testl %eax, %eax je 0x9943e addq $0x8, %r12 cmpq $0x3ff8, %r12 # imm = 0x3FF8 jb 0x993f4 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%r13,%r12), %rax movl (%rax), %eax jmp 0x9942f
get_charset_number_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov r12, 0FFFFFFFFFFFFFFF8h lea r13, all_charsets lea r15, my_charset_latin1 loc_993F4: mov rax, [r13+r12+8] test rax, rax jz short loc_99420 mov rsi, [rax+10h] test rsi, rsi jz short loc_99420 test [rax+0Ch], ebx jz short loc_99420 mov rax, [r15+0C0h] mov rdi, r15 mov rdx, r14 call qword ptr [rax+40h] test eax, eax jz short loc_9943E loc_99420: add r12, 8 cmp r12, 3FF8h jb short loc_993F4 xor eax, eax loc_9942F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9943E: mov rax, [r13+r12+8] mov eax, [rax] jmp short loc_9942F
long long get_charset_number_internal(long long a1, int a2) { long long v3; // r12 long long v4; // rax long long v5; // rsi v3 = 0x1FFFFFFFFFFFFFFFLL; while ( 1 ) { v4 = all_charsets[v3 + 1]; if ( v4 ) { v5 = *(_QWORD *)(v4 + 16); if ( v5 ) { if ( (a2 & *(_DWORD *)(v4 + 12)) != 0 && !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, v5, a1) ) { break; } } } if ( (unsigned long long)++v3 >= 2047 ) return 0LL; } return *(unsigned int *)all_charsets[v3 + 1]; }
get_charset_number_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV R12,-0x8 LEA R13,[0xd0d170] LEA R15,[0x4b9970] LAB_001993f4: MOV RAX,qword ptr [R13 + R12*0x1 + 0x8] TEST RAX,RAX JZ 0x00199420 MOV RSI,qword ptr [RAX + 0x10] TEST RSI,RSI JZ 0x00199420 TEST dword ptr [RAX + 0xc],EBX JZ 0x00199420 MOV RAX,qword ptr [R15 + 0xc0] MOV RDI,R15 MOV RDX,R14 CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0019943e LAB_00199420: ADD R12,0x8 CMP R12,0x3ff8 JC 0x001993f4 XOR EAX,EAX LAB_0019942f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019943e: MOV RAX,qword ptr [R13 + R12*0x1 + 0x8] MOV EAX,dword ptr [RAX] JMP 0x0019942f
int4 get_charset_number_internal(int8 param_1,uint param_2) { long lVar1; int iVar2; ulong uVar3; uVar3 = 0xfffffffffffffff8; while ((((lVar1 = *(long *)((long)&DAT_00d0d178 + uVar3), lVar1 == 0 || (*(long *)(lVar1 + 0x10) == 0)) || ((*(uint *)(lVar1 + 0xc) & param_2) == 0)) || (iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004b9a30 + 0x40)) (&my_charset_latin1,*(long *)(lVar1 + 0x10),param_1), iVar2 != 0))) { uVar3 = uVar3 + 8; if (0x3ff7 < uVar3) { return 0; } } return **(int4 **)((long)&DAT_00d0d178 + uVar3); }
47,339
evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.cpp
EOF1Header read_valid_eof1_header(bytes_view container) { EOFSectionHeaders section_headers; auto it = container.begin() + std::size(EOF_MAGIC) + 1; // MAGIC + VERSION while (*it != TERMINATOR) { auto section_id = *it++; if (section_id == CODE_SECTION) { const auto code_section_num = read_uint16_be(it); it += 2; for (uint16_t i = 0; i < code_section_num; ++i) { const auto section_size = read_uint16_be(it); it += 2; section_headers.code_sizes.emplace_back(section_size); } } else if (section_id == CONTAINER_SECTION) { const auto code_section_num = read_uint16_be(it); it += 2; for (uint16_t i = 0; i < code_section_num; ++i) { const auto section_size = read_uint32_be(it); it += 4; section_headers.container_sizes.emplace_back(section_size); } } else { const auto section_size = read_uint16_be(it); it += 2; if (section_id == TYPE_SECTION) section_headers.type_size = section_size; else { assert(section_id == DATA_SECTION); section_headers.data_size = section_size; } } } const auto header_size = eof_header_size(section_headers); EOF1Header header; header.version = container[2]; header.type_section_offset = header_size; header.code_sizes = std::move(section_headers.code_sizes); auto code_offset = header_size + section_headers.type_size; for (const auto code_size : header.code_sizes) { assert(code_offset <= std::numeric_limits<uint16_t>::max()); header.code_offsets.emplace_back(static_cast<uint16_t>(code_offset)); code_offset += code_size; } header.data_size = section_headers.data_size; header.container_sizes = std::move(section_headers.container_sizes); auto container_offset = code_offset; for (const auto container_size : header.container_sizes) { header.container_offsets.emplace_back(static_cast<uint16_t>(container_offset)); container_offset += container_size; } header.data_offset = static_cast<uint16_t>(container_offset); return header; }
O1
cpp
evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x18(%rsp), %r14 movl $0x0, -0x8(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%r14) movups %xmm0, 0x10(%r14) movups %xmm0, 0x20(%r14) movq %rdx, 0x8(%rsp) movb 0x3(%rdx), %dl testb %dl, %dl je 0x44bb2 movq 0x8(%rsp), %rax leaq 0x3(%rax), %rbp leaq 0x30(%rsp), %r12 leaq 0x4(%rsp), %r13 movzbl 0x2(%rbp), %ecx movzbl 0x1(%rbp), %eax shll $0x8, %eax movl %eax, %esi orl %ecx, %esi addq $0x3, %rbp movzbl %dl, %edx cmpl $0x2, %edx jg 0x44b45 cmpl $0x1, %edx je 0x44b5d cmpl $0x2, %edx jne 0x44d52 testw %si, %si je 0x44ba7 movzwl %cx, %r15d addl %eax, %r15d movzwl (%rbp), %eax rolw $0x8, %ax movw %ax, 0x4(%rsp) movq 0x20(%rsp), %rsi cmpq 0x28(%rsp), %rsi je 0x44b2e movw %ax, (%rsi) addq $0x2, %rsi movq %rsi, 0x20(%rsp) jmp 0x44b39 movq %r14, %rdi movq %r13, %rdx callq 0x48760 addq $0x2, %rbp decw %r15w jne 0x44b07 jmp 0x44ba7 cmpl $0x3, %edx je 0x44b64 cmpl $0xff, %edx jne 0x44d52 movw %si, 0x12(%rsp) jmp 0x44ba7 movw %si, 0x10(%rsp) jmp 0x44ba7 testw %si, %si je 0x44ba7 movzwl %cx, %r15d addl %eax, %r15d movl (%rbp), %eax bswapl %eax movl %eax, 0x4(%rsp) movq 0x38(%rsp), %rsi cmpq 0x40(%rsp), %rsi je 0x44b92 movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x38(%rsp) jmp 0x44b9d movq %r12, %rdi movq %r13, %rdx callq 0x4887e addq $0x4, %rbp decw %r15w jne 0x44b70 movb (%rbp), %dl testb %dl, %dl jne 0x44ace movq 0x20(%rsp), %rax movq 0x38(%rsp), %rcx xorl %edx, %edx subq 0x30(%rsp), %rcx leaq 0x3(%rcx), %rcx cmovneq %rcx, %rdx subq 0x18(%rsp), %rax leaq (%rax,%rdx), %r15 addq %rdx, %rax addq $0xd, %rax movb $0x0, (%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) movups %xmm0, 0x18(%rbx) movups %xmm0, 0x28(%rbx) movups %xmm0, 0x32(%rbx) movups %xmm0, 0x44(%rbx) movups %xmm0, 0x54(%rbx) movups %xmm0, 0x64(%rbx) movl $0x0, 0x74(%rbx) movq 0x8(%rsp), %rcx movb 0x2(%rcx), %cl movb %cl, (%rbx) movq %rax, 0x8(%rbx) leaq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x48a36 movzwl 0x10(%rsp), %eax leaq (%rax,%r15), %r12 addq $0xd, %r12 movq 0x10(%rbx), %r13 movq 0x18(%rbx), %rbp cmpq %rbp, %r13 je 0x44c85 leaq 0x28(%rbx), %r14 cmpq $0x10000, %r12 # imm = 0x10000 jae 0x44d33 movzwl (%r13), %r15d movw %r12w, 0x4(%rsp) movq 0x30(%rbx), %rsi cmpq 0x38(%rbx), %rsi je 0x44c6c movw %r12w, (%rsi) addq $0x2, %rsi movq %rsi, 0x30(%rbx) jmp 0x44c79 movq %r14, %rdi leaq 0x4(%rsp), %rdx callq 0x4895a addq %r15, %r12 addq $0x2, %r13 cmpq %rbp, %r13 jne 0x44c3c leaq 0x30(%rsp), %rsi movzwl -0x1e(%rsi), %eax movw %ax, 0x40(%rbx) leaq 0x48(%rbx), %rdi callq 0x48a76 movq 0x48(%rbx), %r13 movq 0x50(%rbx), %rbp cmpq %rbp, %r13 je 0x44ce9 leaq 0x60(%rbx), %r14 movl (%r13), %r15d movw %r12w, 0x4(%rsp) movq 0x68(%rbx), %rsi cmpq 0x70(%rbx), %rsi je 0x44cd0 movzwl %r12w, %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x68(%rbx) jmp 0x44cdd movq %r14, %rdi leaq 0x4(%rsp), %rdx callq 0x48ab6 addq %r15, %r12 addq $0x4, %r13 cmpq %rbp, %r13 jne 0x44cac leaq 0x44(%rbx), %rax movzwl %r12w, %ecx movl %ecx, (%rax) movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x44d0a movq 0x40(%rsp), %rsi subq %rdi, %rsi callq 0x21200 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x44d21 movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0x21200 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4555d(%rip), %rdi # 0x8a297 leaq 0x454a2(%rip), %rsi # 0x8a1e3 leaq 0x45519(%rip), %rcx # 0x8a261 movl $0x371, %edx # imm = 0x371 callq 0x21130 leaq 0x4546f(%rip), %rdi # 0x8a1c8 leaq 0x45483(%rip), %rsi # 0x8a1e3 leaq 0x454fa(%rip), %rcx # 0x8a261 movl $0x362, %edx # imm = 0x362 callq 0x21130 jmp 0x44d73 movq %rax, %r14 movq %rbx, %rdi callq 0x47768 jmp 0x44d85 jmp 0x44d82 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x44d98 movq %r14, %rdi callq 0x213b0 nop
_ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi lea r14, [rsp+78h+var_60] mov dword ptr [r14-8], 0 xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14+20h], xmm0 mov [rsp+78h+var_70], rdx mov dl, [rdx+3] test dl, dl jz loc_44BB2 mov rax, [rsp+78h+var_70] lea rbp, [rax+3] lea r12, [rsp+78h+var_48] lea r13, [rsp+78h+var_74] loc_44ACE: movzx ecx, byte ptr [rbp+2] movzx eax, byte ptr [rbp+1] shl eax, 8 mov esi, eax or esi, ecx add rbp, 3 movzx edx, dl cmp edx, 2 jg short loc_44B45 cmp edx, 1 jz short loc_44B5D cmp edx, 2 jnz loc_44D52 test si, si jz loc_44BA7 movzx r15d, cx add r15d, eax loc_44B07: movzx eax, word ptr [rbp+0] rol ax, 8 mov word ptr [rsp+78h+var_74], ax mov rsi, [rsp+78h+var_58] cmp rsi, [rsp+78h+var_50] jz short loc_44B2E mov [rsi], ax add rsi, 2 mov [rsp+78h+var_58], rsi jmp short loc_44B39 loc_44B2E: mov rdi, r14 mov rdx, r13 call _ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_; std::vector<ushort>::_M_realloc_insert<ushort const&>(__gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>,ushort const&) loc_44B39: add rbp, 2 dec r15w jnz short loc_44B07 jmp short loc_44BA7 loc_44B45: cmp edx, 3 jz short loc_44B64 cmp edx, 0FFh jnz loc_44D52 mov [rsp+78h+var_66], si jmp short loc_44BA7 loc_44B5D: mov [rsp+78h+var_68], si jmp short loc_44BA7 loc_44B64: test si, si jz short loc_44BA7 movzx r15d, cx add r15d, eax loc_44B70: mov eax, [rbp+0] bswap eax mov [rsp+78h+var_74], eax mov rsi, [rsp+78h+var_40] cmp rsi, [rsp+78h+var_38] jz short loc_44B92 mov [rsi], eax add rsi, 4 mov [rsp+78h+var_40], rsi jmp short loc_44B9D loc_44B92: mov rdi, r12 mov rdx, r13 call _ZNSt6vectorIjSaIjEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_; std::vector<uint>::_M_realloc_insert<uint const&>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,uint const&) loc_44B9D: add rbp, 4 dec r15w jnz short loc_44B70 loc_44BA7: mov dl, [rbp+0] test dl, dl jnz loc_44ACE loc_44BB2: mov rax, [rsp+78h+var_58] mov rcx, [rsp+78h+var_40] xor edx, edx sub rcx, [rsp+78h+var_48] lea rcx, [rcx+3] cmovnz rdx, rcx sub rax, [rsp+78h+var_60] lea r15, [rax+rdx] add rax, rdx add rax, 0Dh mov byte ptr [rbx], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 movups xmmword ptr [rbx+18h], xmm0 movups xmmword ptr [rbx+28h], xmm0 movups xmmword ptr [rbx+32h], xmm0 movups xmmword ptr [rbx+44h], xmm0 movups xmmword ptr [rbx+54h], xmm0 movups xmmword ptr [rbx+64h], xmm0 mov dword ptr [rbx+74h], 0 mov rcx, [rsp+78h+var_70] mov cl, [rcx+2] mov [rbx], cl mov [rbx+8], rax lea rdi, [rbx+10h] mov rsi, r14 call _ZNSt6vectorItSaItEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<ushort>::_M_move_assign(std::vector<ushort>&&,std::integral_constant<bool,true>) movzx eax, [rsp+78h+var_68] lea r12, [rax+r15] add r12, 0Dh mov r13, [rbx+10h] mov rbp, [rbx+18h] cmp r13, rbp jz short loc_44C85 lea r14, [rbx+28h] loc_44C3C: cmp r12, 10000h jnb loc_44D33 movzx r15d, word ptr [r13+0] mov word ptr [rsp+78h+var_74], r12w mov rsi, [rbx+30h] cmp rsi, [rbx+38h] jz short loc_44C6C mov [rsi], r12w add rsi, 2 mov [rbx+30h], rsi jmp short loc_44C79 loc_44C6C: mov rdi, r14 lea rdx, [rsp+78h+var_74] call _ZNSt6vectorItSaItEE17_M_realloc_insertIJtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_; std::vector<ushort>::_M_realloc_insert<ushort>(__gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>,ushort &&) loc_44C79: add r12, r15 add r13, 2 cmp r13, rbp jnz short loc_44C3C loc_44C85: lea rsi, [rsp+78h+var_48] movzx eax, word ptr [rsi-1Eh] mov [rbx+40h], ax lea rdi, [rbx+48h] call _ZNSt6vectorIjSaIjEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<uint>::_M_move_assign(std::vector<uint>&&,std::integral_constant<bool,true>) mov r13, [rbx+48h] mov rbp, [rbx+50h] cmp r13, rbp jz short loc_44CE9 lea r14, [rbx+60h] loc_44CAC: mov r15d, [r13+0] mov word ptr [rsp+78h+var_74], r12w mov rsi, [rbx+68h] cmp rsi, [rbx+70h] jz short loc_44CD0 movzx eax, r12w mov [rsi], eax add rsi, 4 mov [rbx+68h], rsi jmp short loc_44CDD loc_44CD0: mov rdi, r14 lea rdx, [rsp+78h+var_74] call _ZNSt6vectorIjSaIjEE17_M_realloc_insertIJtEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_; std::vector<uint>::_M_realloc_insert<ushort>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,ushort &&) loc_44CDD: add r12, r15 add r13, 4 cmp r13, rbp jnz short loc_44CAC loc_44CE9: lea rax, [rbx+44h] movzx ecx, r12w mov [rax], ecx mov rdi, [rsp+78h+var_48]; void * test rdi, rdi jz short loc_44D0A mov rsi, [rsp+78h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_44D0A: mov rdi, [rsp+78h+var_60]; void * test rdi, rdi jz short loc_44D21 mov rsi, [rsp+78h+var_50] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_44D21: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44D33: lea rdi, aCodeOffsetStdN; "code_offset <= std::numeric_limits<uint"... lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"... mov edx, 371h call ___assert_fail loc_44D52: lea rdi, aSectionIdDataS; "section_id == DATA_SECTION" lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"... mov edx, 362h call ___assert_fail jmp short $+2 loc_44D73: mov r14, rax mov rdi, rbx; this call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header() jmp short loc_44D85 jmp short $+2 loc_44D82: mov r14, rax loc_44D85: lea rdi, [rsp+78h+var_68]; this call _ZN6evmone12_GLOBAL__N_117EOFSectionHeadersD2Ev; evmone::`anonymous namespace'::EOFSectionHeaders::~EOFSectionHeaders() mov rdi, r14 call __Unwind_Resume
long long evmone::read_valid_eof1_header(long long a1, long long a2, long long a3) { unsigned __int8 v3; // dl _WORD *v4; // rbp __int16 v5; // cx __int16 v6; // ax unsigned __int16 v7; // si __int16 v8; // r15 __int16 v9; // ax long long v10; // rsi __int16 v11; // r15 unsigned __int32 v12; // eax long long v13; // rsi long long v14; // rdx long long v15; // r15 unsigned long long v16; // r12 unsigned __int16 *v17; // r13 unsigned __int16 *i; // rbp long long v19; // r15 _WORD *v20; // rsi int *v21; // r13 int *j; // rbp int v23; // r15d _DWORD *v24; // rsi unsigned __int32 v26; // [rsp+4h] [rbp-74h] BYREF long long v27; // [rsp+8h] [rbp-70h] int v28; // [rsp+10h] [rbp-68h] __int128 v29; // [rsp+18h] [rbp-60h] BYREF __int128 v30; // [rsp+28h] [rbp-50h] BYREF __int128 v31; // [rsp+38h] [rbp-40h] v28 = 0; v29 = 0LL; v30 = 0LL; v31 = 0LL; v27 = a3; v3 = *(_BYTE *)(a3 + 3); if ( v3 ) { v4 = (_WORD *)(v27 + 3); do { v5 = *((unsigned __int8 *)v4 + 2); v6 = *((unsigned __int8 *)v4 + 1) << 8; v7 = _byteswap_ushort(*(_WORD *)((char *)v4 + 1)); v4 = (_WORD *)((char *)v4 + 3); if ( v3 > 2u ) { if ( v3 == 3 ) { if ( v7 ) { v11 = v6 + v5; do { v12 = _byteswap_ulong(*(_DWORD *)v4); v26 = v12; v13 = v31; if ( (_QWORD)v31 == *((_QWORD *)&v31 + 1) ) { std::vector<unsigned int>::_M_realloc_insert<unsigned int const&>((char *)&v30 + 8, v31, &v26); } else { *(_DWORD *)v31 = v12; *(_QWORD *)&v31 = v13 + 4; } v4 += 2; --v11; } while ( v11 ); } } else { if ( v3 != 255 ) LABEL_43: __assert_fail( "section_id == DATA_SECTION", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src" "/lib/evmone/eof.cpp", 866LL, "EOF1Header evmone::read_valid_eof1_header(bytes_view)"); HIWORD(v28) = v7; } } else if ( v3 == 1 ) { LOWORD(v28) = v7; } else { if ( v3 != 2 ) goto LABEL_43; if ( v7 ) { v8 = v6 + v5; do { v9 = __ROL2__(*v4, 8); LOWORD(v26) = v9; v10 = *((_QWORD *)&v29 + 1); if ( *((_QWORD *)&v29 + 1) == (_QWORD)v30 ) { std::vector<unsigned short>::_M_realloc_insert<unsigned short const&>(&v29, *((_QWORD *)&v29 + 1), &v26); } else { **((_WORD **)&v29 + 1) = v9; *((_QWORD *)&v29 + 1) = v10 + 2; } ++v4; --v8; } while ( v8 ); } } v3 = *(_BYTE *)v4; } while ( *(_BYTE *)v4 ); } v14 = 0LL; if ( (_QWORD)v31 != *((_QWORD *)&v30 + 1) ) v14 = v31 - *((_QWORD *)&v30 + 1) + 3; v15 = *((_QWORD *)&v29 + 1) - v29 + v14; *(_BYTE *)a1 = 0; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 50) = 0LL; *(_OWORD *)(a1 + 68) = 0LL; *(_OWORD *)(a1 + 84) = 0LL; *(_OWORD *)(a1 + 100) = 0LL; *(_DWORD *)(a1 + 116) = 0; *(_BYTE *)a1 = *(_BYTE *)(v27 + 2); *(_QWORD *)(a1 + 8) = v15 + 13; std::vector<unsigned short>::_M_move_assign(a1 + 16, &v29); v16 = (unsigned __int16)v28 + v15 + 13; v17 = *(unsigned __int16 **)(a1 + 16); for ( i = *(unsigned __int16 **)(a1 + 24); v17 != i; ++v17 ) { if ( v16 >= 0x10000 ) __assert_fail( "code_offset <= std::numeric_limits<uint16_t>::max()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.cpp", 881LL, "EOF1Header evmone::read_valid_eof1_header(bytes_view)"); v19 = *v17; LOWORD(v26) = v16; v20 = *(_WORD **)(a1 + 48); if ( v20 == *(_WORD **)(a1 + 56) ) { std::vector<unsigned short>::_M_realloc_insert<unsigned short>(a1 + 40, v20, &v26); } else { *v20 = v16; *(_QWORD *)(a1 + 48) = v20 + 1; } v16 += v19; } *(_WORD *)(a1 + 64) = HIWORD(v28); std::vector<unsigned int>::_M_move_assign(a1 + 72); v21 = *(int **)(a1 + 72); for ( j = *(int **)(a1 + 80); v21 != j; ++v21 ) { v23 = *v21; LOWORD(v26) = v16; v24 = *(_DWORD **)(a1 + 104); if ( v24 == *(_DWORD **)(a1 + 112) ) { std::vector<unsigned int>::_M_realloc_insert<unsigned short>(a1 + 96, v24, &v26); } else { *v24 = (unsigned __int16)v16; *(_QWORD *)(a1 + 104) = v24 + 1; } LOWORD(v16) = v23 + v16; } *(_DWORD *)(a1 + 68) = (unsigned __int16)v16; if ( *((_QWORD *)&v30 + 1) ) operator delete(*((void **)&v30 + 1), *((_QWORD *)&v31 + 1) - *((_QWORD *)&v30 + 1)); if ( (_QWORD)v29 ) operator delete((void *)v29, v30 - v29); return a1; }
read_valid_eof1_header: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA R14,[RSP + 0x18] MOV dword ptr [R14 + -0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM0 MOV qword ptr [RSP + 0x8],RDX MOV DL,byte ptr [RDX + 0x3] TEST DL,DL JZ 0x00144bb2 MOV RAX,qword ptr [RSP + 0x8] LEA RBP,[RAX + 0x3] LEA R12,[RSP + 0x30] LEA R13,[RSP + 0x4] LAB_00144ace: MOVZX ECX,byte ptr [RBP + 0x2] MOVZX EAX,byte ptr [RBP + 0x1] SHL EAX,0x8 MOV ESI,EAX OR ESI,ECX ADD RBP,0x3 MOVZX EDX,DL CMP EDX,0x2 JG 0x00144b45 CMP EDX,0x1 JZ 0x00144b5d CMP EDX,0x2 JNZ 0x00144d52 TEST SI,SI JZ 0x00144ba7 MOVZX R15D,CX ADD R15D,EAX LAB_00144b07: MOVZX EAX,word ptr [RBP] ROL AX,0x8 MOV word ptr [RSP + 0x4],AX MOV RSI,qword ptr [RSP + 0x20] CMP RSI,qword ptr [RSP + 0x28] JZ 0x00144b2e MOV word ptr [RSI],AX ADD RSI,0x2 MOV qword ptr [RSP + 0x20],RSI JMP 0x00144b39 LAB_00144b2e: MOV RDI,R14 MOV RDX,R13 CALL 0x00148760 LAB_00144b39: ADD RBP,0x2 DEC R15W JNZ 0x00144b07 JMP 0x00144ba7 LAB_00144b45: CMP EDX,0x3 JZ 0x00144b64 CMP EDX,0xff JNZ 0x00144d52 MOV word ptr [RSP + 0x12],SI JMP 0x00144ba7 LAB_00144b5d: MOV word ptr [RSP + 0x10],SI JMP 0x00144ba7 LAB_00144b64: TEST SI,SI JZ 0x00144ba7 MOVZX R15D,CX ADD R15D,EAX LAB_00144b70: MOV EAX,dword ptr [RBP] BSWAP EAX MOV dword ptr [RSP + 0x4],EAX MOV RSI,qword ptr [RSP + 0x38] CMP RSI,qword ptr [RSP + 0x40] JZ 0x00144b92 MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RSP + 0x38],RSI JMP 0x00144b9d LAB_00144b92: MOV RDI,R12 MOV RDX,R13 CALL 0x0014887e LAB_00144b9d: ADD RBP,0x4 DEC R15W JNZ 0x00144b70 LAB_00144ba7: MOV DL,byte ptr [RBP] TEST DL,DL JNZ 0x00144ace LAB_00144bb2: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x38] XOR EDX,EDX SUB RCX,qword ptr [RSP + 0x30] LEA RCX,[RCX + 0x3] CMOVNZ RDX,RCX SUB RAX,qword ptr [RSP + 0x18] LEA R15,[RAX + RDX*0x1] ADD RAX,RDX ADD RAX,0xd MOV byte ptr [RBX],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOVUPS xmmword ptr [RBX + 0x18],XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOVUPS xmmword ptr [RBX + 0x32],XMM0 MOVUPS xmmword ptr [RBX + 0x44],XMM0 MOVUPS xmmword ptr [RBX + 0x54],XMM0 MOVUPS xmmword ptr [RBX + 0x64],XMM0 MOV dword ptr [RBX + 0x74],0x0 MOV RCX,qword ptr [RSP + 0x8] MOV CL,byte ptr [RCX + 0x2] MOV byte ptr [RBX],CL MOV qword ptr [RBX + 0x8],RAX LEA RDI,[RBX + 0x10] MOV RSI,R14 CALL 0x00148a36 MOVZX EAX,word ptr [RSP + 0x10] LEA R12,[RAX + R15*0x1] ADD R12,0xd MOV R13,qword ptr [RBX + 0x10] MOV RBP,qword ptr [RBX + 0x18] CMP R13,RBP JZ 0x00144c85 LEA R14,[RBX + 0x28] LAB_00144c3c: CMP R12,0x10000 JNC 0x00144d33 MOVZX R15D,word ptr [R13] MOV word ptr [RSP + 0x4],R12W MOV RSI,qword ptr [RBX + 0x30] CMP RSI,qword ptr [RBX + 0x38] JZ 0x00144c6c MOV word ptr [RSI],R12W ADD RSI,0x2 MOV qword ptr [RBX + 0x30],RSI JMP 0x00144c79 LAB_00144c6c: MOV RDI,R14 LEA RDX,[RSP + 0x4] CALL 0x0014895a LAB_00144c79: ADD R12,R15 ADD R13,0x2 CMP R13,RBP JNZ 0x00144c3c LAB_00144c85: LEA RSI,[RSP + 0x30] MOVZX EAX,word ptr [RSI + -0x1e] MOV word ptr [RBX + 0x40],AX LEA RDI,[RBX + 0x48] CALL 0x00148a76 MOV R13,qword ptr [RBX + 0x48] MOV RBP,qword ptr [RBX + 0x50] CMP R13,RBP JZ 0x00144ce9 LEA R14,[RBX + 0x60] LAB_00144cac: MOV R15D,dword ptr [R13] MOV word ptr [RSP + 0x4],R12W MOV RSI,qword ptr [RBX + 0x68] CMP RSI,qword ptr [RBX + 0x70] JZ 0x00144cd0 MOVZX EAX,R12W MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x68],RSI JMP 0x00144cdd LAB_00144cd0: MOV RDI,R14 LEA RDX,[RSP + 0x4] CALL 0x00148ab6 LAB_00144cdd: ADD R12,R15 ADD R13,0x4 CMP R13,RBP JNZ 0x00144cac LAB_00144ce9: LEA RAX,[RBX + 0x44] MOVZX ECX,R12W MOV dword ptr [RAX],ECX MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00144d0a MOV RSI,qword ptr [RSP + 0x40] SUB RSI,RDI CALL 0x00121200 LAB_00144d0a: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00144d21 MOV RSI,qword ptr [RSP + 0x28] SUB RSI,RDI CALL 0x00121200 LAB_00144d21: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144d33: LEA RDI,[0x18a297] LEA RSI,[0x18a1e3] LEA RCX,[0x18a261] MOV EDX,0x371 CALL 0x00121130 LAB_00144d52: LEA RDI,[0x18a1c8] LEA RSI,[0x18a1e3] LEA RCX,[0x18a261] MOV EDX,0x362 CALL 0x00121130
/* evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char> >) */ int1 * evmone::read_valid_eof1_header(int1 *param_1,int8 param_2,long param_3) { byte bVar1; uint uVar2; ushort *puVar3; int2 *puVar4; uint *puVar5; uint *puVar6; long lVar7; int iVar8; long lVar9; byte bVar10; uint *puVar11; ushort uVar12; ulong uVar13; ushort *puVar14; uint uVar15; uint local_74; long local_70; int4 local_68; void *local_60; ushort *puStack_58; ushort *local_50; void *pvStack_48; uint *local_40; uint *puStack_38; local_68 = 0; local_60 = (void *)0x0; puStack_58 = (ushort *)0x0; local_50 = (ushort *)0x0; pvStack_48 = (void *)0x0; local_40 = (uint *)0x0; puStack_38 = (uint *)0x0; bVar10 = *(byte *)(param_3 + 3); local_70 = param_3; if (bVar10 != 0) { puVar11 = (uint *)(param_3 + 3); do { bVar1 = *(byte *)((long)puVar11 + 2); lVar9 = (ulong)*(byte *)((long)puVar11 + 1) << 8; iVar8 = (int)lVar9; uVar12 = (ushort)lVar9 | (ushort)bVar1; puVar11 = (uint *)((long)puVar11 + 3); if (bVar10 < 3) { if (bVar10 == 1) { local_68 = CONCAT22(local_68._2_2_,uVar12); } else { if (bVar10 != 2) { LAB_00144d52: /* WARNING: Subroutine does not return */ __assert_fail("section_id == DATA_SECTION", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.cpp" ,0x362,"EOF1Header evmone::read_valid_eof1_header(bytes_view)"); } if (uVar12 != 0) { uVar15 = (uint)(ushort)bVar1 + iVar8; do { uVar12 = (ushort)*puVar11 << 8 | (ushort)*puVar11 >> 8; local_74 = CONCAT22(local_74._2_2_,uVar12); if (puStack_58 == local_50) { /* try { // try from 00144b2e to 00144b38 has its CatchHandler @ 00144d82 */ std::vector<unsigned_short,std::allocator<unsigned_short>>:: _M_realloc_insert<unsigned_short_const&> ((vector<unsigned_short,std::allocator<unsigned_short>> *)&local_60, puStack_58,&local_74); } else { *puStack_58 = uVar12; puStack_58 = puStack_58 + 1; } puVar11 = (uint *)((long)puVar11 + 2); uVar12 = (short)uVar15 - 1; uVar15 = (uint)uVar12; } while (uVar12 != 0); } } } else if (bVar10 == 3) { if (uVar12 != 0) { uVar15 = (uint)(ushort)bVar1 + iVar8; do { uVar2 = *puVar11; local_74 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18; if (local_40 == puStack_38) { /* try { // try from 00144b92 to 00144b9c has its CatchHandler @ 00144d80 */ std::vector<unsigned_int,std::allocator<unsigned_int>>:: _M_realloc_insert<unsigned_int_const&> ((vector<unsigned_int,std::allocator<unsigned_int>> *)&pvStack_48,local_40, &local_74); } else { *local_40 = local_74; local_40 = local_40 + 1; } puVar11 = puVar11 + 1; uVar12 = (short)uVar15 - 1; uVar15 = (uint)uVar12; } while (uVar12 != 0); } } else { if (bVar10 != 0xff) goto LAB_00144d52; local_68 = CONCAT22(uVar12,(ushort)local_68); } bVar10 = (byte)*puVar11; } while (bVar10 != 0); } puVar14 = puStack_58; lVar9 = 0; if ((long)local_40 - (long)pvStack_48 != 0) { lVar9 = ((long)local_40 - (long)pvStack_48) + 3; } lVar7 = lVar9 - (long)local_60; *param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x32) = 0; *(int8 *)(param_1 + 0x3a) = 0; *(int8 *)(param_1 + 0x44) = 0; *(int8 *)(param_1 + 0x4c) = 0; *(int8 *)(param_1 + 0x54) = 0; *(int8 *)(param_1 + 0x5c) = 0; *(int8 *)(param_1 + 100) = 0; *(int8 *)(param_1 + 0x6c) = 0; *(int4 *)(param_1 + 0x74) = 0; *param_1 = *(int1 *)(local_70 + 2); *(long *)(param_1 + 8) = (long)puStack_58 + (lVar9 - (long)local_60) + 0xd; std::vector<unsigned_short,std::allocator<unsigned_short>>::_M_move_assign (param_1 + 0x10,(vector<unsigned_short,std::allocator<unsigned_short>> *)&local_60); uVar13 = (long)puVar14 + (ulong)(ushort)local_68 + lVar7 + 0xd; puVar14 = *(ushort **)(param_1 + 0x10); puVar3 = *(ushort **)(param_1 + 0x18); if (puVar14 != puVar3) { do { if (0xffff < uVar13) { /* WARNING: Subroutine does not return */ __assert_fail("code_offset <= std::numeric_limits<uint16_t>::max()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.cpp" ,0x371,"EOF1Header evmone::read_valid_eof1_header(bytes_view)"); } uVar12 = *puVar14; local_74 = CONCAT22(local_74._2_2_,(short)uVar13); puVar4 = *(int2 **)(param_1 + 0x30); if (puVar4 == *(int2 **)(param_1 + 0x38)) { /* try { // try from 00144c6c to 00144c78 has its CatchHandler @ 00144d71 */ std::vector<unsigned_short,std::allocator<unsigned_short>>:: _M_realloc_insert<unsigned_short> ((vector<unsigned_short,std::allocator<unsigned_short>> *)(param_1 + 0x28),puVar4, &local_74); } else { *puVar4 = (short)uVar13; *(int2 **)(param_1 + 0x30) = puVar4 + 1; } uVar13 = uVar13 + uVar12; puVar14 = puVar14 + 1; } while (puVar14 != puVar3); } uVar15 = (uint)uVar13; *(int2 *)(param_1 + 0x40) = local_68._2_2_; std::vector<unsigned_int,std::allocator<unsigned_int>>::_M_move_assign(param_1 + 0x48); puVar11 = *(uint **)(param_1 + 0x48); puVar5 = *(uint **)(param_1 + 0x50); if (puVar11 != puVar5) { do { uVar15 = *puVar11; local_74 = CONCAT22(local_74._2_2_,(short)uVar13); puVar6 = *(uint **)(param_1 + 0x68); if (puVar6 == *(uint **)(param_1 + 0x70)) { /* try { // try from 00144cd0 to 00144cdc has its CatchHandler @ 00144d73 */ std::vector<unsigned_int,std::allocator<unsigned_int>>::_M_realloc_insert<unsigned_short> ((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_1 + 0x60),puVar6, &local_74); } else { *puVar6 = (uint)uVar13 & 0xffff; *(uint **)(param_1 + 0x68) = puVar6 + 1; } uVar13 = uVar13 + uVar15; uVar15 = (uint)uVar13; puVar11 = puVar11 + 1; } while (puVar11 != puVar5); } *(uint *)(param_1 + 0x44) = uVar15 & 0xffff; if (pvStack_48 != (void *)0x0) { operator_delete(pvStack_48,(long)puStack_38 - (long)pvStack_48); } if (local_60 != (void *)0x0) { operator_delete(local_60,(long)local_50 - (long)local_60); } return param_1; }
47,340
calc_hashnr
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
static uint calc_hashnr(const uchar *key,uint length) { register uint nr=1, nr2=4; while (length--) { nr^= (((nr & 63)+nr2)*((uint) (uchar) *key++))+ (nr << 8); nr2+=3; } return((uint) nr); }
O0
c
calc_hashnr: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x1, -0x10(%rbp) movl $0x4, -0x14(%rbp) movl -0xc(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0xc(%rbp) cmpl $0x0, %eax je 0x5f1f0 movl -0x10(%rbp), %eax andl $0x3f, %eax addl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movzbl (%rcx), %ecx imull %ecx, %eax movl -0x10(%rbp), %ecx shll $0x8, %ecx addl %ecx, %eax xorl -0x10(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x14(%rbp), %eax addl $0x3, %eax movl %eax, -0x14(%rbp) jmp 0x5f1a9 movl -0x10(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
calc_hashnr: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], 1 mov [rbp+var_14], 4 loc_5F1A9: mov eax, [rbp+var_C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_C], ecx cmp eax, 0 jz short loc_5F1F0 mov eax, [rbp+var_10] and eax, 3Fh add eax, [rbp+var_14] mov rcx, [rbp+var_8] mov rdx, rcx add rdx, 1 mov [rbp+var_8], rdx movzx ecx, byte ptr [rcx] imul eax, ecx mov ecx, [rbp+var_10] shl ecx, 8 add eax, ecx xor eax, [rbp+var_10] mov [rbp+var_10], eax mov eax, [rbp+var_14] add eax, 3 mov [rbp+var_14], eax jmp short loc_5F1A9 loc_5F1F0: mov eax, [rbp+var_10] pop rbp retn
long long calc_hashnr(unsigned __int8 *a1, int a2) { unsigned __int8 *v3; // rcx int i; // [rsp+0h] [rbp-14h] unsigned int v6; // [rsp+4h] [rbp-10h] v6 = 1; for ( i = 4; a2--; i += 3 ) { v3 = a1++; v6 ^= (v6 << 8) + *v3 * (i + (v6 & 0x3F)); } return v6; }
calc_hashnr: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],0x1 MOV dword ptr [RBP + -0x14],0x4 LAB_0015f1a9: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0xc],ECX CMP EAX,0x0 JZ 0x0015f1f0 MOV EAX,dword ptr [RBP + -0x10] AND EAX,0x3f ADD EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOVZX ECX,byte ptr [RCX] IMUL EAX,ECX MOV ECX,dword ptr [RBP + -0x10] SHL ECX,0x8 ADD EAX,ECX XOR EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x3 MOV dword ptr [RBP + -0x14],EAX JMP 0x0015f1a9 LAB_0015f1f0: MOV EAX,dword ptr [RBP + -0x10] POP RBP RET
uint calc_hashnr(byte *param_1,int param_2) { int local_1c; uint local_18; int local_14; byte *local_10; local_18 = 1; local_1c = 4; local_14 = param_2; local_10 = param_1; while (local_14 != 0) { local_18 = ((local_18 & 0x3f) + local_1c) * (uint)*local_10 + local_18 * 0x100 ^ local_18; local_1c = local_1c + 3; local_14 = local_14 + -1; local_10 = local_10 + 1; } return local_18; }
47,341
task_process(Task*)
untodesu[P]voxelius/game/shared/threading.cc
static void task_process(Task *task) { task->set_status(task_status::PROCESSING); task->process(); if(task->get_status() == task_status::PROCESSING) { // If the task status is still PROCESSING // it can be deduced it hasn't been cancelled task->set_status(task_status::COMPLETED); } }
O0
cpp
task_process(Task*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0xd5000 movq -0x8(%rbp), %rdi movq (%rdi), %rax callq *0x10(%rax) movq -0x8(%rbp), %rdi callq 0xd4fe0 cmpl $0x1, %eax jne 0xd55f0 movq -0x8(%rbp), %rdi movl $0x2, %esi callq 0xd5000 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL12task_processP4Task: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov esi, 1 call _ZN4Task10set_statusE11task_status; Task::set_status(task_status) mov rdi, [rbp+var_8] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, [rbp+var_8]; this call _ZNK4Task10get_statusEv; Task::get_status(void) cmp eax, 1 jnz short loc_D55F0 mov rdi, [rbp+var_8] mov esi, 2 call _ZN4Task10set_statusE11task_status; Task::set_status(task_status) loc_D55F0: add rsp, 10h pop rbp retn
long long task_process(Task *a1) { long long result; // rax Task::set_status((long long)a1, 1u); (*(void ( **)(Task *))(*(_QWORD *)a1 + 16LL))(a1); result = Task::get_status(a1); if ( (_DWORD)result == 1 ) return Task::set_status((long long)a1, 2u); return result; }
task_process: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x001d5000 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x8] CALL 0x001d4fe0 CMP EAX,0x1 JNZ 0x001d55f0 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x2 CALL 0x001d5000 LAB_001d55f0: ADD RSP,0x10 POP RBP RET
/* task_process(Task*) */ void task_process(Task *param_1) { int iVar1; Task::set_status(param_1,1); (**(code **)(*(long *)param_1 + 0x10))(); iVar1 = Task::get_status(param_1); if (iVar1 == 1) { Task::set_status(param_1,2); } return; }
47,342
task_process(Task*)
untodesu[P]voxelius/game/shared/threading.cc
static void task_process(Task *task) { task->set_status(task_status::PROCESSING); task->process(); if(task->get_status() == task_status::PROCESSING) { // If the task status is still PROCESSING // it can be deduced it hasn't been cancelled task->set_status(task_status::COMPLETED); } }
O3
cpp
task_process(Task*): pushq %rbx movq %rdi, %rbx movl $0x1, %eax xchgl %eax, 0x8(%rdi) movq (%rdi), %rax callq *0x10(%rax) movl 0x8(%rbx), %eax cmpl $0x1, %eax jne 0x47b09 movl $0x2, %eax xchgl %eax, 0x8(%rbx) popq %rbx retq nop
_ZL12task_processP4Task: push rbx mov rbx, rdi mov eax, 1 xchg eax, [rdi+8] mov rax, [rdi] call qword ptr [rax+10h] mov eax, [rbx+8] cmp eax, 1 jnz short loc_47B09 mov eax, 2 xchg eax, [rbx+8] loc_47B09: pop rbx retn
long long task_process(Task *a1) { long long result; // rax _InterlockedExchange((volatile __int32 *)a1 + 2, 1); (*(void ( **)(Task *))(*(_QWORD *)a1 + 16LL))(a1); result = *((unsigned int *)a1 + 2); if ( (_DWORD)result == 1 ) return (unsigned int)_InterlockedExchange((volatile __int32 *)a1 + 2, 2); return result; }
task_process: PUSH RBX MOV RBX,RDI MOV EAX,0x1 XCHG dword ptr [RDI + 0x8],EAX MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV EAX,dword ptr [RBX + 0x8] CMP EAX,0x1 JNZ 0x00147b09 MOV EAX,0x2 XCHG dword ptr [RBX + 0x8],EAX LAB_00147b09: POP RBX RET
/* task_process(Task*) */ int task_process(Task *param_1) { int iVar1; LOCK(); *(int4 *)(param_1 + 8) = 1; UNLOCK(); (**(code **)(*(long *)param_1 + 0x10))(); iVar1 = *(int *)(param_1 + 8); if (iVar1 == 1) { LOCK(); iVar1 = *(int *)(param_1 + 8); *(int *)(param_1 + 8) = 2; UNLOCK(); } return iVar1; }
47,343
GetPhysicalDeviceProperties2KHR(VkPhysicalDevice_T*, VkPhysicalDeviceProperties2*)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties) { auto *layer = getInstanceLayer(physicalDevice); layer->getTable()->GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); adjustProps2(pProperties); }
O1
cpp
GetPhysicalDeviceProperties2KHR(VkPhysicalDevice_T*, VkPhysicalDeviceProperties2*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %r15 leaq 0x558ff5(%rip), %rdi # 0x5e4038 callq 0x80290 testl %eax, %eax jne 0x8b128 movq 0x558f79(%rip), %rdi # 0x5e3fd0 xorl %r9d, %r9d movq %r15, %rax xorl %edx, %edx divq %rdi movq 0x558f5f(%rip), %rax # 0x5e3fc8 movq (%rax,%rdx,8), %rax testq %rax, %rax je 0x8b0b0 movq (%rax), %r8 movq %rax, %r9 cmpq %r15, 0x8(%r8) je 0x8b0b0 movq %rdx, %rcx movq %r8, %r10 movq (%r8), %r8 testq %r8, %r8 je 0x8b0ad movq 0x8(%r8), %rsi movq %rsi, %rax xorl %edx, %edx divq %rdi movl $0x0, %r9d cmpq %rcx, %rdx jne 0x8b0b0 movq %r10, %r9 cmpq %r15, %rsi jne 0x8b081 jmp 0x8b0b0 xorl %r9d, %r9d testq %r9, %r9 je 0x8b0ba movq (%r9), %rax jmp 0x8b0bc xorl %eax, %eax testq %rax, %rax je 0x8b0c7 movq 0x10(%rax), %r15 jmp 0x8b0ca xorl %r15d, %r15d leaq 0x558f67(%rip), %rdi # 0x5e4038 callq 0x7efe0 movq %r14, %rdi movq %rbx, %rsi callq *0x28(%r15) movq 0x8(%rbx), %rcx testq %rcx, %rcx je 0x8b106 movl (%rcx), %edx cmpl $0x3ba1d6b1, %edx # imm = 0x3BA1D6B1 jne 0x8b0f8 movq %rcx, %rax jmp 0x8b0fc movq 0x8(%rcx), %rcx cmpl $0x3ba1d6b1, %edx # imm = 0x3BA1D6B1 jne 0x8b0e4 jmp 0x8b108 xorl %eax, %eax testq %rax, %rax je 0x8b11d xorl %ecx, %ecx xorb $-0x56, 0x10(%rax,%rcx) incq %rcx cmpq $0x10, %rcx jne 0x8b10f addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7ee10 nop
_ZL31GetPhysicalDeviceProperties2KHRP18VkPhysicalDevice_TP27VkPhysicalDeviceProperties2: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov r15, [rdi] lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_lock test eax, eax jnz loc_8B128 mov rdi, cs:qword_5E3FD0 xor r9d, r9d mov rax, r15 xor edx, edx div rdi mov rax, cs:_ZL12instanceData; instanceData mov rax, [rax+rdx*8] test rax, rax jz short loc_8B0B0 mov r8, [rax] mov r9, rax cmp [r8+8], r15 jz short loc_8B0B0 mov rcx, rdx loc_8B081: mov r10, r8 mov r8, [r8] test r8, r8 jz short loc_8B0AD mov rsi, [r8+8] mov rax, rsi xor edx, edx div rdi mov r9d, 0 cmp rdx, rcx jnz short loc_8B0B0 mov r9, r10 cmp rsi, r15 jnz short loc_8B081 jmp short loc_8B0B0 loc_8B0AD: xor r9d, r9d loc_8B0B0: test r9, r9 jz short loc_8B0BA mov rax, [r9] jmp short loc_8B0BC loc_8B0BA: xor eax, eax loc_8B0BC: test rax, rax jz short loc_8B0C7 mov r15, [rax+10h] jmp short loc_8B0CA loc_8B0C7: xor r15d, r15d loc_8B0CA: lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_unlock mov rdi, r14 mov rsi, rbx call qword ptr [r15+28h] mov rcx, [rbx+8] loc_8B0E4: test rcx, rcx jz short loc_8B106 mov edx, [rcx] cmp edx, 3BA1D6B1h jnz short loc_8B0F8 mov rax, rcx jmp short loc_8B0FC loc_8B0F8: mov rcx, [rcx+8] loc_8B0FC: cmp edx, 3BA1D6B1h jnz short loc_8B0E4 jmp short loc_8B108 loc_8B106: xor eax, eax loc_8B108: test rax, rax jz short loc_8B11D xor ecx, ecx loc_8B10F: xor byte ptr [rax+rcx+10h], 0AAh inc rcx cmp rcx, 10h jnz short loc_8B10F loc_8B11D: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_8B128: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long GetPhysicalDeviceProperties2KHR(unsigned long long *a1, long long a2) { unsigned long long v2; // r15 int v3; // eax long long *v4; // r9 long long **v5; // rax long long *v6; // r8 long long *v7; // r10 long long v8; // rax long long v9; // r15 long long result; // rax long long v11; // rcx int v12; // edx long long i; // rcx v2 = *a1; v3 = pthread_mutex_lock(&globalLock); if ( v3 ) std::__throw_system_error(v3); v4 = 0LL; v5 = *(long long ***)(instanceData + 8 * (v2 % qword_5E3FD0)); if ( v5 ) { v6 = *v5; v4 = *(long long **)(instanceData + 8 * (v2 % qword_5E3FD0)); if ( (*v5)[1] != v2 ) { while ( 1 ) { v7 = v6; v6 = (long long *)*v6; if ( !v6 ) break; v4 = 0LL; if ( v6[1] % (unsigned long long)qword_5E3FD0 == v2 % qword_5E3FD0 ) { v4 = v7; if ( v6[1] != v2 ) continue; } goto LABEL_9; } v4 = 0LL; } } LABEL_9: if ( v4 ) v8 = *v4; else v8 = 0LL; if ( v8 ) v9 = *(_QWORD *)(v8 + 16); else v9 = 0LL; pthread_mutex_unlock(&globalLock); result = (*(long long ( **)(unsigned long long *, long long))(v9 + 40))(a1, a2); v11 = *(_QWORD *)(a2 + 8); while ( v11 ) { v12 = *(_DWORD *)v11; if ( *(_DWORD *)v11 == 1000462001 ) result = v11; else v11 = *(_QWORD *)(v11 + 8); if ( v12 == 1000462001 ) goto LABEL_23; } result = 0LL; LABEL_23: if ( result ) { for ( i = 0LL; i != 16; ++i ) *(_BYTE *)(result + i + 16) ^= 0xAAu; } return result; }
GetPhysicalDeviceProperties2KHR: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI] LEA RDI,[0x6e4038] CALL 0x00180290 TEST EAX,EAX JNZ 0x0018b128 MOV RDI,qword ptr [0x006e3fd0] XOR R9D,R9D MOV RAX,R15 XOR EDX,EDX DIV RDI MOV RAX,qword ptr [0x006e3fc8] MOV RAX,qword ptr [RAX + RDX*0x8] TEST RAX,RAX JZ 0x0018b0b0 MOV R8,qword ptr [RAX] MOV R9,RAX CMP qword ptr [R8 + 0x8],R15 JZ 0x0018b0b0 MOV RCX,RDX LAB_0018b081: MOV R10,R8 MOV R8,qword ptr [R8] TEST R8,R8 JZ 0x0018b0ad MOV RSI,qword ptr [R8 + 0x8] MOV RAX,RSI XOR EDX,EDX DIV RDI MOV R9D,0x0 CMP RDX,RCX JNZ 0x0018b0b0 MOV R9,R10 CMP RSI,R15 JNZ 0x0018b081 JMP 0x0018b0b0 LAB_0018b0ad: XOR R9D,R9D LAB_0018b0b0: TEST R9,R9 JZ 0x0018b0ba MOV RAX,qword ptr [R9] JMP 0x0018b0bc LAB_0018b0ba: XOR EAX,EAX LAB_0018b0bc: TEST RAX,RAX JZ 0x0018b0c7 MOV R15,qword ptr [RAX + 0x10] JMP 0x0018b0ca LAB_0018b0c7: XOR R15D,R15D LAB_0018b0ca: LEA RDI,[0x6e4038] CALL 0x0017efe0 MOV RDI,R14 MOV RSI,RBX CALL qword ptr [R15 + 0x28] MOV RCX,qword ptr [RBX + 0x8] LAB_0018b0e4: TEST RCX,RCX JZ 0x0018b106 MOV EDX,dword ptr [RCX] CMP EDX,0x3ba1d6b1 JNZ 0x0018b0f8 MOV RAX,RCX JMP 0x0018b0fc LAB_0018b0f8: MOV RCX,qword ptr [RCX + 0x8] LAB_0018b0fc: CMP EDX,0x3ba1d6b1 JNZ 0x0018b0e4 JMP 0x0018b108 LAB_0018b106: XOR EAX,EAX LAB_0018b108: TEST RAX,RAX JZ 0x0018b11d XOR ECX,ECX LAB_0018b10f: XOR byte ptr [RAX + RCX*0x1 + 0x10],0xaa INC RCX CMP RCX,0x10 JNZ 0x0018b10f LAB_0018b11d: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0018b128: MOV EDI,EAX CALL 0x0017ee10
/* GetPhysicalDeviceProperties2KHR(VkPhysicalDevice_T*, VkPhysicalDeviceProperties2*) */ void GetPhysicalDeviceProperties2KHR (VkPhysicalDevice_T *param_1,VkPhysicalDeviceProperties2 *param_2) { byte *pbVar1; ulong uVar2; long *plVar3; int iVar4; int *piVar5; long lVar6; long *plVar7; long *plVar8; uVar2 = *(ulong *)param_1; iVar4 = pthread_mutex_lock((pthread_mutex_t *)globalLock); if (iVar4 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar4); } plVar7 = *(long **)(instanceData + (uVar2 % DAT_006e3fd0) * 8); plVar8 = (long *)0x0; if ((plVar7 != (long *)0x0) && (plVar3 = (long *)*plVar7, plVar8 = plVar7, ((long *)*plVar7)[1] != uVar2)) { while (plVar7 = plVar3, plVar3 = (long *)*plVar7, plVar3 != (long *)0x0) { plVar8 = (long *)0x0; if (((ulong)plVar3[1] % DAT_006e3fd0 != uVar2 % DAT_006e3fd0) || (plVar8 = plVar7, plVar3[1] == uVar2)) goto LAB_0018b0b0; } plVar8 = (long *)0x0; } LAB_0018b0b0: if (plVar8 == (long *)0x0) { lVar6 = 0; } else { lVar6 = *plVar8; } if (lVar6 == 0) { lVar6 = 0; } else { lVar6 = *(long *)(lVar6 + 0x10); } pthread_mutex_unlock((pthread_mutex_t *)globalLock); (**(code **)(lVar6 + 0x28))(param_1,param_2); for (piVar5 = *(int **)(param_2 + 8); piVar5 != (int *)0x0; piVar5 = *(int **)(piVar5 + 2)) { if (*piVar5 == 0x3ba1d6b1) goto LAB_0018b108; } piVar5 = (int *)0x0; LAB_0018b108: if (piVar5 != (int *)0x0) { lVar6 = 0; do { pbVar1 = (byte *)((long)piVar5 + lVar6 + 0x10); *pbVar1 = *pbVar1 ^ 0xaa; lVar6 = lVar6 + 1; } while (lVar6 != 0x10); } return; }
47,344
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O2
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx subq $0x18, %rsp cmpl $0xa, %esi ja 0xb5cc3 movq %rdi, %rbx movl %esi, %eax leaq 0x20e54(%rip), %rcx # 0xd6a60 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x21e8c(%rip), %rsi # 0xd7aa8 leaq 0x17(%rsp), %rdx jmp 0xb5cb0 leaq 0x21ea7(%rip), %rsi # 0xd7ad4 leaq 0x13(%rsp), %rdx jmp 0xb5cb0 leaq 0x21efe(%rip), %rsi # 0xd7b39 leaq 0xe(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e74(%rip), %rsi # 0xd7abd leaq 0x15(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e73(%rip), %rsi # 0xd7aca leaq 0x14(%rsp), %rdx jmp 0xb5cb0 leaq 0x21ea8(%rip), %rsi # 0xd7b0d leaq 0x10(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e42(%rip), %rsi # 0xd7ab5 leaq 0x16(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e70(%rip), %rsi # 0xd7af1 leaq 0x12(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e6e(%rip), %rsi # 0xd7afd leaq 0x11(%rsp), %rdx jmp 0xb5cb0 leaq 0x21ea9(%rip), %rsi # 0xd7b46 leaq 0xd(%rsp), %rdx jmp 0xb5cb0 leaq 0x21e73(%rip), %rsi # 0xd7b1e leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2ac52 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x265e0 movq %rax, %rbx leaq 0x21e7d(%rip), %rsi # 0xd7b52 movq %rax, %rdi callq 0x26420 movq 0x6b30c(%rip), %rsi # 0x120ff0 movq 0x6b26d(%rip), %rdx # 0x120f58 movq %rbx, %rdi callq 0x275b0 movq %rax, %r14 movq %rbx, %rdi callq 0x268f0 movq %r14, %rdi callq 0x27660
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx sub rsp, 18h cmp esi, 0Ah; switch 11 cases ja def_B5C13; jumptable 00000000000B5C13 default case mov rbx, rdi mov eax, esi lea rcx, jpt_B5C13 movsxd rax, ds:(jpt_B5C13 - 0D6A60h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B5C15: lea rsi, aContentOnly; jumptable 00000000000B5C13 case 0 lea rdx, [rsp+28h+var_11] jmp loc_B5CB0 loc_B5C26: lea rsi, aLlama3XWithBui; jumptable 00000000000B5C13 case 4 lea rdx, [rsp+28h+var_15] jmp short loc_B5CB0 loc_B5C34: lea rsi, aHermes2Pro; jumptable 00000000000B5C13 case 9 lea rdx, [rsp+28h+var_1A] jmp short loc_B5CB0 loc_B5C42: lea rsi, aMistralNemo; jumptable 00000000000B5C13 case 2 lea rdx, [rsp+28h+var_13] jmp short loc_B5CB0 loc_B5C50: lea rsi, aLlama3X; jumptable 00000000000B5C13 case 3 lea rdx, [rsp+28h+var_14] jmp short loc_B5CB0 loc_B5C5E: lea rsi, aFunctionaryV32; jumptable 00000000000B5C13 case 7 lea rdx, [rsp+28h+var_18] jmp short loc_B5CB0 loc_B5C6C: lea rsi, aGeneric; jumptable 00000000000B5C13 case 1 lea rdx, [rsp+28h+var_12] jmp short loc_B5CB0 loc_B5C7A: lea rsi, aDeepseekR1; jumptable 00000000000B5C13 case 5 lea rdx, [rsp+28h+var_16] jmp short loc_B5CB0 loc_B5C88: lea rsi, aFirefunctionV2; jumptable 00000000000B5C13 case 6 lea rdx, [rsp+28h+var_17] jmp short loc_B5CB0 loc_B5C96: lea rsi, aCommandR7b; jumptable 00000000000B5C13 case 10 lea rdx, [rsp+28h+var_1B] jmp short loc_B5CB0 loc_B5CA4: lea rsi, aFunctionaryV31; jumptable 00000000000B5C13 case 8 lea rdx, [rsp+28h+var_19] loc_B5CB0: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 18h pop rbx pop r14 retn def_B5C13: push 10h; jumptable 00000000000B5C13 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { const char *v2; // rsi std::runtime_error *exception; // rbx switch ( a2 ) { case 0: v2 = "Content-only"; break; case 1: v2 = "Generic"; break; case 2: v2 = "Mistral Nemo"; break; case 3: v2 = "Llama 3.x"; break; case 4: v2 = "Llama 3.x with builtin tools"; break; case 5: v2 = "DeepSeek R1"; break; case 6: v2 = "FireFunction v2"; break; case 7: v2 = "Functionary v3.2"; break; case 8: v2 = "Functionary v3.1 Llama 3.1"; break; case 9: v2 = "Hermes 2 Pro"; break; case 10: v2 = "Command R7B"; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::basic_string<std::allocator<char>>(a1, (long long)v2); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x18 CMP ESI,0xa JA 0x001b5cc3 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1d6a60] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1d7aa8] LEA RDX,[RSP + 0x17] JMP 0x001b5cb0 caseD_4: LEA RSI,[0x1d7ad4] LEA RDX,[RSP + 0x13] JMP 0x001b5cb0 caseD_9: LEA RSI,[0x1d7b39] LEA RDX,[RSP + 0xe] JMP 0x001b5cb0 caseD_2: LEA RSI,[0x1d7abd] LEA RDX,[RSP + 0x15] JMP 0x001b5cb0 caseD_3: LEA RSI,[0x1d7aca] LEA RDX,[RSP + 0x14] JMP 0x001b5cb0 caseD_7: LEA RSI,[0x1d7b0d] LEA RDX,[RSP + 0x10] JMP 0x001b5cb0 caseD_1: LEA RSI,[0x1d7ab5] LEA RDX,[RSP + 0x16] JMP 0x001b5cb0 caseD_5: LEA RSI,[0x1d7af1] LEA RDX,[RSP + 0x12] JMP 0x001b5cb0 caseD_6: LEA RSI,[0x1d7afd] LEA RDX,[RSP + 0x11] JMP 0x001b5cb0 caseD_a: LEA RSI,[0x1d7b46] LEA RDX,[RSP + 0xd] JMP 0x001b5cb0 caseD_8: LEA RSI,[0x1d7b1e] LEA RDX,[RSP + 0xf] LAB_001b5cb0: MOV RDI,RBX CALL 0x0012ac52 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET default: PUSH 0x10 POP RDI CALL 0x001265e0 MOV RBX,RAX LAB_001b5cce: LEA RSI,[0x1d7b52] MOV RDI,RAX CALL 0x00126420 LAB_001b5cdd: MOV RSI,qword ptr [0x00220ff0] MOV RDX,qword ptr [0x00220f58] MOV RDI,RBX CALL 0x001275b0
/* common_chat_format_name[abi:cxx11](common_chat_format) */ string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2) { runtime_error *this; allocator *paVar1; char *pcVar2; allocator local_1b; allocator local_1a; allocator local_19; allocator local_18; allocator local_17; allocator local_16; allocator local_15; allocator local_14; allocator local_13; allocator local_12; allocator local_11; switch(param_2) { case 0: pcVar2 = "Content-only"; paVar1 = &local_11; break; case 1: pcVar2 = "Generic"; paVar1 = &local_12; break; case 2: pcVar2 = "Mistral Nemo"; paVar1 = &local_13; break; case 3: pcVar2 = "Llama 3.x"; paVar1 = &local_14; break; case 4: pcVar2 = "Llama 3.x with builtin tools"; paVar1 = &local_15; break; case 5: pcVar2 = "DeepSeek R1"; paVar1 = &local_16; break; case 6: pcVar2 = "FireFunction v2"; paVar1 = &local_17; break; case 7: pcVar2 = "Functionary v3.2"; paVar1 = &local_18; break; case 8: pcVar2 = "Functionary v3.1 Llama 3.1"; paVar1 = &local_19; break; case 9: pcVar2 = "Hermes 2 Pro"; paVar1 = &local_1a; break; case 10: pcVar2 = "Command R7B"; paVar1 = &local_1b; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b5cce to 001b5cdc has its CatchHandler @ 001b5cf3 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00220ff0,PTR__runtime_error_00220f58); } std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1); return param_1; }
47,345
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>)
monkey531[P]llama/common/./minja.hpp
static Value array(const std::vector<Value> values = {}) { auto array = std::make_shared<ArrayType>(); for (const auto& item : values) { array->push_back(item); } return Value(array); }
O2
cpp
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %rdi callq 0x4882b movq (%r15), %r14 movq 0x8(%r15), %r15 cmpq %r15, %r14 je 0x4a03d movq (%rsp), %rdi movq %r14, %rsi callq 0x4a124 addq $0x50, %r14 jmp 0x4a026 movq %rsp, %rsi movq %rbx, %rdi callq 0x4a150 leaq 0x8(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rdi callq 0x20b90
_ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE: push r15 push r14 push rbx sub rsp, 10h mov r15, rsi mov rbx, rdi mov rdi, rsp call _ZSt11make_sharedISt6vectorIN5minja5ValueESaIS2_EEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<std::vector<minja::Value>>() mov r14, [r15] mov r15, [r15+8] loc_4A026: cmp r14, r15 jz short loc_4A03D mov rdi, [rsp+28h+var_28] mov rsi, r14 call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&) add r14, 50h ; 'P' jmp short loc_4A026 loc_4A03D: mov rsi, rsp mov rdi, rbx call _ZN5minja5ValueC2ERKSt10shared_ptrISt6vectorIS0_SaIS0_EEE; minja::Value::Value(std::shared_ptr<std::vector<minja::Value>> const&) lea rdi, [rsp+28h+var_20] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
long long minja::Value::array(long long a1, long long *a2) { long long v2; // r14 long long v3; // r15 long long v5; // [rsp+0h] [rbp-28h] BYREF _QWORD v6[4]; // [rsp+8h] [rbp-20h] BYREF std::make_shared<std::vector<minja::Value>>((long long)&v5); v2 = *a2; v3 = a2[1]; while ( v2 != v3 ) { std::vector<minja::Value>::push_back(v5, v2); v2 += 80LL; } minja::Value::Value(a1, &v5); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v6); return a1; }
array: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0014882b MOV R14,qword ptr [R15] MOV R15,qword ptr [R15 + 0x8] LAB_0014a026: CMP R14,R15 JZ 0x0014a03d MOV RDI,qword ptr [RSP] LAB_0014a02f: MOV RSI,R14 CALL 0x0014a124 LAB_0014a037: ADD R14,0x50 JMP 0x0014a026 LAB_0014a03d: MOV RSI,RSP MOV RDI,RBX CALL 0x0014a150 LEA RDI,[RSP + 0x8] CALL 0x0012eeb2 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value> >) */ Value * __thiscall minja::Value::array(Value *this,int8 *param_2) { Value *pVVar1; Value *pVVar2; vector<minja::Value,std::allocator<minja::Value>> *local_28; __shared_count<(__gnu_cxx::_Lock_policy)2> local_20 [8]; std::make_shared<std::vector<minja::Value,std::allocator<minja::Value>>>(); pVVar1 = (Value *)param_2[1]; for (pVVar2 = (Value *)*param_2; pVVar2 != pVVar1; pVVar2 = pVVar2 + 0x50) { /* try { // try from 0014a02f to 0014a036 has its CatchHandler @ 0014a05f */ std::vector<minja::Value,std::allocator<minja::Value>>::push_back(local_28,pVVar2); } Value(this,(shared_ptr *)&local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_20); return this; }
47,346
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>)
monkey531[P]llama/common/./minja.hpp
static Value array(const std::vector<Value> values = {}) { auto array = std::make_shared<ArrayType>(); for (const auto& item : values) { array->push_back(item); } return Value(array); }
O3
cpp
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %r13 movq %rdi, %rbx movl $0x28, %edi callq 0x18690 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x9eda1(%rip), %rax # 0xee4a8 movq %rax, (%r14) leaq 0x10(%r14), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r14) movq $0x0, 0x20(%r14) movq %r14, 0x8(%rsp) movq %r15, (%rsp) movq (%r13), %r12 movq 0x8(%r13), %r13 cmpq %r13, %r12 je 0x4f745 movq %r15, %rdi movq %r12, %rsi callq 0x4f876 addq $0x50, %r12 jmp 0x4f72f movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x4f8a2 movq 0x8(%r14), %rdi testq %rdi, %rdi je 0x4f761 callq 0x2f80e movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx movq %r14, %rdi callq 0x2f80e movq %rbx, %rdi callq 0x18b90 nop
_ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r13, rsi mov rbx, rdi mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_EE4A8 mov [r14], rax lea r15, [r14+10h] xorps xmm0, xmm0 movups xmmword ptr [r14+10h], xmm0 mov qword ptr [r14+20h], 0 mov [rsp+38h+var_30], r14 mov [rsp+38h+var_38], r15 mov r12, [r13+0] mov r13, [r13+8] loc_4F72F: cmp r12, r13 jz short loc_4F745 mov rdi, r15 mov rsi, r12 call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&) add r12, 50h ; 'P' jmp short loc_4F72F loc_4F745: mov r14, rsp mov rdi, rbx mov rsi, r14 call _ZN5minja5ValueC2ERKSt10shared_ptrISt6vectorIS0_SaIS0_EEE; minja::Value::Value(std::shared_ptr<std::vector<minja::Value>> const&) mov rdi, [r14+8] test rdi, rdi jz short loc_4F761 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F761: mov rax, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax mov rdi, r14 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) mov rdi, rbx call __Unwind_Resume
long long minja::Value::array(long long a1, long long *a2) { long long v2; // r14 long long v3; // r12 long long v4; // r13 long long v6; // [rsp+0h] [rbp-38h] BYREF volatile signed __int32 *v7; // [rsp+8h] [rbp-30h] v2 = operator new(0x28uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = off_EE4A8; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; v7 = (volatile signed __int32 *)v2; v6 = v2 + 16; v3 = *a2; v4 = a2[1]; while ( v3 != v4 ) { std::vector<minja::Value>::push_back(v2 + 16, v3); v3 += 80LL; } minja::Value::Value(a1, &v6); if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); return a1; }
array: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R13,RSI MOV RBX,RDI MOV EDI,0x28 CALL 0x00118690 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1ee4a8] MOV qword ptr [R14],RAX LEA R15,[R14 + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOV qword ptr [R14 + 0x20],0x0 MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP],R15 MOV R12,qword ptr [R13] MOV R13,qword ptr [R13 + 0x8] LAB_0014f72f: CMP R12,R13 JZ 0x0014f745 LAB_0014f734: MOV RDI,R15 MOV RSI,R12 CALL 0x0014f876 LAB_0014f73f: ADD R12,0x50 JMP 0x0014f72f LAB_0014f745: MOV R14,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x0014f8a2 MOV RDI,qword ptr [R14 + 0x8] TEST RDI,RDI JZ 0x0014f761 CALL 0x0012f80e LAB_0014f761: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value> >) */ Value * __thiscall minja::Value::array(Value *this,int8 *param_2) { vector<minja::Value,std::allocator<minja::Value>> *this_00; Value *pVVar1; Value *pVVar2; vector<minja::Value,std::allocator<minja::Value>> *local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x28); *(int8 *)(local_30 + 8) = 0x100000001; *(int ***)local_30 = &PTR___Sp_counted_ptr_inplace_001ee4a8; this_00 = (vector<minja::Value,std::allocator<minja::Value>> *)(local_30 + 0x10); *(int8 *)(local_30 + 0x10) = 0; *(int8 *)(local_30 + 0x18) = 0; *(int8 *)(local_30 + 0x20) = 0; pVVar1 = (Value *)param_2[1]; local_38 = this_00; for (pVVar2 = (Value *)*param_2; pVVar2 != pVVar1; pVVar2 = pVVar2 + 0x50) { /* try { // try from 0014f734 to 0014f73e has its CatchHandler @ 0014f772 */ std::vector<minja::Value,std::allocator<minja::Value>>::push_back(this_00,pVVar2); } Value(this,(shared_ptr *)&local_38); if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } return this; }
47,347
ma_tls_write_async
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write_async(MARIADB_PVIO *pvio, const unsigned char *buffer, size_t length) { int res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; MARIADB_TLS *ctls= pvio->ctls; for (;;) { res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length); if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl)) return res; } }
O0
c
ma_tls_write_async: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x10(%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rax movl %eax, %edx callq 0x37540 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %edi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rax movq 0x10(%rax), %rdx callq 0x5e1e0 cmpb $0x0, %al je 0x5e323 movslq -0x1c(%rbp), %rax addq $0x30, %rsp popq %rbp retq jmp 0x5e2e7 nopw %cs:(%rax,%rax)
ma_tls_write_async: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rax, [rax+38h] mov [rbp+var_30], rax loc_5E2E7: mov rax, [rbp+var_30] mov rdi, [rax+10h] mov rsi, [rbp+var_10] mov rax, [rbp+var_18] mov edx, eax call _SSL_write mov [rbp+var_1C], eax mov edi, [rbp+var_1C] mov rsi, [rbp+var_28] mov rax, [rbp+var_30] mov rdx, [rax+10h] call ma_tls_async_check_result cmp al, 0 jz short loc_5E323 movsxd rax, [rbp+var_1C] add rsp, 30h pop rbp retn loc_5E323: jmp short loc_5E2E7
long long ma_tls_write_async(long long a1, long long a2, unsigned int a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+14h] [rbp-1Ch] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); v4 = *(_QWORD *)(a1 + 56); do v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3); while ( !ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) ); return v6; }
ma_tls_write_async: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX LAB_0015e2e7: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,EAX CALL 0x00137540 MOV dword ptr [RBP + -0x1c],EAX MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0015e1e0 CMP AL,0x0 JZ 0x0015e323 MOVSXD RAX,dword ptr [RBP + -0x1c] ADD RSP,0x30 POP RBP RET LAB_0015e323: JMP 0x0015e2e7
long ma_tls_write_async(long param_1,void *param_2,int param_3) { int8 uVar1; long lVar2; char cVar3; int iVar4; uVar1 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); lVar2 = *(long *)(param_1 + 0x38); do { iVar4 = SSL_write(*(SSL **)(lVar2 + 0x10),param_2,param_3); cVar3 = ma_tls_async_check_result(iVar4,uVar1,*(int8 *)(lVar2 + 0x10)); } while (cVar3 == '\0'); return (long)iVar4; }
47,348
move_to_next_bitmap
eloqsql/storage/maria/ma_bitmap.c
static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap) { pgcache_page_no_t page= bitmap->page; MARIA_STATE_INFO *state= &info->s->state; DBUG_ENTER("move_to_next_bitmap"); if (state->first_bitmap_with_space != ~(pgcache_page_no_t) 0 && state->first_bitmap_with_space != page) { page= state->first_bitmap_with_space; state->first_bitmap_with_space= ~(pgcache_page_no_t) 0; DBUG_ASSERT(page % bitmap->pages_covered == 0); } else { page+= bitmap->pages_covered; DBUG_ASSERT(page % bitmap->pages_covered == 0); } DBUG_RETURN(_ma_change_bitmap_page(info, bitmap, page)); }
O3
c
move_to_next_bitmap: pushq %rbp movq %rsp, %rbp movq 0x10(%rsi), %rax movq (%rdi), %rcx movq 0xd0(%rcx), %rdx cmpq $-0x1, %rdx sete %r8b cmpq %rax, %rdx sete %r9b orb %r8b, %r9b je 0x420f6 addq 0x138(%rsi), %rax movq %rax, %rdx jmp 0x42101 movq $-0x1, 0xd0(%rcx) popq %rbp jmp 0x4103d
move_to_next_bitmap: push rbp mov rbp, rsp mov rax, [rsi+10h] mov rcx, [rdi] mov rdx, [rcx+0D0h] cmp rdx, 0FFFFFFFFFFFFFFFFh setz r8b cmp rdx, rax setz r9b or r9b, r8b jz short loc_420F6 add rax, [rsi+138h] mov rdx, rax jmp short loc_42101 loc_420F6: mov qword ptr [rcx+0D0h], 0FFFFFFFFFFFFFFFFh loc_42101: pop rbp jmp _ma_change_bitmap_page
long long move_to_next_bitmap(long long *a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // rax long long v6; // rcx unsigned long long v7; // rdx v5 = *(_QWORD *)(a2 + 16); v6 = *a1; v7 = *(_QWORD *)(*a1 + 208); LOBYTE(a5) = v7 == -1LL; if ( (unsigned __int8)a5 | (v7 == v5) ) v7 = *(_QWORD *)(a2 + 312) + v5; else *(_QWORD *)(v6 + 208) = -1LL; return ma_change_bitmap_page(a1, a2, v7, v6, a5); }
move_to_next_bitmap: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0x10] MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RCX + 0xd0] CMP RDX,-0x1 SETZ R8B CMP RDX,RAX SETZ R9B OR R9B,R8B JZ 0x001420f6 ADD RAX,qword ptr [RSI + 0x138] MOV RDX,RAX JMP 0x00142101 LAB_001420f6: MOV qword ptr [RCX + 0xd0],-0x1 LAB_00142101: POP RBP JMP 0x0014103d
void move_to_next_bitmap(long *param_1,long param_2) { long lVar1; lVar1 = *(long *)(*param_1 + 0xd0); if (lVar1 == *(long *)(param_2 + 0x10) || lVar1 == -1) { lVar1 = *(long *)(param_2 + 0x10) + *(long *)(param_2 + 0x138); } else { *(int8 *)(*param_1 + 0xd0) = 0xffffffffffffffff; } _ma_change_bitmap_page(param_1,param_2,lVar1); return; }
47,349
wt_thd_release
eloqsql/mysys/waiting_threads.c
void wt_thd_release(WT_THD *thd, const WT_RESOURCE_ID *resid) { uint i; DBUG_ENTER("wt_thd_release"); for (i= 0; i < thd->my_resources.elements; i++) { WT_RESOURCE *rc= *dynamic_element(&thd->my_resources, i, WT_RESOURCE**); if (!resid || (resid->type->compare(&rc->id, resid) == 0)) { uint j; rc_wrlock(rc); /* nobody's trying to free the resource now, as its owners[] array is not empty (at least thd must be there) */ DBUG_ASSERT(rc->state == ACTIVE); for (j= 0; j < rc->owners.elements; j++) if (*dynamic_element(&rc->owners, j, WT_THD**) == thd) break; DBUG_ASSERT(j < rc->owners.elements); delete_dynamic_element(&rc->owners, j); if (rc->owners.elements == 0) { mysql_cond_broadcast(&rc->cond); #ifndef DBUG_OFF if (rc->cond_mutex) mysql_mutex_assert_owner(rc->cond_mutex); #endif } unlock_lock_and_free_resource(thd, rc); if (resid) { delete_dynamic_element(&thd->my_resources, i); DBUG_VOID_RETURN; } } } if (!resid) reset_dynamic(&thd->my_resources); DBUG_VOID_RETURN; }
O0
c
wt_thd_release: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x8(%rcx), %eax jae 0x1007a1 movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x14(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1006f1 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rax movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi callq *%rax movsbl %al, %eax cmpl $0x0, %eax jne 0x100791 movq -0x20(%rbp), %rdi callq 0x1000f0 jmp 0x1006fc movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0xe8(%rcx), %eax jae 0x100739 movq -0x20(%rbp), %rax movq 0xe0(%rax), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax cmpq -0x8(%rbp), %rax jne 0x10072c jmp 0x100739 jmp 0x10072e movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x100703 jmp 0x10073b jmp 0x10073d movq -0x20(%rbp), %rdi addq $0xe0, %rdi movl -0x24(%rbp), %esi callq 0xdae60 movq -0x20(%rbp), %rax cmpl $0x0, 0xe8(%rax) jne 0x10076d movq -0x20(%rbp), %rdi addq $0xa8, %rdi callq 0x1007c0 movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x100820 cmpq $0x0, -0x10(%rbp) je 0x10078f movq -0x8(%rbp), %rdi movl -0x14(%rbp), %esi callq 0xdae60 jmp 0x1007b7 jmp 0x100791 jmp 0x100793 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x1006a7 cmpq $0x0, -0x10(%rbp) jne 0x1007b3 movq -0x8(%rbp), %rax movl $0x0, 0x8(%rax) jmp 0x1007b5 jmp 0x1007b7 addq $0x30, %rsp popq %rbp retq nopl (%rax)
wt_thd_release: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 0 loc_1006A7: mov eax, [rbp+var_14] mov rcx, [rbp+var_8] cmp eax, [rcx+8] jnb loc_1007A1 mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_14] mov rax, [rax+rcx*8] mov [rbp+var_20], rax cmp [rbp+var_10], 0 jz short loc_1006F1 mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax] mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] call rax movsx eax, al cmp eax, 0 jnz loc_100791 loc_1006F1: mov rdi, [rbp+var_20] call rc_wrlock jmp short $+2 loc_1006FC: mov [rbp+var_24], 0 loc_100703: mov eax, [rbp+var_24] mov rcx, [rbp+var_20] cmp eax, [rcx+0E8h] jnb short loc_100739 mov rax, [rbp+var_20] mov rax, [rax+0E0h] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] cmp rax, [rbp+var_8] jnz short loc_10072C jmp short loc_100739 loc_10072C: jmp short $+2 loc_10072E: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_100703 loc_100739: jmp short $+2 loc_10073B: jmp short $+2 loc_10073D: mov rdi, [rbp+var_20] add rdi, 0E0h mov esi, [rbp+var_24] call delete_dynamic_element mov rax, [rbp+var_20] cmp dword ptr [rax+0E8h], 0 jnz short loc_10076D mov rdi, [rbp+var_20] add rdi, 0A8h call inline_mysql_cond_broadcast_3 loc_10076D: mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] call unlock_lock_and_free_resource cmp [rbp+var_10], 0 jz short loc_10078F mov rdi, [rbp+var_8] mov esi, [rbp+var_14] call delete_dynamic_element jmp short loc_1007B7 loc_10078F: jmp short $+2 loc_100791: jmp short $+2 loc_100793: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_1006A7 loc_1007A1: cmp [rbp+var_10], 0 jnz short loc_1007B3 mov rax, [rbp+var_8] mov dword ptr [rax+8], 0 loc_1007B3: jmp short $+2 loc_1007B5: jmp short $+2 loc_1007B7: add rsp, 30h pop rbp retn
long long wt_thd_release(long long a1, long long a2) { long long result; // rax unsigned int j; // [rsp+Ch] [rbp-24h] long long v4; // [rsp+10h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-14h] for ( i = 0; ; ++i ) { result = i; if ( i >= *(_DWORD *)(a1 + 8) ) break; v4 = *(_QWORD *)(*(_QWORD *)a1 + 8LL * i); if ( !a2 || !(**(unsigned __int8 ( ***)(long long, long long))(a2 + 8))(v4, a2) ) { rc_wrlock(v4); for ( j = 0; j < *(_DWORD *)(v4 + 232) && *(_QWORD *)(*(_QWORD *)(v4 + 224) + 8LL * j) != a1; ++j ) ; delete_dynamic_element(v4 + 224, j); if ( !*(_DWORD *)(v4 + 232) ) inline_mysql_cond_broadcast_3(v4 + 168); unlock_lock_and_free_resource(a1, v4); if ( a2 ) return delete_dynamic_element(a1, i); } } if ( !a2 ) { result = a1; *(_DWORD *)(a1 + 8) = 0; } return result; }
47,350
wt_thd_release
eloqsql/mysys/waiting_threads.c
void wt_thd_release(WT_THD *thd, const WT_RESOURCE_ID *resid) { uint i; DBUG_ENTER("wt_thd_release"); for (i= 0; i < thd->my_resources.elements; i++) { WT_RESOURCE *rc= *dynamic_element(&thd->my_resources, i, WT_RESOURCE**); if (!resid || (resid->type->compare(&rc->id, resid) == 0)) { uint j; rc_wrlock(rc); /* nobody's trying to free the resource now, as its owners[] array is not empty (at least thd must be there) */ DBUG_ASSERT(rc->state == ACTIVE); for (j= 0; j < rc->owners.elements; j++) if (*dynamic_element(&rc->owners, j, WT_THD**) == thd) break; DBUG_ASSERT(j < rc->owners.elements); delete_dynamic_element(&rc->owners, j); if (rc->owners.elements == 0) { mysql_cond_broadcast(&rc->cond); #ifndef DBUG_OFF if (rc->cond_mutex) mysql_mutex_assert_owner(rc->cond_mutex); #endif } unlock_lock_and_free_resource(thd, rc); if (resid) { delete_dynamic_element(&thd->my_resources, i); DBUG_VOID_RETURN; } } } if (!resid) reset_dynamic(&thd->my_resources); DBUG_VOID_RETURN; }
O3
c
wt_thd_release: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0xa7291 xorl %r15d, %r15d leaq 0x2dee2a(%rip), %r13 # 0x386010 movq (%rbx), %rax movq (%rax,%r15,8), %r12 testq %r14, %r14 je 0xa7202 movq 0x8(%r14), %rax movq %r12, %rdi movq %r14, %rsi callq *(%rax) testb %al, %al jne 0xa7274 leaq 0x18(%r12), %rdi callq 0xa4445 leaq 0xe0(%r12), %rdi movl 0xe8(%r12), %eax testq %rax, %rax je 0xa7238 movq (%rdi), %rcx xorl %esi, %esi cmpq %rbx, (%rcx,%rsi,8) je 0xa723a incq %rsi cmpq %rsi, %rax jne 0xa7226 movl %eax, %esi jmp 0xa723a xorl %esi, %esi callq 0x91e49 cmpl $0x0, 0xe8(%r12) jne 0xa7264 movq 0xd8(%r12), %rdi testq %rdi, %rdi jne 0xa7285 leaq 0xa8(%r12), %rdi callq 0x296f0 movq %rbx, %rdi movq %r12, %rsi callq 0xa72c5 testq %r14, %r14 jne 0xa72ac incq %r15 movl 0x8(%rbx), %eax cmpq %rax, %r15 jb 0xa71e6 jmp 0xa7291 movq (%r13), %rax callq *0x178(%rax) jmp 0xa7257 testq %r14, %r14 jne 0xa729d movl $0x0, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movl %r15d, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x91e49
wt_thd_release: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi cmp dword ptr [rdi+8], 0 jz loc_A7291 xor r15d, r15d lea r13, PSI_server loc_A71E6: mov rax, [rbx] mov r12, [rax+r15*8] test r14, r14 jz short loc_A7202 mov rax, [r14+8] mov rdi, r12 mov rsi, r14 call qword ptr [rax] test al, al jnz short loc_A7274 loc_A7202: lea rdi, [r12+18h] call my_rw_wrlock lea rdi, [r12+0E0h] mov eax, [r12+0E8h] test rax, rax jz short loc_A7238 mov rcx, [rdi] xor esi, esi loc_A7226: cmp [rcx+rsi*8], rbx jz short loc_A723A inc rsi cmp rax, rsi jnz short loc_A7226 mov esi, eax jmp short loc_A723A loc_A7238: xor esi, esi loc_A723A: call delete_dynamic_element cmp dword ptr [r12+0E8h], 0 jnz short loc_A7264 mov rdi, [r12+0D8h] test rdi, rdi jnz short loc_A7285 loc_A7257: lea rdi, [r12+0A8h] call _pthread_cond_broadcast loc_A7264: mov rdi, rbx mov rsi, r12 call unlock_lock_and_free_resource test r14, r14 jnz short loc_A72AC loc_A7274: inc r15 mov eax, [rbx+8] cmp r15, rax jb loc_A71E6 jmp short loc_A7291 loc_A7285: mov rax, [r13+0] call qword ptr [rax+178h] jmp short loc_A7257 loc_A7291: test r14, r14 jnz short loc_A729D mov dword ptr [rbx+8], 0 loc_A729D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A72AC: mov rdi, rbx mov esi, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp delete_dynamic_element
unsigned long long wt_thd_release(long long a1, long long a2) { unsigned long long v4; // r15 long long v5; // r12 _QWORD *v6; // rdi long long v7; // rsi long long v8; // rdi unsigned long long result; // rax if ( *(_DWORD *)(a1 + 8) ) { v4 = 0LL; while ( 1 ) { v5 = *(_QWORD *)(*(_QWORD *)a1 + 8 * v4); if ( !a2 || !(**(unsigned __int8 ( ***)(_QWORD, long long))(a2 + 8))(*(_QWORD *)(*(_QWORD *)a1 + 8 * v4), a2) ) { my_rw_wrlock(v5 + 24); v6 = (_QWORD *)(v5 + 224); if ( *(_DWORD *)(v5 + 232) ) { v7 = 0LL; while ( *(_QWORD *)(*v6 + 8 * v7) != a1 ) { if ( *(_DWORD *)(v5 + 232) == ++v7 ) { LODWORD(v7) = *(_DWORD *)(v5 + 232); break; } } } else { LODWORD(v7) = 0; } delete_dynamic_element((long long)v6, v7); if ( !*(_DWORD *)(v5 + 232) ) { v8 = *(_QWORD *)(v5 + 216); if ( v8 ) ((void ( *)(long long))PSI_server[47])(v8); pthread_cond_broadcast(v5 + 168); } unlock_lock_and_free_resource(a1); if ( a2 ) return delete_dynamic_element(a1, v4); } ++v4; result = *(unsigned int *)(a1 + 8); if ( v4 >= result ) goto LABEL_17; } } else { LABEL_17: if ( !a2 ) *(_DWORD *)(a1 + 8) = 0; } return result; }
wt_thd_release: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001a7291 XOR R15D,R15D LEA R13,[0x486010] LAB_001a71e6: MOV RAX,qword ptr [RBX] MOV R12,qword ptr [RAX + R15*0x8] TEST R14,R14 JZ 0x001a7202 MOV RAX,qword ptr [R14 + 0x8] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX] TEST AL,AL JNZ 0x001a7274 LAB_001a7202: LEA RDI,[R12 + 0x18] CALL 0x001a4445 LEA RDI,[R12 + 0xe0] MOV EAX,dword ptr [R12 + 0xe8] TEST RAX,RAX JZ 0x001a7238 MOV RCX,qword ptr [RDI] XOR ESI,ESI LAB_001a7226: CMP qword ptr [RCX + RSI*0x8],RBX JZ 0x001a723a INC RSI CMP RAX,RSI JNZ 0x001a7226 MOV ESI,EAX JMP 0x001a723a LAB_001a7238: XOR ESI,ESI LAB_001a723a: CALL 0x00191e49 CMP dword ptr [R12 + 0xe8],0x0 JNZ 0x001a7264 MOV RDI,qword ptr [R12 + 0xd8] TEST RDI,RDI JNZ 0x001a7285 LAB_001a7257: LEA RDI,[R12 + 0xa8] CALL 0x001296f0 LAB_001a7264: MOV RDI,RBX MOV RSI,R12 CALL 0x001a72c5 TEST R14,R14 JNZ 0x001a72ac LAB_001a7274: INC R15 MOV EAX,dword ptr [RBX + 0x8] CMP R15,RAX JC 0x001a71e6 JMP 0x001a7291 LAB_001a7285: MOV RAX,qword ptr [R13] CALL qword ptr [RAX + 0x178] JMP 0x001a7257 LAB_001a7291: TEST R14,R14 JNZ 0x001a729d MOV dword ptr [RBX + 0x8],0x0 LAB_001a729d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a72ac: MOV RDI,RBX MOV ESI,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00191e49
void wt_thd_release(long *param_1,long param_2) { uint uVar1; long lVar2; char cVar3; ulong uVar4; ulong uVar5; if ((int)param_1[1] != 0) { uVar5 = 0; do { lVar2 = *(long *)(*param_1 + uVar5 * 8); if ((param_2 == 0) || (cVar3 = (*(code *)**(int8 **)(param_2 + 8))(lVar2), cVar3 == '\0')) { my_rw_wrlock(lVar2 + 0x18); uVar1 = *(uint *)(lVar2 + 0xe8); if ((ulong)uVar1 == 0) { uVar4 = 0; } else { uVar4 = 0; do { if (*(long **)(*(long *)(lVar2 + 0xe0) + uVar4 * 8) == param_1) goto LAB_001a723a; uVar4 = uVar4 + 1; } while (uVar1 != uVar4); uVar4 = (ulong)uVar1; } LAB_001a723a: delete_dynamic_element((long *)(lVar2 + 0xe0),uVar4); if (*(int *)(lVar2 + 0xe8) == 0) { if (*(long *)(lVar2 + 0xd8) != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)(lVar2 + 0xa8)); } unlock_lock_and_free_resource(param_1); if (param_2 != 0) { delete_dynamic_element(param_1,uVar5 & 0xffffffff); return; } } uVar5 = uVar5 + 1; } while (uVar5 < *(uint *)(param_1 + 1)); } if (param_2 == 0) { *(int4 *)(param_1 + 1) = 0; } return; }
47,351
AttnBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/vae.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, in_channels, h, w] auto h_ = ggml_nn_group_norm(ctx, x, norm_w, norm_b); const int64_t n = h_->ne[3]; const int64_t c = h_->ne[2]; const int64_t h = h_->ne[1]; const int64_t w = h_->ne[0]; auto q = ggml_nn_conv_2d(ctx, h_, q_w, q_b); // [N, in_channels, h, w] auto k = ggml_nn_conv_2d(ctx, h_, k_w, k_b); // [N, in_channels, h, w] auto v = ggml_nn_conv_2d(ctx, h_, v_w, v_b); // [N, in_channels, h, w] q = ggml_cont(ctx, ggml_permute(ctx, q, 1, 2, 0, 3)); // [N, h, w, in_channels] q = ggml_reshape_3d(ctx, q, c, h * w, n); // [N, h * w, in_channels] k = ggml_cont(ctx, ggml_permute(ctx, k, 1, 2, 0, 3)); // [N, h, w, in_channels] k = ggml_reshape_3d(ctx, k, c, h * w, n); // [N, h * w, in_channels] auto w_ = ggml_mul_mat(ctx, k, q); // [N, h * w, h * w] w_ = ggml_scale_inplace(ctx, w_, 1.0f / sqrt((float)in_channels)); w_ = ggml_soft_max_inplace(ctx, w_); v = ggml_reshape_3d(ctx, v, h * w, c, n); // [N, in_channels, h * w] h_ = ggml_mul_mat(ctx, v, w_); // [N, h * w, in_channels] h_ = ggml_cont(ctx, ggml_permute(ctx, h_, 1, 0, 2, 3)); // [N, in_channels, h * w] h_ = ggml_reshape_4d(ctx, h_, w, h, c, n); // [N, in_channels, h, w] // proj_out h_ = ggml_nn_conv_2d(ctx, h_, proj_out_w, proj_out_b); // [N, in_channels, h, w] h_ = ggml_add(ctx, h_, x); return h_; }
O1
cpp
AttnBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %r12 movq 0x10(%rdi), %rbx movq %rdx, %rdi callq 0x8e2c1 cmpl $0x3, %eax jl 0x54abb movq 0x10(%r12), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %r12, %rsi callq 0x93083 movq %rax, %r12 movq 0x10(%rbx), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %rbx, %rsi callq 0x93083 movq %rax, %rbx movq %r14, %rdi movq %r13, %rsi movl $0x20, %edx callq 0x92281 movq %r14, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x912d2 movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x90c8a movq %rax, %rbp movq 0x28(%rax), %rax movq %rax, 0x30(%rsp) movq 0x20(%rbp), %rax movq %rax, 0x28(%rsp) movq 0x10(%rbp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rbp), %rax movq %rax, 0x20(%rsp) movq 0x18(%r15), %rsi movq 0x20(%r15), %r12 subq $0x8, %rsp movl $0x1, %eax movq %r14, %rdi movq %rbp, %rdx movl $0x1, %ecx movl $0x1, %r8d xorl %r9d, %r9d pushq %rax pushq %rax pushq $0x0 callq 0x9447a addq $0x20, %rsp movq %rax, %rbx testq %r12, %r12 movq %r13, 0x10(%rsp) je 0x54b80 movq 0x10(%r12), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %r12, %rsi callq 0x93083 movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x90c8a movq %rax, %r12 jmp 0x54b83 movq %rbx, %r12 movq 0x28(%r15), %rsi movq 0x30(%r15), %r13 subq $0x8, %rsp movq %r14, %rdi movq %rbp, %rdx movl $0x1, %ecx movl $0x1, %r8d xorl %r9d, %r9d movl $0x1, %eax pushq %rax pushq %rax pushq $0x0 callq 0x9447a addq $0x20, %rsp movq %rax, %rbx testq %r13, %r13 je 0x54bf0 movq 0x10(%r13), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %r13, %rsi callq 0x93083 movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x90c8a movq %rax, (%rsp) jmp 0x54bf4 movq %rbx, (%rsp) movq 0x38(%r15), %rsi movq 0x40(%r15), %r13 subq $0x8, %rsp movl $0x1, %eax movq %r14, %rdi movq %rbp, %rdx movl $0x1, %ecx movl $0x1, %r8d xorl %r9d, %r9d pushq %rax pushq %rax pushq $0x0 callq 0x9447a addq $0x20, %rsp movq %rax, %rbx testq %r13, %r13 je 0x54c62 movq 0x10(%r13), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %r13, %rsi callq 0x93083 movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x90c8a movq %rax, 0x8(%rsp) jmp 0x54c67 movq %rbx, 0x8(%rsp) movq %r14, %rdi movq %r12, %rsi movl $0x1, %edx movl $0x2, %ecx xorl %r8d, %r8d movl $0x3, %r9d callq 0x9331a movq %r14, %rdi movq %rax, %rsi callq 0x92b1c movq 0x18(%rsp), %rbx imulq 0x20(%rsp), %rbx movq %r14, %rdi movq %rax, %rsi movq 0x28(%rsp), %r12 movq %r12, %rdx movq %rbx, %rcx movq 0x30(%rsp), %rbp movq %rbp, %r8 callq 0x92f90 movq %rax, %r13 movq %r14, %rdi movq (%rsp), %rsi movl $0x1, %edx movl $0x2, %ecx xorl %r8d, %r8d movl $0x3, %r9d callq 0x9331a movq %r14, %rdi movq %rax, %rsi callq 0x92b1c movq %r14, %rdi movq %rax, %rsi movq %r12, %rdx movq %rbx, %rcx movq %rbp, %r8 callq 0x92f90 movq %r14, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x92319 movq %rax, %r12 cvtsi2ssl (%r15), %xmm0 cvtss2sd %xmm0, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x54d24 sqrtsd %xmm0, %xmm0 jmp 0x54d29 callq 0xa490 movq 0x10(%rsp), %r13 movsd 0x68d92(%rip), %xmm1 # 0xbdac8 divsd %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movq %r14, %rdi movq %r12, %rsi callq 0x9283a movq %r14, %rdi movq %rax, %rsi callq 0x93af3 movq %rax, %r12 movq %r14, %rdi movq 0x8(%rsp), %rsi movq %rbx, %rdx movq 0x28(%rsp), %rbp movq %rbp, %rcx movq 0x30(%rsp), %rbx movq %rbx, %r8 callq 0x92f90 movq %r14, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x92319 movq %r14, %rdi movq %rax, %rsi movl $0x1, %edx xorl %ecx, %ecx movl $0x2, %r8d movl $0x3, %r9d callq 0x9331a movq %r14, %rdi movq %rax, %rsi callq 0x92b1c movq %r14, %rdi movq %rax, %rsi movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rcx movq %rbp, %r8 movq %rbx, %r9 callq 0x93083 movq 0x48(%r15), %rsi movq 0x50(%r15), %rbx subq $0x8, %rsp movq %r14, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d xorl %r9d, %r9d movl $0x1, %eax pushq %rax pushq %rax pushq $0x0 callq 0x9447a addq $0x20, %rsp movq %rax, %r15 testq %rbx, %rbx je 0x54e36 movq 0x10(%rbx), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %r14, %rdi movq %rbx, %rsi callq 0x93083 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x90c8a movq %rax, %r15 movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x90c8a
_ZN9AttnBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r13, rdx mov r14, rsi mov r15, rdi mov r12, [rdi+8] mov rbx, [rdi+10h] mov rdi, rdx call ggml_n_dims cmp eax, 3 jl short loc_54ABB mov r8, [r12+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, r12 call ggml_reshape_4d mov r12, rax mov r8, [rbx+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, rbx call ggml_reshape_4d mov rbx, rax loc_54ABB: mov rdi, r14 mov rsi, r13 mov edx, 20h ; ' ' call ggml_group_norm mov rdi, r14 mov rsi, rax mov rdx, r12 call ggml_mul mov rdi, r14 mov rsi, rax mov rdx, rbx call ggml_add mov rbp, rax mov rax, [rax+28h] mov [rsp+68h+var_38], rax mov rax, [rbp+20h] mov [rsp+68h+var_40], rax mov rax, [rbp+10h] mov [rsp+68h+var_50], rax mov rax, [rbp+18h] mov [rsp+68h+var_48], rax mov rsi, [r15+18h] mov r12, [r15+20h] sub rsp, 8 mov eax, 1 mov rdi, r14 mov rdx, rbp mov ecx, 1 mov r8d, 1 xor r9d, r9d push rax push rax push 0 call ggml_conv_2d add rsp, 20h mov rbx, rax test r12, r12 mov [rsp+68h+var_58], r13 jz short loc_54B80 mov r8, [r12+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, r12 call ggml_reshape_4d mov rdi, r14 mov rsi, rbx mov rdx, rax call ggml_add mov r12, rax jmp short loc_54B83 loc_54B80: mov r12, rbx loc_54B83: mov rsi, [r15+28h] mov r13, [r15+30h] sub rsp, 8 mov rdi, r14 mov rdx, rbp mov ecx, 1 mov r8d, 1 xor r9d, r9d mov eax, 1 push rax push rax push 0 call ggml_conv_2d add rsp, 20h mov rbx, rax test r13, r13 jz short loc_54BF0 mov r8, [r13+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, r13 call ggml_reshape_4d mov rdi, r14 mov rsi, rbx mov rdx, rax call ggml_add mov [rsp+68h+var_68], rax jmp short loc_54BF4 loc_54BF0: mov [rsp+68h+var_68], rbx loc_54BF4: mov rsi, [r15+38h] mov r13, [r15+40h] sub rsp, 8 mov eax, 1 mov rdi, r14 mov rdx, rbp mov ecx, 1 mov r8d, 1 xor r9d, r9d push rax push rax push 0 call ggml_conv_2d add rsp, 20h mov rbx, rax test r13, r13 jz short loc_54C62 mov r8, [r13+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, r13 call ggml_reshape_4d mov rdi, r14 mov rsi, rbx mov rdx, rax call ggml_add mov [rsp+68h+var_60], rax jmp short loc_54C67 loc_54C62: mov [rsp+68h+var_60], rbx loc_54C67: mov rdi, r14 mov rsi, r12 mov edx, 1 mov ecx, 2 xor r8d, r8d mov r9d, 3 call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rbx, [rsp+68h+var_50] imul rbx, [rsp+68h+var_48] mov rdi, r14 mov rsi, rax mov r12, [rsp+68h+var_40] mov rdx, r12 mov rcx, rbx mov rbp, [rsp+68h+var_38] mov r8, rbp call ggml_reshape_3d mov r13, rax mov rdi, r14 mov rsi, [rsp+68h+var_68] mov edx, 1 mov ecx, 2 xor r8d, r8d mov r9d, 3 call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rdi, r14 mov rsi, rax mov rdx, r12 mov rcx, rbx mov r8, rbp call ggml_reshape_3d mov rdi, r14 mov rsi, rax mov rdx, r13 call ggml_mul_mat mov r12, rax cvtsi2ss xmm0, dword ptr [r15] cvtss2sd xmm0, xmm0 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_54D24 sqrtsd xmm0, xmm0 jmp short loc_54D29 loc_54D24: call _sqrt loc_54D29: mov r13, [rsp+68h+var_58] movsd xmm1, cs:qword_BDAC8 divsd xmm1, xmm0 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 mov rdi, r14 mov rsi, r12 call ggml_scale_inplace mov rdi, r14 mov rsi, rax call ggml_soft_max_inplace mov r12, rax mov rdi, r14 mov rsi, [rsp+68h+var_60] mov rdx, rbx mov rbp, [rsp+68h+var_40] mov rcx, rbp mov rbx, [rsp+68h+var_38] mov r8, rbx call ggml_reshape_3d mov rdi, r14 mov rsi, rax mov rdx, r12 call ggml_mul_mat mov rdi, r14 mov rsi, rax mov edx, 1 xor ecx, ecx mov r8d, 2 mov r9d, 3 call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rdi, r14 mov rsi, rax mov rdx, [rsp+68h+var_50] mov rcx, [rsp+68h+var_48] mov r8, rbp mov r9, rbx call ggml_reshape_4d mov rsi, [r15+48h] mov rbx, [r15+50h] sub rsp, 8 mov rdi, r14 mov rdx, rax mov ecx, 1 mov r8d, 1 xor r9d, r9d mov eax, 1 push rax push rax push 0 call ggml_conv_2d add rsp, 20h mov r15, rax test rbx, rbx jz short loc_54E36 mov r8, [rbx+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, r14 mov rsi, rbx call ggml_reshape_4d mov rdi, r14 mov rsi, r15 mov rdx, rax call ggml_add mov r15, rax loc_54E36: mov rdi, r14 mov rsi, r15 mov rdx, r13 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_add
long long AttnBlock::forward(long long a1, long long a2, long long a3) { long long v4; // r12 long long v5; // rbx long long v6; // rax long long v7; // rax _QWORD *v8; // rax int v9; // ebp long long v10; // r12 long long v11; // rax long long v12; // rbx long long v13; // rax long long v14; // r12 long long v15; // r13 long long v16; // rax long long v17; // rbx long long v18; // rax long long v19; // r13 long long v20; // rax long long v21; // rbx long long v22; // rax long long v23; // rax long long v24; // rax long long v25; // r13 long long v26; // rax long long v27; // rax long long v28; // rax long long v29; // r12 double v30; // xmm0_8 double v31; // xmm0_8 float v32; // xmm0_4 long long v33; // rax long long v34; // r12 long long v35; // rax long long v36; // rax long long v37; // rax long long v38; // rax int v39; // eax long long v40; // rbx long long v41; // r15 long long v42; // rax long long v44; // [rsp+0h] [rbp-68h] long long v45; // [rsp+8h] [rbp-60h] long long v46; // [rsp+10h] [rbp-58h] long long v47; // [rsp+18h] [rbp-50h] long long v48; // [rsp+20h] [rbp-48h] long long v49; // [rsp+28h] [rbp-40h] long long v50; // [rsp+30h] [rbp-38h] v4 = *(_QWORD *)(a1 + 8); v5 = *(_QWORD *)(a1 + 16); if ( (int)ggml_n_dims(a3) >= 3 ) { v4 = ggml_reshape_4d(a2, v4, 1LL, 1LL, *(_QWORD *)(v4 + 16), 1LL); v5 = ggml_reshape_4d(a2, v5, 1LL, 1LL, *(_QWORD *)(v5 + 16), 1LL); } v6 = ggml_group_norm(a2, a3, 32LL); v7 = ggml_mul(a2, v6, v4); v8 = (_QWORD *)ggml_add(a2, v7, v5); v9 = (int)v8; v50 = v8[5]; v49 = v8[4]; v47 = v8[2]; v48 = v8[3]; v10 = *(_QWORD *)(a1 + 32); v11 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 24), (_DWORD)v8, 1, 1, 0, 0, 1, 1); v12 = v11; v46 = a3; if ( v10 ) { v13 = ggml_reshape_4d(a2, v10, 1LL, 1LL, *(_QWORD *)(v10 + 16), 1LL); v14 = ggml_add(a2, v12, v13); } else { v14 = v11; } v15 = *(_QWORD *)(a1 + 48); v16 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 40), v9, 1, 1, 0, 0, 1, 1); v17 = v16; if ( v15 ) { v18 = ggml_reshape_4d(a2, v15, 1LL, 1LL, *(_QWORD *)(v15 + 16), 1LL); v44 = ggml_add(a2, v17, v18); } else { v44 = v16; } v19 = *(_QWORD *)(a1 + 64); v20 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 56), v9, 1, 1, 0, 0, 1, 1); v21 = v20; if ( v19 ) { v22 = ggml_reshape_4d(a2, v19, 1LL, 1LL, *(_QWORD *)(v19 + 16), 1LL); v45 = ggml_add(a2, v21, v22); } else { v45 = v20; } v23 = ggml_permute(a2, v14, 1LL, 2LL, 0LL, 3LL); v24 = ggml_cont(a2, v23); v25 = ggml_reshape_3d(a2, v24, v49, v48 * v47, v50); v26 = ggml_permute(a2, v44, 1LL, 2LL, 0LL, 3LL); v27 = ggml_cont(a2, v26); v28 = ggml_reshape_3d(a2, v27, v49, v48 * v47, v50); v29 = ggml_mul_mat(a2, v28, v25); v30 = (float)*(int *)a1; if ( v30 < 0.0 ) v31 = sqrt(v30); else v31 = sqrt(v30); v32 = 1.0 / v31; v33 = ggml_scale_inplace(a2, v29, v32); v34 = ggml_soft_max_inplace(a2, v33); v35 = ggml_reshape_3d(a2, v45, v48 * v47, v49, v50); v36 = ggml_mul_mat(a2, v35, v34); v37 = ggml_permute(a2, v36, 1LL, 0LL, 2LL, 3LL); v38 = ggml_cont(a2, v37); v39 = ggml_reshape_4d(a2, v38, v47, v48, v49, v50); v40 = *(_QWORD *)(a1 + 80); v41 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 72), v39, 1, 1, 0, 0, 1, 1); if ( v40 ) { v42 = ggml_reshape_4d(a2, v40, 1LL, 1LL, *(_QWORD *)(v40 + 16), 1LL); v41 = ggml_add(a2, v41, v42); } return ggml_add(a2, v41, v46); }
47,352
AttnBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/vae.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, in_channels, h, w] auto h_ = ggml_nn_group_norm(ctx, x, norm_w, norm_b); const int64_t n = h_->ne[3]; const int64_t c = h_->ne[2]; const int64_t h = h_->ne[1]; const int64_t w = h_->ne[0]; auto q = ggml_nn_conv_2d(ctx, h_, q_w, q_b); // [N, in_channels, h, w] auto k = ggml_nn_conv_2d(ctx, h_, k_w, k_b); // [N, in_channels, h, w] auto v = ggml_nn_conv_2d(ctx, h_, v_w, v_b); // [N, in_channels, h, w] q = ggml_cont(ctx, ggml_permute(ctx, q, 1, 2, 0, 3)); // [N, h, w, in_channels] q = ggml_reshape_3d(ctx, q, c, h * w, n); // [N, h * w, in_channels] k = ggml_cont(ctx, ggml_permute(ctx, k, 1, 2, 0, 3)); // [N, h, w, in_channels] k = ggml_reshape_3d(ctx, k, c, h * w, n); // [N, h * w, in_channels] auto w_ = ggml_mul_mat(ctx, k, q); // [N, h * w, h * w] w_ = ggml_scale_inplace(ctx, w_, 1.0f / sqrt((float)in_channels)); w_ = ggml_soft_max_inplace(ctx, w_); v = ggml_reshape_3d(ctx, v, h * w, c, n); // [N, in_channels, h * w] h_ = ggml_mul_mat(ctx, v, w_); // [N, h * w, in_channels] h_ = ggml_cont(ctx, ggml_permute(ctx, h_, 1, 0, 2, 3)); // [N, in_channels, h * w] h_ = ggml_reshape_4d(ctx, h_, w, h, c, n); // [N, in_channels, h, w] // proj_out h_ = ggml_nn_conv_2d(ctx, h_, proj_out_w, proj_out_b); // [N, in_channels, h, w] h_ = ggml_add(ctx, h_, x); return h_; }
O2
cpp
AttnBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rax movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rcx movq %rsi, %rdi movq %rax, 0x40(%rsp) movq %rax, %rsi callq 0x1cf13 movq %rax, %rbp movq 0x28(%rax), %rax movq %rax, 0x10(%rsp) movq 0x20(%rbp), %rax movq %rax, 0x18(%rsp) movq 0x10(%rbp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rbp), %r12 movq 0x18(%r15), %rdx movq 0x20(%r15), %rcx pushq $0x1 popq %rbx movq %r14, %rdi movq %rbp, %rsi movl %ebx, %r8d movl %ebx, %r9d pushq $0x0 pushq $0x0 callq 0x1ce99 popq %rcx popq %rdx movq %rax, %r13 movq 0x28(%r15), %rdx movq 0x30(%r15), %rcx movq %r14, %rdi movq %rbp, %rsi movl %ebx, %r8d movl %ebx, %r9d pushq $0x0 pushq $0x0 callq 0x1ce99 popq %rcx popq %rdx movq %rax, 0x28(%rsp) movq 0x38(%r15), %rdx movq 0x40(%r15), %rcx movq %r14, %rdi movq %rbp, %rsi movl %ebx, %r8d movl %ebx, %r9d pushq $0x0 pushq $0x0 callq 0x1ce99 popq %rcx popq %rdx movq %rax, 0x30(%rsp) pushq $0x2 popq %rcx pushq $0x3 popq %r9 movq %r14, %rdi movq %r13, %rsi movl %ebx, %edx xorl %r8d, %r8d callq 0x6c249 movq %r14, %rdi movq %rax, %rsi callq 0x6b8ee movq 0x8(%rsp), %rbp movq %r12, 0x38(%rsp) imulq %r12, %rbp movq %r14, %rdi movq %rax, %rsi movq 0x18(%rsp), %r13 movq %r13, %rdx movq %rbp, %rcx movq 0x10(%rsp), %r12 movq %r12, %r8 callq 0x6be1f movq %rax, 0x20(%rsp) movq %r14, %rdi movq 0x28(%rsp), %rsi movl %ebx, %edx pushq $0x2 popq %rcx xorl %r8d, %r8d pushq $0x3 popq %r9 callq 0x6c249 movq %r14, %rdi movq %rax, %rsi callq 0x6b8ee movq %r14, %rdi movq %rax, %rsi movq %r13, %rdx movq %rbp, %rcx movq %r12, %r8 callq 0x6be1f movq %r14, %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x6ae99 movq %rax, %rbx cvtsi2ssl (%r15), %xmm0 cvtss2sd %xmm0, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x36f99 sqrtsd %xmm0, %xmm0 jmp 0x36f9e callq 0xa490 movsd 0x62a4a(%rip), %xmm1 # 0x999f0 divsd %xmm0, %xmm1 cvtsd2ss %xmm1, %xmm0 movq %r14, %rdi movq %rbx, %rsi callq 0x6b5d9 movq %r14, %rdi movq %rax, %rsi callq 0x6cd21 movq %rax, %rbx movq %r14, %rdi movq 0x30(%rsp), %rsi movq %rbp, %rdx movq 0x18(%rsp), %r12 movq %r12, %rcx movq 0x10(%rsp), %r13 movq %r13, %r8 callq 0x6be1f movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x6ae99 pushq $0x1 popq %rbx pushq $0x2 popq %r8 pushq $0x3 popq %r9 movq %r14, %rdi movq %rax, %rsi movl %ebx, %edx xorl %ecx, %ecx callq 0x6c249 movq %r14, %rdi movq %rax, %rsi callq 0x6b8ee movq %r14, %rdi movq %rax, %rsi movq 0x8(%rsp), %rdx movq 0x38(%rsp), %rcx movq %r12, %r8 movq %r13, %r9 callq 0x6bf70 movq 0x48(%r15), %rdx movq 0x50(%r15), %rcx movq %r14, %rdi movq %rax, %rsi movl %ebx, %r8d movl %ebx, %r9d pushq $0x0 pushq $0x0 callq 0x1ce99 addq $0x10, %rsp movq %r14, %rdi movq %rax, %rsi movq 0x40(%rsp), %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x69a53
_ZN9AttnBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rax, rdx mov r14, rsi mov r15, rdi mov rdx, [rdi+8] mov rcx, [rdi+10h] mov rdi, rsi mov [rsp+78h+var_38], rax mov rsi, rax call _ZL18ggml_nn_group_normP12ggml_contextP11ggml_tensorS2_S2_i; ggml_nn_group_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int) mov rbp, rax mov rax, [rax+28h] mov [rsp+78h+var_68], rax mov rax, [rbp+20h] mov [rsp+78h+var_60], rax mov rax, [rbp+10h] mov [rsp+78h+var_70], rax mov r12, [rbp+18h] mov rdx, [r15+18h] mov rcx, [r15+20h] push 1 pop rbx mov rdi, r14 mov rsi, rbp mov r8d, ebx mov r9d, ebx push 0 push 0 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) pop rcx pop rdx mov r13, rax mov rdx, [r15+28h] mov rcx, [r15+30h] mov rdi, r14 mov rsi, rbp mov r8d, ebx mov r9d, ebx push 0 push 0 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) pop rcx pop rdx mov [rsp+78h+var_50], rax mov rdx, [r15+38h] mov rcx, [r15+40h] mov rdi, r14 mov rsi, rbp mov r8d, ebx mov r9d, ebx push 0 push 0 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) pop rcx pop rdx mov [rsp+78h+var_48], rax push 2 pop rcx push 3 pop r9 mov rdi, r14 mov rsi, r13 mov edx, ebx xor r8d, r8d call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rbp, [rsp+78h+var_70] mov [rsp+78h+var_40], r12 imul rbp, r12 mov rdi, r14 mov rsi, rax mov r13, [rsp+78h+var_60] mov rdx, r13 mov rcx, rbp mov r12, [rsp+78h+var_68] mov r8, r12 call ggml_reshape_3d mov [rsp+78h+var_58], rax mov rdi, r14 mov rsi, [rsp+78h+var_50] mov edx, ebx push 2 pop rcx xor r8d, r8d push 3 pop r9 call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rdi, r14 mov rsi, rax mov rdx, r13 mov rcx, rbp mov r8, r12 call ggml_reshape_3d mov rdi, r14 mov rsi, rax mov rdx, [rsp+78h+var_58] call ggml_mul_mat mov rbx, rax cvtsi2ss xmm0, dword ptr [r15] cvtss2sd xmm0, xmm0 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_36F99 sqrtsd xmm0, xmm0 jmp short loc_36F9E loc_36F99: call _sqrt loc_36F9E: movsd xmm1, cs:qword_999F0 divsd xmm1, xmm0 cvtsd2ss xmm0, xmm1 mov rdi, r14 mov rsi, rbx call ggml_scale_inplace mov rdi, r14 mov rsi, rax call ggml_soft_max_inplace mov rbx, rax mov rdi, r14 mov rsi, [rsp+78h+var_48] mov rdx, rbp mov r12, [rsp+78h+var_60] mov rcx, r12 mov r13, [rsp+78h+var_68] mov r8, r13 call ggml_reshape_3d mov rdi, r14 mov rsi, rax mov rdx, rbx call ggml_mul_mat push 1 pop rbx push 2 pop r8 push 3 pop r9 mov rdi, r14 mov rsi, rax mov edx, ebx xor ecx, ecx call ggml_permute mov rdi, r14 mov rsi, rax call ggml_cont mov rdi, r14 mov rsi, rax mov rdx, [rsp+78h+var_70] mov rcx, [rsp+78h+var_40] mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdx, [r15+48h] mov rcx, [r15+50h] mov rdi, r14 mov rsi, rax mov r8d, ebx mov r9d, ebx push 0 push 0 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) add rsp, 10h mov rdi, r14 mov rsi, rax mov rdx, [rsp+78h+var_38] add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_add
long long AttnBlock::forward(long long a1, long long a2, long long a3) { _QWORD *v4; // rax int v5; // ebp long long v6; // r12 long long v7; // r13 long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rbx double v14; // xmm0_8 double v15; // xmm0_8 float v16; // xmm0_4 long long v17; // rax long long v18; // rbx long long v19; // rax long long v20; // rax long long v21; // rax long long v22; // rax int v23; // eax long long v24; // rax long long v26; // [rsp+8h] [rbp-70h] long long v27; // [rsp+10h] [rbp-68h] long long v28; // [rsp+18h] [rbp-60h] long long v29; // [rsp+20h] [rbp-58h] long long v30; // [rsp+28h] [rbp-50h] long long v31; // [rsp+30h] [rbp-48h] v4 = (_QWORD *)ggml_nn_group_norm(a2, a3, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16)); v5 = (int)v4; v27 = v4[5]; v28 = v4[4]; v26 = v4[2]; v6 = v4[3]; v7 = ggml_nn_conv_2d(a2, (int)v4, *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 32), 1, 1, 0, 0); v30 = ggml_nn_conv_2d(a2, v5, *(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), 1, 1, 0, 0); v31 = ggml_nn_conv_2d(a2, v5, *(_QWORD *)(a1 + 56), *(_QWORD *)(a1 + 64), 1, 1, 0, 0); v8 = ggml_permute(a2, v7, 1LL, 2LL, 0LL, 3LL); v9 = ggml_cont(a2, v8); v29 = ggml_reshape_3d(a2, v9, v28, v6 * v26, v27); v10 = ggml_permute(a2, v30, 1LL, 2LL, 0LL, 3LL); v11 = ggml_cont(a2, v10); v12 = ggml_reshape_3d(a2, v11, v28, v6 * v26, v27); v13 = ggml_mul_mat(a2, v12, v29); v14 = (float)*(int *)a1; if ( v14 < 0.0 ) v15 = sqrt(v14); else v15 = sqrt(v14); v16 = 1.0 / v15; v17 = ggml_scale_inplace(a2, v13, v16); v18 = ggml_soft_max_inplace(a2, v17); v19 = ggml_reshape_3d(a2, v31, v6 * v26, v28, v27); v20 = ggml_mul_mat(a2, v19, v18); v21 = ggml_permute(a2, v20, 1LL, 0LL, 2LL, 3LL); v22 = ggml_cont(a2, v21); v23 = ggml_reshape_4d(a2, v22, v26, v6, v28, v27); v24 = ggml_nn_conv_2d(a2, v23, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 1, 1, 0, 0); return ggml_add(a2, v24, a3); }
forward: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RAX,RDX MOV R14,RSI MOV R15,RDI MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] MOV RDI,RSI MOV qword ptr [RSP + 0x40],RAX MOV RSI,RAX CALL 0x0011cf13 MOV RBP,RAX MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV R12,qword ptr [RBP + 0x18] MOV RDX,qword ptr [R15 + 0x18] MOV RCX,qword ptr [R15 + 0x20] PUSH 0x1 POP RBX MOV RDI,R14 MOV RSI,RBP MOV R8D,EBX MOV R9D,EBX PUSH 0x0 PUSH 0x0 CALL 0x0011ce99 POP RCX POP RDX MOV R13,RAX MOV RDX,qword ptr [R15 + 0x28] MOV RCX,qword ptr [R15 + 0x30] MOV RDI,R14 MOV RSI,RBP MOV R8D,EBX MOV R9D,EBX PUSH 0x0 PUSH 0x0 CALL 0x0011ce99 POP RCX POP RDX MOV qword ptr [RSP + 0x28],RAX MOV RDX,qword ptr [R15 + 0x38] MOV RCX,qword ptr [R15 + 0x40] MOV RDI,R14 MOV RSI,RBP MOV R8D,EBX MOV R9D,EBX PUSH 0x0 PUSH 0x0 CALL 0x0011ce99 POP RCX POP RDX MOV qword ptr [RSP + 0x30],RAX PUSH 0x2 POP RCX PUSH 0x3 POP R9 MOV RDI,R14 MOV RSI,R13 MOV EDX,EBX XOR R8D,R8D CALL 0x0016c249 MOV RDI,R14 MOV RSI,RAX CALL 0x0016b8ee MOV RBP,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x38],R12 IMUL RBP,R12 MOV RDI,R14 MOV RSI,RAX MOV R13,qword ptr [RSP + 0x18] MOV RDX,R13 MOV RCX,RBP MOV R12,qword ptr [RSP + 0x10] MOV R8,R12 CALL 0x0016be1f MOV qword ptr [RSP + 0x20],RAX MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x28] MOV EDX,EBX PUSH 0x2 POP RCX XOR R8D,R8D PUSH 0x3 POP R9 CALL 0x0016c249 MOV RDI,R14 MOV RSI,RAX CALL 0x0016b8ee MOV RDI,R14 MOV RSI,RAX MOV RDX,R13 MOV RCX,RBP MOV R8,R12 CALL 0x0016be1f MOV RDI,R14 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x20] CALL 0x0016ae99 MOV RBX,RAX CVTSI2SS XMM0,dword ptr [R15] CVTSS2SD XMM0,XMM0 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JC 0x00136f99 SQRTSD XMM0,XMM0 JMP 0x00136f9e LAB_00136f99: CALL 0x0010a490 LAB_00136f9e: MOVSD XMM1,qword ptr [0x001999f0] DIVSD XMM1,XMM0 CVTSD2SS XMM0,XMM1 MOV RDI,R14 MOV RSI,RBX CALL 0x0016b5d9 MOV RDI,R14 MOV RSI,RAX CALL 0x0016cd21 MOV RBX,RAX MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,RBP MOV R12,qword ptr [RSP + 0x18] MOV RCX,R12 MOV R13,qword ptr [RSP + 0x10] MOV R8,R13 CALL 0x0016be1f MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX CALL 0x0016ae99 PUSH 0x1 POP RBX PUSH 0x2 POP R8 PUSH 0x3 POP R9 MOV RDI,R14 MOV RSI,RAX MOV EDX,EBX XOR ECX,ECX CALL 0x0016c249 MOV RDI,R14 MOV RSI,RAX CALL 0x0016b8ee MOV RDI,R14 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x38] MOV R8,R12 MOV R9,R13 CALL 0x0016bf70 MOV RDX,qword ptr [R15 + 0x48] MOV RCX,qword ptr [R15 + 0x50] MOV RDI,R14 MOV RSI,RAX MOV R8D,EBX MOV R9D,EBX PUSH 0x0 PUSH 0x0 CALL 0x0011ce99 ADD RSP,0x10 MOV RDI,R14 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00169a53
/* AttnBlock::forward(ggml_context*, ggml_tensor*) */ void AttnBlock::forward(ggml_context *param_1,ggml_tensor *param_2) { int8 uVar1; long lVar2; ggml_tensor *pgVar3; int8 uVar4; int8 uVar5; int8 uVar6; int8 uVar7; ggml_tensor *in_RDX; long lVar8; int in_R8D; double dVar9; int in_stack_ffffffffffffff88; long lVar10; pgVar3 = (ggml_tensor *) ggml_nn_group_norm((ggml_context *)param_2,in_RDX,*(ggml_tensor **)(param_1 + 8), *(ggml_tensor **)(param_1 + 0x10),in_R8D); uVar7 = *(int8 *)(pgVar3 + 0x28); uVar1 = *(int8 *)(pgVar3 + 0x20); lVar10 = *(long *)(pgVar3 + 0x10); lVar2 = *(long *)(pgVar3 + 0x18); uVar4 = ggml_nn_conv_2d((ggml_context *)param_2,pgVar3,*(ggml_tensor **)(param_1 + 0x18), *(ggml_tensor **)(param_1 + 0x20),1,1,0,0,in_stack_ffffffffffffff88, (int)lVar10); uVar5 = ggml_nn_conv_2d((ggml_context *)param_2,pgVar3,*(ggml_tensor **)(param_1 + 0x28), *(ggml_tensor **)(param_1 + 0x30),1,1,0,0,in_stack_ffffffffffffff88, (int)lVar10); uVar6 = ggml_nn_conv_2d((ggml_context *)param_2,pgVar3,*(ggml_tensor **)(param_1 + 0x38), *(ggml_tensor **)(param_1 + 0x40),1,1,0,0,in_stack_ffffffffffffff88, (int)lVar10); uVar4 = ggml_permute(param_2,uVar4,1,2,0,3); uVar4 = ggml_cont(param_2,uVar4); lVar8 = lVar10 * lVar2; uVar4 = ggml_reshape_3d(param_2,uVar4,uVar1,lVar8,uVar7); uVar5 = ggml_permute(param_2,uVar5,1,2,0,3); uVar5 = ggml_cont(param_2,uVar5); uVar5 = ggml_reshape_3d(param_2,uVar5,uVar1,lVar8,uVar7); uVar4 = ggml_mul_mat(param_2,uVar5,uVar4); dVar9 = (double)*(int *)param_1; if (dVar9 < 0.0) { dVar9 = sqrt(dVar9); } else { dVar9 = SQRT(dVar9); } uVar4 = ggml_scale_inplace((float)(DAT_001999f0 / dVar9),param_2,uVar4); uVar4 = ggml_soft_max_inplace(param_2,uVar4); uVar5 = ggml_reshape_3d(param_2,uVar6,lVar8,uVar1,uVar7); uVar4 = ggml_mul_mat(param_2,uVar5,uVar4); uVar4 = ggml_permute(param_2,uVar4,1,0,2,3); uVar4 = ggml_cont(param_2,uVar4); pgVar3 = (ggml_tensor *)ggml_reshape_4d(param_2,uVar4,lVar10,lVar2,uVar1,uVar7); uVar7 = ggml_nn_conv_2d((ggml_context *)param_2,pgVar3,*(ggml_tensor **)(param_1 + 0x48), *(ggml_tensor **)(param_1 + 0x50),1,1,0,0,in_stack_ffffffffffffff88, (int)lVar10); ggml_add(param_2,uVar7,in_RDX); return; }
47,353
google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.cc
const char* InlineGreedyStringParser(std::string* s, const char* ptr, ParseContext* ctx) { int size = ReadSize(&ptr); if (!ptr) return nullptr; return ctx->ReadString(ptr, size, s); }
O3
cpp
google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, google::protobuf::internal::ParseContext*): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movzbl (%rsi), %edx testb %dl, %dl js 0x7cf50 incq %rsi movq %r14, %rdi movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x78c6c movq %rsi, %rdi movl %edx, %esi callq 0x2fd46 testq %rax, %rax je 0x7cf64 movq %rax, %rsi jmp 0x7cf3e xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE: push r14 push rbx push rax mov r14, rdx mov rbx, rdi movzx edx, byte ptr [rsi]; unsigned int test dl, dl js short loc_7CF50 inc rsi loc_7CF3E: mov rdi, r14 mov rcx, rbx add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf8internal18EpsCopyInputStream10ReadStringEPKciPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::EpsCopyInputStream::ReadString(char const*,int,std::string *) loc_7CF50: mov rdi, rsi; this mov esi, edx; char * call _ZN6google8protobuf8internal16ReadSizeFallbackEPKcj; google::protobuf::internal::ReadSizeFallback(char const*,uint) test rax, rax jz short loc_7CF64 mov rsi, rax jmp short loc_7CF3E loc_7CF64: xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long google::protobuf::internal::InlineGreedyStringParser( long long a1, google::protobuf::internal *a2, google::protobuf::internal::EpsCopyInputStream *a3) { int v4; // edx long long v5; // rsi char *SizeFallback; // rax v4 = *(unsigned __int8 *)a2; if ( (v4 & 0x80u) == 0 ) { v5 = (long long)a2 + 1; return google::protobuf::internal::EpsCopyInputStream::ReadString(a3, v5, v4, a1); } SizeFallback = google::protobuf::internal::ReadSizeFallback(a2, (const char *)*(unsigned __int8 *)a2); if ( SizeFallback ) { v5 = (long long)SizeFallback; return google::protobuf::internal::EpsCopyInputStream::ReadString(a3, v5, v4, a1); } return 0LL; }
InlineGreedyStringParser: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOVZX EDX,byte ptr [RSI] TEST DL,DL JS 0x0017cf50 INC RSI LAB_0017cf3e: MOV RDI,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00178c6c LAB_0017cf50: MOV RDI,RSI MOV ESI,EDX CALL 0x0012fd46 TEST RAX,RAX JZ 0x0017cf64 MOV RSI,RAX JMP 0x0017cf3e LAB_0017cf64: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
/* google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::string*, char const*, google::protobuf::internal::ParseContext*) */ int8 google::protobuf::internal::InlineGreedyStringParser (string *param_1,char *param_2,ParseContext *param_3) { byte bVar1; int8 uVar2; int1 auVar3 [12]; bVar1 = *param_2; if ((char)bVar1 < '\0') { auVar3 = ReadSizeFallback(param_2,(uint)bVar1); if (auVar3._0_8_ == 0) { return 0; } } else { auVar3[8] = bVar1; auVar3._0_8_ = param_2 + 1; auVar3._9_3_ = 0; } uVar2 = EpsCopyInputStream::ReadString ((EpsCopyInputStream *)param_3,auVar3._0_8_,auVar3._8_4_,param_1); return uVar2; }
47,354
change_pagecache_param
eloqsql/storage/maria/ma_pagecache.c
void change_pagecache_param(PAGECACHE *pagecache, uint division_limit, uint age_threshold) { DBUG_ENTER("change_pagecache_param"); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (division_limit) pagecache->min_warm_blocks= (pagecache->disk_blocks * division_limit / 100 + 1); if (age_threshold) pagecache->age_threshold= (pagecache->disk_blocks * age_threshold / 100); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_VOID_RETURN; }
O0
c
change_pagecache_param: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x12b62e(%rip), %rsi # 0x17ee02 movl $0x46d, %edx # imm = 0x46D callq 0x53850 cmpl $0x0, -0xc(%rbp) je 0x5380c movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movl -0xc(%rbp), %ecx imulq %rcx, %rax movl $0x64, %ecx cqto idivq %rcx movq %rax, %rcx addq $0x1, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) cmpl $0x0, -0x10(%rbp) je 0x53836 movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movl -0x10(%rbp), %ecx imulq %rcx, %rax movl $0x64, %ecx cqto idivq %rcx movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x538c0 jmp 0x53848 addq $0x10, %rsp popq %rbp retq nop
change_pagecache_param: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 46Dh call inline_mysql_mutex_lock_5 cmp [rbp+var_C], 0 jz short loc_5380C mov rax, [rbp+var_8] mov rax, [rax+40h] mov ecx, [rbp+var_C] imul rax, rcx mov ecx, 64h ; 'd' cqo idiv rcx mov rcx, rax add rcx, 1 mov rax, [rbp+var_8] mov [rax+8], rcx loc_5380C: cmp [rbp+var_10], 0 jz short loc_53836 mov rax, [rbp+var_8] mov rax, [rax+40h] mov ecx, [rbp+var_10] imul rax, rcx mov ecx, 64h ; 'd' cqo idiv rcx mov rcx, rax mov rax, [rbp+var_8] mov [rax+10h], rcx loc_53836: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_5 jmp short $+2 loc_53848: add rsp, 10h pop rbp retn
long long change_pagecache_param(_QWORD *a1, unsigned int a2, unsigned int a3) { long long v3; // rdx inline_mysql_mutex_lock_5(a1 + 25, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 1133LL); if ( a2 ) { v3 = a2 * a1[8] % 100LL; a1[1] = a2 * a1[8] / 100LL + 1; } if ( a3 ) { v3 = a3 * a1[8] % 100LL; a1[2] = a3 * a1[8] / 100LL; } return inline_mysql_mutex_unlock_5( a1 + 25, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", v3); }
change_pagecache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x27ee02] MOV EDX,0x46d CALL 0x00153850 CMP dword ptr [RBP + -0xc],0x0 JZ 0x0015380c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0xc] IMUL RAX,RCX MOV ECX,0x64 CQO IDIV RCX MOV RCX,RAX ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX LAB_0015380c: CMP dword ptr [RBP + -0x10],0x0 JZ 0x00153836 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x10] IMUL RAX,RCX MOV ECX,0x64 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX LAB_00153836: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x001538c0 JMP 0x00153848 LAB_00153848: ADD RSP,0x10 POP RBP RET
void change_pagecache_param(long param_1,uint param_2,uint param_3) { inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x46d); if (param_2 != 0) { *(long *)(param_1 + 8) = (long)(*(long *)(param_1 + 0x40) * (ulong)param_2) / 100 + 1; } if (param_3 != 0) { *(long *)(param_1 + 0x10) = (long)(*(long *)(param_1 + 0x40) * (ulong)param_3) / 100; } inline_mysql_mutex_unlock(param_1 + 200); return; }
47,355
ma_bitmap_unlock
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_unlock(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; uint send_signal; DBUG_ENTER("_ma_bitmap_unlock"); if (!share->now_transactional) DBUG_VOID_RETURN; DBUG_ASSERT(bitmap->flush_all_requested > 0 && bitmap->non_flushable == 1); mysql_mutex_lock(&bitmap->bitmap_lock); bitmap->non_flushable= 0; _ma_bitmap_unpin_all(share); send_signal= bitmap->waiting_for_non_flushable; if (!--bitmap->flush_all_requested) send_signal|= bitmap->waiting_for_flush_all_requested; mysql_mutex_unlock(&bitmap->bitmap_lock); if (send_signal) mysql_cond_broadcast(&bitmap->bitmap_cond); DBUG_VOID_RETURN; }
O3
c
ma_bitmap_unlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpb $0x0, 0x7e7(%rdi) je 0x40179 movq %rdi, %rbx leaq 0xa98(%rdi), %r14 cmpq $0x0, 0xad8(%rdi) jne 0x40184 movq %r14, %rdi callq 0x29220 movl $0x0, 0xa48(%rbx) movq %rbx, %rdi callq 0x401c1 movl 0xa4c(%rbx), %r15d decl 0xa40(%rbx) jne 0x4013b orl 0xa44(%rbx), %r15d movq 0xad8(%rbx), %rdi testq %rdi, %rdi jne 0x4019d movq %r14, %rdi callq 0x291e0 testl %r15d, %r15d je 0x40179 movq 0xb10(%rbx), %rdi addq $0xae0, %rbx # imm = 0xAE0 testq %rdi, %rdi jne 0x401af movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x296f0 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x99689(%rip), %rsi # 0xd9814 movq %r14, %rdi movl $0x279, %edx # imm = 0x279 callq 0x2eb8f jmp 0x40113 leaq 0x345e6c(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x40147 leaq 0x345e5a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x178(%rax) jmp 0x40167
_ma_bitmap_unlock: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp byte ptr [rdi+7E7h], 0 jz loc_40179 mov rbx, rdi lea r14, [rdi+0A98h] cmp qword ptr [rdi+0AD8h], 0 jnz short loc_40184 mov rdi, r14 call _pthread_mutex_lock loc_40113: mov dword ptr [rbx+0A48h], 0 mov rdi, rbx call _ma_bitmap_unpin_all mov r15d, [rbx+0A4Ch] dec dword ptr [rbx+0A40h] jnz short loc_4013B or r15d, [rbx+0A44h] loc_4013B: mov rdi, [rbx+0AD8h] test rdi, rdi jnz short loc_4019D loc_40147: mov rdi, r14 call _pthread_mutex_unlock test r15d, r15d jz short loc_40179 mov rdi, [rbx+0B10h] add rbx, 0AE0h test rdi, rdi jnz short loc_401AF loc_40167: mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_cond_broadcast loc_40179: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_40184: lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 279h call psi_mutex_lock jmp loc_40113 loc_4019D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_40147 loc_401AF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+178h] jmp short loc_40167
long long ma_bitmap_unlock(long long a1) { long long v2; // r14 int v3; // r15d long long v5; // rdi long long result; // rax long long v7; // rdi long long v8; // rbx if ( *(_BYTE *)(a1 + 2023) ) { v2 = a1 + 2712; if ( *(_QWORD *)(a1 + 2776) ) psi_mutex_lock(a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x279u); else pthread_mutex_lock(a1 + 2712); *(_DWORD *)(a1 + 2632) = 0; ma_bitmap_unpin_all(a1); v3 = *(_DWORD *)(a1 + 2636); if ( (*(_DWORD *)(a1 + 2624))-- == 1 ) v3 |= *(_DWORD *)(a1 + 2628); v5 = *(_QWORD *)(a1 + 2776); if ( v5 ) ((void ( *)(long long))PSI_server[44])(v5); result = pthread_mutex_unlock(v2); if ( v3 ) { v7 = *(_QWORD *)(a1 + 2832); v8 = a1 + 2784; if ( v7 ) ((void ( *)(long long))PSI_server[47])(v7); return pthread_cond_broadcast(v8); } } return result; }
_ma_bitmap_unlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP byte ptr [RDI + 0x7e7],0x0 JZ 0x00140179 MOV RBX,RDI LEA R14,[RDI + 0xa98] CMP qword ptr [RDI + 0xad8],0x0 JNZ 0x00140184 MOV RDI,R14 CALL 0x00129220 LAB_00140113: MOV dword ptr [RBX + 0xa48],0x0 MOV RDI,RBX CALL 0x001401c1 MOV R15D,dword ptr [RBX + 0xa4c] DEC dword ptr [RBX + 0xa40] JNZ 0x0014013b OR R15D,dword ptr [RBX + 0xa44] LAB_0014013b: MOV RDI,qword ptr [RBX + 0xad8] TEST RDI,RDI JNZ 0x0014019d LAB_00140147: MOV RDI,R14 CALL 0x001291e0 TEST R15D,R15D JZ 0x00140179 MOV RDI,qword ptr [RBX + 0xb10] ADD RBX,0xae0 TEST RDI,RDI JNZ 0x001401af LAB_00140167: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001296f0 LAB_00140179: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00140184: LEA RSI,[0x1d9814] MOV RDI,R14 MOV EDX,0x279 CALL 0x0012eb8f JMP 0x00140113 LAB_0014019d: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00140147 LAB_001401af: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x178] JMP 0x00140167
void _ma_bitmap_unlock(long param_1) { pthread_mutex_t *__mutex; int *piVar1; uint uVar2; if (*(char *)(param_1 + 0x7e7) != '\0') { __mutex = (pthread_mutex_t *)(param_1 + 0xa98); if (*(long *)(param_1 + 0xad8) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x279); } *(int4 *)(param_1 + 0xa48) = 0; _ma_bitmap_unpin_all(param_1); uVar2 = *(uint *)(param_1 + 0xa4c); piVar1 = (int *)(param_1 + 0xa40); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { uVar2 = uVar2 | *(uint *)(param_1 + 0xa44); } if (*(long *)(param_1 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (uVar2 != 0) { if (*(long *)(param_1 + 0xb10) != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xae0)); return; } } return; }
47,356
ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> ()>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/renderer.cpp
Component Renderer(Component child, std::function<Element()> render) { Component renderer = Renderer(std::move(render)); renderer->Add(std::move(child)); return renderer; }
O2
cpp
ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> ()>): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq 0x18(%rdx), %rax movq %rax, 0x18(%rsp) movq 0x10(%rdx), %rax testq %rax, %rax je 0x2661c movups (%rdx), %xmm1 addq $0x10, %rdx movaps %xmm1, (%rsp) movq %rax, 0x10(%rsp) movups %xmm0, (%rdx) movq %rsp, %rsi movq %rbx, %rdi callq 0x264d0 movq %rsp, %rdi callq 0x13b10 movq (%rbx), %rdi leaq 0x28(%rsp), %r15 movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movaps %xmm0, -0x8(%r15) andq $0x0, (%r14) leaq 0x20(%rsp), %rsi callq 0x21ae6 movq %r15, %rdi callq 0x13452 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, %rdi callq 0x13452 addq $0x8, %rbx movq %rbx, %rdi callq 0x13452 jmp 0x2668c movq %rax, %r14 movq %rsp, %rdi callq 0x13b10 movq %r14, %rdi callq 0xc7f0
_ZN5ftxui8RendererESt10shared_ptrINS_13ComponentBaseEESt8functionIFS0_INS_4NodeEEvEE: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 and [rsp+48h+var_38], 0 mov rax, [rdx+18h] mov [rsp+48h+var_30], rax mov rax, [rdx+10h] test rax, rax jz short loc_2661C movups xmm1, xmmword ptr [rdx] add rdx, 10h movaps [rsp+48h+var_48], xmm1 mov [rsp+48h+var_38], rax movups xmmword ptr [rdx], xmm0 loc_2661C: mov rsi, rsp mov rdi, rbx call _ZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEE; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>) mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, [rbx] lea r15, [rsp+48h+var_20] movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movaps xmmword ptr [r15-8], xmm0 and qword ptr [r14], 0 lea rsi, [rsp+48h+var_28] call _ZN5ftxui13ComponentBase3AddESt10shared_ptrIS0_E; ftxui::ComponentBase::Add(std::shared_ptr<ftxui::ComponentBase>) mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_2668C mov r14, rax mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() loc_2668C: mov rdi, r14 call __Unwind_Resume
long long * ftxui::Renderer(long long *a1, __int128 *a2, long long a3) { long long v4; // rax long long v5; // rdi __int128 v6; // xmm0 __int128 v8; // [rsp+0h] [rbp-48h] BYREF long long v9; // [rsp+10h] [rbp-38h] long long v10; // [rsp+18h] [rbp-30h] _OWORD v11[2]; // [rsp+20h] [rbp-28h] BYREF v8 = 0LL; v9 = 0LL; v10 = *(_QWORD *)(a3 + 24); v4 = *(_QWORD *)(a3 + 16); if ( v4 ) { v8 = *(_OWORD *)a3; v9 = v4; *(_OWORD *)(a3 + 16) = 0LL; } ftxui::Renderer(a1, &v8); std::_Function_base::~_Function_base((std::_Function_base *)&v8); v5 = *a1; v6 = *a2; *((_QWORD *)a2 + 1) = 0LL; v11[0] = v6; *(_QWORD *)a2 = 0LL; ftxui::ComponentBase::Add(v5, (ftxui::ComponentBase **)v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v11 + 1); return a1; }
Renderer: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RDX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RDX + 0x10] TEST RAX,RAX JZ 0x0012661c MOVUPS XMM1,xmmword ptr [RDX] ADD RDX,0x10 MOVAPS xmmword ptr [RSP],XMM1 MOV qword ptr [RSP + 0x10],RAX MOVUPS xmmword ptr [RDX],XMM0 LAB_0012661c: MOV RSI,RSP MOV RDI,RBX CALL 0x001264d0 MOV RDI,RSP CALL 0x00113b10 MOV RDI,qword ptr [RBX] LEA R15,[RSP + 0x28] MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVAPS xmmword ptr [R15 + -0x8],XMM0 AND qword ptr [R14],0x0 LAB_00126649: LEA RSI,[RSP + 0x20] CALL 0x00121ae6 LAB_00126653: MOV RDI,R15 CALL 0x00113452 MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> ()>) */ ftxui * __thiscall ftxui::Renderer(ftxui *this,int8 *param_2,int8 *param_3) { long lVar1; ComponentBase *pCVar2; int8 local_48; int8 uStack_40; long local_38; int8 local_30; int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; local_48 = 0; uStack_40 = 0; local_38 = 0; local_30 = param_3[3]; lVar1 = param_3[2]; if (lVar1 != 0) { local_48 = *param_3; uStack_40 = param_3[1]; param_3[2] = 0; param_3[3] = 0; local_38 = lVar1; } /* try { // try from 0012661c to 00126626 has its CatchHandler @ 00126681 */ Renderer(this,&local_48); std::_Function_base::~_Function_base((_Function_base *)&local_48); pCVar2 = *(ComponentBase **)this; local_28 = *(int4 *)param_2; uStack_24 = *(int4 *)((long)param_2 + 4); uStack_20 = *(int4 *)(param_2 + 1); uStack_1c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 00126649 to 00126652 has its CatchHandler @ 00126668 */ ComponentBase::Add(pCVar2,&local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20); return this; }
47,357
read_block_secondary
eloqsql/mysys/mf_keycache.c
static void read_block_secondary(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { KEYCACHE_THREAD_TRACE("read_block_secondary"); /* This code is executed only by threads that submitted secondary requests. At this point it could happen that the cache block is not yet assigned to the hash_link for the requested file block. But at awake from the wait this should be the case. Unfortunately we cannot assert this here because we do not know the hash_link for the requested file block nor the file and position. So we have to assert this in the caller. */ KEYCACHE_DBUG_PRINT("read_block_secondary", ("secondary request waiting for new page to be read")); wait_on_queue(&block->wqueue[COND_FOR_REQUESTED], &keycache->cache_lock); KEYCACHE_DBUG_PRINT("read_block_secondary", ("secondary request: new page in cache")); DBUG_ASSERT(keycache->can_be_used); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); }
O0
c
read_block_secondary: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe4182 movq -0x10(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe3660 jmp 0xe419c jmp 0xe419e jmp 0xe41a0 jmp 0xe41a2 jmp 0xe41a4 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
read_block_secondary: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E4182: mov rdi, [rbp+var_10] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short $+2 loc_E419C: jmp short $+2 loc_E419E: jmp short $+2 loc_E41A0: jmp short $+2 loc_E41A2: jmp short $+2 loc_E41A4: add rsp, 10h pop rbp retn
long long read_block_secondary(long long a1, long long a2) { return wait_on_queue((long long *)(a2 + 40), (const char *)(a1 + 192)); }
read_block_secondary: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e4182 LAB_001e4182: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e3660 JMP 0x001e419c LAB_001e419c: JMP 0x001e419e LAB_001e419e: JMP 0x001e41a0 LAB_001e41a0: JMP 0x001e41a2 LAB_001e41a2: JMP 0x001e41a4 LAB_001e41a4: ADD RSP,0x10 POP RBP RET
void read_block_secondary(long param_1,long param_2) { wait_on_queue(param_2 + 0x28,param_1 + 0xc0); return; }
47,358
LefDefParser::lefwLayerRoutineEndSpacingtable()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutineEndSpacingtable() { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTINGWIDTH) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ;\n"); else fprintf(lefwFile, " ;\n"); lefwLines++; lefwState = LEFW_LAYERROUTING; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerRoutineEndSpacingtable(): pushq %rax leaq 0x1f7e8(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x13628 movl $0x1, 0x4(%rsp) jmp 0x136a3 leaq 0x1fa21(%rip), %rax # 0x33050 cmpl $0x20, (%rax) je 0x1363e movl $0x2, 0x4(%rsp) jmp 0x136a3 cmpl $0x0, 0x1faa7(%rip) # 0x330ec je 0x13661 leaq 0x1f7b2(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x168fb(%rip), %rsi # 0x29f53 movb $0x0, %al callq 0x289b0 jmp 0x13679 leaq 0x1f798(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x168e1(%rip), %rsi # 0x29f53 movb $0x0, %al callq 0x1100 leaq 0x1f9cc(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x1f9c0(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0x1f9bb(%rip), %rax # 0x33050 movl $0x1f, (%rax) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopl (%rax)
_ZN12LefDefParser31lefwLayerRoutineEndSpacingtableEv: push rax lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_13628 mov [rsp+8+var_4], 1 jmp short loc_136A3 loc_13628: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 20h ; ' ' jz short loc_1363E mov [rsp+8+var_4], 2 jmp short loc_136A3 loc_1363E: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_13661 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_13679 loc_13661: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _fprintf loc_13679: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 1Fh mov [rsp+8+var_4], 0 loc_136A3: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::lefwLayerRoutineEndSpacingtable( LefDefParser *this, long long a2, int a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 32 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" ;\n", a3, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ;\n"); ++LefDefParser::lefwLines; LefDefParser::lefwState = 31; return 0; } else { return 2; } } else { return 1; } }
lefwLayerRoutineEndSpacingtable: PUSH RAX LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00113628 MOV dword ptr [RSP + 0x4],0x1 JMP 0x001136a3 LAB_00113628: LEA RAX,[0x133050] CMP dword ptr [RAX],0x20 JZ 0x0011363e MOV dword ptr [RSP + 0x4],0x2 JMP 0x001136a3 LAB_0011363e: CMP dword ptr [0x001330ec],0x0 JZ 0x00113661 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f53] MOV AL,0x0 CALL 0x001289b0 JMP 0x00113679 LAB_00113661: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f53] MOV AL,0x0 CALL 0x00101100 LAB_00113679: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x1f MOV dword ptr [RSP + 0x4],0x0 LAB_001136a3: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::lefwLayerRoutineEndSpacingtable() */ int4 LefDefParser::lefwLayerRoutineEndSpacingtable(void) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwState == 0x20) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ;\n"); } else { encPrint(lefwFile," ;\n"); } lefwLines = lefwLines + 1; lefwState = 0x1f; local_4 = 0; } else { local_4 = 2; } return local_4; }
47,359
my_strnxfrm_unicode_full_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (flags & MY_STRXFRM_PAD_WITH_SPACE) { for ( ; dst < de && nweights; nweights--) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if (flags & MY_STRXFRM_PAD_TO_MAXLEN) { while (dst < de) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x28(%rbp), %r9 addq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x750c0 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x75261 movl 0x10(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x752eb jmp 0x7526e movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x75287 cmpl $0x0, -0x1c(%rbp) setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x75290 jmp 0x752e9 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x752dc movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x752da movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x20, (%rax) jmp 0x752dc jmp 0x752de movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x7526e jmp 0x752eb movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0x10(%rbp), %edx xorl %ecx, %ecx callq 0x565c0 movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x75366 jmp 0x7530c movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x75364 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x75362 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x75360 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x20, (%rax) jmp 0x75362 jmp 0x7530c jmp 0x75366 movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
my_strnxfrm_unicode_full_bin: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_40] mov r8, [rbp+var_28] mov r9, [rbp+var_28] add r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_unicode_full_bin_internal add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_75261: mov eax, [rbp+arg_0] and eax, 40h cmp eax, 0 jz short loc_752EB jmp short $+2 loc_7526E: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jnb short loc_75287 cmp [rbp+var_1C], 0 setnz al mov [rbp+var_41], al loc_75287: mov al, [rbp+var_41] test al, 1 jnz short loc_75290 jmp short loc_752E9 loc_75290: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_752DC mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_752DA mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 20h ; ' ' loc_752DA: jmp short $+2 loc_752DC: jmp short $+2 loc_752DE: mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp short loc_7526E loc_752E9: jmp short $+2 loc_752EB: mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+arg_0] xor ecx, ecx call my_strxfrm_desc_and_reverse mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_75366 jmp short $+2 loc_7530C: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_75364 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_75362 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_75360 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 20h ; ' ' loc_75360: jmp short $+2 loc_75362: jmp short loc_7530C loc_75364: jmp short $+2 loc_75366: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 50h pop rbp retn
unsigned long long my_strnxfrm_unicode_full_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { _BYTE *v7; // rax _BYTE *v8; // rax _BYTE *v9; // rax _BYTE *v10; // rax _BYTE *v11; // rax _BYTE *v12; // rax _BYTE *v13; // rax bool v15; // [rsp+Fh] [rbp-41h] unsigned long long v16; // [rsp+10h] [rbp-40h] int v17; // [rsp+34h] [rbp-1Ch] BYREF long long v18; // [rsp+38h] [rbp-18h] unsigned long long v19; // [rsp+40h] [rbp-10h] long long v20; // [rsp+48h] [rbp-8h] v20 = a1; v19 = (unsigned long long)a2; v18 = a3; v17 = a4; v16 = (unsigned long long)&a2[a3]; v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v17, a5, a6 + a5); v19 += (unsigned long long)v7; if ( (a7 & 0x40) != 0 ) { while ( 1 ) { v15 = 0; if ( v19 < v16 ) v15 = v17 != 0; if ( !v15 ) break; v8 = (_BYTE *)v19++; *v8 = 0; if ( v19 < v16 ) { v9 = (_BYTE *)v19++; *v9 = 0; if ( v19 < v16 ) { v10 = (_BYTE *)v19++; *v10 = 32; } } --v17; } } my_strxfrm_desc_and_reverse(a2, v19, a7, 0); if ( (a7 & 0x80) != 0 ) { while ( v19 < v16 ) { v11 = (_BYTE *)v19++; *v11 = 0; if ( v19 < v16 ) { v12 = (_BYTE *)v19++; *v12 = 0; if ( v19 < v16 ) { v13 = (_BYTE *)v19++; *v13 = 32; } } } } return v19 - (_QWORD)a2; }
my_strnxfrm_unicode_full_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x28] ADD R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x001750c0 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00175261 LAB_00175261: MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x40 CMP EAX,0x0 JZ 0x001752eb JMP 0x0017526e LAB_0017526e: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JNC 0x00175287 CMP dword ptr [RBP + -0x1c],0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00175287: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00175290 JMP 0x001752e9 LAB_00175290: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001752dc MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001752da MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x20 LAB_001752da: JMP 0x001752dc LAB_001752dc: JMP 0x001752de LAB_001752de: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0017526e LAB_001752e9: JMP 0x001752eb LAB_001752eb: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + 0x10] XOR ECX,ECX CALL 0x001565c0 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x00175366 JMP 0x0017530c LAB_0017530c: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00175364 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00175362 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00175360 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x20 LAB_00175360: JMP 0x00175362 LAB_00175362: JMP 0x0017530c LAB_00175364: JMP 0x00175366 LAB_00175366: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { int1 *puVar1; long lVar2; int1 *puVar3; int1 *puVar4; int local_24; long local_20; int1 *local_18; int8 local_10; puVar1 = (int1 *)(param_2 + param_3); local_24 = param_4; local_20 = param_3; local_18 = (int1 *)param_2; local_10 = param_1; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,puVar1,&local_24,param_5,param_5 + param_6); local_18 = (int1 *)(lVar2 + (long)local_18); if ((param_7 & 0x40) != 0) { for (; local_18 < puVar1 && local_24 != 0; local_24 = local_24 + -1) { puVar3 = local_18 + 1; *local_18 = 0; if (puVar3 < puVar1) { puVar4 = local_18 + 2; *puVar3 = 0; puVar3 = puVar4; if (puVar4 < puVar1) { *puVar4 = 0x20; puVar3 = local_18 + 3; } } local_18 = puVar3; } } my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0); puVar3 = local_18; if ((param_7 & 0x80) != 0) { while (local_18 = puVar3, local_18 < puVar1) { puVar3 = local_18 + 1; *local_18 = 0; if (puVar3 < puVar1) { puVar4 = local_18 + 2; *puVar3 = 0; puVar3 = puVar4; if (puVar4 < puVar1) { *puVar4 = 0x20; puVar3 = local_18 + 3; } } } } return (long)local_18 - param_2; }
47,360
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type)
monkey531[P]llama/common/minja.hpp
static std::string typeToString(Type t) { switch (t) { case Type::Text: return "text"; case Type::Expression: return "expression"; case Type::If: return "if"; case Type::Else: return "else"; case Type::Elif: return "elif"; case Type::EndIf: return "endif"; case Type::For: return "for"; case Type::EndFor: return "endfor"; case Type::Set: return "set"; case Type::EndSet: return "endset"; case Type::Comment: return "comment"; case Type::Macro: return "macro"; case Type::EndMacro: return "endmacro"; case Type::Filter: return "filter"; case Type::EndFilter: return "endfilter"; case Type::Generation: return "generation"; case Type::EndGeneration: return "endgeneration"; case Type::Break: return "break"; case Type::Continue: return "continue"; } return "Unknown"; }
O1
cpp
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type): pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) cmpl $0x12, %esi ja 0x9bb75 movl %esi, %eax leaq 0x55e41(%rip), %rcx # 0xf185c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x56bca(%rip), %rsi # 0xf25f5 leaq 0x56bc7(%rip), %rdx # 0xf25f9 jmp 0x9bb83 leaq 0x56f41(%rip), %rsi # 0xf297f leaq 0x56f43(%rip), %rdx # 0xf2988 jmp 0x9bb83 leaq 0x56f01(%rip), %rsi # 0xf2952 leaq 0x56f02(%rip), %rdx # 0xf295a jmp 0x9bb83 leaq 0x56ec4(%rip), %rsi # 0xf2928 leaq 0x56ec3(%rip), %rdx # 0xf292e jmp 0x9bb83 leaq 0x56dbb(%rip), %rsi # 0xf2832 leaq 0x56db8(%rip), %rdx # 0xf2836 jmp 0x9bb83 leaq 0x57f2a(%rip), %rsi # 0xf39b4 leaq 0x57f2a(%rip), %rdx # 0xf39bb jmp 0x9bb83 leaq 0x56e20(%rip), %rsi # 0xf28bd leaq 0x56e26(%rip), %rdx # 0xf28ca jmp 0x9bb83 leaq 0x4ecf9(%rip), %rsi # 0xea7a9 leaq 0x4ecf4(%rip), %rdx # 0xea7ab jmp 0x9bb83 leaq 0x56ebf(%rip), %rsi # 0xf2982 leaq 0x56ebe(%rip), %rdx # 0xf2988 jmp 0x9bb83 leaq 0x56d82(%rip), %rsi # 0xf2858 leaq 0x56d7f(%rip), %rdx # 0xf285c jmp 0x9bb83 leaq 0x56dcd(%rip), %rsi # 0xf28b6 leaq 0x56dcc(%rip), %rdx # 0xf28bc jmp 0x9bb83 leaq 0x56f2d(%rip), %rsi # 0xf2a29 leaq 0x56f30(%rip), %rdx # 0xf2a33 jmp 0x9bb83 leaq 0x56e7d(%rip), %rsi # 0xf2989 leaq 0x56e7b(%rip), %rdx # 0xf298e jmp 0x9bb83 leaq 0x56d41(%rip), %rsi # 0xf285d leaq 0x56d3f(%rip), %rdx # 0xf2862 jmp 0x9bb83 leaq 0x56e29(%rip), %rsi # 0xf2955 leaq 0x56e27(%rip), %rdx # 0xf295a jmp 0x9bb83 leaq 0x56d7d(%rip), %rsi # 0xf28b9 leaq 0x56d79(%rip), %rdx # 0xf28bc jmp 0x9bb83 leaq 0x56e43(%rip), %rsi # 0xf298f leaq 0x56e44(%rip), %rdx # 0xf2997 jmp 0x9bb83 leaq 0x5bf0a(%rip), %rsi # 0xf7a66 leaq 0x5bf06(%rip), %rdx # 0xf7a69 jmp 0x9bb83 leaq 0x56d54(%rip), %rsi # 0xf28c0 leaq 0x56d57(%rip), %rdx # 0xf28ca jmp 0x9bb83 leaq 0x57e40(%rip), %rsi # 0xf39bc leaq 0x57e40(%rip), %rdx # 0xf39c3 movq %rbx, %rdi callq 0x23580 movq %rbx, %rax popq %rbx retq
_ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax cmp esi, 12h; switch 19 cases ja def_9BA22; jumptable 000000000009BA22 default case mov eax, esi lea rcx, jpt_9BA22 movsxd rax, ds:(jpt_9BA22 - 0F185Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9BA24: lea rsi, aText; jumptable 000000000009BA22 case 0 lea rdx, aText+4; "" jmp loc_9BB83 loc_9BA37: lea rsi, aEndfilter; jumptable 000000000009BA22 case 16 lea rdx, aEndfilter+9; "" jmp loc_9BB83 loc_9BA4A: lea rsi, aEndmacro; jumptable 000000000009BA22 case 14 lea rdx, aEndmacro+8; "" jmp loc_9BB83 loc_9BA5D: lea rsi, aEndset; jumptable 000000000009BA22 case 11 lea rdx, aEndset+6; "" jmp loc_9BB83 loc_9BA70: lea rsi, aElif; jumptable 000000000009BA22 case 4 lea rdx, aElif+4; "" jmp loc_9BB83 loc_9BA83: lea rsi, aComment; jumptable 000000000009BA22 case 12 lea rdx, aComment+7; "" jmp loc_9BB83 loc_9BA96: lea rsi, aEndgeneration; jumptable 000000000009BA22 case 9 lea rdx, aEndgeneration+0Dh; "" jmp loc_9BB83 loc_9BAA9: lea rsi, aIf+1; jumptable 000000000009BA22 case 2 lea rdx, aIf+3; "" jmp loc_9BB83 loc_9BABC: lea rsi, aEndfilter+3; jumptable 000000000009BA22 case 15 lea rdx, aEndfilter+9; "" jmp loc_9BB83 loc_9BACF: lea rsi, aElse; jumptable 000000000009BA22 case 3 lea rdx, aElse+4; "" jmp loc_9BB83 loc_9BAE2: lea rsi, aEndfor; jumptable 000000000009BA22 case 7 lea rdx, aEndfor+6; "" jmp loc_9BB83 loc_9BAF5: lea rsi, aExpectedLeftSi_0+24h; jumptable 000000000009BA22 case 1 lea rdx, aExpectedLeftSi_0+2Eh; "" jmp short loc_9BB83 loc_9BB05: lea rsi, aBreak; jumptable 000000000009BA22 case 17 lea rdx, aBreak+5; "" jmp short loc_9BB83 loc_9BB15: lea rsi, aEndif; jumptable 000000000009BA22 case 5 lea rdx, aEndif+5; "" jmp short loc_9BB83 loc_9BB25: lea rsi, aEndmacro+3; jumptable 000000000009BA22 case 13 lea rdx, aEndmacro+8; "" jmp short loc_9BB83 loc_9BB35: lea rsi, aEndfor+3; jumptable 000000000009BA22 case 6 lea rdx, aEndfor+6; "" jmp short loc_9BB83 loc_9BB45: lea rsi, aContinue; jumptable 000000000009BA22 case 18 lea rdx, aContinue+8; "" jmp short loc_9BB83 loc_9BB55: lea rsi, aAtLeastOneOfMi+2Fh; jumptable 000000000009BA22 case 10 lea rdx, aAtLeastOneOfMi+32h; "" jmp short loc_9BB83 loc_9BB65: lea rsi, aEndgeneration+3; jumptable 000000000009BA22 case 8 lea rdx, aEndgeneration+0Dh; "" jmp short loc_9BB83 def_9BA22: lea rsi, aUnknown; jumptable 000000000009BA22 default case lea rdx, aUnknown+7; "" loc_9BB83: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx *a1 = a1 + 2; switch ( a2 ) { case 0: v2 = "text"; v3 = (char *)""; break; case 1: v2 = (char *)"expression"; v3 = (char *)""; break; case 2: v2 = "if"; v3 = ""; break; case 3: v2 = "else"; v3 = ""; break; case 4: v2 = "elif"; v3 = ""; break; case 5: v2 = "endif"; v3 = ""; break; case 6: v2 = "for"; v3 = ""; break; case 7: v2 = "endfor"; v3 = ""; break; case 8: v2 = "generation"; v3 = ""; break; case 9: v2 = "endgeneration"; v3 = ""; break; case 10: v2 = (char *)"set"; v3 = (char *)""; break; case 11: v2 = "endset"; v3 = ""; break; case 12: v2 = "comment"; v3 = ""; break; case 13: v2 = "macro"; v3 = ""; break; case 14: v2 = "endmacro"; v3 = ""; break; case 15: v2 = "filter"; v3 = ""; break; case 16: v2 = "endfilter"; v3 = ""; break; case 17: v2 = "break"; v3 = ""; break; case 18: v2 = "continue"; v3 = ""; break; default: v2 = "Unknown"; v3 = ""; break; } std::string::_M_construct<char const*>(a1, v2, (long long)v3); return a1; }
typeToString[abi:cxx11]: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX CMP ESI,0x12 JA 0x0019bb75 MOV EAX,ESI LEA RCX,[0x1f185c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1f25f5] LEA RDX,[0x1f25f9] JMP 0x0019bb83 caseD_10: LEA RSI,[0x1f297f] LEA RDX,[0x1f2988] JMP 0x0019bb83 caseD_e: LEA RSI,[0x1f2952] LEA RDX,[0x1f295a] JMP 0x0019bb83 caseD_b: LEA RSI,[0x1f2928] LEA RDX,[0x1f292e] JMP 0x0019bb83 caseD_4: LEA RSI,[0x1f2832] LEA RDX,[0x1f2836] JMP 0x0019bb83 caseD_c: LEA RSI,[0x1f39b4] LEA RDX,[0x1f39bb] JMP 0x0019bb83 caseD_9: LEA RSI,[0x1f28bd] LEA RDX,[0x1f28ca] JMP 0x0019bb83 caseD_2: LEA RSI,[0x1ea7a9] LEA RDX,[0x1ea7ab] JMP 0x0019bb83 caseD_f: LEA RSI,[0x1f2982] LEA RDX,[0x1f2988] JMP 0x0019bb83 caseD_3: LEA RSI,[0x1f2858] LEA RDX,[0x1f285c] JMP 0x0019bb83 caseD_7: LEA RSI,[0x1f28b6] LEA RDX,[0x1f28bc] JMP 0x0019bb83 caseD_1: LEA RSI,[0x1f2a29] LEA RDX,[0x1f2a33] JMP 0x0019bb83 caseD_11: LEA RSI,[0x1f2989] LEA RDX,[0x1f298e] JMP 0x0019bb83 caseD_5: LEA RSI,[0x1f285d] LEA RDX,[0x1f2862] JMP 0x0019bb83 caseD_d: LEA RSI,[0x1f2955] LEA RDX,[0x1f295a] JMP 0x0019bb83 caseD_6: LEA RSI,[0x1f28b9] LEA RDX,[0x1f28bc] JMP 0x0019bb83 caseD_12: LEA RSI,[0x1f298f] LEA RDX,[0x1f2997] JMP 0x0019bb83 caseD_a: LEA RSI,[0x1f7a66] LEA RDX,[0x1f7a69] JMP 0x0019bb83 caseD_8: LEA RSI,[0x1f28c0] LEA RDX,[0x1f28ca] JMP 0x0019bb83 default: LEA RSI,[0x1f39bc] LEA RDX,[0x1f39c3] LAB_0019bb83: MOV RDI,RBX CALL 0x00123580 MOV RAX,RBX POP RBX RET
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */ TemplateToken * __thiscall minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2) { char *pcVar1; char *pcVar2; *(TemplateToken **)this = this + 0x10; switch(param_2) { case 0: pcVar2 = "text"; pcVar1 = ""; break; case 1: pcVar2 = "expression"; pcVar1 = ""; break; case 2: pcVar2 = "if"; pcVar1 = ""; break; case 3: pcVar2 = "else"; pcVar1 = ""; break; case 4: pcVar2 = "elif"; pcVar1 = ""; break; case 5: pcVar2 = "endif"; pcVar1 = ""; break; case 6: pcVar2 = "for"; pcVar1 = ""; break; case 7: pcVar2 = "endfor"; pcVar1 = ""; break; case 8: pcVar2 = "generation"; pcVar1 = ""; break; case 9: pcVar2 = "endgeneration"; pcVar1 = ""; break; case 10: pcVar2 = "set"; pcVar1 = ""; break; case 0xb: pcVar2 = "endset"; pcVar1 = ""; break; case 0xc: pcVar2 = "comment"; pcVar1 = ""; break; case 0xd: pcVar2 = "macro"; pcVar1 = ""; break; case 0xe: pcVar2 = "endmacro"; pcVar1 = ""; break; case 0xf: pcVar2 = "filter"; pcVar1 = ""; break; case 0x10: pcVar2 = "endfilter"; pcVar1 = ""; break; case 0x11: pcVar2 = "break"; pcVar1 = ""; break; case 0x12: pcVar2 = "continue"; pcVar1 = ""; break; default: pcVar2 = "Unknown"; pcVar1 = ""; } std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1); return this; }
47,361
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type)
monkey531[P]llama/common/minja.hpp
static std::string typeToString(Type t) { switch (t) { case Type::Text: return "text"; case Type::Expression: return "expression"; case Type::If: return "if"; case Type::Else: return "else"; case Type::Elif: return "elif"; case Type::EndIf: return "endif"; case Type::For: return "for"; case Type::EndFor: return "endfor"; case Type::Set: return "set"; case Type::EndSet: return "endset"; case Type::Comment: return "comment"; case Type::Macro: return "macro"; case Type::EndMacro: return "endmacro"; case Type::Filter: return "filter"; case Type::EndFilter: return "endfilter"; case Type::Generation: return "generation"; case Type::EndGeneration: return "endgeneration"; case Type::Break: return "break"; case Type::Continue: return "continue"; } return "Unknown"; }
O3
cpp
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type): pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) cmpl $0x12, %esi ja 0x9a3f3 movl %esi, %eax leaq 0x545b3(%rip), %rcx # 0xee84c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x5533c(%rip), %rsi # 0xef5e5 leaq 0x55339(%rip), %rdx # 0xef5e9 jmp 0x9a401 leaq 0x556b3(%rip), %rsi # 0xef96f leaq 0x556b5(%rip), %rdx # 0xef978 jmp 0x9a401 leaq 0x55673(%rip), %rsi # 0xef942 leaq 0x55674(%rip), %rdx # 0xef94a jmp 0x9a401 leaq 0x55636(%rip), %rsi # 0xef918 leaq 0x55635(%rip), %rdx # 0xef91e jmp 0x9a401 leaq 0x5552d(%rip), %rsi # 0xef822 leaq 0x5552a(%rip), %rdx # 0xef826 jmp 0x9a401 leaq 0x5669c(%rip), %rsi # 0xf09a4 leaq 0x5669c(%rip), %rdx # 0xf09ab jmp 0x9a401 leaq 0x55592(%rip), %rsi # 0xef8ad leaq 0x55598(%rip), %rdx # 0xef8ba jmp 0x9a401 leaq 0x4d47b(%rip), %rsi # 0xe77a9 leaq 0x4d476(%rip), %rdx # 0xe77ab jmp 0x9a401 leaq 0x55631(%rip), %rsi # 0xef972 leaq 0x55630(%rip), %rdx # 0xef978 jmp 0x9a401 leaq 0x554f4(%rip), %rsi # 0xef848 leaq 0x554f1(%rip), %rdx # 0xef84c jmp 0x9a401 leaq 0x5553f(%rip), %rsi # 0xef8a6 leaq 0x5553e(%rip), %rdx # 0xef8ac jmp 0x9a401 leaq 0x5569f(%rip), %rsi # 0xefa19 leaq 0x556a2(%rip), %rdx # 0xefa23 jmp 0x9a401 leaq 0x555ef(%rip), %rsi # 0xef979 leaq 0x555ed(%rip), %rdx # 0xef97e jmp 0x9a401 leaq 0x554b3(%rip), %rsi # 0xef84d leaq 0x554b1(%rip), %rdx # 0xef852 jmp 0x9a401 leaq 0x5559b(%rip), %rsi # 0xef945 leaq 0x55599(%rip), %rdx # 0xef94a jmp 0x9a401 leaq 0x554ef(%rip), %rsi # 0xef8a9 leaq 0x554eb(%rip), %rdx # 0xef8ac jmp 0x9a401 leaq 0x555b5(%rip), %rsi # 0xef97f leaq 0x555b6(%rip), %rdx # 0xef987 jmp 0x9a401 leaq 0x5a67c(%rip), %rsi # 0xf4a56 leaq 0x5a678(%rip), %rdx # 0xf4a59 jmp 0x9a401 leaq 0x554c6(%rip), %rsi # 0xef8b0 leaq 0x554c9(%rip), %rdx # 0xef8ba jmp 0x9a401 leaq 0x565b2(%rip), %rsi # 0xf09ac leaq 0x565b2(%rip), %rdx # 0xf09b3 movq %rbx, %rdi callq 0x224a4 movq %rbx, %rax popq %rbx retq
_ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax cmp esi, 12h; switch 19 cases ja def_9A2A0; jumptable 000000000009A2A0 default case mov eax, esi lea rcx, jpt_9A2A0 movsxd rax, ds:(jpt_9A2A0 - 0EE84Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9A2A2: lea rsi, aText; jumptable 000000000009A2A0 case 0 lea rdx, aText+4; "" jmp loc_9A401 loc_9A2B5: lea rsi, aEndfilter; jumptable 000000000009A2A0 case 16 lea rdx, aEndfilter+9; "" jmp loc_9A401 loc_9A2C8: lea rsi, aEndmacro; jumptable 000000000009A2A0 case 14 lea rdx, aEndmacro+8; "" jmp loc_9A401 loc_9A2DB: lea rsi, aEndset; jumptable 000000000009A2A0 case 11 lea rdx, aEndset+6; "" jmp loc_9A401 loc_9A2EE: lea rsi, aElif; jumptable 000000000009A2A0 case 4 lea rdx, aElif+4; "" jmp loc_9A401 loc_9A301: lea rsi, aComment; jumptable 000000000009A2A0 case 12 lea rdx, aComment+7; "" jmp loc_9A401 loc_9A314: lea rsi, aEndgeneration; jumptable 000000000009A2A0 case 9 lea rdx, aEndgeneration+0Dh; "" jmp loc_9A401 loc_9A327: lea rsi, aIf+1; jumptable 000000000009A2A0 case 2 lea rdx, aIf+3; "" jmp loc_9A401 loc_9A33A: lea rsi, aEndfilter+3; jumptable 000000000009A2A0 case 15 lea rdx, aEndfilter+9; "" jmp loc_9A401 loc_9A34D: lea rsi, aElse; jumptable 000000000009A2A0 case 3 lea rdx, aElse+4; "" jmp loc_9A401 loc_9A360: lea rsi, aEndfor; jumptable 000000000009A2A0 case 7 lea rdx, aEndfor+6; "" jmp loc_9A401 loc_9A373: lea rsi, aExpectedLeftSi_0+24h; jumptable 000000000009A2A0 case 1 lea rdx, aExpectedLeftSi_0+2Eh; "" jmp short loc_9A401 loc_9A383: lea rsi, aBreak; jumptable 000000000009A2A0 case 17 lea rdx, aBreak+5; "" jmp short loc_9A401 loc_9A393: lea rsi, aEndif; jumptable 000000000009A2A0 case 5 lea rdx, aEndif+5; "" jmp short loc_9A401 loc_9A3A3: lea rsi, aEndmacro+3; jumptable 000000000009A2A0 case 13 lea rdx, aEndmacro+8; "" jmp short loc_9A401 loc_9A3B3: lea rsi, aEndfor+3; jumptable 000000000009A2A0 case 6 lea rdx, aEndfor+6; "" jmp short loc_9A401 loc_9A3C3: lea rsi, aContinue; jumptable 000000000009A2A0 case 18 lea rdx, aContinue+8; "" jmp short loc_9A401 loc_9A3D3: lea rsi, aAtLeastOneOfMi+2Fh; jumptable 000000000009A2A0 case 10 lea rdx, aAtLeastOneOfMi+32h; "" jmp short loc_9A401 loc_9A3E3: lea rsi, aEndgeneration+3; jumptable 000000000009A2A0 case 8 lea rdx, aEndgeneration+0Dh; "" jmp short loc_9A401 def_9A2A0: lea rsi, aUnknown; jumptable 000000000009A2A0 default case lea rdx, aUnknown+7; "" loc_9A401: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx *a1 = a1 + 2; switch ( a2 ) { case 0: v2 = "text"; v3 = (char *)""; break; case 1: v2 = (char *)"expression"; v3 = (char *)""; break; case 2: v2 = "if"; v3 = ""; break; case 3: v2 = "else"; v3 = ""; break; case 4: v2 = "elif"; v3 = ""; break; case 5: v2 = "endif"; v3 = ""; break; case 6: v2 = "for"; v3 = ""; break; case 7: v2 = "endfor"; v3 = ""; break; case 8: v2 = "generation"; v3 = ""; break; case 9: v2 = "endgeneration"; v3 = ""; break; case 10: v2 = (char *)"set"; v3 = (char *)""; break; case 11: v2 = "endset"; v3 = ""; break; case 12: v2 = "comment"; v3 = ""; break; case 13: v2 = "macro"; v3 = ""; break; case 14: v2 = "endmacro"; v3 = ""; break; case 15: v2 = "filter"; v3 = ""; break; case 16: v2 = "endfilter"; v3 = ""; break; case 17: v2 = "break"; v3 = ""; break; case 18: v2 = "continue"; v3 = ""; break; default: v2 = "Unknown"; v3 = ""; break; } std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
typeToString[abi:cxx11]: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX CMP ESI,0x12 JA 0x0019a3f3 MOV EAX,ESI LEA RCX,[0x1ee84c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1ef5e5] LEA RDX,[0x1ef5e9] JMP 0x0019a401 caseD_10: LEA RSI,[0x1ef96f] LEA RDX,[0x1ef978] JMP 0x0019a401 caseD_e: LEA RSI,[0x1ef942] LEA RDX,[0x1ef94a] JMP 0x0019a401 caseD_b: LEA RSI,[0x1ef918] LEA RDX,[0x1ef91e] JMP 0x0019a401 caseD_4: LEA RSI,[0x1ef822] LEA RDX,[0x1ef826] JMP 0x0019a401 caseD_c: LEA RSI,[0x1f09a4] LEA RDX,[0x1f09ab] JMP 0x0019a401 caseD_9: LEA RSI,[0x1ef8ad] LEA RDX,[0x1ef8ba] JMP 0x0019a401 caseD_2: LEA RSI,[0x1e77a9] LEA RDX,[0x1e77ab] JMP 0x0019a401 caseD_f: LEA RSI,[0x1ef972] LEA RDX,[0x1ef978] JMP 0x0019a401 caseD_3: LEA RSI,[0x1ef848] LEA RDX,[0x1ef84c] JMP 0x0019a401 caseD_7: LEA RSI,[0x1ef8a6] LEA RDX,[0x1ef8ac] JMP 0x0019a401 caseD_1: LEA RSI,[0x1efa19] LEA RDX,[0x1efa23] JMP 0x0019a401 caseD_11: LEA RSI,[0x1ef979] LEA RDX,[0x1ef97e] JMP 0x0019a401 caseD_5: LEA RSI,[0x1ef84d] LEA RDX,[0x1ef852] JMP 0x0019a401 caseD_d: LEA RSI,[0x1ef945] LEA RDX,[0x1ef94a] JMP 0x0019a401 caseD_6: LEA RSI,[0x1ef8a9] LEA RDX,[0x1ef8ac] JMP 0x0019a401 caseD_12: LEA RSI,[0x1ef97f] LEA RDX,[0x1ef987] JMP 0x0019a401 caseD_a: LEA RSI,[0x1f4a56] LEA RDX,[0x1f4a59] JMP 0x0019a401 caseD_8: LEA RSI,[0x1ef8b0] LEA RDX,[0x1ef8ba] JMP 0x0019a401 default: LEA RSI,[0x1f09ac] LEA RDX,[0x1f09b3] LAB_0019a401: MOV RDI,RBX CALL 0x001224a4 MOV RAX,RBX POP RBX RET
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */ TemplateToken * __thiscall minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2) { char *pcVar1; char *pcVar2; *(TemplateToken **)this = this + 0x10; switch(param_2) { case 0: pcVar2 = "text"; pcVar1 = ""; break; case 1: pcVar2 = "expression"; pcVar1 = ""; break; case 2: pcVar2 = "if"; pcVar1 = ""; break; case 3: pcVar2 = "else"; pcVar1 = ""; break; case 4: pcVar2 = "elif"; pcVar1 = ""; break; case 5: pcVar2 = "endif"; pcVar1 = ""; break; case 6: pcVar2 = "for"; pcVar1 = ""; break; case 7: pcVar2 = "endfor"; pcVar1 = ""; break; case 8: pcVar2 = "generation"; pcVar1 = ""; break; case 9: pcVar2 = "endgeneration"; pcVar1 = ""; break; case 10: pcVar2 = "set"; pcVar1 = ""; break; case 0xb: pcVar2 = "endset"; pcVar1 = ""; break; case 0xc: pcVar2 = "comment"; pcVar1 = ""; break; case 0xd: pcVar2 = "macro"; pcVar1 = ""; break; case 0xe: pcVar2 = "endmacro"; pcVar1 = ""; break; case 0xf: pcVar2 = "filter"; pcVar1 = ""; break; case 0x10: pcVar2 = "endfilter"; pcVar1 = ""; break; case 0x11: pcVar2 = "break"; pcVar1 = ""; break; case 0x12: pcVar2 = "continue"; pcVar1 = ""; break; default: pcVar2 = "Unknown"; pcVar1 = ""; } std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1); return this; }
47,362
nglog::RemoveLogSink(nglog::LogSink*)
ng-log[P]ng-log/src/logging.cc
void RemoveLogSink(LogSink* destination) { LogDestination::RemoveLogSink(destination); }
O1
cpp
nglog::RemoveLogSink(nglog::LogSink*): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) leaq 0x242a0(%rip), %rdi # 0x2fb58 callq 0x7820 cmpl $0x23, %eax je 0xb932 movq 0x24287(%rip), %r15 # 0x2fb50 testq %r15, %r15 je 0xb91c movq (%r15), %rdi movq 0x8(%r15), %rsi leaq 0x8(%rsp), %rdx callq 0x11f15 movq %rax, %rbx movq 0x24267(%rip), %rax # 0x2fb50 movq 0x8(%rax), %r14 cmpq %r14, %rbx je 0xb91c movq 0x8(%r15), %rdx subq %r14, %rdx je 0xb906 movq %rbx, %rdi movq %r14, %rsi callq 0x78b0 movq 0x8(%r15), %rax movq %rax, %rcx subq %r14, %rcx addq %rcx, %rbx cmpq %rbx, %rax je 0xb91c movq %rbx, 0x8(%r15) leaq 0x24235(%rip), %rdi # 0x2fb58 callq 0x7710 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movl $0x23, %edi callq 0x7350 movq %rax, %rbx leaq 0x24212(%rip), %rdi # 0x2fb58 callq 0x7710 movq %rbx, %rdi callq 0x7970
_ZN5nglog13RemoveLogSinkEPNS_7LogSinkE: push r15 push r14 push rbx sub rsp, 10h mov [rsp+28h+var_20], rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_wrlock cmp eax, 23h ; '#' jz short loc_B932 mov r15, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test r15, r15 jz short loc_B91C mov rdi, [r15] mov rsi, [r15+8] lea rdx, [rsp+28h+var_20] call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS4_EEET_SE_SE_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>) mov rbx, rax mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov r14, [rax+8] cmp rbx, r14 jz short loc_B91C mov rdx, [r15+8] sub rdx, r14 jz short loc_B906 mov rdi, rbx mov rsi, r14 call _memmove loc_B906: mov rax, [r15+8] mov rcx, rax sub rcx, r14 add rbx, rcx cmp rax, rbx jz short loc_B91C mov [r15+8], rbx loc_B91C: lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock add rsp, 10h pop rbx pop r14 pop r15 retn loc_B932: mov edi, 23h ; '#'; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::RemoveLogSink(nglog *this, nglog::LogSink *a2) { long long v2; // r15 long long v3; // rbx long long v4; // r14 long long v5; // rdx long long v6; // rbx nglog *v8; // [rsp+8h] [rbp-20h] BYREF v8 = this; if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 ) std::__throw_system_error(35); v2 = nglog::LogDestination::sinks_; if ( nglog::LogDestination::sinks_ ) { v3 = std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>( *(_QWORD *)nglog::LogDestination::sinks_, *(_QWORD *)(nglog::LogDestination::sinks_ + 8), &v8); v4 = *(_QWORD *)(nglog::LogDestination::sinks_ + 8); if ( v3 != v4 ) { v5 = *(_QWORD *)(v2 + 8) - v4; if ( v5 ) memmove(v3, *(_QWORD *)(nglog::LogDestination::sinks_ + 8), v5); v6 = *(_QWORD *)(v2 + 8) - v4 + v3; if ( *(_QWORD *)(v2 + 8) != v6 ) *(_QWORD *)(v2 + 8) = v6; } } return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); }
RemoveLogSink: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[0x12fb58] CALL 0x00107820 CMP EAX,0x23 JZ 0x0010b932 MOV R15,qword ptr [0x0012fb50] TEST R15,R15 JZ 0x0010b91c MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] LAB_0010b8d5: LEA RDX,[RSP + 0x8] CALL 0x00111f15 LAB_0010b8df: MOV RBX,RAX MOV RAX,qword ptr [0x0012fb50] MOV R14,qword ptr [RAX + 0x8] CMP RBX,R14 JZ 0x0010b91c MOV RDX,qword ptr [R15 + 0x8] SUB RDX,R14 JZ 0x0010b906 MOV RDI,RBX MOV RSI,R14 CALL 0x001078b0 LAB_0010b906: MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RAX SUB RCX,R14 ADD RBX,RCX CMP RAX,RBX JZ 0x0010b91c MOV qword ptr [R15 + 0x8],RBX LAB_0010b91c: LEA RDI,[0x12fb58] CALL 0x00107710 ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_0010b932: MOV EDI,0x23 CALL 0x00107350
/* nglog::RemoveLogSink(nglog::LogSink*) */ void nglog::RemoveLogSink(LogSink *param_1) { void *__src; int8 *puVar1; int iVar2; void *__dest; long lVar3; LogSink *local_20; local_20 = param_1; iVar2 = pthread_rwlock_wrlock((pthread_rwlock_t *)LogDestination::sink_mutex_); puVar1 = LogDestination::sinks_; if (iVar2 != 0x23) { if (LogDestination::sinks_ != (int8 *)0x0) { /* try { // try from 0010b8d5 to 0010b8de has its CatchHandler @ 0010b93c */ __dest = (void *)std:: __remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink*const>> (*LogDestination::sinks_,LogDestination::sinks_[1],&local_20); __src = (void *)LogDestination::sinks_[1]; if (__dest != __src) { if (puVar1[1] - (long)__src != 0) { memmove(__dest,__src,puVar1[1] - (long)__src); } lVar3 = (long)__dest + (puVar1[1] - (long)__src); if (puVar1[1] != lVar3) { puVar1[1] = lVar3; } } } pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(0x23); }
47,363
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x2331f0(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x8d0e2 leaq 0x2331a2(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xf4210 movl %eax, -0x34(%rbp) leaq 0x233171(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x8d0fb movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xf4210 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open_1: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_8D0E2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_8D0FB loc_8D0E2: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_8D0FB: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open_1( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8); if ( v8 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13); v9 = my_open(v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0018d0e2 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001f4210 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0018d0fb LAB_0018d0e2: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001f4210 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0018d0fb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
47,364
my_b_safe_write
eloqsql/mysys/mf_iocache.c
int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { /* Sasha: We are not writing this with the ? operator to avoid hitting a possible compiler bug. At least gcc 2.95 cannot deal with several layers of ternary operators that evaluated comma(,) operator expressions inside - I do have a test case if somebody wants it */ if (info->type == SEQ_READ_APPEND) return my_b_append(info, Buffer, Count); return my_b_write(info, Buffer, Count); }
O3
c
my_b_safe_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rdi, %r14 cmpl $0x3, 0xb0(%rdi) jne 0x9606e movq %r14, %rdi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x95e16 movq 0x40(%r14), %rdi leaq (%rdi,%rbx), %rax cmpq 0x48(%r14), %rax jbe 0x9608b movq %r14, %rdi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x9560f testq %rbx, %rbx je 0x9609c movq %rbx, %rdx callq 0x29080 addq %rbx, 0x40(%r14) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
my_b_safe_write: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rdi cmp dword ptr [rdi+0B0h], 3 jnz short loc_9606E mov rdi, r14 mov rdx, rbx pop rbx pop r14 pop rbp jmp my_b_append loc_9606E: mov rdi, [r14+40h] lea rax, [rdi+rbx] cmp rax, [r14+48h] jbe short loc_9608B mov rdi, r14 mov rdx, rbx pop rbx pop r14 pop rbp jmp _my_b_write loc_9608B: test rbx, rbx jz short loc_9609C mov rdx, rbx call _memcpy add [r14+40h], rbx loc_9609C: xor eax, eax pop rbx pop r14 pop rbp retn
long long my_b_safe_write(long long a1, long long a2, unsigned long long a3) { long long v6; // rdi if ( *(_DWORD *)(a1 + 176) == 3 ) return my_b_append(a1, a2, a3); v6 = *(_QWORD *)(a1 + 64); if ( v6 + a3 > *(_QWORD *)(a1 + 72) ) return my_b_write(a1, a2, a3); if ( a3 ) { memcpy(v6, a2, a3); *(_QWORD *)(a1 + 64) += a3; } return 0LL; }
my_b_safe_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RDI CMP dword ptr [RDI + 0xb0],0x3 JNZ 0x0019606e MOV RDI,R14 MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x00195e16 LAB_0019606e: MOV RDI,qword ptr [R14 + 0x40] LEA RAX,[RDI + RBX*0x1] CMP RAX,qword ptr [R14 + 0x48] JBE 0x0019608b MOV RDI,R14 MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x0019560f LAB_0019608b: TEST RBX,RBX JZ 0x0019609c MOV RDX,RBX CALL 0x00129080 ADD qword ptr [R14 + 0x40],RBX LAB_0019609c: XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 my_b_safe_write(long param_1,void *param_2,size_t param_3) { int8 uVar1; if (*(int *)(param_1 + 0xb0) == 3) { uVar1 = my_b_append(param_1,param_2,param_3); return uVar1; } if (*(ulong *)(param_1 + 0x48) < (long)*(void **)(param_1 + 0x40) + param_3) { uVar1 = _my_b_write(param_1,param_2,param_3); return uVar1; } if (param_3 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3; } return 0; }
47,365
fill_and_get_bits
eloqsql/storage/myisam/mi_packrec.c
static uint fill_and_get_bits(MI_BIT_BUFF *bit_buff, uint count) { uint tmp; count-=bit_buff->bits; tmp=(bit_buff->current_byte & mask[bit_buff->bits]) << count; fill_buffer(bit_buff); bit_buff->bits=BITS_SAVED - count; return tmp+(bit_buff->current_byte >> (BITS_SAVED - count)); }
O0
c
fill_and_get_bits: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %ecx movl -0xc(%rbp), %eax subl %ecx, %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x4(%rcx), %ecx movl %ecx, %edx leaq 0x204abc(%rip), %rcx # 0x2bf640 andl (%rcx,%rdx,4), %eax movl -0xc(%rbp), %ecx shll %cl, %eax movl %eax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0xbc3a0 movl $0x20, %ecx subl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rcx movl (%rcx), %edx movl $0x20, %ecx subl -0xc(%rbp), %ecx shrl %cl, %edx movl %edx, %ecx addl %ecx, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
fill_and_get_bits_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov ecx, [rax+4] mov eax, [rbp+var_C] sub eax, ecx mov [rbp+var_C], eax mov rax, [rbp+var_8] mov eax, [rax] mov rcx, [rbp+var_8] mov ecx, [rcx+4] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov ecx, [rbp+var_C] shl eax, cl mov [rbp+var_10], eax mov rdi, [rbp+var_8] call fill_buffer_0 mov ecx, 20h ; ' ' sub ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+4], ecx mov eax, [rbp+var_10] mov rcx, [rbp+var_8] mov edx, [rcx] mov ecx, 20h ; ' ' sub ecx, [rbp+var_C] shr edx, cl mov ecx, edx add eax, ecx add rsp, 10h pop rbp retn
long long fill_and_get_bits_0(_DWORD *a1, int a2) { int v3; // [rsp+0h] [rbp-10h] int v4; // [rsp+4h] [rbp-Ch] v4 = a2 - a1[1]; v3 = (mask_0[a1[1]] & *a1) << v4; fill_buffer_0(a1); a1[1] = 32 - v4; return (unsigned int)((*a1 >> (32 - v4)) + v3); }
fill_and_get_bits: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x4] MOV EAX,dword ptr [RBP + -0xc] SUB EAX,ECX MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x4] MOV EDX,ECX LEA RCX,[0x3bf640] AND EAX,dword ptr [RCX + RDX*0x4] MOV ECX,dword ptr [RBP + -0xc] SHL EAX,CL MOV dword ptr [RBP + -0x10],EAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001bc3a0 MOV ECX,0x20 SUB ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV EAX,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RCX] MOV ECX,0x20 SUB ECX,dword ptr [RBP + -0xc] SHR EDX,CL MOV ECX,EDX ADD EAX,ECX ADD RSP,0x10 POP RBP RET
int fill_and_get_bits(uint *param_1,int param_2) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; uVar1 = param_1[1]; uVar2 = *param_1; uVar3 = *(uint *)(mask + (ulong)param_1[1] * 4); bVar4 = (byte)(param_2 - uVar1); fill_buffer(param_1); param_1[1] = 0x20 - (param_2 - uVar1); return ((uVar2 & uVar3) << (bVar4 & 0x1f)) + (*param_1 >> (0x20 - bVar4 & 0x1f)); }
47,366
ma_crypt_index_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_index_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint block_size= share->block_size; const uint page_used= _ma_get_page_used(share, args->page); if (res || page_used < share->keypage_header || page_used >= block_size - CRC_SIZE) { res= 1; my_errno= HA_ERR_DECRYPTION_FAILED; } else { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= share->keypage_header; const uint tail= CRC_SIZE; const uint32 key_version= _ma_get_key_version(share, src); /* page_used includes header (but not trailer) */ const uint size= page_used - head; /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size, pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + block_size - tail, src + block_size - tail, tail); /* 4 clear key version to get correct crc */ _ma_store_key_version(share, dst, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_index(res, args); }
O0
c
ma_crypt_index_post_read_hook: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq -0x18(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x20(%rbp) cmpl $0x0, -0x4(%rbp) jne 0x89837 movl -0x20(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x744(%rcx), %eax jb 0x89837 movl -0x20(%rbp), %eax movl -0x1c(%rbp), %ecx subl $0x4, %ecx cmpl %ecx, %eax jb 0x8984e movl $0x1, -0x4(%rbp) callq 0xf6080 movl $0xc0, (%rax) jmp 0x89966 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x34(%rbp) movq -0x28(%rbp), %rax movzbl (%rax), %eax movq -0x28(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x28(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x28(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movl 0x744(%rax), %eax movl %eax, -0x44(%rbp) movl $0x4, -0x48(%rbp) movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx movl -0x8(%rax,%rcx), %eax movl %eax, -0x4c(%rbp) movl -0x20(%rbp), %eax subl -0x44(%rbp), %eax movl %eax, -0x50(%rbp) movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x44(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x28(%rbp), %rdx movl -0x44(%rbp), %eax addq %rax, %rdx movq -0x30(%rbp), %rcx movl -0x44(%rbp), %eax addq %rax, %rcx movl -0x50(%rbp), %r8d movl -0x34(%rbp), %r9d movq -0x40(%rbp), %r10 movl -0x4c(%rbp), %eax movq %r10, (%rsp) movl %eax, 0x8(%rsp) callq 0x89c80 movl %eax, -0x4(%rbp) movq -0x30(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax addq $-0x8, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movl $0x0, (%rax) jmp 0x89966 movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x899a0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x60(%rbp), %rdi callq 0xf3ba0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x41400 addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_index_post_read_hook: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rbp+var_18] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_20], eax cmp [rbp+var_4], 0 jnz short loc_89837 mov eax, [rbp+var_20] mov rcx, [rbp+var_18] cmp eax, [rcx+744h] jb short loc_89837 mov eax, [rbp+var_20] mov ecx, [rbp+var_1C] sub ecx, 4 cmp eax, ecx jb short loc_8984E loc_89837: mov [rbp+var_4], 1 call _my_thread_var mov dword ptr [rax], 0C0h jmp loc_89966 loc_8984E: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_34], eax mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_28] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_18] mov eax, [rax+744h] mov [rbp+var_44], eax mov [rbp+var_48], 4 mov rax, [rbp+var_28] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] mov eax, [rax+rcx-8] mov [rbp+var_4C], eax mov eax, [rbp+var_20] sub eax, [rbp+var_44] mov [rbp+var_50], eax mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] mov eax, [rbp+var_44] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_28] mov eax, [rbp+var_44] add rdx, rax mov rcx, [rbp+var_30] mov eax, [rbp+var_44] add rcx, rax mov r8d, [rbp+var_50] mov r9d, [rbp+var_34] mov r10, [rbp+var_40] mov eax, [rbp+var_4C] mov [rsp+70h+var_70], r10 mov [rsp+70h+var_68], eax call ma_decrypt mov [rbp+var_4], eax mov rax, [rbp+var_30] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_28] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_30] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] add rax, rcx add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_58], rax mov rax, [rbp+var_58] mov dword ptr [rax], 0 jmp short $+2 loc_89966: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_899A0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rdi, [rbp+var_60] call my_free loc_899A0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call maria_page_crc_check_index add rsp, 70h pop rbp retn
char ma_crypt_index_post_read_hook(long long a1, char *a2) { long long v3; // [rsp+10h] [rbp-60h] int v4; // [rsp+24h] [rbp-4Ch] unsigned int v5; // [rsp+2Ch] [rbp-44h] unsigned long long v6; // [rsp+30h] [rbp-40h] int v7; // [rsp+3Ch] [rbp-34h] long long v8; // [rsp+40h] [rbp-30h] unsigned __int16 *v9; // [rsp+48h] [rbp-28h] unsigned int v10; // [rsp+50h] [rbp-20h] unsigned int v11; // [rsp+54h] [rbp-1Ch] long long v12; // [rsp+58h] [rbp-18h] int v13; // [rsp+6Ch] [rbp-4h] v12 = *((_QWORD *)a2 + 2); v11 = *(_DWORD *)(v12 + 1980); v10 = _byteswap_ushort(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v12 + 1860) - 2LL)); if ( (_DWORD)a1 || v10 < *(_DWORD *)(v12 + 1860) || v10 >= v11 - 4 ) { v13 = 1; *(_DWORD *)my_thread_var(a1, a2) = 192; } else { v9 = *(unsigned __int16 **)a2; v8 = *((_QWORD *)a2 + 3); v7 = *((_QWORD *)a2 + 1); v6 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32); v5 = *(_DWORD *)(v12 + 1860); v4 = *(_DWORD *)(*(_QWORD *)a2 + v5 - 8LL); memcpy(v8, *(_QWORD *)a2, v5); v13 = ma_decrypt(v12, *(_QWORD *)(v12 + 3104), v5 + (unsigned int)v9, v5 + (unsigned int)v8, v10 - v5, v7, v6, v4); *(_DWORD *)(v8 + v11 - 4) = *(_DWORD *)((char *)v9 + v11 - 4); *(_DWORD *)(*(unsigned int *)(v12 + 1860) + v8 - 8) = 0; } if ( *((_QWORD *)a2 + 3) ) { v3 = *(_QWORD *)a2; *(_QWORD *)a2 = *((_QWORD *)a2 + 3); *((_QWORD *)a2 + 3) = 0LL; my_free(v3); } return maria_page_crc_check_index(v13, (long long *)a2); }
ma_crypt_index_post_read_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x20],EAX CMP dword ptr [RBP + -0x4],0x0 JNZ 0x00189837 MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x744] JC 0x00189837 MOV EAX,dword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x1c] SUB ECX,0x4 CMP EAX,ECX JC 0x0018984e LAB_00189837: MOV dword ptr [RBP + -0x4],0x1 CALL 0x001f6080 MOV dword ptr [RAX],0xc0 JMP 0x00189966 LAB_0018984e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x744] MOV dword ptr [RBP + -0x44],EAX MOV dword ptr [RBP + -0x48],0x4 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] MOV EAX,dword ptr [RAX + RCX*0x1 + -0x8] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x20] SUB EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x50],EAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x44] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x44] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x34] MOV R10,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x4c] MOV qword ptr [RSP],R10 MOV dword ptr [RSP + 0x8],EAX CALL 0x00189c80 MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX ADD RAX,-0x8 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],0x0 JMP 0x00189966 LAB_00189966: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x001899a0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RBP + -0x60] CALL 0x001f3ba0 LAB_001899a0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00141400 ADD RSP,0x70 POP RBP RET
void ma_crypt_index_post_read_hook(int param_1,long *param_2) { uint uVar1; int4 uVar2; uint uVar3; int4 uVar4; long lVar5; int3 *__src; void *__dest; ulong uVar6; int3 uVar7; uint uVar8; int4 *puVar9; int4 local_c; lVar5 = param_2[2]; uVar1 = *(uint *)(lVar5 + 0x7bc); uVar8 = (uint)CONCAT11(*(int1 *)(*param_2 + -2 + (ulong)*(uint *)(lVar5 + 0x744)), *(int1 *)(*param_2 + -1 + (ulong)*(uint *)(lVar5 + 0x744))); if (((param_1 == 0) && (*(uint *)(lVar5 + 0x744) <= uVar8)) && (uVar8 < uVar1 - 4)) { __src = (int3 *)*param_2; __dest = (void *)param_2[3]; uVar6 = param_2[1]; uVar7 = *__src; uVar2 = *(int4 *)((long)__src + 3); uVar3 = *(uint *)(lVar5 + 0x744); uVar4 = *(int4 *)((long)__src + ((ulong)*(uint *)(lVar5 + 0x744) - 8)); memcpy(__dest,__src,(ulong)uVar3); local_c = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + (ulong)uVar3, (long)__dest + (ulong)uVar3,uVar8 - uVar3,uVar6 & 0xffffffff, (ulong)CONCAT34(uVar7,uVar2),uVar4); *(int4 *)((long)__dest + ((ulong)uVar1 - 4)) = *(int4 *)((long)__src + ((ulong)uVar1 - 4)); *(int4 *)((long)__dest + ((ulong)*(uint *)(lVar5 + 0x744) - 8)) = 0; } else { local_c = 1; puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0xc0; } if (param_2[3] != 0) { lVar5 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar5); } maria_page_crc_check_index(local_c,param_2); return; }
47,367
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const char * value_hint_2, const std::string & help, void (*handler)(common_params & params, const std::string &, const std::string &) ) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {}
O2
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x8(%rsp) movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x14(%rsp), %rsi andl $0x0, (%rsi) pushq $0x1 popq %rdx leaq 0x7(%rsp), %rcx leaq 0x6(%rsp), %r8 callq 0x3c2da leaq 0x38(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) andq $0x0, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) andq $0x0, 0x58(%rbx) leaq 0x60(%rbx), %rbp movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x5(%rsp), %rcx movq %rbp, %rdi callq 0x3c320 movq %r13, 0x78(%rbx) movq %r12, 0x80(%rbx) andq $0x0, 0x88(%rbx) leaq 0x90(%rbx), %rdi movq %r15, %rsi callq 0x23bf0 movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq 0x8(%rsp), %rax movq %rax, 0xc8(%rbx) andq $0x0, 0xd0(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbp, %rdi callq 0x3c65c jmp 0x390fb movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x3c3a4 movq %rbx, %rdi callq 0x3c3a4 movq %r14, %rdi callq 0x23f70
_ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_40], r9 mov r15, r8 mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rsi, [rsp+48h+var_34] and dword ptr [rsi], 0 push 1 pop rdx lea rcx, [rsp+48h+var_41] lea r8, [rsp+48h+var_42] call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 and qword ptr [rbx+40h], 0 mov [rbx+48h], rax mov [rbx+50h], rax and qword ptr [rbx+58h], 0 lea rbp, [rbx+60h] mov rsi, [r14] mov rdx, [r14+8] lea rcx, [rsp+48h+var_43] mov rdi, rbp call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r13 mov [rbx+80h], r12 and qword ptr [rbx+88h], 0 lea rdi, [rbx+90h] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov rax, [rsp+48h+var_40] mov [rbx+0C8h], rax and qword ptr [rbx+0D0h], 0 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbp call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base() jmp short loc_390FB mov r14, rax loc_390FB: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax char v10; // [rsp+5h] [rbp-43h] BYREF char v11; // [rsp+6h] [rbp-42h] BYREF char v12; // [rsp+7h] [rbp-41h] BYREF long long v13; // [rsp+8h] [rbp-40h] _DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF v13 = a6; v14[0] = 0; std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11); *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v10); *(_QWORD *)(a1 + 120) = a3; *(_QWORD *)(a1 + 128) = a4; *(_QWORD *)(a1 + 136) = 0LL; std::string::basic_string(a1 + 144, a5); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; result = v13; *(_QWORD *)(a1 + 200) = v13; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x14] AND dword ptr [RSI],0x0 PUSH 0x1 POP RDX LEA RCX,[RSP + 0x7] LEA R8,[RSP + 0x6] CALL 0x0013c2da LEA RAX,[RBX + 0x38] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 AND qword ptr [RBX + 0x40],0x0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX AND qword ptr [RBX + 0x58],0x0 LEA RBP,[RBX + 0x60] MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00139088: LEA RCX,[RSP + 0x5] MOV RDI,RBP CALL 0x0013c320 MOV qword ptr [RBX + 0x78],R13 MOV qword ptr [RBX + 0x80],R12 AND qword ptr [RBX + 0x88],0x0 LEA RDI,[RBX + 0x90] LAB_001390af: MOV RSI,R15 CALL 0x00123bf0 LAB_001390b7: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0xc8],RAX AND qword ptr [RBX + 0xd0],0x0 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4, _func_void_common_params_ptr_string_ptr_string_ptr *param_5) { int1 local_43; int1 local_42; int1 local_41; _func_void_common_params_ptr_string_ptr_string_ptr *local_40; int4 local_34; local_34 = 0; local_40 = param_5; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_34,1,&local_41,&local_42); *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00139088 to 00139094 has its CatchHandler @ 001390f8 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_43); *(char **)(this + 0x78) = param_2; *(char **)(this + 0x80) = param_3; *(int8 *)(this + 0x88) = 0; /* try { // try from 001390af to 001390b6 has its CatchHandler @ 001390eb */ std::__cxx11::string::string((string *)(this + 0x90),param_4); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40; *(int8 *)(this + 0xd0) = 0; return; }
47,368
my_hash_free
eloqsql/mysys/hash.c
void my_hash_free(HASH *hash) { DBUG_ENTER("my_hash_free"); DBUG_PRINT("enter",("hash:%p elements: %ld", hash, hash->records)); my_hash_free_elements(hash); hash->free= 0; delete_dynamic(&hash->array); hash->blength= 0; DBUG_VOID_RETURN; }
O3
c
my_hash_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x4e679 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x4e679 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x4e669 xorl %r14d, %r14d movq %r14, 0x60(%rbx) leaq 0x28(%rbx), %rdi callq 0x4c868 movq %r14, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_free: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_4E679 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_4E679 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_4E669: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_4E669 loc_4E679: xor r14d, r14d mov [rbx+60h], r14 lea rdi, [rbx+28h] call delete_dynamic mov [rbx+10h], r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_free(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; (*(void ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_QWORD *)(a1 + 96) = 0LL; result = delete_dynamic((long long *)(a1 + 40)); *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x0014e679 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x0014e679 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_0014e669: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x0014e669 LAB_0014e679: XOR R14D,R14D MOV qword ptr [RBX + 0x60],R14 LEA RDI,[RBX + 0x28] CALL 0x0014c868 MOV qword ptr [RBX + 0x10],R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_free(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
47,369
my_open_parent_dir_nosymlinks
eloqsql/mysys/my_symlink.c
const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd) { char buf[FN_REFLEN + 1]; char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf)); int fd, dfd= -1; if (*end) { errno= ENAMETOOLONG; return NULL; } if (*s != '/') /* not an absolute path */ { errno= ENOENT; return NULL; } for (;;) { if (*e == '/') /* '//' in the path */ { errno= ENOENT; goto err; } while (*e && *e != '/') e++; *e= 0; if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3)) { errno= ENOENT; goto err; } if (++e >= end) { *pdfd= dfd; return pathname + (s - buf); } fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC); if (fd < 0) goto err; if (dfd >= 0) close(dfd); dfd= fd; s= e; } err: if (dfd >= 0) close(dfd); return NULL; }
O3
c
my_open_parent_dir_nosymlinks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x240(%rbp), %r15 movl $0x201, %edx # imm = 0x201 movq %r15, %rdi movq %rbx, %rsi callq 0xd9e14 cmpb $0x0, (%rax) je 0xa3cef callq 0x29770 movl $0x24, (%rax) jmp 0xa3dc6 cmpb $0x2f, -0x240(%rbp) jne 0xa3d9b movq %rax, %r12 movq %r14, -0x248(%rbp) movb -0x23f(%rbp), %al movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpb $0x2f, %al je 0xa3dab leaq -0x23f(%rbp), %rcx movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %r15, %rsi incq %rcx movq %rcx, %r15 testb %al, %al je 0xa3d44 movzbl %al, %eax cmpl $0x2f, %eax je 0xa3d44 movb (%r15), %al incq %r15 jmp 0xa3d30 movb $0x0, -0x1(%r15) cmpw $0x2e, (%rsi) je 0xa3da8 movzwl (%rsi), %eax xorl $0x2e2e, %eax # imm = 0x2E2E movzbl 0x2(%rsi), %ecx orw %ax, %cx je 0xa3da8 cmpq %r12, %r15 jae 0xa3dec movl %r14d, %edi movl $0x2a0000, %edx # imm = 0x2A0000 xorl %eax, %eax callq 0x29530 testl %eax, %eax js 0xa3db9 movl %eax, %r13d testl %r14d, %r14d js 0xa3d8c movl %r14d, %edi callq 0x29180 movb (%r15), %al movl %r13d, %r14d movq %r15, %rcx cmpb $0x2f, %al jne 0xa3d27 jmp 0xa3dab callq 0x29770 movl $0x2, (%rax) jmp 0xa3dc6 movl %r14d, %r13d callq 0x29770 movl $0x2, (%rax) movl %r13d, %r14d testl %r14d, %r14d js 0xa3dc6 movl %r14d, %edi callq 0x29180 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa3e05 movq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x248(%rbp), %rax movl %r14d, (%rax) leaq -0x240(%rbp), %rax subq %rax, %rsi addq %rsi, %rbx jmp 0xa3dc8 callq 0x29240 nop
my_open_parent_dir_nosymlinks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_240] mov edx, 201h mov rdi, r15 mov rsi, rbx call strnmov cmp byte ptr [rax], 0 jz short loc_A3CEF call ___errno_location mov dword ptr [rax], 24h ; '$' jmp loc_A3DC6 loc_A3CEF: cmp [rbp+var_240], 2Fh ; '/' jnz loc_A3D9B mov r12, rax mov [rbp+var_248], r14 mov al, [rbp+var_23F] mov r13d, 0FFFFFFFFh cmp al, 2Fh ; '/' jz loc_A3DAB lea rcx, [rbp+var_23F] mov r14d, 0FFFFFFFFh loc_A3D27: mov rsi, r15 inc rcx mov r15, rcx loc_A3D30: test al, al jz short loc_A3D44 movzx eax, al cmp eax, 2Fh ; '/' jz short loc_A3D44 mov al, [r15] inc r15 jmp short loc_A3D30 loc_A3D44: mov byte ptr [r15-1], 0 cmp word ptr [rsi], 2Eh ; '.' jz short loc_A3DA8 movzx eax, word ptr [rsi] xor eax, 2E2Eh movzx ecx, byte ptr [rsi+2] or cx, ax jz short loc_A3DA8 cmp r15, r12 jnb loc_A3DEC mov edi, r14d mov edx, offset unk_2A0000 xor eax, eax call _openat64 test eax, eax js short loc_A3DB9 mov r13d, eax test r14d, r14d js short loc_A3D8C mov edi, r14d call _close loc_A3D8C: mov al, [r15] mov r14d, r13d mov rcx, r15 cmp al, 2Fh ; '/' jnz short loc_A3D27 jmp short loc_A3DAB loc_A3D9B: call ___errno_location mov dword ptr [rax], 2 jmp short loc_A3DC6 loc_A3DA8: mov r13d, r14d loc_A3DAB: call ___errno_location mov dword ptr [rax], 2 mov r14d, r13d loc_A3DB9: test r14d, r14d js short loc_A3DC6 mov edi, r14d call _close loc_A3DC6: xor ebx, ebx loc_A3DC8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_A3E05 mov rax, rbx add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A3DEC: mov rax, [rbp+var_248] mov [rax], r14d lea rax, [rbp+var_240] sub rsi, rax add rbx, rsi jmp short loc_A3DC8 loc_A3E05: call ___stack_chk_fail
long long my_open_parent_dir_nosymlinks(long long a1, unsigned int *a2) { char *v3; // r15 char *v4; // rdi char *v5; // rax char *v6; // r12 char v7; // al int v8; // r13d char *v9; // rcx unsigned int v10; // r14d char *v11; // rsi long long v12; // rcx int v13; // eax unsigned int *v16; // [rsp+8h] [rbp-248h] char v17; // [rsp+10h] [rbp-240h] BYREF char v18; // [rsp+11h] [rbp-23Fh] BYREF unsigned long long v19; // [rsp+220h] [rbp-30h] v19 = __readfsqword(0x28u); v3 = &v17; v4 = &v17; v5 = (char *)strnmov(&v17, a1, 513LL); if ( *v5 ) { *(_DWORD *)__errno_location(&v17) = 36; return 0LL; } if ( v17 != 47 ) { *(_DWORD *)__errno_location(&v17) = 2; return 0LL; } v6 = v5; v16 = a2; v7 = v18; v8 = -1; if ( v18 == 47 ) { LABEL_20: *(_DWORD *)__errno_location(v4) = 2; v10 = v8; LABEL_21: if ( (v10 & 0x80000000) == 0 ) close(v10); return 0LL; } v9 = &v18; v10 = -1; while ( 1 ) { v11 = v3; v3 = v9 + 1; while ( v7 && v7 != 47 ) v7 = *v3++; *(v3 - 1) = 0; if ( *(_WORD *)v11 == 46 || (v12 = (unsigned __int8)v11[2], LOWORD(v12) = *(_WORD *)v11 ^ 0x2E2E | v12, !(_WORD)v12) ) { v8 = v10; goto LABEL_20; } if ( v3 >= v6 ) break; v4 = (char *)v10; v13 = openat64(v10, v11, &unk_2A0000, v12); if ( v13 < 0 ) goto LABEL_21; v8 = v13; if ( (v10 & 0x80000000) == 0 ) { v4 = (char *)v10; close(v10); } v7 = *v3; v10 = v8; v9 = v3; if ( *v3 == 47 ) goto LABEL_20; } *v16 = v10; return v11 - &v17 + a1; }
my_open_parent_dir_nosymlinks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x240] MOV EDX,0x201 MOV RDI,R15 MOV RSI,RBX CALL 0x001d9e14 CMP byte ptr [RAX],0x0 JZ 0x001a3cef CALL 0x00129770 MOV dword ptr [RAX],0x24 JMP 0x001a3dc6 LAB_001a3cef: CMP byte ptr [RBP + -0x240],0x2f JNZ 0x001a3d9b MOV R12,RAX MOV qword ptr [RBP + -0x248],R14 MOV AL,byte ptr [RBP + -0x23f] MOV R13D,0xffffffff CMP AL,0x2f JZ 0x001a3dab LEA RCX,[RBP + -0x23f] MOV R14D,0xffffffff LAB_001a3d27: MOV RSI,R15 INC RCX MOV R15,RCX LAB_001a3d30: TEST AL,AL JZ 0x001a3d44 MOVZX EAX,AL CMP EAX,0x2f JZ 0x001a3d44 MOV AL,byte ptr [R15] INC R15 JMP 0x001a3d30 LAB_001a3d44: MOV byte ptr [R15 + -0x1],0x0 CMP word ptr [RSI],0x2e JZ 0x001a3da8 MOVZX EAX,word ptr [RSI] XOR EAX,0x2e2e MOVZX ECX,byte ptr [RSI + 0x2] OR CX,AX JZ 0x001a3da8 CMP R15,R12 JNC 0x001a3dec MOV EDI,R14D MOV EDX,0x2a0000 XOR EAX,EAX CALL 0x00129530 TEST EAX,EAX JS 0x001a3db9 MOV R13D,EAX TEST R14D,R14D JS 0x001a3d8c MOV EDI,R14D CALL 0x00129180 LAB_001a3d8c: MOV AL,byte ptr [R15] MOV R14D,R13D MOV RCX,R15 CMP AL,0x2f JNZ 0x001a3d27 JMP 0x001a3dab LAB_001a3d9b: CALL 0x00129770 MOV dword ptr [RAX],0x2 JMP 0x001a3dc6 LAB_001a3da8: MOV R13D,R14D LAB_001a3dab: CALL 0x00129770 MOV dword ptr [RAX],0x2 MOV R14D,R13D LAB_001a3db9: TEST R14D,R14D JS 0x001a3dc6 MOV EDI,R14D CALL 0x00129180 LAB_001a3dc6: XOR EBX,EBX LAB_001a3dc8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a3e05 MOV RAX,RBX ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a3dec: MOV RAX,qword ptr [RBP + -0x248] MOV dword ptr [RAX],R14D LEA RAX,[RBP + -0x240] SUB RSI,RAX ADD RBX,RSI JMP 0x001a3dc8 LAB_001a3e05: CALL 0x00129240
long my_open_parent_dir_nosymlinks(long param_1,int *param_2) { short *psVar1; int iVar2; short *psVar3; int *piVar4; long lVar5; int __fd; short *psVar6; short *__file; long in_FS_OFFSET; int1 local_248 [2]; int1 local_246 [526]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); psVar3 = (short *)strnmov(local_248,param_1,0x201); if ((char)*psVar3 == '\0') { if (local_248[0] == '/') { __fd = -1; if (local_248[1] != '/') { psVar1 = (short *)(local_248 + 1); __file = (short *)local_248; __fd = -1; do { while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' && (local_248[1] != '/'))) { psVar1 = psVar6; local_248[1] = *(char *)psVar6; } *(char *)psVar1 = '\0'; if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break; if (psVar3 <= psVar6) { *param_2 = __fd; lVar5 = (long)__file + (param_1 - (long)local_248); goto LAB_001a3dc8; } iVar2 = openat64(__fd,(char *)__file,0x2a0000); if (iVar2 < 0) goto LAB_001a3db9; if (-1 < __fd) { close(__fd); } local_248[1] = *(char *)psVar6; __fd = iVar2; psVar1 = psVar6; __file = psVar6; } while (local_248[1] != '/'); } piVar4 = __errno_location(); *piVar4 = 2; LAB_001a3db9: if (-1 < __fd) { close(__fd); } } else { piVar4 = __errno_location(); *piVar4 = 2; } } else { piVar4 = __errno_location(); *piVar4 = 0x24; } lVar5 = 0; LAB_001a3dc8: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar5; }
47,370
ftxui::TerminalInputParser::ParseESC()
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
TerminalInputParser::Output TerminalInputParser::ParseESC() { if (!Eat()) { return UNCOMPLETED; } switch (Current()) { case 'P': return ParseDCS(); case '[': return ParseCSI(); case ']': return ParseOSC(); default: if (!Eat()) { return UNCOMPLETED; } else { return SPECIAL; } } }
O2
cpp
ftxui::TerminalInputParser::ParseESC(): pushq %rbx movq %rdi, %rbx movslq 0x8(%rsi), %rax leaq 0x1(%rax), %rdx movl %edx, 0x8(%rsi) movl 0x18(%rsi), %ecx cmpl %ecx, %edx jge 0x2accb movq 0x10(%rsi), %rdi movzbl (%rdi,%rdx), %edx cmpl $0x5d, %edx je 0x2acaf cmpl $0x5b, %edx je 0x2aca5 cmpl $0x50, %edx jne 0x2acb9 movq %rbx, %rdi callq 0x2adc6 jmp 0x2acce movq %rbx, %rdi callq 0x2ae10 jmp 0x2acce movq %rbx, %rdi callq 0x2b008 jmp 0x2acce addl $0x2, %eax movl %eax, 0x8(%rsi) cmpl %ecx, %eax jge 0x2accb movl $0x3, (%rbx) jmp 0x2acce andl $0x0, (%rbx) movq %rbx, %rax popq %rbx retq nop
_ZN5ftxui19TerminalInputParser8ParseESCEv: push rbx mov rbx, rdi movsxd rax, dword ptr [rsi+8] lea rdx, [rax+1] mov [rsi+8], edx mov ecx, [rsi+18h] cmp edx, ecx jge short loc_2ACCB mov rdi, [rsi+10h] movzx edx, byte ptr [rdi+rdx] cmp edx, 5Dh ; ']' jz short loc_2ACAF cmp edx, 5Bh ; '[' jz short loc_2ACA5 cmp edx, 50h ; 'P' jnz short loc_2ACB9 mov rdi, rbx; this call _ZN5ftxui19TerminalInputParser8ParseDCSEv; ftxui::TerminalInputParser::ParseDCS(void) jmp short loc_2ACCE loc_2ACA5: mov rdi, rbx; this call _ZN5ftxui19TerminalInputParser8ParseCSIEv; ftxui::TerminalInputParser::ParseCSI(void) jmp short loc_2ACCE loc_2ACAF: mov rdi, rbx; this call _ZN5ftxui19TerminalInputParser8ParseOSCEv; ftxui::TerminalInputParser::ParseOSC(void) jmp short loc_2ACCE loc_2ACB9: add eax, 2 mov [rsi+8], eax cmp eax, ecx jge short loc_2ACCB mov dword ptr [rbx], 3 jmp short loc_2ACCE loc_2ACCB: and dword ptr [rbx], 0 loc_2ACCE: mov rax, rbx pop rbx retn
ftxui::TerminalInputParser * ftxui::TerminalInputParser::ParseESC( ftxui::TerminalInputParser *this, long long a2) { long long v2; // rax int v3; // ecx int v4; // edx int v5; // eax v2 = *(int *)(a2 + 8); *(_DWORD *)(a2 + 8) = v2 + 1; v3 = *(_DWORD *)(a2 + 24); if ( (int)v2 + 1 >= v3 ) goto LABEL_10; v4 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 16) + v2 + 1); if ( v4 == 93 ) { ftxui::TerminalInputParser::ParseOSC(this); return this; } if ( v4 == 91 ) { ftxui::TerminalInputParser::ParseCSI(this); return this; } if ( v4 != 80 ) { v5 = v2 + 2; *(_DWORD *)(a2 + 8) = v5; if ( v5 < v3 ) { *(_DWORD *)this = 3; return this; } LABEL_10: *(_DWORD *)this = 0; return this; } ftxui::TerminalInputParser::ParseDCS(this); return this; }
ParseESC: PUSH RBX MOV RBX,RDI MOVSXD RAX,dword ptr [RSI + 0x8] LEA RDX,[RAX + 0x1] MOV dword ptr [RSI + 0x8],EDX MOV ECX,dword ptr [RSI + 0x18] CMP EDX,ECX JGE 0x0012accb MOV RDI,qword ptr [RSI + 0x10] MOVZX EDX,byte ptr [RDI + RDX*0x1] CMP EDX,0x5d JZ 0x0012acaf CMP EDX,0x5b JZ 0x0012aca5 CMP EDX,0x50 JNZ 0x0012acb9 MOV RDI,RBX CALL 0x0012adc6 JMP 0x0012acce LAB_0012aca5: MOV RDI,RBX CALL 0x0012ae10 JMP 0x0012acce LAB_0012acaf: MOV RDI,RBX CALL 0x0012b008 JMP 0x0012acce LAB_0012acb9: ADD EAX,0x2 MOV dword ptr [RSI + 0x8],EAX CMP EAX,ECX JGE 0x0012accb MOV dword ptr [RBX],0x3 JMP 0x0012acce LAB_0012accb: AND dword ptr [RBX],0x0 LAB_0012acce: MOV RAX,RBX POP RBX RET
/* ftxui::TerminalInputParser::ParseESC() */ void ftxui::TerminalInputParser::ParseESC(void) { long lVar1; char cVar2; int iVar3; int iVar4; long in_RSI; int4 *in_RDI; iVar3 = *(int *)(in_RSI + 8); lVar1 = (long)iVar3 + 1; iVar4 = (int)lVar1; *(int *)(in_RSI + 8) = iVar4; if (iVar4 < *(int *)(in_RSI + 0x18)) { cVar2 = *(char *)(*(long *)(in_RSI + 0x10) + lVar1); if (cVar2 == ']') { ParseOSC(); return; } if (cVar2 == '[') { ParseCSI(); return; } if (cVar2 == 'P') { ParseDCS(); return; } iVar3 = iVar3 + 2; *(int *)(in_RSI + 8) = iVar3; if (iVar3 < *(int *)(in_RSI + 0x18)) { *in_RDI = 3; return; } } *in_RDI = 0; return; }
47,371
backup_flush(THD*)
eloqsql/sql/backup.cc
static bool backup_flush(THD *thd) { DBUG_ENTER("backup_flush"); /* Lock all non transactional normal tables to be used in new DML's */ if (thd->mdl_context.upgrade_shared_lock(backup_flush_ticket, MDL_BACKUP_FLUSH, thd->variables.lock_wait_timeout)) DBUG_RETURN(1); /* Free unused tables and table shares so that mariabackup knows what is safe to copy */ tc_purge(); tdc_purge(true); DBUG_RETURN(0); }
O0
cpp
backup_flush(THD*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, %rdi addq $0x150, %rdi # imm = 0x150 movq 0x11bc677(%rip), %rsi # 0x1cfc448 movq 0x968(%rax), %xmm0 movaps 0x9048d0(%rip), %xmm1 # 0x14446b0 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0x9048d4(%rip), %xmm1 # 0x14446c0 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movl $0x1, %edx callq 0xa65080 testb $0x1, %al jne 0xb3fe0b jmp 0xb3fe13 jmp 0xb3fe0d movb $0x1, -0x1(%rbp) jmp 0xb3fe26 callq 0xb32eb0 movl $0x1, %edi callq 0xb33e50 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL12backup_flushP3THD: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rdi, rax add rdi, 150h mov rsi, cs:_ZL19backup_flush_ticket; backup_flush_ticket movq xmm0, qword ptr [rax+968h] movaps xmm1, cs:xmmword_14446B0 punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_14446C0 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 mov edx, 1 call _ZN11MDL_context19upgrade_shared_lockEP10MDL_ticket13enum_mdl_typed; MDL_context::upgrade_shared_lock(MDL_ticket *,enum_mdl_type,double) test al, 1 jnz short loc_B3FE0B jmp short loc_B3FE13 loc_B3FE0B: jmp short $+2 loc_B3FE0D: mov [rbp+var_1], 1 jmp short loc_B3FE26 loc_B3FE13: call _Z8tc_purgev; tc_purge(void) mov edi, 1; bool call _Z9tdc_purgeb; tdc_purge(bool) mov [rbp+var_1], 0 loc_B3FE26: mov al, [rbp+var_1] and al, 1 add rsp, 10h pop rbp retn
char backup_flush(THD *a1) { __m128d v1; // xmm1 v1 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)((char *)a1 + 2408)), (__m128i)xmmword_14446B0), (__m128d)xmmword_14446C0); if ( (MDL_context::upgrade_shared_lock( (THD *)((char *)a1 + 336), (MDL_ticket *)backup_flush_ticket, 1, _mm_unpackhi_pd(v1, v1).m128d_f64[0] + v1.m128d_f64[0]) & 1) != 0 ) return 1; tc_purge(); tdc_purge(1); return 0; }
rpl_conv_type_from: 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 RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RDI CALL 0x00b40d00 MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00ad45f0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x24] CMP EAX,ECX JNZ 0x00b3fe0c MOV RDI,qword ptr [RBP + -0x10] CALL 0x00b40c90 MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOVZX ESI,AX CALL 0x00b3f050 MOV dword ptr [RBP + -0x34],EAX JMP 0x00b3fe16 LAB_00b3fe0c: MOV EAX,0x4 MOV dword ptr [RBP + -0x34],EAX JMP 0x00b3fe16 LAB_00b3fe16: MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
/* Field_year::rpl_conv_type_from(Conv_source const&, Relay_log_info const*, Conv_param const&) const */ int4 __thiscall Field_year::rpl_conv_type_from (Field_year *this,Conv_source *param_1,Relay_log_info *param_2,Conv_param *param_3) { ushort uVar1; int iVar2; int iVar3; int4 local_3c; iVar2 = Field::binlog_type((Field *)this); iVar3 = Type_handler_hybrid_field_type::real_field_type((Type_handler_hybrid_field_type *)param_1) ; if (iVar2 == iVar3) { uVar1 = Conv_source::metadata(param_1); local_3c = Field::rpl_conv_type_from_same_data_type((Field *)this,uVar1,param_2,param_3); } else { local_3c = 4; } return local_3c; }
47,372
JS_NewNumber
bluesky950520[P]quickjs/quickjs.c
static inline BOOL double_is_int32(double d) { uint64_t u, e; JSFloat64Union t; t.d = d; u = t.u64; e = ((u >> 52) & 0x7FF) - 1023; if (e > 30) { // accept 0, INT32_MIN, reject too large, too small, nan, inf, -0 return !u || (u == 0xc1e0000000000000); } else { // shift out sign, exponent and whole part bits // value is fractional if remaining low bits are non-zero return !(u << 12 << e); } }
O1
c
JS_NewNumber: movq %xmm0, %rax movq %rax, %rcx shrq $0x34, %rcx andl $0x7ff, %ecx # imm = 0x7FF addq $-0x3ff, %rcx # imm = 0xFC01 cmpq $0x1f, %rcx jb 0x1be20 testq %rax, %rax sete %dl movabsq $-0x3e20000000000000, %rcx # imm = 0xC1E0000000000000 cmpq %rcx, %rax sete %cl orb %dl, %cl jmp 0x1be30 movq %rax, %rdx shlq $0xc, %rdx shlq %cl, %rdx testq %rdx, %rdx sete %cl cvttsd2si %xmm0, %edx xorl %esi, %esi testb %cl, %cl cmovneq %rdx, %rax movl $0x7, %edx cmovneq %rsi, %rdx retq
js_number: movq rax, xmm0 mov rcx, rax shr rcx, 34h and ecx, 7FFh add rcx, 0FFFFFFFFFFFFFC01h cmp rcx, 1Fh jb short loc_1BE20 test rax, rax setz dl mov rcx, 0C1E0000000000000h cmp rax, rcx setz cl or cl, dl jmp short loc_1BE30 loc_1BE20: mov rdx, rax shl rdx, 0Ch shl rdx, cl test rdx, rdx setz cl loc_1BE30: cvttsd2si edx, xmm0 xor esi, esi test cl, cl cmovnz rax, rdx mov edx, 7 cmovnz rdx, rsi retn
long long js_number(double a1) { long long result; // rax bool v2; // cl result = *(_QWORD *)&a1; if ( ((*(_QWORD *)&a1 >> 52) & 0x7FFuLL) - 1023 < 0x1F ) v2 = *(_QWORD *)&a1 << 12 << ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1) == 0LL; else v2 = *(_QWORD *)&a1 == 0LL || *(_QWORD *)&a1 == 0xC1E0000000000000LL; if ( v2 ) return (unsigned int)(int)a1; return result; }
js_number: MOVQ RAX,XMM0 MOV RCX,RAX SHR RCX,0x34 AND ECX,0x7ff ADD RCX,-0x3ff CMP RCX,0x1f JC 0x0011be20 TEST RAX,RAX SETZ DL MOV RCX,-0x3e20000000000000 CMP RAX,RCX SETZ CL OR CL,DL JMP 0x0011be30 LAB_0011be20: MOV RDX,RAX SHL RDX,0xc SHL RDX,CL TEST RDX,RDX SETZ CL LAB_0011be30: CVTTSD2SI EDX,XMM0 XOR ESI,ESI TEST CL,CL CMOVNZ RAX,RDX MOV EDX,0x7 CMOVNZ RDX,RSI RET
int1 [16] js_number(double param_1,int8 param_2,int8 param_3,int8 param_4) { bool bVar1; ulong uVar2; long lVar3; int1 auVar5 [16]; int8 uVar4; uVar2 = (ulong)((uint)((ulong)param_1 >> 0x34) & 0x7ff) - 0x3ff; if (uVar2 < 0x1f) { lVar3 = ((long)param_1 << 0xc) << ((byte)uVar2 & 0x3f); bVar1 = lVar3 == 0; } else { lVar3 = CONCAT71((int7)((ulong)param_4 >> 8),param_1 == 0.0); bVar1 = param_1 == -2147483648.0 || param_1 == 0.0; } if (bVar1) { param_1 = (double)CONCAT44((int)((ulong)lVar3 >> 0x20),(int)param_1); } uVar4 = 7; if (bVar1) { uVar4 = 0; } auVar5._8_8_ = uVar4; auVar5._0_8_ = param_1; return auVar5; }
47,373
JS_NewNumber
bluesky950520[P]quickjs/quickjs.c
static inline BOOL double_is_int32(double d) { uint64_t u, e; JSFloat64Union t; t.d = d; u = t.u64; e = ((u >> 52) & 0x7FF) - 1023; if (e > 30) { // accept 0, INT32_MIN, reject too large, too small, nan, inf, -0 return !u || (u == 0xc1e0000000000000); } else { // shift out sign, exponent and whole part bits // value is fractional if remaining low bits are non-zero return !(u << 12 << e); } }
O3
c
JS_NewNumber: movq %xmm0, %rax movq %rax, %rcx shrq $0x34, %rcx andl $0x7ff, %ecx # imm = 0x7FF addq $-0x3ff, %rcx # imm = 0xFC01 cmpq $0x1f, %rcx jb 0x1c695 testq %rax, %rax sete %dl movabsq $-0x3e20000000000000, %rcx # imm = 0xC1E0000000000000 cmpq %rcx, %rax sete %cl orb %dl, %cl jmp 0x1c6a5 movq %rax, %rdx shlq $0xc, %rdx shlq %cl, %rdx testq %rdx, %rdx sete %cl cvttsd2si %xmm0, %edx xorl %esi, %esi testb %cl, %cl cmovneq %rdx, %rax movl $0x7, %edx cmovneq %rsi, %rdx retq
JS_NewNumber: movq rax, xmm0 mov rcx, rax shr rcx, 34h and ecx, 7FFh add rcx, 0FFFFFFFFFFFFFC01h cmp rcx, 1Fh jb short loc_1C695 test rax, rax setz dl mov rcx, 0C1E0000000000000h cmp rax, rcx setz cl or cl, dl jmp short loc_1C6A5 loc_1C695: mov rdx, rax shl rdx, 0Ch shl rdx, cl test rdx, rdx setz cl loc_1C6A5: cvttsd2si edx, xmm0 xor esi, esi test cl, cl cmovnz rax, rdx mov edx, 7 cmovnz rdx, rsi retn
long long JS_NewNumber(double a1) { long long result; // rax bool v2; // cl result = *(_QWORD *)&a1; if ( ((*(_QWORD *)&a1 >> 52) & 0x7FFuLL) - 1023 < 0x1F ) v2 = *(_QWORD *)&a1 << 12 << ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1) == 0LL; else v2 = *(_QWORD *)&a1 == 0LL || *(_QWORD *)&a1 == 0xC1E0000000000000LL; if ( v2 ) return (unsigned int)(int)a1; return result; }
JS_NewNumber: MOVQ RAX,XMM0 MOV RCX,RAX SHR RCX,0x34 AND ECX,0x7ff ADD RCX,-0x3ff CMP RCX,0x1f JC 0x0011c695 TEST RAX,RAX SETZ DL MOV RCX,-0x3e20000000000000 CMP RAX,RCX SETZ CL OR CL,DL JMP 0x0011c6a5 LAB_0011c695: MOV RDX,RAX SHL RDX,0xc SHL RDX,CL TEST RDX,RDX SETZ CL LAB_0011c6a5: CVTTSD2SI EDX,XMM0 XOR ESI,ESI TEST CL,CL CMOVNZ RAX,RDX MOV EDX,0x7 CMOVNZ RDX,RSI RET
int1 [16] JS_NewNumber(double param_1,int8 param_2,int8 param_3,int8 param_4) { bool bVar1; ulong uVar2; long lVar3; int1 auVar5 [16]; int8 uVar4; uVar2 = (ulong)((uint)((ulong)param_1 >> 0x34) & 0x7ff) - 0x3ff; if (uVar2 < 0x1f) { lVar3 = ((long)param_1 << 0xc) << ((byte)uVar2 & 0x3f); bVar1 = lVar3 == 0; } else { lVar3 = CONCAT71((int7)((ulong)param_4 >> 8),param_1 == 0.0); bVar1 = param_1 == -2147483648.0 || param_1 == 0.0; } if (bVar1) { param_1 = (double)CONCAT44((int)((ulong)lVar3 >> 0x20),(int)param_1); } uVar4 = 7; if (bVar1) { uVar4 = 0; } auVar5._8_8_ = uVar4; auVar5._0_8_ = param_1; return auVar5; }
47,374
bf_tan
bluesky950520[P]quickjs/libbf.c
int bf_tan(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags) { assert(r != a); if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bf_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF) { bf_set_nan(r); return BF_ST_INVALID_OP; } else { bf_set_zero(r, a->sign); return 0; } } /* small argument case: result = x+r(x) with r(x) = x^3/3 + O(X^5). We assume r(x) < 2^(3*EXP(x) - 1). */ if (a->expn < 0) { slimb_t e; e = sat_add(2 * a->expn, a->expn - 1); if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) { bf_set(r, a); return bf_add_epsilon(r, r, e, a->sign, prec, flags); } } return bf_ziv_rounding(r, a, prec, flags, bf_tan_internal, NULL); }
O0
c
bf_tan: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movl %ecx, 0x24(%rsp) movq 0x30(%rsp), %rax cmpq $0x0, 0x18(%rax) jne 0xf66fa movq 0x30(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) jne 0xf66af movq 0x38(%rsp), %rdi callq 0xec490 movl $0x0, 0x44(%rsp) jmp 0xf67de movq 0x30(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf66db movq 0x38(%rsp), %rdi callq 0xec490 movl $0x1, 0x44(%rsp) jmp 0xf67de movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rax movl 0x8(%rax), %esi callq 0xec530 movl $0x0, 0x44(%rsp) jmp 0xf67de movq 0x30(%rsp), %rax cmpq $0x0, 0x10(%rax) jge 0xf67b6 movq 0x30(%rsp), %rax movq 0x10(%rax), %rdi shlq %rdi movq 0x30(%rsp), %rax movq 0x10(%rax), %rsi subq $0x1, %rsi callq 0xf65c0 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rdi addq $0x2, %rdi movq 0x30(%rsp), %rax movq 0x18(%rax), %rsi shlq $0x6, %rsi addq $0x2, %rsi callq 0xed350 movq 0x8(%rsp), %rcx movq %rax, %rdx movq 0x10(%rsp), %rax subq %rdx, %rcx cmpq %rcx, %rax jge 0xf67b4 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0xec5b0 movq 0x38(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x30(%rsp), %rax movl 0x8(%rax), %ecx movq 0x28(%rsp), %r8 movl 0x24(%rsp), %r9d callq 0xf4730 movl %eax, 0x44(%rsp) jmp 0xf67de jmp 0xf67b6 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx movl 0x24(%rsp), %ecx leaq 0x20(%rip), %r8 # 0xf67f0 xorl %eax, %eax movl %eax, %r9d callq 0xf47d0 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw (%rax,%rax)
bf_tan: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov [rsp+48h+var_24], ecx mov rax, [rsp+48h+var_18] cmp qword ptr [rax+18h], 0 jnz short loc_F66FA mov rax, [rsp+48h+var_18] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jnz short loc_F66AF mov rdi, [rsp+48h+var_10] call bf_set_nan mov [rsp+48h+var_4], 0 jmp loc_F67DE loc_F66AF: mov rax, [rsp+48h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F66DB mov rdi, [rsp+48h+var_10] call bf_set_nan mov [rsp+48h+var_4], 1 jmp loc_F67DE loc_F66DB: mov rdi, [rsp+48h+var_10] mov rax, [rsp+48h+var_18] mov esi, [rax+8] call bf_set_zero mov [rsp+48h+var_4], 0 jmp loc_F67DE loc_F66FA: mov rax, [rsp+48h+var_18] cmp qword ptr [rax+10h], 0 jge loc_F67B6 mov rax, [rsp+48h+var_18] mov rdi, [rax+10h] shl rdi, 1 mov rax, [rsp+48h+var_18] mov rsi, [rax+10h] sub rsi, 1 call sat_add mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_18] mov rax, [rax+10h] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_20] add rdi, 2 mov rax, [rsp+48h+var_18] mov rsi, [rax+18h] shl rsi, 6 add rsi, 2 call bf_max mov rcx, [rsp+48h+var_40] mov rdx, rax mov rax, [rsp+48h+var_38] sub rcx, rdx cmp rax, rcx jge short loc_F67B4 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] call bf_set mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_30] mov rax, [rsp+48h+var_18] mov ecx, [rax+8] mov r8, [rsp+48h+var_20] mov r9d, [rsp+48h+var_24] call bf_add_epsilon mov [rsp+48h+var_4], eax jmp short loc_F67DE loc_F67B4: jmp short $+2 loc_F67B6: mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] mov rdx, [rsp+48h+var_20] mov ecx, [rsp+48h+var_24] lea r8, bf_tan_internal xor eax, eax mov r9d, eax call bf_ziv_rounding mov [rsp+48h+var_4], eax loc_F67DE: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long bf_tan(long long *a1, long long a2, long long a3, unsigned int a4) { long long v5; // [rsp+8h] [rbp-40h] long long v6; // [rsp+18h] [rbp-30h] if ( *(_QWORD *)(a2 + 24) ) { if ( *(long long *)(a2 + 16) >= 0 ) return (unsigned int)bf_ziv_rounding( a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal, 0LL); v6 = sat_add(2LL * *(_QWORD *)(a2 + 16), *(_QWORD *)(a2 + 16) - 1LL); v5 = *(_QWORD *)(a2 + 16); if ( v6 >= v5 - bf_max(a3 + 2, (*(_QWORD *)(a2 + 24) << 6) + 2LL) ) { return (unsigned int)bf_ziv_rounding( a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_tan_internal, 0LL); } else { bf_set((long long)a1, a2); return (unsigned int)bf_add_epsilon((long long)a1, a1, v6, *(_DWORD *)(a2 + 8), a3, a4); } } else if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { bf_set_nan((long long)a1); return 0; } else if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFELL ) { bf_set_nan((long long)a1); return 1; } else { bf_set_zero((long long)a1, *(_DWORD *)(a2 + 8)); return 0; } }
bf_tan: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV dword ptr [RSP + 0x24],ECX MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x001f66fa MOV RAX,qword ptr [RSP + 0x30] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f66af MOV RDI,qword ptr [RSP + 0x38] CALL 0x001ec490 MOV dword ptr [RSP + 0x44],0x0 JMP 0x001f67de LAB_001f66af: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f66db MOV RDI,qword ptr [RSP + 0x38] CALL 0x001ec490 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f67de LAB_001f66db: MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x30] MOV ESI,dword ptr [RAX + 0x8] CALL 0x001ec530 MOV dword ptr [RSP + 0x44],0x0 JMP 0x001f67de LAB_001f66fa: MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x10],0x0 JGE 0x001f67b6 MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX + 0x10] SHL RDI,0x1 MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + 0x10] SUB RSI,0x1 CALL 0x001f65c0 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x2 MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + 0x18] SHL RSI,0x6 ADD RSI,0x2 CALL 0x001ed350 MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x10] SUB RCX,RDX CMP RAX,RCX JGE 0x001f67b4 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] CALL 0x001ec5b0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RAX + 0x8] MOV R8,qword ptr [RSP + 0x28] MOV R9D,dword ptr [RSP + 0x24] CALL 0x001f4730 MOV dword ptr [RSP + 0x44],EAX JMP 0x001f67de LAB_001f67b4: JMP 0x001f67b6 LAB_001f67b6: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x24] LEA R8,[0x1f67f0] XOR EAX,EAX MOV R9D,EAX CALL 0x001f47d0 MOV dword ptr [RSP + 0x44],EAX LAB_001f67de: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 bf_tan(int8 param_1,long param_2,long param_3,int4 param_4) { long lVar1; int4 uVar2; long lVar3; long lVar4; int4 local_4; if (*(long *)(param_2 + 0x18) == 0) { if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) { bf_set_nan(param_1); local_4 = 0; } else if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) { bf_set_nan(param_1); local_4 = 1; } else { bf_set_zero(param_1,*(int4 *)(param_2 + 8)); local_4 = 0; } } else { if (*(long *)(param_2 + 0x10) < 0) { lVar3 = sat_add(*(long *)(param_2 + 0x10) << 1,*(long *)(param_2 + 0x10) + -1); lVar1 = *(long *)(param_2 + 0x10); lVar4 = bf_max(param_3 + 2,*(long *)(param_2 + 0x18) * 0x40 + 2); if (lVar3 < lVar1 - lVar4) { bf_set(param_1,param_2); uVar2 = bf_add_epsilon(param_1,param_1,lVar3,*(int4 *)(param_2 + 8),param_3,param_4); return uVar2; } } local_4 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_tan_internal,0); } return local_4; }
47,375
mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&)
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_plugin.cc
bool GlobalTable<mjpPlugin>::ObjectEqual(const mjpPlugin& plugin1, const mjpPlugin& plugin2) { if (plugin1.name && !plugin2.name) { return false; } if (plugin2.name && !plugin1.name) { return false; } if (plugin1.name && plugin2.name && std::strncmp(plugin1.name, plugin2.name, kMaxNameLength)) { return false; } if (plugin1.nattribute != plugin2.nattribute) { return false; } for (int i = 0; i < plugin1.nattribute; ++i) { if (plugin1.attributes[i] && !plugin2.attributes[i]) { return false; } if (plugin1.attributes[i] && !plugin2.attributes[i]) { return false; } if (plugin1.attributes[i] && plugin2.attributes[i] && std::strncmp(plugin1.attributes[i], plugin2.attributes[i], kMaxNameLength)) { return false; } } const char* ptr1 = reinterpret_cast<const char*>(&plugin1.attributes) + sizeof(plugin1.attributes); const char* ptr2 = reinterpret_cast<const char*>(&plugin2.attributes) + sizeof(plugin2.attributes); std::size_t remaining_size = sizeof(mjpPlugin) - (ptr1 - reinterpret_cast<const char*>(&plugin1)); return !std::memcmp(ptr1, ptr2, remaining_size); }
O0
cpp
mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, (%rax) je 0xe6a1e movq 0x20(%rsp), %rax cmpq $0x0, (%rax) jne 0xe6a1e movb $0x0, 0x37(%rsp) jmp 0xe6bef movq 0x20(%rsp), %rax cmpq $0x0, (%rax) je 0xe6a3e movq 0x28(%rsp), %rax cmpq $0x0, (%rax) jne 0xe6a3e movb $0x0, 0x37(%rsp) jmp 0xe6bef movq 0x28(%rsp), %rax cmpq $0x0, (%rax) je 0xe6a7d movq 0x20(%rsp), %rax cmpq $0x0, (%rax) je 0xe6a7d movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x20(%rsp), %rax movq (%rax), %rsi movl $0x400, %edx # imm = 0x400 callq 0x4a040 cmpl $0x0, %eax je 0xe6a7d movb $0x0, 0x37(%rsp) jmp 0xe6bef movq 0x28(%rsp), %rax movl 0x8(%rax), %eax movq 0x20(%rsp), %rcx cmpl 0x8(%rcx), %eax je 0xe6a99 movb $0x0, 0x37(%rsp) jmp 0xe6bef movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0xe6b91 movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xe6ae7 movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) jne 0xe6ae7 movb $0x0, 0x37(%rsp) jmp 0xe6bef movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xe6b1b movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) jne 0xe6b1b movb $0x0, 0x37(%rsp) jmp 0xe6bef movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xe6b7f movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xe6b7f movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rsi movl $0x400, %edx # imm = 0x400 callq 0x4a040 cmpl $0x0, %eax je 0xe6b7f movb $0x0, 0x37(%rsp) jmp 0xe6bef jmp 0xe6b81 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0xe6aa1 movq 0x28(%rsp), %rax addq $0x10, %rax addq $0x8, %rax movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rax addq $0x10, %rax addq $0x8, %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rax subq %rax, %rcx movl $0xa0, %eax subq %rcx, %rax movq %rax, (%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi movq (%rsp), %rdx callq 0x4a050 cmpl $0x0, %eax setne %al xorb $-0x1, %al andb $0x1, %al movb %al, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw (%rax,%rax)
_ZN6mujoco11GlobalTableI10mjpPlugin_E11ObjectEqualERKS1_S4_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_10] cmp qword ptr [rax], 0 jz short loc_E6A1E mov rax, [rsp+38h+var_18] cmp qword ptr [rax], 0 jnz short loc_E6A1E mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6A1E: mov rax, [rsp+38h+var_18] cmp qword ptr [rax], 0 jz short loc_E6A3E mov rax, [rsp+38h+var_10] cmp qword ptr [rax], 0 jnz short loc_E6A3E mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6A3E: mov rax, [rsp+38h+var_10] cmp qword ptr [rax], 0 jz short loc_E6A7D mov rax, [rsp+38h+var_18] cmp qword ptr [rax], 0 jz short loc_E6A7D mov rax, [rsp+38h+var_10] mov rdi, [rax] mov rax, [rsp+38h+var_18] mov rsi, [rax] mov edx, 400h call _strncmp cmp eax, 0 jz short loc_E6A7D mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6A7D: mov rax, [rsp+38h+var_10] mov eax, [rax+8] mov rcx, [rsp+38h+var_18] cmp eax, [rcx+8] jz short loc_E6A99 mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6A99: mov [rsp+38h+var_1C], 0 loc_E6AA1: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+8] jge loc_E6B91 mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jz short loc_E6AE7 mov rax, [rsp+38h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jnz short loc_E6AE7 mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6AE7: mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jz short loc_E6B1B mov rax, [rsp+38h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jnz short loc_E6B1B mov [rsp+38h+var_1], 0 jmp loc_E6BEF loc_E6B1B: mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jz short loc_E6B7F mov rax, [rsp+38h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] cmp qword ptr [rax+rcx*8], 0 jz short loc_E6B7F mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] mov rdi, [rax+rcx*8] mov rax, [rsp+38h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] mov rsi, [rax+rcx*8] mov edx, 400h call _strncmp cmp eax, 0 jz short loc_E6B7F mov [rsp+38h+var_1], 0 jmp short loc_E6BEF loc_E6B7F: jmp short $+2 loc_E6B81: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp loc_E6AA1 loc_E6B91: mov rax, [rsp+38h+var_10] add rax, 10h add rax, 8 mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_18] add rax, 10h add rax, 8 mov [rsp+38h+var_30], rax mov rcx, [rsp+38h+var_28] mov rax, [rsp+38h+var_10] sub rcx, rax mov eax, 0A0h sub rax, rcx mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_28] mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_38] call _memcmp cmp eax, 0 setnz al xor al, 0FFh and al, 1 mov [rsp+38h+var_1], al loc_E6BEF: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
bool mujoco::GlobalTable<mjpPlugin_>::ObjectEqual( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { int i; // [rsp+1Ch] [rbp-1Ch] if ( !*(_QWORD *)a1 || *(_QWORD *)a2 ) { if ( !*(_QWORD *)a2 || *(_QWORD *)a1 ) { if ( *(_QWORD *)a1 && *(_QWORD *)a2 && (unsigned int)strncmp(*(_QWORD *)a1, *(_QWORD *)a2, 1024LL) ) { return 0; } else if ( *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8) ) { for ( i = 0; i < *(_DWORD *)(a1 + 8); ++i ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i) && !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i) ) return 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i) && !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i) ) return 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i) && *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i) && (unsigned int)strncmp( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i), 1024LL) ) { return 0; } } return (unsigned int)memcmp(a1 + 24, a2 + 24, 136LL, 24LL, a5, a6, 136LL, a2 + 24, a1 + 24) == 0; } else { return 0; } } else { return 0; } } else { return 0; } }
ObjectEqual: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX],0x0 JZ 0x001e6a1e MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001e6a1e MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6a1e: MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],0x0 JZ 0x001e6a3e MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX],0x0 JNZ 0x001e6a3e MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6a3e: MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX],0x0 JZ 0x001e6a7d MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],0x0 JZ 0x001e6a7d MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX] MOV EDX,0x400 CALL 0x0014a040 CMP EAX,0x0 JZ 0x001e6a7d MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6a7d: MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP EAX,dword ptr [RCX + 0x8] JZ 0x001e6a99 MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6a99: MOV dword ptr [RSP + 0x1c],0x0 LAB_001e6aa1: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x8] JGE 0x001e6b91 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001e6ae7 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x001e6ae7 MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6ae7: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001e6b1b MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x001e6b1b MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6b1b: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001e6b7f MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001e6b7f MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,0x400 CALL 0x0014a040 CMP EAX,0x0 JZ 0x001e6b7f MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e6bef LAB_001e6b7f: JMP 0x001e6b81 LAB_001e6b81: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001e6aa1 LAB_001e6b91: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x10 ADD RAX,0x8 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x10 ADD RAX,0x8 MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x28] SUB RCX,RAX MOV EAX,0xa0 SUB RAX,RCX MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP] CALL 0x0014a050 CMP EAX,0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOV byte ptr [RSP + 0x37],AL LAB_001e6bef: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&) */ byte mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ *param_1,mjpPlugin_ *param_2) { int iVar1; int local_1c; byte local_1; if ((*(long *)param_1 == 0) || (*(long *)param_2 != 0)) { if ((*(long *)param_2 == 0) || (*(long *)param_1 != 0)) { if (((*(long *)param_1 != 0) && (*(long *)param_2 != 0)) && (iVar1 = strncmp(*(char **)param_1,*(char **)param_2,0x400), iVar1 != 0)) { return 0; } if (*(int *)(param_1 + 8) == *(int *)(param_2 + 8)) { for (local_1c = 0; local_1c < *(int *)(param_1 + 8); local_1c = local_1c + 1) { if ((*(long *)(*(long *)(param_1 + 0x10) + (long)local_1c * 8) != 0) && (*(long *)(*(long *)(param_2 + 0x10) + (long)local_1c * 8) == 0)) { return 0; } if ((*(long *)(*(long *)(param_1 + 0x10) + (long)local_1c * 8) != 0) && (*(long *)(*(long *)(param_2 + 0x10) + (long)local_1c * 8) == 0)) { return 0; } if (((*(long *)(*(long *)(param_1 + 0x10) + (long)local_1c * 8) != 0) && (*(long *)(*(long *)(param_2 + 0x10) + (long)local_1c * 8) != 0)) && (iVar1 = strncmp(*(char **)(*(long *)(param_1 + 0x10) + (long)local_1c * 8), *(char **)(*(long *)(param_2 + 0x10) + (long)local_1c * 8),0x400), iVar1 != 0)) { return 0; } } iVar1 = memcmp(param_1 + 0x18,param_2 + 0x18,0xa0 - ((long)(param_1 + 0x18) - (long)param_1) ); local_1 = (iVar1 != 0 ^ 0xffU) & 1; } else { local_1 = 0; } } else { local_1 = 0; } } else { local_1 = 0; } return local_1; }
47,376
mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&)
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_plugin.cc
bool GlobalTable<mjpPlugin>::ObjectEqual(const mjpPlugin& plugin1, const mjpPlugin& plugin2) { if (plugin1.name && !plugin2.name) { return false; } if (plugin2.name && !plugin1.name) { return false; } if (plugin1.name && plugin2.name && std::strncmp(plugin1.name, plugin2.name, kMaxNameLength)) { return false; } if (plugin1.nattribute != plugin2.nattribute) { return false; } for (int i = 0; i < plugin1.nattribute; ++i) { if (plugin1.attributes[i] && !plugin2.attributes[i]) { return false; } if (plugin1.attributes[i] && !plugin2.attributes[i]) { return false; } if (plugin1.attributes[i] && plugin2.attributes[i] && std::strncmp(plugin1.attributes[i], plugin2.attributes[i], kMaxNameLength)) { return false; } } const char* ptr1 = reinterpret_cast<const char*>(&plugin1.attributes) + sizeof(plugin1.attributes); const char* ptr2 = reinterpret_cast<const char*>(&plugin2.attributes) + sizeof(plugin2.attributes); std::size_t remaining_size = sizeof(mjpPlugin) - (ptr1 - reinterpret_cast<const char*>(&plugin1)); return !std::memcmp(ptr1, ptr2, remaining_size); }
O3
cpp
mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rdi testq %rdi, %rdi setne %al movq (%rsi), %rsi testq %rsi, %rsi sete %cl testb %cl, %al jne 0x7bb54 testq %rsi, %rsi setne %al testq %rdi, %rdi sete %cl testb %al, %cl jne 0x7bb54 testq %rdi, %rdi sete %al testq %rsi, %rsi sete %cl orb %al, %cl jne 0x7baf3 movl $0x400, %edx # imm = 0x400 callq 0x2de20 testl %eax, %eax jne 0x7bb54 movl 0x8(%r14), %r15d cmpl 0x8(%rbx), %r15d jne 0x7bb54 testl %r15d, %r15d jle 0x7bb35 movq 0x10(%r14), %r12 movq 0x10(%rbx), %r13 xorl %ebp, %ebp movq (%r12,%rbp,8), %rdi testq %rdi, %rdi je 0x7bb2d movq (%r13,%rbp,8), %rsi testq %rsi, %rsi je 0x7bb54 movl $0x400, %edx # imm = 0x400 callq 0x2de20 testl %eax, %eax jne 0x7bb54 incq %rbp cmpq %rbp, %r15 jne 0x7bb0c addq $0x18, %r14 addq $0x18, %rbx movl $0x88, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x2de30 testl %eax, %eax sete %al jmp 0x7bb56 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6mujoco11GlobalTableI10mjpPlugin_E11ObjectEqualERKS1_S4_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rdi] test rdi, rdi setnz al mov rsi, [rsi] test rsi, rsi setz cl test al, cl jnz loc_7BB54 test rsi, rsi setnz al test rdi, rdi setz cl test cl, al jnz short loc_7BB54 test rdi, rdi setz al test rsi, rsi setz cl or cl, al jnz short loc_7BAF3 mov edx, 400h call _strncmp test eax, eax jnz short loc_7BB54 loc_7BAF3: mov r15d, [r14+8] cmp r15d, [rbx+8] jnz short loc_7BB54 test r15d, r15d jle short loc_7BB35 mov r12, [r14+10h] mov r13, [rbx+10h] xor ebp, ebp loc_7BB0C: mov rdi, [r12+rbp*8] test rdi, rdi jz short loc_7BB2D mov rsi, [r13+rbp*8+0] test rsi, rsi jz short loc_7BB54 mov edx, 400h call _strncmp test eax, eax jnz short loc_7BB54 loc_7BB2D: inc rbp cmp r15, rbp jnz short loc_7BB0C loc_7BB35: add r14, 18h add rbx, 18h mov edx, 88h mov rdi, r14 mov rsi, rbx call _bcmp test eax, eax setz al jmp short loc_7BB56 loc_7BB54: xor eax, eax loc_7BB56: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(long long *a1, long long *a2) { long long v4; // rdi long long v5; // rsi long long v6; // r15 long long v7; // r12 long long v8; // r13 long long v9; // rbp long long v10; // rdi long long v11; // rsi v4 = *a1; v5 = *a2; if ( (v5 != 0 || v4 == 0) && (v5 == 0 || v4 != 0) && (v4 == 0 || v5 == 0 || !(unsigned int)strncmp(v4, v5, 1024LL)) ) { v6 = *((unsigned int *)a1 + 2); if ( (_DWORD)v6 == *((_DWORD *)a2 + 2) ) { if ( (int)v6 <= 0 ) return (unsigned int)bcmp(a1 + 3, a2 + 3, 136LL) == 0; v7 = a1[2]; v8 = a2[2]; v9 = 0LL; while ( 1 ) { v10 = *(_QWORD *)(v7 + 8 * v9); if ( v10 ) { v11 = *(_QWORD *)(v8 + 8 * v9); if ( !v11 || (unsigned int)strncmp(v10, v11, 1024LL) ) break; } if ( v6 == ++v9 ) return (unsigned int)bcmp(a1 + 3, a2 + 3, 136LL) == 0; } } } return 0; }
ObjectEqual: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI SETNZ AL MOV RSI,qword ptr [RSI] TEST RSI,RSI SETZ CL TEST AL,CL JNZ 0x0017bb54 TEST RSI,RSI SETNZ AL TEST RDI,RDI SETZ CL TEST CL,AL JNZ 0x0017bb54 TEST RDI,RDI SETZ AL TEST RSI,RSI SETZ CL OR CL,AL JNZ 0x0017baf3 MOV EDX,0x400 CALL 0x0012de20 TEST EAX,EAX JNZ 0x0017bb54 LAB_0017baf3: MOV R15D,dword ptr [R14 + 0x8] CMP R15D,dword ptr [RBX + 0x8] JNZ 0x0017bb54 TEST R15D,R15D JLE 0x0017bb35 MOV R12,qword ptr [R14 + 0x10] MOV R13,qword ptr [RBX + 0x10] XOR EBP,EBP LAB_0017bb0c: MOV RDI,qword ptr [R12 + RBP*0x8] TEST RDI,RDI JZ 0x0017bb2d MOV RSI,qword ptr [R13 + RBP*0x8] TEST RSI,RSI JZ 0x0017bb54 MOV EDX,0x400 CALL 0x0012de20 TEST EAX,EAX JNZ 0x0017bb54 LAB_0017bb2d: INC RBP CMP R15,RBP JNZ 0x0017bb0c LAB_0017bb35: ADD R14,0x18 ADD RBX,0x18 MOV EDX,0x88 MOV RDI,R14 MOV RSI,RBX CALL 0x0012de30 TEST EAX,EAX SETZ AL JMP 0x0017bb56 LAB_0017bb54: XOR EAX,EAX LAB_0017bb56: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ const&, mjpPlugin_ const&) */ int8 mujoco::GlobalTable<mjpPlugin_>::ObjectEqual(mjpPlugin_ *param_1,mjpPlugin_ *param_2) { uint uVar1; char *pcVar2; char *pcVar3; long lVar4; long lVar5; int iVar6; int4 extraout_var; ulong uVar7; pcVar2 = *(char **)param_1; pcVar3 = *(char **)param_2; if (((pcVar2 == (char *)0x0 || pcVar3 != (char *)0x0) && (pcVar2 != (char *)0x0 || pcVar3 == (char *)0x0)) && ((pcVar3 == (char *)0x0 || pcVar2 == (char *)0x0 || (iVar6 = strncmp(pcVar2,pcVar3,0x400), iVar6 == 0)))) { uVar1 = *(uint *)(param_1 + 8); if (uVar1 == *(uint *)(param_2 + 8)) { if (0 < (int)uVar1) { lVar4 = *(long *)(param_1 + 0x10); lVar5 = *(long *)(param_2 + 0x10); uVar7 = 0; do { pcVar2 = *(char **)(lVar4 + uVar7 * 8); if (pcVar2 != (char *)0x0) { pcVar3 = *(char **)(lVar5 + uVar7 * 8); if (pcVar3 == (char *)0x0) { return 0; } iVar6 = strncmp(pcVar2,pcVar3,0x400); if (iVar6 != 0) { return 0; } } uVar7 = uVar7 + 1; } while (uVar1 != uVar7); } iVar6 = bcmp(param_1 + 0x18,param_2 + 0x18,0x88); return CONCAT71((int7)(CONCAT44(extraout_var,iVar6) >> 8),iVar6 == 0); } } return 0; }
47,377
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_create_directory_with_parents(const std::string & path) { #ifdef _WIN32 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; std::wstring wpath = converter.from_bytes(path); // if the path already exists, check whether it's a directory const DWORD attributes = GetFileAttributesW(wpath.c_str()); if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { return true; } size_t pos_slash = 0; // process path from front to back, procedurally creating directories while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) { const std::wstring subpath = wpath.substr(0, pos_slash); const wchar_t * test = subpath.c_str(); const bool success = CreateDirectoryW(test, NULL); if (!success) { const DWORD error = GetLastError(); // if the path already exists, ensure that it's a directory if (error == ERROR_ALREADY_EXISTS) { const DWORD attributes = GetFileAttributesW(subpath.c_str()); if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) { return false; } } else { return false; } } pos_slash += 1; } return true; #else // if the path already exists, check whether it's a directory struct stat info; if (stat(path.c_str(), &info) == 0) { return S_ISDIR(info.st_mode); } size_t pos_slash = 1; // skip leading slashes for directory creation // process path from front to back, procedurally creating directories while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) { const std::string subpath = path.substr(0, pos_slash); struct stat info; // if the path already exists, ensure that it's a directory if (stat(subpath.c_str(), &info) == 0) { if (!S_ISDIR(info.st_mode)) { return false; } } else { // create parent directories const int ret = mkdir(subpath.c_str(), 0755); if (ret != 0) { return false; } } pos_slash += 1; } return true; #endif // _WIN32 }
O1
cpp
fs_create_directory_with_parents(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 $0x148, %rsp # imm = 0x148 movq %rdi, %rbx movq (%rdi), %rdi leaq 0xb8(%rsp), %rsi callq 0x1dab0 testl %eax, %eax je 0x97f21 movl $0x1, %r14d leaq 0x18(%rsp), %r13 leaq 0x8(%rsp), %r15 leaq 0x28(%rsp), %r12 movq %rbx, %rdi movl $0x2f, %esi movq %r14, %rdx callq 0x1dfb0 movq %rax, %r14 cmpq $-0x1, %rax sete %al je 0x97f35 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %r14, %rcx callq 0x1dcb0 movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x1dab0 testl %eax, %eax je 0x97ee5 movq 0x8(%rsp), %rdi movl $0x1ed, %esi # imm = 0x1ED callq 0x1d560 testl %eax, %eax je 0x97ef7 xorl %ebp, %ebp jmp 0x97efd movl 0x40(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax cmpl $0x4000, %eax # imm = 0x4000 jne 0x97ee1 incq %r14 movb $0x1, %bpl movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x97f14 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 testb %bpl, %bpl jne 0x97e8d xorl %eax, %eax jmp 0x97f35 movl $0xf000, %eax # imm = 0xF000 andl 0xd0(%rsp), %eax cmpl $0x4000, %eax # imm = 0x4000 sete %al addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+178h+var_C0] call _stat test eax, eax jz loc_97F21 mov r14d, 1 lea r13, [rsp+178h+var_160] lea r15, [rsp+178h+var_170] lea r12, [rsp+178h+var_150] loc_97E8D: mov rdi, rbx mov esi, 2Fh ; '/' mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r14, rax cmp rax, 0FFFFFFFFFFFFFFFFh setz al jz loc_97F35 mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+178h+var_170] mov rsi, r12 call _stat test eax, eax jz short loc_97EE5 mov rdi, [rsp+178h+var_170] mov esi, 1EDh call _mkdir test eax, eax jz short loc_97EF7 loc_97EE1: xor ebp, ebp jmp short loc_97EFD loc_97EE5: mov eax, [rsp+178h+var_138] mov ecx, 0F000h and eax, ecx cmp eax, 4000h jnz short loc_97EE1 loc_97EF7: inc r14 mov bpl, 1 loc_97EFD: mov rdi, [rsp+178h+var_170]; void * cmp rdi, r13 jz short loc_97F14 mov rsi, [rsp+178h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_97F14: test bpl, bpl jnz loc_97E8D xor eax, eax jmp short loc_97F35 loc_97F21: mov eax, 0F000h and eax, [rsp+178h+var_A8] cmp eax, 4000h setz al loc_97F35: add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool fs_create_directory_with_parents(_QWORD *a1) { long long v1; // r14 bool result; // al char v3; // bp void *v4; // [rsp+8h] [rbp-170h] BYREF long long v5; // [rsp+18h] [rbp-160h] BYREF _BYTE v6[24]; // [rsp+28h] [rbp-150h] BYREF int v7; // [rsp+40h] [rbp-138h] _BYTE v8[24]; // [rsp+B8h] [rbp-C0h] BYREF int v9; // [rsp+D0h] [rbp-A8h] if ( (unsigned int)stat(*a1, v8) ) { v1 = 1LL; while ( 1 ) { v1 = std::string::find(a1, 47LL, v1); result = v1 == -1; if ( v1 == -1 ) return result; std::string::substr(&v4, a1, 0LL, v1); if ( (unsigned int)stat(v4, v6) ) { if ( !(unsigned int)mkdir(v4, 493LL) ) goto LABEL_8; } else if ( (v7 & 0xF000) == 0x4000 ) { LABEL_8: ++v1; v3 = 1; goto LABEL_9; } v3 = 0; LABEL_9: if ( v4 != &v5 ) operator delete(v4, v5 + 1); if ( !v3 ) return 0; } } return (v9 & 0xF000) == 0x4000; }
fs_create_directory_with_parents: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0xb8] CALL 0x0011dab0 TEST EAX,EAX JZ 0x00197f21 MOV R14D,0x1 LEA R13,[RSP + 0x18] LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x28] LAB_00197e8d: MOV RDI,RBX MOV ESI,0x2f MOV RDX,R14 CALL 0x0011dfb0 MOV R14,RAX CMP RAX,-0x1 SETZ AL JZ 0x00197f35 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,R14 CALL 0x0011dcb0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x0011dab0 TEST EAX,EAX JZ 0x00197ee5 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1ed CALL 0x0011d560 TEST EAX,EAX JZ 0x00197ef7 LAB_00197ee1: XOR EBP,EBP JMP 0x00197efd LAB_00197ee5: MOV EAX,dword ptr [RSP + 0x40] MOV ECX,0xf000 AND EAX,ECX CMP EAX,0x4000 JNZ 0x00197ee1 LAB_00197ef7: INC R14 MOV BPL,0x1 LAB_00197efd: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00197f14 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc40 LAB_00197f14: TEST BPL,BPL JNZ 0x00197e8d XOR EAX,EAX JMP 0x00197f35 LAB_00197f21: MOV EAX,0xf000 AND EAX,dword ptr [RSP + 0xd0] CMP EAX,0x4000 SETZ AL LAB_00197f35: ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fs_create_directory_with_parents(std::__cxx11::string const&) */ bool fs_create_directory_with_parents(string *param_1) { int iVar1; long lVar2; bool bVar3; long *local_170 [2]; long local_160 [2]; stat local_150; stat local_c0; iVar1 = stat(*(char **)param_1,&local_c0); if (iVar1 == 0) { bVar3 = (local_c0.st_mode & 0xf000) == 0x4000; } else { do { lVar2 = std::__cxx11::string::find((char)param_1,0x2f); if (lVar2 == -1) { return lVar2 == -1; } std::__cxx11::string::substr((ulong)local_170,(ulong)param_1); iVar1 = stat((char *)local_170[0],&local_150); if (iVar1 == 0) { if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_00197ee1; LAB_00197ef7: bVar3 = true; } else { iVar1 = mkdir((char *)local_170[0],0x1ed); if (iVar1 == 0) goto LAB_00197ef7; LAB_00197ee1: bVar3 = false; } if (local_170[0] != local_160) { operator_delete(local_170[0],local_160[0] + 1); } } while (bVar3); bVar3 = false; } return bVar3; }
47,378
mi_write_keypage
eloqsql/storage/myisam/mi_page.c
int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff) { reg3 uint length; DBUG_ENTER("_mi_write_keypage"); #ifndef FAST /* Safety check */ if (page < info->s->base.keystart || page+keyinfo->block_length > info->state->key_file_length || (page & (MI_MIN_KEY_BLOCK_LENGTH-1))) { DBUG_PRINT("error",("Trying to write inside key status region: key_start: %lu length: %lu page: %lu", (long) info->s->base.keystart, (long) info->state->key_file_length, (long) page)); my_errno=EINVAL; DBUG_RETURN((-1)); } DBUG_PRINT("page",("write page at: %lu",(long) page)); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); #endif if ((length=keyinfo->block_length) > IO_SIZE*2 && info->state->key_file_length != page+length) length= ((mi_getint(buff)+IO_SIZE-1) & (uint) ~(IO_SIZE-1)); DBUG_RETURN((key_cache_write(info->s->key_cache, info->s->kfile, &info->s->dirty_part_map, page, level, (uchar*) buff, length, (uint) keyinfo->block_length, (int) ((info->lock_type != F_UNLCK) || info->s->delay_key_write)))); }
O3
c
mi_write_keypage: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq (%rdi), %r11 cmpq %rdx, 0x108(%r11) jbe 0x83dac callq 0xa1b22 movl $0x16, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x83e52 movq %r8, %r9 movl %ecx, %r8d movq %rdx, %rcx testl $0x3ff, %ecx # imm = 0x3FF jne 0x83d97 movzwl 0xe(%rsi), %r10d leaq (%r10,%rcx), %rax movq 0x8(%rdi), %rdx movq 0x20(%rdx), %rdx cmpq %rdx, %rax ja 0x83d97 cmpl $0x2001, %r10d # imm = 0x2001 setb %sil cmpq %rax, %rdx sete %al orb %sil, %al movl %r10d, %ebx jne 0x83e0a movzbl 0x1(%r9), %eax movzbl (%r9), %edx andl $0x7f, %edx shll $0x8, %edx leal (%rax,%rdx), %ebx addl $0xfff, %ebx # imm = 0xFFF andl $0xf000, %ebx # imm = 0xF000 movq 0x278(%r11), %rax movl 0x350(%r11), %esi leaq 0x280(%r11), %rdx movl $0x1, %r14d cmpl $0x2, 0x1f4(%rdi) jne 0x83e3d xorl %r14d, %r14d cmpb $0x0, 0x383(%r11) setne %r14b subq $0x8, %rsp movq %rax, %rdi pushq %r14 pushq %r10 pushq %rbx callq 0x986ce addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq
_mi_write_keypage: push rbp mov rbp, rsp push r14 push rbx mov r11, [rdi] cmp [r11+108h], rdx jbe short loc_83DAC loc_83D97: call _my_thread_var mov dword ptr [rax], 16h mov eax, 0FFFFFFFFh jmp loc_83E52 loc_83DAC: mov r9, r8 mov r8d, ecx mov rcx, rdx test ecx, 3FFh jnz short loc_83D97 movzx r10d, word ptr [rsi+0Eh] lea rax, [r10+rcx] mov rdx, [rdi+8] mov rdx, [rdx+20h] cmp rax, rdx ja short loc_83D97 cmp r10d, 2001h setb sil cmp rdx, rax setz al or al, sil mov ebx, r10d jnz short loc_83E0A movzx eax, byte ptr [r9+1] movzx edx, byte ptr [r9] and edx, 7Fh shl edx, 8 lea ebx, [rax+rdx] add ebx, 0FFFh and ebx, 0F000h loc_83E0A: mov rax, [r11+278h] mov esi, [r11+350h] lea rdx, [r11+280h] mov r14d, 1 cmp dword ptr [rdi+1F4h], 2 jnz short loc_83E3D xor r14d, r14d cmp byte ptr [r11+383h], 0 setnz r14b loc_83E3D: sub rsp, 8 mov rdi, rax push r14 push r10 push rbx call key_cache_write add rsp, 20h loc_83E52: pop rbx pop r14 pop rbp retn
long long mi_write_keypage(long long *a1, long long a2, unsigned long long a3, unsigned int a4, _BYTE *a5) { long long v5; // r11 long long v8; // r8 long long v10; // r10 long long v11; // rax unsigned long long v12; // rdx long long v13; // rbx _BOOL8 v14; // r14 v5 = *a1; if ( *(_QWORD *)(*a1 + 264) > a3 || (v8 = a4, (a3 & 0x3FF) != 0) || (v10 = *(unsigned __int16 *)(a2 + 14), v11 = v10 + a3, v12 = *(_QWORD *)(a1[1] + 32), v10 + a3 > v12) ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 22; return 0xFFFFFFFFLL; } else { v13 = *(unsigned __int16 *)(a2 + 14); if ( (unsigned int)v10 >= 0x2001 && v12 != v11 ) v13 = (unsigned __int16)((unsigned __int8)a5[1] + ((*a5 & 0x7F) << 8) + 4095) & 0xF000; v14 = 1LL; if ( *((_DWORD *)a1 + 125) == 2 ) v14 = *(_BYTE *)(v5 + 899) != 0; return key_cache_write(*(_QWORD *)(v5 + 632), *(unsigned int *)(v5 + 848), v5 + 640, a3, v8, a5, v13, v10, v14); } }
_mi_write_keypage: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R11,qword ptr [RDI] CMP qword ptr [R11 + 0x108],RDX JBE 0x00183dac LAB_00183d97: CALL 0x001a1b22 MOV dword ptr [RAX],0x16 MOV EAX,0xffffffff JMP 0x00183e52 LAB_00183dac: MOV R9,R8 MOV R8D,ECX MOV RCX,RDX TEST ECX,0x3ff JNZ 0x00183d97 MOVZX R10D,word ptr [RSI + 0xe] LEA RAX,[R10 + RCX*0x1] MOV RDX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDX + 0x20] CMP RAX,RDX JA 0x00183d97 CMP R10D,0x2001 SETC SIL CMP RDX,RAX SETZ AL OR AL,SIL MOV EBX,R10D JNZ 0x00183e0a MOVZX EAX,byte ptr [R9 + 0x1] MOVZX EDX,byte ptr [R9] AND EDX,0x7f SHL EDX,0x8 LEA EBX,[RAX + RDX*0x1] ADD EBX,0xfff AND EBX,0xf000 LAB_00183e0a: MOV RAX,qword ptr [R11 + 0x278] MOV ESI,dword ptr [R11 + 0x350] LEA RDX,[R11 + 0x280] MOV R14D,0x1 CMP dword ptr [RDI + 0x1f4],0x2 JNZ 0x00183e3d XOR R14D,R14D CMP byte ptr [R11 + 0x383],0x0 SETNZ R14B LAB_00183e3d: SUB RSP,0x8 MOV RDI,RAX PUSH R14 PUSH R10 PUSH RBX CALL 0x001986ce ADD RSP,0x20 LAB_00183e52: POP RBX POP R14 POP RBP RET
int8 _mi_write_keypage(long *param_1,long param_2,ulong param_3,int4 param_4,byte *param_5) { ulong uVar1; long lVar2; int4 *puVar3; int8 uVar4; ushort uVar5; ulong uVar6; bool bVar7; lVar2 = *param_1; if ((*(ulong *)(lVar2 + 0x108) <= param_3) && ((param_3 & 0x3ff) == 0)) { uVar5 = *(ushort *)(param_2 + 0xe); uVar6 = (ulong)uVar5; uVar1 = uVar6 + param_3; if (uVar1 <= *(ulong *)(param_1[1] + 0x20)) { if (*(ulong *)(param_1[1] + 0x20) != uVar1 && 0x2000 < uVar5) { uVar5 = (ushort)param_5[1] + (*param_5 & 0x7f) * 0x100 + 0xfff & 0xf000; } bVar7 = true; if (*(int *)((long)param_1 + 500) == 2) { bVar7 = *(char *)(lVar2 + 899) != '\0'; } uVar4 = key_cache_write(*(int8 *)(lVar2 + 0x278),*(int4 *)(lVar2 + 0x350), lVar2 + 0x280,param_3,param_4,param_5,uVar5,uVar6,bVar7); return uVar4; } } puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x16; return 0xffffffff; }
47,379
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $0x2, %ecx jne 0xcb210 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx movq %r12, -0x30(%rbp) testl %eax, %eax jle 0xcb20a cmpq $0x20, -0x38(%rbp) movq -0x30(%rbp), %r12 jne 0xcb20a leaq -0x38(%rbp), %r13 movq -0x30(%rbp), %r12 movq %r12, %rcx movl %eax, %r12d addq %rcx, %r12 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx testl %eax, %eax jle 0xcb20a cmpq $0x20, -0x38(%rbp) je 0xcb1e8 subq -0x30(%rbp), %r12 jmp 0xcb213 xorl %r12d, %r12d movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_scan_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp ecx, 2 jnz short loc_CB210 mov r14, rdx mov r12, rsi mov r15, rdi mov rax, [rdi+0B8h] mov rbx, [rax+28h] lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r14 call rbx mov [rbp+var_30], r12 test eax, eax jle short loc_CB20A cmp [rbp+var_38], 20h ; ' ' mov r12, [rbp+var_30] jnz short loc_CB20A lea r13, [rbp+var_38] mov r12, [rbp+var_30] loc_CB1E8: mov rcx, r12 mov r12d, eax add r12, rcx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 call rbx test eax, eax jle short loc_CB20A cmp [rbp+var_38], 20h ; ' ' jz short loc_CB1E8 loc_CB20A: sub r12, [rbp+var_30] jmp short loc_CB213 loc_CB210: xor r12d, r12d loc_CB213: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { long long v5; // r12 long long ( *v6)(long long, long long *, long long, long long); // rbx int v7; // eax long long v10; // [rsp+8h] [rbp-38h] BYREF long long v11; // [rsp+10h] [rbp-30h] if ( a4 != 2 ) return 0LL; v5 = a2; v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = v6(a1, &v10, a2, a3); v11 = a2; if ( v7 > 0 ) { v5 = v11; if ( v10 == 32 ) { v5 = v11; do { v5 += (unsigned int)v7; v7 = v6(a1, &v10, v5, a3); } while ( v7 > 0 && v10 == 32 ); } } return v5 - v11; }
my_scan_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP ECX,0x2 JNZ 0x001cb210 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R14 CALL RBX MOV qword ptr [RBP + -0x30],R12 TEST EAX,EAX JLE 0x001cb20a CMP qword ptr [RBP + -0x38],0x20 MOV R12,qword ptr [RBP + -0x30] JNZ 0x001cb20a LEA R13,[RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] LAB_001cb1e8: MOV RCX,R12 MOV R12D,EAX ADD R12,RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 CALL RBX TEST EAX,EAX JLE 0x001cb20a CMP qword ptr [RBP + -0x38],0x20 JZ 0x001cb1e8 LAB_001cb20a: SUB R12,qword ptr [RBP + -0x30] JMP 0x001cb213 LAB_001cb210: XOR R12D,R12D LAB_001cb213: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; uint uVar2; long local_40; long local_38; if (param_4 == 2) { pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); local_38 = param_2; if ((0 < (int)uVar2) && (local_40 == 0x20)) { do { param_2 = (ulong)uVar2 + param_2; uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); if ((int)uVar2 < 1) break; } while (local_40 == 0x20); } param_2 = param_2 - local_38; } else { param_2 = 0; } return param_2; }
47,380
convert_to_datetime
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void convert_to_datetime(MYSQL_TIME *t, unsigned char **row, uint len, enum enum_field_types type) { memset(t, 0, sizeof(MYSQL_TIME)); /* binary protocol for datetime: 4-bytes: DATE 7-bytes: DATE + TIME >7 bytes: DATE + TIME with second_part */ if (len) { unsigned char *to= *row; int has_date= 0; uint offset= 7; if (type == MYSQL_TYPE_TIME) { t->neg= to[0]; t->day= (ulong) sint4korr(to + 1); t->time_type= MYSQL_TIMESTAMP_TIME; offset= 8; to++; } else { t->year= (uint) sint2korr(to); t->month= (uint) to[2]; t->day= (uint) to[3]; t->time_type= MYSQL_TIMESTAMP_DATE; if (type == MYSQL_TYPE_DATE) return; has_date= 1; } if (len > 4) { t->hour= (uint) to[4]; if (type == MYSQL_TYPE_TIME) t->hour+= t->day * 24; t->minute= (uint) to[5]; t->second= (uint) to[6]; if (has_date) t->time_type= MYSQL_TIMESTAMP_DATETIME; } if (len > offset) { t->second_part= (ulong)sint4korr(to+7); } } }
O0
c
convert_to_datetime: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0x352c0 cmpl $0x0, -0x14(%rbp) je 0x51c0a movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl $0x7, -0x28(%rbp) cmpl $0xb, -0x18(%rbp) jne 0x51b09 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x20(%rax) movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x4(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax cltq movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x2, 0x24(%rax) movl $0x8, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x51b65 movq -0x20(%rbp), %rax movzbl (%rax), %eax cwtl movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movswl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movswl %ax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x20(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x24(%rax) cmpl $0xa, -0x18(%rbp) jne 0x51b5e jmp 0x51c0a movl $0x1, -0x24(%rbp) cmpl $0x4, -0x14(%rbp) jbe 0x51bc3 movq -0x20(%rbp), %rax movzbl 0x4(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) cmpl $0xb, -0x18(%rbp) jne 0x51b92 movq -0x8(%rbp), %rax imull $0x18, 0x8(%rax), %ecx movq -0x8(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x20(%rbp), %rax movzbl 0x5(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movzbl 0x6(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) cmpl $0x0, -0x24(%rbp) je 0x51bc1 movq -0x8(%rbp), %rax movl $0x1, 0x24(%rax) jmp 0x51bc3 movl -0x14(%rbp), %eax cmpl -0x28(%rbp), %eax jbe 0x51c08 movq -0x20(%rbp), %rax movzbl 0x7(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x8(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x9(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0xa(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) jmp 0x51c0a addq $0x30, %rsp popq %rbp retq
convert_to_datetime: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rdi, [rbp+var_8] xor esi, esi mov edx, 28h ; '(' call _memset cmp [rbp+var_14], 0 jz loc_51C0A mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov [rbp+var_24], 0 mov [rbp+var_28], 7 cmp [rbp+var_18], 0Bh jnz short loc_51B09 mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_8] mov [rax+20h], cl mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+3] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+4] movsx ecx, cx shl ecx, 18h add eax, ecx cdqe mov ecx, eax mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 2 mov [rbp+var_28], 8 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_51B65 loc_51B09: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cwde mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movsx ecx, cx shl ecx, 8 add eax, ecx movsx ecx, ax mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov rax, [rbp+var_8] mov [rax+4], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 0 cmp [rbp+var_18], 0Ah jnz short loc_51B5E jmp loc_51C0A loc_51B5E: mov [rbp+var_24], 1 loc_51B65: cmp [rbp+var_14], 4 jbe short loc_51BC3 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+4] mov rax, [rbp+var_8] mov [rax+0Ch], ecx cmp [rbp+var_18], 0Bh jnz short loc_51B92 mov rax, [rbp+var_8] imul ecx, [rax+8], 18h mov rax, [rbp+var_8] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_51B92: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+5] mov rax, [rbp+var_8] mov [rax+10h], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+6] mov rax, [rbp+var_8] mov [rax+14h], ecx cmp [rbp+var_24], 0 jz short loc_51BC1 mov rax, [rbp+var_8] mov dword ptr [rax+24h], 1 loc_51BC1: jmp short $+2 loc_51BC3: mov eax, [rbp+var_14] cmp eax, [rbp+var_28] jbe short loc_51C08 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+7] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+8] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+9] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+0Ah] movsx ecx, cx shl ecx, 18h add eax, ecx movsxd rcx, eax mov rax, [rbp+var_8] mov [rax+18h], rcx loc_51C08: jmp short $+2 loc_51C0A: add rsp, 30h pop rbp retn
long long convert_to_datetime(long long a1, unsigned __int8 **a2, unsigned int a3, int a4) { long long result; // rax unsigned int v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+Ch] [rbp-24h] unsigned __int8 *v7; // [rsp+10h] [rbp-20h] result = memset(a1, 0LL, 40LL); if ( a3 ) { v7 = *a2; v6 = 0; v5 = 7; if ( a4 == 11 ) { *(_BYTE *)(a1 + 32) = *v7; *(_DWORD *)(a1 + 8) = (v7[4] << 24) + (v7[3] << 16) + (v7[2] << 8) + v7[1]; *(_DWORD *)(a1 + 36) = 2; v5 = 8; ++v7; } else { *(_DWORD *)a1 = (__int16)((v7[1] << 8) + *v7); *(_DWORD *)(a1 + 4) = v7[2]; *(_DWORD *)(a1 + 8) = v7[3]; result = a1; *(_DWORD *)(a1 + 36) = 0; if ( a4 == 10 ) return result; v6 = 1; } if ( a3 > 4 ) { *(_DWORD *)(a1 + 12) = v7[4]; if ( a4 == 11 ) *(_DWORD *)(a1 + 12) += 24 * *(_DWORD *)(a1 + 8); *(_DWORD *)(a1 + 16) = v7[5]; *(_DWORD *)(a1 + 20) = v7[6]; if ( v6 ) *(_DWORD *)(a1 + 36) = 1; } result = a3; if ( a3 > v5 ) { result = a1; *(_QWORD *)(a1 + 24) = (v7[10] << 24) + (v7[9] << 16) + (v7[8] << 8) + v7[7]; } } return result; }
convert_to_datetime: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x28 CALL 0x001352c0 CMP dword ptr [RBP + -0x14],0x0 JZ 0x00151c0a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x28],0x7 CMP dword ptr [RBP + -0x18],0xb JNZ 0x00151b09 MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x20],CL MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX CDQE MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x2 MOV dword ptr [RBP + -0x28],0x8 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00151b65 LAB_00151b09: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CWDE MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVSX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVSX ECX,AX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x0 CMP dword ptr [RBP + -0x18],0xa JNZ 0x00151b5e JMP 0x00151c0a LAB_00151b5e: MOV dword ptr [RBP + -0x24],0x1 LAB_00151b65: CMP dword ptr [RBP + -0x14],0x4 JBE 0x00151bc3 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX CMP dword ptr [RBP + -0x18],0xb JNZ 0x00151b92 MOV RAX,qword ptr [RBP + -0x8] IMUL ECX,dword ptr [RAX + 0x8],0x18 MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_00151b92: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x5] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x6] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00151bc1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x1 LAB_00151bc1: JMP 0x00151bc3 LAB_00151bc3: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x28] JBE 0x00151c08 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x8] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x9] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0xa] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX LAB_00151c08: JMP 0x00151c0a LAB_00151c0a: ADD RSP,0x30 POP RBP RET
void convert_to_datetime(int *param_1,int8 *param_2,uint param_3,int param_4) { bool bVar1; uint local_30; byte *local_28; memset(param_1,0,0x28); if (param_3 != 0) { local_28 = (byte *)*param_2; bVar1 = false; local_30 = 7; if (param_4 == 0xb) { *(byte *)(param_1 + 8) = *local_28; param_1[2] = (uint)local_28[1] + (uint)local_28[2] * 0x100 + (uint)local_28[3] * 0x10000 + (short)(ushort)local_28[4] * 0x1000000; param_1[9] = 2; local_30 = 8; local_28 = local_28 + 1; } else { *param_1 = (int)(short)((ushort)*local_28 + (short)((int)(short)(ushort)local_28[1] << 8)); param_1[1] = (uint)local_28[2]; param_1[2] = (uint)local_28[3]; param_1[9] = 0; if (param_4 == 10) { return; } bVar1 = true; } if (4 < param_3) { param_1[3] = (uint)local_28[4]; if (param_4 == 0xb) { param_1[3] = param_1[2] * 0x18 + param_1[3]; } param_1[4] = (uint)local_28[5]; param_1[5] = (uint)local_28[6]; if (bVar1) { param_1[9] = 1; } } if (local_30 < param_3) { *(long *)(param_1 + 6) = (long)(int)((uint)local_28[7] + (uint)local_28[8] * 0x100 + (uint)local_28[9] * 0x10000 + (short)(ushort)local_28[10] * 0x1000000); } } return; }
47,381
ftb_check_phrase_internal
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_check_phrase_internal(MYSQL_FTPARSER_PARAM *param, const char *document, int len) { FT_WORD word; MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam; const uchar *docend= (uchar*) document + len; while (ft_simple_get_word(phrase_param->cs, (uchar**) &document, docend, &word, FALSE)) { param->mysql_add_word(param, (char*) word.pos, (int)word.len, 0); if (phrase_param->match) break; } return 0; }
O0
c
ftb_check_phrase_internal: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rdi movq -0x40(%rbp), %rdx leaq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rcx xorl %r8d, %r8d callq 0xa40b0 cmpb $0x0, %al je 0xa1e16 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rcx movl %ecx, %edx xorl %ecx, %ecx callq *%rax movq -0x38(%rbp), %rax cmpl $0x0, 0x20(%rax) je 0xa1e14 jmp 0xa1e16 jmp 0xa1dce xorl %eax, %eax addq $0x40, %rsp popq %rbp retq nop
ftb_check_phrase_internal: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] add rax, rcx mov [rbp+var_40], rax loc_A1DCE: mov rax, [rbp+var_38] mov rdi, [rax+10h] mov rdx, [rbp+var_40] lea rsi, [rbp+var_10] lea rcx, [rbp+var_30] xor r8d, r8d call ft_simple_get_word cmp al, 0 jz short loc_A1E16 mov rax, [rbp+var_8] mov rax, [rax+8] mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rcx, [rbp+var_20] mov edx, ecx xor ecx, ecx call rax mov rax, [rbp+var_38] cmp dword ptr [rax+20h], 0 jz short loc_A1E14 jmp short loc_A1E16 loc_A1E14: jmp short loc_A1DCE loc_A1E16: xor eax, eax add rsp, 40h pop rbp retn
long long ftb_check_phrase_internal(long long a1, long long a2, int a3) { long long v4; // [rsp+0h] [rbp-40h] long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] BYREF long long v7; // [rsp+20h] [rbp-20h] int v8; // [rsp+2Ch] [rbp-14h] long long v9; // [rsp+30h] [rbp-10h] BYREF long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v8 = a3; v5 = *(_QWORD *)(a1 + 24); v4 = a3 + a2; do { if ( !(unsigned __int8)ft_simple_get_word(*(_QWORD *)(v5 + 16), &v9, v4, &v6, 0LL) ) break; (*(void ( **)(long long, long long, _QWORD, _QWORD))(v10 + 8))(v10, v6, (unsigned int)v7, 0LL); } while ( !*(_DWORD *)(v5 + 32) ); return 0LL; }
ftb_check_phrase_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001a1dce: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x10] LEA RCX,[RBP + -0x30] XOR R8D,R8D CALL 0x001a40b0 CMP AL,0x0 JZ 0x001a1e16 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV EDX,ECX XOR ECX,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x20],0x0 JZ 0x001a1e14 JMP 0x001a1e16 LAB_001a1e14: JMP 0x001a1dce LAB_001a1e16: XOR EAX,EAX ADD RSP,0x40 POP RBP RET
int8 ftb_check_phrase_internal(long param_1,long param_2,int param_3) { long lVar1; char cVar2; int8 local_38 [2]; ulong local_28; int local_1c; long local_18; long local_10; lVar1 = *(long *)(param_1 + 0x18); local_1c = param_3; local_18 = param_2; local_10 = param_1; do { cVar2 = ft_simple_get_word(*(int8 *)(lVar1 + 0x10),&local_18,param_2 + param_3,local_38,0) ; if (cVar2 == '\0') { return 0; } (**(code **)(local_10 + 8))(local_10,local_38[0],local_28 & 0xffffffff,0); } while (*(int *)(lVar1 + 0x20) == 0); return 0; }
47,382
LefDefParser::lefwEndArray(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwEndArray(const char *arrayName) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_ARRAY_START && lefwState != LEFW_ARRAY) return LEFW_BAD_ORDER; if (!arrayName || arrayName == 0 || *arrayName == 0) return LEFW_BAD_DATA; if (lefwIsFloorp || lefwIsArrayDef) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "END %s\n\n", arrayName); else fprintf(lefwFile, "END %s\n\n", arrayName); lefwLines++; lefwState = LEFW_ARRAY_END; return LEFW_OK; }
O3
cpp
LefDefParser::lefwEndArray(char const*): pushq %rbx movq %rdi, %rdx leaq 0x12e2d(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0x12034 leaq 0x1306e(%rip), %rbx # 0x25050 movl (%rbx), %ecx movl $0x2, %eax cmpl $0x13, %ecx je 0x11ff3 cmpl $0x2, %ecx jne 0x12039 movl $0x3, %eax testq %rdx, %rdx je 0x12039 cmpb $0x0, (%rdx) je 0x12039 leaq 0x13083(%rip), %rax # 0x2508c leaq 0x1306c(%rip), %rcx # 0x2507c movl (%rcx), %ecx orl (%rax), %ecx movl $0x2, %eax jne 0x12039 cmpb $0x1, 0x130ca(%rip) # 0x250ec jne 0x1203b leaq 0x93b0(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x18c35 jmp 0x12049 movl $0x1, %eax popq %rbx retq leaq 0x9399(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x10f0 leaq 0x12ffc(%rip), %rax # 0x2504c incl (%rax) movl $0x50, (%rbx) xorl %eax, %eax jmp 0x12039
_ZN12LefDefParser12lefwEndArrayEPKc: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_12034 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rbx] mov eax, 2 cmp ecx, 13h jz short loc_11FF3 cmp ecx, 2 jnz short loc_12039 loc_11FF3: mov eax, 3 test rdx, rdx jz short loc_12039 cmp byte ptr [rdx], 0 jz short loc_12039 lea rax, _ZN12LefDefParser12lefwIsFloorpE; LefDefParser::lefwIsFloorp lea rcx, _ZN12LefDefParser14lefwIsArrayDefE; LefDefParser::lefwIsArrayDef mov ecx, [rcx] or ecx, [rax] mov eax, 2 jnz short loc_12039 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_1203B lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_12049 loc_12034: mov eax, 1 loc_12039: pop rbx retn loc_1203B: lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _fprintf loc_12049: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 50h ; 'P' xor eax, eax jmp short loc_12039
long long LefDefParser::lefwEndArray( LefDefParser *this, const char *a2, long long a3, long long a4, int a5, int a6) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState == 19 || LefDefParser::lefwState == 2 ) { result = 3LL; if ( this ) { if ( *(_BYTE *)this ) { result = 2LL; if ( !(LefDefParser::lefwIsFloorp | LefDefParser::lefwIsArrayDef) ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"END %s\n\n", (_DWORD)this, LefDefParser::lefwIsFloorp | LefDefParser::lefwIsArrayDef, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "END %s\n\n", (const char *)this); ++LefDefParser::lefwLines; LefDefParser::lefwState = 80; return 0LL; } } } } return result; }
lefwEndArray: PUSH RBX MOV RDX,RDI LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00112034 LEA RBX,[0x125050] MOV ECX,dword ptr [RBX] MOV EAX,0x2 CMP ECX,0x13 JZ 0x00111ff3 CMP ECX,0x2 JNZ 0x00112039 LAB_00111ff3: MOV EAX,0x3 TEST RDX,RDX JZ 0x00112039 CMP byte ptr [RDX],0x0 JZ 0x00112039 LEA RAX,[0x12508c] LEA RCX,[0x12507c] MOV ECX,dword ptr [RCX] OR ECX,dword ptr [RAX] MOV EAX,0x2 JNZ 0x00112039 CMP byte ptr [0x001250ec],0x1 JNZ 0x0011203b LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x00118c35 JMP 0x00112049 LAB_00112034: MOV EAX,0x1 LAB_00112039: POP RBX RET LAB_0011203b: LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x001010f0 LAB_00112049: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX],0x50 XOR EAX,EAX JMP 0x00112039
/* LefDefParser::lefwEndArray(char const*) */ int8 LefDefParser::lefwEndArray(char *param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if ((((lefwState == 0x13) || (lefwState == 2)) && (uVar1 = 3, param_1 != (char *)0x0)) && (*param_1 != '\0')) { uVar1 = 2; if (lefwIsArrayDef == 0 && lefwIsFloorp == 0) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"END %s\n\n"); } else { fprintf(lefwFile,"END %s\n\n"); } lefwLines = lefwLines + 1; lefwState = 0x50; uVar1 = 0; } } } return uVar1; }
47,383
move_to_next_bitmap
eloqsql/storage/maria/ma_bitmap.c
static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap) { pgcache_page_no_t page= bitmap->page; MARIA_STATE_INFO *state= &info->s->state; DBUG_ENTER("move_to_next_bitmap"); if (state->first_bitmap_with_space != ~(pgcache_page_no_t) 0 && state->first_bitmap_with_space != page) { page= state->first_bitmap_with_space; state->first_bitmap_with_space= ~(pgcache_page_no_t) 0; DBUG_ASSERT(page % bitmap->pages_covered == 0); } else { page+= bitmap->pages_covered; DBUG_ASSERT(page % bitmap->pages_covered == 0); } DBUG_RETURN(_ma_change_bitmap_page(info, bitmap, page)); }
O0
c
move_to_next_bitmap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq $-0x1, 0xd0(%rax) je 0x66c18 movq -0x20(%rbp), %rax movq 0xd0(%rax), %rax cmpq -0x18(%rbp), %rax je 0x66c18 movq -0x20(%rbp), %rax movq 0xd0(%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq $-0x1, 0xd0(%rax) jmp 0x66c16 jmp 0x66c2f movq -0x10(%rbp), %rax movq 0x138(%rax), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x66c2d jmp 0x66c2f jmp 0x66c31 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x65310 movb %al, -0x21(%rbp) movb -0x21(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
move_to_next_bitmap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp qword ptr [rax+0D0h], 0FFFFFFFFFFFFFFFFh jz short loc_66C18 mov rax, [rbp+var_20] mov rax, [rax+0D0h] cmp rax, [rbp+var_18] jz short loc_66C18 mov rax, [rbp+var_20] mov rax, [rax+0D0h] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov qword ptr [rax+0D0h], 0FFFFFFFFFFFFFFFFh jmp short $+2 loc_66C16: jmp short loc_66C2F loc_66C18: mov rax, [rbp+var_10] mov rax, [rax+138h] add rax, [rbp+var_18] mov [rbp+var_18], rax jmp short $+2 loc_66C2D: jmp short $+2 loc_66C2F: jmp short $+2 loc_66C31: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _ma_change_bitmap_page mov [rbp+var_21], al mov al, [rbp+var_21] add rsp, 30h pop rbp retn
char move_to_next_bitmap(long long *a1, long long a2) { long long v3; // [rsp+10h] [rbp-20h] long long v4; // [rsp+18h] [rbp-18h] long long v5; // [rsp+18h] [rbp-18h] v4 = *(_QWORD *)(a2 + 16); v3 = *a1; if ( *(_QWORD *)(*a1 + 208) == -1LL || *(_QWORD *)(v3 + 208) == v4 ) { v5 = v4 + *(_QWORD *)(a2 + 312); } else { v5 = *(_QWORD *)(v3 + 208); *(_QWORD *)(v3 + 208) = -1LL; } return ma_change_bitmap_page(a1, a2, v5); }
move_to_next_bitmap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0xd0],-0x1 JZ 0x00166c18 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xd0] CMP RAX,qword ptr [RBP + -0x18] JZ 0x00166c18 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0xd0],-0x1 JMP 0x00166c16 LAB_00166c16: JMP 0x00166c2f LAB_00166c18: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x138] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX JMP 0x00166c2d LAB_00166c2d: JMP 0x00166c2f LAB_00166c2f: JMP 0x00166c31 LAB_00166c31: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00165310 MOV byte ptr [RBP + -0x21],AL MOV AL,byte ptr [RBP + -0x21] ADD RSP,0x30 POP RBP RET
int8 move_to_next_bitmap(long *param_1,long param_2) { long lVar1; int8 uVar2; int8 local_20; lVar1 = *param_1; if ((*(long *)(lVar1 + 0xd0) == -1) || (*(long *)(lVar1 + 0xd0) == *(long *)(param_2 + 0x10))) { local_20 = *(long *)(param_2 + 0x138) + *(long *)(param_2 + 0x10); } else { local_20 = *(long *)(lVar1 + 0xd0); *(int8 *)(lVar1 + 0xd0) = 0xffffffffffffffff; } uVar2 = _ma_change_bitmap_page(param_1,param_2,local_20); return uVar2; }
47,384
move_to_next_bitmap
eloqsql/storage/maria/ma_bitmap.c
static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap) { pgcache_page_no_t page= bitmap->page; MARIA_STATE_INFO *state= &info->s->state; DBUG_ENTER("move_to_next_bitmap"); if (state->first_bitmap_with_space != ~(pgcache_page_no_t) 0 && state->first_bitmap_with_space != page) { page= state->first_bitmap_with_space; state->first_bitmap_with_space= ~(pgcache_page_no_t) 0; DBUG_ASSERT(page % bitmap->pages_covered == 0); } else { page+= bitmap->pages_covered; DBUG_ASSERT(page % bitmap->pages_covered == 0); } DBUG_RETURN(_ma_change_bitmap_page(info, bitmap, page)); }
O3
c
move_to_next_bitmap: pushq %rbp movq %rsp, %rbp movq 0x10(%rsi), %rax movq (%rdi), %rcx movq 0xd0(%rcx), %rdx cmpq $-0x1, %rdx sete %r8b cmpq %rax, %rdx sete %r9b orb %r8b, %r9b je 0x55a8e addq 0x138(%rsi), %rax movq %rax, %rdx jmp 0x55a99 movq $-0x1, 0xd0(%rcx) popq %rbp jmp 0x549d5
move_to_next_bitmap: push rbp mov rbp, rsp mov rax, [rsi+10h] mov rcx, [rdi] mov rdx, [rcx+0D0h] cmp rdx, 0FFFFFFFFFFFFFFFFh setz r8b cmp rdx, rax setz r9b or r9b, r8b jz short loc_55A8E add rax, [rsi+138h] mov rdx, rax jmp short loc_55A99 loc_55A8E: mov qword ptr [rcx+0D0h], 0FFFFFFFFFFFFFFFFh loc_55A99: pop rbp jmp _ma_change_bitmap_page
long long move_to_next_bitmap(long long *a1, long long a2) { long long v2; // rax unsigned long long v3; // rdx v2 = *(_QWORD *)(a2 + 16); v3 = *(_QWORD *)(*a1 + 208); if ( v3 == -1LL || v3 == v2 ) v3 = *(_QWORD *)(a2 + 312) + v2; else *(_QWORD *)(*a1 + 208) = -1LL; return ma_change_bitmap_page(a1, a2, v3); }
move_to_next_bitmap: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0x10] MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RCX + 0xd0] CMP RDX,-0x1 SETZ R8B CMP RDX,RAX SETZ R9B OR R9B,R8B JZ 0x00155a8e ADD RAX,qword ptr [RSI + 0x138] MOV RDX,RAX JMP 0x00155a99 LAB_00155a8e: MOV qword ptr [RCX + 0xd0],-0x1 LAB_00155a99: POP RBP JMP 0x001549d5
void move_to_next_bitmap(long *param_1,long param_2) { long lVar1; lVar1 = *(long *)(*param_1 + 0xd0); if (lVar1 == *(long *)(param_2 + 0x10) || lVar1 == -1) { lVar1 = *(long *)(param_2 + 0x10) + *(long *)(param_2 + 0x138); } else { *(int8 *)(*param_1 + 0xd0) = 0xffffffffffffffff; } _ma_change_bitmap_page(param_1,param_2,lVar1); return; }
47,385
POINTonE1_from_Jacobian
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c
static void POINTonE1_from_Jacobian(POINTonE1 *out, const POINTonE1 *in) { vec384 Z, ZZ; limb_t inf = vec_is_zero(in->Z, sizeof(in->Z)); reciprocal_fp(Z, in->Z); /* 1/Z */ sqr_fp(ZZ, Z); mul_fp(out->X, in->X, ZZ); /* X = X/Z^2 */ mul_fp(ZZ, ZZ, Z); mul_fp(out->Y, in->Y, ZZ); /* Y = Y/Z^3 */ vec_select(out->Z, in->Z, BLS12_381_G1.Z, sizeof(BLS12_381_G1.Z), inf); /* Z = inf ? 0 : 1 */ }
O0
c
POINTonE1_from_Jacobian: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0x60, %rdi movl $0x30, %esi callq 0xa7680 movq %rax, -0x78(%rbp) leaq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x60, %rsi callq 0xb0f80 leaq -0x70(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0xb0f10 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x70(%rbp), %rdx callq 0xb4a30 leaq -0x70(%rbp), %rdi leaq -0x70(%rbp), %rsi leaq -0x40(%rbp), %rdx callq 0xb4a30 movq -0x8(%rbp), %rdi addq $0x30, %rdi movq -0x10(%rbp), %rsi addq $0x30, %rsi leaq -0x70(%rbp), %rdx callq 0xb4a30 movq -0x8(%rbp), %rdi addq $0x60, %rdi movq -0x10(%rbp), %rsi addq $0x60, %rsi movq -0x78(%rbp), %r8 leaq 0x3e993(%rip), %rdx # 0xe5ce0 addq $0x60, %rdx movl $0x30, %ecx callq 0xa74f0 addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
POINTonE1_from_Jacobian: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] add rdi, 60h ; '`' mov esi, 30h ; '0' call vec_is_zero mov [rbp+var_78], rax lea rdi, [rbp+var_40] mov rsi, [rbp+var_10] add rsi, 60h ; '`' call reciprocal_fp lea rdi, [rbp+var_70] lea rsi, [rbp+var_40] call sqr_fp mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_70] call mul_fp lea rdi, [rbp+var_70] lea rsi, [rbp+var_70] lea rdx, [rbp+var_40] call mul_fp mov rdi, [rbp+var_8] add rdi, 30h ; '0' mov rsi, [rbp+var_10] add rsi, 30h ; '0' lea rdx, [rbp+var_70] call mul_fp mov rdi, [rbp+var_8] add rdi, 60h ; '`' mov rsi, [rbp+var_10] add rsi, 60h ; '`' mov r8, [rbp+var_78] lea rdx, BLS12_381_G1 add rdx, 60h ; '`' mov ecx, 30h ; '0' call vec_select add rsp, 80h pop rbp retn
long long POINTonE1_from_Jacobian(long long a1, long long a2) { long long is_zero; // [rsp+8h] [rbp-78h] _BYTE v4[48]; // [rsp+10h] [rbp-70h] BYREF _BYTE v5[48]; // [rsp+40h] [rbp-40h] BYREF long long v6; // [rsp+70h] [rbp-10h] long long v7; // [rsp+78h] [rbp-8h] v7 = a1; v6 = a2; is_zero = vec_is_zero(a2 + 96, 48LL); reciprocal_fp(v5, a2 + 96); sqr_fp(v4, v5); mul_fp(v7, v6, v4); mul_fp(v4, v4, v5); mul_fp(v7 + 48, v6 + 48, v4); return vec_select(v7 + 96, v6 + 96, (char *)&BLS12_381_G1 + 96, 48LL, is_zero); }
POINTonE1_from_Jacobian: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x60 MOV ESI,0x30 CALL 0x001a7680 MOV qword ptr [RBP + -0x78],RAX LEA RDI,[RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x60 CALL 0x001b0f80 LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x40] CALL 0x001b0f10 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x70] CALL 0x001b4a30 LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x70] LEA RDX,[RBP + -0x40] CALL 0x001b4a30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x30 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x30 LEA RDX,[RBP + -0x70] CALL 0x001b4a30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x60 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x60 MOV R8,qword ptr [RBP + -0x78] LEA RDX,[0x1e5ce0] ADD RDX,0x60 MOV ECX,0x30 CALL 0x001a74f0 ADD RSP,0x80 POP RBP RET
void POINTonE1_from_Jacobian(long param_1,long param_2) { int8 uVar1; int1 local_78 [48]; int1 local_48 [48]; long local_18; long local_10; local_18 = param_2; local_10 = param_1; uVar1 = vec_is_zero(param_2 + 0x60,0x30); reciprocal_fp(local_48,local_18 + 0x60); sqr_fp(local_78,local_48); mul_fp(local_10,local_18,local_78); mul_fp(local_78,local_78,local_48); mul_fp(local_10 + 0x30,local_18 + 0x30,local_78); vec_select(local_10 + 0x60,local_18 + 0x60,0x1e5d40,0x30,uVar1); return; }
47,386
OpenGL_Init_2_1
SDL3Lite/dependencies/OpenGL.h
void OpenGL_Init_2_1() { glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)OpenGL_Load("glUniformMatrix2x3fv"); glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)OpenGL_Load("glUniformMatrix3x2fv"); glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)OpenGL_Load("glUniformMatrix2x4fv"); glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)OpenGL_Load("glUniformMatrix4x2fv"); glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)OpenGL_Load("glUniformMatrix3x4fv"); glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)OpenGL_Load("glUniformMatrix4x3fv"); }
O0
c
OpenGL_Init_2_1: pushq %rbp movq %rsp, %rbp leaq 0xfb72(%rip), %rdi # 0x30dad callq 0x1e910 movq %rax, 0x1b1f9(%rip) # 0x3c440 leaq 0xfb74(%rip), %rdi # 0x30dc2 callq 0x1e910 movq %rax, 0x1b1ee(%rip) # 0x3c448 leaq 0xfb76(%rip), %rdi # 0x30dd7 callq 0x1e910 movq %rax, 0x1b1e3(%rip) # 0x3c450 leaq 0xfb78(%rip), %rdi # 0x30dec callq 0x1e910 movq %rax, 0x1b1d8(%rip) # 0x3c458 leaq 0xfb7a(%rip), %rdi # 0x30e01 callq 0x1e910 movq %rax, 0x1b1cd(%rip) # 0x3c460 leaq 0xfb7c(%rip), %rdi # 0x30e16 callq 0x1e910 movq %rax, 0x1b1c2(%rip) # 0x3c468 popq %rbp retq nopl (%rax,%rax)
OpenGL_Init_2_1: push rbp mov rbp, rsp lea rdi, aGluniformmatri_20; "glUniformMatrix2x3fv" call OpenGL_Load mov cs:glUniformMatrix2x3fv, rax lea rdi, aGluniformmatri_21; "glUniformMatrix3x2fv" call OpenGL_Load mov cs:glUniformMatrix3x2fv, rax lea rdi, aGluniformmatri_22; "glUniformMatrix2x4fv" call OpenGL_Load mov cs:glUniformMatrix2x4fv, rax lea rdi, aGluniformmatri_23; "glUniformMatrix4x2fv" call OpenGL_Load mov cs:glUniformMatrix4x2fv, rax lea rdi, aGluniformmatri_24; "glUniformMatrix3x4fv" call OpenGL_Load mov cs:glUniformMatrix3x4fv, rax lea rdi, aGluniformmatri_25; "glUniformMatrix4x3fv" call OpenGL_Load mov cs:glUniformMatrix4x3fv, rax pop rbp retn
long long OpenGL_Init_2_1() { long long result; // rax glUniformMatrix2x3fv = OpenGL_Load("glUniformMatrix2x3fv"); glUniformMatrix3x2fv = OpenGL_Load("glUniformMatrix3x2fv"); glUniformMatrix2x4fv = OpenGL_Load("glUniformMatrix2x4fv"); glUniformMatrix4x2fv = OpenGL_Load("glUniformMatrix4x2fv"); glUniformMatrix3x4fv = OpenGL_Load("glUniformMatrix3x4fv"); result = OpenGL_Load("glUniformMatrix4x3fv"); glUniformMatrix4x3fv = result; return result; }
OpenGL_Init_2_1: PUSH RBP MOV RBP,RSP LEA RDI,[0x130dad] CALL 0x0011e910 MOV qword ptr [0x0013c440],RAX LEA RDI,[0x130dc2] CALL 0x0011e910 MOV qword ptr [0x0013c448],RAX LEA RDI,[0x130dd7] CALL 0x0011e910 MOV qword ptr [0x0013c450],RAX LEA RDI,[0x130dec] CALL 0x0011e910 MOV qword ptr [0x0013c458],RAX LEA RDI,[0x130e01] CALL 0x0011e910 MOV qword ptr [0x0013c460],RAX LEA RDI,[0x130e16] CALL 0x0011e910 MOV qword ptr [0x0013c468],RAX POP RBP RET
void OpenGL_Init_2_1(void) { glUniformMatrix2x3fv = OpenGL_Load("glUniformMatrix2x3fv"); glUniformMatrix3x2fv = OpenGL_Load("glUniformMatrix3x2fv"); glUniformMatrix2x4fv = OpenGL_Load("glUniformMatrix2x4fv"); glUniformMatrix4x2fv = OpenGL_Load("glUniformMatrix4x2fv"); glUniformMatrix3x4fv = OpenGL_Load("glUniformMatrix3x4fv"); glUniformMatrix4x3fv = OpenGL_Load("glUniformMatrix4x3fv"); return; }
47,387
mi_ck_real_delete
eloqsql/storage/myisam/mi_delete.c
static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t *root) { int error; uint nod_flag; my_off_t old_root; uchar *root_buff; DBUG_ENTER("_mi_ck_real_delete"); if ((old_root=*root) == HA_OFFSET_ERROR) { mi_print_error(info->s, HA_ERR_CRASHED); DBUG_RETURN(my_errno=HA_ERR_CRASHED); } if (!(root_buff= (uchar*) my_alloca((uint) keyinfo->block_length+ HA_MAX_KEY_BUFF*2))) { DBUG_PRINT("error",("Couldn't allocate memory")); DBUG_RETURN(my_errno=ENOMEM); } DBUG_PRINT("info",("root_page: %ld", (long) old_root)); if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0)) { error= -1; goto err; } if ((error=d_search(info,keyinfo, (keyinfo->flag & HA_FULLTEXT ? SEARCH_FIND | SEARCH_UPDATE | SEARCH_INSERT : SEARCH_SAME), key,key_length,old_root,root_buff)) >0) { if (error == 2) { DBUG_PRINT("test",("Enlarging of root when deleting")); error=_mi_enlarge_root(info,keyinfo,key,root); } else /* error == 1 */ { if (mi_getint(root_buff) <= (nod_flag=mi_test_if_nod(root_buff))+3) { error=0; if (nod_flag) *root=_mi_kpos(nod_flag,root_buff+2+nod_flag); else *root=HA_OFFSET_ERROR; if (_mi_dispose(info,keyinfo,old_root,DFLT_INIT_HITS)) error= -1; } else error=_mi_write_keypage(info,keyinfo,old_root, DFLT_INIT_HITS,root_buff); } } err: my_afree((uchar*) root_buff); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O0
c
mi_ck_real_delete: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movl %ecx, -0x2c(%rbp) movq %r8, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) cmpq $-0x1, %rax jne 0xa56e8 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xafca0 callq 0xf7a70 movl $0x7e, (%rax) movl $0x7e, -0xc(%rbp) jmp 0xa58c3 movq -0x20(%rbp), %rax movzwl 0xe(%rax), %eax addl $0x97f, %eax # imm = 0x97F andl $-0x10, %eax movl %eax, %ecx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0xa572a jmp 0xa570f jmp 0xa5711 jmp 0xa5713 callq 0xf7a70 movl $0xc, (%rax) movl $0xc, -0xc(%rbp) jmp 0xa58c3 jmp 0xa572c jmp 0xa572e movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbf780 cmpq $0x0, %rax jne 0xa575d movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF jmp 0xa58b7 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rax movzwl 0xa(%rax), %ecx andl $0x80, %ecx movl $0x4, %edx movl $0x20041, %eax # imm = 0x20041 cmpl $0x0, %ecx cmovnel %eax, %edx movq -0x28(%rbp), %rcx movl -0x2c(%rbp), %r8d movq -0x48(%rbp), %r9 movq -0x50(%rbp), %rax subq $0x10, %rsp movq %rax, (%rsp) callq 0xa58f0 addq $0x10, %rsp movl %eax, -0x3c(%rbp) cmpl $0x0, %eax jle 0xa58b5 cmpl $0x2, -0x3c(%rbp) jne 0xa57d7 jmp 0xa57b8 jmp 0xa57ba movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rcx callq 0xc7d60 movl %eax, -0x3c(%rbp) jmp 0xa58b3 movq -0x50(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x50(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x54(%rbp) movq -0x50(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xa581f movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x58(%rbp) jmp 0xa5826 xorl %eax, %eax movl %eax, -0x58(%rbp) jmp 0xa5826 movl -0x54(%rbp), %eax movl -0x58(%rbp), %ecx movl %ecx, -0x40(%rbp) addl $0x3, %ecx cmpl %ecx, %eax ja 0xa5894 movl $0x0, -0x3c(%rbp) cmpl $0x0, -0x40(%rbp) je 0xa5865 movl -0x40(%rbp), %edi movq -0x50(%rbp), %rsi addq $0x2, %rsi movl -0x40(%rbp), %eax addq %rax, %rsi callq 0xc06f0 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) jmp 0xa5870 movq -0x38(%rbp), %rax movq $-0x1, (%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x48(%rbp), %rdx movl $0x3, %ecx callq 0xbfab0 cmpl $0x0, %eax je 0xa5892 movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF jmp 0xa58b1 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %r8 movl $0x3, %ecx callq 0xbf900 movl %eax, -0x3c(%rbp) jmp 0xa58b3 jmp 0xa58b5 jmp 0xa58b7 jmp 0xa58b9 jmp 0xa58bb jmp 0xa58bd movl -0x3c(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x5c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa58e3 movl -0x5c(%rbp), %eax movq %rbp, %rsp popq %rbp retq callq 0x2a250 nopl (%rax,%rax)
_mi_ck_real_delete: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_38], r8 mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_48], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_A56E8 mov rax, [rbp+var_18] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_C], 7Eh ; '~' jmp loc_A58C3 loc_A56E8: mov rax, [rbp+var_20] movzx eax, word ptr [rax+0Eh] add eax, 97Fh and eax, 0FFFFFFF0h mov ecx, eax mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_50], rax cmp rax, 0 jnz short loc_A572A jmp short $+2 loc_A570F: jmp short $+2 loc_A5711: jmp short $+2 loc_A5713: call _my_thread_var mov dword ptr [rax], 0Ch mov [rbp+var_C], 0Ch jmp loc_A58C3 loc_A572A: jmp short $+2 loc_A572C: jmp short $+2 loc_A572E: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_48] mov r8, [rbp+var_50] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_A575D mov [rbp+var_3C], 0FFFFFFFFh jmp loc_A58B7 loc_A575D: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_20] movzx ecx, word ptr [rax+0Ah] and ecx, 80h mov edx, 4 mov eax, 20041h cmp ecx, 0 cmovnz edx, eax mov rcx, [rbp+var_28] mov r8d, [rbp+var_2C] mov r9, [rbp+var_48] mov rax, [rbp+var_50] sub rsp, 10h mov [rsp+70h+var_70], rax call d_search_0 add rsp, 10h mov [rbp+var_3C], eax cmp eax, 0 jle loc_A58B5 cmp [rbp+var_3C], 2 jnz short loc_A57D7 jmp short $+2 loc_A57B8: jmp short $+2 loc_A57BA: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_38] call _mi_enlarge_root mov [rbp+var_3C], eax jmp loc_A58B3 loc_A57D7: mov rax, [rbp+var_50] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_50] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_54], eax mov rax, [rbp+var_50] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_A581F mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_58], eax jmp short loc_A5826 loc_A581F: xor eax, eax mov [rbp+var_58], eax jmp short $+2 loc_A5826: mov eax, [rbp+var_54] mov ecx, [rbp+var_58] mov [rbp+var_40], ecx add ecx, 3 cmp eax, ecx ja short loc_A5894 mov [rbp+var_3C], 0 cmp [rbp+var_40], 0 jz short loc_A5865 mov edi, [rbp+var_40] mov rsi, [rbp+var_50] add rsi, 2 mov eax, [rbp+var_40] add rsi, rax call _mi_kpos mov rcx, rax mov rax, [rbp+var_38] mov [rax], rcx jmp short loc_A5870 loc_A5865: mov rax, [rbp+var_38] mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh loc_A5870: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_48] mov ecx, 3 call _mi_dispose cmp eax, 0 jz short loc_A5892 mov [rbp+var_3C], 0FFFFFFFFh loc_A5892: jmp short loc_A58B1 loc_A5894: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_48] mov r8, [rbp+var_50] mov ecx, 3 call _mi_write_keypage mov [rbp+var_3C], eax loc_A58B1: jmp short $+2 loc_A58B3: jmp short $+2 loc_A58B5: jmp short $+2 loc_A58B7: jmp short $+2 loc_A58B9: jmp short $+2 loc_A58BB: jmp short $+2 loc_A58BD: mov eax, [rbp+var_3C] mov [rbp+var_C], eax loc_A58C3: mov eax, [rbp+var_C] mov [rbp+var_5C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A58E3 mov eax, [rbp+var_5C] mov rsp, rbp pop rbp retn loc_A58E3: call ___stack_chk_fail
long long mi_ck_real_delete(long long a1, const char *a2, long long a3, int a4, long long *a5) { const char *v5; // rsi _BYTE *v6; // rcx int v7; // edx long long v8; // rcx _BYTE v10[4]; // [rsp+10h] [rbp-60h] BYREF unsigned int v11; // [rsp+18h] [rbp-58h] unsigned int v12; // [rsp+1Ch] [rbp-54h] unsigned __int16 *v13; // [rsp+20h] [rbp-50h] long long v14; // [rsp+28h] [rbp-48h] unsigned int v15; // [rsp+30h] [rbp-40h] int v16; // [rsp+34h] [rbp-3Ch] long long *v17; // [rsp+38h] [rbp-38h] int v18; // [rsp+44h] [rbp-2Ch] long long v19; // [rsp+48h] [rbp-28h] const char *v20; // [rsp+50h] [rbp-20h] long long v21; // [rsp+58h] [rbp-18h] unsigned long long v23; // [rsp+68h] [rbp-8h] v23 = __readfsqword(0x28u); v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v14 = *a5; if ( v14 == -1 ) { v5 = *(const char **)(*(_QWORD *)v21 + 616LL); mi_report_error(126LL, v5); *(_DWORD *)my_thread_var(126LL, v5) = 126; return 126; } else { v6 = (_BYTE *)((*((unsigned __int16 *)v20 + 7) + 2431) & 0xFFFFFFF0); v13 = (unsigned __int16 *)(v10 - v6); if ( v10 == v6 ) { *(_DWORD *)my_thread_var(a1, a2) = 12; return 12; } else { if ( mi_fetch_keypage(v21, v20, v14, 3LL, v13, 0LL) ) { v7 = 4; if ( (*((_WORD *)v20 + 5) & 0x80) != 0 ) v7 = 131137; v16 = d_search_0(v21, (_DWORD)v20, v7, v19, v18, v14, (long long)v13); if ( v16 > 0 ) { if ( v16 == 2 ) { return (unsigned int)mi_enlarge_root(v21, v20, v19, v17); } else { v12 = _byteswap_ushort(*v13) & 0x7FFF; if ( (*(_BYTE *)v13 & 0x80) != 0 ) v11 = *(_DWORD *)(*(_QWORD *)v21 + 380LL); else v11 = 0; v15 = v11; if ( v12 > v11 + 3 ) { return (unsigned int)mi_write_keypage(v21, v20, v14, 3LL, v13); } else { v16 = 0; if ( v15 ) { v8 = mi_kpos(v15, (char *)v13 + v15 + 2); *v17 = v8; } else { *v17 = -1LL; } if ( (unsigned int)mi_dispose(v21, v20, v14, 3LL) ) return (unsigned int)-1; } } } } else { return (unsigned int)-1; } return (unsigned int)v16; } } }
_mi_ck_real_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV qword ptr [RBP + -0x38],R8 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX CMP RAX,-0x1 JNZ 0x001a56e8 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001afca0 CALL 0x001f7a70 MOV dword ptr [RAX],0x7e MOV dword ptr [RBP + -0xc],0x7e JMP 0x001a58c3 LAB_001a56e8: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xe] ADD EAX,0x97f AND EAX,0xfffffff0 MOV ECX,EAX MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x001a572a JMP 0x001a570f LAB_001a570f: JMP 0x001a5711 LAB_001a5711: JMP 0x001a5713 LAB_001a5713: CALL 0x001f7a70 MOV dword ptr [RAX],0xc MOV dword ptr [RBP + -0xc],0xc JMP 0x001a58c3 LAB_001a572a: JMP 0x001a572c LAB_001a572c: JMP 0x001a572e LAB_001a572e: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x50] MOV ECX,0x3 XOR R9D,R9D CALL 0x001bf780 CMP RAX,0x0 JNZ 0x001a575d MOV dword ptr [RBP + -0x3c],0xffffffff JMP 0x001a58b7 LAB_001a575d: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,word ptr [RAX + 0xa] AND ECX,0x80 MOV EDX,0x4 MOV EAX,0x20041 CMP ECX,0x0 CMOVNZ EDX,EAX MOV RCX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RBP + -0x2c] MOV R9,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x50] SUB RSP,0x10 MOV qword ptr [RSP],RAX CALL 0x001a58f0 ADD RSP,0x10 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JLE 0x001a58b5 CMP dword ptr [RBP + -0x3c],0x2 JNZ 0x001a57d7 JMP 0x001a57b8 LAB_001a57b8: JMP 0x001a57ba LAB_001a57ba: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x38] CALL 0x001c7d60 MOV dword ptr [RBP + -0x3c],EAX JMP 0x001a58b3 LAB_001a57d7: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001a581f MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x58],EAX JMP 0x001a5826 LAB_001a581f: XOR EAX,EAX MOV dword ptr [RBP + -0x58],EAX JMP 0x001a5826 LAB_001a5826: MOV EAX,dword ptr [RBP + -0x54] MOV ECX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x40],ECX ADD ECX,0x3 CMP EAX,ECX JA 0x001a5894 MOV dword ptr [RBP + -0x3c],0x0 CMP dword ptr [RBP + -0x40],0x0 JZ 0x001a5865 MOV EDI,dword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x50] ADD RSI,0x2 MOV EAX,dword ptr [RBP + -0x40] ADD RSI,RAX CALL 0x001c06f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX JMP 0x001a5870 LAB_001a5865: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],-0x1 LAB_001a5870: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,0x3 CALL 0x001bfab0 CMP EAX,0x0 JZ 0x001a5892 MOV dword ptr [RBP + -0x3c],0xffffffff LAB_001a5892: JMP 0x001a58b1 LAB_001a5894: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x50] MOV ECX,0x3 CALL 0x001bf900 MOV dword ptr [RBP + -0x3c],EAX LAB_001a58b1: JMP 0x001a58b3 LAB_001a58b3: JMP 0x001a58b5 LAB_001a58b5: JMP 0x001a58b7 LAB_001a58b7: JMP 0x001a58b9 LAB_001a58b9: JMP 0x001a58bb LAB_001a58bb: JMP 0x001a58bd LAB_001a58bd: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0xc],EAX LAB_001a58c3: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a58e3 MOV EAX,dword ptr [RBP + -0x5c] MOV RSP,RBP POP RBP RET LAB_001a58e3: CALL 0x0012a250
int _mi_ck_real_delete(long *param_1,long param_2,int8 param_3,int4 param_4, long *param_5) { long lVar1; uint uVar2; long *plVar3; int4 uVar4; int8 uVar5; long lVar6; long *plVar7; int iVar8; int4 *puVar9; long lVar10; long lVar11; int8 uVar12; byte *pbVar13; byte *pbVar14; long in_FS_OFFSET; int8 auStack_80 [3]; byte abStack_68 [4]; int local_64; uint local_60; uint local_5c; byte *local_58; long local_50; uint local_48; int local_44; long *local_40; int4 local_34; int8 local_30; long local_28; long *local_20; int local_14; long local_10; pbVar13 = abStack_68; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar11 = *param_5; local_50 = lVar11; local_40 = param_5; local_34 = param_4; local_30 = param_3; local_28 = param_2; local_20 = param_1; if (lVar11 == -1) { auStack_80[2] = 0x1a56d1; mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); auStack_80[2] = 0x1a56d6; puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x7e; local_14 = 0x7e; } else { lVar1 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0); pbVar13 = abStack_68 + lVar1; local_58 = pbVar13; if (pbVar13 == (byte *)0x0) { *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a5718; puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0xc; local_14 = 0xc; } else { *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a574b; lVar10 = _mi_fetch_keypage(param_1,param_2,lVar11,3,pbVar13,0); plVar3 = local_20; lVar6 = local_28; uVar5 = local_30; uVar4 = local_34; lVar11 = local_50; if (lVar10 == 0) { local_44 = -1; } else { uVar12 = 4; if ((*(ushort *)(local_28 + 10) & 0x80) != 0) { uVar12 = 0x20041; } *(byte **)((long)auStack_80 + lVar1 + 8) = local_58; *(int8 *)((long)auStack_80 + lVar1) = 0x1a57a0; local_44 = d_search(plVar3,lVar6,uVar12,uVar5,uVar4,lVar11); plVar7 = local_20; lVar6 = local_28; uVar5 = local_30; plVar3 = local_40; lVar11 = local_50; pbVar14 = local_58; if (0 < local_44) { if (local_44 == 2) { *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a57cf; local_44 = _mi_enlarge_root(plVar7,lVar6,uVar5,plVar3); } else { local_5c = (uint)local_58[1] | (*local_58 & 0x7f) << 8; if ((*local_58 & 0x80) == 0) { local_60 = 0; } else { local_60 = *(uint *)(*local_20 + 0x17c); } uVar2 = local_60; local_48 = local_60; if (local_60 + 3 < local_5c) { *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a58ae; local_44 = _mi_write_keypage(plVar7,lVar6,lVar11,3,pbVar14); } else { local_44 = 0; if (local_60 == 0) { *local_40 = -1; } else { pbVar14 = local_58 + (ulong)local_60 + 2; *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a5859; lVar11 = _mi_kpos(uVar2,pbVar14); *local_40 = lVar11; } plVar3 = local_20; lVar6 = local_28; lVar11 = local_50; *(int8 *)((long)auStack_80 + lVar1 + 0x10) = 0x1a5886; iVar8 = _mi_dispose(plVar3,lVar6,lVar11,3); if (iVar8 != 0) { local_44 = -1; } } } } } local_14 = local_44; } } local_64 = local_14; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ pbVar13[-8] = 0xe8; pbVar13[-7] = 0x58; pbVar13[-6] = 0x1a; pbVar13[-5] = 0; pbVar13[-4] = 0; pbVar13[-3] = 0; pbVar13[-2] = 0; pbVar13[-1] = 0; __stack_chk_fail(); } return local_14; }
47,388
ma_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void * ma_alloc_root(MA_MEM_ROOT *mem_root, size_t Size) { #if defined(HAVE_purify) && defined(EXTRA_DEBUG) reg1 MA_USED_MEM *next; Size+=ALIGN_SIZE(sizeof(MA_USED_MEM)); if (!(next = (MA_USED_MEM*) malloc(Size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } next->next=mem_root->used; mem_root->used=next; return (void *) (((char*) next)+ALIGN_SIZE(sizeof(MA_USED_MEM))); #else size_t get_size; void * point; reg1 MA_USED_MEM *next= 0; reg2 MA_USED_MEM **prev; Size= ALIGN_SIZE(Size); if ((*(prev= &mem_root->free))) { if ((*prev)->left < Size && mem_root->first_block_usage++ >= 16 && (*prev)->left < 4096) { next= *prev; *prev= next->next; next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev; next && next->left < Size; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)), (mem_root->block_size & ~1) * (mem_root->block_num >> 2)); if (!(next = (MA_USED_MEM*) malloc(get_size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(MA_USED_MEM)); *prev=next; } point= (void *) ((char*) next+ (next->size-next->left)); if ((next->left-= Size) < mem_root->min_malloc) { /* Full block */ *prev=next->next; /* Remove block from list */ next->next=mem_root->used; mem_root->used=next; mem_root->first_block_usage= 0; } return(point); #endif }
O3
c
ma_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x8eafd cmpq %r14, 0x8(%rax) jae 0x8eae4 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0x10, %ecx jb 0x8eae4 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x8eae4 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x8eafd movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x8eae7 jmp 0x8eb4e leaq 0x18(%r14), %rax movq 0x20(%rbx), %rcx andq $-0x2, %rcx movl 0x28(%rbx), %r13d movl %r13d, %r15d shrl $0x2, %r15d imulq %rcx, %r15 cmpq %r15, %rax cmovaq %rax, %r15 movq %r15, %rdi callq 0x39930 testq %rax, %rax je 0x8eb80 incl %r13d movl %r13d, 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x8eb8d movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x8eb8d movq 0x30(%rbx), %rax testq %rax, %rax je 0x8eb8b callq *%rax xorl %ecx, %ecx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_alloc_root: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_8EAFD cmp [rax+8], r14 jnb short loc_8EAE4 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 10h jb short loc_8EAE4 cmp qword ptr [rax+8], 0FFFh ja short loc_8EAE4 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_8EAE4: mov rax, rbx loc_8EAE7: mov r12, rax mov rax, [rax] test rax, rax jz short loc_8EAFD mov rdx, [rax+8] cmp rdx, r14 jb short loc_8EAE7 jmp short loc_8EB4E loc_8EAFD: lea rax, [r14+18h] mov rcx, [rbx+20h] and rcx, 0FFFFFFFFFFFFFFFEh mov r13d, [rbx+28h] mov r15d, r13d shr r15d, 2 imul r15, rcx cmp rax, r15 cmova r15, rax mov rdi, r15 call _malloc test rax, rax jz short loc_8EB80 inc r13d mov [rbx+28h], r13d mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_8EB4E: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_8EB8D mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_8EB8D loc_8EB80: mov rax, [rbx+30h] test rax, rax jz short loc_8EB8B call rax loc_8EB8B: xor ecx, ecx loc_8EB8D: mov rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * ma_alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx unsigned int v8; // r13d unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void ( *v12)(unsigned long long); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0x10 && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_DWORD *)(a1 + 40); v9 = (*(_QWORD *)(a1 + 32) & 0xFFFFFFFFFFFFFFFELL) * (v8 >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)malloc(v9); if ( v6 ) { *(_DWORD *)(a1 + 40) = v8 + 1; *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void ( **)(unsigned long long))(a1 + 48); if ( v12 ) v12(v9); return 0LL; } return v10; }
ma_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x0018eafd CMP qword ptr [RAX + 0x8],R14 JNC 0x0018eae4 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0x10 JC 0x0018eae4 CMP qword ptr [RAX + 0x8],0xfff JA 0x0018eae4 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_0018eae4: MOV RAX,RBX LAB_0018eae7: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0018eafd MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x0018eae7 JMP 0x0018eb4e LAB_0018eafd: LEA RAX,[R14 + 0x18] MOV RCX,qword ptr [RBX + 0x20] AND RCX,-0x2 MOV R13D,dword ptr [RBX + 0x28] MOV R15D,R13D SHR R15D,0x2 IMUL R15,RCX CMP RAX,R15 CMOVA R15,RAX MOV RDI,R15 CALL 0x00139930 TEST RAX,RAX JZ 0x0018eb80 INC R13D MOV dword ptr [RBX + 0x28],R13D MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_0018eb4e: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x0018eb8d MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x0018eb8d LAB_0018eb80: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0018eb8b CALL RAX LAB_0018eb8b: XOR ECX,ECX LAB_0018eb8d: MOV RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_0018eafd: uVar1 = *(uint *)(param_1 + 5); uVar7 = (ulong)(uVar1 >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)malloc(uVar7); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(uint *)(param_1 + 5) = uVar1 + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 0xf < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_0018eafd; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
47,389
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::set_color(spdlog::level::level_enum, fmt::v10::basic_string_view<char>)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/sinks/ansicolor_sink-inl.h
SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color(level::level_enum color_level, string_view_t color) { std::lock_guard<mutex_t> lock(mutex_); colors_.at(static_cast<size_t>(color_level)) = to_string_(color); }
O3
c
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::set_color(spdlog::level::level_enum, fmt::v10::basic_string_view<char>): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebp movq %rdi, %r14 leaq 0x10(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq (%rcx,%rdx), %rax movq %rsp, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x19014 movslq %ebp, %rsi cmpl $0x7, %esi jae 0x3b22d movq %rsp, %rdx movq %r14, %rdi movq %rbx, %rcx callq 0x12999 addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x48340(%rip), %rdi # 0x83574 movl $0x7, %edx xorl %eax, %eax callq 0x11040 movq %rax, %r14 movq (%rsp), %rdi cmpq %rbx, %rdi je 0x3b259 movq 0x10(%rsp), %rsi incq %rsi callq 0x11120 movq %r14, %rdi callq 0x11760 nop
_ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE9set_colorENS_5level10level_enumEN3fmt3v1017basic_string_viewIcEE: push rbp push r14 push rbx sub rsp, 20h mov ebp, esi mov r14, rdi lea rbx, [rsp+38h+var_28] mov [rbx-10h], rbx lea rax, [rcx+rdx] mov rdi, rsp mov rsi, rdx mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) movsxd rsi, ebp cmp esi, 7 jnb short loc_3B22D mov rdx, rsp mov rdi, r14 mov rcx, rbx call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE9set_colorENS_5level10level_enumEN3fmt3v1017basic_string_viewIcEE_cold_1; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color(spdlog::level::level_enum,fmt::v10::basic_string_view<char>) [clone] add rsp, 20h pop rbx pop r14 pop rbp retn loc_3B22D: lea rdi, aArrayAtNWhichI; "array::at: __n (which is %zu) >= _Nm (w"... mov edx, 7 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) mov r14, rax mov rdi, [rsp+38h+var_38]; void * cmp rdi, rbx jz short loc_3B259 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B259: mov rdi, r14 call __Unwind_Resume
void spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color( long long a1, signed int a2, _BYTE *a3, long long a4) { void *v4[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v5[5]; // [rsp+10h] [rbp-28h] BYREF v4[0] = v5; std::string::_M_construct<char const*>(v4, a3, (long long)&a3[a4]); if ( (unsigned int)a2 >= 7 ) std::__throw_out_of_range_fmt("array::at: __n (which is %zu) >= _Nm (which is %zu)", a2, 7uLL); spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color(a1, a2, v4, v5); }
set_color: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV EBP,ESI MOV R14,RDI LEA RBX,[RSP + 0x10] MOV qword ptr [RBX + -0x10],RBX LEA RAX,[RCX + RDX*0x1] MOV RDI,RSP MOV RSI,RDX MOV RDX,RAX CALL 0x00119014 MOVSXD RSI,EBP CMP ESI,0x7 JNC 0x0013b22d MOV RDX,RSP MOV RDI,R14 MOV RCX,RBX CALL 0x00112999 ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_0013b22d: LEA RDI,[0x183574] MOV EDX,0x7 XOR EAX,EAX CALL 0x00111040
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color(spdlog::level::level_enum, fmt::v10::basic_string_view<char>) */ void spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color (int8 param_1,uint param_2,long param_3,long param_4) { int1 *local_38 [2]; int1 local_28 [16]; local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*>(local_38,param_3,param_4 + param_3); if (param_2 < 7) { set_color(param_1,(long)(int)param_2,local_38,local_28); return; } /* try { // try from 0013b22d to 0013b23f has its CatchHandler @ 0013b240 */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt ("array::at: __n (which is %zu) >= _Nm (which is %zu)",(long)(int)param_2,7); }
47,390
end_server
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void end_server(MYSQL *mysql) { /* if net->error 2 and reconnect is activated, we need to inform connection handler */ if (mysql->net.pvio != 0) { ma_pvio_close(mysql->net.pvio); mysql->net.pvio= 0; /* Marker */ } ma_net_end(&mysql->net); free_old_query(mysql); return; }
O0
c
end_server: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x1833d movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0x25f00 movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rdi callq 0x47e40 movq -0x8(%rbp), %rdi callq 0x20500 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
end_server: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_1833D mov rax, [rbp+var_8] mov rdi, [rax] call ma_pvio_close mov rax, [rbp+var_8] mov qword ptr [rax], 0 loc_1833D: mov rdi, [rbp+var_8] call ma_net_end mov rdi, [rbp+var_8] call free_old_query add rsp, 10h pop rbp retn
long long end_server(_QWORD *a1) { if ( *a1 ) { ma_pvio_close(*a1); *a1 = 0LL; } ma_net_end(a1); return free_old_query(a1); }
end_server: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0011833d MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] CALL 0x00125f00 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 LAB_0011833d: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00147e40 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00120500 ADD RSP,0x10 POP RBP RET
void end_server(long *param_1) { if (*param_1 != 0) { ma_pvio_close(*param_1); *param_1 = 0; } ma_net_end(param_1); free_old_query(param_1); return; }
47,391
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number()
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/detail/input/lexer.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number(): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x31e94 movl 0x14(%rbx), %eax movl $0x5, %ebp leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x31c36 leaq 0x50(%rbx), %r14 movsbl %al, %esi movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x31be5 movsbl 0x14(%rbx), %esi jmp 0x31bc7 cmpl $0x2e, %eax je 0x31cfc cmpl $0x45, %eax je 0x31bfc cmpl $0x65, %eax jne 0x31d67 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x31c7b cmpl $0x2d, %eax je 0x31e0c cmpl $0x2b, %eax je 0x31e0c leaq 0x25f41b(%rip), %rax # 0x29104c jmp 0x31d26 cmpl $0x30, %eax je 0x31cc9 cmpl $0x2d, %eax jne 0x31c52 leaq 0x50(%rbx), %rdi movl $0x2d, %esi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 leal -0x31(%rax), %ecx cmpl $0x9, %ecx jb 0x31df4 cmpl $0x30, %eax je 0x31e3c leaq 0x25f384(%rip), %rax # 0x290ffa jmp 0x31d26 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 addl $-0x30, %eax movl $0x7, %ebp cmpl $0x9, %eax ja 0x31d67 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 addl $-0x30, %eax cmpl $0xa, %eax jb 0x31ca8 jmp 0x31d67 leaq 0x50(%rbx), %rdi movl $0x30, %esi callq 0xf8a0 movl $0x5, %ebp movq %rbx, %rdi callq 0x10818 cmpl $0x2e, %eax je 0x31cfc cmpl $0x65, %eax je 0x31cf3 cmpl $0x45, %eax jne 0x31d67 leaq 0x50(%rbx), %r14 jmp 0x31bfc movsbl 0x90(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 addl $-0x30, %eax cmpl $0x9, %eax jbe 0x31d34 leaq 0x25f2fd(%rip), %rax # 0x291023 movq %rax, 0x70(%rbx) movl $0xe, %eax jmp 0x31deb movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x31d34 cmpl $0x65, %eax je 0x31bfc cmpl $0x45, %eax je 0x31bfc movl $0x7, %ebp movq %rbx, %rdi callq 0x10878 movq $0x0, 0x8(%rsp) callq 0xf070 movq %rax, %r14 movl $0x0, (%rax) cmpl $0x6, %ebp je 0x31db7 cmpl $0x5, %ebp jne 0x31dd0 movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi movl $0xa, %edx callq 0xfd40 cmpl $0x0, (%r14) jne 0x31dd0 movq %rax, 0x80(%rbx) movl $0x5, %eax jmp 0x31deb movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi movl $0xa, %edx callq 0xf0f0 cmpl $0x0, (%r14) je 0x31e01 movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0xf770 vmovsd %xmm0, 0x88(%rbx) movl $0x7, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movl 0x14(%rbx), %eax movl $0x6, %ebp jmp 0x31bc0 movq %rax, 0x78(%rbx) movl $0x6, %eax jmp 0x31deb movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0xf8a0 movq %rbx, %rdi callq 0x10818 addl $-0x30, %eax cmpl $0xa, %eax jb 0x31c7f leaq 0x25f250(%rip), %rax # 0x291087 jmp 0x31d26 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %rdi callq 0xf8a0 movl $0x6, %ebp jmp 0x31cdc nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::reset(void) mov eax, [rbx+14h] mov ebp, 5 lea ecx, [rax-31h] cmp ecx, 9 jnb short loc_31C36 loc_31BC0: lea r14, [rbx+50h] movsx esi, al loc_31BC7: mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_31BE5 movsx esi, byte ptr [rbx+14h] jmp short loc_31BC7 loc_31BE5: cmp eax, 2Eh ; '.' jz loc_31CFC cmp eax, 45h ; 'E' jz short loc_31BFC cmp eax, 65h ; 'e' jnz loc_31D67 loc_31BFC: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_31C7B cmp eax, 2Dh ; '-' jz loc_31E0C cmp eax, 2Bh ; '+' jz loc_31E0C lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"... jmp loc_31D26 loc_31C36: cmp eax, 30h ; '0' jz loc_31CC9 cmp eax, 2Dh ; '-' jnz short loc_31C52 lea rdi, [rbx+50h] mov esi, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_31C52: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jb loc_31DF4 cmp eax, 30h ; '0' jz loc_31E3C lea rax, aInvalidNumberE_0; "invalid number; expected digit after '-"... jmp loc_31D26 loc_31C7B: lea r14, [rbx+50h] loc_31C7F: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h mov ebp, 7 cmp eax, 9 ja loc_31D67 lea r14, [rbx+50h] loc_31CA8: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_31CA8 jmp loc_31D67 loc_31CC9: lea rdi, [rbx+50h] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 5 loc_31CDC: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) cmp eax, 2Eh ; '.' jz short loc_31CFC cmp eax, 65h ; 'e' jz short loc_31CF3 cmp eax, 45h ; 'E' jnz short loc_31D67 loc_31CF3: lea r14, [rbx+50h] jmp loc_31BFC loc_31CFC: movsx esi, byte ptr [rbx+90h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 jbe short loc_31D34 lea rax, aInvalidNumberE_1; "invalid number; expected digit after '."... loc_31D26: mov [rbx+70h], rax mov eax, 0Eh jmp loc_31DEB loc_31D34: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_31D34 cmp eax, 65h ; 'e' jz loc_31BFC cmp eax, 45h ; 'E' jz loc_31BFC mov ebp, 7 loc_31D67: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::unget(void) mov [rsp+28h+var_20], 0 call ___errno_location mov r14, rax mov dword ptr [rax], 0 cmp ebp, 6 jz short loc_31DB7 cmp ebp, 5 jnz short loc_31DD0 mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] mov edx, 0Ah call _strtoull cmp dword ptr [r14], 0 jnz short loc_31DD0 mov [rbx+80h], rax mov eax, 5 jmp short loc_31DEB loc_31DB7: mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] mov edx, 0Ah call _strtoll cmp dword ptr [r14], 0 jz short loc_31E01 loc_31DD0: mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] call _strtod vmovsd qword ptr [rbx+88h], xmm0 mov eax, 7 loc_31DEB: add rsp, 10h pop rbx pop r14 pop rbp retn loc_31DF4: mov eax, [rbx+14h] mov ebp, 6 jmp loc_31BC0 loc_31E01: mov [rbx+78h], rax mov eax, 6 jmp short loc_31DEB loc_31E0C: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb loc_31C7F lea rax, aInvalidNumberE_2; "invalid number; expected digit after ex"... jmp loc_31D26 loc_31E3C: movsx esi, byte ptr [rbx+14h] lea rdi, [rbx+50h] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 6 jmp loc_31CDC
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number( nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *this, __m128 _XMM0, __m128 a3) { int v4; // eax int v5; // ebp char *v6; // r14 long long i; // rsi int v8; // eax int v9; // eax const char *v10; // rax int v11; // eax char *v12; // r14 int v13; // eax int v15; // eax _DWORD *v16; // r14 long long v17; // rax long long v18; // rax _QWORD v19[4]; // [rsp+8h] [rbp-20h] BYREF _RBX = this; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::reset(); v4 = *((_DWORD *)this + 5); v5 = 5; if ( (unsigned int)(v4 - 49) < 9 ) { LABEL_2: v6 = (char *)this + 80; for ( i = (unsigned int)(char)v4; ; i = (unsigned int)*((char *)this + 20) ) { std::string::push_back((char *)this + 80, i); v8 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3); if ( (unsigned int)(v8 - 48) >= 0xA ) break; } if ( v8 != 46 ) { if ( v8 != 69 && v8 != 101 ) goto LABEL_34; goto LABEL_8; } goto LABEL_27; } if ( v4 == 48 ) { std::string::push_back((char *)this + 80, 48LL); v5 = 5; } else { if ( v4 == 45 ) std::string::push_back((char *)this + 80, 45LL); v11 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3); if ( (unsigned int)(v11 - 49) < 9 ) { v4 = *((_DWORD *)this + 5); v5 = 6; goto LABEL_2; } if ( v11 != 48 ) { v10 = "invalid number; expected digit after '-'"; goto LABEL_29; } std::string::push_back((char *)this + 80, (unsigned int)*((char *)this + 20)); v5 = 6; } v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3); if ( v13 == 46 ) { LABEL_27: v6 = (char *)this + 80; std::string::push_back((char *)this + 80, (unsigned int)*((char *)this + 144)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3) - 48 > 9 ) { v10 = "invalid number; expected digit after '.'"; goto LABEL_29; } do { std::string::push_back((char *)this + 80, (unsigned int)*((char *)this + 20)); v15 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3); } while ( (unsigned int)(v15 - 48) < 0xA ); if ( v15 != 101 && v15 != 69 ) { v5 = 7; goto LABEL_34; } goto LABEL_8; } if ( v13 != 101 && v13 != 69 ) goto LABEL_34; v6 = (char *)this + 80; LABEL_8: std::string::push_back(v6, (unsigned int)*((char *)this + 20)); v9 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3); if ( (unsigned int)(v9 - 48) < 0xA ) { v12 = (char *)this + 80; } else { if ( v9 != 45 && v9 != 43 ) { v10 = "invalid number; expected '+', '-', or digit after exponent"; LABEL_29: *((_QWORD *)this + 14) = v10; return 14LL; } v12 = (char *)this + 80; std::string::push_back((char *)this + 80, (unsigned int)*((char *)this + 20)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3) - 48 >= 0xA ) { v10 = "invalid number; expected digit after exponent sign"; goto LABEL_29; } } std::string::push_back(v12, (unsigned int)*((char *)this + 20)); v5 = 7; if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3) - 48 <= 9 ) { do std::string::push_back((char *)this + 80, (unsigned int)*((char *)this + 20)); while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get( this, *(double *)_XMM0.m128_u64, a3) - 48 < 0xA ); } LABEL_34: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::unget((long long)this); v19[0] = 0LL; v16 = (_DWORD *)__errno_location(); *v16 = 0; if ( v5 != 6 ) { if ( v5 == 5 ) { v17 = strtoull(*((_QWORD *)this + 10), v19, 10LL); if ( !*v16 ) { *((_QWORD *)this + 16) = v17; return 5LL; } } goto LABEL_39; } v18 = strtoll(*((_QWORD *)this + 10), v19, 10LL); if ( *v16 ) { LABEL_39: *(double *)_XMM0.m128_u64 = strtod(*((_QWORD *)this + 10), v19); __asm { vmovsd qword ptr [rbx+88h], xmm0 } return 7LL; } *((_QWORD *)this + 15) = v18; return 6LL; }
scan_number: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CALL 0x00131e94 MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x5 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x00131c36 LAB_00131bc0: LEA R14,[RBX + 0x50] MOVSX ESI,AL LAB_00131bc7: MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x00131be5 MOVSX ESI,byte ptr [RBX + 0x14] JMP 0x00131bc7 LAB_00131be5: CMP EAX,0x2e JZ 0x00131cfc CMP EAX,0x45 JZ 0x00131bfc CMP EAX,0x65 JNZ 0x00131d67 LAB_00131bfc: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00131c7b CMP EAX,0x2d JZ 0x00131e0c CMP EAX,0x2b JZ 0x00131e0c LEA RAX,[0x39104c] JMP 0x00131d26 LAB_00131c36: CMP EAX,0x30 JZ 0x00131cc9 CMP EAX,0x2d JNZ 0x00131c52 LEA RDI,[RBX + 0x50] MOV ESI,0x2d CALL 0x0010f8a0 LAB_00131c52: MOV RDI,RBX CALL 0x00110818 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JC 0x00131df4 CMP EAX,0x30 JZ 0x00131e3c LEA RAX,[0x390ffa] JMP 0x00131d26 LAB_00131c7b: LEA R14,[RBX + 0x50] LAB_00131c7f: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 ADD EAX,-0x30 MOV EBP,0x7 CMP EAX,0x9 JA 0x00131d67 LEA R14,[RBX + 0x50] LAB_00131ca8: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 ADD EAX,-0x30 CMP EAX,0xa JC 0x00131ca8 JMP 0x00131d67 LAB_00131cc9: LEA RDI,[RBX + 0x50] MOV ESI,0x30 CALL 0x0010f8a0 MOV EBP,0x5 LAB_00131cdc: MOV RDI,RBX CALL 0x00110818 CMP EAX,0x2e JZ 0x00131cfc CMP EAX,0x65 JZ 0x00131cf3 CMP EAX,0x45 JNZ 0x00131d67 LAB_00131cf3: LEA R14,[RBX + 0x50] JMP 0x00131bfc LAB_00131cfc: MOVSX ESI,byte ptr [RBX + 0x90] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 ADD EAX,-0x30 CMP EAX,0x9 JBE 0x00131d34 LEA RAX,[0x391023] LAB_00131d26: MOV qword ptr [RBX + 0x70],RAX MOV EAX,0xe JMP 0x00131deb LAB_00131d34: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00131d34 CMP EAX,0x65 JZ 0x00131bfc CMP EAX,0x45 JZ 0x00131bfc MOV EBP,0x7 LAB_00131d67: MOV RDI,RBX CALL 0x00110878 MOV qword ptr [RSP + 0x8],0x0 CALL 0x0010f070 MOV R14,RAX MOV dword ptr [RAX],0x0 CMP EBP,0x6 JZ 0x00131db7 CMP EBP,0x5 JNZ 0x00131dd0 MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] MOV EDX,0xa CALL 0x0010fd40 CMP dword ptr [R14],0x0 JNZ 0x00131dd0 MOV qword ptr [RBX + 0x80],RAX MOV EAX,0x5 JMP 0x00131deb LAB_00131db7: MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] MOV EDX,0xa CALL 0x0010f0f0 CMP dword ptr [R14],0x0 JZ 0x00131e01 LAB_00131dd0: MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] CALL 0x0010f770 VMOVSD qword ptr [RBX + 0x88],XMM0 MOV EAX,0x7 LAB_00131deb: ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_00131df4: MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x6 JMP 0x00131bc0 LAB_00131e01: MOV qword ptr [RBX + 0x78],RAX MOV EAX,0x6 JMP 0x00131deb LAB_00131e0c: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x0010f8a0 MOV RDI,RBX CALL 0x00110818 ADD EAX,-0x30 CMP EAX,0xa JC 0x00131c7f LEA RAX,[0x391087] JMP 0x00131d26 LAB_00131e3c: MOVSX ESI,byte ptr [RBX + 0x14] LEA RDI,[RBX + 0x50] CALL 0x0010f8a0 MOV EBP,0x6 JMP 0x00131cdc
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, 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::input_stream_adapter>::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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::input_stream_adapter> ::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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::input_stream_adapter> *this) { char cVar1; int iVar2; char *pcVar3; int8 uVar4; int *piVar5; ulonglong uVar6; longlong lVar7; int iVar8; double dVar9; char *local_20; reset(this); iVar2 = *(int *)(this + 0x14); iVar8 = 5; cVar1 = (char)this; if (iVar2 - 0x31U < 9) { LAB_00131bc0: do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if (iVar2 == 0x2e) { LAB_00131cfc: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { pcVar3 = "invalid number; expected digit after \'.\'"; goto LAB_00131d26; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_00131bfc; iVar8 = 7; } else if ((iVar2 == 0x45) || (iVar2 == 0x65)) { LAB_00131bfc: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { if ((iVar2 == 0x2d) || (iVar2 == 0x2b)) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (iVar2 - 0x30U < 10) goto LAB_00131c7f; pcVar3 = "invalid number; expected digit after exponent sign"; } else { pcVar3 = "invalid number; expected \'+\', \'-\', or digit after exponent"; } goto LAB_00131d26; } LAB_00131c7f: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); iVar8 = 7; if (iVar2 - 0x30U < 10) { do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); } } LAB_00131d67: unget(this); local_20 = (char *)0x0; piVar5 = __errno_location(); *piVar5 = 0; if (iVar8 == 6) { lVar7 = strtoll(*(char **)(this + 0x50),&local_20,10); if (*piVar5 == 0) { *(longlong *)(this + 0x78) = lVar7; return 6; } } else if ((iVar8 == 5) && (uVar6 = strtoull(*(char **)(this + 0x50),&local_20,10), *piVar5 == 0)) { *(ulonglong *)(this + 0x80) = uVar6; return 5; } dVar9 = strtod(*(char **)(this + 0x50),&local_20); *(double *)(this + 0x88) = dVar9; uVar4 = 7; } else { if (iVar2 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar8 = 5; LAB_00131cdc: iVar2 = get(this); if (iVar2 != 0x2e) { if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_00131bfc; goto LAB_00131d67; } goto LAB_00131cfc; } if (iVar2 == 0x2d) { std::__cxx11::string::push_back(cVar1 + 'P'); } iVar2 = get(this); if (iVar2 - 0x31U < 9) { iVar8 = 6; goto LAB_00131bc0; } if (iVar2 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar8 = 6; goto LAB_00131cdc; } pcVar3 = "invalid number; expected digit after \'-\'"; LAB_00131d26: *(char **)(this + 0x70) = pcVar3; uVar4 = 0xe; } return uVar4; }
47,392
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long)
monkey531[P]llama/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O0
cpp
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x18d76c movq 0x10(%rsp), %rdi callq 0x18c320 movq %rax, %rdi movq (%rdi), %rax movl $0x30, %esi callq *(%rax) jmp 0x18d9b6 movq 0x10(%rsp), %rdi addq $0x10, %rdi callq 0x18e1f0 movq 0x10(%rsp), %rdi movq %rax, 0x30(%rsp) movl $0x0, 0x24(%rsp) movq 0x38(%rsp), %rsi callq 0x18e4c0 testb $0x1, %al jne 0x18d79c jmp 0x18d7d0 movq 0x10(%rsp), %rdi movq 0x30(%rsp), %rax movb $0x2d, (%rax) movq 0x38(%rsp), %rsi callq 0x18e220 movq 0x10(%rsp), %rdi movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rsi callq 0x18e2a0 addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x18d7ed movq 0x10(%rsp), %rdi movq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rsi callq 0x18e2a0 movl %eax, 0x24(%rsp) movq 0x10(%rsp), %rdi movl 0x24(%rsp), %eax movq %rax, 0x8(%rsp) addq $0x10, %rdi callq 0x18e330 movq %rax, %rcx movq 0x8(%rsp), %rax subq $0x1, %rcx cmpq %rcx, %rax jb 0x18d836 leaq 0x7ec53(%rip), %rdi # 0x20c46f movl $0x4952, %esi # imm = 0x4952 leaq 0x7ec91(%rip), %rdx # 0x20c4b9 leaq 0x8472a(%rip), %rcx # 0x211f59 movb $0x0, %al callq 0x5aec0 movl 0x24(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, 0x30(%rsp) cmpq $0x64, 0x28(%rsp) jb 0x18d8ec movq 0x28(%rsp), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, 0x20(%rsp) movq 0x28(%rsp), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, 0x28(%rsp) movl 0x20(%rsp), %eax movl %eax, %esi leaq 0x86cbf(%rip), %rdi # 0x21454a callq 0x18e340 movq %rax, %rdi movl $0x1, %esi callq 0x18e370 movb (%rax), %cl movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x30(%rsp) movb %cl, -0x1(%rax) movl 0x20(%rsp), %eax movl %eax, %esi leaq 0x86c8a(%rip), %rdi # 0x21454a callq 0x18e340 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0x18e370 movb (%rax), %cl movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x30(%rsp) movb %cl, -0x1(%rax) jmp 0x18d849 cmpq $0xa, 0x28(%rsp) jb 0x18d968 movq 0x28(%rsp), %rax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl %eax, %esi leaq 0x86c40(%rip), %rdi # 0x21454a callq 0x18e340 movq %rax, %rdi movl $0x1, %esi callq 0x18e370 movb (%rax), %cl movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x30(%rsp) movb %cl, -0x1(%rax) movl 0x1c(%rsp), %eax movl %eax, %esi leaq 0x86c0b(%rip), %rdi # 0x21454a callq 0x18e340 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0x18e370 movb (%rax), %cl movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x30(%rsp) movb %cl, -0x1(%rax) jmp 0x18d987 movq 0x28(%rsp), %rax addq $0x30, %rax movb %al, %cl movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x30(%rsp) movb %cl, -0x1(%rax) movq 0x10(%rsp), %rdi callq 0x18c320 movq 0x10(%rsp), %rdi movq %rax, (%rsp) addq $0x10, %rdi callq 0x18e3a0 movq (%rsp), %rdi movq %rax, %rsi movl 0x24(%rsp), %eax movl %eax, %edx movq (%rdi), %rax callq *0x8(%rax) addq $0x48, %rsp retq nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_38], rax cmp [rsp+48h+var_10], 0 jnz short loc_18D76C mov rdi, [rsp+48h+var_38] call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] mov esi, 30h ; '0' call qword ptr [rax] jmp loc_18D9B6 loc_18D76C: mov rdi, [rsp+48h+var_38] add rdi, 10h call _ZNSt5arrayIcLm64EE5beginEv; std::array<char,64ul>::begin(void) mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_18], rax mov [rsp+48h+var_24], 0 mov rsi, [rsp+48h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_ test al, 1 jnz short loc_18D79C jmp short loc_18D7D0 loc_18D79C: mov rdi, [rsp+48h+var_38] mov rax, [rsp+48h+var_18] mov byte ptr [rax], 2Dh ; '-' mov rsi, [rsp+48h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11remove_signEl; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::remove_sign(long) mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_20], rax mov rsi, [rsp+48h+var_20] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::count_digits(ulong) add eax, 1 mov [rsp+48h+var_24], eax jmp short loc_18D7ED loc_18D7D0: mov rdi, [rsp+48h+var_38] mov rax, [rsp+48h+var_10] mov [rsp+48h+var_20], rax mov rsi, [rsp+48h+var_20] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::count_digits(ulong) mov [rsp+48h+var_24], eax loc_18D7ED: mov rdi, [rsp+48h+var_38] mov eax, [rsp+48h+var_24] mov [rsp+48h+var_40], rax add rdi, 10h call _ZNKSt5arrayIcLm64EE4sizeEv; std::array<char,64ul>::size(void) mov rcx, rax mov rax, [rsp+48h+var_40] sub rcx, 1 cmp rax, rcx jb short loc_18D836 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 4952h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1" mov al, 0 call _ggml_abort loc_18D836: mov ecx, [rsp+48h+var_24] mov rax, [rsp+48h+var_18] mov ecx, ecx add rax, rcx mov [rsp+48h+var_18], rax loc_18D849: cmp [rsp+48h+var_20], 64h ; 'd' jb loc_18D8EC mov rax, [rsp+48h+var_20] mov ecx, 64h ; 'd' xor edx, edx div rcx mov eax, edx mov [rsp+48h+var_28], eax mov rax, [rsp+48h+var_20] mov ecx, 64h ; 'd' xor edx, edx div rcx mov [rsp+48h+var_20], rax mov eax, [rsp+48h+var_28] mov esi, eax lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong) mov rdi, rax mov esi, 1 call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong) mov cl, [rax] mov rax, [rsp+48h+var_18] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_18], rdx mov [rax-1], cl mov eax, [rsp+48h+var_28] mov esi, eax lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong) mov rdi, rax xor eax, eax mov esi, eax call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong) mov cl, [rax] mov rax, [rsp+48h+var_18] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_18], rdx mov [rax-1], cl jmp loc_18D849 loc_18D8EC: cmp [rsp+48h+var_20], 0Ah jb short loc_18D968 mov rax, [rsp+48h+var_20] mov [rsp+48h+var_2C], eax mov eax, [rsp+48h+var_2C] mov esi, eax lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong) mov rdi, rax mov esi, 1 call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong) mov cl, [rax] mov rax, [rsp+48h+var_18] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_18], rdx mov [rax-1], cl mov eax, [rsp+48h+var_2C] mov esi, eax lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong) mov rdi, rax xor eax, eax mov esi, eax call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong) mov cl, [rax] mov rax, [rsp+48h+var_18] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_18], rdx mov [rax-1], cl jmp short loc_18D987 loc_18D968: mov rax, [rsp+48h+var_20] add rax, 30h ; '0' mov cl, al mov rax, [rsp+48h+var_18] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_18], rdx mov [rax-1], cl loc_18D987: mov rdi, [rsp+48h+var_38] call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_48], rax add rdi, 10h call _ZNSt5arrayIcLm64EE4dataEv; std::array<char,64ul>::data(void) mov rdi, [rsp+48h+var_48] mov rsi, rax mov eax, [rsp+48h+var_24] mov edx, eax mov rax, [rdi] call qword ptr [rax+8] loc_18D9B6: add rsp, 48h retn
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( long long a1, unsigned long long a2) { long long ( ***v2)(_QWORD, long long); // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // [rsp+0h] [rbp-48h] unsigned int v10; // [rsp+20h] [rbp-28h] unsigned int v11; // [rsp+24h] [rbp-24h] unsigned long long v12; // [rsp+28h] [rbp-20h] _BYTE *v13; // [rsp+30h] [rbp-18h] _BYTE *v14; // [rsp+30h] [rbp-18h] if ( a2 ) { v13 = (_BYTE *)std::array<char,64ul>::begin(a1 + 16); if ( (ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_( a1, a2) & 1) != 0 ) { *v13 = 45; v12 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::remove_sign( a1, a2); v11 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::count_digits( a1, v12) + 1; } else { v12 = a2; v11 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::count_digits( a1, a2); } if ( v11 >= (unsigned long long)(std::array<char,64ul>::size(a1 + 16) - 1) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18770LL, "GGML_ASSERT(%s) failed", "n_chars < number_buffer.size() - 1"); v14 = &v13[v11]; while ( v12 >= 0x64 ) { v10 = v12 % 0x64; v12 /= 0x64uLL; v4 = std::array<std::array<char,2ul>,100ul>::operator[]( &ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99, v10); *(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v4, 1LL); v5 = std::array<std::array<char,2ul>,100ul>::operator[]( &ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99, v10); v14 -= 2; *v14 = *(_BYTE *)std::array<char,2ul>::operator[](v5, 0LL); } if ( v12 < 0xA ) { *(v14 - 1) = v12 + 48; } else { v6 = std::array<std::array<char,2ul>,100ul>::operator[]( &ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99, (unsigned int)v12); *(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v6, 1LL); v7 = std::array<std::array<char,2ul>,100ul>::operator[]( &ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99, (unsigned int)v12); *(v14 - 2) = *(_BYTE *)std::array<char,2ul>::operator[](v7, 0LL); } v9 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); v8 = std::array<char,64ul>::data(a1 + 16); return (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v8, v11); } else { v2 = (long long ( ***)(_QWORD, long long))std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); return (**v2)(v2, 48LL); } }
47,393
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long)
monkey531[P]llama/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testq %rsi, %rsi je 0x87020 movq %rsi, %r14 movq %rbx, %rdi callq 0x87454 cmpl $0x3f, %eax jae 0x87058 leaq 0x10(%rbx), %rsi movl %eax, %ecx leaq (%rsi,%rcx), %rdi pushq $0x64 popq %r9 leaq 0x2fb0e(%rip), %r8 # 0xb6af5 cmpq $0x64, %r14 jb 0x87009 movq %r14, %rax xorl %edx, %edx divq %r9 movl %edx, %edx movzwl (%r8,%rdx,2), %edx movw %dx, -0x2(%rdi) addq $-0x2, %rdi movq %rax, %r14 jmp 0x86fe7 cmpq $0xa, %r14 jb 0x87035 movb (%r8,%r14,2), %al movb 0x1(%r8,%r14,2), %dl movb %dl, -0x1(%rdi) pushq $-0x2 popq %rdx jmp 0x8703f movq (%rbx), %rdi movq (%rdi), %rax movq (%rax), %rax pushq $0x30 popq %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax orb $0x30, %r14b pushq $-0x1 popq %rdx movl %r14d, %eax movb %al, (%rdi,%rdx) movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax movq %rcx, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x27e74(%rip), %rdi # 0xaeed3 leaq 0x27eb7(%rip), %rdx # 0xaef1d leaq 0x2d4e1(%rip), %rcx # 0xb454e movl $0x4952, %esi # imm = 0x4952 xorl %eax, %eax callq 0x23e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: push r14 push rbx push rax mov rbx, rdi test rsi, rsi jz short loc_87020 mov r14, rsi mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::count_digits(ulong) cmp eax, 3Fh ; '?' jnb loc_87058 lea rsi, [rbx+10h] mov ecx, eax lea rdi, [rsi+rcx] push 64h ; 'd' pop r9 lea r8, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 loc_86FE7: cmp r14, 64h ; 'd' jb short loc_87009 mov rax, r14 xor edx, edx div r9 mov edx, edx movzx edx, word ptr [r8+rdx*2] mov [rdi-2], dx add rdi, 0FFFFFFFFFFFFFFFEh mov r14, rax jmp short loc_86FE7 loc_87009: cmp r14, 0Ah jb short loc_87035 mov al, [r8+r14*2] mov dl, [r8+r14*2+1] mov [rdi-1], dl push 0FFFFFFFFFFFFFFFEh pop rdx jmp short loc_8703F loc_87020: mov rdi, [rbx] mov rax, [rdi] mov rax, [rax] push 30h ; '0' pop rsi add rsp, 8 pop rbx pop r14 jmp rax loc_87035: or r14b, 30h push 0FFFFFFFFFFFFFFFFh pop rdx mov eax, r14d loc_8703F: mov [rdi+rdx], al mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] mov rdx, rcx add rsp, 8 pop rbx pop r14 jmp rax loc_87058: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1" mov esi, 4952h xor eax, eax call _ggml_abort nop
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( _QWORD *a1, unsigned long long a2) { unsigned long long v3; // r14 unsigned int v4; // eax _QWORD *v5; // rsi long long v6; // rcx long long v7; // rdi char v8; // al long long v9; // rdx if ( !a2 ) return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL); v3 = a2; v4 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::count_digits( a1, a2); if ( v4 >= 0x3F ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18770LL, "GGML_ASSERT(%s) failed", "n_chars < number_buffer.size() - 1"); return ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18770LL); } else { v5 = a1 + 2; v6 = v4; v7 = (long long)a1 + v4 + 16; while ( v3 >= 0x64 ) { *(_WORD *)(v7 - 2) = *((_WORD *)&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + v3 % 0x64); v7 -= 2LL; v3 /= 0x64uLL; } if ( v3 < 0xA ) { v9 = -1LL; v8 = v3 | 0x30; } else { v8 = *((_BYTE *)&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + 2 * v3); *(_BYTE *)(v7 - 1) = *((_BYTE *)&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + 2 * v3 + 1); v9 = -2LL; } *(_BYTE *)(v7 + v9) = v8; return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, v5, v6); } }
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI TEST RSI,RSI JZ 0x00187020 MOV R14,RSI MOV RDI,RBX CALL 0x00187454 CMP EAX,0x3f JNC 0x00187058 LEA RSI,[RBX + 0x10] MOV ECX,EAX LEA RDI,[RSI + RCX*0x1] PUSH 0x64 POP R9 LEA R8,[0x1b6af5] LAB_00186fe7: CMP R14,0x64 JC 0x00187009 MOV RAX,R14 XOR EDX,EDX DIV R9 MOV EDX,EDX MOVZX EDX,word ptr [R8 + RDX*0x2] MOV word ptr [RDI + -0x2],DX ADD RDI,-0x2 MOV R14,RAX JMP 0x00186fe7 LAB_00187009: CMP R14,0xa JC 0x00187035 MOV AL,byte ptr [R8 + R14*0x2] MOV DL,byte ptr [R8 + R14*0x2 + 0x1] MOV byte ptr [RDI + -0x1],DL PUSH -0x2 POP RDX JMP 0x0018703f LAB_00187020: MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX] PUSH 0x30 POP RSI ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_00187035: OR R14B,0x30 PUSH -0x1 POP RDX MOV EAX,R14D LAB_0018703f: MOV byte ptr [RDI + RDX*0x1],AL MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,RCX ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_00187058: LEA RDI,[0x1aeed3] LEA RDX,[0x1aef1d] LEA RCX,[0x1b454e] MOV ESI,0x4952 XOR EAX,EAX CALL 0x00123e90
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_ (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *param_1,ulong param_2) { uint uVar1; long lVar2; serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar3; serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> sVar4; if (param_2 == 0) { /* WARNING: Could not recover jumptable at 0x00187033. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)**(int8 **)param_1)(*(int8 **)param_1,0x30); return; } uVar1 = nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::count_digits(param_1,param_2); if (uVar1 < 0x3f) { psVar3 = param_1 + 0x10 + uVar1; for (; 99 < param_2; param_2 = param_2 / 100) { *(int2 *)(psVar3 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (param_2 % 100) * 2); psVar3 = psVar3 + -2; } if (param_2 < 10) { sVar4 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )((byte)param_2 | 0x30); lVar2 = -1; } else { sVar4 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + param_2 * 2); psVar3[-1] = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + param_2 * 2 + 1); lVar2 = -2; } psVar3[lVar2] = sVar4; /* WARNING: Could not recover jumptable at 0x00187056. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)param_1 + 8))(*(long **)param_1,param_1 + 0x10,(ulong)uVar1); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x4952, "GGML_ASSERT(%s) failed","n_chars < number_buffer.size() - 1"); }
47,394
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long)
monkey531[P]llama/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long): pushq %rbx testq %rsi, %rsi je 0xb6c4e movq %rsi, %rcx leaq 0x10(%rdi), %rsi cmpq $0xa, %rcx jae 0xb6c5f leaq 0x11(%rdi), %r9 movl $0x1, %r8d jmp 0xb6d2a movq (%rdi), %rdi movq (%rdi), %rax movq (%rax), %rax movl $0x30, %esi popq %rbx jmpq *%rax movl $0x4, %r9d movabsq $0x346dc5d63886594b, %r10 # imm = 0x346DC5D63886594B movq %rcx, %r8 cmpq $0x63, %r8 jbe 0xb6caa cmpq $0x3e7, %r8 # imm = 0x3E7 jbe 0xb6cb0 cmpq $0x2710, %r8 # imm = 0x2710 jb 0xb6cb3 movq %r8, %rax mulq %r10 shrq $0xb, %rdx addl $0x4, %r9d cmpq $0x1869f, %r8 # imm = 0x1869F movq %rdx, %r8 ja 0xb6c72 addl $-0x3, %r9d jmp 0xb6cb3 addl $-0x2, %r9d jmp 0xb6cb3 decl %r9d cmpl $0x3f, %r9d jae 0xb6d41 movl %r9d, %r8d leaq (%rsi,%r8), %r9 cmpq $0x64, %rcx jb 0xb6d0c movabsq $0x28f5c28f5c28f5c3, %r10 # imm = 0x28F5C28F5C28F5C3 leaq 0x3be3a(%rip), %r11 # 0xf2b15 movq %rcx, %rax shrq $0x2, %rax mulq %r10 shrq $0x2, %rdx imull $0x64, %edx, %eax movl %ecx, %ebx subl %eax, %ebx movzwl (%r11,%rbx,2), %eax movw %ax, -0x2(%r9) addq $-0x2, %r9 cmpq $0x270f, %rcx # imm = 0x270F movq %rdx, %rcx ja 0xb6cdb jmp 0xb6d0f movq %rcx, %rdx cmpq $0xa, %rdx jb 0xb6d27 leaq 0x3bdf9(%rip), %rax # 0xf2b15 movzwl (%rax,%rdx,2), %eax movw %ax, -0x2(%r9) jmp 0xb6d31 movq %rdx, %rcx orb $0x30, %cl movb %cl, -0x1(%r9) movq (%rdi), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax movq %r8, %rdx popq %rbx jmpq *%rax leaq 0x3418b(%rip), %rdi # 0xeaed3 leaq 0x341ce(%rip), %rdx # 0xeaf1d leaq 0x39818(%rip), %rcx # 0xf056e movl $0x4952, %esi # imm = 0x4952 xorl %eax, %eax callq 0x1ae70
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: push rbx test rsi, rsi jz short loc_B6C4E mov rcx, rsi lea rsi, [rdi+10h] cmp rcx, 0Ah jnb short loc_B6C5F lea r9, [rdi+11h] mov r8d, 1 jmp loc_B6D2A loc_B6C4E: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax] mov esi, 30h ; '0' pop rbx jmp rax loc_B6C5F: mov r9d, 4 mov r10, 346DC5D63886594Bh mov r8, rcx loc_B6C72: cmp r8, 63h ; 'c' jbe short loc_B6CAA cmp r8, 3E7h jbe short loc_B6CB0 cmp r8, 2710h jb short loc_B6CB3 mov rax, r8 mul r10 shr rdx, 0Bh add r9d, 4 cmp r8, 1869Fh mov r8, rdx ja short loc_B6C72 add r9d, 0FFFFFFFDh jmp short loc_B6CB3 loc_B6CAA: add r9d, 0FFFFFFFEh jmp short loc_B6CB3 loc_B6CB0: dec r9d loc_B6CB3: cmp r9d, 3Fh ; '?' jnb loc_B6D41 mov r8d, r9d lea r9, [rsi+r8] cmp rcx, 64h ; 'd' jb short loc_B6D0C mov r10, 28F5C28F5C28F5C3h lea r11, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 loc_B6CDB: mov rax, rcx shr rax, 2 mul r10 shr rdx, 2 imul eax, edx, 64h ; 'd' mov ebx, ecx sub ebx, eax movzx eax, word ptr [r11+rbx*2] mov [r9-2], ax add r9, 0FFFFFFFFFFFFFFFEh cmp rcx, 270Fh mov rcx, rdx ja short loc_B6CDB jmp short loc_B6D0F loc_B6D0C: mov rdx, rcx loc_B6D0F: cmp rdx, 0Ah jb short loc_B6D27 lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rax+rdx*2] mov [r9-2], ax jmp short loc_B6D31 loc_B6D27: mov rcx, rdx loc_B6D2A: or cl, 30h mov [r9-1], cl loc_B6D31: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax+8] mov rdx, r8 pop rbx jmp rax loc_B6D41: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1" mov esi, 4952h xor eax, eax call _ggml_abort
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( _QWORD *a1, unsigned long long a2) { unsigned long long v2; // rcx _QWORD *v3; // rsi char *v4; // r9 long long v5; // r8 unsigned int v7; // r9d unsigned long long v8; // r8 bool v9; // cc unsigned long long v10; // rdx if ( !a2 ) return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL); v2 = a2; v3 = a1 + 2; if ( v2 < 0xA ) { v4 = (char *)a1 + 17; v5 = 1LL; goto LABEL_21; } v7 = 4; v8 = v2; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_13; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_13; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710uLL; if ( v9 ) { v7 -= 3; goto LABEL_13; } } --v7; LABEL_13: if ( v7 < 0x3F ) { v5 = v7; v4 = (char *)v3 + v7; if ( v2 < 0x64 ) { v10 = v2; } else { do { v10 = v2 / 0x64; *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v2 % 0x64]; v4 -= 2; v9 = v2 <= 0x270F; v2 /= 0x64uLL; } while ( !v9 ); } if ( v10 >= 0xA ) { *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v10]; return (*(long long ( **)(_QWORD, _QWORD *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))( *a1, v3, v5, v2); } v2 = v10; LABEL_21: LOBYTE(v2) = v2 | 0x30; *(v4 - 1) = v2; return (*(long long ( **)(_QWORD, _QWORD *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))( *a1, v3, v5, v2); } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18770LL, "GGML_ASSERT(%s) failed", "n_chars < number_buffer.size() - 1"); return ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 18770LL); }
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: PUSH RBX TEST RSI,RSI JZ 0x001b6c4e MOV RCX,RSI LEA RSI,[RDI + 0x10] CMP RCX,0xa JNC 0x001b6c5f LEA R9,[RDI + 0x11] MOV R8D,0x1 JMP 0x001b6d2a LAB_001b6c4e: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX] MOV ESI,0x30 POP RBX JMP RAX LAB_001b6c5f: MOV R9D,0x4 MOV R10,0x346dc5d63886594b MOV R8,RCX LAB_001b6c72: CMP R8,0x63 JBE 0x001b6caa CMP R8,0x3e7 JBE 0x001b6cb0 CMP R8,0x2710 JC 0x001b6cb3 MOV RAX,R8 MUL R10 SHR RDX,0xb ADD R9D,0x4 CMP R8,0x1869f MOV R8,RDX JA 0x001b6c72 ADD R9D,-0x3 JMP 0x001b6cb3 LAB_001b6caa: ADD R9D,-0x2 JMP 0x001b6cb3 LAB_001b6cb0: DEC R9D LAB_001b6cb3: CMP R9D,0x3f JNC 0x001b6d41 MOV R8D,R9D LEA R9,[RSI + R8*0x1] CMP RCX,0x64 JC 0x001b6d0c MOV R10,0x28f5c28f5c28f5c3 LEA R11,[0x1f2b15] LAB_001b6cdb: MOV RAX,RCX SHR RAX,0x2 MUL R10 SHR RDX,0x2 IMUL EAX,EDX,0x64 MOV EBX,ECX SUB EBX,EAX MOVZX EAX,word ptr [R11 + RBX*0x2] MOV word ptr [R9 + -0x2],AX ADD R9,-0x2 CMP RCX,0x270f MOV RCX,RDX JA 0x001b6cdb JMP 0x001b6d0f LAB_001b6d0c: MOV RDX,RCX LAB_001b6d0f: CMP RDX,0xa JC 0x001b6d27 LEA RAX,[0x1f2b15] MOVZX EAX,word ptr [RAX + RDX*0x2] MOV word ptr [R9 + -0x2],AX JMP 0x001b6d31 LAB_001b6d27: MOV RCX,RDX LAB_001b6d2a: OR CL,0x30 MOV byte ptr [R9 + -0x1],CL LAB_001b6d31: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,R8 POP RBX JMP RAX LAB_001b6d41: LEA RDI,[0x1eaed3] LEA RDX,[0x1eaf1d] LEA RCX,[0x1f056e] MOV ESI,0x4952 XOR EAX,EAX CALL 0x0011ae70
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_ (int8 *param_1,ulong param_2) { bool bVar1; ulong uVar2; ulong uVar3; int iVar4; long lVar5; if (param_2 == 0) { /* WARNING: Could not recover jumptable at 0x001b6c5d. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30); return; } if (param_2 < 10) { lVar5 = (long)param_1 + 0x11; uVar3 = 1; } else { uVar3 = 4; uVar2 = param_2; do { iVar4 = (int)uVar3; if (uVar2 < 100) { uVar3 = (ulong)(iVar4 - 2); goto LAB_001b6cb3; } if (uVar2 < 1000) { uVar3 = (ulong)(iVar4 - 1); goto LAB_001b6cb3; } if (uVar2 < 10000) goto LAB_001b6cb3; uVar3 = (ulong)(iVar4 + 4); bVar1 = 99999 < uVar2; uVar2 = uVar2 / 10000; } while (bVar1); uVar3 = (ulong)(iVar4 + 1); LAB_001b6cb3: if (0x3e < (uint)uVar3) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x4952, "GGML_ASSERT(%s) failed","n_chars < number_buffer.size() - 1"); } lVar5 = (long)(param_1 + 2) + uVar3; if (99 < param_2) { do { uVar2 = param_2 / 100; *(int2 *)(lVar5 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)(uint)((int)param_2 + (int)uVar2 * -100) * 2); lVar5 = lVar5 + -2; bVar1 = 9999 < param_2; param_2 = uVar2; } while (bVar1); } if (9 < param_2) { *(int2 *)(lVar5 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + param_2 * 2); goto LAB_001b6d31; } } *(byte *)(lVar5 + -1) = (byte)param_2 | 0x30; LAB_001b6d31: /* WARNING: Could not recover jumptable at 0x001b6d3f. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,uVar3); return; }
47,395
ma_calc_blob_length
eloqsql/storage/maria/ma_dynrec.c
ulong _ma_calc_blob_length(uint length, const uchar *pos) { switch (length) { case 1: return (uint) (uchar) *pos; case 2: return (uint) uint2korr(pos); case 3: return uint3korr(pos); case 4: return uint4korr(pos); default: break; } return 0; /* Impossible */ }
O0
c
ma_calc_blob_length: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movl -0xc(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x3, %eax ja 0x512c2 movq -0x20(%rbp), %rax leaq 0x10fa8e(%rip), %rcx # 0x160cf4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x512cc movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x512cc movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x512cc movq -0x18(%rbp), %rax movl (%rax), %eax movq %rax, -0x8(%rbp) jmp 0x512cc jmp 0x512c4 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_calc_blob_length: push rbp mov rbp, rsp mov [rbp+var_C], edi mov [rbp+var_18], rsi mov eax, [rbp+var_C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 3 ja short def_5126D; jumptable 000000000005126D default case mov rax, [rbp+var_20] lea rcx, jpt_5126D movsxd rax, ds:(jpt_5126D - 160CF4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5126F: mov rax, [rbp+var_18]; jumptable 000000000005126D case 1 movzx eax, byte ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_512CC loc_5127E: mov rax, [rbp+var_18]; jumptable 000000000005126D case 2 movzx eax, word ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_512CC loc_5128D: mov rax, [rbp+var_18]; jumptable 000000000005126D case 3 movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_8], rax jmp short loc_512CC loc_512B6: mov rax, [rbp+var_18]; jumptable 000000000005126D case 4 mov eax, [rax] mov [rbp+var_8], rax jmp short loc_512CC def_5126D: jmp short $+2; jumptable 000000000005126D default case loc_512C4: mov [rbp+var_8], 0 loc_512CC: mov rax, [rbp+var_8] pop rbp retn
long long ma_calc_blob_length(int a1, unsigned __int8 *a2) { long long v3; // [rsp+18h] [rbp-8h] switch ( a1 ) { case 1: v3 = *a2; break; case 2: v3 = *(unsigned __int16 *)a2; break; case 3: v3 = (a2[2] << 16) | (unsigned int)*(unsigned __int16 *)a2; break; case 4: v3 = *(unsigned int *)a2; break; default: v3 = 0LL; break; } return v3; }
_ma_calc_blob_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV EAX,dword ptr [RBP + -0xc] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x3 JA 0x001512c2 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x260cf4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001512cc caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001512cc caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001512cc caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001512cc default: JMP 0x001512c4 LAB_001512c4: MOV qword ptr [RBP + -0x8],0x0 LAB_001512cc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
uint _ma_calc_blob_length(int4 param_1,uint *param_2) { uint uVar1; switch(param_1) { case 1: uVar1 = (uint)(byte)*param_2; break; case 2: uVar1 = (uint)(ushort)*param_2; break; case 3: uVar1 = (uint)(uint3)*param_2; break; case 4: uVar1 = *param_2; break; default: uVar1 = 0; } return uVar1; }
47,396
js_execute_async_module
bluesky950520[P]quickjs/quickjs.c
static int js_execute_async_module(JSContext *ctx, JSModuleDef *m) { JSValue promise, m_obj; JSValue resolve_funcs[2], ret_val; promise = js_async_function_call(ctx, m->func_obj, JS_UNDEFINED, 0, NULL, 0); if (JS_IsException(promise)) return -1; m_obj = JS_NewModuleValue(ctx, m); resolve_funcs[0] = JS_NewCFunctionData(ctx, js_async_module_execution_fulfilled, 0, 0, 1, (JSValueConst *)&m_obj); resolve_funcs[1] = JS_NewCFunctionData(ctx, js_async_module_execution_rejected, 0, 0, 1, (JSValueConst *)&m_obj); ret_val = js_promise_then(ctx, promise, 2, (JSValueConst *)resolve_funcs); JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, m_obj); JS_FreeValue(ctx, resolve_funcs[0]); JS_FreeValue(ctx, resolve_funcs[1]); JS_FreeValue(ctx, promise); return 0; }
O0
c
js_execute_async_module: subq $0xd8, %rsp movq %rdi, 0xc8(%rsp) movq %rsi, 0xc0(%rsp) movq 0xc8(%rsp), %rdi movq 0xc0(%rsp), %rax movl $0x0, 0x50(%rsp) movq $0x3, 0x58(%rsp) movq 0x68(%rax), %rsi movq 0x70(%rax), %rdx movq 0x50(%rsp), %rcx movq 0x58(%rsp), %r8 xorl %r9d, %r9d xorl %eax, %eax movq $0x0, (%rsp) movl $0x0, 0x8(%rsp) callq 0x52b30 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x75a32 movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF jmp 0x75bdd movq 0xc8(%rsp), %rdi movq 0xc0(%rsp), %rsi callq 0x72d30 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xc8(%rsp), %rdi leaq 0x406(%rip), %rsi # 0x75e80 xorl %ecx, %ecx movl $0x1, %r8d leaq 0xa0(%rsp), %r9 movl %ecx, %edx callq 0x294f0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x88(%rsp) movq 0xc8(%rsp), %rdi leaq 0x69c(%rip), %rsi # 0x76160 xorl %ecx, %ecx movl $0x1, %r8d leaq 0xa0(%rsp), %r9 movl %ecx, %edx callq 0x294f0 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xc8(%rsp), %rdi leaq 0x80(%rsp), %r8 movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movl $0x2, %ecx callq 0x730a0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0xc8(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x229d0 movq 0xc8(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx callq 0x229d0 movq 0xc8(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 movq 0xc8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 movq 0xc8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x229d0 movl $0x0, 0xd4(%rsp) movl 0xd4(%rsp), %eax addq $0xd8, %rsp retq nopl (%rax)
js_execute_async_module: sub rsp, 0D8h mov [rsp+0D8h+var_10], rdi mov [rsp+0D8h+var_18], rsi mov rdi, [rsp+0D8h+var_10] mov rax, [rsp+0D8h+var_18] mov dword ptr [rsp+0D8h+var_88], 0 mov [rsp+0D8h+var_80], 3 mov rsi, [rax+68h] mov rdx, [rax+70h] mov rcx, [rsp+0D8h+var_88] mov r8, [rsp+0D8h+var_80] xor r9d, r9d xor eax, eax mov [rsp+0D8h+var_D8], 0 mov [rsp+0D8h+var_D0], 0 call js_async_function_call mov [rsp+0D8h+var_78], rax mov [rsp+0D8h+var_70], rdx mov rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_28], rax mov rax, [rsp+0D8h+var_70] mov [rsp+0D8h+var_20], rax mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_20] call JS_IsException_1 cmp eax, 0 jz short loc_75A32 mov [rsp+0D8h+var_4], 0FFFFFFFFh jmp loc_75BDD loc_75A32: mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_18] call JS_NewModuleValue mov [rsp+0D8h+var_98], rax mov [rsp+0D8h+var_90], rdx mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_38], rax mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_30], rax mov rdi, [rsp+0D8h+var_10] lea rsi, js_async_module_execution_fulfilled xor ecx, ecx mov r8d, 1 lea r9, [rsp+0D8h+var_38] mov edx, ecx call JS_NewCFunctionData mov [rsp+0D8h+var_A8], rax mov [rsp+0D8h+var_A0], rdx mov rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_58], rax mov rax, [rsp+0D8h+var_A0] mov [rsp+0D8h+var_50], rax mov rdi, [rsp+0D8h+var_10] lea rsi, js_async_module_execution_rejected xor ecx, ecx mov r8d, 1 lea r9, [rsp+0D8h+var_38] mov edx, ecx call JS_NewCFunctionData mov [rsp+0D8h+var_B8], rax mov [rsp+0D8h+var_B0], rdx mov rax, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_48], rax mov rax, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_40], rax mov rdi, [rsp+0D8h+var_10] lea r8, [rsp+0D8h+var_58] mov rsi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_20] mov ecx, 2 call js_promise_then mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_C0], rdx mov rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_68], rax mov rax, [rsp+0D8h+var_C0] mov [rsp+0D8h+var_60], rax mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_68] mov rdx, [rsp+0D8h+var_60] call JS_FreeValue mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_38] mov rdx, [rsp+0D8h+var_30] call JS_FreeValue mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_58] mov rdx, [rsp+0D8h+var_50] call JS_FreeValue mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_40] call JS_FreeValue mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_20] call JS_FreeValue mov [rsp+0D8h+var_4], 0 loc_75BDD: mov eax, [rsp+0D8h+var_4] add rsp, 0D8h retn
long long js_execute_async_module( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rdx long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 long long v15; // rdx long long v16; // rdx long long v17; // rdx double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx long long v22; // [rsp+10h] [rbp-C8h] long long v23; // [rsp+80h] [rbp-58h] BYREF long long v24; // [rsp+88h] [rbp-50h] long long v25; // [rsp+90h] [rbp-48h] long long v26; // [rsp+98h] [rbp-40h] long long v27; // [rsp+A0h] [rbp-38h] BYREF long long v28; // [rsp+A8h] [rbp-30h] long long v29; // [rsp+B0h] [rbp-28h] long long v30; // [rsp+B8h] [rbp-20h] long long v31; // [rsp+C0h] [rbp-18h] long long v32; // [rsp+C8h] [rbp-10h] v32 = a1; v31 = a2; v29 = js_async_function_call(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112), 0, 3, 0, 0LL); v30 = v10; if ( JS_IsException_1(v29, v10) ) { return (unsigned int)-1; } else { v27 = JS_NewModuleValue(v32, v31, v11, v12, v13, v14); v28 = v15; v23 = JS_NewCFunctionData(v32, (long long)js_async_module_execution_fulfilled, 0, 0, 1, (long long)&v27); v24 = v16; v25 = JS_NewCFunctionData(v32, (long long)js_async_module_execution_rejected, 0, 0, 1, (long long)&v27); v26 = v17; v22 = js_promise_then(v32, v29, v30, 2, (long long)&v23, a3, a4, a5, a6, v18, v19, a9, a10); JS_FreeValue(v32, v22, v20); JS_FreeValue(v32, v27, v28); JS_FreeValue(v32, v23, v24); JS_FreeValue(v32, v25, v26); JS_FreeValue(v32, v29, v30); return 0; } }
js_execute_async_module: SUB RSP,0xd8 MOV qword ptr [RSP + 0xc8],RDI MOV qword ptr [RSP + 0xc0],RSI MOV RDI,qword ptr [RSP + 0xc8] MOV RAX,qword ptr [RSP + 0xc0] MOV dword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],0x3 MOV RSI,qword ptr [RAX + 0x68] MOV RDX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x58] XOR R9D,R9D XOR EAX,EAX MOV qword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 CALL 0x00152b30 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00175a32 MOV dword ptr [RSP + 0xd4],0xffffffff JMP 0x00175bdd LAB_00175a32: MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xc0] CALL 0x00172d30 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xc8] LEA RSI,[0x175e80] XOR ECX,ECX MOV R8D,0x1 LEA R9,[RSP + 0xa0] MOV EDX,ECX CALL 0x001294f0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xc8] LEA RSI,[0x176160] XOR ECX,ECX MOV R8D,0x1 LEA R9,[RSP + 0xa0] MOV EDX,ECX CALL 0x001294f0 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xc8] LEA R8,[RSP + 0x80] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV ECX,0x2 CALL 0x001730a0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x001229d0 MOV dword ptr [RSP + 0xd4],0x0 LAB_00175bdd: MOV EAX,dword ptr [RSP + 0xd4] ADD RSP,0xd8 RET
int4 js_execute_async_module(int8 param_1,long param_2) { int iVar1; int1 auVar2 [16]; uint uStack_84; int1 local_58 [16]; int1 local_48 [16]; int1 local_38 [16]; int1 local_28 [16]; long local_18; int8 local_10; int4 local_4; local_18 = param_2; local_10 = param_1; local_28 = js_async_function_call (param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70), (ulong)uStack_84 << 0x20,3,0,0,0); iVar1 = JS_IsException(local_28._0_8_,local_28._8_8_); if (iVar1 == 0) { local_38 = JS_NewModuleValue(local_10,local_18); local_58 = JS_NewCFunctionData(local_10,js_async_module_execution_fulfilled,0,0,1,local_38); local_48 = JS_NewCFunctionData(local_10,js_async_module_execution_rejected,0,0,1,local_38); auVar2 = js_promise_then(local_10,local_28._0_8_,local_28._8_8_,2,local_58); JS_FreeValue(local_10,auVar2._0_8_,auVar2._8_8_); JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_); JS_FreeValue(local_10,local_58._0_8_,local_58._8_8_); JS_FreeValue(local_10,local_48._0_8_,local_48._8_8_); JS_FreeValue(local_10,local_28._0_8_,local_28._8_8_); local_4 = 0; } else { local_4 = 0xffffffff; } return local_4; }
47,397
js_execute_async_module
bluesky950520[P]quickjs/quickjs.c
static int js_execute_async_module(JSContext *ctx, JSModuleDef *m) { JSValue promise, m_obj; JSValue resolve_funcs[2], ret_val; promise = js_async_function_call(ctx, m->func_obj, JS_UNDEFINED, 0, NULL, 0); if (JS_IsException(promise)) return -1; m_obj = JS_NewModuleValue(ctx, m); resolve_funcs[0] = JS_NewCFunctionData(ctx, js_async_module_execution_fulfilled, 0, 0, 1, (JSValueConst *)&m_obj); resolve_funcs[1] = JS_NewCFunctionData(ctx, js_async_module_execution_rejected, 0, 0, 1, (JSValueConst *)&m_obj); ret_val = js_promise_then(ctx, promise, 2, (JSValueConst *)resolve_funcs); JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, m_obj); JS_FreeValue(ctx, resolve_funcs[0]); JS_FreeValue(ctx, resolve_funcs[1]); JS_FreeValue(ctx, promise); return 0; }
O1
c
js_execute_async_module: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r12 movq %rdi, %rbx movq 0x68(%rsi), %rsi movq 0x70(%r12), %rdx andq $0x0, (%rsp) pushq $0x3 popq %r8 xorl %ecx, %ecx xorl %r9d, %r9d callq 0x10639 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x1106e addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq incl (%r12) leaq 0x30(%rsp), %r14 movq %r12, (%r14) movq $-0x3, 0x8(%r14) leaq 0x331be(%rip), %rsi # 0x44247 pushq $0x1 popq %r8 movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx movq %r14, %r9 movq %rax, %r13 callq 0x204d6 movq %rax, 0x28(%rsp) movq %rdx, 0x20(%rsp) leaq 0x40(%rsp), %rbp movq %rax, (%rbp) movq %rdx, 0x8(%rbp) leaq 0x33300(%rip), %rsi # 0x443bd movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx pushq $0x1 popq %r8 movq %r14, %r9 callq 0x204d6 movq %rax, %r14 movq %rdx, 0x18(%rsp) movq %rax, 0x10(%rbp) movq %rdx, 0x18(%rbp) movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx movq %rbp, %r8 callq 0x43366 movq 0x18(%rbx), %rdi movq %rax, %rsi callq 0x1ccb2 movq 0x18(%rbx), %rdi pushq $-0x3 popq %rdx movq %r12, %rsi callq 0x1ccb2 movq 0x18(%rbx), %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq %r14, %rsi movq 0x18(%rsp), %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq %r13, %rsi movq %r15, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1ccb2
js_execute_async_module: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12, rsi mov rbx, rdi mov rsi, [rsi+68h] mov rdx, [r12+70h] and [rsp+98h+var_98], 0 push 3 pop r8 xor ecx, ecx xor r9d, r9d call js_async_function_call mov r15, rdx cmp r15d, 6 jnz short loc_1106E add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1106E: inc dword ptr [r12] lea r14, [rsp+98h+var_68] mov [r14], r12 mov qword ptr [r14+8], 0FFFFFFFFFFFFFFFDh lea rsi, js_async_module_execution_fulfilled push 1 pop r8 mov rdi, rbx xor edx, edx xor ecx, ecx mov r9, r14 mov r13, rax call JS_NewCFunctionData mov [rsp+98h+var_70], rax mov [rsp+98h+var_78], rdx lea rbp, [rsp+98h+var_58] mov [rbp+0], rax mov [rbp+8], rdx lea rsi, js_async_module_execution_rejected mov rdi, rbx xor edx, edx xor ecx, ecx push 1 pop r8 mov r9, r14 call JS_NewCFunctionData mov r14, rax mov [rsp+98h+var_80], rdx mov [rbp+10h], rax mov [rbp+18h], rdx mov rdi, rbx mov rsi, r13 mov rdx, r15 mov r8, rbp call js_promise_then mov rdi, [rbx+18h] mov rsi, rax call JS_FreeValueRT mov rdi, [rbx+18h] push 0FFFFFFFFFFFFFFFDh pop rdx mov rsi, r12 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_78] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r14 mov rdx, [rsp+98h+var_80] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r13 mov rdx, r15 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_FreeValueRT
unsigned long long js_execute_async_module(long long a1, long long a2) { unsigned long long result; // rax long long v3; // rdx long long v4; // r15 unsigned long long v5; // r13 long long v6; // rdx long long v7; // r14 long long v8; // rdx long long v9; // rcx long long v10; // rax long long v11; // [rsp+28h] [rbp-70h] _QWORD v12[2]; // [rsp+30h] [rbp-68h] BYREF _QWORD v13[11]; // [rsp+40h] [rbp-58h] BYREF result = js_async_function_call(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112), 0, 3, 0, 0LL); v4 = v3; if ( (_DWORD)v3 != 6 ) { ++*(_DWORD *)a2; v12[0] = a2; v12[1] = -3LL; v5 = result; v11 = JS_NewCFunctionData(a1, js_async_module_execution_fulfilled, 0LL, 0LL, 1LL, v12); v13[0] = v11; v13[1] = v6; v7 = JS_NewCFunctionData(a1, js_async_module_execution_rejected, 0LL, 0LL, 1LL, v12); v13[2] = v7; v13[3] = v8; v10 = js_promise_then(a1, v5, v4, v9, v13); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v10); JS_FreeValueRT(*(_QWORD *)(a1 + 24), a2); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v11); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v7); return JS_FreeValueRT(*(_QWORD *)(a1 + 24), v5); } return result; }
js_execute_async_module: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x68] MOV RDX,qword ptr [R12 + 0x70] AND qword ptr [RSP],0x0 PUSH 0x3 POP R8 XOR ECX,ECX XOR R9D,R9D CALL 0x00110639 MOV R15,RDX CMP R15D,0x6 JNZ 0x0011106e ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011106e: INC dword ptr [R12] LEA R14,[RSP + 0x30] MOV qword ptr [R14],R12 MOV qword ptr [R14 + 0x8],-0x3 LEA RSI,[0x144247] PUSH 0x1 POP R8 MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX MOV R9,R14 MOV R13,RAX CALL 0x001204d6 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],RDX LEA RBP,[RSP + 0x40] MOV qword ptr [RBP],RAX MOV qword ptr [RBP + 0x8],RDX LEA RSI,[0x1443bd] MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX PUSH 0x1 POP R8 MOV R9,R14 CALL 0x001204d6 MOV R14,RAX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RBP + 0x10],RAX MOV qword ptr [RBP + 0x18],RDX MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 MOV R8,RBP CALL 0x00143366 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RAX CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] PUSH -0x3 POP RDX MOV RSI,R12 CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,R15 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011ccb2
void js_execute_async_module(long param_1,int *param_2) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; int8 uVar5; int1 auVar6 [16]; int *local_68; int8 local_60; int1 local_58 [16]; int1 local_48 [16]; auVar6 = js_async_function_call (param_1,*(int8 *)(param_2 + 0x1a),*(int8 *)(param_2 + 0x1c),0,3,0, 0); if (auVar6._8_4_ == 6) { return; } *param_2 = *param_2 + 1; local_60 = 0xfffffffffffffffd; local_68 = param_2; local_58 = JS_NewCFunctionData(param_1,js_async_module_execution_fulfilled,0,0,1,&local_68); uVar4 = local_58._8_8_; uVar1 = local_58._0_8_; local_48 = JS_NewCFunctionData(param_1,js_async_module_execution_rejected,0,0,1,&local_68); uVar5 = local_48._8_8_; uVar2 = local_48._0_8_; uVar3 = js_promise_then(param_1,auVar6._0_8_,auVar6._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,0xfffffffffffffffd); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1,uVar4); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar5); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); return; }
47,398
js_execute_async_module
bluesky950520[P]quickjs/quickjs.c
static int js_execute_async_module(JSContext *ctx, JSModuleDef *m) { JSValue promise, m_obj; JSValue resolve_funcs[2], ret_val; promise = js_async_function_call(ctx, m->func_obj, JS_UNDEFINED, 0, NULL, 0); if (JS_IsException(promise)) return -1; m_obj = JS_NewModuleValue(ctx, m); resolve_funcs[0] = JS_NewCFunctionData(ctx, js_async_module_execution_fulfilled, 0, 0, 1, (JSValueConst *)&m_obj); resolve_funcs[1] = JS_NewCFunctionData(ctx, js_async_module_execution_rejected, 0, 0, 1, (JSValueConst *)&m_obj); ret_val = js_promise_then(ctx, promise, 2, (JSValueConst *)resolve_funcs); JS_FreeValue(ctx, ret_val); JS_FreeValue(ctx, m_obj); JS_FreeValue(ctx, resolve_funcs[0]); JS_FreeValue(ctx, resolve_funcs[1]); JS_FreeValue(ctx, promise); return 0; }
O3
c
js_execute_async_module: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r12 movq %rdi, %r15 movq 0x68(%rsi), %rsi movq 0x70(%r12), %rdx andq $0x0, (%rsp) pushq $0x3 popq %r8 xorl %ecx, %ecx xorl %r9d, %r9d callq 0x10913 cmpl $0x6, %edx je 0x11564 incl (%r12) leaq 0x40(%rsp), %rbp movq %r12, (%rbp) movq $-0x3, 0x8(%rbp) leaq 0x34984(%rip), %rsi # 0x45daf movq %rax, %rbx movq %rdx, %r14 pushq $0x1 popq %r8 movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx movq %rbp, %r9 callq 0x20bd2 leaq 0x50(%rsp), %r13 movq %rax, 0x28(%rsp) movq %rax, (%r13) movq %rdx, 0x20(%rsp) movq %rdx, 0x8(%r13) leaq 0x34ae5(%rip), %rsi # 0x45f47 movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx pushq $0x1 popq %r8 movq %rbp, %r9 callq 0x20bd2 movq %rdx, %rbp movq %rax, 0x30(%rsp) movq %rax, 0x10(%r13) movq %rdx, 0x18(%r13) movq %r15, %rdi movq %rbx, 0x18(%rsp) movq %rbx, %rsi movq %r14, 0x38(%rsp) movq %r14, %rdx movq %r13, %r8 callq 0x44e36 movq 0x18(%r15), %rdi cmpl $-0x9, %edx jb 0x114c1 movl (%rax), %ecx leal -0x1(%rcx), %esi movl %esi, (%rax) cmpl $0x1, %ecx jg 0x114c1 movq %rax, %rsi callq 0x20d90 movq 0x18(%r15), %rdi movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x114e0 pushq $-0x3 popq %rdx movq %r12, %rsi callq 0x20d90 movq 0x18(%r15), %rdi movq 0x30(%rsp), %r12 movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx cmpl $-0x9, %edx movq 0x38(%rsp), %r14 jb 0x1150e movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x1150e callq 0x20d90 movq 0x18(%r15), %rdi cmpl $-0x9, %ebp jb 0x11532 movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x11532 movq %r12, %rsi movq %rbp, %rdx callq 0x20d90 movq 0x18(%r15), %rdi cmpl $-0x9, %r14d jb 0x11564 movq 0x18(%rsp), %rdx movl (%rdx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rdx) cmpl $0x1, %eax jg 0x11564 movq 0x18(%rsp), %rsi movq %r14, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x20d90 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_execute_async_module: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r12, rsi mov r15, rdi mov rsi, [rsi+68h] mov rdx, [r12+70h] and [rsp+0A8h+var_A8], 0 push 3 pop r8 xor ecx, ecx xor r9d, r9d call js_async_function_call cmp edx, 6 jz loc_11564 inc dword ptr [r12] lea rbp, [rsp+0A8h+var_68] mov [rbp+0], r12 mov qword ptr [rbp+8], 0FFFFFFFFFFFFFFFDh lea rsi, js_async_module_execution_fulfilled mov rbx, rax mov r14, rdx push 1 pop r8 mov rdi, r15 xor edx, edx xor ecx, ecx mov r9, rbp call JS_NewCFunctionData lea r13, [rsp+0A8h+var_58] mov [rsp+0A8h+var_80], rax mov [r13+0], rax mov [rsp+0A8h+var_88], rdx mov [r13+8], rdx lea rsi, js_async_module_execution_rejected mov rdi, r15 xor edx, edx xor ecx, ecx push 1 pop r8 mov r9, rbp call JS_NewCFunctionData mov rbp, rdx mov [rsp+0A8h+var_78], rax mov [r13+10h], rax mov [r13+18h], rdx mov rdi, r15 mov [rsp+0A8h+var_90], rbx mov rsi, rbx mov [rsp+0A8h+var_70], r14 mov rdx, r14 mov r8, r13 call js_promise_then mov rdi, [r15+18h] cmp edx, 0FFFFFFF7h jb short loc_114C1 mov ecx, [rax] lea esi, [rcx-1] mov [rax], esi cmp ecx, 1 jg short loc_114C1 mov rsi, rax call js_free_value_rt mov rdi, [r15+18h] loc_114C1: mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_114E0 push 0FFFFFFFFFFFFFFFDh pop rdx mov rsi, r12 call js_free_value_rt mov rdi, [r15+18h] loc_114E0: mov r12, [rsp+0A8h+var_78] mov rsi, [rsp+0A8h+var_80] mov rdx, [rsp+0A8h+var_88] cmp edx, 0FFFFFFF7h mov r14, [rsp+0A8h+var_70] jb short loc_1150E mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_1150E call js_free_value_rt mov rdi, [r15+18h] loc_1150E: cmp ebp, 0FFFFFFF7h jb short loc_11532 mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_11532 mov rsi, r12 mov rdx, rbp call js_free_value_rt mov rdi, [r15+18h] loc_11532: cmp r14d, 0FFFFFFF7h jb short loc_11564 mov rdx, [rsp+0A8h+var_90] mov eax, [rdx] lea ecx, [rax-1] mov [rdx], ecx cmp eax, 1 jg short loc_11564 mov rsi, [rsp+0A8h+var_90] mov rdx, r14 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp js_free_value_rt loc_11564: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_execute_async_module(long long a1, unsigned int *a2) { unsigned long long result; // rax long long v4; // rdx _DWORD *v5; // rbx long long v6; // r14 long long v7; // rdx long long v8; // rax long long v9; // rdx unsigned int v10; // ebp long long v11; // rcx _DWORD *v12; // rax long long v13; // rdi unsigned int v14; // edx int v15; // ecx unsigned int v16; // [rsp+20h] [rbp-88h] _DWORD *v17; // [rsp+28h] [rbp-80h] _DWORD *v18; // [rsp+30h] [rbp-78h] _QWORD v19[2]; // [rsp+40h] [rbp-68h] BYREF _QWORD v20[11]; // [rsp+50h] [rbp-58h] BYREF result = js_async_function_call(a1, *((_QWORD *)a2 + 13), *((_QWORD *)a2 + 14), 0, 3, 0, 0LL); if ( (_DWORD)v4 != 6 ) { ++*a2; v19[0] = a2; v19[1] = -3LL; v5 = (_DWORD *)result; v6 = v4; v17 = (_DWORD *)JS_NewCFunctionData(a1, js_async_module_execution_fulfilled, 0LL, 0LL, 1LL, v19); v20[0] = v17; v16 = v7; v20[1] = v7; v8 = JS_NewCFunctionData(a1, js_async_module_execution_rejected, 0LL, 0LL, 1LL, v19); v10 = v9; v18 = (_DWORD *)v8; v20[2] = v8; v20[3] = v9; v12 = (_DWORD *)js_promise_then(a1, v5, v6, v11, v20); v13 = *(_QWORD *)(a1 + 24); if ( v14 >= 0xFFFFFFF7 ) { v15 = (*v12)--; if ( v15 <= 1 ) { js_free_value_rt(v13, v12); v13 = *(_QWORD *)(a1 + 24); } } result = *a2; *a2 = result - 1; if ( (int)result <= 1 ) { result = js_free_value_rt(v13, a2); v13 = *(_QWORD *)(a1 + 24); } if ( v16 >= 0xFFFFFFF7 ) { result = (unsigned int)*v17; *v17 = result - 1; if ( (int)result <= 1 ) { result = js_free_value_rt(v13, v17); v13 = *(_QWORD *)(a1 + 24); } } if ( v10 >= 0xFFFFFFF7 ) { result = (unsigned int)*v18; *v18 = result - 1; if ( (int)result <= 1 ) { result = js_free_value_rt(v13, v18); v13 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)v6 >= 0xFFFFFFF7 ) { result = (unsigned int)*v5; *v5 = result - 1; if ( (int)result <= 1 ) return js_free_value_rt(v13, v5); } } return result; }
js_execute_async_module: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R12,RSI MOV R15,RDI MOV RSI,qword ptr [RSI + 0x68] MOV RDX,qword ptr [R12 + 0x70] AND qword ptr [RSP],0x0 PUSH 0x3 POP R8 XOR ECX,ECX XOR R9D,R9D CALL 0x00110913 CMP EDX,0x6 JZ 0x00111564 INC dword ptr [R12] LEA RBP,[RSP + 0x40] MOV qword ptr [RBP],R12 MOV qword ptr [RBP + 0x8],-0x3 LEA RSI,[0x145daf] MOV RBX,RAX MOV R14,RDX PUSH 0x1 POP R8 MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX MOV R9,RBP CALL 0x00120bd2 LEA R13,[RSP + 0x50] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [R13],RAX MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [R13 + 0x8],RDX LEA RSI,[0x145f47] MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX PUSH 0x1 POP R8 MOV R9,RBP CALL 0x00120bd2 MOV RBP,RDX MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [R13 + 0x10],RAX MOV qword ptr [R13 + 0x18],RDX MOV RDI,R15 MOV qword ptr [RSP + 0x18],RBX MOV RSI,RBX MOV qword ptr [RSP + 0x38],R14 MOV RDX,R14 MOV R8,R13 CALL 0x00144e36 MOV RDI,qword ptr [R15 + 0x18] CMP EDX,-0x9 JC 0x001114c1 MOV ECX,dword ptr [RAX] LEA ESI,[RCX + -0x1] MOV dword ptr [RAX],ESI CMP ECX,0x1 JG 0x001114c1 MOV RSI,RAX CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_001114c1: MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x001114e0 PUSH -0x3 POP RDX MOV RSI,R12 CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_001114e0: MOV R12,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] CMP EDX,-0x9 MOV R14,qword ptr [RSP + 0x38] JC 0x0011150e MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0011150e CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_0011150e: CMP EBP,-0x9 JC 0x00111532 MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x00111532 MOV RSI,R12 MOV RDX,RBP CALL 0x00120d90 MOV RDI,qword ptr [R15 + 0x18] LAB_00111532: CMP R14D,-0x9 JC 0x00111564 MOV RDX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RDX] LEA ECX,[RAX + -0x1] MOV dword ptr [RDX],ECX CMP EAX,0x1 JG 0x00111564 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,R14 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00120d90 LAB_00111564: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void js_execute_async_module(long param_1,int *param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int8 uVar5; int1 auVar6 [12]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int *local_68; int8 local_60; int1 local_58 [16]; int1 local_48 [16]; auVar7 = js_async_function_call (param_1,*(int8 *)(param_2 + 0x1a),*(int8 *)(param_2 + 0x1c),0,3,0, 0); piVar2 = auVar7._0_8_; if (auVar7._8_4_ != 6) { *param_2 = *param_2 + 1; local_60 = 0xfffffffffffffffd; local_68 = param_2; auVar8 = JS_NewCFunctionData(param_1,js_async_module_execution_fulfilled,0,0,1,&local_68); local_58 = auVar8; auVar9 = JS_NewCFunctionData(param_1,js_async_module_execution_rejected,0,0,1,&local_68); piVar3 = auVar9._0_8_; local_48 = auVar9; auVar6 = js_promise_then(param_1,piVar2,auVar7._8_8_); piVar4 = auVar6._0_8_; uVar5 = *(int8 *)(param_1 + 0x18); if (0xfffffff6 < auVar6._8_4_) { iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar4); uVar5 = *(int8 *)(param_1 + 0x18); } } iVar1 = *param_2; *param_2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,param_2,0xfffffffffffffffd); uVar5 = *(int8 *)(param_1 + 0x18); } if (0xfffffff6 < auVar8._8_4_) { iVar1 = *auVar8._0_8_; *auVar8._0_8_ = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < auVar9._8_4_) { iVar1 = *piVar3; *piVar3 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar3,auVar9._8_8_); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < auVar7._8_4_) { iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar2,auVar7._8_8_); return; } } } return; }
47,399
list_reverse
eloqsql/mysys/list.c
LIST *list_reverse(LIST *root) { LIST *last; last=root; while (root) { last=root; root=root->next; last->next=last->prev; last->prev=root; } return last; }
O0
c
list_reverse: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0xe4577 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) jmp 0xe4540 movq -0x10(%rbp), %rax popq %rbp retq nopl (%rax)
list_reverse: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax loc_E4540: cmp [rbp+var_8], 0 jz short loc_E4577 mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_8], rax mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+8], rcx mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax], rcx jmp short loc_E4540 loc_E4577: mov rax, [rbp+var_10] pop rbp retn
_QWORD * list_reverse(_QWORD *a1) { _QWORD *v2; // [rsp+0h] [rbp-10h] _QWORD *v3; // [rsp+8h] [rbp-8h] v3 = a1; v2 = a1; while ( v3 ) { v2 = v3; v3 = (_QWORD *)v3[1]; v2[1] = *v2; *v2 = v3; } return v2; }
list_reverse: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX LAB_001e4540: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001e4577 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX JMP 0x001e4540 LAB_001e4577: MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
int8 * list_reverse(int8 *param_1) { int8 *puVar1; int8 *local_18; int8 *local_10; local_18 = param_1; local_10 = param_1; while (local_10 != (int8 *)0x0) { local_18 = local_10; puVar1 = (int8 *)local_10[1]; local_10[1] = *local_10; *local_10 = puVar1; local_10 = puVar1; } return local_18; }