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
200
set_task() (.resume)
tinyCoroLab/examples/event_guard.cpp
task<> set_task() { event_guard guard(ev); log::info("set task ready to sleep"); utils::sleep(3); log::info("ready to set event"); co_return; }
O0
cpp
set_task() (.resume): subq $0x78, %rsp movq %rdi, 0x30(%rsp) movq %rdi, 0x70(%rsp) movq %rdi, %rax addq $0x19, %rax movq %rax, 0x38(%rsp) movq %rdi, %rax addq $0x1a, %rax movq %rax, 0x40(%rsp) addq $0x10, %rdi movq %rdi, 0x48(%rsp) jmp 0xa348 jmp 0xa156 jmp 0xa158 movb $0x1, %al testb %al, %al jne 0xa181 jmp 0xa160 movb $0x1, %al testb %al, %al jne 0xa337 jmp 0xa16c movl $0x2, %eax movl %eax, 0x2c(%rsp) jmp 0xa177 movl 0x2c(%rsp), %eax movl %eax, 0x28(%rsp) jmp 0xa199 movq 0x38(%rsp), %rdi callq 0xbba0 xorl %eax, %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax movl %eax, 0x28(%rsp) movl 0x28(%rsp), %eax cmpl $0x0, %eax movl %eax, 0x20(%rsp) je 0xa1b3 movl 0x20(%rsp), %eax movl %eax, 0x1c(%rsp) jmp 0xa2fd leaq 0x971f0(%rip), %rsi # 0xa13aa leaq 0x58(%rsp), %rdi callq 0xbbb0 leaq 0x63545(%rip), %rdi # 0x6d710 callq 0xbbd0 jmp 0xa1d2 movl $0x3, %edi callq 0xbc00 leaq 0x63545(%rip), %rdi # 0x6d728 callq 0xbbd0 jmp 0xa1ea movq 0x48(%rsp), %rdi callq 0xbc40 leaq 0x58(%rsp), %rdi callq 0xbc50 jmp 0xa237 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x6c(%rsp) leaq 0x58(%rsp), %rdi callq 0xbc50 movq 0x60(%rsp), %rdi callq 0x9100 movq 0x48(%rsp), %rdi callq 0xbc70 callq 0x94d0 jmp 0xa233 jmp 0xa235 jmp 0xa237 movq 0x48(%rsp), %rdi callq 0xbcb0 movq 0x40(%rsp), %rdi callq 0xbb20 testb $0x1, %al jne 0xa2be movq 0x30(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x18(%rax) movq 0x30(%rsp), %rsi movq 0x40(%rsp), %rdi callq 0x9a80 jmp 0xa270 jmp 0xa272 xorl %eax, %eax testb %al, %al jne 0xa2be jmp 0xa27a movb $0x1, %al testb %al, %al jne 0xa337 jmp 0xa286 movl $0x2, %eax movl %eax, 0x18(%rsp) jmp 0xa291 movl 0x18(%rsp), %eax movl %eax, 0x14(%rsp) jmp 0xa2d6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x6c(%rsp) movq 0x30(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x18(%rax) jmp 0xa33e movq 0x40(%rsp), %rdi callq 0xbba0 xorl %eax, %eax movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax cmpl $0x0, %eax movl %eax, 0xc(%rsp) je 0xa2ed movl 0xc(%rsp), %eax movl %eax, 0x1c(%rsp) jmp 0xa2fd xorl %eax, %eax movl %eax, 0x8(%rsp) jmp 0xa2f5 movl 0x8(%rsp), %eax movl %eax, 0x1c(%rsp) movq 0x48(%rsp), %rdi movl 0x1c(%rsp), %eax movl %eax, 0x4(%rsp) callq 0xbcc0 movq 0x30(%rsp), %rax cmpq $0x0, %rax je 0xa329 movq 0x30(%rsp), %rdi movl $0x20, %esi callq 0x92f0 movl 0x4(%rsp), %eax testl %eax, %eax je 0xa335 jmp 0xa333 jmp 0xa337 jmp 0xa337 jmp 0xa339 addq $0x78, %rsp retq movq 0x60(%rsp), %rdi callq 0x9520 jmp 0xa154 nopl (%rax)
_Z8set_taskv_resume: sub rsp, 78h mov [rsp+78h+var_48], rdi mov [rsp+78h+var_8], rdi mov rax, rdi add rax, 19h mov [rsp+78h+var_40], rax mov rax, rdi add rax, 1Ah mov [rsp+78h+var_38], rax add rdi, 10h mov [rsp+78h+var_30], rdi jmp loc_A348 loc_A154: jmp short $+2 loc_A156: jmp short $+2 loc_A158: mov al, 1 test al, al jnz short loc_A181 jmp short $+2 loc_A160: mov al, 1 test al, al jnz loc_A337 jmp short $+2 loc_A16C: mov eax, 2 mov [rsp+78h+var_4C], eax jmp short $+2 loc_A177: mov eax, [rsp+78h+var_4C] mov [rsp+78h+var_50], eax jmp short loc_A199 loc_A181: mov rdi, [rsp+78h+var_40]; this call _ZNKSt7__n486114suspend_always12await_resumeEv; std::__n4861::suspend_always::await_resume(void) xor eax, eax mov [rsp+78h+var_54], eax mov eax, [rsp+78h+var_54] mov [rsp+78h+var_50], eax loc_A199: mov eax, [rsp+78h+var_50] cmp eax, 0 mov [rsp+78h+var_58], eax jz short loc_A1B3 mov eax, [rsp+78h+var_58] mov [rsp+78h+var_5C], eax jmp loc_A2FD loc_A1B3: lea rsi, ev; __int64 lea rdi, [rsp+78h+var_20] call _ZN4coro11event_guardC2ERNS_5eventIvEE; coro::event_guard::event_guard(coro::event<void> &) lea rdi, aSetTaskReadyTo; "set task ready to sleep" call _ZN4coro3log4infoIJEEEvPKcDpRKT_ jmp short $+2 loc_A1D2: mov edi, (offset dword_0+3); this call _ZN4coro5utils5sleepEl; coro::utils::sleep(long) lea rdi, aReadyToSetEven; "ready to set event" call _ZN4coro3log4infoIJEEEvPKcDpRKT_ jmp short $+2 loc_A1EA: mov rdi, [rsp+78h+var_30] call _ZN4coro6detail7promiseIvE11return_voidEv; coro::detail::promise<void>::return_void(void) lea rdi, [rsp+78h+var_20]; this call _ZN4coro11event_guardD2Ev; coro::event_guard::~event_guard() jmp short loc_A237 mov rcx, rax mov eax, edx mov [rsp+78h+var_18], rcx mov [rsp+78h+var_C], eax lea rdi, [rsp+78h+var_20]; this call _ZN4coro11event_guardD2Ev; coro::event_guard::~event_guard() mov rdi, [rsp+78h+var_18]; void * call ___cxa_begin_catch mov rdi, [rsp+78h+var_30] call _ZN4coro6detail7promiseIvE19unhandled_exceptionEv; coro::detail::promise<void>::unhandled_exception(void) call ___cxa_end_catch jmp short $+2 loc_A233: jmp short $+2 loc_A235: jmp short $+2 loc_A237: mov rdi, [rsp+78h+var_30]; this call _ZN4coro6detail12promise_base13final_suspendEv; coro::detail::promise_base::final_suspend(void) mov rdi, [rsp+78h+var_38]; this call _ZNKSt7__n486114suspend_always11await_readyEv; std::__n4861::suspend_always::await_ready(void) test al, 1 jnz short loc_A2BE mov rax, [rsp+78h+var_48] mov qword ptr [rax], 0 mov byte ptr [rax+18h], 1 mov rsi, [rsp+78h+var_48] mov rdi, [rsp+78h+var_38] call sub_9A80 jmp short $+2 loc_A270: jmp short $+2 loc_A272: xor eax, eax test al, al jnz short loc_A2BE jmp short $+2 loc_A27A: mov al, 1 test al, al jnz loc_A337 jmp short $+2 loc_A286: mov eax, 2 mov [rsp+78h+var_60], eax jmp short $+2 loc_A291: mov eax, [rsp+78h+var_60] mov [rsp+78h+var_64], eax jmp short loc_A2D6 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_64], eax mov rax, [rsp+arg_28] mov qword ptr [rax], 0 mov byte ptr [rax+18h], 1 jmp loc_A33E loc_A2BE: mov rdi, [rsp+78h+var_38]; this call _ZNKSt7__n486114suspend_always12await_resumeEv; std::__n4861::suspend_always::await_resume(void) xor eax, eax mov [rsp+78h+var_68], eax mov eax, [rsp+78h+var_68] mov [rsp+78h+var_64], eax loc_A2D6: mov eax, [rsp+78h+var_64] cmp eax, 0 mov [rsp+78h+var_6C], eax jz short loc_A2ED mov eax, [rsp+78h+var_6C] mov [rsp+78h+var_5C], eax jmp short loc_A2FD loc_A2ED: xor eax, eax mov [rsp+78h+var_70], eax jmp short $+2 loc_A2F5: mov eax, [rsp+78h+var_70] mov [rsp+78h+var_5C], eax loc_A2FD: mov rdi, [rsp+78h+var_30] mov eax, [rsp+78h+var_5C] mov [rsp+78h+var_74], eax call _ZN4coro6detail7promiseIvED2Ev; coro::detail::promise<void>::~promise() mov rax, [rsp+78h+var_48] cmp rax, 0 jz short loc_A329 mov rdi, [rsp+78h+var_48]; void * mov esi, 20h ; ' '; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A329: mov eax, [rsp+78h+var_74] test eax, eax jz short loc_A335 jmp short $+2 loc_A333: jmp short loc_A337 loc_A335: jmp short $+2 loc_A337: jmp short $+2 loc_A339: add rsp, 78h retn loc_A33E: mov rdi, [rsp+arg_58] call __Unwind_Resume loc_A348: jmp loc_A154
char set_task(_BYTE *a1) { std::__n4861::suspend_always *v2; // [rsp+40h] [rbp-38h] _BYTE v3[8]; // [rsp+58h] [rbp-20h] BYREF _BYTE *v4; // [rsp+70h] [rbp-8h] v4 = a1; v2 = (std::__n4861::suspend_always *)(a1 + 26); std::__n4861::suspend_always::await_resume((std::__n4861::suspend_always *)(a1 + 25)); coro::event_guard::event_guard(v3, &ev); coro::log::info<>("set task ready to sleep"); coro::utils::sleep((coro::utils *)((char *)&dword_0 + 3), (long long)&ev); coro::log::info<>("ready to set event"); coro::detail::promise<void>::return_void(a1 + 16); coro::event_guard::~event_guard((coro::event_guard *)v3); coro::detail::promise_base::final_suspend((coro::detail::promise_base *)(a1 + 16)); if ( (std::__n4861::suspend_always::await_ready((std::__n4861::suspend_always *)(a1 + 26)) & 1) != 0 ) { std::__n4861::suspend_always::await_resume(v2); coro::detail::promise<void>::~promise(a1 + 16); if ( a1 ) operator delete(a1, 0x20uLL); return 0; } else { *(_QWORD *)a1 = 0LL; a1[24] = 1; sub_9A80((long long)v2, (long long)a1); return 1; } }
count_digits<1,unsigned__int128>: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x1f] CALL 0x0011a630 ADD RSP,0x48 RET
/* int fmt::v11::detail::count_digits<1, unsigned __int128>(unsigned __int128) */ int __thiscall fmt::v11::detail::count_digits<1,unsigned__int128>(detail *this,uint param_1) { int iVar1; int4 in_register_00000034; _lambda_unsigned__int128__1_ local_29; detail *local_28; int8 local_20; detail *local_18; int8 local_10; local_20 = CONCAT44(in_register_00000034,param_1); local_28 = this; local_18 = this; local_10 = local_20; iVar1 = count_digits<1,unsigned__int128>(unsigned__int128)::{lambda(unsigned__int128)#1}:: operator()(&local_29,(uint)this); return iVar1; }
201
mysql_get_timeout_value
eloqsql/libmariadb/libmariadb/mariadb_lib.c
unsigned int STDCALL mysql_get_timeout_value(const MYSQL *mysql) { unsigned int timeout= 0; if (mysql->options.extension && mysql->options.extension->async_context) timeout= mysql->options.extension->async_context->timeout_value; /* Avoid overflow. */ if (timeout > UINT_MAX - 999) return (timeout - 1)/1000 + 1; else return (timeout+999)/1000; }
O0
c
mysql_get_timeout_value: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x3e024 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x3e024 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movl 0x10(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0xfffffc18, -0x14(%rbp) # imm = 0xFFFFFC18 jbe 0x3e044 movl -0x14(%rbp), %eax subl $0x1, %eax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x3e058 movl -0x14(%rbp), %eax addl $0x3e7, %eax # imm = 0x3E7 movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
mysql_get_timeout_value: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_3E024 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_3E024 mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+28h] mov eax, [rax+10h] mov [rbp+var_14], eax loc_3E024: cmp [rbp+var_14], 0FFFFFC18h jbe short loc_3E044 mov eax, [rbp+var_14] sub eax, 1 mov ecx, 3E8h xor edx, edx div ecx add eax, 1 mov [rbp+var_4], eax jmp short loc_3E058 loc_3E044: mov eax, [rbp+var_14] add eax, 3E7h mov ecx, 3E8h xor edx, edx div ecx mov [rbp+var_4], eax loc_3E058: mov eax, [rbp+var_4] pop rbp retn
long long mysql_get_timeout_value(long long a1) { unsigned int v2; // [rsp+0h] [rbp-14h] v2 = 0; if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) ) v2 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 16LL); if ( v2 <= 0xFFFFFC18 ) return (v2 + 999) / 0x3E8; else return (v2 - 1) / 0x3E8 + 1; }
mysql_get_timeout_value: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0013e024 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0013e024 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x14],EAX LAB_0013e024: CMP dword ptr [RBP + -0x14],0xfffffc18 JBE 0x0013e044 MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV ECX,0x3e8 XOR EDX,EDX DIV ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0013e058 LAB_0013e044: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x3e7 MOV ECX,0x3e8 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x4],EAX LAB_0013e058: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint mysql_get_timeout_value(long param_1) { int4 local_1c; int4 local_c; local_1c = 0; if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x28) != 0)) { local_1c = *(uint *)(*(long *)(*(long *)(param_1 + 0x480) + 0x28) + 0x10); } if (local_1c < 0xfffffc19) { local_c = (local_1c + 999) / 1000; } else { local_c = (local_1c - 1) / 1000 + 1; } return local_c; }
202
minja::Value::pop(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value pop(const Value& index) { if (is_array()) { if (array_->empty()) throw std::runtime_error("pop from empty list"); if (index.is_null()) { auto ret = array_->back(); array_->pop_back(); return ret; } else if (!index.is_number_integer()) { throw std::runtime_error("pop index must be an integer: " + index.dump()); } else { auto i = index.get<int>(); if (i < 0 || i >= static_cast<int>(array_->size())) throw std::runtime_error("pop index out of range: " + index.dump()); auto it = array_->begin() + (i < 0 ? array_->size() + i : i); auto ret = *it; array_->erase(it); return ret; } } else if (is_object()) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + index.dump()); auto it = object_->find(index.primitive_); if (it == object_->end()) throw std::runtime_error("Key not found: " + index.dump()); auto ret = it->second; object_->erase(it); return ret; } else { throw std::runtime_error("Value is not an array or object: " + dump()); } }
O2
cpp
minja::Value::pop(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq 0x10(%rsi), %rax testq %rax, %rax je 0x6e41b movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x6e4d6 movq %rbx, %rdi callq 0x64d50 testb %al, %al je 0x6e471 movq 0x10(%r15), %rax movq 0x8(%rax), %rsi addq $-0x50, %rsi movq %r14, %rdi callq 0x69f4e movq 0x10(%r15), %rdi callq 0x6f470 jmp 0x6e4c6 cmpq $0x0, 0x20(%r15) je 0x6e562 movq %rbx, %rdi callq 0x64756 testb %al, %al je 0x6e5be movq 0x20(%r15), %rdi leaq 0x40(%rbx), %rsi callq 0x6ca16 movq %rax, %r12 movq 0x20(%r15), %rax cmpq 0x8(%rax), %r12 je 0x6e61a movq %r12, %rsi addq $0x10, %rsi movq %r14, %rdi callq 0x69f4e movq 0x20(%r15), %rdi movq %r12, %rsi callq 0x6f48a jmp 0x6e4c6 movb 0x40(%rbx), %al addb $-0x5, %al cmpb $0x2, %al jae 0x6e673 movq %rbx, %rdi callq 0x6c960 testl %eax, %eax js 0x6e506 movl %eax, %ecx movq 0x10(%r15), %rax movq (%rax), %r12 movq 0x8(%rax), %rax subq %r12, %rax pushq $0x50 popq %rsi cqto idivq %rsi cmpl %eax, %ecx jge 0x6e506 movl %ecx, %eax imulq $0x50, %rax, %rax addq %rax, %r12 movq %r14, %rdi movq %r12, %rsi callq 0x69f4e movq 0x10(%r15), %rdi movq %r12, %rsi callq 0x6f484 movq %r14, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x47826(%rip), %rsi # 0xb5d0e movq %rax, %rdi callq 0x23330 movq 0x90af1(%rip), %rsi # 0xfefe8 movq 0x90a4a(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x47819(%rip), %rsi # 0xb5d41 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x90a9a(%rip), %rsi # 0xfefe8 movq 0x909f3(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 jmp 0x6e6ca pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r15, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x47482(%rip), %rsi # 0xb5a06 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x90a3e(%rip), %rsi # 0xfefe8 movq 0x90997(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 jmp 0x6e6ca pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x472da(%rip), %rsi # 0xb58ba leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x909e2(%rip), %rsi # 0xfefe8 movq 0x9093b(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 jmp 0x6e6ca pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x4771e(%rip), %rsi # 0xb5d5a leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x90986(%rip), %rsi # 0xfefe8 movq 0x908df(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 jmp 0x6e6ca pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x4768d(%rip), %rsi # 0xb5d22 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x9092d(%rip), %rsi # 0xfefe8 movq 0x90886(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23fb0 jmp 0x6e6da jmp 0x6e6e9 jmp 0x6e6da jmp 0x6e6e9 jmp 0x6e6da jmp 0x6e6e9 jmp 0x6e6da jmp 0x6e6e9 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x242a8 jmp 0x6e6ef movq %rax, %rbx movb $0x1, %bpl movq %rsp, %rdi callq 0x242a8 testb %bpl, %bpl jne 0x6e70d jmp 0x6e722 jmp 0x6e70a jmp 0x6e70a jmp 0x6e70a jmp 0x6e70a jmp 0x6e717 jmp 0x6e70a movq %rax, %rbx movq %r14, %rdi callq 0x23690 jmp 0x6e722 movq %rax, %rbx movq %r14, %rdi callq 0x64578 movq %rbx, %rdi callq 0x24030
_ZN5minja5Value3popERKS0_: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rdx mov r15, rsi mov r14, rdi mov rax, [rsi+10h] test rax, rax jz short loc_6E41B mov rcx, [rax] cmp rcx, [rax+8] jz loc_6E4D6 mov rdi, rbx; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_6E471 mov rax, [r15+10h] mov rsi, [rax+8] add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value * mov rdi, r14; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] call _ZNSt6vectorIN5minja5ValueESaIS1_EE8pop_backEv; std::vector<minja::Value>::pop_back(void) jmp loc_6E4C6 loc_6E41B: cmp qword ptr [r15+20h], 0 jz loc_6E562 mov rdi, rbx; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz loc_6E5BE mov rdi, [r15+20h] lea rsi, [rbx+40h] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov r12, rax mov rax, [r15+20h] cmp r12, [rax+8] jz loc_6E61A mov rsi, r12 add rsi, 10h; minja::Value * mov rdi, r14; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+20h] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEE; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>) jmp short loc_6E4C6 loc_6E471: mov al, [rbx+40h] add al, 0FBh cmp al, 2 jnb loc_6E673 mov rdi, rbx call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) test eax, eax js short loc_6E506 mov ecx, eax mov rax, [r15+10h] mov r12, [rax] mov rax, [rax+8] sub rax, r12 push 50h ; 'P' pop rsi cqo idiv rsi cmp ecx, eax jge short loc_6E506 mov eax, ecx imul rax, 50h ; 'P' add r12, rax mov rdi, r14; this mov rsi, r12; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] mov rsi, r12 call _ZNSt6vectorIN5minja5ValueESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE; std::vector<minja::Value>::erase(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>) loc_6E4C6: mov rax, r14 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6E4D6: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aPopFromEmptyLi; "pop from empty list" 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, r14; void * call ___cxa_throw loc_6E506: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexOutOfR; "pop index out of range: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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, r14; void * call ___cxa_throw jmp loc_6E6CA loc_6E562: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r15 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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, r14; void * call ___cxa_throw jmp loc_6E6CA loc_6E5BE: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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, r14; void * call ___cxa_throw jmp loc_6E6CA loc_6E61A: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aKeyNotFound_0; "Key not found: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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, r14; void * call ___cxa_throw jmp short loc_6E6CA loc_6E673: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexMustBe; "pop index must be an integer: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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, r14; void * call ___cxa_throw loc_6E6CA: jmp short loc_6E6DA jmp short loc_6E6E9 jmp short loc_6E6DA jmp short loc_6E6E9 jmp short loc_6E6DA jmp short loc_6E6E9 jmp short loc_6E6DA jmp short loc_6E6E9 loc_6E6DA: mov rbx, rax lea rdi, [rsp+68h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6E6EF loc_6E6E9: mov rbx, rax mov bpl, 1 loc_6E6EF: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6E70D jmp short loc_6E722 jmp short loc_6E70A jmp short loc_6E70A jmp short loc_6E70A jmp short loc_6E70A jmp short loc_6E717 jmp short $+2 loc_6E70A: mov rbx, rax loc_6E70D: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6E722 loc_6E717: mov rbx, rax mov rdi, r14; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6E722: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, unsigned __int8 *a3, __m128d a4) { _QWORD *v5; // rax unsigned __int8 *v6; // r12 int v7; // eax int v8; // ecx _QWORD *v9; // rax const minja::Value *v10; // r12 std::runtime_error *exception; // r14 void *v13; // r14 void *v14; // r14 void *v15; // r14 void *v16; // r14 void *v17; // r14 _BYTE v18[32]; // [rsp+0h] [rbp-68h] BYREF _BYTE v19[72]; // [rsp+20h] [rbp-48h] BYREF v5 = (_QWORD *)*((_QWORD *)a2 + 2); if ( v5 ) { if ( *v5 == v5[1] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "pop from empty list"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( minja::Value::is_null((minja::Value *)a3) ) { minja::Value::Value(this, (const minja::Value *)(*(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL) - 80LL)); std::vector<minja::Value>::pop_back(*((_QWORD *)a2 + 2)); } else { if ( (unsigned __int8)(a3[64] - 5) >= 2u ) { v17 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"pop index must be an integer: ", (long long)v18); std::runtime_error::runtime_error(v17, v19); __cxa_throw( v17, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v7 = minja::Value::get<int>((minja::Value *)a3); if ( v7 < 0 || (v8 = v7, v9 = (_QWORD *)*((_QWORD *)a2 + 2), v8 >= (int)((v9[1] - *v9) / 80LL)) ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"pop index out of range: ", (long long)v18); std::runtime_error::runtime_error(v13, v19); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v10 = (const minja::Value *)(80LL * (unsigned int)v8 + *v9); minja::Value::Value(this, v10); std::vector<minja::Value>::erase(*((_QWORD *)a2 + 2), v10); } } else { if ( !*((_QWORD *)a2 + 4) ) { v14 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Value is not an array or object: ", (long long)v18); std::runtime_error::runtime_error(v14, v19); __cxa_throw( v14, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !minja::Value::is_primitive((minja::Value *)a3) ) { v15 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Unashable type: ", (long long)v18); std::runtime_error::runtime_error(v15, v19); __cxa_throw( v15, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find( *((unsigned __int8 ***)a2 + 4), a3 + 64, a4); if ( v6 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) ) { v16 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Key not found: ", (long long)v18); std::runtime_error::runtime_error(v16, v19); __cxa_throw( v16, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::Value(this, (const minja::Value *)(v6 + 16)); nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( *((_QWORD *)a2 + 4), v6); } return this; }
pop: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RSI + 0x10] TEST RAX,RAX JZ 0x0016e41b MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0016e4d6 MOV RDI,RBX CALL 0x00164d50 TEST AL,AL JZ 0x0016e471 MOV RAX,qword ptr [R15 + 0x10] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,-0x50 MOV RDI,R14 CALL 0x00169f4e MOV RDI,qword ptr [R15 + 0x10] CALL 0x0016f470 JMP 0x0016e4c6 LAB_0016e41b: CMP qword ptr [R15 + 0x20],0x0 JZ 0x0016e562 MOV RDI,RBX CALL 0x00164756 TEST AL,AL JZ 0x0016e5be MOV RDI,qword ptr [R15 + 0x20] LEA RSI,[RBX + 0x40] CALL 0x0016ca16 MOV R12,RAX MOV RAX,qword ptr [R15 + 0x20] CMP R12,qword ptr [RAX + 0x8] JZ 0x0016e61a MOV RSI,R12 ADD RSI,0x10 MOV RDI,R14 CALL 0x00169f4e MOV RDI,qword ptr [R15 + 0x20] LAB_0016e467: MOV RSI,R12 CALL 0x0016f48a LAB_0016e46f: JMP 0x0016e4c6 LAB_0016e471: MOV AL,byte ptr [RBX + 0x40] ADD AL,0xfb CMP AL,0x2 JNC 0x0016e673 MOV RDI,RBX CALL 0x0016c960 TEST EAX,EAX JS 0x0016e506 MOV ECX,EAX MOV RAX,qword ptr [R15 + 0x10] MOV R12,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] SUB RAX,R12 PUSH 0x50 POP RSI CQO IDIV RSI CMP ECX,EAX JGE 0x0016e506 MOV EAX,ECX IMUL RAX,RAX,0x50 ADD R12,RAX MOV RDI,R14 MOV RSI,R12 CALL 0x00169f4e MOV RDI,qword ptr [R15 + 0x10] LAB_0016e4be: MOV RSI,R12 CALL 0x0016f484 LAB_0016e4c6: MOV RAX,R14 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016e4d6: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e4e1: LEA RSI,[0x1b5d0e] MOV RDI,RAX CALL 0x00123330 LAB_0016e4f0: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0 LAB_0016e506: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e511: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00164766 LAB_0016e521: LEA RSI,[0x1b5d41] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00159ebe MOV BPL,0x1 LAB_0016e538: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0 LAB_0016e562: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e56d: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R15 XOR ECX,ECX CALL 0x00164766 LAB_0016e57d: LEA RSI,[0x1b5a06] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00159ebe MOV BPL,0x1 LAB_0016e594: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0 LAB_0016e5be: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e5c9: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00164766 LAB_0016e5d9: LEA RSI,[0x1b58ba] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00159ebe MOV BPL,0x1 LAB_0016e5f0: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0 LAB_0016e61a: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e625: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00164766 LAB_0016e635: LEA RSI,[0x1b5d5a] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00159ebe MOV BPL,0x1 LAB_0016e64c: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0 LAB_0016e673: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_0016e67e: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00164766 LAB_0016e68e: LEA RSI,[0x1b5d22] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00159ebe MOV BPL,0x1 LAB_0016e6a5: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123fb0
/* minja::Value::pop(minja::Value const&) */ Value * minja::Value::pop(Value *param_1) { long *plVar1; char cVar2; uint uVar3; long lVar4; runtime_error *prVar5; Value *in_RDX; bool bVar6; long in_RSI; int iVar7; Value *pVVar8; int1 auStack_68 [32]; string local_48 [32]; plVar1 = *(long **)(in_RSI + 0x10); bVar6 = SUB81(in_RDX,0); iVar7 = (int)auStack_68; if (plVar1 == (long *)0x0) { if (*(long *)(in_RSI + 0x20) == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e56d to 0016e57c has its CatchHandler @ 0016e704 */ dump_abi_cxx11_(iVar7,SUB81(in_RSI,0)); /* try { // try from 0016e57d to 0016e590 has its CatchHandler @ 0016e6d8 */ std::operator+((char *)local_48,(string *)"Value is not an array or object: "); /* try { // try from 0016e594 to 0016e5b8 has its CatchHandler @ 0016e6d6 */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } cVar2 = is_primitive(in_RDX); if (cVar2 == '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e5c9 to 0016e5d8 has its CatchHandler @ 0016e702 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016e5d9 to 0016e5ec has its CatchHandler @ 0016e6d4 */ std::operator+((char *)local_48,(string *)"Unashable type: "); /* try { // try from 0016e5f0 to 0016e614 has its CatchHandler @ 0016e6d2 */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } lVar4 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::find(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(in_RSI + 0x20),in_RDX + 0x40); if (lVar4 == *(long *)(*(long *)(in_RSI + 0x20) + 8)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e625 to 0016e634 has its CatchHandler @ 0016e700 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016e635 to 0016e648 has its CatchHandler @ 0016e6d0 */ std::operator+((char *)local_48,(string *)"Key not found: "); /* try { // try from 0016e64c to 0016e670 has its CatchHandler @ 0016e6ce */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } Value(param_1,(Value *)(lVar4 + 0x10)); /* try { // try from 0016e467 to 0016e46e has its CatchHandler @ 0016e717 */ nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(in_RSI + 0x20),lVar4); } else { if (*plVar1 == plVar1[1]) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e4e1 to 0016e4ef has its CatchHandler @ 0016e70a */ std::runtime_error::runtime_error(prVar5,"pop from empty list"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } cVar2 = is_null(in_RDX); if (cVar2 == '\0') { if (1 < (byte)((char)in_RDX[0x40] - 5U)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e67e to 0016e68d has its CatchHandler @ 0016e6fe */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016e68e to 0016e6a1 has its CatchHandler @ 0016e6cc */ std::operator+((char *)local_48,(string *)"pop index must be an integer: "); /* try { // try from 0016e6a5 to 0016e6c9 has its CatchHandler @ 0016e6ca */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } uVar3 = get<int>(in_RDX); if ((-1 < (int)uVar3) && (lVar4 = **(long **)(in_RSI + 0x10), (int)uVar3 < (int)(((*(long **)(in_RSI + 0x10))[1] - lVar4) / 0x50))) { pVVar8 = (Value *)(lVar4 + (ulong)uVar3 * 0x50); Value(param_1,pVVar8); /* try { // try from 0016e4be to 0016e4c5 has its CatchHandler @ 0016e706 */ std::vector<minja::Value,std::allocator<minja::Value>>::erase (*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar8); return param_1; } prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e511 to 0016e520 has its CatchHandler @ 0016e708 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016e521 to 0016e534 has its CatchHandler @ 0016e6e9 */ std::operator+((char *)local_48,(string *)"pop index out of range: "); /* try { // try from 0016e538 to 0016e55c has its CatchHandler @ 0016e6da */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } Value(param_1,(Value *)(*(long *)(*(long *)(in_RSI + 0x10) + 8) + -0x50)); std::vector<minja::Value,std::allocator<minja::Value>>::pop_back (*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10)); } return param_1; }
203
free_timer
bluesky950520[P]quickjs/quickjs-libc.c
static void free_timer(JSRuntime *rt, JSOSTimer *th) { list_del(&th->link); JS_FreeValueRT(rt, th->func); js_free_rt(rt, th); }
O2
c
free_timer: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movq 0x30(%rsi), %rsi movq 0x38(%rbx), %rdx callq 0x18031 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb
free_timer: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov rsi, [rsi+30h] mov rdx, [rbx+38h] call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt
long long free_timer(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; JS_FreeValueRT(a1, a2[6], a2[7]); return js_free_rt(a1, a2); }
free_timer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RSI,qword ptr [RSI + 0x30] MOV RDX,qword ptr [RBX + 0x38] CALL 0x00118031 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb
void free_timer(int8 param_1,long *param_2) { long lVar1; long *plVar2; lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; JS_FreeValueRT(param_1,param_2[6],param_2[7]); js_free_rt(param_1,param_2); return; }
204
rtree_add_key
eloqsql/storage/myisam/rt_key.c
int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page) { uint page_size = mi_getint(page_buf); uint nod_flag = mi_test_if_nod(page_buf); DBUG_ENTER("rtree_add_key"); if (page_size + key_length + info->s->base.rec_reflength <= keyinfo->block_length) { /* split won't be necessary */ if (nod_flag) { /* save key */ DBUG_ASSERT(_mi_kpos(nod_flag, key) < info->state->key_file_length); memcpy(rt_PAGE_END(page_buf), key - nod_flag, key_length + nod_flag); page_size += key_length + nod_flag; } else { /* save key */ DBUG_ASSERT(_mi_dpos(info, nod_flag, key + key_length + info->s->base.rec_reflength) < info->state->data_file_length + info->s->base.pack_reclength); memcpy(rt_PAGE_END(page_buf), key, key_length + info->s->base.rec_reflength); page_size += key_length + info->s->base.rec_reflength; } mi_putint(page_buf, page_size, nod_flag); DBUG_RETURN(0); } DBUG_RETURN((rtree_split_page(info, keyinfo, page_buf, key, key_length, new_page) ? -1 : 1)); }
O0
c
rtree_add_key: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xcc167 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0xcc16e xorl %eax, %eax movl %eax, -0x4c(%rbp) jmp 0xcc16e movl -0x4c(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax addl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movq -0x18(%rbp), %rcx movzwl 0xe(%rcx), %ecx cmpl %ecx, %eax ja 0xcc2a2 cmpl $0x0, -0x40(%rbp) je 0xcc1fa jmp 0xcc19f jmp 0xcc1a1 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x40(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a0b0 movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xcc25c jmp 0xcc1fc jmp 0xcc1fe movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x2a0b0 movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x40(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x3c(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0x42(%rbp) movzwl -0x42(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, 0x1(%rax) movl -0x48(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0xcc2d6 jmp 0xcc2a4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movq -0x38(%rbp), %r9 callq 0xd6550 movl %eax, %edx movl $0x1, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
rtree_add_key: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_CC167 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_4C], eax jmp short loc_CC16E loc_CC167: xor eax, eax mov [rbp+var_4C], eax jmp short $+2 loc_CC16E: mov eax, [rbp+var_4C] mov [rbp+var_40], eax mov eax, [rbp+var_3C] add eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+0Eh] cmp eax, ecx ja loc_CC2A2 cmp [rbp+var_40], 0 jz short loc_CC1FA jmp short $+2 loc_CC19F: jmp short $+2 loc_CC1A1: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_40] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_24] add eax, [rbp+var_40] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] add eax, [rbp+var_40] add eax, [rbp+var_3C] mov [rbp+var_3C], eax jmp short loc_CC25C loc_CC1FA: jmp short $+2 loc_CC1FC: jmp short $+2 loc_CC1FE: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] add eax, [rbp+var_3C] mov [rbp+var_3C], eax loc_CC25C: mov edx, [rbp+var_40] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_3C] movzx ecx, cx add eax, ecx mov [rbp+var_42], ax movzx eax, [rbp+var_42] mov [rbp+var_48], eax mov eax, [rbp+var_48] mov cl, al mov rax, [rbp+var_30] mov [rax+1], cl mov eax, [rbp+var_48] shr eax, 8 mov cl, al mov rax, [rbp+var_30] mov [rax], cl mov [rbp+var_4], 0 jmp short loc_CC2D6 loc_CC2A2: jmp short $+2 loc_CC2A4: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9, [rbp+var_38] call rtree_split_page mov edx, eax mov eax, 1 mov ecx, 0FFFFFFFFh cmp edx, 0 cmovnz eax, ecx mov [rbp+var_4], eax loc_CC2D6: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long rtree_add_key(long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6) { __int16 v6; // ax int v7; // edx unsigned int v8; // eax unsigned int v10; // [rsp+4h] [rbp-4Ch] int v11; // [rsp+14h] [rbp-3Ch] v11 = _byteswap_ushort(*(_WORD *)a5) & 0x7FFF; if ( (*(_BYTE *)a5 & 0x80) != 0 ) v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v10 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4 + v11 > *(unsigned __int16 *)(a2 + 14) ) { v7 = rtree_split_page(a1, a2, a5, a3, a4, a6); v8 = 1; if ( v7 ) return (unsigned int)-1; return v8; } else { if ( v10 ) { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3 - v10, v10 + a4); LOWORD(v11) = v11 + v10 + a4; } else { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3, *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4); v11 += *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4; } v6 = 0; if ( v10 ) v6 = 0x8000; *(_BYTE *)(a5 + 1) = v11 + v6; *(_BYTE *)a5 = (unsigned __int16)(v11 + v6) >> 8; return 0; } }
rtree_add_key: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001cc167 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cc16e LAB_001cc167: XOR EAX,EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cc16e LAB_001cc16e: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0xe] CMP EAX,ECX JA 0x001cc2a2 CMP dword ptr [RBP + -0x40],0x0 JZ 0x001cc1fa JMP 0x001cc19f LAB_001cc19f: JMP 0x001cc1a1 LAB_001cc1a1: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x40] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a0b0 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001cc25c LAB_001cc1fa: JMP 0x001cc1fc LAB_001cc1fc: JMP 0x001cc1fe LAB_001cc1fe: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a0b0 MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX LAB_001cc25c: MOV EDX,dword ptr [RBP + -0x40] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x3c] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0x42],AX MOVZX EAX,word ptr [RBP + -0x42] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x48] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cc2d6 LAB_001cc2a2: JMP 0x001cc2a4 LAB_001cc2a4: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] MOV R9,qword ptr [RBP + -0x38] CALL 0x001d6550 MOV EDX,EAX MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001cc2d6: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 rtree_add_key(long *param_1,long param_2,void *param_3,int param_4,byte *param_5,int8 param_6) { short sVar1; uint uVar2; int iVar3; uint local_54; short local_44; int4 local_c; uVar2 = (uint)param_5[1] | (*param_5 & 0x7f) << 8; if ((*param_5 & 0x80) == 0) { local_54 = 0; } else { local_54 = *(uint *)(*param_1 + 0x17c); } if ((uint)*(ushort *)(param_2 + 0xe) < uVar2 + param_4 + *(int *)(*param_1 + 0x178)) { iVar3 = rtree_split_page(param_1,param_2,param_5,param_3,param_4,param_6); local_c = 1; if (iVar3 != 0) { local_c = 0xffffffff; } } else { if (local_54 == 0) { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8),param_3, (ulong)(uint)(param_4 + *(int *)(*param_1 + 0x178))); sVar1 = (short)*(int4 *)(*param_1 + 0x178); } else { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8), (void *)((long)param_3 - (ulong)local_54),(ulong)(param_4 + local_54)); sVar1 = (short)local_54; } local_44 = (short)param_4 + sVar1 + (short)uVar2; sVar1 = 0; if (local_54 != 0) { sVar1 = -0x8000; } param_5[1] = (byte)(sVar1 + local_44); *param_5 = (byte)((ushort)(sVar1 + local_44) >> 8); local_c = 0; } return local_c; }
205
my_mb_wc_latin1
eloqsql/strings/ctype-latin1.c
static int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const uchar *str, const uchar *end __attribute__((unused))) { if (str >= end) return MY_CS_TOOSMALL; /* There are no unassigned characters in latin1. Every code point in latin1 is mapped to some Unicode code point. We can always return 1, no needs to check the value of cs_to_uni[*str]. */ *wc= cs_to_uni[*str]; DBUG_ASSERT(wc[0] || !str[0]); return 1; }
O3
c
my_mb_wc_latin1: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3ec84 movzbl (%rdx), %eax leaq 0x16ba98(%rip), %rcx # 0x1aa710 movzwl (%rcx,%rax,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq
my_mb_wc_latin1: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_3EC84 movzx eax, byte ptr [rdx] lea rcx, cs_to_uni movzx eax, word ptr [rcx+rax*2] mov [rsi], rax mov eax, 1 loc_3EC84: pop rbp retn
long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a2 = cs_to_uni[*a3]; return 1LL; } return result; }
my_mb_wc_latin1: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013ec84 MOVZX EAX,byte ptr [RDX] LEA RCX,[0x2aa710] MOVZX EAX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RAX MOV EAX,0x1 LAB_0013ec84: POP RBP RET
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2); uVar1 = 1; } return uVar1; }
206
ggml_print_objects
ngxson[P]ggml-easy/ggml/src/ggml.c
void ggml_print_objects(const struct ggml_context * ctx) { struct ggml_object * obj = ctx->objects_begin; GGML_LOG_INFO("%s: objects in context %p:\n", __func__, (const void *) ctx); while (obj != NULL) { ggml_print_object(obj); obj = obj->next; } GGML_LOG_INFO("%s: --- end ---\n", __func__); }
O0
c
ggml_print_objects: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rcx movl $0x2, %edi leaq 0x6ba91(%rip), %rsi # 0xb4659 leaq 0x6baa6(%rip), %rdx # 0xb4675 movb $0x0, %al callq 0x41c40 cmpq $0x0, 0x8(%rsp) je 0x48bf8 movq 0x8(%rsp), %rdi callq 0x43cf0 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) jmp 0x48bd6 movl $0x2, %edi leaq 0x6ba84(%rip), %rsi # 0xb4688 leaq 0x6ba6a(%rip), %rdx # 0xb4675 movb $0x0, %al callq 0x41c40 addq $0x18, %rsp retq nopw (%rax,%rax)
ggml_print_objects: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov rax, [rax+18h] mov [rsp+18h+var_10], rax mov rcx, [rsp+18h+var_8] mov edi, 2 lea rsi, aSObjectsInCont; "%s: objects in context %p:\n" lea rdx, aGgmlPrintObjec_1; "ggml_print_objects" mov al, 0 call _ggml_log_internal loc_48BD6: cmp [rsp+18h+var_10], 0 jz short loc_48BF8 mov rdi, [rsp+18h+var_10] call _ggml_print_object mov rax, [rsp+18h+var_10] mov rax, [rax+10h] mov [rsp+18h+var_10], rax jmp short loc_48BD6 loc_48BF8: mov edi, 2 lea rsi, aSEnd; "%s: --- end ---\n" lea rdx, aGgmlPrintObjec_1; "ggml_print_objects" mov al, 0 call _ggml_log_internal add rsp, 18h retn
long long ggml_print_objects(_QWORD *a1) { long long v2; // [rsp+8h] [rbp-10h] v2 = a1[3]; ggml_log_internal(2u, (long long)"%s: objects in context %p:\n", "ggml_print_objects", a1); while ( v2 ) { ggml_print_object(v2); v2 = *(_QWORD *)(v2 + 16); } return ggml_log_internal(2u, (long long)"%s: --- end ---\n", "ggml_print_objects"); }
ggml_print_objects: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x10] MOV EDI,0x2 LEA RSI,[0x1b4659] LEA RDX,[0x1b4675] MOV AL,0x0 CALL 0x00141c40 LAB_00148bd6: CMP qword ptr [RSP + 0x8],0x0 JZ 0x00148bf8 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00143cf0 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RAX JMP 0x00148bd6 LAB_00148bf8: MOV EDI,0x2 LEA RSI,[0x1b4688] LEA RDX,[0x1b4675] MOV AL,0x0 CALL 0x00141c40 ADD RSP,0x18 RET
void ggml_print_objects(long param_1) { long local_10; local_10 = *(long *)(param_1 + 0x18); ggml_log_internal(2,"%s: objects in context %p:\n","ggml_print_objects",param_1); for (; local_10 != 0; local_10 = *(long *)(local_10 + 0x10)) { ggml_print_object(local_10); } ggml_log_internal(2,"%s: --- end ---\n","ggml_print_objects"); return; }
207
ggml_print_objects
ngxson[P]ggml-easy/ggml/src/ggml.c
void ggml_print_objects(const struct ggml_context * ctx) { struct ggml_object * obj = ctx->objects_begin; GGML_LOG_INFO("%s: objects in context %p:\n", __func__, (const void *) ctx); while (obj != NULL) { ggml_print_object(obj); obj = obj->next; } GGML_LOG_INFO("%s: --- end ---\n", __func__); }
O1
c
ggml_print_objects: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rcx movq 0x18(%rdi), %r14 leaq 0x312b1(%rip), %rsi # 0x4a6b1 leaq 0x312c6(%rip), %rdx # 0x4a6cd movl $0x2, %edi xorl %eax, %eax callq 0x167f0 testq %r14, %r14 je 0x19446 leaq 0x31252(%rip), %rbx # 0x4a671 movl 0x18(%r14), %edx movq (%r14), %rcx movq 0x8(%r14), %r8 movq 0x10(%r14), %r9 movl $0x2, %edi movq %rbx, %rsi xorl %eax, %eax callq 0x167f0 movq 0x10(%r14), %r14 testq %r14, %r14 jne 0x1941f leaq 0x31293(%rip), %rsi # 0x4a6e0 leaq 0x31279(%rip), %rdx # 0x4a6cd movl $0x2, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 jmp 0x167f0
ggml_print_objects: push r14 push rbx push rax mov rcx, rdi mov r14, [rdi+18h] lea rsi, aSObjectsInCont; "%s: objects in context %p:\n" lea rdx, aGgmlPrintObjec_1; "ggml_print_objects" mov edi, 2 xor eax, eax call _ggml_log_internal test r14, r14 jz short loc_19446 lea rbx, aGgmlObjectType; " - ggml_object: type = %d, offset = %zu"... loc_1941F: mov edx, [r14+18h] mov rcx, [r14] mov r8, [r14+8] mov r9, [r14+10h] mov edi, 2 mov rsi, rbx xor eax, eax call _ggml_log_internal mov r14, [r14+10h] test r14, r14 jnz short loc_1941F loc_19446: lea rsi, aSEnd; "%s: --- end ---\n" lea rdx, aGgmlPrintObjec_1; "ggml_print_objects" mov edi, 2 xor eax, eax add rsp, 8 pop rbx pop r14 jmp _ggml_log_internal
long long ggml_print_objects( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // r14 long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 v14 = *(_QWORD *)(a1 + 24); ggml_log_internal( 2u, (long long)"%s: objects in context %p:\n", (long long)"ggml_print_objects", a1, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); for ( ; v14; v14 = *(_QWORD *)(v14 + 16) ) ggml_log_internal( 2u, (long long)" - ggml_object: type = %d, offset = %zu, size = %zu, next = %p\n", *(unsigned int *)(v14 + 24), *(_QWORD *)v14, *(_QWORD *)(v14 + 8), *(_QWORD *)(v14 + 16), a2, a3, a4, a5, v18, v19, a8, a9); return ggml_log_internal( 2u, (long long)"%s: --- end ---\n", (long long)"ggml_print_objects", v15, v16, v17, a2, a3, a4, a5, v18, v19, a8, a9); }
ggml_print_objects: PUSH R14 PUSH RBX PUSH RAX MOV RCX,RDI MOV R14,qword ptr [RDI + 0x18] LEA RSI,[0x14a6b1] LEA RDX,[0x14a6cd] MOV EDI,0x2 XOR EAX,EAX CALL 0x001167f0 TEST R14,R14 JZ 0x00119446 LEA RBX,[0x14a671] LAB_0011941f: MOV EDX,dword ptr [R14 + 0x18] MOV RCX,qword ptr [R14] MOV R8,qword ptr [R14 + 0x8] MOV R9,qword ptr [R14 + 0x10] MOV EDI,0x2 MOV RSI,RBX XOR EAX,EAX CALL 0x001167f0 MOV R14,qword ptr [R14 + 0x10] TEST R14,R14 JNZ 0x0011941f LAB_00119446: LEA RSI,[0x14a6e0] LEA RDX,[0x14a6cd] MOV EDI,0x2 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 JMP 0x001167f0
void ggml_print_objects(long param_1) { int8 *puVar1; puVar1 = *(int8 **)(param_1 + 0x18); ggml_log_internal(2,"%s: objects in context %p:\n","ggml_print_objects",param_1); for (; puVar1 != (int8 *)0x0; puVar1 = (int8 *)puVar1[2]) { ggml_log_internal(2," - ggml_object: type = %d, offset = %zu, size = %zu, next = %p\n", *(int4 *)(puVar1 + 3),*puVar1,puVar1[1],puVar1[2]); } ggml_log_internal(2,"%s: --- end ---\n","ggml_print_objects"); return; }
208
ma_ft_update
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos) { int error= -1; FT_WORD *oldlist,*newlist, *old_word, *new_word; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; int cmp, cmp2; DBUG_ENTER("_ma_ft_update"); if (!(old_word=oldlist=_ma_ft_parserecord(info, keynr, oldrec, &info->ft_memroot)) || !(new_word=newlist=_ma_ft_parserecord(info, keynr, newrec, &info->ft_memroot))) goto err; error=0; while(old_word->pos && new_word->pos) { cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); if (cmp < 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, old_word, pos); if (_ma_ck_delete(info, &key)) { error= -1; goto err; } } if (cmp > 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, new_word,pos); if ((error= _ma_ck_write(info, &key))) goto err; } if (cmp<=0) old_word++; if (cmp>=0) new_word++; } if (old_word->pos) error= _ma_ft_erase(info,keynr,keybuf,old_word,pos); else if (new_word->pos) error= _ma_ft_store(info,keynr,keybuf,new_word,pos); err: free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_RETURN(error); }
O3
c
ma_ft_update: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, -0x48(%rbp) movq %r8, %rbx movq %rdx, -0x40(%rbp) movl %esi, %r12d movq %rdi, %r13 movq (%rdi), %rax movq 0x570(%rax), %rax movl %esi, %edx imulq $0x118, %rdx, %rdx # imm = 0x118 movq 0xc0(%rax,%rdx), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) leaq 0x328(%rdi), %r15 movq %rcx, %rdx movq %r15, %rcx callq 0x6a190 testq %rax, %rax je 0x6a493 movq %rax, %r14 movq %r13, %rdi movl %r12d, %esi movq %rbx, %rdx movq %r15, -0x30(%rbp) movq %r15, %rcx callq 0x6a190 testq %rax, %rax je 0x6a48f movq %rax, %r15 movq (%r14), %rsi testq %rsi, %rsi je 0x6a471 movl %r12d, -0x34(%rbp) movq %r13, -0x50(%rbp) movq (%r15), %rcx testq %rcx, %rcx je 0x6a49e movl 0x8(%r14), %edx movl 0x8(%r15), %r8d xorl %r12d, %r12d movq -0x58(%rbp), %rdi xorl %r9d, %r9d callq 0x9e3cc movl %eax, %ebx testl %eax, %eax jne 0x6a3da movsd 0x10(%r14), %xmm0 subsd 0x10(%r15), %xmm0 andpd 0x766b2(%rip), %xmm0 # 0xe0a80 ucomisd 0x76a6a(%rip), %xmm0 # 0xe0e40 seta %r12b testl %ebx, %ebx js 0x6a3e3 testb %r12b, %r12b je 0x6a411 movq -0x50(%rbp), %r13 movq %r13, %rdi leaq -0x78(%rbp), %rsi movl -0x34(%rbp), %edx movq -0x40(%rbp), %rcx movq %r14, %r8 movq -0x48(%rbp), %r9 callq 0x6a4dd movq %r13, %rdi leaq -0x78(%rbp), %rsi callq 0x670f9 testb %al, %al jne 0x6a48f testl %ebx, %ebx setg %al orb %r12b, %al testb $0x1, %al movl -0x34(%rbp), %r12d movq -0x50(%rbp), %r13 je 0x6a453 movq %r13, %rdi leaq -0x78(%rbp), %rsi movl %r12d, %edx movq -0x40(%rbp), %rcx movq %r15, %r8 movq -0x48(%rbp), %r9 callq 0x6a4dd movq %r13, %rdi leaq -0x78(%rbp), %rsi callq 0x643fc testb %al, %al jne 0x6a4d8 leaq 0x18(%r14), %rax leaq 0x18(%r15), %rcx testl %ebx, %ebx cmovleq %rax, %r14 cmovnsq %rcx, %r15 movq (%r14), %rsi testq %rsi, %rsi jne 0x6a391 cmpq $0x0, (%r15) je 0x6a49a movq %r13, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r15, %rcx movq -0x48(%rbp), %r8 callq 0x6a60a jmp 0x6a4b4 movq -0x30(%rbp), %r15 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x6a4ba xorl %ebx, %ebx jmp 0x6a4b6 movq %r13, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r14, %rcx movq -0x48(%rbp), %r8 callq 0x6a58b movl %eax, %ebx movq -0x30(%rbp), %r15 movl $0x2, %esi movq %r15, %rdi callq 0x9cadf movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movsbl %al, %ebx jmp 0x6a4b6
_ma_ft_update: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_48], r9 mov rbx, r8 mov [rbp+var_40], rdx mov r12d, esi mov r13, rdi mov rax, [rdi] mov rax, [rax+570h] mov edx, esi imul rdx, 118h mov rax, [rax+rdx+0C0h] mov rax, [rax] mov [rbp+var_58], rax lea r15, [rdi+328h] mov rdx, rcx mov rcx, r15 call _ma_ft_parserecord test rax, rax jz loc_6A493 mov r14, rax mov rdi, r13 mov esi, r12d mov rdx, rbx mov [rbp+var_30], r15 mov rcx, r15 call _ma_ft_parserecord test rax, rax jz loc_6A48F mov r15, rax mov rsi, [r14] test rsi, rsi jz loc_6A471 mov [rbp+var_34], r12d mov [rbp+var_50], r13 loc_6A391: mov rcx, [r15] test rcx, rcx jz loc_6A49E mov edx, [r14+8] mov r8d, [r15+8] xor r12d, r12d mov rdi, [rbp+var_58] xor r9d, r9d call ha_compare_text mov ebx, eax test eax, eax jnz short loc_6A3DA movsd xmm0, qword ptr [r14+10h] subsd xmm0, qword ptr [r15+10h] andpd xmm0, cs:xmmword_E0A80 ucomisd xmm0, cs:qword_E0E40 setnbe r12b loc_6A3DA: test ebx, ebx js short loc_6A3E3 test r12b, r12b jz short loc_6A411 loc_6A3E3: mov r13, [rbp+var_50] mov rdi, r13 lea rsi, [rbp+var_78] mov edx, [rbp+var_34] mov rcx, [rbp+var_40] mov r8, r14 mov r9, [rbp+var_48] call _ma_ft_make_key mov rdi, r13 lea rsi, [rbp+var_78] call _ma_ck_delete test al, al jnz short loc_6A48F loc_6A411: test ebx, ebx setnle al or al, r12b test al, 1 mov r12d, [rbp+var_34] mov r13, [rbp+var_50] jz short loc_6A453 mov rdi, r13 lea rsi, [rbp+var_78] mov edx, r12d mov rcx, [rbp+var_40] mov r8, r15 mov r9, [rbp+var_48] call _ma_ft_make_key mov rdi, r13 lea rsi, [rbp+var_78] call _ma_ck_write test al, al jnz loc_6A4D8 loc_6A453: lea rax, [r14+18h] lea rcx, [r15+18h] test ebx, ebx cmovle r14, rax cmovns r15, rcx mov rsi, [r14] test rsi, rsi jnz loc_6A391 loc_6A471: cmp qword ptr [r15], 0 jz short loc_6A49A mov rdi, r13 mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r15 mov r8, [rbp+var_48] call _ma_ft_store jmp short loc_6A4B4 loc_6A48F: mov r15, [rbp+var_30] loc_6A493: mov ebx, 0FFFFFFFFh jmp short loc_6A4BA loc_6A49A: xor ebx, ebx jmp short loc_6A4B6 loc_6A49E: mov rdi, r13 mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r14 mov r8, [rbp+var_48] call _ma_ft_erase loc_6A4B4: mov ebx, eax loc_6A4B6: mov r15, [rbp+var_30] loc_6A4BA: mov esi, 2 mov rdi, r15 call free_root mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6A4D8: movsx ebx, al jmp short loc_6A4B6
long long ma_ft_update(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6) { unsigned int v7; // r12d long long v8; // r13 _QWORD *v9; // r15 double *v10; // rax double *v11; // r14 double *v12; // rax double *v13; // r15 double v14; // rsi bool v15; // r12 int v16; // ebx _QWORD **v17; // r13 bool v18; // zf char v19; // al unsigned int v20; // eax unsigned int v21; // ebx long long v23[4]; // [rsp+8h] [rbp-78h] BYREF long long v24; // [rsp+28h] [rbp-58h] _QWORD **v25; // [rsp+30h] [rbp-50h] long long v26; // [rsp+38h] [rbp-48h] long long v27; // [rsp+40h] [rbp-40h] unsigned int v28; // [rsp+4Ch] [rbp-34h] _QWORD *v29; // [rsp+50h] [rbp-30h] v26 = a6; v27 = a3; v7 = a2; v8 = (long long)a1; v24 = **(_QWORD **)(*(_QWORD *)(*a1 + 1392LL) + 280LL * a2 + 192); v9 = a1 + 101; v10 = (double *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101)); if ( !v10 ) goto LABEL_21; v11 = v10; v29 = a1 + 101; v12 = (double *)ma_ft_parserecord(a1, a2, a5, (long long)(a1 + 101)); if ( !v12 ) { LABEL_20: v9 = v29; LABEL_21: v21 = -1; goto LABEL_26; } v13 = v12; v14 = *v11; if ( *(_QWORD *)v11 ) { v28 = v7; v25 = (_QWORD **)a1; while ( 1 ) { if ( !*(_QWORD *)v13 ) { v20 = ma_ft_erase(v8, v7, v27, v11, v26); goto LABEL_24; } v15 = 0; v16 = ha_compare_text( v24, *(_QWORD *)&v14, *((unsigned int *)v11 + 2), *(_QWORD *)v13, *((unsigned int *)v13 + 2), 0LL); if ( !v16 ) v15 = fabs(v11[2] - v13[2]) > 0.00001; if ( v16 < 0 || v15 ) { v17 = v25; ma_ft_make_key(v25, v23, v28, v27, v11, v26); if ( ma_ck_delete(v17, v23) ) goto LABEL_20; } v18 = !v15 && v16 <= 0; v7 = v28; v8 = (long long)v25; if ( !v18 ) { ma_ft_make_key(v25, v23, v28, v27, v13, v26); v19 = ma_ck_write(v8, (long long)v23); if ( v19 ) break; } if ( v16 <= 0 ) v11 += 3; if ( v16 >= 0 ) v13 += 3; v14 = *v11; if ( !*(_QWORD *)v11 ) goto LABEL_18; } v21 = v19; } else { LABEL_18: if ( *(_QWORD *)v13 ) { v20 = ma_ft_store(v8, v7, v27, v13, v26); LABEL_24: v21 = v20; } else { v21 = 0; } } v9 = v29; LABEL_26: free_root(v9, 2LL); return v21; }
_ma_ft_update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],R9 MOV RBX,R8 MOV qword ptr [RBP + -0x40],RDX MOV R12D,ESI MOV R13,RDI MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV EDX,ESI IMUL RDX,RDX,0x118 MOV RAX,qword ptr [RAX + RDX*0x1 + 0xc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LEA R15,[RDI + 0x328] MOV RDX,RCX MOV RCX,R15 CALL 0x0016a190 TEST RAX,RAX JZ 0x0016a493 MOV R14,RAX MOV RDI,R13 MOV ESI,R12D MOV RDX,RBX MOV qword ptr [RBP + -0x30],R15 MOV RCX,R15 CALL 0x0016a190 TEST RAX,RAX JZ 0x0016a48f MOV R15,RAX MOV RSI,qword ptr [R14] TEST RSI,RSI JZ 0x0016a471 MOV dword ptr [RBP + -0x34],R12D MOV qword ptr [RBP + -0x50],R13 LAB_0016a391: MOV RCX,qword ptr [R15] TEST RCX,RCX JZ 0x0016a49e MOV EDX,dword ptr [R14 + 0x8] MOV R8D,dword ptr [R15 + 0x8] XOR R12D,R12D MOV RDI,qword ptr [RBP + -0x58] XOR R9D,R9D CALL 0x0019e3cc MOV EBX,EAX TEST EAX,EAX JNZ 0x0016a3da MOVSD XMM0,qword ptr [R14 + 0x10] SUBSD XMM0,qword ptr [R15 + 0x10] ANDPD XMM0,xmmword ptr [0x001e0a80] UCOMISD XMM0,qword ptr [0x001e0e40] SETA R12B LAB_0016a3da: TEST EBX,EBX JS 0x0016a3e3 TEST R12B,R12B JZ 0x0016a411 LAB_0016a3e3: MOV R13,qword ptr [RBP + -0x50] MOV RDI,R13 LEA RSI,[RBP + -0x78] MOV EDX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x40] MOV R8,R14 MOV R9,qword ptr [RBP + -0x48] CALL 0x0016a4dd MOV RDI,R13 LEA RSI,[RBP + -0x78] CALL 0x001670f9 TEST AL,AL JNZ 0x0016a48f LAB_0016a411: TEST EBX,EBX SETG AL OR AL,R12B TEST AL,0x1 MOV R12D,dword ptr [RBP + -0x34] MOV R13,qword ptr [RBP + -0x50] JZ 0x0016a453 MOV RDI,R13 LEA RSI,[RBP + -0x78] MOV EDX,R12D MOV RCX,qword ptr [RBP + -0x40] MOV R8,R15 MOV R9,qword ptr [RBP + -0x48] CALL 0x0016a4dd MOV RDI,R13 LEA RSI,[RBP + -0x78] CALL 0x001643fc TEST AL,AL JNZ 0x0016a4d8 LAB_0016a453: LEA RAX,[R14 + 0x18] LEA RCX,[R15 + 0x18] TEST EBX,EBX CMOVLE R14,RAX CMOVNS R15,RCX MOV RSI,qword ptr [R14] TEST RSI,RSI JNZ 0x0016a391 LAB_0016a471: CMP qword ptr [R15],0x0 JZ 0x0016a49a MOV RDI,R13 MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R15 MOV R8,qword ptr [RBP + -0x48] CALL 0x0016a60a JMP 0x0016a4b4 LAB_0016a48f: MOV R15,qword ptr [RBP + -0x30] LAB_0016a493: MOV EBX,0xffffffff JMP 0x0016a4ba LAB_0016a49a: XOR EBX,EBX JMP 0x0016a4b6 LAB_0016a49e: MOV RDI,R13 MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R14 MOV R8,qword ptr [RBP + -0x48] CALL 0x0016a58b LAB_0016a4b4: MOV EBX,EAX LAB_0016a4b6: MOV R15,qword ptr [RBP + -0x30] LAB_0016a4ba: MOV ESI,0x2 MOV RDI,R15 CALL 0x0019cadf MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016a4d8: MOVSX EBX,AL JMP 0x0016a4b6
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int _ma_ft_update(long *param_1,ulong param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { long lVar1; bool bVar2; uint uVar3; uint uVar4; long *plVar5; char cVar6; int iVar7; long *plVar8; long *plVar9; ulong uVar10; long *plVar11; int1 local_80 [32]; int8 local_60; long *local_58; int8 local_50; int8 local_48; uint local_3c; long *local_38; uVar10 = param_2 & 0xffffffff; local_60 = **(int8 **)(*(long *)(*param_1 + 0x570) + 0xc0 + (param_2 & 0xffffffff) * 0x118); plVar11 = param_1 + 0x65; local_50 = param_6; local_48 = param_3; plVar8 = (long *)_ma_ft_parserecord(param_1,param_2,param_4,plVar11); if ((plVar8 == (long *)0x0) || (local_38 = plVar11, plVar9 = (long *)_ma_ft_parserecord(param_1,uVar10,param_5,plVar11), plVar11 = local_38, plVar9 == (long *)0x0)) { LAB_0016a493: iVar7 = -1; } else { lVar1 = *plVar8; uVar4 = (uint)param_2; plVar5 = param_1; plVar11 = local_58; uVar3 = local_3c; while (local_58 = plVar5, local_3c = uVar4, lVar1 != 0) { if (*plVar9 == 0) { iVar7 = _ma_ft_erase(param_1,uVar10,local_48,plVar8,local_50); plVar11 = local_38; goto LAB_0016a4ba; } bVar2 = false; iVar7 = ha_compare_text(local_60,lVar1,(int)plVar8[1],*plVar9,(int)plVar9[1],0); plVar11 = local_58; if (iVar7 == 0) { bVar2 = _DAT_001e0e40 < (double)((ulong)((double)plVar8[2] - (double)plVar9[2]) & _DAT_001e0a80); } if ((iVar7 < 0) || (bVar2)) { _ma_ft_make_key(local_58,local_80,local_3c,local_48,plVar8); cVar6 = _ma_ck_delete(plVar11,local_80); plVar11 = local_38; if (cVar6 != '\0') goto LAB_0016a493; } param_1 = local_58; uVar10 = (ulong)local_3c; if (0 < iVar7 || bVar2) { _ma_ft_make_key(local_58,local_80,uVar10,local_48,plVar9); cVar6 = _ma_ck_write(param_1,local_80); if (cVar6 != '\0') { iVar7 = (int)cVar6; plVar11 = local_38; goto LAB_0016a4ba; } } if (iVar7 < 1) { plVar8 = plVar8 + 3; } if (-1 < iVar7) { plVar9 = plVar9 + 3; } uVar4 = local_3c; plVar5 = local_58; plVar11 = local_58; uVar3 = local_3c; lVar1 = *plVar8; } local_58 = plVar11; local_3c = uVar3; if (*plVar9 == 0) { iVar7 = 0; plVar11 = local_38; } else { iVar7 = _ma_ft_store(param_1,uVar10,local_48,plVar9,local_50); plVar11 = local_38; } } LAB_0016a4ba: free_root(plVar11,2); return iVar7; }
209
foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&)
monkey531[P]llama/common/chat.cpp
static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) { for (const auto & tool : tools) { if (!tool.contains("type") || tool["type"] != "function" || !tool.contains("function")) { LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str()); continue; } fn(tool); } }
O2
cpp
foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, (%rsp) movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x680e8 leaq 0x48(%rsp), %rdi movq %rbx, %rsi callq 0x68354 leaq 0xcf0e(%rip), %r12 # 0xaed11 leaq 0x28(%rsp), %rbp pushq $0x2 popq %rbx movq %r14, %rdi leaq 0x48(%rsp), %rsi callq 0x67b8c testb %al, %al je 0xa1ef5 movq %r14, %rdi callq 0x67d86 movq %rax, %r13 movq %rax, %rdi movq %r12, %rsi callq 0x7a4b6 testb %al, %al je 0xa1e79 movq %r13, %rdi movq %r12, %rsi callq 0x7b294 movq %rax, %rdi leaq 0x11125(%rip), %rsi # 0xb2f74 callq 0x7ae5e testb %al, %al jne 0xa1e79 movq %r13, %rdi leaq 0x11112(%rip), %rsi # 0xb2f74 callq 0x90bfc testb %al, %al je 0xa1e79 movq (%rsp), %rdi movq %r13, %rsi callq 0xaa24e jmp 0xa1ec3 leaq 0x5f5b8(%rip), %rax # 0x101438 cmpl $0x0, (%rax) js 0xa1ec3 callq 0x9685e movq %rax, %r15 movq %rbp, %rdi movq %r13, %rsi movl %ebx, %edx pushq $0x20 popq %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x5d504 movq 0x28(%rsp), %rcx movq %r15, %rdi movl %ebx, %esi leaq 0x1a8fe(%rip), %rdx # 0xbc7b2 xorl %eax, %eax callq 0x968f6 movq %rbp, %rdi callq 0x251b8 movq 0x8(%rsp), %rax movzbl (%rax), %eax cmpl $0x2, %eax je 0xa1ee0 cmpl $0x1, %eax jne 0xa1eeb addq $0x30, 0x10(%rsp) jmp 0xa1e0b addq $0x10, 0x18(%rsp) jmp 0xa1e0b incq 0x20(%rsp) jmp 0xa1e0b addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x251b8 movq %rbx, %rdi callq 0x24f60 nop
_ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_98], rsi mov rbx, rdi lea r14, [rsp+98h+var_90] mov rdi, r14 mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cbegin(void) lea rdi, [rsp+98h+var_50] mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cend(void) lea r12, aPplOutputType+0Dh; "type" lea rbp, [rsp+98h+var_70] push 2 pop rbx loc_A1E0B: mov rdi, r14 lea rsi, [rsp+98h+var_50] call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jz loc_A1EF5 mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void) mov r13, rax mov rdi, rax mov rsi, r12 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_A1E79 mov rdi, r13 mov rsi, r12 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rdi, rax lea rsi, aFailedToFindRp_0+1Eh; "function" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jnz short loc_A1E79 mov rdi, r13 lea rsi, aFailedToFindRp_0+1Eh; "function" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_A1E79 mov rdi, [rsp+98h+var_98] mov rsi, r13 call _ZNKSt8functionIFvRKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEclESG_; std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_A1EC3 loc_A1E79: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_A1EC3 call _Z15common_log_mainv; common_log_main(void) mov r15, rax mov rdi, rbp mov rsi, r13 mov edx, ebx push 20h ; ' ' pop rcx xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) mov rcx, [rsp+98h+var_70] mov rdi, r15 mov esi, ebx lea rdx, aSkippingToolWi; "Skipping tool without function: %s" xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_A1EC3: mov rax, [rsp+98h+var_90] movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_A1EE0 cmp eax, 1 jnz short loc_A1EEB add [rsp+98h+var_88], 30h ; '0' jmp loc_A1E0B loc_A1EE0: add [rsp+98h+var_80], 10h jmp loc_A1E0B loc_A1EEB: inc [rsp+98h+var_78] jmp loc_A1E0B loc_A1EF5: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
char foreach_function( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { char result; // al long long v11; // r13 long long v12; // rax int v13; // r15d long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 int v18; // eax long long v19; // [rsp+0h] [rbp-98h] unsigned __int8 *v20; // [rsp+8h] [rbp-90h] BYREF long long v21; // [rsp+10h] [rbp-88h] long long v22; // [rsp+18h] [rbp-80h] long long v23; // [rsp+20h] [rbp-78h] long long v24[4]; // [rsp+28h] [rbp-70h] BYREF _BYTE v25[80]; // [rsp+48h] [rbp-50h] BYREF v19 = a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin( (long long)&v20, a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend( (long long)v25, a1); while ( 1 ) { result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)&v20); if ( !result ) break; v11 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v20); if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(v11) && (v12 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v11, (long long)"type"), !(unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v12, (long long)"function")) && ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(v11) ) { std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&)>::operator()( v19, v11); } else if ( common_log_verbosity_thold[0] >= 0 ) { v13 = (unsigned int)common_log_main(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump( (long long)v24, v11, 2, 32, 0, 0); common_log_add( v13, 2, (int)"Skipping tool without function: %s", v24[0], v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v19); std::string::~string(v24); } v18 = *v20; if ( v18 == 2 ) { v22 += 16LL; } else if ( v18 == 1 ) { v21 += 48LL; } else { ++v23; } } return result; }
foreach_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP],RSI MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RBX CALL 0x001680e8 LEA RDI,[RSP + 0x48] MOV RSI,RBX CALL 0x00168354 LEA R12,[0x1aed11] LEA RBP,[RSP + 0x28] PUSH 0x2 POP RBX LAB_001a1e0b: MOV RDI,R14 LEA RSI,[RSP + 0x48] CALL 0x00167b8c TEST AL,AL JZ 0x001a1ef5 MOV RDI,R14 CALL 0x00167d86 MOV R13,RAX MOV RDI,RAX MOV RSI,R12 CALL 0x0017a4b6 TEST AL,AL JZ 0x001a1e79 MOV RDI,R13 MOV RSI,R12 CALL 0x0017b294 MOV RDI,RAX LEA RSI,[0x1b2f74] CALL 0x0017ae5e TEST AL,AL JNZ 0x001a1e79 MOV RDI,R13 LEA RSI,[0x1b2f74] CALL 0x00190bfc TEST AL,AL JZ 0x001a1e79 MOV RDI,qword ptr [RSP] MOV RSI,R13 CALL 0x001aa24e JMP 0x001a1ec3 LAB_001a1e79: LEA RAX,[0x201438] CMP dword ptr [RAX],0x0 JS 0x001a1ec3 CALL 0x0019685e MOV R15,RAX MOV RDI,RBP MOV RSI,R13 MOV EDX,EBX PUSH 0x20 POP RCX XOR R8D,R8D XOR R9D,R9D CALL 0x0015d504 MOV RCX,qword ptr [RSP + 0x28] LAB_001a1ea8: MOV RDI,R15 MOV ESI,EBX LEA RDX,[0x1bc7b2] XOR EAX,EAX CALL 0x001968f6 LAB_001a1ebb: MOV RDI,RBP CALL 0x001251b8 LAB_001a1ec3: MOV RAX,qword ptr [RSP + 0x8] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001a1ee0 CMP EAX,0x1 JNZ 0x001a1eeb ADD qword ptr [RSP + 0x10],0x30 JMP 0x001a1e0b LAB_001a1ee0: ADD qword ptr [RSP + 0x18],0x10 JMP 0x001a1e0b LAB_001a1eeb: INC qword ptr [RSP + 0x20] JMP 0x001a1e0b LAB_001a1ef5: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)> const&) */ void foreach_function(basic_json *param_1,function *param_2) { char cVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this; basic_json *pbVar2; int8 uVar3; char *local_90; long local_88; long local_80; long local_78; int8 local_70 [4]; int1 local_50 [32]; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cbegin(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cend(); do { cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ ((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_90,local_50); if (cVar1 == '\0') { return; } this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_90); cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (this,"type"); if (cVar1 == '\0') { LAB_001a1e79: if (-1 < common_log_verbosity_thold) { uVar3 = common_log_main(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::dump((string *)local_70,this,2,0x20,0,0); /* try { // try from 001a1ea8 to 001a1eba has its CatchHandler @ 001a1f04 */ common_log_add(uVar3,2,"Skipping tool without function: %s",local_70[0]); std::__cxx11::string::~string((string *)local_70); } } else { pbVar2 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"type"); cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (pbVar2,"function"); if (cVar1 != '\0') goto LAB_001a1e79; cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (this,"function"); if (cVar1 == '\0') goto LAB_001a1e79; std:: function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&)> ::operator()((function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&)> *)param_2,this); } if (*local_90 == '\x02') { local_80 = local_80 + 0x10; } else if (*local_90 == '\x01') { local_88 = local_88 + 0x30; } else { local_78 = local_78 + 1; } } while( true ); }
210
mi_calc_total_blob_length
eloqsql/storage/myisam/mi_dynrec.c
ulong _mi_calc_total_blob_length(MI_INFO *info, const uchar *record) { ulong length; MI_BLOB *blob,*end; for (length=0, blob= info->blobs, end=blob+info->s->base.blobs ; blob != end; blob++) { blob->length=_mi_calc_blob_length(blob->pack_length,record + blob->offset); length+=blob->length; } return length; }
O0
c
mi_calc_total_blob_length: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl 0x188(%rcx), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax je 0xa9cda movq -0x20(%rbp), %rax movl 0x8(%rax), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rax addq (%rax), %rsi callq 0xac470 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) jmp 0xa9c90 movq -0x18(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_calc_total_blob_length: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 0 mov rax, [rbp+var_8] mov rax, [rax+48h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] mov rcx, [rcx] mov ecx, [rcx+188h] imul rcx, 18h add rax, rcx mov [rbp+var_28], rax loc_A9C90: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jz short loc_A9CDA mov rax, [rbp+var_20] mov edi, [rax+8] mov rsi, [rbp+var_10] mov rax, [rbp+var_20] add rsi, [rax] call _mi_calc_blob_length mov rcx, rax mov rax, [rbp+var_20] mov [rax+10h], rcx mov rax, [rbp+var_20] mov rax, [rax+10h] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_20] add rax, 18h mov [rbp+var_20], rax jmp short loc_A9C90 loc_A9CDA: mov rax, [rbp+var_18] add rsp, 30h pop rbp retn
long long mi_calc_total_blob_length(_QWORD *a1, long long a2) { long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] v5 = 0LL; v4 = a1[9]; v3 = 24LL * *(unsigned int *)(*a1 + 392LL) + v4; while ( v4 != v3 ) { *(_QWORD *)(v4 + 16) = mi_calc_blob_length(*(unsigned int *)(v4 + 8), *(_QWORD *)v4 + a2); v5 += *(_QWORD *)(v4 + 16); v4 += 24LL; } return v5; }
_mi_calc_total_blob_length: 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],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x188] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001a9c90: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JZ 0x001a9cda MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] ADD RSI,qword ptr [RAX] CALL 0x001ac470 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX JMP 0x001a9c90 LAB_001a9cda: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x30 POP RBP RET
long _mi_calc_total_blob_length(long *param_1,long param_2) { long *plVar1; long lVar2; long *local_28; long local_20; local_20 = 0; local_28 = (long *)param_1[9]; plVar1 = local_28 + (ulong)*(uint *)(*param_1 + 0x188) * 3; for (; local_28 != plVar1; local_28 = local_28 + 3) { lVar2 = _mi_calc_blob_length((int)local_28[1],param_2 + *local_28); local_28[2] = lVar2; local_20 = local_28[2] + local_20; } return local_20; }
211
my_hash_first_from_hash_value
eloqsql/mysys/hash.c
uchar* my_hash_first_from_hash_value(const HASH *hash, my_hash_value_type hash_value, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; DBUG_ENTER("my_hash_first_from_hash_value"); if (hash->records) { uint flag= 1; uint idx= my_hash_mask(hash_value, hash->blength, hash->records); do { pos= dynamic_element(&hash->array,idx,HASH_LINK*); if (!hashcmp(hash,pos,key,length)) { DBUG_PRINT("exit",("found key at %d",idx)); *current_record= idx; DBUG_RETURN (pos->data); } if (flag) { flag=0; /* Reset flag */ if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx) break; /* Wrong link */ } } while ((idx=pos->next) != NO_RECORD); } *current_record= NO_RECORD; DBUG_RETURN(0); }
O3
c
my_hash_first_from_hash_value: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq 0x18(%rdi), %rax testq %rax, %rax je 0x24e08 movq %rdx, %r15 movq %rdi, %r12 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq 0x10(%rdi), %rbx addl %ebx, %ecx andl %esi, %ecx shrq %rbx decl %ebx andl %esi, %ebx cmpq %rax, %rcx cmovbl %ecx, %ebx xorl %r14d, %r14d movq 0x28(%r12), %rax movl %ebx, %ecx shlq $0x4, %rcx leaq (%rax,%rcx), %r13 movq 0x8(%rax,%rcx), %rsi movq %r12, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq 0x24e2f testl %eax, %eax je 0x24e16 testb $0x1, %r14b jne 0x24dfc movq 0x10(%r12), %rax movl 0x4(%r13), %ecx movl $0xffffffff, %edx # imm = 0xFFFFFFFF addl %eax, %edx andl %ecx, %edx shrq %rax decl %eax andl %ecx, %eax cmpq 0x18(%r12), %rdx cmovbl %edx, %eax cmpl %ebx, %eax jne 0x24e08 movl (%r13), %ebx movb $0x1, %r14b cmpl $-0x1, %ebx jne 0x24daa movq -0x30(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF xorl %eax, %eax jmp 0x24e20 movq -0x30(%rbp), %rax movl %ebx, (%rax) movq 0x8(%r13), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_first_from_hash_value: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], r8 mov [rbp+var_38], rcx mov rax, [rdi+18h] test rax, rax jz loc_24E08 mov r15, rdx mov r12, rdi mov ecx, 0FFFFFFFFh mov rbx, [rdi+10h] add ecx, ebx and ecx, esi shr rbx, 1 dec ebx and ebx, esi cmp rcx, rax cmovb ebx, ecx xor r14d, r14d loc_24DAA: mov rax, [r12+28h] mov ecx, ebx shl rcx, 4 lea r13, [rax+rcx] mov rsi, [rax+rcx+8] mov rdi, r12 mov rdx, r15 mov rcx, [rbp+var_38] call hashcmp test eax, eax jz short loc_24E16 test r14b, 1 jnz short loc_24DFC mov rax, [r12+10h] mov ecx, [r13+4] mov edx, 0FFFFFFFFh add edx, eax and edx, ecx shr rax, 1 dec eax and eax, ecx cmp rdx, [r12+18h] cmovb eax, edx cmp eax, ebx jnz short loc_24E08 loc_24DFC: mov ebx, [r13+0] mov r14b, 1 cmp ebx, 0FFFFFFFFh jnz short loc_24DAA loc_24E08: mov rax, [rbp+var_30] mov dword ptr [rax], 0FFFFFFFFh xor eax, eax jmp short loc_24E20 loc_24E16: mov rax, [rbp+var_30] mov [rax], ebx mov rax, [r13+8] loc_24E20: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_first_from_hash_value(_QWORD *a1, int a2, long long a3, long long a4, unsigned int *a5) { unsigned long long v5; // rax unsigned long long v7; // rbx unsigned long long v8; // rcx unsigned int v9; // ebx char v10; // r14 long long v11; // r13 unsigned long long v12; // rax int v13; // ecx unsigned long long v14; // rdx int v15; // eax v5 = a1[3]; if ( v5 ) { v7 = a1[2]; v8 = a2 & (unsigned int)(v7 - 1); v9 = a2 & ((v7 >> 1) - 1); if ( v8 < v5 ) v9 = v8; v10 = 0; while ( 1 ) { v11 = a1[5] + 16LL * v9; if ( !(unsigned int)hashcmp(a1, *(_QWORD *)(v11 + 8), a3, a4) ) break; if ( (v10 & 1) != 0 ) goto LABEL_15; v12 = a1[2]; v13 = *(_DWORD *)(v11 + 4); v14 = v13 & (unsigned int)(v12 - 1); v15 = v13 & ((v12 >> 1) - 1); if ( v14 < a1[3] ) v15 = v14; if ( v15 == v9 ) { LABEL_15: v9 = *(_DWORD *)v11; v10 = 1; if ( *(_DWORD *)v11 != -1 ) continue; } goto LABEL_11; } *a5 = v9; return *(_QWORD *)(v11 + 8); } else { LABEL_11: *a5 = -1; return 0LL; } }
my_hash_first_from_hash_value: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],RCX MOV RAX,qword ptr [RDI + 0x18] TEST RAX,RAX JZ 0x00124e08 MOV R15,RDX MOV R12,RDI MOV ECX,0xffffffff MOV RBX,qword ptr [RDI + 0x10] ADD ECX,EBX AND ECX,ESI SHR RBX,0x1 DEC EBX AND EBX,ESI CMP RCX,RAX CMOVC EBX,ECX XOR R14D,R14D LAB_00124daa: MOV RAX,qword ptr [R12 + 0x28] MOV ECX,EBX SHL RCX,0x4 LEA R13,[RAX + RCX*0x1] MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8] MOV RDI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL 0x00124e2f TEST EAX,EAX JZ 0x00124e16 TEST R14B,0x1 JNZ 0x00124dfc MOV RAX,qword ptr [R12 + 0x10] MOV ECX,dword ptr [R13 + 0x4] MOV EDX,0xffffffff ADD EDX,EAX AND EDX,ECX SHR RAX,0x1 DEC EAX AND EAX,ECX CMP RDX,qword ptr [R12 + 0x18] CMOVC EAX,EDX CMP EAX,EBX JNZ 0x00124e08 LAB_00124dfc: MOV EBX,dword ptr [R13] MOV R14B,0x1 CMP EBX,-0x1 JNZ 0x00124daa LAB_00124e08: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0xffffffff XOR EAX,EAX JMP 0x00124e20 LAB_00124e16: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],EBX MOV RAX,qword ptr [R13 + 0x8] LAB_00124e20: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_first_from_hash_value (long param_1,uint param_2,int8 param_3,int8 param_4,uint *param_5) { uint *puVar1; uint uVar2; int iVar3; uint uVar4; uint uVar5; bool bVar6; if (*(ulong *)(param_1 + 0x18) != 0) { uVar4 = (int)*(ulong *)(param_1 + 0x10) - 1U & param_2; uVar2 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & param_2; if ((ulong)uVar4 < *(ulong *)(param_1 + 0x18)) { uVar2 = uVar4; } bVar6 = false; do { puVar1 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)uVar2 * 0x10); iVar3 = hashcmp(param_1,*(int8 *)(*(long *)(param_1 + 0x28) + 8 + (ulong)uVar2 * 0x10), param_3,param_4); if (iVar3 == 0) { *param_5 = uVar2; return *(int8 *)(puVar1 + 2); } if (!bVar6) { uVar5 = (int)*(ulong *)(param_1 + 0x10) - 1U & puVar1[1]; uVar4 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & puVar1[1]; if ((ulong)uVar5 < *(ulong *)(param_1 + 0x18)) { uVar4 = uVar5; } if (uVar4 != uVar2) break; } uVar2 = *puVar1; bVar6 = true; } while (uVar2 != 0xffffffff); } *param_5 = 0xffffffff; return 0; }
212
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>::begin()
hkr04[P]cpp-mcp/common/json.hpp
iterator begin() noexcept { iterator result(this); result.set_begin(); return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::begin(): pushq %rbx movq %rdi, %rbx movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rsi, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movq %rax, 0x18(%rdi) movzbl (%rsi), %ecx cmpl $0x2, %ecx je 0x4ca28 cmpl $0x1, %ecx jne 0x4ca32 leaq 0x8(%rbx), %rax movq $0x0, (%rax) jmp 0x4ca36 movq $0x0, 0x10(%rbx) jmp 0x4ca36 movq %rax, 0x18(%rbx) movq %rbx, %rdi callq 0x4cde4 movq %rbx, %rax popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv: push rbx mov rbx, rdi mov rax, 8000000000000000h mov [rdi], rsi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov [rdi+18h], rax movzx ecx, byte ptr [rsi] cmp ecx, 2 jz short loc_4CA28 cmp ecx, 1 jnz short loc_4CA32 lea rax, [rbx+8] mov qword ptr [rax], 0 jmp short loc_4CA36 loc_4CA28: mov qword ptr [rbx+10h], 0 jmp short loc_4CA36 loc_4CA32: mov [rbx+18h], rax loc_4CA36: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_begin(void) mov rax, rbx pop rbx retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::begin( long long a1, unsigned __int8 *a2) { int v2; // ecx *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; v2 = *a2; if ( v2 == 2 ) { *(_QWORD *)(a1 + 16) = 0LL; } else if ( v2 == 1 ) { *(_QWORD *)(a1 + 8) = 0LL; } else { *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; } nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_begin(a1); return a1; }
begin: PUSH RBX MOV RBX,RDI MOV RAX,-0x8000000000000000 MOV qword ptr [RDI],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [RDI + 0x18],RAX MOVZX ECX,byte ptr [RSI] CMP ECX,0x2 JZ 0x0014ca28 CMP ECX,0x1 JNZ 0x0014ca32 LEA RAX,[RBX + 0x8] MOV qword ptr [RAX],0x0 JMP 0x0014ca36 LAB_0014ca28: MOV qword ptr [RBX + 0x10],0x0 JMP 0x0014ca36 LAB_0014ca32: MOV qword ptr [RBX + 0x18],RAX LAB_0014ca36: MOV RDI,RBX CALL 0x0014cde4 MOV RAX,RBX POP RBX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::begin() */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::begin(void) { char *in_RSI; iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *in_RDI; *(char **)in_RDI = in_RSI; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; *(int8 *)(in_RDI + 0x18) = 0x8000000000000000; if (*in_RSI == '\x02') { *(int8 *)(in_RDI + 0x10) = 0; } else if (*in_RSI == '\x01') { *(int8 *)(in_RDI + 8) = 0; } else { *(int8 *)(in_RDI + 0x18) = 0x8000000000000000; } detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::set_begin(in_RDI); return; }
213
FTB_WORD_cmp
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) { int i; /* if a==curdoc, take it as a < b */ if (v && a->docid[0] == *v) return -1; /* ORDER BY docid, ndepth DESC */ i=CMP_NUM(a->docid[0], b->docid[0]); if (!i) i=CMP_NUM(b->ndepth,a->ndepth); return i; }
O3
c
FTB_WORD_cmp: pushq %rbp movq %rsp, %rbp movq 0x10(%rsi), %rcx testq %rdi, %rdi je 0x74975 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq (%rdi), %rcx je 0x74998 xorl %eax, %eax cmpq 0x10(%rdx), %rcx setne %al movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmovbl %ecx, %eax testl %eax, %eax jne 0x74998 movl 0x44(%rdx), %edx xorl %eax, %eax cmpl 0x44(%rsi), %edx setne %al cmovbl %ecx, %eax popq %rbp retq
FTB_WORD_cmp: push rbp mov rbp, rsp mov rcx, [rsi+10h] test rdi, rdi jz short loc_74975 mov eax, 0FFFFFFFFh cmp rcx, [rdi] jz short loc_74998 loc_74975: xor eax, eax cmp rcx, [rdx+10h] setnz al mov ecx, 0FFFFFFFFh cmovb eax, ecx test eax, eax jnz short loc_74998 mov edx, [rdx+44h] xor eax, eax cmp edx, [rsi+44h] setnz al cmovb eax, ecx loc_74998: pop rbp retn
long long FTB_WORD_cmp(_QWORD *a1, long long a2, long long a3) { unsigned long long v3; // rcx long long result; // rax unsigned int v5; // edx v3 = *(_QWORD *)(a2 + 16); if ( !a1 || (result = 0xFFFFFFFFLL, v3 != *a1) ) { result = v3 != *(_QWORD *)(a3 + 16); if ( v3 < *(_QWORD *)(a3 + 16) ) result = 0xFFFFFFFFLL; if ( !(_DWORD)result ) { v5 = *(_DWORD *)(a3 + 68); result = v5 != *(_DWORD *)(a2 + 68); if ( v5 < *(_DWORD *)(a2 + 68) ) return 0xFFFFFFFFLL; } } return result; }
FTB_WORD_cmp: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RSI + 0x10] TEST RDI,RDI JZ 0x00174975 MOV EAX,0xffffffff CMP RCX,qword ptr [RDI] JZ 0x00174998 LAB_00174975: XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x10] SETNZ AL MOV ECX,0xffffffff CMOVC EAX,ECX TEST EAX,EAX JNZ 0x00174998 MOV EDX,dword ptr [RDX + 0x44] XOR EAX,EAX CMP EDX,dword ptr [RSI + 0x44] SETNZ AL CMOVC EAX,ECX LAB_00174998: POP RBP RET
uint FTB_WORD_cmp(ulong *param_1,long param_2,long param_3) { ulong uVar1; uint uVar2; uVar1 = *(ulong *)(param_2 + 0x10); if ((param_1 == (ulong *)0x0) || (uVar2 = 0xffffffff, uVar1 != *param_1)) { uVar2 = (uint)(uVar1 != *(ulong *)(param_3 + 0x10)); if (uVar1 < *(ulong *)(param_3 + 0x10)) { uVar2 = 0xffffffff; } if ((uVar2 == 0) && (uVar2 = (uint)(*(uint *)(param_3 + 0x44) != *(uint *)(param_2 + 0x44)), *(uint *)(param_3 + 0x44) < *(uint *)(param_2 + 0x44))) { uVar2 = 0xffffffff; } } return uVar2; }
214
minja::Parser::parseMathPow()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O2
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %rbx callq 0x3d430 cmpq $0x0, (%rbx) je 0x3d375 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r12 leaq 0x38(%rsp), %r13 movq %r14, %rdi leaq 0x5d108(%rip), %rsi # 0x9a39c movq %r12, %rdx callq 0x262e2 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx pushq $0x1 popq %rcx callq 0x2fa28 movq 0x40(%rsp), %rbp movq %r13, %rdi callq 0x20d78 movq %r14, %rdi callq 0x20d78 testq %rbp, %rbp je 0x3d331 movq %r14, %rdi movq %r15, %rsi callq 0x3d430 cmpq $0x0, 0x8(%rsp) je 0x3d343 movq %r13, %rdi movq %r15, %rsi callq 0x2efae movl $0x4, 0x4(%rsp) movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx leaq 0x4(%rsp), %r8 callq 0x3d409 movq %rbx, %rdi movq %r12, %rsi callq 0x51f68 leaq 0x30(%rsp), %rdi callq 0x2eeb2 leaq 0x40(%rsp), %rdi callq 0x2eeb2 leaq 0x10(%rsp), %rdi callq 0x2eeb2 jmp 0x3d28a movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5d04a(%rip), %rsi # 0x9a39f movq %rax, %rdi callq 0x20280 movq 0xa4c84(%rip), %rsi # 0xe1fe8 movq 0xa4c05(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 jmp 0x3d3a5 pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5cfe9(%rip), %rsi # 0x9a370 movq %rax, %rdi callq 0x20280 movq 0xa4c52(%rip), %rsi # 0xe1fe8 movq 0xa4bd3(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 jmp 0x3d3e3 movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x3d3f5 jmp 0x3d3c3 movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x3d3d5 movq %rax, %r14 jmp 0x3d3d5 movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x2eeb2 leaq 0x10(%rsp), %rdi callq 0x2eeb2 jmp 0x3d3f5 jmp 0x3d3e3 movq %rax, %r14 jmp 0x3d3f5 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 addq $0x8, %rbx movq %rbx, %rdi callq 0x2eeb2 movq %r14, %rdi callq 0x20b90
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_3D375 lea r14, [rsp+88h+var_80] lea r12, [rsp+88h+var_60] lea r13, [rsp+88h+var_50] loc_3D28A: mov rdi, r14 lea rsi, asc_9A39C; "**" mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r13 mov rsi, r15 mov rdx, r14 push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rbp, [rsp+88h+var_48] mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbp, rbp jz short loc_3D331 mov rdi, r14; this mov rsi, r15 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+88h+var_80], 0 jz short loc_3D343 mov rdi, r13; this mov rsi, r15 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov [rsp+88h+var_84], 4 mov rdi, r12 mov rsi, r13 mov rdx, rbx mov rcx, r14 lea r8, [rsp+88h+var_84] call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_3D28A loc_3D331: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3D343: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... 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, r15; void * call ___cxa_throw jmp short loc_3D3A5 loc_3D375: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... 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, r15; void * call ___cxa_throw loc_3D3A5: jmp short loc_3D3E3 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3D3F5 jmp short loc_3D3C3 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_3D3D5 loc_3D3C3: mov r14, rax jmp short loc_3D3D5 mov r14, rax lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_3D3D5: lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3D3F5 jmp short $+2 loc_3D3E3: mov r14, rax jmp short loc_3D3F5 mov r14, rax lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D3F5: add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2) { long long v2; // rbp std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+4h] [rbp-84h] BYREF long long v7; // [rsp+8h] [rbp-80h] BYREF _QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF _BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF long long v10; // [rsp+30h] [rbp-58h] BYREF long long v11; // [rsp+38h] [rbp-50h] BYREF _QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF minja::Parser::parseMathPlusMinus(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } while ( 1 ) { std::string::basic_string<std::allocator<char>>(&v7, (long long)"**"); minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u); v2 = v12[0]; std::string::~string(&v11); std::string::~string(&v7); if ( !v2 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v7); if ( !v7 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::get_location((minja::Parser *)&v11, a2); v6 = 4; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v9, &v11, this, &v7, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); } return this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV RBX,RDI CALL 0x0013d430 CMP qword ptr [RBX],0x0 JZ 0x0013d375 LEA R14,[RSP + 0x8] LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x38] LAB_0013d28a: MOV RDI,R14 LEA RSI,[0x19a39c] MOV RDX,R12 CALL 0x001262e2 LAB_0013d29c: MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 PUSH 0x1 POP RCX CALL 0x0012fa28 MOV RBP,qword ptr [RSP + 0x40] MOV RDI,R13 CALL 0x00120d78 MOV RDI,R14 CALL 0x00120d78 TEST RBP,RBP JZ 0x0013d331 LAB_0013d2c7: MOV RDI,R14 MOV RSI,R15 CALL 0x0013d430 CMP qword ptr [RSP + 0x8],0x0 JZ 0x0013d343 LAB_0013d2da: MOV RDI,R13 MOV RSI,R15 CALL 0x0012efae MOV dword ptr [RSP + 0x4],0x4 LAB_0013d2ed: MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 LEA R8,[RSP + 0x4] CALL 0x0013d409 LAB_0013d303: MOV RDI,RBX MOV RSI,R12 CALL 0x00151f68 LEA RDI,[RSP + 0x30] CALL 0x0012eeb2 LEA RDI,[RSP + 0x40] CALL 0x0012eeb2 LEA RDI,[RSP + 0x10] CALL 0x0012eeb2 JMP 0x0013d28a LAB_0013d331: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013d343: PUSH 0x10 POP RDI CALL 0x00120390 MOV R15,RAX LAB_0013d34e: LEA RSI,[0x19a39f] MOV RDI,RAX CALL 0x00120280 LAB_0013d35d: MOV RSI,qword ptr [0x001e1fe8] MOV RDX,qword ptr [0x001e1f70] MOV RDI,R15 CALL 0x00120b30 LAB_0013d375: PUSH 0x10 POP RDI CALL 0x00120390 MOV R15,RAX LAB_0013d380: LEA RSI,[0x19a370] MOV RDI,RAX CALL 0x00120280 LAB_0013d38f: MOV RSI,qword ptr [0x001e1fe8] MOV RDX,qword ptr [0x001e1f70] MOV RDI,R15 CALL 0x00120b30
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { long lVar1; runtime_error *prVar2; __shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI; long local_80; __shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24]; Location local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8]; string local_50 [8]; long local_48 [3]; parseMathPlusMinus(); if (*(long *)in_RDI == 0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013d380 to 0013d38e has its CatchHandler @ 0013d3a7 */ std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression"); /* try { // try from 0013d38f to 0013d3a4 has its CatchHandler @ 0013d3a5 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70); } while( true ) { /* try { // try from 0013d28a to 0013d29b has its CatchHandler @ 0013d3e3 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_80,"**",(allocator *)local_60); /* try { // try from 0013d29c to 0013d2ac has its CatchHandler @ 0013d3e8 */ consumeToken(local_50); lVar1 = local_48[0]; std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)&local_80); if (lVar1 == 0) { return; } /* try { // try from 0013d2c7 to 0013d2d1 has its CatchHandler @ 0013d3e1 */ parseMathPlusMinus(); if (local_80 == 0) break; /* try { // try from 0013d2da to 0013d2e4 has its CatchHandler @ 0013d3c3 */ get_location(); /* try { // try from 0013d2ed to 0013d302 has its CatchHandler @ 0013d3c8 */ std:: make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op> (local_60,(shared_ptr *)local_50,(shared_ptr *)in_RDI,(Op *)&local_80); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= (in_RDI,(__shared_ptr *)local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78); } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013d34e to 0013d35c has its CatchHandler @ 0013d3b6 */ std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression"); /* try { // try from 0013d35d to 0013d372 has its CatchHandler @ 0013d3b4 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70); }
215
select_best_resolution(std::pair<int, int> const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&)
monkey531[P]llama/examples/llava/clip.cpp
static std::pair<int, int> select_best_resolution(const std::pair<int, int> & original_size, const std::vector<std::pair<int, int>> & possible_resolutions) { int original_width = original_size.first; int original_height = original_size.second; std::pair<int, int> best_fit; int max_effective_resolution = 0; int min_wasted_resolution = std::numeric_limits<int>::max(); for (const auto& resolution : possible_resolutions) { int width = resolution.first; int height = resolution.second; float scale = std::min(static_cast<float>(width) / original_width, static_cast<float>(height) / original_height); int downscaled_width = static_cast<int>(original_width * scale); int downscaled_height = static_cast<int>(original_height * scale); int effective_resolution = std::min(downscaled_width * downscaled_height, original_width * original_height); int wasted_resolution = (width * height) - effective_resolution; // LOG_INF("resolution: %d %d, scale: %f, downscaled: %d %d, effective: %d, wasted: %d\n", width, height, scale, downscaled_width, downscaled_height, effective_resolution, wasted_resolution); if (effective_resolution > max_effective_resolution || (effective_resolution == max_effective_resolution && wasted_resolution < min_wasted_resolution)) { max_effective_resolution = effective_resolution; min_wasted_resolution = wasted_resolution; best_fit = resolution; } } return best_fit; }
O0
cpp
select_best_resolution(std::pair<int, int> const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&): subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq 0x68(%rsp), %rax movl (%rax), %eax movl %eax, 0x5c(%rsp) movq 0x68(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x58(%rsp) leaq 0x70(%rsp), %rdi callq 0x7d510 movl $0x0, 0x54(%rsp) callq 0x76b00 movl %eax, 0x50(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi callq 0x74e70 movq %rax, 0x40(%rsp) movq 0x48(%rsp), %rdi callq 0x7c3b0 movq %rax, 0x38(%rsp) leaq 0x40(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x78700 testb $0x1, %al jne 0x97400 jmp 0x97521 leaq 0x40(%rsp), %rdi callq 0x7dc90 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movl (%rax), %eax movl %eax, 0x2c(%rsp) movq 0x30(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x28(%rsp) cvtsi2ssl 0x2c(%rsp), %xmm0 cvtsi2ssl 0x5c(%rsp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, 0x20(%rsp) cvtsi2ssl 0x28(%rsp), %xmm0 cvtsi2ssl 0x58(%rsp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, 0x1c(%rsp) leaq 0x20(%rsp), %rdi leaq 0x1c(%rsp), %rsi callq 0x7b240 movss (%rax), %xmm0 movss %xmm0, 0x24(%rsp) cvtsi2ssl 0x5c(%rsp), %xmm0 mulss 0x24(%rsp), %xmm0 cvttss2si %xmm0, %eax movl %eax, 0x18(%rsp) cvtsi2ssl 0x58(%rsp), %xmm0 mulss 0x24(%rsp), %xmm0 cvttss2si %xmm0, %eax movl %eax, 0x14(%rsp) movl 0x18(%rsp), %eax imull 0x14(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x5c(%rsp), %eax imull 0x58(%rsp), %eax movl %eax, 0x8(%rsp) leaq 0xc(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x77850 movl (%rax), %eax movl %eax, 0x10(%rsp) movl 0x2c(%rsp), %eax imull 0x28(%rsp), %eax subl 0x10(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x10(%rsp), %eax cmpl 0x54(%rsp), %eax jg 0x974f1 movl 0x10(%rsp), %eax cmpl 0x54(%rsp), %eax jne 0x97510 movl 0x4(%rsp), %eax cmpl 0x50(%rsp), %eax jge 0x97510 movl 0x10(%rsp), %eax movl %eax, 0x54(%rsp) movl 0x4(%rsp), %eax movl %eax, 0x50(%rsp) movq 0x30(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x77900 jmp 0x97512 leaq 0x40(%rsp), %rdi callq 0x720b0 jmp 0x973e8 movq 0x70(%rsp), %rax addq $0x78, %rsp retq nopl (%rax,%rax)
_ZL22select_best_resolutionRKSt4pairIiiERKSt6vectorIS0_SaIS0_EE: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov rax, [rsp+78h+var_10] mov eax, [rax] mov [rsp+78h+var_1C], eax mov rax, [rsp+78h+var_10] mov eax, [rax+4] mov [rsp+78h+var_20], eax lea rdi, [rsp+78h+var_8] call __ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv mov [rsp+78h+var_24], 0 call __ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void) mov [rsp+78h+var_28], eax mov rax, [rsp+78h+var_18] mov [rsp+78h+var_30], rax mov rdi, [rsp+78h+var_30] call __ZNKSt6vectorISt4pairIiiESaIS1_EE5beginEv; std::vector<std::pair<int,int>>::begin(void) mov [rsp+78h+var_38], rax mov rdi, [rsp+78h+var_30] call __ZNKSt6vectorISt4pairIiiESaIS1_EE3endEv; std::vector<std::pair<int,int>>::end(void) mov [rsp+78h+var_40], rax loc_973E8: lea rdi, [rsp+78h+var_38] lea rsi, [rsp+78h+var_40] call __ZN9__gnu_cxxneIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<std::pair<int,int> const*,std::vector<std::pair<int,int>>>(__gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>> const&,__gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>> const&) test al, 1 jnz short loc_97400 jmp loc_97521 loc_97400: lea rdi, [rsp+78h+var_38] call __ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>>::operator*(void) mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_48] mov eax, [rax] mov [rsp+78h+var_4C], eax mov rax, [rsp+78h+var_48] mov eax, [rax+4] mov [rsp+78h+var_50], eax cvtsi2ss xmm0, [rsp+78h+var_4C] cvtsi2ss xmm1, [rsp+78h+var_1C] divss xmm0, xmm1 movss [rsp+78h+var_58], xmm0 cvtsi2ss xmm0, [rsp+78h+var_50] cvtsi2ss xmm1, [rsp+78h+var_20] divss xmm0, xmm1 movss [rsp+78h+var_5C], xmm0 lea rdi, [rsp+78h+var_58] lea rsi, [rsp+78h+var_5C] call __ZSt3minIfERKT_S2_S2_; std::min<float>(float const&,float const&) movss xmm0, dword ptr [rax] movss [rsp+78h+var_54], xmm0 cvtsi2ss xmm0, [rsp+78h+var_1C] mulss xmm0, [rsp+78h+var_54] cvttss2si eax, xmm0 mov [rsp+78h+var_60], eax cvtsi2ss xmm0, [rsp+78h+var_20] mulss xmm0, [rsp+78h+var_54] cvttss2si eax, xmm0 mov [rsp+78h+var_64], eax mov eax, [rsp+78h+var_60] imul eax, [rsp+78h+var_64] mov [rsp+78h+var_6C], eax mov eax, [rsp+78h+var_1C] imul eax, [rsp+78h+var_20] mov [rsp+78h+var_70], eax lea rdi, [rsp+78h+var_6C] lea rsi, [rsp+78h+var_70] call __ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&) mov eax, [rax] mov [rsp+78h+var_68], eax mov eax, [rsp+78h+var_4C] imul eax, [rsp+78h+var_50] sub eax, [rsp+78h+var_68] mov [rsp+78h+var_74], eax mov eax, [rsp+78h+var_68] cmp eax, [rsp+78h+var_24] jg short loc_974F1 mov eax, [rsp+78h+var_68] cmp eax, [rsp+78h+var_24] jnz short loc_97510 mov eax, [rsp+78h+var_74] cmp eax, [rsp+78h+var_28] jge short loc_97510 loc_974F1: mov eax, [rsp+78h+var_68] mov [rsp+78h+var_24], eax mov eax, [rsp+78h+var_74] mov [rsp+78h+var_28], eax mov rsi, [rsp+78h+var_48] lea rdi, [rsp+78h+var_8] call __ZNSt4pairIiiEaSERKS0_; std::pair<int,int>::operator=(std::pair<int,int> const&) loc_97510: jmp short $+2 loc_97512: lea rdi, [rsp+78h+var_38] call __ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>>::operator++(void) jmp loc_973E8 loc_97521: mov rax, [rsp+78h+var_8] add rsp, 78h retn
long long select_best_resolution(int *a1, long long a2) { int v3; // [rsp+8h] [rbp-70h] BYREF int v4; // [rsp+Ch] [rbp-6Ch] BYREF int v5; // [rsp+10h] [rbp-68h] int v6; // [rsp+14h] [rbp-64h] int v7; // [rsp+18h] [rbp-60h] float v8; // [rsp+1Ch] [rbp-5Ch] BYREF float v9; // [rsp+20h] [rbp-58h] BYREF float v10; // [rsp+24h] [rbp-54h] int v11; // [rsp+28h] [rbp-50h] int v12; // [rsp+2Ch] [rbp-4Ch] int *v13; // [rsp+30h] [rbp-48h] long long v14; // [rsp+38h] [rbp-40h] BYREF _QWORD v15[2]; // [rsp+40h] [rbp-38h] BYREF int v16; // [rsp+50h] [rbp-28h] int v17; // [rsp+54h] [rbp-24h] int v18; // [rsp+58h] [rbp-20h] int v19; // [rsp+5Ch] [rbp-1Ch] long long v20; // [rsp+60h] [rbp-18h] int *v21; // [rsp+68h] [rbp-10h] long long v22; // [rsp+70h] [rbp-8h] BYREF v21 = a1; v20 = a2; v19 = *a1; v18 = a1[1]; _ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(&v22); v17 = 0; v16 = std::numeric_limits<int>::max(); v15[1] = a2; v15[0] = std::vector<std::pair<int,int>>::begin(a2); v14 = std::vector<std::pair<int,int>>::end(a2); while ( (__gnu_cxx::operator!=<std::pair<int,int> const*,std::vector<std::pair<int,int>>>(v15, &v14) & 1) != 0 ) { v13 = (int *)__gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>>::operator*(v15); v12 = *v13; v11 = v13[1]; v9 = (float)v12 / (float)v19; v8 = (float)v11 / (float)v18; v10 = *(float *)std::min<float>(&v9, &v8); v7 = (int)(float)((float)v19 * v10); v6 = (int)(float)((float)v18 * v10); v4 = v6 * v7; v3 = v18 * v19; v5 = *(_DWORD *)std::min<int>(&v4, &v3); if ( v5 > v17 || v5 == v17 && v11 * v12 - v5 < v16 ) { v17 = v5; v16 = v11 * v12 - v5; std::pair<int,int>::operator=(&v22, v13); } __gnu_cxx::__normal_iterator<std::pair<int,int> const*,std::vector<std::pair<int,int>>>::operator++(v15); } return v22; }
select_best_resolution: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x5c],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x58],EAX LEA RDI,[RSP + 0x70] CALL 0x0017d510 MOV dword ptr [RSP + 0x54],0x0 CALL 0x00176b00 MOV dword ptr [RSP + 0x50],EAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00174e70 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0017c3b0 MOV qword ptr [RSP + 0x38],RAX LAB_001973e8: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x38] CALL 0x00178700 TEST AL,0x1 JNZ 0x00197400 JMP 0x00197521 LAB_00197400: LEA RDI,[RSP + 0x40] CALL 0x0017dc90 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x28],EAX CVTSI2SS XMM0,dword ptr [RSP + 0x2c] CVTSI2SS XMM1,dword ptr [RSP + 0x5c] DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x20],XMM0 CVTSI2SS XMM0,dword ptr [RSP + 0x28] CVTSI2SS XMM1,dword ptr [RSP + 0x58] DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x1c],XMM0 LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x1c] CALL 0x0017b240 MOVSS XMM0,dword ptr [RAX] MOVSS dword ptr [RSP + 0x24],XMM0 CVTSI2SS XMM0,dword ptr [RSP + 0x5c] MULSS XMM0,dword ptr [RSP + 0x24] CVTTSS2SI EAX,XMM0 MOV dword ptr [RSP + 0x18],EAX CVTSI2SS XMM0,dword ptr [RSP + 0x58] MULSS XMM0,dword ptr [RSP + 0x24] CVTTSS2SI EAX,XMM0 MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x18] IMUL EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0x5c] IMUL EAX,dword ptr [RSP + 0x58] MOV dword ptr [RSP + 0x8],EAX LEA RDI,[RSP + 0xc] LEA RSI,[RSP + 0x8] CALL 0x00177850 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x2c] IMUL EAX,dword ptr [RSP + 0x28] SUB EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x10] CMP EAX,dword ptr [RSP + 0x54] JG 0x001974f1 MOV EAX,dword ptr [RSP + 0x10] CMP EAX,dword ptr [RSP + 0x54] JNZ 0x00197510 MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x50] JGE 0x00197510 LAB_001974f1: MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x54],EAX MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x50],EAX MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x70] CALL 0x00177900 LAB_00197510: JMP 0x00197512 LAB_00197512: LEA RDI,[RSP + 0x40] CALL 0x001720b0 JMP 0x001973e8 LAB_00197521: MOV RAX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
/* select_best_resolution(std::pair<int, int> const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */ int8 select_best_resolution(pair *param_1,vector *param_2) { bool bVar1; int iVar2; float *pfVar3; int *piVar4; int local_70; int local_6c; int local_68; int local_64; int local_60; float local_5c; float local_58; float local_54; int local_50; int local_4c; pair *local_48; int8 local_40; int8 local_38; vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *local_30; int local_28; int local_24; int local_20; int local_1c; vector *local_18; pair *local_10; int8 local_8; local_1c = *(int *)param_1; local_20 = *(int *)(param_1 + 4); local_18 = param_2; local_10 = param_1; _ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv (&local_8); local_24 = 0; local_28 = std::numeric_limits<int>::max(); local_30 = (vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *)local_18; local_38 = std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::begin ((vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *)local_18); local_40 = std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::end(local_30); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_38,(__normal_iterator *)&local_40); if (!bVar1) break; local_48 = (pair *)__gnu_cxx:: __normal_iterator<std::pair<int,int>const*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>> ::operator*((__normal_iterator<std::pair<int,int>const*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>> *)&local_38); local_4c = *(int *)local_48; local_50 = *(int *)(local_48 + 4); local_58 = (float)local_4c / (float)local_1c; local_5c = (float)local_50 / (float)local_20; pfVar3 = std::min<float>(&local_58,&local_5c); local_54 = *pfVar3; local_60 = (int)((float)local_1c * local_54); local_64 = (int)((float)local_20 * local_54); local_6c = local_60 * local_64; local_70 = local_1c * local_20; piVar4 = std::min<int>(&local_6c,&local_70); local_68 = *piVar4; iVar2 = local_4c * local_50 - local_68; if ((local_24 < local_68) || ((local_68 == local_24 && (iVar2 < local_28)))) { local_28 = iVar2; local_24 = local_68; std::pair<int,int>::operator=((pair<int,int> *)&local_8,local_48); } __gnu_cxx:: __normal_iterator<std::pair<int,int>const*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>> ::operator++((__normal_iterator<std::pair<int,int>const*,std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>> *)&local_38); } return local_8; }
216
common_params_get_system_info[abi:cxx11](common_params const&)
monkey531[P]llama/common/common.cpp
std::string common_params_get_system_info(const common_params & params) { std::ostringstream os; os << "system_info: n_threads = " << params.cpuparams.n_threads; if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); #else os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); #endif return os.str(); }
O3
cpp
common_params_get_system_info[abi:cxx11](common_params const&): pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x1a9d0 leaq 0x8aee9(%rip), %rsi # 0xadc42 movl $0x19, %edx movq %r15, %rdi callq 0x1a870 movl 0x274(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x1ace0 cmpl $-0x1, 0x488(%r14) je 0x22dbc leaq 0x8aed4(%rip), %rsi # 0xadc5c leaq 0x8(%rsp), %rdi movl $0x14, %edx callq 0x1a870 movl 0x488(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x1ace0 leaq 0x94930(%rip), %rsi # 0xb76df movl $0x1, %edx movq %rax, %rdi callq 0x1a870 leaq 0x8aeae(%rip), %rsi # 0xadc71 leaq 0x8(%rsp), %rdi movl $0x3, %edx callq 0x1a870 callq 0x1aa20 movl %eax, %esi leaq 0x8(%rsp), %rdi callq 0x1a4d0 movq %rax, %r14 leaq 0x94d15(%rip), %rsi # 0xb7b02 movl $0x3, %edx movq %rax, %rdi callq 0x1a870 callq 0x1a420 movq %rax, %r15 testq %rax, %rax je 0x22e1f movq %r15, %rdi callq 0x1a330 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x1a870 jmp 0x22e39 movq (%r14), %rax movq -0x18(%rax), %rax movq %r14, %rdi addq %rax, %rdi movl 0x20(%r14,%rax), %esi orl $0x1, %esi callq 0x1acb0 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x1abc0 movq 0xc013b(%rip), %rsi # 0xe2f88 leaq 0x8(%rsp), %rdi callq 0x1a3e0 leaq 0x78(%rsp), %rdi callq 0x1a220 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0xc010d(%rip), %rsi # 0xe2f88 leaq 0x8(%rsp), %rdi callq 0x1a3e0 leaq 0x78(%rsp), %rdi callq 0x1a220 movq %rbx, %rdi callq 0x1ad30
_Z29common_params_get_system_infoB5cxx11RK13common_params: push r15 push r14 push rbx sub rsp, 180h mov r14, rsi mov rbx, rdi lea r15, [rsp+198h+var_190] mov rdi, r15 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aSystemInfoNThr; "system_info: n_threads = " mov edx, 19h mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+274h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_22DBC lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] mov edx, 14h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+488h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, a09401910201912+51h; ")" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_22DBC: lea rsi, asc_ADC71; " / " lea rdi, [rsp+198h+var_190]; this mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax lea rdi, [rsp+198h+var_190] call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, asc_B7B01+1; " | " mov edx, 3 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call _llama_print_system_info mov r15, rax test rax, rax jz short loc_22E1F mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_22E39 loc_22E1F: mov rax, [r14] mov rax, [rax-18h] mov rdi, r14 add rdi, rax mov esi, [r14+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_22E39: lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+198h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_70]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v2; // rax unsigned int v3; // eax _QWORD *v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // rax _BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF _BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF std::ostringstream::basic_ostringstream(v9); std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL); std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL); v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160)); std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL); v3 = std::thread::hardware_concurrency((std::thread *)v9); v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3); std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL); v5 = llama_print_system_info(); v6 = v5; if ( v5 ) { v7 = strlen(v5); std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7); } else { std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u); } std::stringbuf::str(a1, v10); std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
common_params_get_system_info[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0011a9d0 LAB_00122d52: LEA RSI,[0x1adc42] MOV EDX,0x19 MOV RDI,R15 CALL 0x0011a870 MOV ESI,dword ptr [R14 + 0x274] LEA RDI,[RSP + 0x8] CALL 0x0011ace0 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x00122dbc LEA RSI,[0x1adc5c] LEA RDI,[RSP + 0x8] MOV EDX,0x14 CALL 0x0011a870 MOV ESI,dword ptr [R14 + 0x488] LEA RDI,[RSP + 0x8] CALL 0x0011ace0 LEA RSI,[0x1b76df] MOV EDX,0x1 MOV RDI,RAX CALL 0x0011a870 LAB_00122dbc: LEA RSI,[0x1adc71] LEA RDI,[RSP + 0x8] MOV EDX,0x3 CALL 0x0011a870 CALL 0x0011aa20 MOV ESI,EAX LEA RDI,[RSP + 0x8] CALL 0x0011a4d0 MOV R14,RAX LEA RSI,[0x1b7b02] MOV EDX,0x3 MOV RDI,RAX CALL 0x0011a870 CALL 0x0011a420 MOV R15,RAX TEST RAX,RAX JZ 0x00122e1f MOV RDI,R15 CALL 0x0011a330 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x0011a870 JMP 0x00122e39 LAB_00122e1f: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,R14 ADD RDI,RAX MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x0011acb0 LAB_00122e39: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0011abc0 LAB_00122e46: MOV RSI,qword ptr [0x001e2f88] LEA RDI,[RSP + 0x8] CALL 0x0011a3e0 LEA RDI,[RSP + 0x78] CALL 0x0011a220 MOV RAX,RBX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { ostream *poVar1; char *__s; size_t sVar2; long in_RSI; ostringstream local_190 [112]; ios_base local_120 [264]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 00122d52 to 00122e45 has its CatchHandler @ 00122e71 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190,"system_info: n_threads = ",0x19); std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190," (n_threads_batch = ",0x14); poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488)); std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190); std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3); __s = (char *)llama_print_system_info(); if (__s == (char *)0x0) { std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18), *(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(__s); std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2); } std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); std::ios_base::~ios_base(local_120); return param_1; }
217
uf_zerofill_skip_zero
eloqsql/storage/myisam/mi_packrec.c
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O3
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x364a1 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x364b9 subl %r14d, %ebx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx jmp 0x364da movq %r12, %rdi callq 0x35d09 movl $0x1f, 0x4(%r12) cmpl $0x0, (%r12) js 0x36494 movl 0x1c(%r15), %eax subq %rax, %rbx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x365fa movl 0x1c(%r15), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x281d0
uf_zerofill_skip_zero: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_364A1 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_364B9 loc_36494: sub ebx, r14d mov rdi, r14 xor esi, esi mov rdx, rbx jmp short loc_364DA loc_364A1: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh cmp dword ptr [r12], 0 js short loc_36494 loc_364B9: mov eax, [r15+1Ch] sub rbx, rax mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call decode_bytes mov edx, [r15+1Ch] mov rdi, rbx xor esi, esi loc_364DA: pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memset
long long uf_zerofill_skip_zero(long long a1, int *a2, long long a3, long long a4) { int v6; // eax int v7; // ecx unsigned int v8; // eax long long v10; // rbx v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest(&v7, v8) ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } v10 = a4 - *(unsigned int *)(a1 + 28); decode_bytes(a1, a2, a3, v10); return memset(v10, 0LL, *(unsigned int *)(a1 + 28)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x001364a1 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x001364b9 LAB_00136494: SUB EBX,R14D MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX JMP 0x001364da LAB_001364a1: MOV RDI,R12 CALL 0x00135d09 MOV dword ptr [R12 + 0x4],0x1f CMP dword ptr [R12],0x0 JS 0x00136494 LAB_001364b9: MOV EAX,dword ptr [R15 + 0x1c] SUB RBX,RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL 0x001365fa MOV EDX,dword ptr [R15 + 0x1c] MOV RDI,RBX XOR ESI,ESI LAB_001364da: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001281d0
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; if (-1 < (int)*param_2) goto LAB_001364b9; } else { uVar1 = param_2[1] - 1; param_2[1] = uVar1; if ((*param_2 >> (uVar1 & 0x1f) & 1) == 0) { LAB_001364b9: __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c)); decode_bytes(param_1,param_2,param_3,__s); uVar1 = *(uint *)(param_1 + 0x1c); goto LAB_001364da; } } uVar1 = (int)param_4 - (int)param_3; __s = param_3; LAB_001364da: memset(__s,0,(ulong)uVar1); return; }
218
JS_IsExtensible
bluesky950520[P]quickjs/quickjs.c
int JS_IsExtensible(JSContext *ctx, JSValue obj) { JSObject *p; if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)) return FALSE; p = JS_VALUE_GET_OBJ(obj); if (unlikely(p->class_id == JS_CLASS_PROXY)) return js_proxy_isExtensible(ctx, obj); else return p->extensible; }
O2
c
JS_IsExtensible: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdx, %rcx cmpl $-0x1, %ecx jne 0x1de3a movq %rsi, %rdx cmpw $0x30, 0x6(%rsi) je 0x1de3e movzbl 0x5(%rdx), %ebp andl $0x1, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %ebp, %ebp jmp 0x1de2d movq %rdi, %rbx leaq 0x8(%rsp), %rsi pushq $0x62 popq %r8 callq 0x35d01 pushq $-0x1 popq %r15 testq %rax, %rax je 0x1ded3 movq %rax, %r14 movq 0x10(%rsp), %rdx cmpl $0x3, %edx jne 0x1de78 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1de0a movl %eax, %ebp jmp 0x1de2d movq 0x8(%rsp), %rsi movq 0x10(%r14), %rcx movq 0x18(%r14), %r8 movq %r14, (%rsp) pushq $0x1 popq %r9 movq %rbx, %rdi callq 0x1cd8e cmpl $0x6, %edx je 0x1ded3 movq %rbx, %rdi movq %rax, %rsi callq 0x1cdfa movl %eax, %ebp movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1de0a testl %eax, %eax js 0x1ded3 cmpl %eax, %ebp je 0x1de2d leaq 0x68f3d(%rip), %rsi # 0x86e06 movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d movl %r15d, %ebp jmp 0x1de2d
JS_IsExtensible: push rbp push r15 push r14 push rbx sub rsp, 18h mov rcx, rdx cmp ecx, 0FFFFFFFFh jnz short loc_1DE3A mov rdx, rsi cmp word ptr [rsi+6], 30h ; '0' jz short loc_1DE3E movzx ebp, byte ptr [rdx+5] and ebp, 1 loc_1DE2D: mov eax, ebp add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_1DE3A: xor ebp, ebp jmp short loc_1DE2D loc_1DE3E: mov rbx, rdi lea rsi, [rsp+38h+var_30] push 62h ; 'b' pop r8 call get_proxy_method push 0FFFFFFFFFFFFFFFFh pop r15 test rax, rax jz short loc_1DED3 mov r14, rax mov rdx, [rsp+38h+var_28] cmp edx, 3 jnz short loc_1DE78 mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_IsExtensible mov ebp, eax jmp short loc_1DE2D loc_1DE78: mov rsi, [rsp+38h+var_30] mov rcx, [r14+10h] mov r8, [r14+18h] mov [rsp+38h+var_38], r14 push 1 pop r9 mov rdi, rbx call JS_CallFree cmp edx, 6 jz short loc_1DED3 mov rdi, rbx mov rsi, rax call JS_ToBoolFree mov ebp, eax mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_IsExtensible test eax, eax js short loc_1DED3 cmp ebp, eax jz loc_1DE2D lea rsi, aProxyInconsist_0; "proxy: inconsistent isExtensible" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_1DED3: mov ebp, r15d jmp loc_1DE2D
long long JS_IsExtensible( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { unsigned int v11; // ebp _QWORD *proxy_method; // rax _QWORD *v14; // r14 long long v15; // rax long long v16; // rdx int IsExtensible; // eax long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 char v24; // [rsp+0h] [rbp-38h] long long v25; // [rsp+8h] [rbp-30h] BYREF long long v26; // [rsp+10h] [rbp-28h] if ( (_DWORD)a3 == -1 ) { if ( *(_WORD *)(a2 + 6) == 48 ) { proxy_method = (_QWORD *)get_proxy_method(a1, &v25, a2, a3, 98LL); if ( proxy_method ) { v14 = proxy_method; if ( (_DWORD)v26 == 3 ) return (unsigned int)JS_IsExtensible(a1, *proxy_method, proxy_method[1]); v15 = JS_CallFree(a1, v25, v26, proxy_method[2], proxy_method[3], 1, (long long)proxy_method); if ( (_DWORD)v16 != 6 ) { v11 = JS_ToBoolFree(a1, v15, v16); IsExtensible = JS_IsExtensible(a1, *v14, v14[1]); if ( IsExtensible >= 0 ) { if ( v11 == IsExtensible ) return v11; JS_ThrowTypeError( a1, (long long)"proxy: inconsistent isExtensible", v18, v19, v20, v21, a4, a5, a6, a7, v22, v23, a10, a11, v24); } } } return (unsigned int)-1; } return *(_BYTE *)(a2 + 5) & 1; } else { return 0; } }
JS_IsExtensible: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RCX,RDX CMP ECX,-0x1 JNZ 0x0011de3a MOV RDX,RSI CMP word ptr [RSI + 0x6],0x30 JZ 0x0011de3e MOVZX EBP,byte ptr [RDX + 0x5] AND EBP,0x1 LAB_0011de2d: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_0011de3a: XOR EBP,EBP JMP 0x0011de2d LAB_0011de3e: MOV RBX,RDI LEA RSI,[RSP + 0x8] PUSH 0x62 POP R8 CALL 0x00135d01 PUSH -0x1 POP R15 TEST RAX,RAX JZ 0x0011ded3 MOV R14,RAX MOV RDX,qword ptr [RSP + 0x10] CMP EDX,0x3 JNZ 0x0011de78 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011de0a MOV EBP,EAX JMP 0x0011de2d LAB_0011de78: MOV RSI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [R14 + 0x10] MOV R8,qword ptr [R14 + 0x18] MOV qword ptr [RSP],R14 PUSH 0x1 POP R9 MOV RDI,RBX CALL 0x0011cd8e CMP EDX,0x6 JZ 0x0011ded3 MOV RDI,RBX MOV RSI,RAX CALL 0x0011cdfa MOV EBP,EAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011de0a TEST EAX,EAX JS 0x0011ded3 CMP EBP,EAX JZ 0x0011de2d LEA RSI,[0x186e06] MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d LAB_0011ded3: MOV EBP,R15D JMP 0x0011de2d
uint JS_IsExtensible(int8 param_1,long param_2,int8 param_3) { uint uVar1; int8 *puVar2; uint uVar3; int1 auVar4 [12]; int8 local_30; int8 local_28; if ((int)param_3 == -1) { if (*(short *)(param_2 + 6) == 0x30) { puVar2 = (int8 *)get_proxy_method(param_1,&local_30,param_2,param_3,0x62); if (puVar2 != (int8 *)0x0) { if ((int)local_28 == 3) { uVar3 = JS_IsExtensible(param_1,*puVar2,puVar2[1]); return uVar3; } auVar4 = JS_CallFree(param_1,local_30,local_28,puVar2[2],puVar2[3],1,puVar2); if (auVar4._8_4_ != 6) { uVar3 = JS_ToBoolFree(param_1,auVar4._0_8_); uVar1 = JS_IsExtensible(param_1,*puVar2,puVar2[1]); if (-1 < (int)uVar1) { if (uVar3 == uVar1) { return uVar3; } JS_ThrowTypeError(param_1,"proxy: inconsistent isExtensible"); } } } uVar3 = 0xffffffff; } else { uVar3 = *(byte *)(param_2 + 5) & 1; } } else { uVar3 = 0; } return uVar3; }
219
google::protobuf::OneofOptions::SharedCtor(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
inline void OneofOptions::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.uninterpreted_option_){arena} , /*decltype(_impl_._cached_size_)*/{} }; }
O0
cpp
google::protobuf::OneofOptions::SharedCtor(google::protobuf::Arena*, bool): subq $0x48, %rsp movb %dl, %al movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) andb $0x1, %al movb %al, 0x37(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) addq $0x10, %rdi movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rsi callq 0xde600 movq 0x18(%rsp), %rdi addq $0x28, %rdi movq 0x38(%rsp), %rsi callq 0xde620 jmp 0xdaa50 movq 0x10(%rsp), %rdi addq $0x30, %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x4, %edx callq 0x13200 movq (%rsp), %rdi callq 0xd3ff0 addq $0x48, %rsp retq movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) callq 0x186290 movq 0x28(%rsp), %rdi callq 0x13750 nopl (%rax)
_ZN6google8protobuf12OneofOptions10SharedCtorEPNS0_5ArenaEb: sub rsp, 48h mov al, dl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi and al, 1 mov [rsp+48h+var_11], al mov rdi, [rsp+48h+var_8] mov [rsp+48h+var_30], rdi add rdi, 10h mov [rsp+48h+var_40], rdi mov rax, rdi mov [rsp+48h+var_38], rax mov rsi, [rsp+48h+var_10] call _ZN6google8protobuf8internal12ExtensionSetC2ENS1_16ArenaInitializedEPNS0_5ArenaE; google::protobuf::internal::ExtensionSet::ExtensionSet(google::protobuf::internal::ArenaInitialized,google::protobuf::Arena *) mov rdi, [rsp+48h+var_30] add rdi, 28h ; '(' mov rsi, [rsp+48h+var_10] call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField(google::protobuf::Arena *) jmp short $+2 loc_DAA50: mov rdi, [rsp+48h+var_38] add rdi, 30h ; '0' mov [rsp+48h+var_48], rdi xor esi, esi mov edx, 4 call _memset mov rdi, [rsp+48h+var_48]; this call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) add rsp, 48h retn mov rdi, [rsp+arg_0]; this mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax call _ZN6google8protobuf8internal12ExtensionSetD2Ev; google::protobuf::internal::ExtensionSet::~ExtensionSet() mov rdi, [rsp+arg_20] call __Unwind_Resume
google::protobuf::internal::CachedSize * google::protobuf::OneofOptions::SharedCtor( google::protobuf::OneofOptions *this, google::protobuf::Arena *a2) { google::protobuf::internal::ExtensionSet::ExtensionSet((char *)this + 16, a2); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField((char *)this + 40, a2); memset((char *)this + 64, 0LL, 4LL); return google::protobuf::internal::CachedSize::CachedSize((google::protobuf::OneofOptions *)((char *)this + 64)); }
SharedCtor: SUB RSP,0x48 MOV AL,DL MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI AND AL,0x1 MOV byte ptr [RSP + 0x37],AL MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI ADD RDI,0x10 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x38] CALL 0x001de600 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x28 MOV RSI,qword ptr [RSP + 0x38] LAB_001daa49: CALL 0x001de620 LAB_001daa4e: JMP 0x001daa50 LAB_001daa50: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x30 MOV qword ptr [RSP],RDI XOR ESI,ESI MOV EDX,0x4 CALL 0x00113200 MOV RDI,qword ptr [RSP] CALL 0x001d3ff0 ADD RSP,0x48 RET
/* google::protobuf::OneofOptions::SharedCtor(google::protobuf::Arena*, bool) */ void google::protobuf::OneofOptions::SharedCtor(Arena *param_1,bool param_2) { int7 in_register_00000031; internal::ExtensionSet::ExtensionSet ((ExtensionSet *)(param_1 + 0x10),(Arena *)CONCAT71(in_register_00000031,param_2)); /* try { // try from 001daa49 to 001daa4d has its CatchHandler @ 001daa77 */ RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField ((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(param_1 + 0x28), (Arena *)CONCAT71(in_register_00000031,param_2)); memset((CachedSize *)(param_1 + 0x40),0,4); internal::CachedSize::CachedSize((CachedSize *)(param_1 + 0x40)); return; }
220
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)))); }
O0
c
mi_write_keypage: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0x108(%rcx), %rax jb 0x687cf movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movzwl 0xe(%rcx), %ecx addq %rcx, %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx cmpq 0x20(%rcx), %rax ja 0x687cf movq -0x20(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF cmpq $0x0, %rax je 0x687ea jmp 0x687d1 jmp 0x687d3 callq 0x8d620 movl $0x16, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x68912 jmp 0x687ec jmp 0x687ee jmp 0x687f0 jmp 0x687f2 movq -0x18(%rbp), %rax movzwl 0xe(%rax), %eax movl %eax, -0x34(%rbp) cmpl $0x2000, %eax # imm = 0x2000 jbe 0x68851 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x20(%rax), %rax movq -0x20(%rbp), %rcx movl -0x34(%rbp), %edx addq %rdx, %rcx cmpq %rcx, %rax je 0x68851 movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF addl $0x1000, %eax # imm = 0x1000 subl $0x1, %eax andl $0xfffff000, %eax # imm = 0xFFFFF000 movl %eax, -0x34(%rbp) jmp 0x68853 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x278(%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x350(%rax), %eax movl %eax, -0x64(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0x280, %rax # imm = 0x280 movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x40(%rbp) movq -0x18(%rbp), %rax movzwl 0xe(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rcx movb $0x1, %al cmpl $0x2, 0x1f4(%rcx) movb %al, -0x35(%rbp) jne 0x688d6 movq -0x10(%rbp), %rax movq (%rax), %rax movsbl 0x383(%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x35(%rbp) movl -0x3c(%rbp), %r10d movl -0x40(%rbp), %r11d movq -0x48(%rbp), %r9 movl -0x4c(%rbp), %r8d movq -0x58(%rbp), %rcx movq -0x60(%rbp), %rdx movl -0x64(%rbp), %esi movq -0x70(%rbp), %rdi movb -0x35(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x78dc0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nop
_mi_write_keypage: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+108h] jb short loc_687CF mov rax, [rbp+var_20] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+0Eh] add rax, rcx mov rcx, [rbp+var_10] mov rcx, [rcx+8] cmp rax, [rcx+20h] ja short loc_687CF mov rax, [rbp+var_20] and rax, 3FFh cmp rax, 0 jz short loc_687EA loc_687CF: jmp short $+2 loc_687D1: jmp short $+2 loc_687D3: call _my_thread_var mov dword ptr [rax], 16h mov [rbp+var_4], 0FFFFFFFFh jmp loc_68912 loc_687EA: jmp short $+2 loc_687EC: jmp short $+2 loc_687EE: jmp short $+2 loc_687F0: jmp short $+2 loc_687F2: mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Eh] mov [rbp+var_34], eax cmp eax, 2000h jbe short loc_68851 mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+20h] mov rcx, [rbp+var_20] mov edx, [rbp+var_34] add rcx, rdx cmp rax, rcx jz short loc_68851 mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh add eax, 1000h sub eax, 1 and eax, 0FFFFF000h mov [rbp+var_34], eax loc_68851: jmp short $+2 loc_68853: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+278h] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+350h] mov [rbp+var_64], eax mov rax, [rbp+var_10] mov rax, [rax] add rax, 280h mov [rbp+var_60], rax mov rax, [rbp+var_20] mov [rbp+var_58], rax mov eax, [rbp+var_24] mov [rbp+var_4C], eax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov eax, [rbp+var_34] mov [rbp+var_40], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Eh] mov [rbp+var_3C], eax mov rcx, [rbp+var_10] mov al, 1 cmp dword ptr [rcx+1F4h], 2 mov [rbp+var_35], al jnz short loc_688D6 mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax+383h] cmp eax, 0 setnz al mov [rbp+var_35], al loc_688D6: mov r10d, [rbp+var_3C] mov r11d, [rbp+var_40] mov r9, [rbp+var_48] mov r8d, [rbp+var_4C] mov rcx, [rbp+var_58] mov rdx, [rbp+var_60] mov esi, [rbp+var_64] mov rdi, [rbp+var_70] mov al, [rbp+var_35] and al, 1 movzx eax, al mov [rsp+90h+var_90], r11d mov [rsp+90h+var_88], r10d mov [rsp+90h+var_80], eax call key_cache_write mov [rbp+var_4], eax loc_68912: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long mi_write_keypage(_QWORD *a1, long long a2, unsigned long long a3, int a4, unsigned __int16 *a5) { bool v6; // [rsp+5Bh] [rbp-35h] unsigned int v7; // [rsp+5Ch] [rbp-34h] if ( a3 < *(_QWORD *)(*a1 + 264LL) || *(unsigned __int16 *)(a2 + 14) + a3 > *(_QWORD *)(a1[1] + 32LL) || (a3 & 0x3FF) != 0 ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 22; return (unsigned int)-1; } else { v7 = *(unsigned __int16 *)(a2 + 14); if ( v7 > 0x2000 && *(_QWORD *)(a1[1] + 32LL) != *(unsigned __int16 *)(a2 + 14) + a3 ) v7 = ((_byteswap_ushort(*a5) & 0x7FFF) + 4095) & 0xFFFFF000; v6 = 1; if ( *((_DWORD *)a1 + 125) == 2 ) v6 = *(_BYTE *)(*a1 + 899LL) != 0; return (unsigned int)key_cache_write( *(_QWORD *)(*a1 + 632LL), *(_DWORD *)(*a1 + 848LL), *(_DWORD *)a1 + 640, a3, a4, (_DWORD)a5, v7, *(unsigned __int16 *)(a2 + 14), v6); } }
_mi_write_keypage: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x108] JC 0x001687cf MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0xe] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] CMP RAX,qword ptr [RCX + 0x20] JA 0x001687cf MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x3ff CMP RAX,0x0 JZ 0x001687ea LAB_001687cf: JMP 0x001687d1 LAB_001687d1: JMP 0x001687d3 LAB_001687d3: CALL 0x0018d620 MOV dword ptr [RAX],0x16 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00168912 LAB_001687ea: JMP 0x001687ec LAB_001687ec: JMP 0x001687ee LAB_001687ee: JMP 0x001687f0 LAB_001687f0: JMP 0x001687f2 LAB_001687f2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xe] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x2000 JBE 0x00168851 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x34] ADD RCX,RDX CMP RAX,RCX JZ 0x00168851 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff ADD EAX,0x1000 SUB EAX,0x1 AND EAX,0xfffff000 MOV dword ptr [RBP + -0x34],EAX LAB_00168851: JMP 0x00168853 LAB_00168853: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x278] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x350] MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0x280 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xe] MOV dword ptr [RBP + -0x3c],EAX MOV RCX,qword ptr [RBP + -0x10] MOV AL,0x1 CMP dword ptr [RCX + 0x1f4],0x2 MOV byte ptr [RBP + -0x35],AL JNZ 0x001688d6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x383] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_001688d6: MOV R10D,dword ptr [RBP + -0x3c] MOV R11D,dword ptr [RBP + -0x40] MOV R9,qword ptr [RBP + -0x48] MOV R8D,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x64] MOV RDI,qword ptr [RBP + -0x70] MOV AL,byte ptr [RBP + -0x35] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x00178dc0 MOV dword ptr [RBP + -0x4],EAX LAB_00168912: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 _mi_write_keypage(long *param_1,long param_2,ulong param_3,int4 param_4,byte *param_5) { int4 *puVar1; bool local_3d; uint local_3c; int4 local_c; if (((param_3 < *(ulong *)(*param_1 + 0x108)) || (*(ulong *)(param_1[1] + 0x20) < param_3 + *(ushort *)(param_2 + 0xe))) || ((param_3 & 0x3ff) != 0)) { puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0x16; local_c = 0xffffffff; } else { local_3c = (uint)*(ushort *)(param_2 + 0xe); if ((0x2000 < local_3c) && (*(long *)(param_1[1] + 0x20) != param_3 + local_3c)) { local_3c = ((uint)param_5[1] | (*param_5 & 0x7f) << 8) + 0xfff & 0xfffff000; } local_3d = true; if (*(int *)((long)param_1 + 500) == 2) { local_3d = *(char *)(*param_1 + 899) != '\0'; } local_c = key_cache_write(*(int8 *)(*param_1 + 0x278),*(int4 *)(*param_1 + 0x350), *param_1 + 0x280,param_3,param_4,param_5,local_3c, *(int2 *)(param_2 + 0xe),local_3d); } return local_c; }
221
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 0x4d48c callq 0x624a2 movl $0x16, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x4d532 movq %r8, %r9 movl %ecx, %r8d movq %rdx, %rcx testl $0x3ff, %ecx # imm = 0x3FF jne 0x4d477 movzwl 0xe(%rsi), %r10d leaq (%r10,%rcx), %rax movq 0x8(%rdi), %rdx movq 0x20(%rdx), %rdx cmpq %rdx, %rax ja 0x4d477 cmpl $0x2001, %r10d # imm = 0x2001 setb %sil cmpq %rax, %rdx sete %al orb %sil, %al movl %r10d, %ebx jne 0x4d4ea 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 0x4d51d xorl %r14d, %r14d cmpb $0x0, 0x383(%r11) setne %r14b subq $0x8, %rsp movq %rax, %rdi pushq %r14 pushq %r10 pushq %rbx callq 0x56d6a 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_4D48C loc_4D477: call _my_thread_var mov dword ptr [rax], 16h mov eax, 0FFFFFFFFh jmp loc_4D532 loc_4D48C: mov r9, r8 mov r8d, ecx mov rcx, rdx test ecx, 3FFh jnz short loc_4D477 movzx r10d, word ptr [rsi+0Eh] lea rax, [r10+rcx] mov rdx, [rdi+8] mov rdx, [rdx+20h] cmp rax, rdx ja short loc_4D477 cmp r10d, 2001h setb sil cmp rdx, rax setz al or al, sil mov ebx, r10d jnz short loc_4D4EA 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_4D4EA: mov rax, [r11+278h] mov esi, [r11+350h] lea rdx, [r11+280h] mov r14d, 1 cmp dword ptr [rdi+1F4h], 2 jnz short loc_4D51D xor r14d, r14d cmp byte ptr [r11+383h], 0 setnz r14b loc_4D51D: sub rsp, 8 mov rdi, rax push r14 push r10 push rbx call key_cache_write add rsp, 20h loc_4D532: 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 unsigned long long v9; // rcx long long v10; // r10 long long v11; // rax long long v12; // rbx _BOOL8 v13; // r14 v5 = *a1; if ( *(_QWORD *)(*a1 + 264) > a3 || (v8 = a4, v9 = a3, (a3 & 0x3FF) != 0) || (v10 = *(unsigned __int16 *)(a2 + 14), v11 = v10 + a3, a3 = *(_QWORD *)(a1[1] + 32), v10 + v9 > a3) ) { *(_DWORD *)my_thread_var(a1, a2, a3) = 22; return 0xFFFFFFFFLL; } else { v12 = *(unsigned __int16 *)(a2 + 14); if ( (unsigned int)v10 >= 0x2001 && a3 != v11 ) v12 = (unsigned __int16)((unsigned __int8)a5[1] + ((*a5 & 0x7F) << 8) + 4095) & 0xF000; v13 = 1LL; if ( *((_DWORD *)a1 + 125) == 2 ) v13 = *(_BYTE *)(v5 + 899) != 0; return key_cache_write(*(_QWORD *)(v5 + 632), *(unsigned int *)(v5 + 848), v5 + 640, v9, v8, a5, v12, v10, v13); } }
_mi_write_keypage: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R11,qword ptr [RDI] CMP qword ptr [R11 + 0x108],RDX JBE 0x0014d48c LAB_0014d477: CALL 0x001624a2 MOV dword ptr [RAX],0x16 MOV EAX,0xffffffff JMP 0x0014d532 LAB_0014d48c: MOV R9,R8 MOV R8D,ECX MOV RCX,RDX TEST ECX,0x3ff JNZ 0x0014d477 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 0x0014d477 CMP R10D,0x2001 SETC SIL CMP RDX,RAX SETZ AL OR AL,SIL MOV EBX,R10D JNZ 0x0014d4ea 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_0014d4ea: 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 0x0014d51d XOR R14D,R14D CMP byte ptr [R11 + 0x383],0x0 SETNZ R14B LAB_0014d51d: SUB RSP,0x8 MOV RDI,RAX PUSH R14 PUSH R10 PUSH RBX CALL 0x00156d6a ADD RSP,0x20 LAB_0014d532: 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; }
222
mi_decrement_open_count
eloqsql/storage/myisam/mi_locking.c
int _mi_decrement_open_count(MI_INFO *info) { uchar buff[2]; register MYISAM_SHARE *share=info->s; int lock_error=0,write_error=0; if (share->global_changed) { uint old_lock=info->lock_type; share->global_changed=0; lock_error= my_disable_locking ? 0 : mi_lock_database(info,F_WRLCK); /* Its not fatal even if we couldn't get the lock ! */ if (share->state.open_count > 0) { share->state.open_count--; mi_int2store(buff,share->state.open_count); write_error= (mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP)) != 0); } if (!lock_error && !my_disable_locking) lock_error=mi_lock_database(info,old_lock); } return MY_TEST(lock_error || write_error); }
O3
c
mi_decrement_open_count: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq (%rdi), %r12 cmpb $0x0, 0x380(%r12) je 0x7cb63 movq %rdi, %rbx movl 0x1f4(%rdi), %r14d movb $0x0, 0x380(%r12) leaq 0xb8bbc9(%rip), %r13 # 0xc086a8 xorl %r15d, %r15d cmpb $0x0, (%r13) jne 0x7caf9 movq %rbx, %rdi movl $0x1, %esi callq 0x7bdd4 movl %eax, %r15d movl 0xec(%r12), %eax testl %eax, %eax je 0x7cb67 decl %eax movl %eax, 0xec(%r12) movb %al, -0x29(%rbp) movb %ah, -0x2a(%rbp) movl 0x350(%r12), %r12d leaq 0x3094ec(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %r12d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7cba2 leaq -0x2a(%rbp), %rsi movl $0x2, %edx movl $0x18, %ecx movl $0x4, %r8d movl %r12d, %edi callq 0xa07c6 testq %rax, %rax setne %r12b jmp 0x7cb6a xorl %eax, %eax jmp 0x7cb93 xorl %r12d, %r12d testl %r15d, %r15d jne 0x7cb84 cmpb $0x0, (%r13) jne 0x7cb84 movq %rbx, %rdi movl %r14d, %esi callq 0x7bdd4 movl %eax, %r15d testl %r15d, %r15d setne %al orb %r12b, %al movzbl %al, %eax andl $0x1, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x2a(%rbp), %rdx leaq -0x38(%rbp), %rcx movq %rax, %rdi movl %r12d, %esi movq %rcx, %r12 callq 0x2dadc movq (%r12), %rax jmp 0x7cb5a
_mi_decrement_open_count: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, [rdi] cmp byte ptr [r12+380h], 0 jz loc_7CB63 mov rbx, rdi mov r14d, [rdi+1F4h] mov byte ptr [r12+380h], 0 lea r13, my_disable_locking xor r15d, r15d cmp byte ptr [r13+0], 0 jnz short loc_7CAF9 mov rdi, rbx mov esi, 1 call mi_lock_database mov r15d, eax loc_7CAF9: mov eax, [r12+0ECh] test eax, eax jz short loc_7CB67 dec eax mov [r12+0ECh], eax mov [rbp+var_29], al mov [rbp+var_2A], ah mov r12d, [r12+350h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, r12d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_7CBA2 lea rsi, [rbp+var_2A] mov edx, 2 mov ecx, 18h mov r8d, 4 mov edi, r12d call my_pwrite loc_7CB5A: test rax, rax setnz r12b jmp short loc_7CB6A loc_7CB63: xor eax, eax jmp short loc_7CB93 loc_7CB67: xor r12d, r12d loc_7CB6A: test r15d, r15d jnz short loc_7CB84 cmp byte ptr [r13+0], 0 jnz short loc_7CB84 mov rdi, rbx mov esi, r14d call mi_lock_database mov r15d, eax loc_7CB84: test r15d, r15d setnz al or al, r12b movzx eax, al and eax, 1 loc_7CB93: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7CBA2: lea rdx, [rbp+var_2A] lea rcx, [rbp+var_38] mov rdi, rax mov esi, r12d mov r12, rcx call _mi_decrement_open_count_cold_1 mov rax, [r12] jmp short loc_7CB5A
long long mi_decrement_open_count(_DWORD *a1, double a2, double a3) { long long v3; // r12 unsigned int v4; // r14d int v5; // r15d int v6; // eax int v7; // eax unsigned int v8; // r12d long long v9; // rax long long v10; // rax bool v11; // r12 _BYTE v13[72]; // [rsp+0h] [rbp-80h] BYREF long long v14; // [rsp+48h] [rbp-38h] BYREF _BYTE v15[42]; // [rsp+56h] [rbp-2Ah] BYREF v3 = *(_QWORD *)a1; if ( !*(_BYTE *)(*(_QWORD *)a1 + 896LL) ) return 0LL; v4 = a1[125]; *(_BYTE *)(v3 + 896) = 0; v5 = 0; if ( !my_disable_locking ) v5 = mi_lock_database(a1, (_BYTE *)&dword_0 + 1, a2, a3); v6 = *(_DWORD *)(v3 + 236); if ( v6 ) { v7 = v6 - 1; *(_DWORD *)(v3 + 236) = v7; v15[0] = BYTE1(v7); v15[1] = v7; v8 = *(_DWORD *)(v3 + 848); v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, v8, 7LL); if ( v9 ) { mi_decrement_open_count_cold_1(v9, v8, (long long)v15, &v14); v10 = v14; } else { v10 = my_pwrite(v8, v15, 2LL, 24LL, 4LL); } v11 = v10 != 0; } else { v11 = 0; } if ( !v5 && !my_disable_locking ) v5 = mi_lock_database(a1, (const char *)v4, a2, a3); return v11 | (unsigned __int8)(v5 != 0); }
_mi_decrement_open_count: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,qword ptr [RDI] CMP byte ptr [R12 + 0x380],0x0 JZ 0x0017cb63 MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x1f4] MOV byte ptr [R12 + 0x380],0x0 LEA R13,[0xd086a8] XOR R15D,R15D CMP byte ptr [R13],0x0 JNZ 0x0017caf9 MOV RDI,RBX MOV ESI,0x1 CALL 0x0017bdd4 MOV R15D,EAX LAB_0017caf9: MOV EAX,dword ptr [R12 + 0xec] TEST EAX,EAX JZ 0x0017cb67 DEC EAX MOV dword ptr [R12 + 0xec],EAX MOV byte ptr [RBP + -0x29],AL MOV byte ptr [RBP + -0x2a],AH MOV R12D,dword ptr [R12 + 0x350] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,R12D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017cba2 LEA RSI,[RBP + -0x2a] MOV EDX,0x2 MOV ECX,0x18 MOV R8D,0x4 MOV EDI,R12D CALL 0x001a07c6 LAB_0017cb5a: TEST RAX,RAX SETNZ R12B JMP 0x0017cb6a LAB_0017cb63: XOR EAX,EAX JMP 0x0017cb93 LAB_0017cb67: XOR R12D,R12D LAB_0017cb6a: TEST R15D,R15D JNZ 0x0017cb84 CMP byte ptr [R13],0x0 JNZ 0x0017cb84 MOV RDI,RBX MOV ESI,R14D CALL 0x0017bdd4 MOV R15D,EAX LAB_0017cb84: TEST R15D,R15D SETNZ AL OR AL,R12B MOVZX EAX,AL AND EAX,0x1 LAB_0017cb93: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017cba2: LEA RDX,[RBP + -0x2a] LEA RCX,[RBP + -0x38] MOV RDI,RAX MOV ESI,R12D MOV R12,RCX CALL 0x0012dadc MOV RAX,qword ptr [R12] JMP 0x0017cb5a
byte _mi_decrement_open_count(long *param_1) { int4 uVar1; int4 uVar2; byte bVar3; int iVar4; int iVar5; long lVar6; bool bVar7; int1 local_88 [72]; long local_40; int1 local_32; int1 local_31; lVar6 = *param_1; if (*(char *)(lVar6 + 0x380) == '\0') { bVar3 = 0; } else { uVar1 = *(int4 *)((long)param_1 + 500); *(int1 *)(lVar6 + 0x380) = 0; iVar4 = 0; if (my_disable_locking == '\0') { iVar4 = mi_lock_database(param_1,1); } if (*(int *)(lVar6 + 0xec) == 0) { bVar7 = false; } else { iVar5 = *(int *)(lVar6 + 0xec) + -1; *(int *)(lVar6 + 0xec) = iVar5; local_31 = (int1)iVar5; local_32 = (int1)((uint)iVar5 >> 8); uVar2 = *(int4 *)(lVar6 + 0x350); lVar6 = (**(code **)(PSI_server + 0x158))(local_88,uVar2,7); if (lVar6 == 0) { local_40 = my_pwrite(uVar2,&local_32,2,0x18,4); } else { _mi_decrement_open_count_cold_1(lVar6,uVar2,&local_32); } bVar7 = local_40 != 0; } if ((iVar4 == 0) && (my_disable_locking == '\0')) { iVar4 = mi_lock_database(param_1,uVar1); } bVar3 = iVar4 != 0 | bVar7; } return bVar3; }
223
YAML::Scanner::InsertPotentialSimpleKey()
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/simplekey.cpp
bool Scanner::CanInsertPotentialSimpleKey() const { if (!m_simpleKeyAllowed) return false; return !ExistsActiveSimpleKey(); }
O3
cpp
YAML::Scanner::InsertPotentialSimpleKey(): pushq %r15 pushq %r14 pushq %rbx subq $0x90, %rsp cmpb $0x1, 0xd2(%rdi) jne 0x6ae64 movq %rdi, %rbx callq 0x6ac26 testb %al, %al jne 0x6ae64 movq 0x8(%rbx), %rax movq 0x1d8(%rbx), %rcx movq %rcx, %rdx subq 0x1b8(%rbx), %rdx shrq $0x3, %rdx cmpq $0x1, %rcx adcq $-0x1, %rdx movl 0x10(%rbx), %esi shlq $0x7, %rdx movq 0x1c0(%rbx), %rcx movq %rcx, %rdi subq 0x1c8(%rbx), %rdi sarq $0x2, %rdi movq 0x1b0(%rbx), %r8 movq 0x1a0(%rbx), %r9 subq %r9, %r8 sarq $0x2, %r8 addq %rdi, %r8 addq %rdx, %r8 movq %rax, 0x8(%rsp) movl %esi, 0x10(%rsp) movq %r8, 0x18(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) cmpq %r9, %rcx jne 0x6ad75 movq %rbx, %rdi xorl %edx, %edx callq 0x646f0 xorps %xmm0, %xmm0 movq %rax, 0x20(%rsp) testq %rax, %rax je 0x6ad75 movl $0x2, %ecx movl %ecx, 0x8(%rax) movq 0x10(%rax), %rax movq %rax, 0x28(%rsp) movl %ecx, (%rax) leaq 0x80(%rbx), %rdi movq 0x8(%rbx), %rax movl 0x10(%rbx), %ecx movabsq $0xe00000000, %rdx # imm = 0xE00000000 leaq 0x60(%rsp), %r15 movq %rdx, -0x28(%r15) movq %rax, -0x20(%r15) movl %ecx, -0x18(%r15) movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movups %xmm0, 0x10(%r15) movups %xmm0, 0x1c(%r15) leaq 0x38(%rsp), %rsi callq 0x66f9c leaq 0x70(%rsp), %r14 movq %r14, %rdi callq 0x4f6b4 movq -0x20(%r14), %rdi cmpq %r15, %rdi je 0x6ade5 movq 0x60(%rsp), %rsi incq %rsi callq 0x2d2d0 movq 0xb0(%rbx), %rax cmpq 0xb8(%rbx), %rax jne 0x6ae05 movq 0xc8(%rbx), %rcx movl $0x1b8, %eax # imm = 0x1B8 addq -0x8(%rcx), %rax leaq -0x58(%rax), %rcx movq %rcx, 0x30(%rsp) movl $0x2, -0x58(%rax) movq 0x108(%rbx), %rax movq 0x118(%rbx), %rcx addq $-0x30, %rcx cmpq %rcx, %rax je 0x6ae50 movups 0x8(%rsp), %xmm0 movups 0x18(%rsp), %xmm1 movups 0x28(%rsp), %xmm2 movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) addq $0x30, 0x108(%rbx) jmp 0x6ae64 addq $0xd8, %rbx leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x6b09e addq $0x90, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x65918 movq %rbx, %rdi callq 0x2e220
_ZN4YAML7Scanner24InsertPotentialSimpleKeyEv: push r15 push r14 push rbx sub rsp, 90h cmp byte ptr [rdi+0D2h], 1 jnz loc_6AE64 mov rbx, rdi call _ZNK4YAML7Scanner21ExistsActiveSimpleKeyEv; YAML::Scanner::ExistsActiveSimpleKey(void) test al, al jnz loc_6AE64 mov rax, [rbx+8] mov rcx, [rbx+1D8h] mov rdx, rcx sub rdx, [rbx+1B8h] shr rdx, 3 cmp rcx, 1 adc rdx, 0FFFFFFFFFFFFFFFFh mov esi, [rbx+10h] shl rdx, 7 mov rcx, [rbx+1C0h] mov rdi, rcx sub rdi, [rbx+1C8h] sar rdi, 2 mov r8, [rbx+1B0h] mov r9, [rbx+1A0h] sub r8, r9 sar r8, 2 add r8, rdi add r8, rdx mov qword ptr [rsp+0A8h+var_A0], rax mov dword ptr [rsp+0A8h+var_A0+8], esi mov qword ptr [rsp+0A8h+var_90], r8 xorps xmm0, xmm0 movups [rsp+0A8h+var_90+8], xmm0 mov [rsp+0A8h+var_78], 0 cmp rcx, r9 jnz short loc_6AD75 mov rdi, rbx xor edx, edx call _ZN4YAML7Scanner12PushIndentToEiNS0_12IndentMarker11INDENT_TYPEE; YAML::Scanner::PushIndentTo(int,YAML::Scanner::IndentMarker::INDENT_TYPE) xorps xmm0, xmm0 mov qword ptr [rsp+0A8h+var_90+8], rax test rax, rax jz short loc_6AD75 mov ecx, 2 mov [rax+8], ecx mov rax, [rax+10h] mov [rsp+28h], rax mov [rax], ecx loc_6AD75: lea rdi, [rbx+80h] mov rax, [rbx+8] mov ecx, [rbx+10h] mov rdx, 0E00000000h lea r15, [rsp+0A8h+var_48] mov [r15-28h], rdx mov [r15-20h], rax mov [r15-18h], ecx mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 movups xmmword ptr [r15+10h], xmm0 movups xmmword ptr [r15+1Ch], xmm0 lea rsi, [rsp+0A8h+var_70] call _ZNSt5dequeIN4YAML5TokenESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::deque<YAML::Token>::emplace_back<YAML::Token>(YAML::Token &&) lea r14, [rsp+0A8h+var_38] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [r14-20h]; void * cmp rdi, r15 jz short loc_6ADE5 mov rsi, [rsp+0A8h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6ADE5: mov rax, [rbx+0B0h] cmp rax, [rbx+0B8h] jnz short loc_6AE05 mov rcx, [rbx+0C8h] mov eax, 1B8h add rax, [rcx-8] loc_6AE05: lea rcx, [rax-58h] mov [rsp+0A8h+var_78], rcx mov dword ptr [rax-58h], 2 mov rax, [rbx+108h] mov rcx, [rbx+118h] add rcx, 0FFFFFFFFFFFFFFD0h cmp rax, rcx jz short loc_6AE50 movups xmm0, [rsp+0A8h+var_A0] movups xmm1, [rsp+0A8h+var_90] movups xmm2, xmmword ptr [rsp+28h] movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 add qword ptr [rbx+108h], 30h ; '0' jmp short loc_6AE64 loc_6AE50: add rbx, 0D8h lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call _ZNSt5dequeIN4YAML7Scanner9SimpleKeyESaIS2_EE16_M_push_back_auxIJRKS2_EEEvDpOT_; std::deque<YAML::Scanner::SimpleKey>::_M_push_back_aux<YAML::Scanner::SimpleKey const&>(YAML::Scanner::SimpleKey const&) loc_6AE64: add rsp, 90h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_30]; this call _ZN4YAML5TokenD2Ev; YAML::Token::~Token() mov rdi, rbx call __Unwind_Resume
void YAML::Scanner::InsertPotentialSimpleKey(YAML::Scanner *this) { int v1; // esi long long v2; // rcx long long v3; // r9 long long v4; // r8 __int128 v5; // xmm0 long long v6; // rax long long v7; // rax int v8; // ecx long long v9; // rax _OWORD *v10; // rax __int128 v11; // xmm0 __int128 v12; // xmm1 __int128 v13; // [rsp+8h] [rbp-A0h] BYREF __m256i v14; // [rsp+18h] [rbp-90h] BYREF long long v15; // [rsp+38h] [rbp-70h] long long v16; // [rsp+40h] [rbp-68h] int v17; // [rsp+48h] [rbp-60h] long long *v18; // [rsp+50h] [rbp-58h] long long v19; // [rsp+58h] [rbp-50h] long long v20; // [rsp+60h] [rbp-48h] BYREF _OWORD v21[3]; // [rsp+70h] [rbp-38h] BYREF if ( *((_BYTE *)this + 210) == 1 && !YAML::Scanner::ExistsActiveSimpleKey(this) ) { v1 = *((_DWORD *)this + 4); v2 = *((_QWORD *)this + 56); v3 = *((_QWORD *)this + 52); v4 = (((*((_QWORD *)this + 59) == 0LL) + ((*((_QWORD *)this + 59) - *((_QWORD *)this + 55)) >> 3) - 1LL) << 7) + ((v2 - *((_QWORD *)this + 57)) >> 2) + ((*((_QWORD *)this + 54) - v3) >> 2); *(_QWORD *)&v13 = *((_QWORD *)this + 1); DWORD2(v13) = v1; v14.m256i_i64[0] = v4; v5 = 0LL; memset(&v14.m256i_u64[1], 0, 24); if ( v2 == v3 ) { v6 = YAML::Scanner::PushIndentTo(this, v1, 0); v5 = 0LL; v14.m256i_i64[1] = v6; if ( v6 ) { *(_DWORD *)(v6 + 8) = 2; v14.m256i_i64[2] = *(_QWORD *)(v6 + 16); *(_DWORD *)v14.m256i_i64[2] = 2; } } v7 = *((_QWORD *)this + 1); v8 = *((_DWORD *)this + 4); v15 = 0xE00000000LL; v16 = v7; v17 = v8; v18 = &v20; v19 = 0LL; LOBYTE(v20) = 0; v21[0] = v5; *(_OWORD *)((char *)v21 + 12) = v5; std::deque<YAML::Token>::emplace_back<YAML::Token>((_QWORD *)this + 16); std::vector<std::string>::~vector((long long)v21); v9 = *((_QWORD *)this + 22); if ( v9 == *((_QWORD *)this + 23) ) v9 = *(_QWORD *)(*((_QWORD *)this + 25) - 8LL) + 440LL; v14.m256i_i64[3] = v9 - 88; *(_DWORD *)(v9 - 88) = 2; v10 = (_OWORD *)*((_QWORD *)this + 33); if ( v10 == (_OWORD *)(*((_QWORD *)this + 35) - 48LL) ) { std::deque<YAML::Scanner::SimpleKey>::_M_push_back_aux<YAML::Scanner::SimpleKey const&>((char *)this + 216, &v13); } else { v11 = v13; v12 = *(_OWORD *)v14.m256i_i8; v10[2] = *(_OWORD *)&v14.m256i_u64[2]; v10[1] = v12; *v10 = v11; *((_QWORD *)this + 33) += 48LL; } } }
InsertPotentialSimpleKey: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x90 CMP byte ptr [RDI + 0xd2],0x1 JNZ 0x0016ae64 MOV RBX,RDI CALL 0x0016ac26 TEST AL,AL JNZ 0x0016ae64 MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x1d8] MOV RDX,RCX SUB RDX,qword ptr [RBX + 0x1b8] SHR RDX,0x3 CMP RCX,0x1 ADC RDX,-0x1 MOV ESI,dword ptr [RBX + 0x10] SHL RDX,0x7 MOV RCX,qword ptr [RBX + 0x1c0] MOV RDI,RCX SUB RDI,qword ptr [RBX + 0x1c8] SAR RDI,0x2 MOV R8,qword ptr [RBX + 0x1b0] MOV R9,qword ptr [RBX + 0x1a0] SUB R8,R9 SAR R8,0x2 ADD R8,RDI ADD R8,RDX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x10],ESI MOV qword ptr [RSP + 0x18],R8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 CMP RCX,R9 JNZ 0x0016ad75 MOV RDI,RBX XOR EDX,EDX CALL 0x001646f0 XORPS XMM0,XMM0 MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x0016ad75 MOV ECX,0x2 MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV dword ptr [RAX],ECX LAB_0016ad75: LEA RDI,[RBX + 0x80] MOV RAX,qword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x10] MOV RDX,0xe00000000 LEA R15,[RSP + 0x60] MOV qword ptr [R15 + -0x28],RDX MOV qword ptr [R15 + -0x20],RAX MOV dword ptr [R15 + -0x18],ECX MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOVUPS xmmword ptr [R15 + 0x10],XMM0 MOVUPS xmmword ptr [R15 + 0x1c],XMM0 LAB_0016adb8: LEA RSI,[RSP + 0x38] CALL 0x00166f9c LAB_0016adc2: LEA R14,[RSP + 0x70] MOV RDI,R14 CALL 0x0014f6b4 MOV RDI,qword ptr [R14 + -0x20] CMP RDI,R15 JZ 0x0016ade5 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0012d2d0 LAB_0016ade5: MOV RAX,qword ptr [RBX + 0xb0] CMP RAX,qword ptr [RBX + 0xb8] JNZ 0x0016ae05 MOV RCX,qword ptr [RBX + 0xc8] MOV EAX,0x1b8 ADD RAX,qword ptr [RCX + -0x8] LAB_0016ae05: LEA RCX,[RAX + -0x58] MOV qword ptr [RSP + 0x30],RCX MOV dword ptr [RAX + -0x58],0x2 MOV RAX,qword ptr [RBX + 0x108] MOV RCX,qword ptr [RBX + 0x118] ADD RCX,-0x30 CMP RAX,RCX JZ 0x0016ae50 MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS XMM1,xmmword ptr [RSP + 0x18] MOVUPS XMM2,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 ADD qword ptr [RBX + 0x108],0x30 JMP 0x0016ae64 LAB_0016ae50: ADD RBX,0xd8 LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0016b09e LAB_0016ae64: ADD RSP,0x90 POP RBX POP R14 POP R15 RET
/* YAML::Scanner::InsertPotentialSimpleKey() */ void __thiscall YAML::Scanner::InsertPotentialSimpleKey(Scanner *this) { int8 *puVar1; char cVar2; long lVar3; int8 local_a0; int4 uStack_98; int4 uStack_94; long local_90; long lStack_88; int4 *puStack_80; long lStack_78; int8 local_70; int8 local_68; int4 local_60; int1 *local_58; int8 local_50; int1 local_48; int7 uStack_47; int8 local_38; int4 uStack_30; int4 uStack_2c; int4 uStack_28; int8 uStack_24; if (this[0xd2] == (Scanner)0x1) { cVar2 = ExistsActiveSimpleKey(this); if (cVar2 == '\0') { local_a0 = *(int8 *)(this + 8); uStack_98 = *(int4 *)(this + 0x10); local_90 = (*(long *)(this + 0x1b0) - *(long *)(this + 0x1a0) >> 2) + (*(long *)(this + 0x1c0) - *(long *)(this + 0x1c8) >> 2) + ((((ulong)(*(long *)(this + 0x1d8) - *(long *)(this + 0x1b8)) >> 3) - 1) + (ulong)(*(long *)(this + 0x1d8) == 0)) * 0x80; lStack_88 = 0; puStack_80 = (int4 *)0x0; lStack_78 = 0; if (*(long *)(this + 0x1c0) == *(long *)(this + 0x1a0)) { lStack_88 = PushIndentTo(this,uStack_98,0); if (lStack_88 != 0) { *(int4 *)(lStack_88 + 8) = 2; puStack_80 = *(int4 **)(lStack_88 + 0x10); *puStack_80 = 2; } } local_68 = *(int8 *)(this + 8); local_60 = *(int4 *)(this + 0x10); local_70 = 0xe00000000; local_50 = 0; local_48 = 0; local_38 = 0; uStack_30 = 0; uStack_2c = 0; uStack_28 = 0; uStack_24 = 0; /* try { // try from 0016adb8 to 0016adc1 has its CatchHandler @ 0016ae71 */ local_58 = &local_48; std::deque<YAML::Token,std::allocator<YAML::Token>>::emplace_back<YAML::Token> ((deque<YAML::Token,std::allocator<YAML::Token>> *)(this + 0x80),(Token *)&local_70) ; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_38); if (local_58 != &local_48) { operator_delete(local_58,CONCAT71(uStack_47,local_48) + 1); } lVar3 = *(long *)(this + 0xb0); if (lVar3 == *(long *)(this + 0xb8)) { lVar3 = *(long *)(*(long *)(this + 200) + -8) + 0x1b8; } lStack_78 = lVar3 + -0x58; *(int4 *)(lVar3 + -0x58) = 2; puVar1 = *(int8 **)(this + 0x108); if (puVar1 == (int8 *)(*(long *)(this + 0x118) + -0x30)) { std::deque<YAML::Scanner::SimpleKey,std::allocator<YAML::Scanner::SimpleKey>>:: _M_push_back_aux<YAML::Scanner::SimpleKey_const&> ((deque<YAML::Scanner::SimpleKey,std::allocator<YAML::Scanner::SimpleKey>> *) (this + 0xd8),(SimpleKey *)&local_a0); } else { puVar1[4] = puStack_80; puVar1[5] = lStack_78; puVar1[2] = local_90; puVar1[3] = lStack_88; *puVar1 = local_a0; puVar1[1] = CONCAT44(uStack_94,uStack_98); *(long *)(this + 0x108) = *(long *)(this + 0x108) + 0x30; } } } return; }
224
maria_page_crc_check_bitmap
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_crc_check_bitmap(int res, PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; pgcache_page_no_t page_no= args->pageno; MARIA_SHARE *share= (MARIA_SHARE *)args->data; if (res) { return 1; } return (maria_page_crc_check(page, (uint32) page_no, share, MARIA_NO_CRC_BITMAP_PAGE, share->block_size - CRC_SIZE)); }
O0
c
maria_page_crc_check_bitmap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) cmpl $0x0, -0x8(%rbp) je 0x413be movb $0x1, -0x1(%rbp) jmp 0x413ea movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, %eax movl %eax, %esi movq -0x28(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x7bc(%rax), %r8d subl $0x4, %r8d movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE callq 0x41090 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_page_crc_check_bitmap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax cmp [rbp+var_8], 0 jz short loc_413BE mov [rbp+var_1], 1 jmp short loc_413EA loc_413BE: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov eax, eax mov esi, eax mov rdx, [rbp+var_28] mov rax, [rbp+var_28] mov r8d, [rax+7BCh] sub r8d, 4 mov ecx, 0FFFFFFFEh call maria_page_crc_check mov [rbp+var_1], al loc_413EA: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char maria_page_crc_check_bitmap(int a1, long long *a2) { if ( a1 ) return 1; else return maria_page_crc_check(*a2, a2[1], a2[2], -2, *(_DWORD *)(a2[2] + 1980) - 4); }
maria_page_crc_check_bitmap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX CMP dword ptr [RBP + -0x8],0x0 JZ 0x001413be MOV byte ptr [RBP + -0x1],0x1 JMP 0x001413ea LAB_001413be: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,EAX MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RAX + 0x7bc] SUB R8D,0x4 MOV ECX,0xfffffffe CALL 0x00141090 MOV byte ptr [RBP + -0x1],AL LAB_001413ea: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 maria_page_crc_check_bitmap(int param_1,int8 *param_2) { int1 local_9; if (param_1 == 0) { local_9 = maria_page_crc_check (*param_2,param_2[1] & 0xffffffff,param_2[2],0xfffffffe, *(int *)(param_2[2] + 0x7bc) + -4); } else { local_9 = 1; } return local_9; }
225
mysql_change_user
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) { const MARIADB_CHARSET_INFO *s_cs= mysql->charset; char *s_user= mysql->user, *s_passwd= mysql->passwd, *s_db= mysql->db; int rc; if (mysql->options.charset_name) mysql->charset= mysql_find_charset_name(mysql->options.charset_name); else mysql->charset=mysql_find_charset_name(MARIADB_DEFAULT_CHARSET); mysql->user= strdup(user ? user : ""); mysql->passwd= strdup(passwd ? passwd : ""); /* db will be set in run_plugin_auth */ mysql->db= 0; rc= run_plugin_auth(mysql, 0, 0, 0, db); /* COM_CHANGE_USER always releases prepared statements, so we need to invalidate them */ ma_invalidate_stmts(mysql, "mysql_change_user()"); if (rc==0) { free(s_user); free(s_passwd); free(s_db); if (!mysql->db && db && !(mysql->db= strdup(db))) { SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); rc= 1; } } else { free(mysql->user); free(mysql->passwd); free(mysql->db); mysql->user= s_user; mysql->passwd= s_passwd; mysql->db= s_db; mysql->charset= s_cs; } return(rc); }
O0
c
mysql_change_user: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x2b8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0x2e8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x3f8(%rax) je 0x1dca2 movq -0x8(%rbp), %rax movq 0x3f8(%rax), %rdi callq 0x43db0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2f0(%rax) jmp 0x1dcbc leaq 0x2df37(%rip), %rdi # 0x4bbe0 callq 0x43db0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2f0(%rax) cmpq $0x0, -0x10(%rbp) je 0x1dccd movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1dcda leaq 0x2d9c7(%rip), %rax # 0x4b69b movq %rax, -0x50(%rbp) jmp 0x1dcda movq -0x50(%rbp), %rdi callq 0x137a0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2b8(%rax) cmpq $0x0, -0x18(%rbp) je 0x1dd02 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x1dd0f leaq 0x2d992(%rip), %rax # 0x4b69b movq %rax, -0x58(%rbp) jmp 0x1dd0f movq -0x58(%rbp), %rdi callq 0x137a0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2c0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2e8(%rax) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %r8 xorl %eax, %eax movl %eax, %ecx xorl %edx, %edx movq %rcx, %rsi callq 0x3f6f0 movl %eax, -0x44(%rbp) movq -0x8(%rbp), %rdi leaq 0x2df32(%rip), %rsi # 0x4bc8b callq 0x1da40 cmpl $0x0, -0x44(%rbp) jne 0x1de28 movq -0x30(%rbp), %rdi callq 0x13520 movq -0x38(%rbp), %rdi callq 0x13520 movq -0x40(%rbp), %rdi callq 0x13520 movq -0x8(%rbp), %rax cmpq $0x0, 0x2e8(%rax) jne 0x1de26 cmpq $0x0, -0x20(%rbp) je 0x1de26 movq -0x20(%rbp), %rdi callq 0x137a0 movq -0x8(%rbp), %rcx movq %rax, 0x2e8(%rcx) cmpq $0x0, %rax jne 0x1de26 jmp 0x1ddbc movq -0x8(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x8(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x42104(%rip), %rax # 0x5fee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x8(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x8(%rbp), %rdi addq $0x97, %rdi leaq 0x420ea(%rip), %rax # 0x5fef0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x8(%rbp), %rax movb $0x0, 0x296(%rax) movl $0x1, -0x44(%rbp) jmp 0x1de94 movq -0x8(%rbp), %rax movq 0x2b8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2e8(%rax), %rdi callq 0x13520 movq -0x30(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2b8(%rax) movq -0x38(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2c0(%rax) movq -0x40(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2e8(%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x2f0(%rax) movl -0x44(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
mysql_change_user: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rax, [rax+2B8h] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+2C0h] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov rax, [rax+2E8h] mov [rbp+var_40], rax mov rax, [rbp+var_8] cmp qword ptr [rax+3F8h], 0 jz short loc_1DCA2 mov rax, [rbp+var_8] mov rdi, [rax+3F8h] call mysql_find_charset_name mov rcx, rax mov rax, [rbp+var_8] mov [rax+2F0h], rcx jmp short loc_1DCBC loc_1DCA2: lea rdi, aUtf8mb4; "utf8mb4" call mysql_find_charset_name mov rcx, rax mov rax, [rbp+var_8] mov [rax+2F0h], rcx loc_1DCBC: cmp [rbp+var_10], 0 jz short loc_1DCCD mov rax, [rbp+var_10] mov [rbp+var_50], rax jmp short loc_1DCDA loc_1DCCD: lea rax, aExecuteTestWit+29h; "" mov [rbp+var_50], rax jmp short $+2 loc_1DCDA: mov rdi, [rbp+var_50] call _strdup mov rcx, rax mov rax, [rbp+var_8] mov [rax+2B8h], rcx cmp [rbp+var_18], 0 jz short loc_1DD02 mov rax, [rbp+var_18] mov [rbp+var_58], rax jmp short loc_1DD0F loc_1DD02: lea rax, aExecuteTestWit+29h; "" mov [rbp+var_58], rax jmp short $+2 loc_1DD0F: mov rdi, [rbp+var_58] call _strdup mov rcx, rax mov rax, [rbp+var_8] mov [rax+2C0h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+2E8h], 0 mov rdi, [rbp+var_8] mov r8, [rbp+var_20] xor eax, eax mov ecx, eax xor edx, edx mov rsi, rcx call run_plugin_auth mov [rbp+var_44], eax mov rdi, [rbp+var_8] lea rsi, aMysqlChangeUse; "mysql_change_user()" call ma_invalidate_stmts cmp [rbp+var_44], 0 jnz loc_1DE28 mov rdi, [rbp+var_30] call _free mov rdi, [rbp+var_38] call _free mov rdi, [rbp+var_40] call _free mov rax, [rbp+var_8] cmp qword ptr [rax+2E8h], 0 jnz loc_1DE26 cmp [rbp+var_20], 0 jz loc_1DE26 mov rdi, [rbp+var_20] call _strdup mov rcx, [rbp+var_8] mov [rcx+2E8h], rax cmp rax, 0 jnz short loc_1DE26 jmp short $+2 loc_1DDBC: mov rax, [rbp+var_8] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_8] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_8] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_8] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_8] mov byte ptr [rax+296h], 0 mov [rbp+var_44], 1 loc_1DE26: jmp short loc_1DE94 loc_1DE28: mov rax, [rbp+var_8] mov rdi, [rax+2B8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2E8h] call _free mov rcx, [rbp+var_30] mov rax, [rbp+var_8] mov [rax+2B8h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_8] mov [rax+2C0h], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_8] mov [rax+2E8h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+2F0h], rcx loc_1DE94: mov eax, [rbp+var_44] add rsp, 60h pop rbp retn
long long mysql_change_user(long long a1, long long a2, long long a3, long long a4) { long long charset_name; // rcx long long v5; // rax long long v6; // rax long long v7; // rax unsigned int v9; // [rsp+1Ch] [rbp-44h] long long v10; // [rsp+20h] [rbp-40h] long long v11; // [rsp+28h] [rbp-38h] long long v12; // [rsp+30h] [rbp-30h] long long v13; // [rsp+38h] [rbp-28h] v13 = *(_QWORD *)(a1 + 752); v12 = *(_QWORD *)(a1 + 696); v11 = *(_QWORD *)(a1 + 704); v10 = *(_QWORD *)(a1 + 744); if ( *(_QWORD *)(a1 + 1016) ) charset_name = mysql_find_charset_name(*(_QWORD *)(a1 + 1016)); else charset_name = mysql_find_charset_name("utf8mb4"); *(_QWORD *)(a1 + 752) = charset_name; if ( a2 ) v5 = strdup(a2); else v5 = strdup(""); *(_QWORD *)(a1 + 696) = v5; if ( a3 ) v6 = strdup(a3); else v6 = strdup(""); *(_QWORD *)(a1 + 704) = v6; *(_QWORD *)(a1 + 744) = 0LL; v9 = run_plugin_auth(a1, 0LL, 0LL, 0LL, a4); ma_invalidate_stmts(a1, (long long)"mysql_change_user()"); if ( v9 ) { free(*(_QWORD *)(a1 + 696)); free(*(_QWORD *)(a1 + 704)); free(*(_QWORD *)(a1 + 744)); *(_QWORD *)(a1 + 696) = v12; *(_QWORD *)(a1 + 704) = v11; *(_QWORD *)(a1 + 744) = v10; *(_QWORD *)(a1 + 752) = v13; } else { free(v12); free(v11); free(v10); if ( !*(_QWORD *)(a1 + 744) ) { if ( a4 ) { v7 = strdup(a4); *(_QWORD *)(a1 + 744) = v7; if ( !v7 ) { *(_DWORD *)(a1 + 144) = 2008; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[8], 511LL); *(_BYTE *)(a1 + 662) = 0; return 1; } } } } return v9; }
mysql_change_user: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2b8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2c0] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2e8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x3f8],0x0 JZ 0x0011dca2 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x3f8] CALL 0x00143db0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2f0],RCX JMP 0x0011dcbc LAB_0011dca2: LEA RDI,[0x14bbe0] CALL 0x00143db0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2f0],RCX LAB_0011dcbc: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011dccd MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011dcda LAB_0011dccd: LEA RAX,[0x14b69b] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011dcda LAB_0011dcda: MOV RDI,qword ptr [RBP + -0x50] CALL 0x001137a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],RCX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0011dd02 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX JMP 0x0011dd0f LAB_0011dd02: LEA RAX,[0x14b69b] MOV qword ptr [RBP + -0x58],RAX JMP 0x0011dd0f LAB_0011dd0f: MOV RDI,qword ptr [RBP + -0x58] CALL 0x001137a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV R8,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,EAX XOR EDX,EDX MOV RSI,RCX CALL 0x0013f6f0 MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x14bc8b] CALL 0x0011da40 CMP dword ptr [RBP + -0x44],0x0 JNZ 0x0011de28 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00113520 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00113520 MOV RDI,qword ptr [RBP + -0x40] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x2e8],0x0 JNZ 0x0011de26 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0011de26 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001137a0 MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX + 0x2e8],RAX CMP RAX,0x0 JNZ 0x0011de26 JMP 0x0011ddbc LAB_0011ddbc: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x297 LEA RAX,[0x15fee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x97 LEA RAX,[0x15fef0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x296],0x0 MOV dword ptr [RBP + -0x44],0x1 LAB_0011de26: JMP 0x0011de94 LAB_0011de28: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2e8] CALL 0x00113520 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2f0],RCX LAB_0011de94: MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x60 POP RBP RET
int mysql_change_user(long param_1,char *param_2,char *param_3,char *param_4) { int8 uVar1; void *__ptr; void *__ptr_00; void *__ptr_01; int8 uVar2; char *pcVar3; char *local_60; char *local_58; int local_4c; uVar1 = *(int8 *)(param_1 + 0x2f0); __ptr = *(void **)(param_1 + 0x2b8); __ptr_00 = *(void **)(param_1 + 0x2c0); __ptr_01 = *(void **)(param_1 + 0x2e8); if (*(long *)(param_1 + 0x3f8) == 0) { uVar2 = mysql_find_charset_name("utf8mb4"); *(int8 *)(param_1 + 0x2f0) = uVar2; } else { uVar2 = mysql_find_charset_name(*(int8 *)(param_1 + 0x3f8)); *(int8 *)(param_1 + 0x2f0) = uVar2; } local_58 = param_2; if (param_2 == (char *)0x0) { local_58 = ""; } pcVar3 = strdup(local_58); *(char **)(param_1 + 0x2b8) = pcVar3; local_60 = param_3; if (param_3 == (char *)0x0) { local_60 = ""; } pcVar3 = strdup(local_60); *(char **)(param_1 + 0x2c0) = pcVar3; *(int8 *)(param_1 + 0x2e8) = 0; local_4c = run_plugin_auth(param_1,0,0,0,param_4); ma_invalidate_stmts(param_1,"mysql_change_user()"); if (local_4c == 0) { free(__ptr); free(__ptr_00); free(__ptr_01); if ((*(long *)(param_1 + 0x2e8) == 0) && (param_4 != (char *)0x0)) { pcVar3 = strdup(param_4); *(char **)(param_1 + 0x2e8) = pcVar3; if (pcVar3 == (char *)0x0) { *(int4 *)(param_1 + 0x90) = 0x7d8; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_0015ff30,0x1ff); *(int1 *)(param_1 + 0x296) = 0; local_4c = 1; } } } else { free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); *(void **)(param_1 + 0x2b8) = __ptr; *(void **)(param_1 + 0x2c0) = __ptr_00; *(void **)(param_1 + 0x2e8) = __ptr_01; *(int8 *)(param_1 + 0x2f0) = uVar1; } return local_4c; }
226
getopt_ull_limit_value
eloqsql/mysys/my_getopt.c
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, my_bool *fix) { my_bool adjusted= FALSE; ulonglong old= num; char buf1[255], buf2[255]; DBUG_ENTER("getopt_ull_limit_value"); if ((ulonglong) num > (ulonglong) optp->max_value && optp->max_value) /* if max value is not set -> no upper limit */ { num= (ulonglong) optp->max_value; adjusted= TRUE; } switch ((optp->var_type & GET_TYPE_MASK)) { case GET_UINT: if (num > (ulonglong) UINT_MAX) { num= ((ulonglong) UINT_MAX); adjusted= TRUE; } break; case GET_ULONG: #if SIZEOF_LONG < SIZEOF_LONG_LONG if (num > (ulonglong) ULONG_MAX) { num= ((ulonglong) ULONG_MAX); adjusted= TRUE; } #endif break; default: DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL); break; } if (optp->block_size > 1) { num/= (ulonglong) optp->block_size; num*= (ulonglong) optp->block_size; } if (num < (ulonglong) optp->min_value) { num= (ulonglong) optp->min_value; if (old < (ulonglong) optp->min_value) adjusted= TRUE; } if (fix) *fix= old != num; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': unsigned value %s adjusted to %s", optp->name, ullstr(old, buf1), ullstr(num, buf2)); DBUG_RETURN(num); }
O0
c
getopt_ull_limit_value: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movb $0x0, -0x229(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x50(%rcx), %rax jbe 0x346fd movq -0x220(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x346fd movq -0x220(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x218(%rbp) movb $0x1, -0x229(%rbp) movq -0x220(%rbp), %rax movq 0x30(%rax), %rax andl $0x3f, %eax movq %rax, -0x240(%rbp) subq $0x4, %rax je 0x34729 jmp 0x3471a movq -0x240(%rbp), %rax subq $0x6, %rax je 0x3474c jmp 0x3474e movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x218(%rbp) jbe 0x3474a movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x218(%rbp) movb $0x1, -0x229(%rbp) jmp 0x34754 jmp 0x34754 jmp 0x34750 jmp 0x34752 jmp 0x34754 movq -0x220(%rbp), %rax cmpq $0x1, 0x60(%rax) jle 0x3479a movq -0x220(%rbp), %rax movq 0x60(%rax), %rcx movq -0x218(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x218(%rbp) movq -0x220(%rbp), %rax movq 0x60(%rax), %rax imulq -0x218(%rbp), %rax movq %rax, -0x218(%rbp) movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x347dd movq -0x220(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x218(%rbp) movq -0x238(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x347db movb $0x1, -0x229(%rbp) jmp 0x347dd cmpq $0x0, -0x228(%rbp) je 0x3480d movq -0x238(%rbp), %rax cmpq -0x218(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x228(%rbp), %rax movb %cl, (%rax) jmp 0x34890 cmpb $0x0, -0x229(%rbp) je 0x3488e leaq 0x1acad3(%rip), %rax # 0x1e12f0 movq (%rax), %rax movq %rax, -0x248(%rbp) movq -0x220(%rbp), %rax movq (%rax), %rax movq %rax, -0x258(%rbp) movq -0x238(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x83710 movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x83710 movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq -0x248(%rbp), %r9 movq %rax, %r8 movl $0x1, %edi leaq 0x550b8(%rip), %rsi # 0x89941 movb $0x0, %al callq *%r9 jmp 0x34890 jmp 0x34892 movq -0x218(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x348c2 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x25380 nopw (%rax,%rax)
getopt_ull_limit_value: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_229], 0 mov rax, [rbp+var_218] mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+50h] jbe short loc_346FD mov rax, [rbp+var_220] cmp qword ptr [rax+50h], 0 jz short loc_346FD mov rax, [rbp+var_220] mov rax, [rax+50h] mov [rbp+var_218], rax mov [rbp+var_229], 1 loc_346FD: mov rax, [rbp+var_220] mov rax, [rax+30h] and eax, 3Fh mov [rbp+var_240], rax sub rax, 4 jz short loc_34729 jmp short $+2 loc_3471A: mov rax, [rbp+var_240] sub rax, 6 jz short loc_3474C jmp short loc_3474E loc_34729: mov eax, 0FFFFFFFFh cmp [rbp+var_218], rax jbe short loc_3474A mov eax, 0FFFFFFFFh mov [rbp+var_218], rax mov [rbp+var_229], 1 loc_3474A: jmp short loc_34754 loc_3474C: jmp short loc_34754 loc_3474E: jmp short $+2 loc_34750: jmp short $+2 loc_34752: jmp short $+2 loc_34754: mov rax, [rbp+var_220] cmp qword ptr [rax+60h], 1 jle short loc_3479A mov rax, [rbp+var_220] mov rcx, [rax+60h] mov rax, [rbp+var_218] xor edx, edx div rcx mov [rbp+var_218], rax mov rax, [rbp+var_220] mov rax, [rax+60h] imul rax, [rbp+var_218] mov [rbp+var_218], rax loc_3479A: mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jnb short loc_347DD mov rax, [rbp+var_220] mov rax, [rax+48h] mov [rbp+var_218], rax mov rax, [rbp+var_238] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jnb short loc_347DB mov [rbp+var_229], 1 loc_347DB: jmp short $+2 loc_347DD: cmp [rbp+var_228], 0 jz short loc_3480D mov rax, [rbp+var_238] cmp rax, [rbp+var_218] setnz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_228] mov [rax], cl jmp loc_34890 loc_3480D: cmp [rbp+var_229], 0 jz short loc_3488E lea rax, my_getopt_error_reporter mov rax, [rax] mov [rbp+var_248], rax mov rax, [rbp+var_220] mov rax, [rax] mov [rbp+var_258], rax mov rdi, [rbp+var_238] lea rsi, [rbp+var_110] call ullstr mov [rbp+var_250], rax mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call ullstr mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r9, [rbp+var_248] mov r8, rax mov edi, 1 lea rsi, aOptionSUnsigne; "option '%s': unsigned value %s adjusted"... mov al, 0 call r9 loc_3488E: jmp short $+2 loc_34890: jmp short $+2 loc_34892: mov rax, [rbp+var_218] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_348C2 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_348C2: call ___stack_chk_fail
unsigned long long getopt_ull_limit_value(unsigned long long a1, long long a2, bool *a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-258h] const char *v6; // [rsp+10h] [rbp-250h] long long (*v7)(int, long long, ...); // [rsp+18h] [rbp-248h] char v8; // [rsp+37h] [rbp-229h] unsigned long long v9; // [rsp+48h] [rbp-218h] _BYTE v10[256]; // [rsp+50h] [rbp-210h] BYREF _BYTE v11[264]; // [rsp+150h] [rbp-110h] BYREF unsigned long long v12; // [rsp+258h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = a1; v8 = 0; if ( a1 > *(_QWORD *)(a2 + 80) && *(_QWORD *)(a2 + 80) ) { v9 = *(_QWORD *)(a2 + 80); v8 = 1; } if ( (*(_QWORD *)(a2 + 48) & 0x3FLL) == 4 && v9 > 0xFFFFFFFF ) { v9 = 0xFFFFFFFFLL; v8 = 1; } if ( *(long long *)(a2 + 96) > 1 ) v9 = v9 / *(_QWORD *)(a2 + 96) * *(_QWORD *)(a2 + 96); if ( v9 < *(_QWORD *)(a2 + 72) ) { v9 = *(_QWORD *)(a2 + 72); if ( a1 < v9 ) v8 = 1; } if ( a3 ) { *a3 = a1 != v9; } else if ( v8 ) { v7 = my_getopt_error_reporter; v5 = *(const char **)a2; v6 = (const char *)ullstr(a1, v11); v3 = (const char *)ullstr(v9, v10); v7(1, (long long)"option '%s': unsigned value %s adjusted to %s", v5, v6, v3); } return v9; }
getopt_ull_limit_value: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV byte ptr [RBP + -0x229],0x0 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x50] JBE 0x001346fd MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001346fd MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x218],RAX MOV byte ptr [RBP + -0x229],0x1 LAB_001346fd: MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x30] AND EAX,0x3f MOV qword ptr [RBP + -0x240],RAX SUB RAX,0x4 JZ 0x00134729 JMP 0x0013471a LAB_0013471a: MOV RAX,qword ptr [RBP + -0x240] SUB RAX,0x6 JZ 0x0013474c JMP 0x0013474e LAB_00134729: MOV EAX,0xffffffff CMP qword ptr [RBP + -0x218],RAX JBE 0x0013474a MOV EAX,0xffffffff MOV qword ptr [RBP + -0x218],RAX MOV byte ptr [RBP + -0x229],0x1 LAB_0013474a: JMP 0x00134754 LAB_0013474c: JMP 0x00134754 LAB_0013474e: JMP 0x00134750 LAB_00134750: JMP 0x00134752 LAB_00134752: JMP 0x00134754 LAB_00134754: MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x60],0x1 JLE 0x0013479a MOV RAX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RAX + 0x60] MOV RAX,qword ptr [RBP + -0x218] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x60] IMUL RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x218],RAX LAB_0013479a: MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JNC 0x001347dd MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x238] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JNC 0x001347db MOV byte ptr [RBP + -0x229],0x1 LAB_001347db: JMP 0x001347dd LAB_001347dd: CMP qword ptr [RBP + -0x228],0x0 JZ 0x0013480d MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x218] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x228] MOV byte ptr [RAX],CL JMP 0x00134890 LAB_0013480d: CMP byte ptr [RBP + -0x229],0x0 JZ 0x0013488e LEA RAX,[0x2e12f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x248],RAX MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x258],RAX MOV RDI,qword ptr [RBP + -0x238] LEA RSI,[RBP + -0x110] CALL 0x00183710 MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x00183710 MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R9,qword ptr [RBP + -0x248] MOV R8,RAX MOV EDI,0x1 LEA RSI,[0x189941] MOV AL,0x0 CALL R9 LAB_0013488e: JMP 0x00134890 LAB_00134890: JMP 0x00134892 LAB_00134892: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001348c2 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_001348c2: CALL 0x00125380
ulong getopt_ull_limit_value(ulong param_1,int8 *param_2,ulong param_3) { int8 uVar1; bool bVar2; int *puVar3; int8 uVar4; int8 uVar5; ulong uVar6; long in_FS_OFFSET; ulong local_220; int1 local_218 [256]; int1 local_118 [264]; long local_10; puVar3 = my_getopt_error_reporter; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; local_220 = param_1; if (((ulong)param_2[10] < param_1) && (param_2[10] != 0)) { local_220 = param_2[10]; bVar2 = true; } if ((((uint)param_2[6] & 0x3f) == 4) && (0xffffffff < local_220)) { local_220 = 0xffffffff; bVar2 = true; } uVar6 = param_3; if (1 < (long)param_2[0xc]) { uVar6 = local_220 % (ulong)param_2[0xc]; local_220 = param_2[0xc] * (local_220 / (ulong)param_2[0xc]); } if ((local_220 < (ulong)param_2[9]) && (local_220 = param_2[9], param_1 < (ulong)param_2[9])) { bVar2 = true; } if (param_3 == 0) { if (bVar2) { uVar1 = *param_2; uVar4 = ullstr(param_1,local_118,uVar6); uVar5 = ullstr(local_220,local_218); (*(code *)puVar3)(1,"option \'%s\': unsigned value %s adjusted to %s",uVar1,uVar4,uVar5); } } else { *(bool *)param_3 = param_1 != local_220; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
227
protocol::encode(protocol::EntityTransform const&, unsigned int)
untodesu[P]voxelius/game/shared/protocol.cc
ENetPacket *protocol::encode(const protocol::EntityTransform &packet, enet_uint32 flags) { write_buffer.reset(); write_buffer.write_UI16(protocol::EntityTransform::ID); write_buffer.write_UI64(static_cast<std::uint64_t>(packet.entity)); write_buffer.write_I32(packet.chunk.x); write_buffer.write_I32(packet.chunk.y); write_buffer.write_I32(packet.chunk.z); write_buffer.write_FP32(packet.local.x); write_buffer.write_FP32(packet.local.y); write_buffer.write_FP32(packet.local.z); write_buffer.write_FP32(packet.angles.x); write_buffer.write_FP32(packet.angles.y); write_buffer.write_FP32(packet.angles.z); return write_buffer.to_packet(flags); }
O1
cpp
protocol::encode(protocol::EntityTransform const&, unsigned int): pushq %r15 pushq %r14 pushq %rbx movl %esi, %ebx movq %rdi, %r15 leaq 0x1e5337(%rip), %r14 # 0x260960 movq %r14, %rdi callq 0x12ed02 movq %r14, %rdi movl $0x6, %esi callq 0x12ed2a movl 0x10(%r15), %esi movq %r14, %rdi callq 0x12edbe movl 0x14(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x18(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x1c(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x20(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x24(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x28(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x2c(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x30(%r15), %esi movq %r14, %rdi callq 0x12ed60 movl 0x34(%r15), %esi movq %r14, %rdi callq 0x12ed60 movq %r14, %rdi movl %ebx, %esi popq %rbx popq %r14 popq %r15 jmp 0x12ef3a
_ZN8protocol6encodeERKNS_15EntityTransformEj: push r15 push r14 push rbx mov ebx, esi mov r15, rdi lea r14, _ZL12write_buffer; write_buffer mov rdi, r14; this call _ZN11WriteBuffer5resetEv; WriteBuffer::reset(void) mov rdi, r14; this mov esi, 6; unsigned __int16 call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort) mov esi, [r15+10h]; unsigned __int64 mov rdi, r14; this call _ZN11WriteBuffer10write_UI64Em; WriteBuffer::write_UI64(ulong) mov esi, [r15+14h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+18h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+1Ch]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+20h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+24h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+28h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+2Ch]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+30h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov esi, [r15+34h]; unsigned int mov rdi, r14; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov rdi, r14; this mov esi, ebx; unsigned int pop rbx pop r14 pop r15 jmp _ZNK11WriteBuffer9to_packetEj; WriteBuffer::to_packet(uint)
long long protocol::encode(protocol *this, const protocol::EntityTransform *a2) { WriteBuffer::reset((WriteBuffer *)&write_buffer); WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, 6u); WriteBuffer::write_UI64((WriteBuffer *)&write_buffer, *((unsigned int *)this + 4)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 5)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 6)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 7)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 8)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 9)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 10)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 11)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 12)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 13)); return WriteBuffer::to_packet((WriteBuffer *)&write_buffer, (unsigned int)a2); }
encode: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ESI MOV R15,RDI LEA R14,[0x360960] MOV RDI,R14 CALL 0x0022ed02 MOV RDI,R14 MOV ESI,0x6 CALL 0x0022ed2a MOV ESI,dword ptr [R15 + 0x10] MOV RDI,R14 CALL 0x0022edbe MOV ESI,dword ptr [R15 + 0x14] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x18] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x1c] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x20] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x24] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x28] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x2c] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x30] MOV RDI,R14 CALL 0x0022ed60 MOV ESI,dword ptr [R15 + 0x34] MOV RDI,R14 CALL 0x0022ed60 MOV RDI,R14 MOV ESI,EBX POP RBX POP R14 POP R15 JMP 0x0022ef3a
/* protocol::encode(protocol::EntityTransform const&, unsigned int) */ void protocol::encode(EntityTransform *param_1,uint param_2) { WriteBuffer::reset((WriteBuffer *)write_buffer); WriteBuffer::write_UI16(0x960); WriteBuffer::write_UI64((WriteBuffer *)write_buffer,(ulong)*(uint *)(param_1 + 0x10)); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::write_UI32(0x360960); WriteBuffer::to_packet((WriteBuffer *)write_buffer,param_2); return; }
228
my_strnncollsp_latin1_de
eloqsql/strings/ctype-latin1.c
static int my_strnncollsp_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *a_end= a + a_length, *b_end= b + b_length; uchar a_char, a_extend= 0, b_char, b_extend= 0; while ((a < a_end || a_extend) && (b < b_end || b_extend)) { if (a_extend) { a_char=a_extend; a_extend= 0; } else { a_extend= combo2map[*a]; a_char= combo1map[*a++]; } if (b_extend) { b_char= b_extend; b_extend= 0; } else { b_extend= combo2map[*b]; b_char= combo1map[*b++]; } if (a_char != b_char) return (int) a_char - (int) b_char; } /* Check if double character last */ if (a_extend) return 1; if (b_extend) return -1; if (a < a_end) return my_strnncollsp_padspace_bin(a, a_end - a); if (b < b_end) return -my_strnncollsp_padspace_bin(b, b_end - b); return 0; }
O0
c
my_strnncollsp_latin1_de: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movb $0x0, -0x42(%rbp) movb $0x0, -0x44(%rbp) movq -0x18(%rbp), %rax cmpq -0x38(%rbp), %rax jb 0x9de14 movzbl -0x42(%rbp), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x45(%rbp) je 0x9de36 movq -0x28(%rbp), %rcx movb $0x1, %al cmpq -0x40(%rbp), %rcx movb %al, -0x46(%rbp) jb 0x9de30 movzbl -0x44(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x46(%rbp) movb -0x46(%rbp), %al movb %al, -0x45(%rbp) movb -0x45(%rbp), %al testb $0x1, %al jne 0x9de42 jmp 0x9def4 cmpb $0x0, -0x42(%rbp) je 0x9de54 movb -0x42(%rbp), %al movb %al, -0x41(%rbp) movb $0x0, -0x42(%rbp) jmp 0x9de8b movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x109c3c(%rip), %rax # 0x1a7aa0 movb (%rax,%rcx), %al movb %al, -0x42(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0x109b1b(%rip), %rax # 0x1a79a0 movb (%rax,%rcx), %al movb %al, -0x41(%rbp) cmpb $0x0, -0x44(%rbp) je 0x9de9d movb -0x44(%rbp), %al movb %al, -0x43(%rbp) movb $0x0, -0x44(%rbp) jmp 0x9ded4 movq -0x28(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x109bf3(%rip), %rax # 0x1a7aa0 movb (%rax,%rcx), %al movb %al, -0x44(%rbp) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0x109ad2(%rip), %rax # 0x1a79a0 movb (%rax,%rcx), %al movb %al, -0x43(%rbp) movzbl -0x41(%rbp), %eax movzbl -0x43(%rbp), %ecx cmpl %ecx, %eax je 0x9deef movzbl -0x41(%rbp), %eax movzbl -0x43(%rbp), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x9df65 jmp 0x9ddfc cmpb $0x0, -0x42(%rbp) je 0x9df03 movl $0x1, -0x4(%rbp) jmp 0x9df65 cmpb $0x0, -0x44(%rbp) je 0x9df12 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9df65 movq -0x18(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x9df35 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x18(%rbp), %rax subq %rax, %rsi callq 0x949c0 movl %eax, -0x4(%rbp) jmp 0x9df65 movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x9df5e movq -0x28(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x28(%rbp), %rax subq %rax, %rsi callq 0x949c0 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x9df65 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
my_strnncollsp_latin1_de: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_40], rax mov [rbp+var_42], 0 mov [rbp+var_44], 0 loc_9DDFC: mov rax, [rbp+var_18] cmp rax, [rbp+var_38] jb short loc_9DE14 movzx ecx, [rbp+var_42] xor eax, eax cmp ecx, 0 mov [rbp+var_45], al jz short loc_9DE36 loc_9DE14: mov rcx, [rbp+var_28] mov al, 1 cmp rcx, [rbp+var_40] mov [rbp+var_46], al jb short loc_9DE30 movzx eax, [rbp+var_44] cmp eax, 0 setnz al mov [rbp+var_46], al loc_9DE30: mov al, [rbp+var_46] mov [rbp+var_45], al loc_9DE36: mov al, [rbp+var_45] test al, 1 jnz short loc_9DE42 jmp loc_9DEF4 loc_9DE42: cmp [rbp+var_42], 0 jz short loc_9DE54 mov al, [rbp+var_42] mov [rbp+var_41], al mov [rbp+var_42], 0 jmp short loc_9DE8B loc_9DE54: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_42], al mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_41], al loc_9DE8B: cmp [rbp+var_44], 0 jz short loc_9DE9D mov al, [rbp+var_44] mov [rbp+var_43], al mov [rbp+var_44], 0 jmp short loc_9DED4 loc_9DE9D: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_44], al mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_43], al loc_9DED4: movzx eax, [rbp+var_41] movzx ecx, [rbp+var_43] cmp eax, ecx jz short loc_9DEEF movzx eax, [rbp+var_41] movzx ecx, [rbp+var_43] sub eax, ecx mov [rbp+var_4], eax jmp short loc_9DF65 loc_9DEEF: jmp loc_9DDFC loc_9DEF4: cmp [rbp+var_42], 0 jz short loc_9DF03 mov [rbp+var_4], 1 jmp short loc_9DF65 loc_9DF03: cmp [rbp+var_44], 0 jz short loc_9DF12 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9DF65 loc_9DF12: mov rax, [rbp+var_18] cmp rax, [rbp+var_38] jnb short loc_9DF35 mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] mov rax, [rbp+var_18] sub rsi, rax call my_strnncollsp_padspace_bin mov [rbp+var_4], eax jmp short loc_9DF65 loc_9DF35: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] jnb short loc_9DF5E mov rdi, [rbp+var_28] mov rsi, [rbp+var_40] mov rax, [rbp+var_28] sub rsi, rax call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_4], eax jmp short loc_9DF65 loc_9DF5E: mov [rbp+var_4], 0 loc_9DF65: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_strnncollsp_latin1_de( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rax bool v8; // [rsp+Ah] [rbp-46h] bool v9; // [rsp+Bh] [rbp-45h] unsigned __int8 v10; // [rsp+Ch] [rbp-44h] unsigned __int8 v11; // [rsp+Dh] [rbp-43h] unsigned __int8 v12; // [rsp+Eh] [rbp-42h] unsigned __int8 v13; // [rsp+Fh] [rbp-41h] unsigned long long v14; // [rsp+10h] [rbp-40h] unsigned long long v15; // [rsp+18h] [rbp-38h] unsigned __int8 *v16; // [rsp+28h] [rbp-28h] unsigned __int8 *v17; // [rsp+38h] [rbp-18h] v17 = a2; v16 = a4; v15 = (unsigned long long)&a2[a3]; v14 = (unsigned long long)&a4[a5]; v12 = 0; v10 = 0; while ( 1 ) { if ( (unsigned long long)v17 < v15 || (v9 = 0, v12) ) { v8 = 1; if ( (unsigned long long)v16 >= v14 ) v8 = v10 != 0; v9 = v8; } if ( !v9 ) break; if ( v12 ) { v13 = v12; v12 = 0; } else { v12 = combo2map[*v17]; v5 = v17++; v13 = combo1map[*v5]; } if ( v10 ) { v11 = v10; v10 = 0; } else { v10 = combo2map[*v16]; v6 = v16++; v11 = combo1map[*v6]; } if ( v13 != v11 ) return (unsigned int)(v13 - v11); } if ( v12 ) { return 1; } else if ( v10 ) { return (unsigned int)-1; } else if ( (unsigned long long)v17 >= v15 ) { if ( (unsigned long long)v16 >= v14 ) return 0; else return (unsigned int)-(int)my_strnncollsp_padspace_bin(v16, v14 - (_QWORD)v16); } else { return (unsigned int)my_strnncollsp_padspace_bin(v17, v15 - (_QWORD)v17); } }
my_strnncollsp_latin1_de: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV byte ptr [RBP + -0x42],0x0 MOV byte ptr [RBP + -0x44],0x0 LAB_0019ddfc: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x38] JC 0x0019de14 MOVZX ECX,byte ptr [RBP + -0x42] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x45],AL JZ 0x0019de36 LAB_0019de14: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x46],AL JC 0x0019de30 MOVZX EAX,byte ptr [RBP + -0x44] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x46],AL LAB_0019de30: MOV AL,byte ptr [RBP + -0x46] MOV byte ptr [RBP + -0x45],AL LAB_0019de36: MOV AL,byte ptr [RBP + -0x45] TEST AL,0x1 JNZ 0x0019de42 JMP 0x0019def4 LAB_0019de42: CMP byte ptr [RBP + -0x42],0x0 JZ 0x0019de54 MOV AL,byte ptr [RBP + -0x42] MOV byte ptr [RBP + -0x41],AL MOV byte ptr [RBP + -0x42],0x0 JMP 0x0019de8b LAB_0019de54: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x2a7aa0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x42],AL MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x2a79a0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x41],AL LAB_0019de8b: CMP byte ptr [RBP + -0x44],0x0 JZ 0x0019de9d MOV AL,byte ptr [RBP + -0x44] MOV byte ptr [RBP + -0x43],AL MOV byte ptr [RBP + -0x44],0x0 JMP 0x0019ded4 LAB_0019de9d: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x2a7aa0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x44],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x2a79a0] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x43],AL LAB_0019ded4: MOVZX EAX,byte ptr [RBP + -0x41] MOVZX ECX,byte ptr [RBP + -0x43] CMP EAX,ECX JZ 0x0019deef MOVZX EAX,byte ptr [RBP + -0x41] MOVZX ECX,byte ptr [RBP + -0x43] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0019df65 LAB_0019deef: JMP 0x0019ddfc LAB_0019def4: CMP byte ptr [RBP + -0x42],0x0 JZ 0x0019df03 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019df65 LAB_0019df03: CMP byte ptr [RBP + -0x44],0x0 JZ 0x0019df12 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019df65 LAB_0019df12: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0019df35 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] SUB RSI,RAX CALL 0x001949c0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019df65 LAB_0019df35: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0019df5e MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] SUB RSI,RAX CALL 0x001949c0 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0019df65 LAB_0019df5e: MOV dword ptr [RBP + -0x4],0x0 LAB_0019df65: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int my_strnncollsp_latin1_de (int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5) { int iVar1; byte *pbVar2; byte *pbVar3; bool local_4e; byte local_4c; byte local_4b; byte local_4a; byte local_49; byte *local_30; byte *local_20; pbVar2 = param_2 + param_3; pbVar3 = param_4 + param_5; local_4a = 0; local_4c = 0; local_30 = param_4; local_20 = param_2; while( true ) { if ((local_20 < pbVar2) || (local_4e = false, local_4a != 0)) { local_4e = local_30 < pbVar3 || local_4c != 0; } if (!local_4e) break; if (local_4a == 0) { local_4a = combo2map[*local_20]; local_49 = combo1map[*local_20]; local_20 = local_20 + 1; } else { local_49 = local_4a; local_4a = 0; } if (local_4c == 0) { local_4c = combo2map[*local_30]; local_4b = combo1map[*local_30]; local_30 = local_30 + 1; } else { local_4b = local_4c; local_4c = 0; } if (local_49 != local_4b) { return (uint)local_49 - (uint)local_4b; } } if (local_4a != 0) { return 1; } if (local_4c != 0) { return -1; } if (local_20 < pbVar2) { iVar1 = my_strnncollsp_padspace_bin(local_20,(long)pbVar2 - (long)local_20); return iVar1; } if (local_30 < pbVar3) { iVar1 = my_strnncollsp_padspace_bin(local_30,(long)pbVar3 - (long)local_30); return -iVar1; } return 0; }
229
cursor_by_thread_connect_attr::rnd_next()
eloqsql/storage/perfschema/cursor_by_thread_connect_attr.cc
int cursor_by_thread_connect_attr::rnd_next(void) { PFS_thread *thread; bool has_more_thread= true; for (m_pos.set_at(&m_next_pos); has_more_thread; m_pos.next_thread()) { thread= global_thread_container.get(m_pos.m_index_1, & has_more_thread); if (thread != NULL) { make_row(thread, m_pos.m_index_2); if (m_row_exists) { m_next_pos.set_after(&m_pos); return 0; } } } return HA_ERR_END_OF_FILE; }
O0
cpp
cursor_by_thread_connect_attr::rnd_next(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x28(%rbp) movb $0x1, -0x19(%rbp) movq %rsi, %rdi addq $0x28, %rdi addq $0x30, %rsi callq 0xcdc480 testb $0x1, -0x19(%rbp) je 0xd0e71b movq -0x28(%rbp), %rax movl 0x28(%rax), %esi leaq 0x11393a4(%rip), %rdi # 0x1e47a60 leaq -0x19(%rbp), %rdx callq 0xcdd6f0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xd0e70a movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi movl 0x2c(%rdi), %edx movq (%rdi), %rax callq *0x48(%rax) movq -0x28(%rbp), %rax testb $0x1, 0x24(%rax) je 0xd0e708 movq -0x28(%rbp), %rsi movq %rsi, %rdi addq $0x30, %rdi addq $0x28, %rsi callq 0xcdc5a0 movl $0x0, -0x4(%rbp) jmp 0xd0e722 jmp 0xd0e70a jmp 0xd0e70c movq -0x28(%rbp), %rdi addq $0x28, %rdi callq 0xd0e800 jmp 0xd0e6a8 movl $0x89, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN29cursor_by_thread_connect_attr8rnd_nextEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rsi, [rbp+var_10] mov [rbp+var_28], rsi mov [rbp+var_19], 1 mov rdi, rsi add rdi, 28h ; '(' add rsi, 30h ; '0' call _ZN16PFS_double_index6set_atEPKS_; PFS_double_index::set_at(PFS_double_index const*) loc_D0E6A8: test [rbp+var_19], 1 jz short loc_D0E71B mov rax, [rbp+var_28] mov esi, [rax+28h] lea rdi, global_thread_container lea rdx, [rbp+var_19] call _ZN29PFS_buffer_scalable_containerI10PFS_threadLi256ELi256E16PFS_thread_array20PFS_thread_allocatorE3getEjPb; PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::get(uint,bool *) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_D0E70A mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] mov edx, [rdi+2Ch] mov rax, [rdi] call qword ptr [rax+48h] mov rax, [rbp+var_28] test byte ptr [rax+24h], 1 jz short loc_D0E708 mov rsi, [rbp+var_28] mov rdi, rsi add rdi, 30h ; '0' add rsi, 28h ; '(' call _ZN16PFS_double_index9set_afterEPKS_; PFS_double_index::set_after(PFS_double_index const*) mov [rbp+var_4], 0 jmp short loc_D0E722 loc_D0E708: jmp short $+2 loc_D0E70A: jmp short $+2 loc_D0E70C: mov rdi, [rbp+var_28] add rdi, 28h ; '('; this call _ZN34pos_connect_attr_by_thread_by_attr11next_threadEv; pos_connect_attr_by_thread_by_attr::next_thread(void) jmp short loc_D0E6A8 loc_D0E71B: mov [rbp+var_4], 89h loc_D0E722: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long cursor_by_thread_connect_attr::rnd_next(cursor_by_thread_connect_attr *this) { char v2; // [rsp+17h] [rbp-19h] BYREF long long v3; // [rsp+18h] [rbp-18h] cursor_by_thread_connect_attr *v4; // [rsp+20h] [rbp-10h] v4 = this; v2 = 1; PFS_double_index::set_at( (cursor_by_thread_connect_attr *)((char *)this + 40), (cursor_by_thread_connect_attr *)((char *)this + 48)); while ( (v2 & 1) != 0 ) { v3 = PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::get( (long long)&global_thread_container, (unsigned int *)*((unsigned int *)this + 10), &v2); if ( v3 ) { (*(void ( **)(cursor_by_thread_connect_attr *, long long, _QWORD))(*(_QWORD *)this + 72LL))( this, v3, *((unsigned int *)this + 11)); if ( (*((_BYTE *)this + 36) & 1) != 0 ) { PFS_double_index::set_after( (cursor_by_thread_connect_attr *)((char *)this + 48), (cursor_by_thread_connect_attr *)((char *)this + 40)); return 0; } } pos_connect_attr_by_thread_by_attr::next_thread((cursor_by_thread_connect_attr *)((char *)this + 40)); } return 137; }
inline_mysql_mutex_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00d0e6bb LEA RAX,[0x14feec0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x40] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 LAB_00d0e6bb: MOV RDI,qword ptr [RBP + -0x8] CALL 0x005332b0 ADD RSP,0x10 POP RBP RET
void inline_mysql_mutex_destroy(pthread_mutex_t *param_1) { if (*(long *)((long)param_1 + 0x40) != 0) { (**(code **)(PSI_server + 0x48))(*(int8 *)((long)param_1 + 0x40)); *(int8 *)((long)param_1 + 0x40) = 0; } pthread_mutex_destroy(param_1); return; }
230
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"); } }
O3
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx pushq %rax cmpl $0xa, %esi ja 0xf373b movq %rdi, %rbx movl %esi, %eax leaq 0x27557(%rip), %rcx # 0x11ab6c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x28578(%rip), %rsi # 0x11bba4 leaq 0x2857d(%rip), %rdx # 0x11bbb0 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2858a(%rip), %rsi # 0x11bbd0 leaq 0x2859f(%rip), %rdx # 0x11bbec jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x285d5(%rip), %rsi # 0x11bc35 leaq 0x285da(%rip), %rdx # 0x11bc41 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2853f(%rip), %rsi # 0x11bbb9 leaq 0x28544(%rip), %rdx # 0x11bbc5 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x28532(%rip), %rsi # 0x11bbc6 leaq 0x28534(%rip), %rdx # 0x11bbcf jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2855b(%rip), %rsi # 0x11bc09 leaq 0x28564(%rip), %rdx # 0x11bc19 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x284ec(%rip), %rsi # 0x11bbb1 leaq 0x284ec(%rip), %rdx # 0x11bbb8 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x28511(%rip), %rsi # 0x11bbed leaq 0x28515(%rip), %rdx # 0x11bbf8 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x28506(%rip), %rsi # 0x11bbf9 leaq 0x2850e(%rip), %rdx # 0x11bc08 jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x28538(%rip), %rsi # 0x11bc42 leaq 0x2853c(%rip), %rdx # 0x11bc4d jmp 0xf3728 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x284f9(%rip), %rsi # 0x11bc1a leaq 0x2850c(%rip), %rdx # 0x11bc34 movq %rbx, %rdi callq 0x26926 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x1d5b0 movq %rax, %rbx leaq 0x284ff(%rip), %rsi # 0x11bc4e movq %rax, %rdi callq 0x1d410 movq 0x6288a(%rip), %rsi # 0x155fe8 movq 0x627f3(%rip), %rdx # 0x155f58 movq %rbx, %rdi callq 0x1e5b0 movq %rax, %r14 movq %rbx, %rdi callq 0x1d8c0 movq %r14, %rdi callq 0x1e660
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx push rax cmp esi, 0Ah; switch 11 cases ja def_F361C; jumptable 00000000000F361C default case mov rbx, rdi mov eax, esi lea rcx, jpt_F361C movsxd rax, ds:(jpt_F361C - 11AB6Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F361E: lea rax, [rbx+10h]; jumptable 00000000000F361C case 0 mov [rbx], rax lea rsi, aContentOnly; "Content-only" lea rdx, aContentOnly+0Ch; "" jmp loc_F3728 loc_F3638: lea rax, [rbx+10h]; jumptable 00000000000F361C case 4 mov [rbx], rax lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools" lea rdx, aLlama3XWithBui+1Ch; "" jmp loc_F3728 loc_F3652: lea rax, [rbx+10h]; jumptable 00000000000F361C case 9 mov [rbx], rax lea rsi, aHermes2Pro; "Hermes 2 Pro" lea rdx, aHermes2Pro+0Ch; "" jmp loc_F3728 loc_F366C: lea rax, [rbx+10h]; jumptable 00000000000F361C case 2 mov [rbx], rax lea rsi, aMistralNemo; "Mistral Nemo" lea rdx, aMistralNemo+0Ch; "" jmp loc_F3728 loc_F3686: lea rax, [rbx+10h]; jumptable 00000000000F361C case 3 mov [rbx], rax lea rsi, aLlama3X; "Llama 3.x" lea rdx, aLlama3X+9; "" jmp loc_F3728 loc_F36A0: lea rax, [rbx+10h]; jumptable 00000000000F361C case 7 mov [rbx], rax lea rsi, aFunctionaryV32; "Functionary v3.2" lea rdx, aFunctionaryV32+10h; "" jmp short loc_F3728 loc_F36B7: lea rax, [rbx+10h]; jumptable 00000000000F361C case 1 mov [rbx], rax lea rsi, aGeneric; "Generic" lea rdx, aGeneric+7; "" jmp short loc_F3728 loc_F36CE: lea rax, [rbx+10h]; jumptable 00000000000F361C case 5 mov [rbx], rax lea rsi, aDeepseekR1; "DeepSeek R1" lea rdx, aDeepseekR1+0Bh; "" jmp short loc_F3728 loc_F36E5: lea rax, [rbx+10h]; jumptable 00000000000F361C case 6 mov [rbx], rax lea rsi, aFirefunctionV2; "FireFunction v2" lea rdx, aFirefunctionV2+0Fh; "" jmp short loc_F3728 loc_F36FC: lea rax, [rbx+10h]; jumptable 00000000000F361C case 10 mov [rbx], rax lea rsi, aCommandR7b; "Command R7B" lea rdx, aCommandR7b+0Bh; "" jmp short loc_F3728 loc_F3713: lea rax, [rbx+10h]; jumptable 00000000000F361C case 8 mov [rbx], rax lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1" lea rdx, aFunctionaryV31+1Ah; "" loc_F3728: 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 add rsp, 8 pop rbx pop r14 retn def_F361C: mov edi, 10h; jumptable 00000000000F361C default case 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:_ZTISt19_Sp_make_shared_tag; 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) { char *v2; // rsi char *v3; // rdx std::runtime_error *exception; // rbx switch ( a2 ) { case 0: *a1 = a1 + 2; v2 = "Content-only"; v3 = ""; break; case 1: *a1 = a1 + 2; v2 = "Generic"; v3 = ""; break; case 2: *a1 = a1 + 2; v2 = "Mistral Nemo"; v3 = ""; break; case 3: *a1 = a1 + 2; v2 = "Llama 3.x"; v3 = ""; break; case 4: *a1 = a1 + 2; v2 = "Llama 3.x with builtin tools"; v3 = ""; break; case 5: *a1 = a1 + 2; v2 = "DeepSeek R1"; v3 = ""; break; case 6: *a1 = a1 + 2; v2 = "FireFunction v2"; v3 = ""; break; case 7: *a1 = a1 + 2; v2 = "Functionary v3.2"; v3 = ""; break; case 8: *a1 = a1 + 2; v2 = "Functionary v3.1 Llama 3.1"; v3 = ""; break; case 9: *a1 = a1 + 2; v2 = "Hermes 2 Pro"; v3 = ""; break; case 10: *a1 = a1 + 2; v2 = "Command R7B"; v3 = ""; 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::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX CMP ESI,0xa JA 0x001f373b MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x21ab6c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bba4] LEA RDX,[0x21bbb0] JMP 0x001f3728 caseD_4: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbd0] LEA RDX,[0x21bbec] JMP 0x001f3728 caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bc35] LEA RDX,[0x21bc41] JMP 0x001f3728 caseD_2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbb9] LEA RDX,[0x21bbc5] JMP 0x001f3728 caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbc6] LEA RDX,[0x21bbcf] JMP 0x001f3728 caseD_7: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bc09] LEA RDX,[0x21bc19] JMP 0x001f3728 caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbb1] LEA RDX,[0x21bbb8] JMP 0x001f3728 caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbed] LEA RDX,[0x21bbf8] JMP 0x001f3728 caseD_6: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bbf9] LEA RDX,[0x21bc08] JMP 0x001f3728 caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bc42] LEA RDX,[0x21bc4d] JMP 0x001f3728 caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x21bc1a] LEA RDX,[0x21bc34] LAB_001f3728: MOV RDI,RBX CALL 0x00126926 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET default: MOV EDI,0x10 CALL 0x0011d5b0 MOV RBX,RAX LAB_001f3748: LEA RSI,[0x21bc4e] MOV RDI,RAX CALL 0x0011d410 LAB_001f3757: MOV RSI,qword ptr [0x00255fe8] MOV RDX,qword ptr [0x00255f58] MOV RDI,RBX CALL 0x0011e5b0
/* common_chat_format_name[abi:cxx11](common_chat_format) */ long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2) { runtime_error *this; char *pcVar1; char *pcVar2; switch(param_2) { case 0: *param_1 = (long)(param_1 + 2); pcVar2 = "Content-only"; pcVar1 = ""; break; case 1: *param_1 = (long)(param_1 + 2); pcVar2 = "Generic"; pcVar1 = ""; break; case 2: *param_1 = (long)(param_1 + 2); pcVar2 = "Mistral Nemo"; pcVar1 = ""; break; case 3: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x"; pcVar1 = ""; break; case 4: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x with builtin tools"; pcVar1 = ""; break; case 5: *param_1 = (long)(param_1 + 2); pcVar2 = "DeepSeek R1"; pcVar1 = ""; break; case 6: *param_1 = (long)(param_1 + 2); pcVar2 = "FireFunction v2"; pcVar1 = ""; break; case 7: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.2"; pcVar1 = ""; break; case 8: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.1 Llama 3.1"; pcVar1 = ""; break; case 9: *param_1 = (long)(param_1 + 2); pcVar2 = "Hermes 2 Pro"; pcVar1 = ""; break; case 10: *param_1 = (long)(param_1 + 2); pcVar2 = "Command R7B"; pcVar1 = ""; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f3748 to 001f3756 has its CatchHandler @ 001f376d */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58); } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
231
string_buffer_concat_value_free
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_concat_value_free(StringBuffer *s, JSValue v) { JSString *p; int res; if (s->error_status) { /* prevent exception overload */ JS_FreeValue(s->ctx, v); return -1; } if (unlikely(JS_VALUE_GET_TAG(v) != JS_TAG_STRING)) { v = JS_ToStringFree(s->ctx, v); if (JS_IsException(v)) return string_buffer_set_error(s); } p = JS_VALUE_GET_STRING(v); res = string_buffer_concat(s, p, 0, p->len); JS_FreeValue(s->ctx, v); return res; }
O1
c
string_buffer_concat_value_free: pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) cmpl $0x0, 0x1c(%rdi) je 0x4b8e5 movq (%rbx), %rax movq 0x18(%rax), %rdi movq %r14, %rdx callq 0x1d8c6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x4b91a cmpl $-0x7, %r14d jne 0x4b923 movq 0x8(%rsp), %rsi movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andl 0x4(%rsi), %ecx movq %rbx, %rdi xorl %edx, %edx callq 0x420b9 movl %eax, %ebp movq (%rbx), %rax movq 0x8(%rsp), %rsi movq 0x18(%rax), %rdi movq %r14, %rdx callq 0x1d8c6 movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movq (%rbx), %rdi movq %r14, %rdx callq 0x34584 movq %rdx, %r14 movq %rax, 0x8(%rsp) cmpl $0x6, %r14d jne 0x4b8eb movq (%rbx), %rdi movq 0x8(%rbx), %rsi callq 0x1cb99 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) movl $0xffffffff, 0x1c(%rbx) # imm = 0xFFFFFFFF jmp 0x4b8de
string_buffer_concat_value_free: push rbp push r14 push rbx sub rsp, 10h mov r14, rdx mov rbx, rdi mov [rsp+28h+var_20], rsi cmp dword ptr [rdi+1Ch], 0 jz short loc_4B8E5 mov rax, [rbx] mov rdi, [rax+18h] mov rdx, r14 call JS_FreeValueRT loc_4B8DE: mov eax, 0FFFFFFFFh jmp short loc_4B91A loc_4B8E5: cmp r14d, 0FFFFFFF9h jnz short loc_4B923 loc_4B8EB: mov rsi, [rsp+28h+var_20] mov ecx, 7FFFFFFFh and ecx, [rsi+4] mov rdi, rbx xor edx, edx call string_buffer_concat mov ebp, eax mov rax, [rbx] mov rsi, [rsp+28h+var_20] mov rdi, [rax+18h] mov rdx, r14 call JS_FreeValueRT mov eax, ebp loc_4B91A: add rsp, 10h pop rbx pop r14 pop rbp retn loc_4B923: mov rdi, [rbx] mov rdx, r14 call JS_ToStringFree mov r14, rdx mov [rsp+28h+var_20], rax cmp r14d, 6 jnz short loc_4B8EB mov rdi, [rbx] mov rsi, [rbx+8] call js_free xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 mov dword ptr [rbx+1Ch], 0FFFFFFFFh jmp short loc_4B8DE
long long string_buffer_concat_value_free( long long *a1, _DWORD *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // r14 unsigned int v16; // ebp unsigned long long v17; // rax long long v18; // rdx _DWORD *v19; // [rsp+8h] [rbp-20h] v14 = a3; v19 = a2; if ( *((_DWORD *)a1 + 7) ) { JS_FreeValueRT(*(_QWORD *)(*a1 + 24), a2, a3); return 0xFFFFFFFFLL; } if ( (_DWORD)a3 != -7 ) { v17 = JS_ToStringFree(*a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); v14 = v18; v19 = (_DWORD *)v17; if ( (_DWORD)v18 == 6 ) { js_free(*a1, a1[1]); *(_OWORD *)(a1 + 1) = 0LL; *((_DWORD *)a1 + 7) = -1; return 0xFFFFFFFFLL; } } v16 = string_buffer_concat((long long)a1, (long long)v19, 0, v19[1] & 0x7FFFFFFF); JS_FreeValueRT(*(_QWORD *)(*a1 + 24), v19, v14); return v16; }
string_buffer_concat_value_free: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI CMP dword ptr [RDI + 0x1c],0x0 JZ 0x0014b8e5 MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x18] MOV RDX,R14 CALL 0x0011d8c6 LAB_0014b8de: MOV EAX,0xffffffff JMP 0x0014b91a LAB_0014b8e5: CMP R14D,-0x7 JNZ 0x0014b923 LAB_0014b8eb: MOV RSI,qword ptr [RSP + 0x8] MOV ECX,0x7fffffff AND ECX,dword ptr [RSI + 0x4] MOV RDI,RBX XOR EDX,EDX CALL 0x001420b9 MOV EBP,EAX MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x18] MOV RDX,R14 CALL 0x0011d8c6 MOV EAX,EBP LAB_0014b91a: ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_0014b923: MOV RDI,qword ptr [RBX] MOV RDX,R14 CALL 0x00134584 MOV R14,RDX MOV qword ptr [RSP + 0x8],RAX CMP R14D,0x6 JNZ 0x0014b8eb MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x8] CALL 0x0011cb99 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV dword ptr [RBX + 0x1c],0xffffffff JMP 0x0014b8de
int4 string_buffer_concat_value_free(long *param_1,int8 param_2,int8 param_3) { int4 uVar1; int1 auVar2 [16]; long local_20; auVar2._8_8_ = param_3; auVar2._0_8_ = param_2; if (*(int *)((long)param_1 + 0x1c) == 0) { if ((int)param_3 != -7) { auVar2 = JS_ToStringFree(*param_1,param_2,param_3); if (auVar2._8_4_ == 6) { js_free(*param_1,param_1[1]); param_1[1] = 0; param_1[2] = 0; *(int4 *)((long)param_1 + 0x1c) = 0xffffffff; goto LAB_0014b8de; } } local_20 = auVar2._0_8_; uVar1 = string_buffer_concat(param_1,local_20,0,*(uint *)(local_20 + 4) & 0x7fffffff); JS_FreeValueRT(*(int8 *)(*param_1 + 0x18),local_20,auVar2._8_8_); } else { JS_FreeValueRT(*(int8 *)(*param_1 + 0x18),param_2,param_3); LAB_0014b8de: uVar1 = 0xffffffff; } return uVar1; }
232
ggml_easy::ctx::log_impl(ggml_log_level, char const*, __va_list_tag*)
ngxson[P]ggml-easy/ggml-easy.h
void log_impl(ggml_log_level level, const char * format, va_list args) { va_list args_copy; va_copy(args_copy, args); char buffer[128]; int len = vsnprintf(buffer, 128, format, args); if (len < 128) { log_cb(level, buffer, &log_level); } else { char * buffer2 = new char[len + 1]; vsnprintf(buffer2, len + 1, format, args_copy); buffer2[len] = 0; log_cb(level, buffer2, &log_level); delete[] buffer2; } va_end(args_copy); }
O3
c
ggml_easy::ctx::log_impl(ggml_log_level, char const*, __va_list_tag*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq 0x10(%rcx), %rax movq %rax, 0x10(%rsp) movups (%rcx), %xmm0 movaps %xmm0, (%rsp) leaq 0x20(%rsp), %rdi movl $0x80, %esi callq 0x3220 cmpl $0x7f, %eax jg 0x6238 leaq 0x20(%rsp), %rsi movl %ebp, %edi movq %rbx, %rdx callq 0x376c jmp 0x6279 movl %eax, %r15d leal 0x1(%r15), %r12d movq %r12, %rdi callq 0x3030 movq %rax, %r13 movq %rsp, %rcx movq %rax, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x3220 movl %r15d, %eax movb $0x0, (%r13,%rax) movl %ebp, %edi movq %r13, %rsi movq %rbx, %rdx callq 0x376c movq %r13, %rdi callq 0x33c0 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN9ggml_easy3ctx8log_implE14ggml_log_levelPKcP13__va_list_tag: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rdx mov ebp, esi mov rbx, rdi mov rax, [rcx+10h] mov [rsp+0D8h+var_C8], rax movups xmm0, xmmword ptr [rcx] movaps [rsp+0D8h+var_D8], xmm0 lea rdi, [rsp+0D8h+var_B8] mov esi, 80h call _vsnprintf cmp eax, 7Fh jg short loc_6238 lea rsi, [rsp+0D8h+var_B8] mov edi, ebp mov rdx, rbx call _ZN9ggml_easy6log_cbE14ggml_log_levelPKcPv; ggml_easy::log_cb(ggml_log_level,char const*,void *) jmp short loc_6279 loc_6238: mov r15d, eax lea r12d, [r15+1] mov rdi, r12; unsigned __int64 call __Znam; operator new[](ulong) mov r13, rax mov rcx, rsp mov rdi, rax mov rsi, r12 mov rdx, r14 call _vsnprintf mov eax, r15d mov byte ptr [r13+rax+0], 0 mov edi, ebp mov rsi, r13 mov rdx, rbx call _ZN9ggml_easy6log_cbE14ggml_log_levelPKcPv; ggml_easy::log_cb(ggml_log_level,char const*,void *) mov rdi, r13; void * call __ZdaPv; operator delete[](void *) loc_6279: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void ggml_easy::ctx::log_impl(_DWORD *a1, int a2, long long a3, __int128 *a4) { int v5; // eax unsigned int v6; // r15d unsigned long long v7; // r12 _BYTE *v8; // r13 __int128 v9; // [rsp+0h] [rbp-D8h] BYREF long long v10; // [rsp+10h] [rbp-C8h] _BYTE v11[184]; // [rsp+20h] [rbp-B8h] BYREF v10 = *((_QWORD *)a4 + 2); v9 = *a4; v5 = vsnprintf(v11, 128LL, a3, a4); if ( v5 > 127 ) { v6 = v5; v7 = (unsigned int)(v5 + 1); v8 = (_BYTE *)operator new[](v7); vsnprintf(v8, v7, a3, &v9); v8[v6] = 0; ggml_easy::log_cb(a2, (long long)v8, a1); operator delete[](v8); } else { ggml_easy::log_cb(a2, (long long)v11, a1); } }
log_impl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI MOV RAX,qword ptr [RCX + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RCX] MOVAPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x20] MOV ESI,0x80 CALL 0x00103220 CMP EAX,0x7f JG 0x00106238 LEA RSI,[RSP + 0x20] MOV EDI,EBP MOV RDX,RBX CALL 0x0010376c JMP 0x00106279 LAB_00106238: MOV R15D,EAX LEA R12D,[R15 + 0x1] MOV RDI,R12 CALL 0x00103030 MOV R13,RAX MOV RCX,RSP MOV RDI,RAX MOV RSI,R12 MOV RDX,R14 CALL 0x00103220 MOV EAX,R15D MOV byte ptr [R13 + RAX*0x1],0x0 MOV EDI,EBP MOV RSI,R13 MOV RDX,RBX CALL 0x0010376c MOV RDI,R13 CALL 0x001033c0 LAB_00106279: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ggml_easy::ctx::log_impl(ggml_log_level, char const*, __va_list_tag*) */ void __thiscall ggml_easy::ctx::log_impl(ctx *this,int4 param_2,char *param_3,int8 *param_4) { uint uVar1; char *__s; int8 local_d8; int8 uStack_d0; int8 local_c8; char local_b8 [136]; local_c8 = param_4[2]; local_d8 = *param_4; uStack_d0 = param_4[1]; uVar1 = vsnprintf(local_b8,0x80,param_3,param_4); if ((int)uVar1 < 0x80) { log_cb(param_2,local_b8,this); } else { __s = (char *)operator_new__((ulong)(uVar1 + 1)); vsnprintf(__s,(ulong)(uVar1 + 1),param_3,&local_d8); __s[uVar1] = '\0'; log_cb(param_2,__s,this); operator_delete__(__s); } return; }
233
my_coll_rule_shift_at_level
eloqsql/strings/ctype-uca.c
static void my_coll_rule_shift_at_level(MY_COLL_RULE *r, int level) { switch (level) { case 4: /* Quaternary difference */ r->diff[3]++; break; case 3: /* Tertiary difference */ r->diff[2]++; r->diff[3]= 0; break; case 2: /* Secondary difference */ r->diff[1]++; r->diff[2]= r->diff[3]= 0; break; case 1: /* Primary difference */ r->diff[0]++; r->diff[1]= r->diff[2]= r->diff[3]= 0; break; case 0: /* Do nothing for '=': use the previous offsets for all levels */ break; default: DBUG_ASSERT(0); } }
O0
c
my_coll_rule_shift_at_level: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x4, %rax ja 0x4e36d movq -0x18(%rbp), %rax leaq 0xf27f9(%rip), %rcx # 0x140ab0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x8(%rbp), %rax movl 0x8c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8c(%rax) jmp 0x4e373 movq -0x8(%rbp), %rax movl 0x88(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) jmp 0x4e373 movq -0x8(%rbp), %rax movl 0x84(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x84(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) jmp 0x4e373 movq -0x8(%rbp), %rax movl 0x80(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x80(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x84(%rax) jmp 0x4e373 jmp 0x4e373 jmp 0x4e36f jmp 0x4e371 jmp 0x4e373 popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_rule_shift_at_level: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 4; switch 5 cases ja def_4E2BE; jumptable 000000000004E2BE default case mov rax, [rbp+var_18] lea rcx, jpt_4E2BE movsxd rax, ds:(jpt_4E2BE - 140AB0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4E2C0: mov rax, [rbp+var_8]; jumptable 000000000004E2BE case 4 mov ecx, [rax+8Ch] add ecx, 1 mov [rax+8Ch], ecx jmp loc_4E373 loc_4E2D8: mov rax, [rbp+var_8]; jumptable 000000000004E2BE case 3 mov ecx, [rax+88h] add ecx, 1 mov [rax+88h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 jmp short loc_4E373 loc_4E2FB: mov rax, [rbp+var_8]; jumptable 000000000004E2BE case 2 mov ecx, [rax+84h] add ecx, 1 mov [rax+84h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 jmp short loc_4E373 loc_4E32C: mov rax, [rbp+var_8]; jumptable 000000000004E2BE case 1 mov ecx, [rax+80h] add ecx, 1 mov [rax+80h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+84h], 0 jmp short loc_4E373 loc_4E36B: jmp short loc_4E373; jumptable 000000000004E2BE case 0 def_4E2BE: jmp short $+2; jumptable 000000000004E2BE default case loc_4E36F: jmp short $+2 loc_4E371: jmp short $+2 loc_4E373: pop rbp retn
unsigned long long my_coll_rule_shift_at_level(_DWORD *a1, unsigned int a2) { unsigned long long result; // rax result = a2; switch ( a2 ) { case 1u: ++a1[32]; a1[35] = 0; a1[34] = 0; result = (unsigned long long)a1; a1[33] = 0; break; case 2u: ++a1[33]; a1[35] = 0; result = (unsigned long long)a1; a1[34] = 0; break; case 3u: ++a1[34]; result = (unsigned long long)a1; a1[35] = 0; break; case 4u: result = (unsigned long long)a1; ++a1[35]; break; default: return result; } return result; }
my_coll_rule_shift_at_level: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x4 JA 0x0014e36d MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x240ab0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_4: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8c] ADD ECX,0x1 MOV dword ptr [RAX + 0x8c],ECX JMP 0x0014e373 caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x88] ADD ECX,0x1 MOV dword ptr [RAX + 0x88],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 JMP 0x0014e373 caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x84] ADD ECX,0x1 MOV dword ptr [RAX + 0x84],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 JMP 0x0014e373 caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x80] ADD ECX,0x1 MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x84],0x0 JMP 0x0014e373 caseD_0: JMP 0x0014e373 LAB_0014e36d: JMP 0x0014e36f LAB_0014e36f: JMP 0x0014e371 LAB_0014e371: JMP 0x0014e373 default: POP RBP RET
void my_coll_rule_shift_at_level(long param_1,int4 param_2) { switch(param_2) { case 0: break; case 1: *(int *)(param_1 + 0x80) = *(int *)(param_1 + 0x80) + 1; *(int4 *)(param_1 + 0x8c) = 0; *(int4 *)(param_1 + 0x88) = 0; *(int4 *)(param_1 + 0x84) = 0; break; case 2: *(int *)(param_1 + 0x84) = *(int *)(param_1 + 0x84) + 1; *(int4 *)(param_1 + 0x8c) = 0; *(int4 *)(param_1 + 0x88) = 0; break; case 3: *(int *)(param_1 + 0x88) = *(int *)(param_1 + 0x88) + 1; *(int4 *)(param_1 + 0x8c) = 0; break; case 4: *(int *)(param_1 + 0x8c) = *(int *)(param_1 + 0x8c) + 1; } return; }
234
google::protobuf::UInt32Value::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc
const char* UInt32Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // uint32 value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; default: goto handle_unusual; } // switch handle_unusual: if ((tag == 0) || ((tag & 7) == 4)) { CHK_(ptr); ctx->SetLastTag(tag); goto message_done; } ptr = UnknownFieldParse( tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O0
cpp
google::protobuf::UInt32Value::_InternalParse(char const*, google::protobuf::internal::ParseContext*): subq $0x58, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x3b6ab0 xorb $-0x1, %al testb $0x1, %al jne 0x463917 jmp 0x463a4f movq 0x28(%rsp), %rdi leaq 0x1c(%rsp), %rsi xorl %edx, %edx callq 0x3b6ae0 movq %rax, 0x28(%rsp) movl 0x1c(%rsp), %eax shrl $0x3, %eax subl $0x1, %eax jne 0x463977 jmp 0x46393b movl 0x1c(%rsp), %eax movzbl %al, %eax cmpl $0x8, %eax jne 0x463973 leaq 0x28(%rsp), %rdi callq 0x3b6be0 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, 0x10(%rax) cmpq $0x0, 0x28(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x46396c jmp 0x463971 jmp 0x463a5b jmp 0x463975 jmp 0x463979 jmp 0x4638fd jmp 0x463979 cmpl $0x0, 0x1c(%rsp) je 0x46398c movl 0x1c(%rsp), %eax andl $0x7, %eax cmpl $0x4, %eax jne 0x4639b5 cmpq $0x0, 0x28(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x46399d jmp 0x4639a2 jmp 0x463a5b movq 0x20(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0x3b6c90 jmp 0x463a51 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq %rcx, (%rsp) addq $0x8, %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x463a0b movq 0x8(%rsp), %rdi callq 0x3b8270 addq $0x8, %rax movq %rax, 0x40(%rsp) jmp 0x463a1a movq 0x8(%rsp), %rdi callq 0x3b8700 movq %rax, 0x40(%rsp) movq (%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x43bdb0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x463a48 jmp 0x463a4a jmp 0x463a5b jmp 0x4638fd jmp 0x463a51 movq 0x28(%rsp), %rax addq $0x58, %rsp retq movq $0x0, 0x28(%rsp) jmp 0x463a51 nopw %cs:(%rax,%rax)
_ZN6google8protobuf11UInt32Value14_InternalParseEPKcPNS0_8internal12ParseContextE: sub rsp, 58h mov [rsp+58h+var_28], rdi; int mov [rsp+58h+var_30], rsi mov [rsp+58h+var_3C+4], rdx; int mov rax, [rsp+58h+var_28] mov [rsp+58h+var_48], rax; void * loc_4638FD: mov rdi, [rsp+58h+var_3C+4]; this lea rsi, [rsp+58h+var_30]; char ** call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**) xor al, 0FFh test al, 1 jnz short loc_463917 jmp loc_463A4F loc_463917: mov rdi, [rsp+58h+var_30]; this lea rsi, [rsp+58h+var_3C]; char ** xor edx, edx; unsigned int * call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint) mov [rsp+58h+var_30], rax; int mov eax, dword ptr [rsp+58h+var_3C] shr eax, 3 sub eax, 1 jnz short loc_463977 jmp short $+2 loc_46393B: mov eax, dword ptr [rsp+58h+var_3C] movzx eax, al cmp eax, 8 jnz short loc_463973 lea rdi, [rsp+58h+var_30]; this call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**) mov ecx, eax mov rax, [rsp+58h+var_48] mov [rax+10h], ecx cmp [rsp+58h+var_30], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_46396C jmp short loc_463971 loc_46396C: jmp loc_463A5B loc_463971: jmp short loc_463975 loc_463973: jmp short loc_463979 loc_463975: jmp short loc_4638FD loc_463977: jmp short $+2 loc_463979: cmp dword ptr [rsp+58h+var_3C], 0 jz short loc_46398C mov eax, dword ptr [rsp+58h+var_3C] and eax, 7 cmp eax, 4 jnz short loc_4639B5 loc_46398C: cmp [rsp+58h+var_30], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_46399D jmp short loc_4639A2 loc_46399D: jmp loc_463A5B loc_4639A2: mov rdi, [rsp+58h+var_3C+4]; this mov esi, dword ptr [rsp+58h+var_3C]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint) jmp loc_463A51 loc_4639B5: mov rax, [rsp+58h+var_48] mov ecx, dword ptr [rsp+58h+var_3C]; int mov [rsp+58h+var_58], rcx; int add rax, 8 mov qword ptr [rsp+58h+var_20], rax; int mov rax, qword ptr [rsp+58h+var_20] mov qword ptr [rsp+58h+var_50], rax; int mov qword ptr [rsp+58h+var_10], rax; int mov rax, qword ptr [rsp+58h+var_10] mov qword ptr [rsp+58h+var_8], rax; int mov rax, qword ptr [rsp+58h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_463A0B mov rdi, qword ptr [rsp+58h+var_50] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+58h+var_18], rax jmp short loc_463A1A loc_463A0B: mov rdi, qword ptr [rsp+58h+var_50]; int call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov [rsp+58h+var_18], rax loc_463A1A: mov rdi, [rsp+58h+var_58]; this mov rsi, [rsp+58h+var_18]; unsigned __int64 mov rdx, [rsp+58h+var_30]; google::protobuf::UnknownFieldSet * mov rcx, [rsp+58h+var_3C+4]; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+58h+var_30], rax cmp [rsp+58h+var_30], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_463A48 jmp short loc_463A4A loc_463A48: jmp short loc_463A5B loc_463A4A: jmp loc_4638FD loc_463A4F: jmp short $+2 loc_463A51: mov rax, [rsp+58h+var_30] add rsp, 58h retn loc_463A5B: mov [rsp+58h+var_30], 0 jmp short loc_463A51
google::protobuf::internal * google::protobuf::UInt32Value::_InternalParse( google::protobuf::UInt32Value *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { google::protobuf::internal::ParseContext *v3; // r8 google::protobuf::internal *v5; // [rsp+0h] [rbp-58h] _QWORD *v6; // [rsp+8h] [rbp-50h] _BYTE v7[12]; // [rsp+1Ch] [rbp-3Ch] BYREF google::protobuf::internal *v8[2]; // [rsp+28h] [rbp-30h] BYREF int v9[2]; // [rsp+38h] [rbp-20h] unsigned long long v10; // [rsp+40h] [rbp-18h] int v11[2]; // [rsp+48h] [rbp-10h] int v12[2]; // [rsp+50h] [rbp-8h] v8[1] = this; v8[0] = a2; *(_QWORD *)&v7[4] = a3; while ( (google::protobuf::internal::ParseContext::Done( *(google::protobuf::internal::ParseContext **)&v7[4], (const char **)v8) & 1) == 0 ) { v8[0] = (google::protobuf::internal *)google::protobuf::internal::ReadTag(v8[0], v7, 0LL); if ( *(_DWORD *)v7 >> 3 == 1 && v7[0] == 8 ) { *((_DWORD *)this + 4) = google::protobuf::internal::ReadVarint32( (google::protobuf::internal *)v8, (const char **)v7); if ( !v8[0] ) goto LABEL_17; } else { if ( !*(_DWORD *)v7 || (v7[0] & 7) == 4 ) { if ( v8[0] ) { google::protobuf::internal::EpsCopyInputStream::SetLastTag( *(google::protobuf::internal::EpsCopyInputStream **)&v7[4], *(int *)v7); return v8[0]; } LABEL_17: v8[0] = 0LL; return v8[0]; } v5 = (google::protobuf::internal *)*(unsigned int *)v7; *(_QWORD *)v9 = (char *)this + 8; v6 = (_QWORD *)((char *)this + 8); *(_QWORD *)v11 = (char *)this + 8; *(_QWORD *)v12 = (char *)this + 8; if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) v10 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v6) + 8; else v10 = (unsigned long long)google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>( v6, (unsigned long long)v7); v8[0] = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( v5, v10, v8[0], *(const char **)&v7[4], v3); if ( !v8[0] ) goto LABEL_17; } } return v8[0]; }
~allocator: MOV qword ptr [RSP + -0x8],RDI RET
/* std::allocator<std::_List_node<std::pair<YAML::detail::node*, YAML::detail::node*> > >::~allocator() */ void __thiscall std::allocator<std::_List_node<std::pair<YAML::detail::node*,YAML::detail::node*>>>::~allocator (allocator<std::_List_node<std::pair<YAML::detail::node*,YAML::detail::node*>>> *this) { return; }
235
mysql_stat
eloqsql/libmariadb/libmariadb/mariadb_lib.c
char * STDCALL mysql_stat(MYSQL *mysql) { if (ma_simple_command(mysql, COM_STATISTICS,0,0,0,0)) return mysql->net.last_error; mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */ if (!mysql->net.read_pos[0]) { SET_CLIENT_ERROR(mysql, CR_WRONG_HOST_INFO , SQLSTATE_UNKNOWN, 0); return mysql->net.last_error; } return((char*) mysql->net.read_pos); }
O3
c
mysql_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x4d0(%rdi), %rax movl $0x9, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *0x10(%rax) testl %eax, %eax je 0x1c581 addq $0x97, %rbx movq %rbx, %r14 jmp 0x1c5ef movq 0x20(%rbx), %rax movq 0x358(%rbx), %rcx movb $0x0, (%rax,%rcx) movq 0x20(%rbx), %r14 cmpb $0x0, (%r14) jne 0x1c5ef movl $0x7d9, 0x90(%rbx) # imm = 0x7D9 leaq 0x297(%rbx), %rdi leaq 0x2f50e(%rip), %rax # 0x4bac0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x29c(%rbx) leaq 0x97(%rbx), %r14 leaq 0x2f4f9(%rip), %rax # 0x4bad0 movq 0x48(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF movq %r14, %rdi callq 0x13220 movb %r15b, 0x296(%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stat: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+4D0h] mov esi, 9 xor edx, edx xor ecx, ecx xor r8d, r8d xor r9d, r9d call qword ptr [rax+10h] test eax, eax jz short loc_1C581 add rbx, 97h mov r14, rbx jmp short loc_1C5EF loc_1C581: mov rax, [rbx+20h] mov rcx, [rbx+358h] mov byte ptr [rax+rcx], 0 mov r14, [rbx+20h] cmp byte ptr [r14], 0 jnz short loc_1C5EF mov dword ptr [rbx+90h], 7D9h lea rdi, [rbx+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+29Ch], r15b lea r14, [rbx+97h] lea rax, client_errors mov rsi, [rax+48h] mov edx, 1FFh mov rdi, r14 call _strncpy mov [rbx+296h], r15b loc_1C5EF: mov rax, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
_BYTE * mysql_stat(long long a1) { long long v1; // rax _BYTE *v2; // r14 if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, long long))(*(_QWORD *)(a1 + 1232) + 16LL))( a1, 9LL, 0LL, 0LL, 0LL, 0LL, v1) ) { return (_BYTE *)(a1 + 151); } *(_BYTE *)(*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 856)) = 0; v2 = *(_BYTE **)(a1 + 32); if ( !*v2 ) { *(_DWORD *)(a1 + 144) = 2009; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; v2 = (_BYTE *)(a1 + 151); strncpy(a1 + 151, client_errors[9], 511LL); *(_BYTE *)(a1 + 662) = 0; } return v2; }
mysql_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x4d0] MOV ESI,0x9 XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL qword ptr [RAX + 0x10] TEST EAX,EAX JZ 0x0011c581 ADD RBX,0x97 MOV R14,RBX JMP 0x0011c5ef LAB_0011c581: MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x358] MOV byte ptr [RAX + RCX*0x1],0x0 MOV R14,qword ptr [RBX + 0x20] CMP byte ptr [R14],0x0 JNZ 0x0011c5ef MOV dword ptr [RBX + 0x90],0x7d9 LEA RDI,[RBX + 0x297] LEA RAX,[0x14bac0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [RBX + 0x29c],R15B LEA R14,[RBX + 0x97] LEA RAX,[0x14bad0] MOV RSI,qword ptr [RAX + 0x48] MOV EDX,0x1ff MOV RDI,R14 CALL 0x00113220 MOV byte ptr [RBX + 0x296],R15B LAB_0011c5ef: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
char * mysql_stat(long param_1) { int iVar1; char *__dest; iVar1 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x10))(param_1,9,0,0,0,0); if (iVar1 == 0) { *(int1 *)(*(long *)(param_1 + 0x20) + *(long *)(param_1 + 0x358)) = 0; __dest = *(char **)(param_1 + 0x20); if (*__dest == '\0') { *(int4 *)(param_1 + 0x90) = 0x7d9; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; __dest = (char *)(param_1 + 0x97); strncpy(__dest,PTR_s_Wrong_host_info_0014bb18,0x1ff); *(int1 *)(param_1 + 0x296) = 0; } } else { __dest = (char *)(param_1 + 0x97); } return __dest; }
236
llama_model_loader::init_mappings(bool, std::vector<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock>>, std::allocator<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock>>>>*)
monkey531[P]llama/src/llama-model-loader.cpp
void llama_model_loader::init_mappings(bool prefetch, llama_mlocks * mlock_mmaps) { if (use_mmap) { mappings.reserve(files.size()); mmaps_used.reserve(files.size()); for (const auto & file : files) { auto * reg = ggml_backend_dev_backend_reg(ggml_backend_dev_by_type(GGML_BACKEND_DEVICE_TYPE_CPU)); auto * is_numa_fn = (decltype(ggml_is_numa) *) ggml_backend_reg_get_proc_address(reg, "ggml_backend_cpu_is_numa"); std::unique_ptr<llama_mmap> mapping = std::make_unique<llama_mmap>(file.get(), prefetch ? -1 : 0, is_numa_fn()); mmaps_used.emplace_back(mapping->size(), 0); if (mlock_mmaps) { std::unique_ptr<llama_mlock> mlock_mmap(new llama_mlock()); mlock_mmap->init(mapping->addr()); mlock_mmaps->emplace_back(std::move(mlock_mmap)); } mappings.emplace_back(std::move(mapping)); } } // compute the total size of all tensors for progress reporting for (const auto & it : weights_map) { size_data += ggml_nbytes(it.second.tensor); } }
O3
cpp
llama_model_loader::init_mappings(bool, std::vector<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock>>, std::allocator<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock>>>>*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, 0x20(%rsp) movq %rdi, 0x18(%rsp) cmpb $0x1, 0x20(%rdi) jne 0xafaf1 movl %esi, %r15d movq 0x18(%rsp), %rbx leaq 0x48(%rbx), %rdi movq 0x30(%rbx), %rsi subq 0x28(%rbx), %rsi sarq $0x3, %rsi movq %rdi, 0x38(%rsp) callq 0x690a0 leaq 0x128(%rbx), %rdi movq 0x30(%rbx), %rsi subq 0x28(%rbx), %rsi sarq $0x3, %rsi movq %rdi, 0x40(%rsp) callq 0x66500 movq 0x28(%rbx), %rbp movq 0x30(%rbx), %rax movq %rax, 0x30(%rsp) cmpq %rax, %rbp je 0xafaf1 movzbl %r15b, %eax negq %rax movq %rax, 0x28(%rsp) movq %rsp, %r15 leaq 0x8(%rsp), %rbx xorl %edi, %edi callq 0x6afc0 movq %rax, %rdi callq 0x65d30 movq %rax, %rdi leaq 0x679a2(%rip), %rsi # 0x1173ca callq 0x67d00 movq (%rbp), %r14 callq *%rax movl %eax, %r13d movl $0x8, %edi callq 0x68030 movq %rax, %r12 movzbl %r13b, %ecx movq %rax, %rdi movq %r14, %rsi movq 0x28(%rsp), %rdx callq 0x66bd0 movq %r12, 0x8(%rsp) movq %r12, %rdi callq 0x672a0 movq %rax, (%rsp) movl $0x0, 0x14(%rsp) movq 0x40(%rsp), %rdi movq %r15, %rsi leaq 0x14(%rsp), %rdx callq 0x68b60 cmpq $0x0, 0x20(%rsp) je 0xafacd movl $0x8, %edi callq 0x68030 movq %rax, %r12 movq %rax, %rdi callq 0x67980 movq %r12, (%rsp) movq 0x8(%rsp), %rdi callq 0x6aca0 movq %r12, %rdi movq %rax, %rsi callq 0x6c1b0 movq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x66310 movq %r15, %rdi callq 0x64580 movq 0x38(%rsp), %rdi movq %rbx, %rsi callq 0x68570 movq %rbx, %rdi callq 0x68520 addq $0x8, %rbp cmpq 0x30(%rsp), %rbp jne 0xafa0f movq 0x18(%rsp), %rbx movq 0x78(%rbx), %r14 leaq 0x68(%rbx), %r15 cmpq %r15, %r14 je 0xafb23 movq 0x50(%r14), %rdi callq 0x64550 addq %rax, 0x120(%rbx) movq %r14, %rdi callq 0x66c20 movq %rax, %r14 cmpq %r15, %rax jne 0xafb03 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xafb5c movq %rax, %rbx movl $0x8, %esi movq %r12, %rdi callq 0x681a0 jmp 0xafb6c jmp 0xafb5c movq %rax, %rbx movl $0x8, %esi movq %r12, %rdi callq 0x681a0 jmp 0xafb76 jmp 0xafb5c movq %rax, %rbx jmp 0xafb6c movq %rax, %rbx movq %rsp, %rdi callq 0x64580 leaq 0x8(%rsp), %rdi callq 0x68520 movq %rbx, %rdi callq 0x6b5d0
_ZN18llama_model_loader13init_mappingsEbPSt6vectorISt10unique_ptrI11llama_mlockSt14default_deleteIS2_EESaIS5_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_58], rdx mov [rsp+78h+var_60], rdi cmp byte ptr [rdi+20h], 1 jnz loc_AFAF1 mov r15d, esi mov rbx, [rsp+78h+var_60] lea rdi, [rbx+48h] mov rsi, [rbx+30h] sub rsi, [rbx+28h] sar rsi, 3 mov [rsp+78h+var_40], rdi call __ZNSt6vectorISt10unique_ptrI10llama_mmapSt14default_deleteIS1_EESaIS4_EE7reserveEm; std::vector<std::unique_ptr<llama_mmap>>::reserve(ulong) lea rdi, [rbx+128h] mov rsi, [rbx+30h] sub rsi, [rbx+28h] sar rsi, 3 mov [rsp+78h+var_38], rdi call __ZNSt6vectorISt4pairImmESaIS1_EE7reserveEm; std::vector<std::pair<ulong,ulong>>::reserve(ulong) mov rbp, [rbx+28h] mov rax, [rbx+30h] mov [rsp+78h+var_48], rax cmp rbp, rax jz loc_AFAF1 movzx eax, r15b neg rax mov [rsp+78h+var_50], rax mov r15, rsp lea rbx, [rsp+78h+var_70] loc_AFA0F: xor edi, edi call _ggml_backend_dev_by_type mov rdi, rax call _ggml_backend_dev_backend_reg mov rdi, rax lea rsi, aGgmlBackendCpu_2; "ggml_backend_cpu_is_numa" call _ggml_backend_reg_get_proc_address mov r14, [rbp+0] call rax mov r13d, eax mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax movzx ecx, r13b; bool mov rdi, rax; this mov rsi, r14; llama_file * mov rdx, [rsp+78h+var_50]; unsigned __int64 call __ZN10llama_mmapC2EP10llama_filemb; llama_mmap::llama_mmap(llama_file *,ulong,bool) mov [rsp+78h+var_70], r12 mov rdi, r12; this call __ZNK10llama_mmap4sizeEv; llama_mmap::size(void) mov [rsp+78h+var_78], rax mov [rsp+78h+var_64], 0 mov rdi, [rsp+78h+var_38] mov rsi, r15 lea rdx, [rsp+78h+var_64] call __ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJmiEEERS1_DpOT_; std::vector<std::pair<ulong,ulong>>::emplace_back<ulong,int>(ulong,int &&) cmp [rsp+78h+var_58], 0 jz short loc_AFACD mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax mov rdi, rax; this call __ZN11llama_mlockC2Ev; llama_mlock::llama_mlock(void) mov [rsp+78h+var_78], r12 mov rdi, [rsp+78h+var_70]; this call __ZNK10llama_mmap4addrEv; llama_mmap::addr(void) mov rdi, r12; this mov rsi, rax; void * call __ZN11llama_mlock4initEPv; llama_mlock::init(void *) mov rdi, [rsp+78h+var_58] mov rsi, r15 call __ZNSt6vectorISt10unique_ptrI11llama_mlockSt14default_deleteIS1_EESaIS4_EE12emplace_backIJS4_EEERS4_DpOT_; std::vector<std::unique_ptr<llama_mlock>>::emplace_back<std::unique_ptr<llama_mlock>>(std::unique_ptr<llama_mlock> &&) mov rdi, r15 call __ZNSt10unique_ptrI11llama_mlockSt14default_deleteIS0_EED2Ev; std::unique_ptr<llama_mlock>::~unique_ptr() loc_AFACD: mov rdi, [rsp+78h+var_40] mov rsi, rbx call __ZNSt6vectorISt10unique_ptrI10llama_mmapSt14default_deleteIS1_EESaIS4_EE12emplace_backIJS4_EEERS4_DpOT_; std::vector<std::unique_ptr<llama_mmap>>::emplace_back<std::unique_ptr<llama_mmap>>(std::unique_ptr<llama_mmap> &&) mov rdi, rbx call __ZNSt10unique_ptrI10llama_mmapSt14default_deleteIS0_EED2Ev; std::unique_ptr<llama_mmap>::~unique_ptr() add rbp, 8 cmp rbp, [rsp+78h+var_48] jnz loc_AFA0F loc_AFAF1: mov rbx, [rsp+78h+var_60] mov r14, [rbx+78h] lea r15, [rbx+68h] cmp r14, r15 jz short loc_AFB23 loc_AFB03: mov rdi, [r14+50h] call _ggml_nbytes add [rbx+120h], rax mov rdi, r14 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r14, rax cmp rax, r15 jnz short loc_AFB03 loc_AFB23: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_AFB5C mov rbx, rax mov esi, 8; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AFB6C jmp short loc_AFB5C mov rbx, rax mov esi, 8; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AFB76 jmp short $+2 loc_AFB5C: mov rbx, rax jmp short loc_AFB6C mov rbx, rax mov rdi, rsp call __ZNSt10unique_ptrI11llama_mlockSt14default_deleteIS0_EED2Ev; std::unique_ptr<llama_mlock>::~unique_ptr() loc_AFB6C: lea rdi, [rsp+arg_0] call __ZNSt10unique_ptrI10llama_mmapSt14default_deleteIS0_EED2Ev; std::unique_ptr<llama_mmap>::~unique_ptr() loc_AFB76: mov rdi, rbx call __Unwind_Resume
void llama_model_loader::init_mappings(long long a1, unsigned __int8 a2, long long a3) { long long v4; // rsi long long v5; // rsi llama_file **v6; // rbp long long v7; // rax long long v8; // rdi long long (*proc_address)(void); // rax llama_file *v10; // r14 char v11; // r13 llama_mmap *v12; // r12 llama_mlock *v13; // r12 void *v14; // rax _QWORD *v15; // rbx long long v16; // r14 _QWORD *i; // r15 long long v18; // [rsp+0h] [rbp-78h] BYREF llama_mmap *v19; // [rsp+8h] [rbp-70h] BYREF int v20; // [rsp+14h] [rbp-64h] BYREF _QWORD *v21; // [rsp+18h] [rbp-60h] long long v22; // [rsp+20h] [rbp-58h] unsigned long long v23; // [rsp+28h] [rbp-50h] llama_file **v24; // [rsp+30h] [rbp-48h] _QWORD *v25; // [rsp+38h] [rbp-40h] _QWORD *v26; // [rsp+40h] [rbp-38h] v22 = a3; v21 = (_QWORD *)a1; if ( *(_BYTE *)(a1 + 32) == 1 ) { v4 = (long long)(v21[6] - v21[5]) >> 3; v25 = v21 + 9; std::vector<std::unique_ptr<llama_mmap>>::reserve(v21 + 9, v4); v5 = (long long)(v21[6] - v21[5]) >> 3; v26 = v21 + 37; std::vector<std::pair<unsigned long,unsigned long>>::reserve(v21 + 37, v5); v6 = (llama_file **)v21[5]; v24 = (llama_file **)v21[6]; if ( v6 != v24 ) { v23 = -(long long)a2; do { v7 = ggml_backend_dev_by_type(0LL); v8 = ggml_backend_dev_backend_reg(v7); proc_address = (long long (*)(void))ggml_backend_reg_get_proc_address(v8, "ggml_backend_cpu_is_numa"); v10 = *v6; v11 = proc_address(); v12 = (llama_mmap *)operator new(8uLL); llama_mmap::llama_mmap(v12, v10, v23, v11); v19 = v12; v18 = llama_mmap::size(v12); v20 = 0; std::vector<std::pair<unsigned long,unsigned long>>::emplace_back<unsigned long,int>(v26, &v18, &v20); if ( v22 ) { v13 = (llama_mlock *)operator new(8uLL); llama_mlock::llama_mlock(v13); v18 = (long long)v13; v14 = (void *)llama_mmap::addr(v19); llama_mlock::init(v13, v14); std::vector<std::unique_ptr<llama_mlock>>::emplace_back<std::unique_ptr<llama_mlock>>(v22, &v18); std::unique_ptr<llama_mlock>::~unique_ptr(&v18); } std::vector<std::unique_ptr<llama_mmap>>::emplace_back<std::unique_ptr<llama_mmap>>(v25, &v19); std::unique_ptr<llama_mmap>::~unique_ptr(&v19); ++v6; } while ( v6 != v24 ); } } v15 = v21; v16 = v21[15]; for ( i = v21 + 13; (_QWORD *)v16 != i; v16 = std::_Rb_tree_increment(v16) ) v15[36] += ggml_nbytes(*(_QWORD *)(v16 + 80)); }
init_mappings: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RDI CMP byte ptr [RDI + 0x20],0x1 JNZ 0x001afaf1 MOV R15D,ESI MOV RBX,qword ptr [RSP + 0x18] LEA RDI,[RBX + 0x48] MOV RSI,qword ptr [RBX + 0x30] SUB RSI,qword ptr [RBX + 0x28] SAR RSI,0x3 MOV qword ptr [RSP + 0x38],RDI CALL 0x001690a0 LEA RDI,[RBX + 0x128] MOV RSI,qword ptr [RBX + 0x30] SUB RSI,qword ptr [RBX + 0x28] SAR RSI,0x3 MOV qword ptr [RSP + 0x40],RDI CALL 0x00166500 MOV RBP,qword ptr [RBX + 0x28] MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [RSP + 0x30],RAX CMP RBP,RAX JZ 0x001afaf1 MOVZX EAX,R15B NEG RAX MOV qword ptr [RSP + 0x28],RAX MOV R15,RSP LEA RBX,[RSP + 0x8] LAB_001afa0f: XOR EDI,EDI CALL 0x0016afc0 MOV RDI,RAX CALL 0x00165d30 MOV RDI,RAX LEA RSI,[0x2173ca] CALL 0x00167d00 MOV R14,qword ptr [RBP] CALL RAX MOV R13D,EAX MOV EDI,0x8 CALL 0x00168030 MOV R12,RAX MOVZX ECX,R13B LAB_001afa47: MOV RDI,RAX MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x28] CALL 0x00166bd0 MOV qword ptr [RSP + 0x8],R12 LAB_001afa5c: MOV RDI,R12 CALL 0x001672a0 MOV qword ptr [RSP],RAX MOV dword ptr [RSP + 0x14],0x0 LAB_001afa70: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,R15 LEA RDX,[RSP + 0x14] CALL 0x00168b60 CMP qword ptr [RSP + 0x20],0x0 JZ 0x001afacd LAB_001afa8a: MOV EDI,0x8 CALL 0x00168030 LAB_001afa94: MOV R12,RAX MOV RDI,RAX CALL 0x00167980 MOV qword ptr [RSP],R12 MOV RDI,qword ptr [RSP + 0x8] LAB_001afaa8: CALL 0x0016aca0 MOV RDI,R12 MOV RSI,RAX CALL 0x0016c1b0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,R15 CALL 0x00166310 MOV RDI,R15 CALL 0x00164580 LAB_001afacd: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,RBX CALL 0x00168570 LAB_001afada: MOV RDI,RBX CALL 0x00168520 ADD RBP,0x8 CMP RBP,qword ptr [RSP + 0x30] JNZ 0x001afa0f LAB_001afaf1: MOV RBX,qword ptr [RSP + 0x18] MOV R14,qword ptr [RBX + 0x78] LEA R15,[RBX + 0x68] CMP R14,R15 JZ 0x001afb23 LAB_001afb03: MOV RDI,qword ptr [R14 + 0x50] CALL 0x00164550 ADD qword ptr [RBX + 0x120],RAX MOV RDI,R14 CALL 0x00166c20 MOV R14,RAX CMP RAX,R15 JNZ 0x001afb03 LAB_001afb23: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* llama_model_loader::init_mappings(bool, std::vector<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock> >, std::allocator<std::unique_ptr<llama_mlock, std::default_delete<llama_mlock> > > >*) */ void __thiscall llama_model_loader::init_mappings(llama_model_loader *this,bool param_1,vector *param_2) { _Rb_tree_node_base *p_Var1; llama_file *plVar2; llama_model_loader *plVar3; bool bVar4; int8 uVar5; code *pcVar6; llama_mmap *this_00; llama_mlock *this_01; long lVar7; _Rb_tree_node_base *p_Var8; int8 *puVar9; llama_mlock *local_78; llama_mmap *local_70; int local_64; llama_model_loader *local_60; vector *local_58; ulong local_50; int8 *local_48; vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>> *local_40; vector<std::pair<unsigned_long,unsigned_long>,std::allocator<std::pair<unsigned_long,unsigned_long>>> *local_38; local_60 = this; local_58 = param_2; if (this[0x20] == (llama_model_loader)0x1) { local_40 = (vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>> *)(this + 0x48); std:: vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>> ::reserve(local_40,*(long *)(this + 0x30) - *(long *)(this + 0x28) >> 3); local_38 = (vector<std::pair<unsigned_long,unsigned_long>,std::allocator<std::pair<unsigned_long,unsigned_long>>> *)(this + 0x128); std:: vector<std::pair<unsigned_long,unsigned_long>,std::allocator<std::pair<unsigned_long,unsigned_long>>> ::reserve(local_38,*(long *)(this + 0x30) - *(long *)(this + 0x28) >> 3); puVar9 = *(int8 **)(this + 0x28); local_48 = *(int8 **)(this + 0x30); if (puVar9 != local_48) { local_50 = -(ulong)param_1; do { uVar5 = ggml_backend_dev_by_type(0); uVar5 = ggml_backend_dev_backend_reg(uVar5); pcVar6 = (code *)ggml_backend_reg_get_proc_address(uVar5,"ggml_backend_cpu_is_numa"); plVar2 = (llama_file *)*puVar9; bVar4 = (bool)(*pcVar6)(); this_00 = (llama_mmap *)operator_new(8); /* try { // try from 001afa47 to 001afa56 has its CatchHandler @ 001afb48 */ llama_mmap::llama_mmap(this_00,plVar2,local_50,bVar4); local_70 = this_00; /* try { // try from 001afa5c to 001afa63 has its CatchHandler @ 001afb5a */ local_78 = (llama_mlock *)llama_mmap::size(this_00); local_64 = 0; /* try { // try from 001afa70 to 001afa81 has its CatchHandler @ 001afb5c */ std:: vector<std::pair<unsigned_long,unsigned_long>,std::allocator<std::pair<unsigned_long,unsigned_long>>> ::emplace_back<unsigned_long,int>(local_38,(ulong *)&local_78,&local_64); if (local_58 != (vector *)0x0) { /* try { // try from 001afa8a to 001afa93 has its CatchHandler @ 001afb32 */ this_01 = (llama_mlock *)operator_new(8); /* try { // try from 001afa94 to 001afa9e has its CatchHandler @ 001afb34 */ llama_mlock::llama_mlock(this_01); local_78 = this_01; /* try { // try from 001afaa8 to 001afac4 has its CatchHandler @ 001afb61 */ llama_mmap::addr(local_70); llama_mlock::init(this_01); std:: vector<std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>,std::allocator<std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>>> ::emplace_back<std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>> ((vector<std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>,std::allocator<std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>>> *)local_58,(unique_ptr *)&local_78); std::unique_ptr<llama_mlock,std::default_delete<llama_mlock>>::~unique_ptr ((unique_ptr<llama_mlock,std::default_delete<llama_mlock>> *)&local_78); } /* try { // try from 001afacd to 001afad9 has its CatchHandler @ 001afb46 */ std:: vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>> ::emplace_back<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>> (local_40,(unique_ptr *)&local_70); std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>::~unique_ptr ((unique_ptr<llama_mmap,std::default_delete<llama_mmap>> *)&local_70); puVar9 = puVar9 + 1; } while (puVar9 != local_48); } } plVar3 = local_60; p_Var1 = (_Rb_tree_node_base *)(local_60 + 0x68); for (p_Var8 = *(_Rb_tree_node_base **)(local_60 + 0x78); p_Var8 != p_Var1; p_Var8 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var8)) { lVar7 = ggml_nbytes(*(int8 *)(p_Var8 + 0x50)); *(long *)(plVar3 + 0x120) = *(long *)(plVar3 + 0x120) + lVar7; } return; }
237
minja::Value::set(minja::Value const&, minja::Value const&)
monkey531[P]llama/common/./minja.hpp
void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); (*object_)[key.primitive_] = value; }
O0
cpp
minja::Value::set(minja::Value const&, minja::Value const&): subq $0xd8, %rsp movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movq %rdx, 0xc0(%rsp) movq 0xd0(%rsp), %rdi movq %rdi, 0x20(%rsp) addq $0x20, %rdi callq 0xb7280 testb $0x1, %al jne 0xba790 movb $0x1, 0x73(%rsp) movl $0x10, %edi callq 0x52670 movq 0x20(%rsp), %rsi movq %rax, 0x18(%rsp) leaq 0x80(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6dd0 jmp 0xba6dc leaq 0x1224d3(%rip), %rsi # 0x1dcbb6 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x5cf00 jmp 0xba6fa movq 0x18(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x524b0 jmp 0xba70e movq 0x18(%rsp), %rdi movb $0x0, 0x73(%rsp) movq 0x1ac881(%rip), %rsi # 0x266fa0 movq 0x1ac83a(%rip), %rdx # 0x266f60 callq 0x52a60 jmp 0xba8c1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xba778 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xba76b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0xa0(%rsp), %rdi callq 0x53408 leaq 0x80(%rsp), %rdi callq 0x53408 testb $0x1, 0x73(%rsp) jne 0xba781 jmp 0xba78b movq 0x18(%rsp), %rdi callq 0x52e60 jmp 0xba8b7 movq 0xc8(%rsp), %rdi callq 0xb9c20 testb $0x1, %al jne 0xba873 movb $0x1, 0x2f(%rsp) movl $0x10, %edi callq 0x52670 movq 0x20(%rsp), %rsi movq %rax, 0x10(%rsp) leaq 0x30(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6dd0 jmp 0xba7d1 leaq 0x122354(%rip), %rsi # 0x1dcb2c leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x5cf00 jmp 0xba7e9 movq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x524b0 jmp 0xba7fa movq 0x10(%rsp), %rdi movb $0x0, 0x2f(%rsp) movq 0x1ac795(%rip), %rsi # 0x266fa0 movq 0x1ac74e(%rip), %rdx # 0x266f60 callq 0x52a60 jmp 0xba8c1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xba85e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xba854 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x50(%rsp), %rdi callq 0x53408 leaq 0x30(%rsp), %rdi callq 0x53408 testb $0x1, 0x2f(%rsp) jne 0xba867 jmp 0xba871 movq 0x10(%rsp), %rdi callq 0x52e60 jmp 0xba8b7 movq 0x20(%rsp), %rdi movq 0xc0(%rsp), %rax movq %rax, 0x8(%rsp) addq $0x20, %rdi callq 0xb9d70 movq %rax, %rdi movq 0xc8(%rsp), %rsi addq $0x40, %rsi callq 0xba8d0 movq 0x8(%rsp), %rsi movq %rax, %rdi callq 0xba9b0 addq $0xd8, %rsp retq movq 0x78(%rsp), %rdi callq 0x52ae0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5minja5Value3setERKS0_S2_: sub rsp, 0D8h mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_10], rsi mov [rsp+0D8h+var_18], rdx mov rdi, [rsp+0D8h+var_8] mov [rsp+0D8h+var_B8], rdi add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_BA790 mov [rsp+0D8h+var_65], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_C0], rax lea rdi, [rsp+0D8h+var_58] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_BA6DC: lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+0D8h+var_38] lea rdx, [rsp+0D8h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_BA6FA: mov rdi, [rsp+0D8h+var_C0] lea rsi, [rsp+0D8h+var_38] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_BA70E: mov rdi, [rsp+0D8h+var_C0]; void * mov [rsp+0D8h+var_65], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_BA8C1 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_BA778 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_BA76B mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA76B: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA778: test [rsp+arg_6B], 1 jnz short loc_BA781 jmp short loc_BA78B loc_BA781: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_BA78B: jmp loc_BA8B7 loc_BA790: mov rdi, [rsp+0D8h+var_10]; this call _ZNK5minja5Value11is_hashableEv; minja::Value::is_hashable(void) test al, 1 jnz loc_BA873 mov [rsp+0D8h+var_A9], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_C8], rax lea rdi, [rsp+0D8h+var_A8] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_BA7D1: lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+0D8h+var_88] lea rdx, [rsp+0D8h+var_A8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_BA7E9: mov rdi, [rsp+0D8h+var_C8] lea rsi, [rsp+0D8h+var_88] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_BA7FA: mov rdi, [rsp+0D8h+var_C8]; void * mov [rsp+0D8h+var_A9], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_BA8C1 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_BA85E mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_BA854 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA854: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA85E: test [rsp+arg_27], 1 jnz short loc_BA867 jmp short loc_BA871 loc_BA867: mov rdi, [rsp+arg_8]; void * call ___cxa_free_exception loc_BA871: jmp short loc_BA8B7 loc_BA873: mov rdi, [rsp+0D8h+var_B8] mov rax, [rsp+0D8h+var_18] mov [rsp+0D8h+var_D0], rax add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov rdi, rax mov rsi, [rsp+0D8h+var_10] add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rsi, [rsp+0D8h+var_D0] mov rdi, rax call _ZN5minja5ValueaSERKS0_; minja::Value::operator=(minja::Value const&) add rsp, 0D8h retn loc_BA8B7: mov rdi, [rsp+arg_70] call __Unwind_Resume loc_BA8C1: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3) { int v3; // eax int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax void *v10; // [rsp+10h] [rbp-C8h] void *exception; // [rsp+18h] [rbp-C0h] _BYTE v12[32]; // [rsp+30h] [rbp-A8h] BYREF _BYTE v13[48]; // [rsp+50h] [rbp-88h] BYREF _BYTE v14[32]; // [rsp+80h] [rbp-58h] BYREF _BYTE v15[32]; // [rsp+A0h] [rbp-38h] BYREF const minja::Value *v16; // [rsp+C0h] [rbp-18h] minja::Value *v17; // [rsp+C8h] [rbp-10h] minja::Value *v18; // [rsp+D0h] [rbp-8h] v18 = this; v17 = a2; v16 = a3; if ( !std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)this + 4) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v15, (long long)"Value is not an object: ", (long long)v14); std::runtime_error::runtime_error(exception, v15); v13[35] = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (minja::Value::is_hashable(v17) & 1) == 0 ) { v10 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v12, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v13, (long long)"Unashable type: ", (long long)v12); std::runtime_error::runtime_error(v10, v13); __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)this + 32); v8 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[]( v3, (int)v17 + 64, v4, v5, v6, v7); return minja::Value::operator=(v8, v16); }
set: SUB RSP,0xd8 MOV qword ptr [RSP + 0xd0],RDI MOV qword ptr [RSP + 0xc8],RSI MOV qword ptr [RSP + 0xc0],RDX MOV RDI,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x20],RDI ADD RDI,0x20 CALL 0x001b7280 TEST AL,0x1 JNZ 0x001ba790 MOV byte ptr [RSP + 0x73],0x1 MOV EDI,0x10 CALL 0x00152670 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX LAB_001ba6c6: LEA RDI,[RSP + 0x80] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6dd0 JMP 0x001ba6dc LAB_001ba6dc: LEA RSI,[0x2dcbb6] LEA RDI,[RSP + 0xa0] LEA RDX,[RSP + 0x80] CALL 0x0015cf00 JMP 0x001ba6fa LAB_001ba6fa: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xa0] CALL 0x001524b0 JMP 0x001ba70e LAB_001ba70e: MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RSP + 0x73],0x0 MOV RSI,qword ptr [0x00366fa0] MOV RDX,qword ptr [0x00366f60] CALL 0x00152a60 LAB_001ba790: MOV RDI,qword ptr [RSP + 0xc8] CALL 0x001b9c20 TEST AL,0x1 JNZ 0x001ba873 MOV byte ptr [RSP + 0x2f],0x1 MOV EDI,0x10 CALL 0x00152670 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX LAB_001ba7be: LEA RDI,[RSP + 0x30] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6dd0 JMP 0x001ba7d1 LAB_001ba7d1: LEA RSI,[0x2dcb2c] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] CALL 0x0015cf00 JMP 0x001ba7e9 LAB_001ba7e9: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x50] CALL 0x001524b0 JMP 0x001ba7fa LAB_001ba7fa: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x2f],0x0 MOV RSI,qword ptr [0x00366fa0] MOV RDX,qword ptr [0x00366f60] CALL 0x00152a60 LAB_001ba873: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x8],RAX ADD RDI,0x20 CALL 0x001b9d70 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0xc8] ADD RSI,0x40 CALL 0x001ba8d0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RAX CALL 0x001ba9b0 ADD RSP,0xd8 RET
/* minja::Value::set(minja::Value const&, minja::Value const&) */ void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2) { Value *pVVar1; bool bVar2; runtime_error *prVar3; ulong uVar4; ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this_00; Value *this_01; int1 local_a8 [32]; string local_88 [35]; int1 local_65; int1 local_58 [32]; string local_38 [32]; Value *local_18; Value *local_10; Value *local_8; local_18 = param_2; local_10 = param_1; local_8 = this; bVar2 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(this + 0x20)); if (!bVar2) { local_65 = 1; prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ba6c6 to 001ba6d9 has its CatchHandler @ 001ba730 */ dump_abi_cxx11_((int)local_58,SUB81(this,0)); /* try { // try from 001ba6dc to 001ba6f7 has its CatchHandler @ 001ba740 */ std::operator+((char *)local_38,(string *)"Value is not an object: "); /* try { // try from 001ba6fa to 001ba72a has its CatchHandler @ 001ba750 */ std::runtime_error::runtime_error(prVar3,local_38); local_65 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00366fa0,PTR__runtime_error_00366f60); } uVar4 = is_hashable(local_10); pVVar1 = local_18; if ((uVar4 & 1) == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ba7be to 001ba7ce has its CatchHandler @ 001ba81c */ dump_abi_cxx11_((int)local_a8,SUB81(this,0)); /* try { // try from 001ba7d1 to 001ba7e6 has its CatchHandler @ 001ba82c */ std::operator+((char *)local_88,(string *)"Unashable type: "); /* try { // try from 001ba7e9 to 001ba816 has its CatchHandler @ 001ba83c */ std::runtime_error::runtime_error(prVar3,local_88); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00366fa0,PTR__runtime_error_00366f60); } this_00 = (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator*((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x20)); this_01 = (Value *)nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::operator[](this_00,(basic_json *)(local_10 + 0x40)); operator=(this_01,pVVar1); return; }
238
minja::Value::set(minja::Value const&, minja::Value const&)
monkey531[P]llama/common/./minja.hpp
void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); (*object_)[key.primitive_] = value; }
O2
cpp
minja::Value::set(minja::Value const&, minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpq $0x0, 0x20(%rdi) je 0x3d349 movq %rdx, %rbx movq %rsi, %r15 movq %rsi, %rdi callq 0x3c7ea testb %al, %al je 0x3d3a6 movq 0x20(%r14), %rdi addq $0x40, %r15 movq %r15, %rsi callq 0x3d440 movq %rax, %rdi movq %rbx, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x3d498 pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x3bcc2 leaq 0x5841c(%rip), %rsi # 0x95789 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x25a83 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x21d30 xorl %ebp, %ebp movq 0x9cc5b(%rip), %rsi # 0xd9ff0 movq 0x9cbcc(%rip), %rdx # 0xd9f68 movq %rbx, %rdi callq 0x21de0 jmp 0x3d401 pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x3bcc2 leaq 0x58335(%rip), %rsi # 0x956ff leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x25a83 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x21d30 xorl %ebp, %ebp movq 0x9cbfe(%rip), %rsi # 0xd9ff0 movq 0x9cb6f(%rip), %rdx # 0xd9f68 movq %rbx, %rdi callq 0x21de0 jmp 0x3d405 jmp 0x3d414 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x22078 jmp 0x3d41a movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x22078 testb %bpl, %bpl jne 0x3d430 jmp 0x3d438 jmp 0x3d42d movq %rax, %r14 movq %rbx, %rdi callq 0x215c0 movq %r14, %rdi callq 0x21e50
_ZN5minja5Value3setERKS0_S2_: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rdi cmp qword ptr [rdi+20h], 0 jz short loc_3D349 mov rbx, rdx mov r15, rsi mov rdi, rsi; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz loc_3D3A6 mov rdi, [r14+20h] add r15, 40h ; '@' mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rax mov rsi, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5ValueaSERKS0_; minja::Value::operator=(minja::Value const&) loc_3D349: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_3D401 loc_3D3A6: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_3D401: jmp short loc_3D405 jmp short loc_3D414 loc_3D405: mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_3D41A loc_3D414: mov r14, rax mov bpl, 1 loc_3D41A: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_3D430 jmp short loc_3D438 jmp short $+2 loc_3D42D: mov r14, rax loc_3D430: mov rdi, rbx; void * call ___cxa_free_exception loc_3D438: mov rdi, r14 call __Unwind_Resume
long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3) { long long v4; // rax void *exception; // rbx void *v7; // rbx _BYTE v8[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v9[64]; // [rsp+28h] [rbp-40h] BYREF if ( !*((_QWORD *)this + 4) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v9, (long long)"Value is not an object: ", (long long)v8); std::runtime_error::runtime_error(exception, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !minja::Value::is_primitive(a2) ) { v7 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v9, (long long)"Unashable type: ", (long long)v8); std::runtime_error::runtime_error(v7, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v4 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[]( *((_QWORD *)this + 4), (char *)a2 + 64); return minja::Value::operator=(v4, a3); }
set: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP qword ptr [RDI + 0x20],0x0 JZ 0x0013d349 MOV RBX,RDX MOV R15,RSI MOV RDI,RSI CALL 0x0013c7ea TEST AL,AL JZ 0x0013d3a6 MOV RDI,qword ptr [R14 + 0x20] ADD R15,0x40 MOV RSI,R15 CALL 0x0013d440 MOV RDI,RAX MOV RSI,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0013d498 LAB_0013d349: PUSH 0x10 POP RDI CALL 0x001213f0 MOV RBX,RAX LAB_0013d354: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0013bcc2 LAB_0013d366: LEA RSI,[0x195789] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00125a83 MOV BPL,0x1 LAB_0013d37f: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00121d30 XOR EBP,EBP MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,RBX CALL 0x00121de0 LAB_0013d3a6: PUSH 0x10 POP RDI CALL 0x001213f0 MOV RBX,RAX LAB_0013d3b1: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0013bcc2 LAB_0013d3c3: LEA RSI,[0x1956ff] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00125a83 MOV BPL,0x1 LAB_0013d3dc: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00121d30 XOR EBP,EBP MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,RBX CALL 0x00121de0
/* minja::Value::set(minja::Value const&, minja::Value const&) */ void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2) { Value *this_00; runtime_error *prVar1; char cVar2; int1 local_60 [32]; string local_40 [32]; if (*(long *)(this + 0x20) == 0) { prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013d354 to 0013d365 has its CatchHandler @ 0013d42d */ dump_abi_cxx11_((int)local_60,SUB81(this,0)); /* try { // try from 0013d366 to 0013d37b has its CatchHandler @ 0013d414 */ std::operator+((char *)local_40,(string *)"Value is not an object: "); /* try { // try from 0013d37f to 0013d3a3 has its CatchHandler @ 0013d405 */ std::runtime_error::runtime_error(prVar1,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); } cVar2 = is_primitive(param_1); if (cVar2 != '\0') { this_00 = (Value *)nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); operator=(this_00,param_2); return; } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013d3b1 to 0013d3c2 has its CatchHandler @ 0013d42b */ dump_abi_cxx11_((int)local_60,SUB81(this,0)); /* try { // try from 0013d3c3 to 0013d3d8 has its CatchHandler @ 0013d403 */ std::operator+((char *)local_40,(string *)"Unashable type: "); /* try { // try from 0013d3dc to 0013d400 has its CatchHandler @ 0013d401 */ std::runtime_error::runtime_error(prVar1,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); }
239
ftxui::borderLight(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element borderLight(Element child) { return std::make_shared<Border>(unpack(std::move(child)), LIGHT); }
O3
cpp
ftxui::borderLight(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 xorl %ecx, %ecx movq %rcx, 0x8(%rsi) leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22adb movl $0x80, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x35ae1(%rip), %rax # 0x570d8 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movaps (%rsp), %xmm0 leaq 0x30(%rsp), %rsi movaps %xmm0, (%rsi) movq 0x10(%rsp), %rax movq %rax, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x21c4a leaq 0x30(%rsp), %rdi callq 0x1503a movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x1503a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x2165a callq 0x14af8 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x1503a movl $0x80, %esi movq %r14, %rdi callq 0xb400 jmp 0x21686 movq %rax, %rbx movq %rsp, %rdi callq 0x1503a jmp 0x21693 movq %rax, %rbx movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x216a2 callq 0x14af8 movq %rbx, %rdi callq 0xb780
_ZN5ftxui11borderLightESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdi movups xmm0, xmmword ptr [rsi] xor ecx, ecx mov [rsi+8], rcx lea rax, [rsp+68h+var_48] movaps xmmword ptr [rax], xmm0 mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_570D8 mov [r14], rax mov r15, r14 add r15, 10h movaps xmm0, [rsp+68h+var_68] lea rsi, [rsp+68h+var_38] movaps xmmword ptr [rsi], xmm0 mov rax, [rsp+68h+var_58] mov [rsi+10h], rax xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 mov [rsp+68h+var_58], 0 mov rdi, r15 xor edx, edx xor ecx, ecx call _ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE; ftxui::`anonymous namespace'::Border::Border(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle,std::optional<ftxui::Color>) lea rdi, [rsp+68h+var_38] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_2165A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2165A: mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 80h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_21686 mov rbx, rax loc_21686: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_21693 mov rbx, rax loc_21693: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_216A2 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_216A2: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::borderLight(_QWORD *a1, __int128 *a2, int a3, long long a4, int a5, int a6) { __int128 v6; // xmm0 _QWORD *v7; // r14 long long v8; // r8 long long v9; // r9 __int128 v11; // [rsp+0h] [rbp-68h] BYREF long long v12; // [rsp+10h] [rbp-58h] __int128 v13; // [rsp+20h] [rbp-48h] BYREF __int128 v14; // [rsp+30h] [rbp-38h] BYREF long long v15; // [rsp+40h] [rbp-28h] v6 = *a2; *((_QWORD *)a2 + 1) = 0LL; v13 = v6; *(_QWORD *)a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>((unsigned int)&v11, (unsigned int)&v13, a3, 0, a5, a6, v11); v7 = (_QWORD *)operator new(0x80uLL); v7[1] = 0x100000001LL; *v7 = off_570D8; v14 = v11; v15 = v12; ftxui::`anonymous namespace'::Border::Border(v7 + 2, &v14, 0LL, 0LL, v8, v9, 0LL, 0LL, 0LL); std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v14); *a1 = v7 + 2; a1[1] = v7; std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v11); if ( *((_QWORD *)&v13 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v13 + 1)); return a1; }
borderLight: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] XOR ECX,ECX MOV qword ptr [RSI + 0x8],RCX LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RSI],RCX LAB_001215ca: MOV RDI,RSP MOV RSI,RAX CALL 0x00122adb LAB_001215d5: MOV EDI,0x80 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1570d8] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOVAPS XMM0,xmmword ptr [RSP] LEA RSI,[RSP + 0x30] MOVAPS xmmword ptr [RSI],XMM0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSI + 0x10],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00121626: MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX CALL 0x00121c4a LAB_00121632: LEA RDI,[RSP + 0x30] CALL 0x0011503a MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x0011503a MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0012165a CALL 0x00114af8 LAB_0012165a: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* ftxui::borderLight(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::borderLight(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_68; int8 uStack_60; int8 local_58; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; int8 uStack_30; int8 local_28; local_48 = *(int4 *)param_2; uStack_44 = *(int4 *)((long)param_2 + 4); uStack_40 = *(int4 *)(param_2 + 1); uStack_3c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 001215ca to 001215d4 has its CatchHandler @ 00121690 */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_68,&local_48); /* try { // try from 001215d5 to 001215de has its CatchHandler @ 00121683 */ puVar1 = (int8 *)operator_new(0x80); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001570d8; local_38 = local_68; uStack_30 = uStack_60; local_28 = local_58; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00121626 to 00121631 has its CatchHandler @ 00121667 */ (anonymous_namespace)::Border::Border((Border *)(puVar1 + 2),&local_38,0,0); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_38); *(Border **)this = (Border *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_68); if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_3c,uStack_40) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_3c,uStack_40)); } return this; }
240
LefDefParser::lefiCorrectionEdge::clear()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiCrossTalk.cpp
void lefiCorrectionEdge::clear() { int i; lefiCorrectionResistance *r; int maxr = numResistances_; for (i = 0; i < maxr; i++) { r = resistances_[i]; r->Destroy(); lefFree((char*) r); } edge_ = 0; numResistances_ = 0; }
O3
cpp
LefDefParser::lefiCorrectionEdge::clear(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movslq 0x8(%rdi), %r15 testq %r15, %r15 jle 0x573cd xorl %r12d, %r12d movq 0x10(%rbx), %rax movq (%rax,%r12,8), %r14 movq %r14, %rdi callq 0x571aa movq %r14, %rdi callq 0x322d0 incq %r12 cmpq %r12, %r15 jne 0x573ad movq $0x0, (%rbx) movl $0x0, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN12LefDefParser18lefiCorrectionEdge5clearEv: push r15 push r14 push r12 push rbx push rax mov rbx, rdi movsxd r15, dword ptr [rdi+8] test r15, r15 jle short loc_573CD xor r12d, r12d loc_573AD: mov rax, [rbx+10h] mov r14, [rax+r12*8] mov rdi, r14; this call _ZN12LefDefParser24lefiCorrectionResistance7DestroyEv; LefDefParser::lefiCorrectionResistance::Destroy(void) mov rdi, r14; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) inc r12 cmp r15, r12 jnz short loc_573AD loc_573CD: mov qword ptr [rbx], 0 mov dword ptr [rbx+8], 0 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long LefDefParser::lefiCorrectionEdge::clear(LefDefParser::lefiCorrectionEdge *this, void *a2) { long long v2; // r15 long long i; // r12 LefDefParser **v4; // r14 long long result; // rax v2 = *((int *)this + 2); if ( v2 > 0 ) { for ( i = 0LL; i != v2; ++i ) { v4 = *(LefDefParser ***)(*((_QWORD *)this + 2) + 8 * i); LefDefParser::lefiCorrectionResistance::Destroy(v4, a2); result = LefDefParser::lefFree((LefDefParser *)v4, a2); } } *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; return result; }
clear: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOVSXD R15,dword ptr [RDI + 0x8] TEST R15,R15 JLE 0x001573cd XOR R12D,R12D LAB_001573ad: MOV RAX,qword ptr [RBX + 0x10] MOV R14,qword ptr [RAX + R12*0x8] MOV RDI,R14 CALL 0x001571aa MOV RDI,R14 CALL 0x001322d0 INC R12 CMP R15,R12 JNZ 0x001573ad LAB_001573cd: MOV qword ptr [RBX],0x0 MOV dword ptr [RBX + 0x8],0x0 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* LefDefParser::lefiCorrectionEdge::clear() */ void __thiscall LefDefParser::lefiCorrectionEdge::clear(lefiCorrectionEdge *this) { int iVar1; lefiCorrectionResistance *this_00; long lVar2; iVar1 = *(int *)(this + 8); if (0 < (long)iVar1) { lVar2 = 0; do { this_00 = *(lefiCorrectionResistance **)(*(long *)(this + 0x10) + lVar2 * 8); lefiCorrectionResistance::Destroy(this_00); lefFree(this_00); lVar2 = lVar2 + 1; } while (iVar1 != lVar2); } *(int8 *)this = 0; *(int4 *)(this + 8) = 0; return; }
241
asn1_integer
xtate/src/probe-modules/snmp-probe.c
static uint64_t asn1_integer(const unsigned char *px, uint64_t length, uint64_t *r_offset) { uint64_t int_length; uint64_t result; if (px[(*r_offset)++] != 0x02) { *r_offset = length; return 0xFFFFffff; } int_length = asn1_length(px, length, r_offset); if (int_length == 0xFFFFffff) { *r_offset = length; return 0xFFFFffff; } if (*r_offset + int_length > length) { *r_offset = length; return 0xFFFFffff; } if (int_length > 20) { *r_offset = length; return 0xFFFFffff; } result = 0; while (int_length--) result = result * 256 + px[(*r_offset)++]; return result; }
O3
c
asn1_integer: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq (%rdx), %rax leaq 0x1(%rax), %rcx movq %rcx, (%rdx) cmpb $0x2, (%rdi,%rax) jne 0x2e0a7 movq %rdi, %r14 movq %r15, %rsi movq %rbx, %rdx callq 0x2dff2 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x2e0a7 movq (%rbx), %rdx leaq (%rdx,%rax), %rcx cmpq %r15, %rcx seta %cl cmpq $0x15, %rax setae %sil orb %cl, %sil je 0x2e0b8 movq %r15, (%rbx) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq %rcx, %rax popq %rbx popq %r14 popq %r15 retq testq %rax, %rax je 0x2e0dc incq %rdx xorl %ecx, %ecx shlq $0x8, %rcx movq %rdx, (%rbx) movzbl -0x1(%r14,%rdx), %esi orq %rsi, %rcx incq %rdx decq %rax jne 0x2e0c2 jmp 0x2e0af xorl %ecx, %ecx jmp 0x2e0af
asn1_integer: push r15 push r14 push rbx mov rbx, rdx mov r15, rsi mov rax, [rdx] lea rcx, [rax+1] mov [rdx], rcx cmp byte ptr [rdi+rax], 2 jnz short loc_2E0A7 mov r14, rdi mov rsi, r15 mov rdx, rbx call asn1_length mov ecx, 0FFFFFFFFh cmp rax, rcx jz short loc_2E0A7 mov rdx, [rbx] lea rcx, [rdx+rax] cmp rcx, r15 setnbe cl cmp rax, 15h setnb sil or sil, cl jz short loc_2E0B8 loc_2E0A7: mov [rbx], r15 mov ecx, 0FFFFFFFFh loc_2E0AF: mov rax, rcx pop rbx pop r14 pop r15 retn loc_2E0B8: test rax, rax jz short loc_2E0DC inc rdx xor ecx, ecx loc_2E0C2: shl rcx, 8 mov [rbx], rdx movzx esi, byte ptr [r14+rdx-1] or rcx, rsi inc rdx dec rax jnz short loc_2E0C2 jmp short loc_2E0AF loc_2E0DC: xor ecx, ecx jmp short loc_2E0AF
long long asn1_integer(long long a1, unsigned long long a2, unsigned long long *a3) { unsigned long long v4; // rax unsigned long long v5; // rax unsigned long long v6; // rcx long long v8; // rdx v4 = (*a3)++; if ( *(_BYTE *)(a1 + v4) != 2 || (v5 = asn1_length(a1, a2, a3), v5 == 0xFFFFFFFF) || *a3 + v5 > a2 || v5 >= 0x15 ) { *a3 = a2; return 0xFFFFFFFFLL; } else if ( v5 ) { v8 = *a3 + 1; v6 = 0LL; do { *a3 = v8; v6 = *(unsigned __int8 *)(a1 + v8++ - 1) | (v6 << 8); --v5; } while ( v5 ); } else { return 0LL; } return v6; }
asn1_integer: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV RAX,qword ptr [RDX] LEA RCX,[RAX + 0x1] MOV qword ptr [RDX],RCX CMP byte ptr [RDI + RAX*0x1],0x2 JNZ 0x0012e0a7 MOV R14,RDI MOV RSI,R15 MOV RDX,RBX CALL 0x0012dff2 MOV ECX,0xffffffff CMP RAX,RCX JZ 0x0012e0a7 MOV RDX,qword ptr [RBX] LEA RCX,[RDX + RAX*0x1] CMP RCX,R15 SETA CL CMP RAX,0x15 SETNC SIL OR SIL,CL JZ 0x0012e0b8 LAB_0012e0a7: MOV qword ptr [RBX],R15 MOV ECX,0xffffffff LAB_0012e0af: MOV RAX,RCX POP RBX POP R14 POP R15 RET LAB_0012e0b8: TEST RAX,RAX JZ 0x0012e0dc INC RDX XOR ECX,ECX LAB_0012e0c2: SHL RCX,0x8 MOV qword ptr [RBX],RDX MOVZX ESI,byte ptr [R14 + RDX*0x1 + -0x1] OR RCX,RSI INC RDX DEC RAX JNZ 0x0012e0c2 JMP 0x0012e0af LAB_0012e0dc: XOR ECX,ECX JMP 0x0012e0af
ulong asn1_integer(long param_1,ulong param_2,ulong *param_3) { ulong uVar1; ulong uVar2; ulong uVar3; uVar1 = *param_3; *param_3 = uVar1 + 1; if (((*(char *)(param_1 + uVar1) == '\x02') && (uVar1 = asn1_length(param_1,param_2,param_3), uVar1 != 0xffffffff)) && (uVar3 = *param_3, uVar1 < 0x15 && uVar3 + uVar1 <= param_2)) { if (uVar1 == 0) { uVar2 = 0; } else { uVar2 = 0; do { uVar3 = uVar3 + 1; *param_3 = uVar3; uVar2 = uVar2 << 8 | (ulong)*(byte *)(param_1 + -1 + uVar3); uVar1 = uVar1 - 1; } while (uVar1 != 0); } } else { *param_3 = param_2; uVar2 = 0xffffffff; } return uVar2; }
242
my_charpos_mb
eloqsql/strings/ctype-mb.c
size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end, size_t length) { const char *start= pos; while (length && pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1; length--; } return (size_t) (length ? end+2-start : pos-start); }
O3
c
my_charpos_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %rbx testq %rcx, %rcx setne %cl sete %al cmpq %rdx, %rsi setae %dl orb %al, %dl movq %rsi, -0x30(%rbp) movq %rsi, %rax jne 0xb3722 movq %rdi, %r12 decq %r15 movl $0x1, %r14d movq -0x30(%rbp), %rax movq %rax, %r13 movq 0xb8(%r12), %rax movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r14d, %eax cmovll %r14d, %eax addq %r13, %rax addq $-0x1, %r15 setb %cl jae 0xb3722 cmpq %rbx, %rax jb 0xb36ec addq $0x2, %rbx testb %cl, %cl cmoveq %rax, %rbx subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov rbx, rdx test rcx, rcx setnz cl setz al cmp rsi, rdx setnb dl or dl, al mov [rbp+var_30], rsi mov rax, rsi jnz short loc_B3722 mov r12, rdi dec r15 mov r14d, 1 mov rax, [rbp+var_30] loc_B36EC: mov r13, rax mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r13 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r14d cmovl eax, r14d add rax, r13 add r15, 0FFFFFFFFFFFFFFFFh setb cl jnb short loc_B3722 cmp rax, rbx jb short loc_B36EC loc_B3722: add rbx, 2 test cl, cl cmovz rbx, rax sub rbx, [rbp+var_30] mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4) { long long v4; // r15 bool v6; // zf unsigned long long v7; // rax long long v8; // r15 unsigned long long v9; // r13 long long v10; // rax bool v11; // cc bool v12; // cf unsigned long long v13; // rbx v4 = a4; v6 = a4 == 0; LOBYTE(a4) = a4 != 0; v7 = a2; if ( !v6 && a2 < a3 ) { v8 = v4 - 1; v7 = a2; do { v9 = v7; v10 = (*(long long ( **)(long long, unsigned long long, unsigned long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, a3, a4); v11 = (int)v10 < 2; if ( (unsigned int)v10 < 2 ) v10 = 1LL; if ( v11 ) v10 = 1LL; v7 = v9 + v10; v12 = v8-- != 0; LOBYTE(a4) = v12; } while ( v12 && v7 < a3 ); } v13 = a3 + 2; if ( !(_BYTE)a4 ) v13 = v7; return v13 - a2; }
my_charpos_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV RBX,RDX TEST RCX,RCX SETNZ CL SETZ AL CMP RSI,RDX SETNC DL OR DL,AL MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI JNZ 0x001b3722 MOV R12,RDI DEC R15 MOV R14D,0x1 MOV RAX,qword ptr [RBP + -0x30] LAB_001b36ec: MOV R13,RAX MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R14D CMOVL EAX,R14D ADD RAX,R13 ADD R15,-0x1 SETC CL JNC 0x001b3722 CMP RAX,RBX JC 0x001b36ec LAB_001b3722: ADD RBX,0x2 TEST CL,CL CMOVZ RBX,RAX SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_mb(long param_1,ulong param_2,ulong param_3,long param_4) { uint uVar1; ulong uVar2; ulong uVar3; bool bVar4; bVar4 = param_4 != 0; uVar3 = param_2; if (param_2 < param_3 && bVar4) { do { param_4 = param_4 + -1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar3,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } uVar3 = uVar2 + uVar3; bVar4 = param_4 != 0; } while ((bVar4) && (uVar3 < param_3)); } uVar2 = param_3 + 2; if (!bVar4) { uVar2 = uVar3; } return uVar2 - param_2; }
243
js_thisNumberValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisNumberValue(JSContext *ctx, JSValue this_val) { if (JS_IsNumber(this_val)) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_NUMBER) { if (JS_IsNumber(p->u.object_data)) return js_dup(p->u.object_data); } } return JS_ThrowTypeError(ctx, "not a number"); }
O1
c
js_thisNumberValue: pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rsi, 0x8(%rsp) cmpl $0x7, %edx je 0x7a721 testl %edx, %edx jne 0x7a732 movq %rbx, (%rsp) cmpl $-0x9, %edx jb 0x7a782 movq (%rsp), %rax incl (%rax) jmp 0x7a782 cmpl $-0x1, %edx jne 0x7a76d movq 0x8(%rsp), %rcx movb $0x1, %al cmpw $0x4, 0x6(%rcx) jne 0x7a769 movq 0x38(%rcx), %rdx cmpl $0x7, %edx je 0x7a752 testl %edx, %edx jne 0x7a769 movq 0x30(%rcx), %rbx movq %rbx, (%rsp) cmpl $-0x9, %edx jb 0x7a765 movq (%rsp), %rax incl (%rax) xorl %eax, %eax jmp 0x7a769 testb %al, %al je 0x7a782 leaq 0x25ad6(%rip), %rsi # 0xa024a xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 movl $0x6, %edx movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
js_thisNumberValue: push rbx sub rsp, 10h mov rbx, rsi mov [rsp+18h+var_10], rsi cmp edx, 7 jz short loc_7A721 test edx, edx jnz short loc_7A732 loc_7A721: mov [rsp+18h+var_18], rbx cmp edx, 0FFFFFFF7h jb short loc_7A782 mov rax, [rsp+18h+var_18] inc dword ptr [rax] jmp short loc_7A782 loc_7A732: cmp edx, 0FFFFFFFFh jnz short loc_7A76D mov rcx, [rsp+18h+var_10] mov al, 1 cmp word ptr [rcx+6], 4 jnz short loc_7A769 mov rdx, [rcx+38h] cmp edx, 7 jz short loc_7A752 test edx, edx jnz short loc_7A769 loc_7A752: mov rbx, [rcx+30h] mov [rsp+18h+var_18], rbx cmp edx, 0FFFFFFF7h jb short loc_7A765 mov rax, [rsp+18h+var_18] inc dword ptr [rax] loc_7A765: xor eax, eax jmp short $+2 loc_7A769: test al, al jz short loc_7A782 loc_7A76D: lea rsi, aSizeIsNotANumb+9; "not a number" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_7A782: mov rax, rbx add rsp, 10h pop rbx retn
long long js_thisNumberValue( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v15; // al char v17; // [rsp+0h] [rbp-18h] v14 = a2; if ( (_DWORD)a3 != 7 && (_DWORD)a3 ) { if ( (_DWORD)a3 != -1 ) goto LABEL_10; a4 = a2; v15 = 1; if ( *(_WORD *)(a2 + 6) == 4 ) { a3 = *(_QWORD *)(a2 + 56); if ( (_DWORD)a3 == 7 || !(_DWORD)a3 ) { v14 = *(_QWORD *)(a2 + 48); v17 = v14; v15 = 0; } } if ( v15 ) { LABEL_10: v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a number", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17); } } return v14; }
js_thisNumberValue: PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV qword ptr [RSP + 0x8],RSI CMP EDX,0x7 JZ 0x0017a721 TEST EDX,EDX JNZ 0x0017a732 LAB_0017a721: MOV qword ptr [RSP],RBX CMP EDX,-0x9 JC 0x0017a782 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] JMP 0x0017a782 LAB_0017a732: CMP EDX,-0x1 JNZ 0x0017a76d MOV RCX,qword ptr [RSP + 0x8] MOV AL,0x1 CMP word ptr [RCX + 0x6],0x4 JNZ 0x0017a769 MOV RDX,qword ptr [RCX + 0x38] CMP EDX,0x7 JZ 0x0017a752 TEST EDX,EDX JNZ 0x0017a769 LAB_0017a752: MOV RBX,qword ptr [RCX + 0x30] MOV qword ptr [RSP],RBX CMP EDX,-0x9 JC 0x0017a765 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_0017a765: XOR EAX,EAX JMP 0x0017a769 LAB_0017a769: TEST AL,AL JZ 0x0017a782 LAB_0017a76d: LEA RSI,[0x1a024a] XOR EBX,EBX XOR EAX,EAX CALL 0x00122567 MOV EDX,0x6 LAB_0017a782: MOV RAX,RBX ADD RSP,0x10 POP RBX RET
int1 [16] js_thisNumberValue(int8 param_1,int *param_2,int8 param_3) { bool bVar1; uint uVar2; int1 auVar3 [16]; uVar2 = (uint)param_3; if ((uVar2 == 7) || (uVar2 == 0)) { if (0xfffffff6 < uVar2) { *param_2 = *param_2 + 1; } } else { if (uVar2 == 0xffffffff) { bVar1 = true; if (*(short *)((long)param_2 + 6) == 4) { param_3 = *(int8 *)(param_2 + 0xe); uVar2 = (uint)param_3; if ((uVar2 == 7) || (uVar2 == 0)) { param_2 = *(int **)(param_2 + 0xc); if (0xfffffff6 < uVar2) { *param_2 = *param_2 + 1; } bVar1 = false; } } if (!bVar1) goto LAB_0017a782; } param_2 = (int *)0x0; JS_ThrowTypeError(param_1,"not a number"); param_3 = 6; } LAB_0017a782: auVar3._8_8_ = param_3; auVar3._0_8_ = param_2; return auVar3; }
244
js_thisNumberValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisNumberValue(JSContext *ctx, JSValue this_val) { if (JS_IsNumber(this_val)) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_NUMBER) { if (JS_IsNumber(p->u.object_data)) return js_dup(p->u.object_data); } } return JS_ThrowTypeError(ctx, "not a number"); }
O2
c
js_thisNumberValue: pushq %rbx movq %rsi, %rbx testl %edx, %edx je 0x66ebf cmpl $0x7, %edx je 0x66ebf cmpl $-0x1, %edx jne 0x66eac cmpw $0x4, 0x6(%rbx) jne 0x66eac movq 0x38(%rbx), %rdx cmpl $0x7, %edx je 0x66ea6 testl %edx, %edx jne 0x66eac movq 0x30(%rbx), %rbx jmp 0x66ebf leaq 0x202d1(%rip), %rsi # 0x87184 xorl %ebx, %ebx xorl %eax, %eax callq 0x1c64d pushq $0x6 popq %rdx movq %rbx, %rax popq %rbx retq
js_thisNumberValue: push rbx mov rbx, rsi test edx, edx jz short loc_66EBF cmp edx, 7 jz short loc_66EBF cmp edx, 0FFFFFFFFh jnz short loc_66EAC cmp word ptr [rbx+6], 4 jnz short loc_66EAC mov rdx, [rbx+38h] cmp edx, 7 jz short loc_66EA6 test edx, edx jnz short loc_66EAC loc_66EA6: mov rbx, [rbx+30h] jmp short loc_66EBF loc_66EAC: lea rsi, aSizeIsNotANumb+9; "not a number" xor ebx, ebx xor eax, eax call JS_ThrowTypeError push 6 pop rdx loc_66EBF: mov rax, rbx pop rbx retn
long long js_thisNumberValue( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] v14 = a2; if ( (_DWORD)a3 && (_DWORD)a3 != 7 ) { if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 4 && ((a3 = *(_QWORD *)(a2 + 56), (_DWORD)a3 == 7) || !(_DWORD)a3) ) { return *(_QWORD *)(a2 + 48); } else { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a number", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } } return v14; }
js_thisNumberValue: PUSH RBX MOV RBX,RSI TEST EDX,EDX JZ 0x00166ebf CMP EDX,0x7 JZ 0x00166ebf CMP EDX,-0x1 JNZ 0x00166eac CMP word ptr [RBX + 0x6],0x4 JNZ 0x00166eac MOV RDX,qword ptr [RBX + 0x38] CMP EDX,0x7 JZ 0x00166ea6 TEST EDX,EDX JNZ 0x00166eac LAB_00166ea6: MOV RBX,qword ptr [RBX + 0x30] JMP 0x00166ebf LAB_00166eac: LEA RSI,[0x187184] XOR EBX,EBX XOR EAX,EAX CALL 0x0011c64d PUSH 0x6 POP RDX LAB_00166ebf: MOV RAX,RBX POP RBX RET
int1 [16] js_thisNumberValue(int8 param_1,long param_2,int8 param_3) { int iVar1; int1 auVar2 [16]; iVar1 = (int)param_3; if ((iVar1 != 0) && (iVar1 != 7)) { if ((iVar1 == -1) && (*(short *)(param_2 + 6) == 4)) { param_3 = *(int8 *)(param_2 + 0x38); if (((int)param_3 == 7) || ((int)param_3 == 0)) { param_2 = *(long *)(param_2 + 0x30); goto LAB_00166ebf; } } param_2 = 0; JS_ThrowTypeError(param_1,"not a number"); param_3 = 6; } LAB_00166ebf: auVar2._8_8_ = param_3; auVar2._0_8_ = param_2; return auVar2; }
245
nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*)
ng-log[P]ng-log/src/logging.cc
void base::SetLogger(LogSeverity severity, base::Logger* logger) { std::lock_guard<std::mutex> l{log_mutex}; LogDestination::log_destination(severity)->SetLoggerImpl(logger); }
O3
cpp
nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movl %edi, %ebp leaq 0x36b2e(%rip), %rdi # 0x42d48 callq 0x77e0 testl %eax, %eax jne 0xc2bc movl %ebp, %r15d leaq 0x27a5f(%rip), %r12 # 0x33c90 movq (%r12,%r15,8), %r14 testq %r14, %r14 jne 0xc27a movl $0xd0, %edi callq 0x9030 movq %rax, %r14 movq %rax, %rdi movl %ebp, %esi xorl %edx, %edx callq 0xa838 leaq (%r12,%r15,8), %r15 leaq 0x8(%rsp), %r12 movq $0x0, (%r12) movq %r15, %rdi movq %r14, %rsi callq 0x12b2e movq %r12, %rdi callq 0x11748 movq (%r15), %r14 movq 0xc8(%r14), %rdi cmpq %rbx, %rdi je 0xc2a3 testq %rdi, %rdi sete %al cmpq %r14, %rdi sete %cl orb %al, %cl jne 0xc29c movq (%rdi), %rax callq *0x8(%rax) movq %rbx, 0xc8(%r14) leaq 0x36a9e(%rip), %rdi # 0x42d48 callq 0x73e0 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7340 movq %rax, %rbx movl $0xd0, %esi movq %r14, %rdi callq 0x907c jmp 0xc2d8 movq %rax, %rbx leaq 0x36a69(%rip), %rdi # 0x42d48 callq 0x73e0 movq %rbx, %rdi callq 0x7940
_ZN5nglog4base9SetLoggerENS_11LogSeverityEPNS0_6LoggerE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rsi mov ebp, edi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_C2BC mov r15d, ebp lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov r14, [r12+r15*8] test r14, r14 jnz short loc_C27A mov edi, 0D0h; unsigned __int64 call _Znwm; operator new(ulong) mov r14, rax mov rdi, rax mov esi, ebp xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r15, [r12+r15*8] lea r12, [rsp+38h+var_30] mov qword ptr [r12], 0 mov rdi, r15 mov rsi, r14 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r12 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov r14, [r15] loc_C27A: mov rdi, [r14+0C8h] cmp rdi, rbx jz short loc_C2A3 test rdi, rdi setz al cmp rdi, r14 setz cl or cl, al jnz short loc_C29C mov rax, [rdi] call qword ptr [rax+8] loc_C29C: mov [r14+0C8h], rbx loc_C2A3: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_C2BC: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r14; void * call _ZdlPvm; operator delete(void *,ulong) jmp short loc_C2D8 mov rbx, rax loc_C2D8: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::base::SetLogger(int a1, long long a2) { int v2; // eax long long v3; // r14 long long v4; // r14 long long v5; // rdi _QWORD v7[6]; // [rsp+8h] [rbp-30h] BYREF v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); v3 = nglog::LogDestination::log_destinations_[a1]; if ( !v3 ) { v4 = operator new(208LL); nglog::LogDestination::LogDestination(v4, a1, 0LL); v7[0] = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset( &nglog::LogDestination::log_destinations_[a1], v4); std::unique_ptr<nglog::LogDestination>::~unique_ptr(v7); v3 = nglog::LogDestination::log_destinations_[a1]; } v5 = *(_QWORD *)(v3 + 200); if ( v5 != a2 ) { if ( v5 != 0 && v5 != v3 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); *(_QWORD *)(v3 + 200) = a2; } return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogger: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV EBP,EDI LEA RDI,[0x142d48] CALL 0x001077e0 TEST EAX,EAX JNZ 0x0010c2bc MOV R15D,EBP LEA R12,[0x133c90] MOV R14,qword ptr [R12 + R15*0x8] TEST R14,R14 JNZ 0x0010c27a LAB_0010c23a: MOV EDI,0xd0 CALL 0x00109030 LAB_0010c244: MOV R14,RAX MOV RDI,RAX MOV ESI,EBP XOR EDX,EDX CALL 0x0010a838 LAB_0010c253: LEA R15,[R12 + R15*0x8] LEA R12,[RSP + 0x8] MOV qword ptr [R12],0x0 MOV RDI,R15 MOV RSI,R14 CALL 0x00112b2e MOV RDI,R12 CALL 0x00111748 MOV R14,qword ptr [R15] LAB_0010c27a: MOV RDI,qword ptr [R14 + 0xc8] CMP RDI,RBX JZ 0x0010c2a3 TEST RDI,RDI SETZ AL CMP RDI,R14 SETZ CL OR CL,AL JNZ 0x0010c29c MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010c29c: MOV qword ptr [R14 + 0xc8],RBX LAB_0010c2a3: LEA RDI,[0x142d48] CALL 0x001073e0 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010c2bc: MOV EDI,EAX CALL 0x00107340
/* nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) */ void nglog::base::SetLogger(uint param_1,long *param_2) { long *plVar1; int iVar2; LogDestination *pLVar3; long *plVar4; int8 local_30; iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar2 == 0) { plVar4 = (long *)(&LogDestination::log_destinations_)[param_1]; if (plVar4 == (long *)0x0) { /* try { // try from 0010c23a to 0010c243 has its CatchHandler @ 0010c2d5 */ pLVar3 = (LogDestination *)operator_new(0xd0); /* try { // try from 0010c244 to 0010c252 has its CatchHandler @ 0010c2c3 */ LogDestination::LogDestination(pLVar3,param_1,0); local_30 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset ((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)(&LogDestination::log_destinations_ + param_1),pLVar3); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_30); plVar4 = *(long **)(&LogDestination::log_destinations_ + param_1); } plVar1 = (long *)plVar4[0x19]; if (plVar1 != param_2) { if (plVar1 != plVar4 && plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } plVar4[0x19] = (long)param_2; } pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
246
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)
llama.cpp/common/json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xce94e movb $0x2, (%r14) movl $0x18, %edi callq 0x20210 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x852f2 jmp 0xce953 cmpl $0x2, %eax jne 0xce974 movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0xceb24 movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x8a9a4 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x516b2(%rip), %rsi # 0x12004a leaq 0x10(%rsp), %rdi callq 0xcea9b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x8a7cc xorl %ebp, %ebp leaq 0x9167d(%rip), %rsi # 0x160040 leaq -0x58072(%rip), %rdx # 0x76958 movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xce9f0 movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xce9fa jmp 0xcea02 movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20af0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_CE94E mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_CE953 loc_CE94E: cmp eax, 2 jnz short loc_CE974 loc_CE953: mov rdi, [r14+8] mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) mov rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn loc_CE974: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CE9F0 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CE9F0: test bpl, bpl jnz short loc_CE9FA jmp short loc_CEA02 mov r14, rax loc_CE9FA: mov rdi, rbx; void * call ___cxa_free_exception loc_CEA02: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( v5, "cannot use emplace_back() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 311, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; v2 = operator new(0x18uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>( *(_QWORD *)(a1 + 8), a2); return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL; }
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001ce94e MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00120210 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x001852f2 JMP 0x001ce953 LAB_001ce94e: CMP EAX,0x2 JNZ 0x001ce974 LAB_001ce953: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX CALL 0x001ceb24 MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001ce974: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0018a9a4 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001ce991: LEA RSI,[0x22004a] LEA RDI,[RSP + 0x10] CALL 0x001cea9b MOV BPL,0x1 LAB_001ce9a5: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0018a7cc XOR EBP,EBP LEA RSI,[0x260040] LEA RDX,[0x176958] MOV RDI,RBX CALL 0x00120a50
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar1 = (int8 *)operator_new(0x18); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001ce991 to 001ce9a1 has its CatchHandler @ 001ce9f7 */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 001ce9a5 to 001ce9d1 has its CatchHandler @ 001ce9d2 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8),param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
247
ma_SHA1Final
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Final(unsigned char digest[20], _MA_SHA1_CTX * context) { unsigned char bits[8]; unsigned int index, padLen; /* Save number of bits */ bits[7] = context->count[0] & 0xFF; bits[6] = (context->count[0] >> 8) & 0xFF; bits[5] = (context->count[0] >> 16) & 0xFF; bits[4] = (context->count[0] >> 24) & 0xFF; bits[3] = context->count[1] & 0xFF; bits[2] = (context->count[1] >> 8) & 0xFF; bits[1] = (context->count[1] >> 16) & 0xFF; bits[0] = (context->count[1] >> 24) & 0xFF; /* Pad out to 56 mod 64. */ index = (unsigned int) ((context->count[0] >> 3) & 0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); ma_SHA1Update(context, PADDING, padLen); /* Append length (before padding) */ ma_SHA1Update(context, bits, 8); /* Store state in digest */ ma_SHA1Encode(digest, context->state, 20); /* Zeroize sensitive information. */ memset((unsigned char*) context, 0, sizeof(*context)); }
O0
c
ma_SHA1Final: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax andl $0xff, %eax movb %al, -0x9(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x8, %eax andl $0xff, %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x10, %eax andl $0xff, %eax movb %al, -0xb(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x18, %eax andl $0xff, %eax movb %al, -0xc(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax andl $0xff, %eax movb %al, -0xd(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x8, %eax andl $0xff, %eax movb %al, -0xe(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x10, %eax andl $0xff, %eax movb %al, -0xf(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x18, %eax andl $0xff, %eax movb %al, -0x10(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x3, %eax andl $0x3f, %eax movl %eax, -0x24(%rbp) cmpl $0x38, -0x24(%rbp) jae 0xd2a6a movl $0x38, %eax subl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0xd2a75 movl $0x78, %eax subl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x28(%rbp) movq -0x20(%rbp), %rdi movl -0x28(%rbp), %eax movl %eax, %edx leaq 0x1e0235(%rip), %rsi # 0x2b2cc0 callq 0xd0c30 movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movl $0x8, %edx callq 0xd0c30 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movl $0x14, %edx callq 0xd2af0 movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x4c(%rax) movups %xmm0, 0x40(%rax) movups %xmm0, 0x30(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, (%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd2aea addq $0x30, %rsp popq %rbp retq callq 0x3a2a0 nop
ma_SHA1Final: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_20] mov eax, [rax+14h] and eax, 0FFh mov [rbp+var_9], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 8 and eax, 0FFh mov [rbp+var_A], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 10h and eax, 0FFh mov [rbp+var_B], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 18h and eax, 0FFh mov [rbp+var_C], al mov rax, [rbp+var_20] mov eax, [rax+18h] and eax, 0FFh mov [rbp+var_D], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 8 and eax, 0FFh mov [rbp+var_E], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 10h and eax, 0FFh mov [rbp+var_F], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 18h and eax, 0FFh mov [rbp+var_10], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 3 and eax, 3Fh mov [rbp+var_24], eax cmp [rbp+var_24], 38h ; '8' jnb short loc_D2A6A mov eax, 38h ; '8' sub eax, [rbp+var_24] mov [rbp+var_2C], eax jmp short loc_D2A75 loc_D2A6A: mov eax, 78h ; 'x' sub eax, [rbp+var_24] mov [rbp+var_2C], eax loc_D2A75: mov eax, [rbp+var_2C] mov [rbp+var_28], eax mov rdi, [rbp+var_20] mov eax, [rbp+var_28] mov edx, eax lea rsi, PADDING call ma_SHA1Update mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov edx, 8 call ma_SHA1Update mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, 14h call ma_SHA1Encode mov rax, [rbp+var_20] xorps xmm0, xmm0 movups xmmword ptr [rax+4Ch], xmm0 movups xmmword ptr [rax+40h], xmm0 movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D2AEA add rsp, 30h pop rbp retn loc_D2AEA: call ___stack_chk_fail
unsigned long long ma_SHA1Final(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] unsigned int v4; // [rsp+Ch] [rbp-24h] _BYTE v5[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v6; // [rsp+28h] [rbp-8h] v6 = __readfsqword(0x28u); v5[7] = *(_DWORD *)(a2 + 20); v5[6] = BYTE1(*(_DWORD *)(a2 + 20)); v5[5] = BYTE2(*(_DWORD *)(a2 + 20)); v5[4] = HIBYTE(*(_DWORD *)(a2 + 20)); v5[3] = *(_DWORD *)(a2 + 24); v5[2] = BYTE1(*(_DWORD *)(a2 + 24)); v5[1] = BYTE2(*(_DWORD *)(a2 + 24)); v5[0] = HIBYTE(*(_DWORD *)(a2 + 24)); v4 = (*(_DWORD *)(a2 + 20) >> 3) & 0x3F; if ( v4 >= 0x38 ) v3 = 120 - v4; else v3 = 56 - v4; ma_SHA1Update(a2, (long long)&PADDING, v3); ma_SHA1Update(a2, (long long)v5, 8uLL); ma_SHA1Encode(a1, a2, 20LL); *(_OWORD *)(a2 + 76) = 0LL; *(_OWORD *)(a2 + 64) = 0LL; *(_OWORD *)(a2 + 48) = 0LL; *(_OWORD *)(a2 + 32) = 0LL; *(_OWORD *)(a2 + 16) = 0LL; *(_OWORD *)a2 = 0LL; return __readfsqword(0x28u); }
ma_SHA1Final: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] AND EAX,0xff MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x8 AND EAX,0xff MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x10 AND EAX,0xff MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x18 AND EAX,0xff MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0xff MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x8 AND EAX,0xff MOV byte ptr [RBP + -0xe],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x10 AND EAX,0xff MOV byte ptr [RBP + -0xf],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x18 AND EAX,0xff MOV byte ptr [RBP + -0x10],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x3 AND EAX,0x3f MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x38 JNC 0x001d2a6a MOV EAX,0x38 SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001d2a75 LAB_001d2a6a: MOV EAX,0x78 SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX LAB_001d2a75: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x28] MOV EDX,EAX LEA RSI,[0x3b2cc0] CALL 0x001d0c30 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV EDX,0x8 CALL 0x001d0c30 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0x14 CALL 0x001d2af0 MOV RAX,qword ptr [RBP + -0x20] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x4c],XMM0 MOVUPS xmmword ptr [RAX + 0x40],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001d2aea ADD RSP,0x30 POP RBP RET LAB_001d2aea: CALL 0x0013a2a0
void ma_SHA1Final(int8 param_1,int8 *param_2) { uint uVar1; long in_FS_OFFSET; int local_34; int1 local_18; int1 local_17; int1 local_16; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_11 = (int1)*(int4 *)((long)param_2 + 0x14); local_12 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 8); local_13 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x10); local_14 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x18); local_15 = (int1)*(int4 *)(param_2 + 3); local_16 = (int1)((uint)*(int4 *)(param_2 + 3) >> 8); local_17 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x10); local_18 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x18); uVar1 = *(uint *)((long)param_2 + 0x14) >> 3 & 0x3f; if (uVar1 < 0x38) { local_34 = 0x38 - uVar1; } else { local_34 = 0x78 - uVar1; } ma_SHA1Update(param_2,PADDING,local_34); ma_SHA1Update(param_2,&local_18,8); ma_SHA1Encode(param_1,param_2,0x14); *(int8 *)((long)param_2 + 0x4c) = 0; *(int8 *)((long)param_2 + 0x54) = 0; param_2[8] = 0; param_2[9] = 0; param_2[6] = 0; param_2[7] = 0; param_2[4] = 0; param_2[5] = 0; param_2[2] = 0; param_2[3] = 0; *param_2 = 0; param_2[1] = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
248
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer()
angrymouse[P]emittra/include/concurrentqueue.h
~ExplicitProducer() { // Destruct any elements not yet dequeued. // Since we're in the destructor, we can assume all elements // are either completely dequeued or completely not (no halfways). if (this->tailBlock != nullptr) { // Note this means there must be a block index too // First find the block that's partially dequeued, if any Block* halfDequeuedBlock = nullptr; if ((this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) != 0) { // The head's not on a block boundary, meaning a block somewhere is partially dequeued // (or the head block is the tail block and was fully dequeued, but the head/tail are still not on a boundary) size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1); while (details::circular_less_than<index_t>(pr_blockIndexEntries[i].base + BLOCK_SIZE, this->headIndex.load(std::memory_order_relaxed))) { i = (i + 1) & (pr_blockIndexSize - 1); } assert(details::circular_less_than<index_t>(pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed))); halfDequeuedBlock = pr_blockIndexEntries[i].block; } // Start at the head block (note the first line in the loop gives us the head from the tail on the first iteration) auto block = this->tailBlock; do { block = block->next; if (block->ConcurrentQueue::Block::template is_empty<explicit_context>()) { continue; } size_t i = 0; // Offset into block if (block == halfDequeuedBlock) { i = static_cast<size_t>(this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); } // Walk through all the items in the block; if this is the tail block, we need to stop when we reach the tail index auto lastValidIndex = (this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) == 0 ? BLOCK_SIZE : static_cast<size_t>(this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) { (*block)[i++]->~T(); } } while (block != this->tailBlock); } // Destroy all blocks that we own if (this->tailBlock != nullptr) { auto block = this->tailBlock; do { auto nextBlock = block->next; this->parent->add_block_to_free_list(block); block = nextBlock; } while (block != this->tailBlock); } // Destroy the block indices auto header = static_cast<BlockIndexHeader*>(pr_blockIndexRaw); while (header != nullptr) { auto prev = static_cast<BlockIndexHeader*>(header->prev); header->~BlockIndexHeader(); (Traits::free)(header); header = prev; } }
O0
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x162b0 movq 0x8(%rsp), %rdi movl $0x88, %esi callq 0x42e0 addq $0x18, %rsp retq nopl (%rax)
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_10], rdi call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD2Ev; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() mov rdi, [rsp+18h+var_10]; void * mov esi, 88h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 18h retn
void moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer( _QWORD *a1, void *a2) { moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer( a1, a2); operator delete(a1, 0x88uLL); }
~ExplicitProducer: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x001162b0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x88 CALL 0x001042e0 ADD RSP,0x18 RET
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() */ void __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ExplicitProducer::~ExplicitProducer(ExplicitProducer *this) { ~ExplicitProducer(this); operator_delete(this,0x88); return; }
249
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer()
angrymouse[P]emittra/include/concurrentqueue.h
~ExplicitProducer() { // Destruct any elements not yet dequeued. // Since we're in the destructor, we can assume all elements // are either completely dequeued or completely not (no halfways). if (this->tailBlock != nullptr) { // Note this means there must be a block index too // First find the block that's partially dequeued, if any Block* halfDequeuedBlock = nullptr; if ((this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) != 0) { // The head's not on a block boundary, meaning a block somewhere is partially dequeued // (or the head block is the tail block and was fully dequeued, but the head/tail are still not on a boundary) size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1); while (details::circular_less_than<index_t>(pr_blockIndexEntries[i].base + BLOCK_SIZE, this->headIndex.load(std::memory_order_relaxed))) { i = (i + 1) & (pr_blockIndexSize - 1); } assert(details::circular_less_than<index_t>(pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed))); halfDequeuedBlock = pr_blockIndexEntries[i].block; } // Start at the head block (note the first line in the loop gives us the head from the tail on the first iteration) auto block = this->tailBlock; do { block = block->next; if (block->ConcurrentQueue::Block::template is_empty<explicit_context>()) { continue; } size_t i = 0; // Offset into block if (block == halfDequeuedBlock) { i = static_cast<size_t>(this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); } // Walk through all the items in the block; if this is the tail block, we need to stop when we reach the tail index auto lastValidIndex = (this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) == 0 ? BLOCK_SIZE : static_cast<size_t>(this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) { (*block)[i++]->~T(); } } while (block != this->tailBlock); } // Destroy all blocks that we own if (this->tailBlock != nullptr) { auto block = this->tailBlock; do { auto nextBlock = block->next; this->parent->add_block_to_free_list(block); block = nextBlock; } while (block != this->tailBlock); } // Destroy the block indices auto header = static_cast<BlockIndexHeader*>(pr_blockIndexRaw); while (header != nullptr) { auto prev = static_cast<BlockIndexHeader*>(header->prev); header->~BlockIndexHeader(); (Traits::free)(header); header = prev; } }
O1
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(): pushq %rbx movq %rdi, %rbx callq 0x81ee movl $0x88, %esi movq %rbx, %rdi popq %rbx jmp 0x32b0 nop
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD0Ev: push rbx mov rbx, rdi call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD2Ev; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() mov esi, 88h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer( _QWORD *a1) { moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(a1); operator delete(a1, 0x88uLL); }
~ExplicitProducer: PUSH RBX MOV RBX,RDI CALL 0x001081ee MOV ESI,0x88 MOV RDI,RBX POP RBX JMP 0x001032b0
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() */ void __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ExplicitProducer::~ExplicitProducer(ExplicitProducer *this) { ~ExplicitProducer(this); operator_delete(this,0x88); return; }
250
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer()
angrymouse[P]emittra/include/concurrentqueue.h
~ExplicitProducer() { // Destruct any elements not yet dequeued. // Since we're in the destructor, we can assume all elements // are either completely dequeued or completely not (no halfways). if (this->tailBlock != nullptr) { // Note this means there must be a block index too // First find the block that's partially dequeued, if any Block* halfDequeuedBlock = nullptr; if ((this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) != 0) { // The head's not on a block boundary, meaning a block somewhere is partially dequeued // (or the head block is the tail block and was fully dequeued, but the head/tail are still not on a boundary) size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1); while (details::circular_less_than<index_t>(pr_blockIndexEntries[i].base + BLOCK_SIZE, this->headIndex.load(std::memory_order_relaxed))) { i = (i + 1) & (pr_blockIndexSize - 1); } assert(details::circular_less_than<index_t>(pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed))); halfDequeuedBlock = pr_blockIndexEntries[i].block; } // Start at the head block (note the first line in the loop gives us the head from the tail on the first iteration) auto block = this->tailBlock; do { block = block->next; if (block->ConcurrentQueue::Block::template is_empty<explicit_context>()) { continue; } size_t i = 0; // Offset into block if (block == halfDequeuedBlock) { i = static_cast<size_t>(this->headIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); } // Walk through all the items in the block; if this is the tail block, we need to stop when we reach the tail index auto lastValidIndex = (this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)) == 0 ? BLOCK_SIZE : static_cast<size_t>(this->tailIndex.load(std::memory_order_relaxed) & static_cast<index_t>(BLOCK_SIZE - 1)); while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) { (*block)[i++]->~T(); } } while (block != this->tailBlock); } // Destroy all blocks that we own if (this->tailBlock != nullptr) { auto block = this->tailBlock; do { auto nextBlock = block->next; this->parent->add_block_to_free_list(block); block = nextBlock; } while (block != this->tailBlock); } // Destroy the block indices auto header = static_cast<BlockIndexHeader*>(pr_blockIndexRaw); while (header != nullptr) { auto prev = static_cast<BlockIndexHeader*>(header->prev); header->~BlockIndexHeader(); (Traits::free)(header); header = prev; } }
O2
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer(): pushq %rbx movq %rdi, %rbx callq 0x717a movl $0x88, %esi movq %rbx, %rdi popq %rbx jmp 0x32b0 nop
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD0Ev: push rbx mov rbx, rdi call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerD2Ev; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() mov esi, 88h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer( _QWORD *a1, unsigned long long a2) { moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer( a1, a2); operator delete(a1, 0x88uLL); }
~ExplicitProducer: PUSH RBX MOV RBX,RDI CALL 0x0010717a MOV ESI,0x88 MOV RDI,RBX POP RBX JMP 0x001032b0
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::~ExplicitProducer() */ void __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ExplicitProducer::~ExplicitProducer(ExplicitProducer *this) { ~ExplicitProducer(this); operator_delete(this,0x88); return; }
251
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O0
c
my_thread_global_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0x861ba cmpb $0x0, 0x37a5cf(%rip) # 0x400790 je 0x861c9 movb $0x0, -0x1(%rbp) jmp 0x8623c movb $0x1, 0x37a5c0(%rip) # 0x400790 leaq 0x37a2f5(%rip), %rax # 0x4004cc cmpb $0x0, (%rax) jne 0x86215 leaq 0x37a5b1(%rip), %rdi # 0x400794 xorl %eax, %eax movl %eax, %esi callq 0x285e0 movl %eax, -0x8(%rbp) cmpl $0x0, %eax je 0x86215 movq 0x1b4de5(%rip), %rax # 0x23afe0 movq (%rax), %rdi movl -0x8(%rbp), %edx leaq 0x5784b(%rip), %rsi # 0xdda53 movb $0x0, %al callq 0x284f0 movb $0x1, -0x1(%rbp) jmp 0x8623c leaq 0x37a2b0(%rip), %rax # 0x4004cc movb $0x1, (%rax) callq 0x860b0 callq 0x86250 cmpb $0x0, %al je 0x86233 movb $0x1, -0x1(%rbp) jmp 0x8623c callq 0x85fe0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_init: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_861BA: cmp cs:my_thread_global_init_done, 0 jz short loc_861C9 mov [rbp+var_1], 0 jmp short loc_8623C loc_861C9: mov cs:my_thread_global_init_done, 1 lea rax, my_thr_key_mysys_exists cmp byte ptr [rax], 0 jnz short loc_86215 lea rdi, THR_KEY_mysys xor eax, eax mov esi, eax call _pthread_key_create mov [rbp+var_8], eax cmp eax, 0 jz short loc_86215 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_8] lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_8623C loc_86215: lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 1 call my_thread_init_internal_mutex call my_thread_init cmp al, 0 jz short loc_86233 mov [rbp+var_1], 1 jmp short loc_8623C loc_86233: call my_thread_init_common_mutex mov [rbp+var_1], 0 loc_8623C: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
char my_thread_global_init() { int v1; // [rsp+8h] [rbp-8h] if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); if ( (unsigned __int8)my_thread_init() ) { return 1; } else { my_thread_init_common_mutex(); return 0; } } else { fprintf(stderr, "Can't initialize threads: error %d\n", v1); return 1; } }
my_thread_global_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x001861ba LAB_001861ba: CMP byte ptr [0x00500790],0x0 JZ 0x001861c9 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0018623c LAB_001861c9: MOV byte ptr [0x00500790],0x1 LEA RAX,[0x5004cc] CMP byte ptr [RAX],0x0 JNZ 0x00186215 LEA RDI,[0x500794] XOR EAX,EAX MOV ESI,EAX CALL 0x001285e0 MOV dword ptr [RBP + -0x8],EAX CMP EAX,0x0 JZ 0x00186215 MOV RAX,qword ptr [0x0033afe0] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] LEA RSI,[0x1dda53] MOV AL,0x0 CALL 0x001284f0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018623c LAB_00186215: LEA RAX,[0x5004cc] MOV byte ptr [RAX],0x1 CALL 0x001860b0 CALL 0x00186250 CMP AL,0x0 JZ 0x00186233 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018623c LAB_00186233: CALL 0x00185fe0 MOV byte ptr [RBP + -0x1],0x0 LAB_0018623c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 my_thread_global_init(void) { char cVar1; uint uVar2; int1 local_9; if (my_thread_global_init_done == '\0') { my_thread_global_init_done = '\x01'; if ((my_thr_key_mysys_exists == '\0') && (uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) { fprintf(*(FILE **)PTR_stderr_0033afe0,"Can\'t initialize threads: error %d\n",(ulong)uVar2); return 1; } my_thr_key_mysys_exists = '\x01'; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
252
my_write
eloqsql/mysys/my_write.c
size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) { size_t writtenbytes, written; uint errors; DBUG_ENTER("my_write"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); errors= 0; written= 0; if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; /* The behavior of write(fd, buf, 0) is not portable */ if (unlikely(!Count)) DBUG_RETURN(0); for (;;) { #ifdef _WIN32 if(Filedes < 0) { my_errno= errno= EBADF; DBUG_RETURN((size_t)-1); } writtenbytes= my_win_write(Filedes, Buffer, Count); #else writtenbytes= write(Filedes, Buffer, Count); #endif /** To simulate the write error set the errno = error code and the number pf written bytes to -1. */ DBUG_EXECUTE_IF ("simulate_file_write_error", if (!errors) { errno= ENOSPC; writtenbytes= (size_t) -1; }); if (writtenbytes == Count) break; if (writtenbytes != (size_t) -1) { /* Safeguard */ written+= writtenbytes; Buffer+= writtenbytes; Count-= writtenbytes; } my_errno= errno; DBUG_PRINT("error",("Write only %ld bytes, error: %d", (long) writtenbytes, my_errno)); #ifndef NO_BACKGROUND if (my_thread_var->abort) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ if ((my_errno == ENOSPC || my_errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { wait_for_free_space(my_filename(Filedes), errors); errors++; continue; } if ((writtenbytes == 0 || writtenbytes == (size_t) -1)) { if (my_errno == EINTR) { DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld", (long) writtenbytes)); continue; /* Interrupted */ } if (!writtenbytes && !errors++) /* Retry once */ { /* We may come here if the file quota is exeeded */ errno= EFBIG; /* Assume this is the error */ continue; } } else continue; /* Retry */ #endif /* Don't give a warning if it's ok that we only write part of the data */ if (MyFlags & (MY_NABP | MY_FNABP)) { if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ } break; /* Return bytes written */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Want only errors */ DBUG_RETURN(writtenbytes+written); }
O3
c
my_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movl %edi, %r12d xorl %ebx, %ebx movl $0x0, %r13d testb $0x1a, %cl jne 0x2f38c leaq 0xbe30cf(%rip), %rax # 0xc12458 movq (%rax), %r13 testq %r15, %r15 je 0x2f4d0 orq %rcx, %r13 movl %r12d, %edi movq %rsi, -0x40(%rbp) movq %r15, %rdx callq 0x297a0 cmpq %r15, %rax jne 0x2f3c2 movq %r15, %rcx xorl %ebx, %ebx testb $0x6, %r13b je 0x2f4cd xorl %ebx, %ebx jmp 0x2f4d0 movq %rax, %r14 movq $0x0, -0x38(%rbp) callq 0x29750 movq %r15, %rcx movq %rax, -0x48(%rbp) xorl %ebx, %ebx movq -0x40(%rbp), %r15 movl %r12d, -0x2c(%rbp) movq %r13, %r12 movq %rbx, %rax cmpq $-0x1, %r14 movl $0x0, %ebx cmovneq %r14, %rbx addq %rbx, %r15 subq %rbx, %rcx movq %rcx, -0x40(%rbp) addq %rax, %rbx movq -0x48(%rbp), %rax movl (%rax), %r13d callq 0xa7c22 movl %r13d, (%rax) callq 0xa7c22 movl %r12d, %r13d andl $-0x21, %r13d cmpl $0x0, 0xe0(%rax) cmoveq %r12, %r13 callq 0xa7c22 cmpl $0x1c, (%rax) jne 0x2f43f testb $0x20, %r13b movl -0x2c(%rbp), %r12d je 0x2f455 jmp 0x2f48f callq 0xa7c22 cmpl $0x7a, (%rax) movl -0x2c(%rbp), %r12d jne 0x2f455 movl %r13d, %eax andl $0x20, %eax jne 0x2f48f leaq 0x1(%r14), %rax cmpq $0x1, %rax ja 0x2f469 callq 0xa7c22 cmpl $0x4, (%rax) jne 0x2f4af movl %r12d, %edi movq %r15, %rsi movq -0x40(%rbp), %r14 movq %r14, %rdx callq 0x297a0 movq %r14, %rcx movq %rax, %r14 cmpq %rcx, %rax jne 0x2f3e3 jmp 0x2f3b1 movl %r12d, %edi callq 0xaf094 movq %rax, %rdi movq -0x38(%rbp), %r14 movl %r14d, %esi callq 0xaeb02 incl %r14d movq %r14, -0x38(%rbp) jmp 0x2f469 testq %r14, %r14 jne 0x2f4e2 cmpl $0x0, -0x38(%rbp) jne 0x2f4e2 movq -0x48(%rbp), %rax movl $0x1b, (%rax) pushq $0x1 popq %rax movq %rax, -0x38(%rbp) jmp 0x2f469 addq %rcx, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x6, %r13b je 0x2f520 pushq $-0x1 popq %rbx testb $0x1a, %r13b je 0x2f4d0 andl $0x440, %r13d # imm = 0x440 orq $0x4, %r13 movl %r12d, %edi callq 0xaf094 movq %rax, %r14 callq 0xa7c22 movl (%rax), %ecx pushq $0x3 popq %rdi movq %r13, %rsi movq %r14, %rdx xorl %eax, %eax callq 0xa4207 jmp 0x2f4d0 movq %r14, %rcx jmp 0x2f3b1
my_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r12d, edi xor ebx, ebx mov r13d, 0 test cl, 1Ah jnz short loc_2F38C lea rax, my_global_flags mov r13, [rax] loc_2F38C: test r15, r15 jz loc_2F4D0 or r13, rcx mov edi, r12d mov [rbp+var_40], rsi mov rdx, r15 call _write cmp rax, r15 jnz short loc_2F3C2 mov rcx, r15 xor ebx, ebx loc_2F3B1: test r13b, 6 jz loc_2F4CD xor ebx, ebx jmp loc_2F4D0 loc_2F3C2: mov r14, rax mov [rbp+var_38], 0 call ___errno_location mov rcx, r15 mov [rbp+var_48], rax xor ebx, ebx mov r15, [rbp+var_40] mov [rbp+var_2C], r12d loc_2F3E3: mov r12, r13 mov rax, rbx cmp r14, 0FFFFFFFFFFFFFFFFh mov ebx, 0 cmovnz rbx, r14 add r15, rbx sub rcx, rbx mov [rbp+var_40], rcx add rbx, rax mov rax, [rbp+var_48] mov r13d, [rax] call _my_thread_var mov [rax], r13d call _my_thread_var mov r13d, r12d and r13d, 0FFFFFFDFh cmp dword ptr [rax+0E0h], 0 cmovz r13, r12 call _my_thread_var cmp dword ptr [rax], 1Ch jnz short loc_2F43F test r13b, 20h mov r12d, [rbp+var_2C] jz short loc_2F455 jmp short loc_2F48F loc_2F43F: call _my_thread_var cmp dword ptr [rax], 7Ah ; 'z' mov r12d, [rbp+var_2C] jnz short loc_2F455 mov eax, r13d and eax, 20h jnz short loc_2F48F loc_2F455: lea rax, [r14+1] cmp rax, 1 ja short loc_2F469 call _my_thread_var cmp dword ptr [rax], 4 jnz short loc_2F4AF loc_2F469: mov edi, r12d mov rsi, r15 mov r14, [rbp+var_40] mov rdx, r14 call _write mov rcx, r14 mov r14, rax cmp rax, rcx jnz loc_2F3E3 jmp loc_2F3B1 loc_2F48F: mov edi, r12d call my_filename mov rdi, rax mov r14, [rbp+var_38] mov esi, r14d call wait_for_free_space inc r14d mov [rbp+var_38], r14 jmp short loc_2F469 loc_2F4AF: test r14, r14 jnz short loc_2F4E2 cmp dword ptr [rbp+var_38], 0 jnz short loc_2F4E2 mov rax, [rbp+var_48] mov dword ptr [rax], 1Bh push 1 pop rax mov [rbp+var_38], rax jmp short loc_2F469 loc_2F4CD: add rbx, rcx loc_2F4D0: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2F4E2: test r13b, 6 jz short loc_2F520 push 0FFFFFFFFFFFFFFFFh pop rbx test r13b, 1Ah jz short loc_2F4D0 and r13d, 440h or r13, 4 mov edi, r12d call my_filename mov r14, rax call _my_thread_var mov ecx, [rax] push 3 pop rdi mov rsi, r13 mov rdx, r14 xor eax, eax call my_error jmp short loc_2F4D0 loc_2F520: mov rcx, r14 jmp loc_2F3B1
long long my_write(unsigned int a1, long long a2, long long a3, long long a4) { long long v5; // rbx long long v6; // r13 long long v7; // r13 long long v8; // rax long long v9; // rcx long long v10; // rbx long long v11; // r14 long long v12; // rax long long v13; // r15 long long v14; // r12 long long v15; // rax long long v16; // rbx int v17; // r13d unsigned int v18; // r12d long long v19; // rax long long v20; // rax int v22; // r14d _DWORD *v23; // rax int v24; // r8d int v25; // r9d int *v26; // [rsp+8h] [rbp-48h] long long v27; // [rsp+10h] [rbp-40h] unsigned int v28; // [rsp+18h] [rbp-38h] v5 = 0LL; v6 = 0LL; if ( (a4 & 0x1A) == 0 ) v6 = my_global_flags; if ( a3 ) { v7 = a4 | v6; v8 = write(a1, a2, a3); if ( v8 == a3 ) { v9 = a3; v10 = 0LL; goto LABEL_6; } v11 = v8; v28 = 0; v12 = __errno_location(a1); v9 = a3; v26 = (int *)v12; v10 = 0LL; v13 = a2; while ( 1 ) { v14 = v7; v15 = v10; v16 = 0LL; if ( v11 != -1 ) v16 = v11; v13 += v16; v27 = v9 - v16; v10 = v15 + v16; v17 = *v26; *(_DWORD *)my_thread_var() = v17; v7 = (unsigned int)v14 & 0xFFFFFFDF; if ( !*(_DWORD *)(my_thread_var() + 224) ) v7 = v14; if ( *(_DWORD *)my_thread_var() == 28 ) { v18 = a1; if ( (v7 & 0x20) != 0 ) goto LABEL_22; } else { v18 = a1; if ( *(_DWORD *)my_thread_var() == 122 && (v7 & 0x20) != 0 ) { LABEL_22: v20 = my_filename(v18); wait_for_free_space(v20, v28++); goto LABEL_20; } } if ( (unsigned long long)(v11 + 1) <= 1 && *(_DWORD *)my_thread_var() != 4 ) { if ( v11 || v28 ) { if ( (v7 & 6) != 0 ) { v5 = -1LL; if ( (v7 & 0x1A) != 0 ) { v22 = my_filename(v18); v23 = (_DWORD *)my_thread_var(); my_error(3, v7 & 0x440 | 4, v22, *v23, v24, v25); } return v5; } v9 = v11; LABEL_6: if ( (v7 & 6) != 0 ) return 0LL; else return v9 + v10; } *v26 = 27; v28 = 1; } LABEL_20: v19 = write(v18, v13, v27); v9 = v27; v11 = v19; if ( v19 == v27 ) goto LABEL_6; } } return v5; }
my_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R12D,EDI XOR EBX,EBX MOV R13D,0x0 TEST CL,0x1a JNZ 0x0012f38c LEA RAX,[0xd12458] MOV R13,qword ptr [RAX] LAB_0012f38c: TEST R15,R15 JZ 0x0012f4d0 OR R13,RCX MOV EDI,R12D MOV qword ptr [RBP + -0x40],RSI MOV RDX,R15 CALL 0x001297a0 CMP RAX,R15 JNZ 0x0012f3c2 MOV RCX,R15 XOR EBX,EBX LAB_0012f3b1: TEST R13B,0x6 JZ 0x0012f4cd XOR EBX,EBX JMP 0x0012f4d0 LAB_0012f3c2: MOV R14,RAX MOV qword ptr [RBP + -0x38],0x0 CALL 0x00129750 MOV RCX,R15 MOV qword ptr [RBP + -0x48],RAX XOR EBX,EBX MOV R15,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x2c],R12D LAB_0012f3e3: MOV R12,R13 MOV RAX,RBX CMP R14,-0x1 MOV EBX,0x0 CMOVNZ RBX,R14 ADD R15,RBX SUB RCX,RBX MOV qword ptr [RBP + -0x40],RCX ADD RBX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV R13D,dword ptr [RAX] CALL 0x001a7c22 MOV dword ptr [RAX],R13D CALL 0x001a7c22 MOV R13D,R12D AND R13D,0xffffffdf CMP dword ptr [RAX + 0xe0],0x0 CMOVZ R13,R12 CALL 0x001a7c22 CMP dword ptr [RAX],0x1c JNZ 0x0012f43f TEST R13B,0x20 MOV R12D,dword ptr [RBP + -0x2c] JZ 0x0012f455 JMP 0x0012f48f LAB_0012f43f: CALL 0x001a7c22 CMP dword ptr [RAX],0x7a MOV R12D,dword ptr [RBP + -0x2c] JNZ 0x0012f455 MOV EAX,R13D AND EAX,0x20 JNZ 0x0012f48f LAB_0012f455: LEA RAX,[R14 + 0x1] CMP RAX,0x1 JA 0x0012f469 CALL 0x001a7c22 CMP dword ptr [RAX],0x4 JNZ 0x0012f4af LAB_0012f469: MOV EDI,R12D MOV RSI,R15 MOV R14,qword ptr [RBP + -0x40] MOV RDX,R14 CALL 0x001297a0 MOV RCX,R14 MOV R14,RAX CMP RAX,RCX JNZ 0x0012f3e3 JMP 0x0012f3b1 LAB_0012f48f: MOV EDI,R12D CALL 0x001af094 MOV RDI,RAX MOV R14,qword ptr [RBP + -0x38] MOV ESI,R14D CALL 0x001aeb02 INC R14D MOV qword ptr [RBP + -0x38],R14 JMP 0x0012f469 LAB_0012f4af: TEST R14,R14 JNZ 0x0012f4e2 CMP dword ptr [RBP + -0x38],0x0 JNZ 0x0012f4e2 MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],0x1b PUSH 0x1 POP RAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0012f469 LAB_0012f4cd: ADD RBX,RCX LAB_0012f4d0: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012f4e2: TEST R13B,0x6 JZ 0x0012f520 PUSH -0x1 POP RBX TEST R13B,0x1a JZ 0x0012f4d0 AND R13D,0x440 OR R13,0x4 MOV EDI,R12D CALL 0x001af094 MOV R14,RAX CALL 0x001a7c22 MOV ECX,dword ptr [RAX] PUSH 0x3 POP RDI MOV RSI,R13 MOV RDX,R14 XOR EAX,EAX CALL 0x001a4207 JMP 0x0012f4d0 LAB_0012f520: MOV RCX,R14 JMP 0x0012f3b1
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; size_t sVar2; int *piVar3; int *piVar4; long lVar5; int8 uVar6; int4 *puVar7; size_t sVar8; long lVar9; ulong uVar10; ulong uVar11; int iVar12; lVar9 = 0; uVar10 = 0; if ((param_4 & 0x1a) == 0) { uVar10 = my_global_flags; } if (param_3 != 0) { uVar10 = uVar10 | param_4; sVar2 = write(param_1,param_2,param_3); if (sVar2 == param_3) { lVar9 = 0; } else { iVar12 = 0; piVar3 = __errno_location(); lVar9 = 0; uVar11 = uVar10; do { sVar8 = 0; if (sVar2 != 0xffffffffffffffff) { sVar8 = sVar2; } param_2 = (void *)((long)param_2 + sVar8); param_3 = param_3 - sVar8; lVar9 = sVar8 + lVar9; iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; lVar5 = _my_thread_var(); uVar10 = (ulong)((uint)uVar11 & 0xffffffdf); if (*(int *)(lVar5 + 0xe0) == 0) { uVar10 = uVar11; } piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0x1c) { if ((uVar10 & 0x20) != 0) goto LAB_0012f48f; LAB_0012f455: if ((sVar2 + 1 < 2) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 4)) { if ((sVar2 != 0) || (iVar12 != 0)) { param_3 = sVar2; if ((uVar10 & 6) != 0) { if ((uVar10 & 0x1a) == 0) { return -1; } uVar6 = my_filename(param_1); puVar7 = (int4 *)_my_thread_var(); my_error(3,(uint)uVar10 & 0x440 | 4,uVar6,*puVar7); return -1; } break; } *piVar3 = 0x1b; iVar12 = 1; } } else { piVar4 = (int *)_my_thread_var(); if ((*piVar4 != 0x7a) || ((uVar10 & 0x20) == 0)) goto LAB_0012f455; LAB_0012f48f: uVar6 = my_filename(param_1); wait_for_free_space(uVar6,iVar12); iVar12 = iVar12 + 1; } sVar2 = write(param_1,param_2,param_3); uVar11 = uVar10; } while (sVar2 != param_3); } if ((uVar10 & 6) == 0) { lVar9 = lVar9 + param_3; } else { lVar9 = 0; } } return lVar9; }
253
vsort_char
davidesantangelo[P]vsort/vsort.c
VSORT_API void vsort_char(char arr[], int n) { vsort_init(); if (!arr || n <= 1) return; vsort_log_debug("Starting vsort (char) for %d elements (using qsort fallback).", n); qsort(arr, n, sizeof(char), default_char_comparator); vsort_log_debug("vsort (char) completed for %d elements.", n); }
O0
c
vsort_char: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movl %esi, 0xc(%rsp) callq 0x1920 cmpq $0x0, 0x10(%rsp) je 0x1ea1 cmpl $0x1, 0xc(%rsp) jg 0x1ea3 jmp 0x1ee2 movl 0xc(%rsp), %esi leaq 0x3460(%rip), %rdi # 0x530e movb $0x0, %al callq 0x4610 movq 0x10(%rsp), %rdi movslq 0xc(%rsp), %rsi movl $0x1, %edx leaq 0x25(%rip), %rcx # 0x1ef0 callq 0x1080 movl 0xc(%rsp), %esi leaq 0x3471(%rip), %rdi # 0x534c movb $0x0, %al callq 0x4610 addq $0x18, %rsp retq nopw (%rax,%rax)
vsort_detect_hardware_characteristics: sub rsp, 238h call get_physical_core_count mov cs:dword_70F0, eax cmp cs:dword_70F0, 0 jg short loc_1EA5 mov cs:dword_70F0, 1 loc_1EA5: mov eax, cs:dword_70F0 mov cs:dword_70E8, eax mov cs:dword_70EC, 0 mov cs:dword_70E4, 0 lea rdi, [rsp+238h+var_108] mov esi, 100h lea rdx, aSysDevicesSyst; "/sys/devices/system/cpu/cpu0/cache/inde"... mov al, 0 call _snprintf lea rdi, [rsp+238h+var_108] lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz short loc_1F34 mov rdi, [rsp+238h+var_8] lea rsi, aCalibratedThre+68h; "%d" lea rdx, [rsp+238h+var_10C] mov al, 0 call ___isoc99_fscanf cmp eax, 1 jnz short loc_1F34 mov eax, [rsp+238h+var_10C] mov cs:dword_70E0, eax jmp short loc_1F3E loc_1F34: mov cs:dword_70E0, 40h ; '@' loc_1F3E: cmp [rsp+238h+var_8], 0 jz short loc_1F56 mov rdi, [rsp+238h+var_8] call _fclose loc_1F56: lea rdi, [rsp+238h+var_108] mov esi, 100h lea rdx, aSysDevicesSyst_0; "/sys/devices/system/cpu/cpu0/cache/inde"... mov al, 0 call _snprintf lea rdi, [rsp+238h+var_108] lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz short loc_1FCB mov rdi, [rsp+238h+var_8] lea rsi, aDk; "%dK" lea rdx, [rsp+238h+var_10C] mov al, 0 call ___isoc99_fscanf cmp eax, 1 jnz short loc_1FCB mov eax, [rsp+238h+var_10C] shl eax, 0Ah mov cs:hardware, eax jmp loc_2061 loc_1FCB: lea rdi, [rsp+238h+var_108] mov esi, 100h lea rdx, aSysDevicesSyst_1; "/sys/devices/system/cpu/cpu0/cache/inde"... mov al, 0 call _snprintf lea rdi, [rsp+238h+var_108] lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz short loc_203D mov rdi, [rsp+238h+var_8] lea rsi, aDk; "%dK" lea rdx, [rsp+238h+var_10C] mov al, 0 call ___isoc99_fscanf cmp eax, 1 jnz short loc_203D mov eax, [rsp+238h+var_10C] shl eax, 0Ah mov cs:hardware, eax jmp short loc_2047 loc_203D: mov cs:hardware, 8000h loc_2047: cmp [rsp+238h+var_8], 0 jz short loc_205F mov rdi, [rsp+238h+var_8] call _fclose loc_205F: jmp short $+2 loc_2061: cmp [rsp+238h+var_8], 0 jz short loc_2079 mov rdi, [rsp+238h+var_8] call _fclose loc_2079: lea rdi, [rsp+238h+var_108] mov esi, 100h lea rdx, aSysDevicesSyst_2; "/sys/devices/system/cpu/cpu0/cache/inde"... mov al, 0 call _snprintf lea rdi, [rsp+238h+var_108] lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz short loc_20EE mov rdi, [rsp+238h+var_8] lea rsi, aDk; "%dK" lea rdx, [rsp+238h+var_10C] mov al, 0 call ___isoc99_fscanf cmp eax, 1 jnz short loc_20EE mov eax, [rsp+238h+var_10C] shl eax, 0Ah mov cs:dword_70D8, eax jmp loc_2184 loc_20EE: lea rdi, [rsp+238h+var_108] mov esi, 100h lea rdx, aSysDevicesSyst_3; "/sys/devices/system/cpu/cpu0/cache/inde"... mov al, 0 call _snprintf lea rdi, [rsp+238h+var_108] lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz short loc_2160 mov rdi, [rsp+238h+var_8] lea rsi, aDk; "%dK" lea rdx, [rsp+238h+var_10C] mov al, 0 call ___isoc99_fscanf cmp eax, 1 jnz short loc_2160 mov eax, [rsp+238h+var_10C] shl eax, 0Ah mov cs:dword_70D8, eax jmp short loc_216A loc_2160: mov cs:dword_70D8, 200000h loc_216A: cmp [rsp+238h+var_8], 0 jz short loc_2182 mov rdi, [rsp+238h+var_8] call _fclose loc_2182: jmp short $+2 loc_2184: cmp [rsp+238h+var_8], 0 jz short loc_219C mov rdi, [rsp+238h+var_8] call _fclose loc_219C: lea rdi, aProcCpuinfo; "/proc/cpuinfo" lea rsi, aProcessor+8; "r" call _fopen mov [rsp+238h+var_8], rax cmp rax, 0 jz loc_22EE jmp short $+2 loc_21C3: lea rdi, [rsp+238h+var_218] mov rdx, [rsp+238h+var_8] mov esi, 100h call _fgets cmp rax, 0 jz loc_22DF lea rdi, [rsp+238h+var_218] lea rsi, aModelName; "model name" mov edx, 0Ah call _strncmp cmp eax, 0 jz short loc_221E lea rdi, [rsp+238h+var_218] lea rsi, aProcessor; "Processor" mov edx, 9 call _strncmp cmp eax, 0 jnz loc_22DA loc_221E: lea rdi, [rsp+238h+var_218] mov esi, 3Ah ; ':' call _strchr mov [rsp+238h+var_220], rax cmp [rsp+238h+var_220], 0 jz loc_22D8 mov rax, [rsp+238h+var_220] add rax, 1 mov [rsp+238h+var_228], rax loc_224C: mov rax, [rsp+238h+var_228] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 20h ; ' ' mov [rsp+238h+var_231], al jz short loc_2271 mov rax, [rsp+238h+var_228] movsx eax, byte ptr [rax] cmp eax, 9 setz al mov [rsp+238h+var_231], al loc_2271: mov al, [rsp+238h+var_231] test al, 1 jnz short loc_227B jmp short loc_228B loc_227B: mov rax, [rsp+238h+var_228] add rax, 1 mov [rsp+238h+var_228], rax jmp short loc_224C loc_228B: mov rsi, [rsp+238h+var_228] lea rdi, hardware add rdi, 22h ; '"' mov edx, 7Fh call _strncpy mov cs:byte_7175, 0 lea rdi, hardware add rdi, 22h ; '"' mov esi, 0Ah call _strchr mov [rsp+238h+var_230], rax cmp [rsp+238h+var_230], 0 jz short loc_22D6 mov rax, [rsp+238h+var_230] mov byte ptr [rax], 0 loc_22D6: jmp short loc_22DF loc_22D8: jmp short $+2 loc_22DA: jmp loc_21C3 loc_22DF: mov rdi, [rsp+238h+var_8] call _fclose jmp short loc_2311 loc_22EE: lea rdi, hardware add rdi, 22h ; '"' lea rsi, aLinuxCpuUnknow; "Linux CPU (Unknown)" mov edx, 7Fh call _strncpy mov cs:byte_7175, 0 loc_2311: test cs:vsort_library_initialized, 1 jz loc_23EA lea rdi, aDetectedHardwa; "Detected hardware: %s" lea rsi, hardware add rsi, 22h ; '"' mov al, 0 call vsort_log_info mov esi, cs:dword_70F0 mov edx, cs:dword_70E8 mov ecx, cs:dword_70EC lea rdi, aCoresDTotalDPC; "Cores: %d total (%d P-core(s), %d E-cor"... mov al, 0 call vsort_log_info mov eax, cs:hardware mov ecx, 400h cdq idiv ecx mov esi, eax mov eax, cs:dword_70D8 mov ecx, 400h cdq idiv ecx mov [rsp+238h+var_238], eax mov eax, cs:dword_70DC mov ecx, 400h cdq idiv ecx mov edx, [rsp+238h+var_238] mov ecx, eax mov r8d, cs:dword_70E0 lea rdi, aCacheL1dDkbL2D; "Cache: L1d=%dKB, L2=%dKB, L3=%dKB, Line"... mov al, 0 call vsort_log_debug mov cl, cs:byte_70F4 lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax mov cl, cs:byte_70F5 lea rdx, aRunningBasicVs+1Eh; "" lea rax, aNeon; " (NEON)" test cl, 1 cmovnz rdx, rax mov ecx, cs:dword_70E4 lea rdi, aSimdSSWidthDBy; "SIMD: %s%s (Width: %d bytes)" mov al, 0 call vsort_log_debug loc_23EA: add rsp, 238h retn
long long vsort_detect_hardware_characteristics() { long long result; // rax int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v7; // r9d int v8; // r8d int v9; // r9d const char *v10; // rsi char *v11; // rdx bool v12; // [rsp+7h] [rbp-231h] _BYTE *v13; // [rsp+8h] [rbp-230h] _BYTE *i; // [rsp+10h] [rbp-228h] long long v15; // [rsp+18h] [rbp-220h] _BYTE v16[268]; // [rsp+20h] [rbp-218h] BYREF int v17; // [rsp+12Ch] [rbp-10Ch] BYREF _BYTE v18[256]; // [rsp+130h] [rbp-108h] BYREF long long v19; // [rsp+230h] [rbp-8h] dword_70F0 = get_physical_core_count(); if ( dword_70F0 <= 0 ) dword_70F0 = 1; dword_70E8 = dword_70F0; dword_70EC = 0; dword_70E4 = 0; snprintf(v18, 256LL, "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"); v19 = fopen(v18, "r"); if ( v19 && (unsigned int)__isoc99_fscanf(v19, "%d", &v17) == 1 ) dword_70E0 = v17; else dword_70E0 = 64; if ( v19 ) fclose(v19); snprintf(v18, 256LL, "/sys/devices/system/cpu/cpu0/cache/index1/size"); v19 = fopen(v18, "r"); if ( v19 && (unsigned int)__isoc99_fscanf(v19, "%dK", &v17) == 1 ) { hardware = v17 << 10; } else { snprintf(v18, 256LL, "/sys/devices/system/cpu/cpu0/cache/index0/size"); v19 = fopen(v18, "r"); if ( v19 && (unsigned int)__isoc99_fscanf(v19, "%dK", &v17) == 1 ) hardware = v17 << 10; else hardware = 0x8000; if ( v19 ) fclose(v19); } if ( v19 ) fclose(v19); snprintf(v18, 256LL, "/sys/devices/system/cpu/cpu0/cache/index2/size"); v19 = fopen(v18, "r"); if ( v19 && (unsigned int)__isoc99_fscanf(v19, "%dK", &v17) == 1 ) { dword_70D8 = v17 << 10; } else { snprintf(v18, 256LL, "/sys/devices/system/cpu/cpu0/cache/index3/size"); v19 = fopen(v18, "r"); if ( v19 && (unsigned int)__isoc99_fscanf(v19, "%dK", &v17) == 1 ) dword_70D8 = v17 << 10; else dword_70D8 = 0x200000; if ( v19 ) fclose(v19); } if ( v19 ) fclose(v19); v19 = fopen("/proc/cpuinfo", "r"); if ( v19 ) { while ( fgets(v16, 256LL, v19) ) { if ( !(unsigned int)strncmp(v16, "model name", 10LL) || !(unsigned int)strncmp(v16, "Processor", 9LL) ) { v15 = strchr(v16, 58LL); if ( v15 ) { for ( i = (_BYTE *)(v15 + 1); ; ++i ) { v12 = 1; if ( *i != 32 ) v12 = *i == 9; if ( !v12 ) break; } strncpy((char *)&hardware + 34, i, 127LL); byte_7175 = 0; v13 = (_BYTE *)strchr((char *)&hardware + 34, 10LL); if ( v13 ) *v13 = 0; break; } } } result = fclose(v19); } else { result = strncpy((char *)&hardware + 34, "Linux CPU (Unknown)", 127LL); byte_7175 = 0; } if ( (vsort_library_initialized & 1) != 0 ) { vsort_log_info((unsigned int)"Detected hardware: %s", (unsigned int)&hardware + 34, v1, v2, v3, v4); vsort_log_info( (unsigned int)"Cores: %d total (%d P-core(s), %d E-core(s))", dword_70F0, dword_70E8, dword_70EC, v5, v6); vsort_log_debug( (unsigned int)"Cache: L1d=%dKB, L2=%dKB, L3=%dKB, Line=%d bytes", hardware / 1024, dword_70D8 / 1024, dword_70DC / 1024, dword_70E0, v7); v10 = "No"; if ( (byte_70F4 & 1) != 0 ) v10 = "Yes"; v11 = ""; if ( (byte_70F5 & 1) != 0 ) v11 = " (NEON)"; return vsort_log_debug((unsigned int)"SIMD: %s%s (Width: %d bytes)", (_DWORD)v10, (_DWORD)v11, dword_70E4, v8, v9); } return result; }
vsort_detect_hardware_characteristics: SUB RSP,0x238 CALL 0x00101e20 MOV dword ptr [0x001070f0],EAX CMP dword ptr [0x001070f0],0x0 JG 0x00101ea5 MOV dword ptr [0x001070f0],0x1 LAB_00101ea5: MOV EAX,dword ptr [0x001070f0] MOV dword ptr [0x001070e8],EAX MOV dword ptr [0x001070ec],0x0 MOV dword ptr [0x001070e4],0x0 LEA RDI,[RSP + 0x130] MOV ESI,0x100 LEA RDX,[0x10442a] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[RSP + 0x130] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x00101f34 MOV RDI,qword ptr [RSP + 0x230] LEA RSI,[0x104660] LEA RDX,[RSP + 0x12c] MOV AL,0x0 CALL 0x00101070 CMP EAX,0x1 JNZ 0x00101f34 MOV EAX,dword ptr [RSP + 0x12c] MOV dword ptr [0x001070e0],EAX JMP 0x00101f3e LAB_00101f34: MOV dword ptr [0x001070e0],0x40 LAB_00101f3e: CMP qword ptr [RSP + 0x230],0x0 JZ 0x00101f56 MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 LAB_00101f56: LEA RDI,[RSP + 0x130] MOV ESI,0x100 LEA RDX,[0x104468] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[RSP + 0x130] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x00101fcb MOV RDI,qword ptr [RSP + 0x230] LEA RSI,[0x104497] LEA RDX,[RSP + 0x12c] MOV AL,0x0 CALL 0x00101070 CMP EAX,0x1 JNZ 0x00101fcb MOV EAX,dword ptr [RSP + 0x12c] SHL EAX,0xa MOV dword ptr [0x001070d4],EAX JMP 0x00102061 LAB_00101fcb: LEA RDI,[RSP + 0x130] MOV ESI,0x100 LEA RDX,[0x10449b] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[RSP + 0x130] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x0010203d MOV RDI,qword ptr [RSP + 0x230] LEA RSI,[0x104497] LEA RDX,[RSP + 0x12c] MOV AL,0x0 CALL 0x00101070 CMP EAX,0x1 JNZ 0x0010203d MOV EAX,dword ptr [RSP + 0x12c] SHL EAX,0xa MOV dword ptr [0x001070d4],EAX JMP 0x00102047 LAB_0010203d: MOV dword ptr [0x001070d4],0x8000 LAB_00102047: CMP qword ptr [RSP + 0x230],0x0 JZ 0x0010205f MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 LAB_0010205f: JMP 0x00102061 LAB_00102061: CMP qword ptr [RSP + 0x230],0x0 JZ 0x00102079 MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 LAB_00102079: LEA RDI,[RSP + 0x130] MOV ESI,0x100 LEA RDX,[0x1044ca] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[RSP + 0x130] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x001020ee MOV RDI,qword ptr [RSP + 0x230] LEA RSI,[0x104497] LEA RDX,[RSP + 0x12c] MOV AL,0x0 CALL 0x00101070 CMP EAX,0x1 JNZ 0x001020ee MOV EAX,dword ptr [RSP + 0x12c] SHL EAX,0xa MOV dword ptr [0x001070d8],EAX JMP 0x00102184 LAB_001020ee: LEA RDI,[RSP + 0x130] MOV ESI,0x100 LEA RDX,[0x1044f9] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[RSP + 0x130] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x00102160 MOV RDI,qword ptr [RSP + 0x230] LEA RSI,[0x104497] LEA RDX,[RSP + 0x12c] MOV AL,0x0 CALL 0x00101070 CMP EAX,0x1 JNZ 0x00102160 MOV EAX,dword ptr [RSP + 0x12c] SHL EAX,0xa MOV dword ptr [0x001070d8],EAX JMP 0x0010216a LAB_00102160: MOV dword ptr [0x001070d8],0x200000 LAB_0010216a: CMP qword ptr [RSP + 0x230],0x0 JZ 0x00102182 MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 LAB_00102182: JMP 0x00102184 LAB_00102184: CMP qword ptr [RSP + 0x230],0x0 JZ 0x0010219c MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 LAB_0010219c: LEA RDI,[0x104528] LEA RSI,[0x104549] CALL 0x00101150 MOV qword ptr [RSP + 0x230],RAX CMP RAX,0x0 JZ 0x001022ee JMP 0x001021c3 LAB_001021c3: LEA RDI,[RSP + 0x20] MOV RDX,qword ptr [RSP + 0x230] MOV ESI,0x100 CALL 0x001010f0 CMP RAX,0x0 JZ 0x001022df LEA RDI,[RSP + 0x20] LEA RSI,[0x104536] MOV EDX,0xa CALL 0x00101060 CMP EAX,0x0 JZ 0x0010221e LEA RDI,[RSP + 0x20] LEA RSI,[0x104541] MOV EDX,0x9 CALL 0x00101060 CMP EAX,0x0 JNZ 0x001022da LAB_0010221e: LEA RDI,[RSP + 0x20] MOV ESI,0x3a CALL 0x001010a0 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x001022d8 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX LAB_0010224c: MOV RAX,qword ptr [RSP + 0x10] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x20 MOV byte ptr [RSP + 0x7],AL JZ 0x00102271 MOV RAX,qword ptr [RSP + 0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x9 SETZ AL MOV byte ptr [RSP + 0x7],AL LAB_00102271: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x0010227b JMP 0x0010228b LAB_0010227b: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x0010224c LAB_0010228b: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[0x1070d4] ADD RDI,0x22 MOV EDX,0x7f CALL 0x00101050 MOV byte ptr [0x00107175],0x0 LEA RDI,[0x1070d4] ADD RDI,0x22 MOV ESI,0xa CALL 0x001010a0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JZ 0x001022d6 MOV RAX,qword ptr [RSP + 0x8] MOV byte ptr [RAX],0x0 LAB_001022d6: JMP 0x001022df LAB_001022d8: JMP 0x001022da LAB_001022da: JMP 0x001021c3 LAB_001022df: MOV RDI,qword ptr [RSP + 0x230] CALL 0x00101090 JMP 0x00102311 LAB_001022ee: LEA RDI,[0x1070d4] ADD RDI,0x22 LEA RSI,[0x10454b] MOV EDX,0x7f CALL 0x00101050 MOV byte ptr [0x00107175],0x0 LAB_00102311: TEST byte ptr [0x001071b9],0x1 JZ 0x001023ea LEA RDI,[0x10455f] LEA RSI,[0x1070d4] ADD RSI,0x22 MOV AL,0x0 CALL 0x00103d30 MOV ESI,dword ptr [0x001070f0] MOV EDX,dword ptr [0x001070e8] MOV ECX,dword ptr [0x001070ec] LEA RDI,[0x104575] MOV AL,0x0 CALL 0x00103d30 MOV EAX,dword ptr [0x001070d4] MOV ECX,0x400 CDQ IDIV ECX MOV ESI,EAX MOV EAX,dword ptr [0x001070d8] MOV ECX,0x400 CDQ IDIV ECX MOV dword ptr [RSP],EAX MOV EAX,dword ptr [0x001070dc] MOV ECX,0x400 CDQ IDIV ECX MOV EDX,dword ptr [RSP] MOV ECX,EAX MOV R8D,dword ptr [0x001070e0] LEA RDI,[0x1045a2] MOV AL,0x0 CALL 0x00103de0 MOV CL,byte ptr [0x001070f4] LEA RSI,[0x1043ce] LEA RAX,[0x1043ca] TEST CL,0x1 CMOVNZ RSI,RAX MOV CL,byte ptr [0x001070f5] LEA RDX,[0x104022] LEA RAX,[0x1045f0] TEST CL,0x1 CMOVNZ RDX,RAX MOV ECX,dword ptr [0x001070e4] LEA RDI,[0x1045d3] MOV AL,0x0 CALL 0x00103de0 LAB_001023ea: ADD RSP,0x238 RET
void vsort_detect_hardware_characteristics(void) { int iVar1; char *pcVar2; int *puVar3; bool bVar4; char *local_228; char local_218 [268]; int local_10c; char local_108 [256]; FILE *local_8; DAT_001070f0 = get_physical_core_count(); if (DAT_001070f0 < 1) { DAT_001070f0 = 1; } DAT_001070e8 = DAT_001070f0; DAT_001070ec = 0; DAT_001070e4 = 0; snprintf(local_108,0x100,"/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"); local_8 = fopen(local_108,"r"); if ((local_8 == (FILE *)0x0) || (iVar1 = __isoc99_fscanf(local_8,"%d",&local_10c), iVar1 != 1)) { DAT_001070e0 = 0x40; } else { DAT_001070e0 = local_10c; } if (local_8 != (FILE *)0x0) { fclose(local_8); } snprintf(local_108,0x100,"/sys/devices/system/cpu/cpu0/cache/index1/size"); local_8 = fopen(local_108,"r"); if ((local_8 == (FILE *)0x0) || (iVar1 = __isoc99_fscanf(local_8,&DAT_00104497,&local_10c), iVar1 != 1)) { snprintf(local_108,0x100,"/sys/devices/system/cpu/cpu0/cache/index0/size"); local_8 = fopen(local_108,"r"); if ((local_8 == (FILE *)0x0) || (iVar1 = __isoc99_fscanf(local_8,&DAT_00104497,&local_10c), iVar1 != 1)) { hardware = 0x8000; } else { hardware = local_10c << 10; } if (local_8 != (FILE *)0x0) { fclose(local_8); } } else { hardware = local_10c << 10; } if (local_8 != (FILE *)0x0) { fclose(local_8); } snprintf(local_108,0x100,"/sys/devices/system/cpu/cpu0/cache/index2/size"); local_8 = fopen(local_108,"r"); if ((local_8 == (FILE *)0x0) || (iVar1 = __isoc99_fscanf(local_8,&DAT_00104497,&local_10c), iVar1 != 1)) { snprintf(local_108,0x100,"/sys/devices/system/cpu/cpu0/cache/index3/size"); local_8 = fopen(local_108,"r"); if ((local_8 == (FILE *)0x0) || (iVar1 = __isoc99_fscanf(local_8,&DAT_00104497,&local_10c), iVar1 != 1)) { DAT_001070d8 = 0x200000; } else { DAT_001070d8 = local_10c << 10; } if (local_8 != (FILE *)0x0) { fclose(local_8); } } else { DAT_001070d8 = local_10c << 10; } if (local_8 != (FILE *)0x0) { fclose(local_8); } local_8 = fopen("/proc/cpuinfo","r"); if (local_8 == (FILE *)0x0) { strncpy(s_Unknown_001070f6,"Linux CPU (Unknown)",0x7f); DAT_00107175 = 0; } else { do { pcVar2 = fgets(local_218,0x100,local_8); if (pcVar2 == (char *)0x0) goto LAB_001022df; iVar1 = strncmp(local_218,"model name",10); } while (((iVar1 != 0) && (iVar1 = strncmp(local_218,"Processor",9), iVar1 != 0)) || (local_228 = strchr(local_218,0x3a), local_228 == (char *)0x0)); do { local_228 = local_228 + 1; bVar4 = true; if (*local_228 != ' ') { bVar4 = *local_228 == '\t'; } } while (bVar4); strncpy(s_Unknown_001070f6,local_228,0x7f); DAT_00107175 = 0; pcVar2 = strchr(s_Unknown_001070f6,10); if (pcVar2 != (char *)0x0) { *pcVar2 = '\0'; } LAB_001022df: fclose(local_8); } if ((vsort_library_initialized & 1) != 0) { vsort_log_info("Detected hardware: %s",s_Unknown_001070f6); vsort_log_info("Cores: %d total (%d P-core(s), %d E-core(s))",DAT_001070f0,DAT_001070e8, DAT_001070ec); vsort_log_debug("Cache: L1d=%dKB, L2=%dKB, L3=%dKB, Line=%d bytes", (long)hardware / 0x400 & 0xffffffff,DAT_001070d8 / 0x400, (long)DAT_001070dc / 0x400 & 0xffffffff,DAT_001070e0); puVar3 = &DAT_001043ce; if ((DAT_001070f4 & 1) != 0) { puVar3 = &DAT_001043ca; } pcVar2 = ""; if ((DAT_001070f5 & 1) != 0) { pcVar2 = " (NEON)"; } vsort_log_debug("SIMD: %s%s (Width: %d bytes)",puVar3,pcVar2,DAT_001070e4); } return; }
254
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0xdc02e movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0xb9e683(%rip), %rax # 0xc7a6c0 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0xdc237 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0xdc084 movl -0x2d4(%rbp), %edi callq 0xdd990 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0xdc245 leaq 0xba7455(%rip), %rdi # 0xc834e0 leaq 0x77e61(%rip), %rsi # 0x153ef3 movl $0x36b, %edx # imm = 0x36B callq 0xdd9c0 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0xdc100 leaq -0x210(%rbp), %rdi callq 0xdb670 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x77e07(%rip), %rdx # 0x153ed6 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x14df10 leaq -0x2c0(%rbp), %rdi callq 0xdafd0 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0xdd510 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0xdc220 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0xdc213 movq -0x2e8(%rbp), %rdi callq 0xdd430 cmpb $0x0, %al jne 0xdc172 movq -0x2e8(%rbp), %rdi callq 0xdda30 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0xdc170 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0xdda70 jmp 0xdc172 movq -0x2e8(%rbp), %rdi callq 0xdd490 cmpb $0x0, %al jne 0xdc1bb movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0xddaf0 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0xdc1b9 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0xddc00 jmp 0xdc1bb movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0xddc40 movsbl %al, %eax cmpl $0x0, %eax jne 0xdc1f1 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0xddc90 movsbl %al, %eax cmpl $0x0, %eax je 0xdc1fe movq $0x0, -0x2e8(%rbp) jmp 0xdc211 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0xdc213 movl -0x2d4(%rbp), %edi callq 0xdd990 jmp 0xdc22b movq $0x0, -0x2e8(%rbp) leaq 0xba72ae(%rip), %rdi # 0xc834e0 callq 0xddce0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdc275 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x2a270 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_DC02E: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_DC237 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_DC084 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_DC245 loc_DC084: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_22 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_DC100 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_DC100: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_DC220 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_DC213 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_DC172 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_DC170 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_DC170: jmp short $+2 loc_DC172: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_DC1BB mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_DC1B9 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_DC1B9: jmp short $+2 loc_DC1BB: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_DC1F1 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_DC1FE loc_DC1F1: mov [rbp+var_2E8], 0 jmp short loc_DC211 loc_DC1FE: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_DC211: jmp short $+2 loc_DC213: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_DC22B loc_DC220: mov [rbp+var_2E8], 0 loc_DC22B: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_23 loc_DC237: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_DC245: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DC275 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_DC275: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_22(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_23(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x001dc02e LAB_001dc02e: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0xd7a6c0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x001dc237 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x001dc084 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001dd990 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x001dc245 LAB_001dc084: LEA RDI,[0xd834e0] LEA RSI,[0x253ef3] MOV EDX,0x36b CALL 0x001dd9c0 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x001dc100 LEA RDI,[RBP + -0x210] CALL 0x001db670 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x253ed6] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x0024df10 LEA RDI,[RBP + -0x2c0] CALL 0x001dafd0 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x001dd510 LAB_001dc100: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x001dc220 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x001dc213 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dd430 CMP AL,0x0 JNZ 0x001dc172 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dda30 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x001dc170 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x001dda70 LAB_001dc170: JMP 0x001dc172 LAB_001dc172: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dd490 CMP AL,0x0 JNZ 0x001dc1bb MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x001ddaf0 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x001dc1b9 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x001ddc00 LAB_001dc1b9: JMP 0x001dc1bb LAB_001dc1bb: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001ddc40 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x001dc1f1 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001ddc90 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001dc1fe LAB_001dc1f1: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x001dc211 LAB_001dc1fe: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_001dc211: JMP 0x001dc213 LAB_001dc213: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001dd990 JMP 0x001dc22b LAB_001dc220: MOV qword ptr [RBP + -0x2e8],0x0 LAB_001dc22b: LEA RDI,[0xd834e0] CALL 0x001ddce0 LAB_001dc237: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_001dc245: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dc275 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_001dc275: CALL 0x0012a270
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
255
common_ngram_cache_merge(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_merge(common_ngram_cache & ngram_cache_target, common_ngram_cache & ngram_cache_add) { for (std::pair<common_ngram, common_ngram_cache_part> ngram_part : ngram_cache_add) { const common_ngram ngram = ngram_part.first; common_ngram_cache_part part = ngram_part.second; common_ngram_cache::iterator part_merged_it = ngram_cache_target.find(ngram); if (part_merged_it == ngram_cache_target.end()) { ngram_cache_target.emplace(ngram, part); continue; } for (std::pair<llama_token, int32_t> token_count : part) { const llama_token token = token_count.first; const int32_t count = token_count.second; GGML_ASSERT(count > 0); common_ngram_cache_part::iterator token_count_merged_it = part_merged_it->second.find(token); if (token_count_merged_it == part_merged_it->second.end()) { part_merged_it->second.emplace(token, count); continue; } token_count_merged_it->second += count; } } }
O2
cpp
common_ngram_cache_merge(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %r15 addq $0x10, %r14 leaq 0xc(%rsp), %r12 leaq 0x8(%rsp), %rbp movq (%r14), %r14 testq %r14, %r14 je 0x9868c leaq 0x8(%r14), %rsi leaq 0x60(%rsp), %rdi callq 0x9873c movups 0x60(%rsp), %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0x28(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x98a4c movq %r15, %rdi leaq 0x10(%rsp), %rsi callq 0x98b66 movq %rax, %rbx testq %rax, %rax je 0x98661 movq 0x38(%rsp), %r13 addq $0x18, %rbx testq %r13, %r13 je 0x98673 movl 0x8(%r13), %eax movl 0xc(%r13), %ecx movl %eax, 0xc(%rsp) movl %ecx, 0x8(%rsp) testl %ecx, %ecx jle 0x9869e movq %rbx, %rdi movq %r12, %rsi callq 0x9927c testq %rax, %rax je 0x9864d movl 0x8(%rsp), %ecx addl %ecx, 0xc(%rax) jmp 0x9865b movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x995f8 movq (%r13), %r13 jmp 0x9861b movq %r15, %rdi leaq 0x10(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x994e2 leaq 0x28(%rsp), %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e jmp 0x985ca addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2282f(%rip), %rdi # 0xbaed4 leaq 0x13a94(%rip), %rdx # 0xac140 leaq 0x228c4(%rip), %rcx # 0xbaf77 movl $0x112, %esi # imm = 0x112 xorl %eax, %eax callq 0x24e90 movq %rax, %rbx jmp 0x986d5 jmp 0x986c8 jmp 0x986c8 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e movq %rbx, %rdi callq 0x24f60 nop
_Z24common_ngram_cache_mergeRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEESG_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rsi mov r15, rdi add r14, 10h lea r12, [rsp+0D8h+var_CC] lea rbp, [rsp+0D8h+var_D0] loc_985CA: mov r14, [r14] test r14, r14 jz loc_9868C lea rsi, [r14+8] lea rdi, [rsp+0D8h+var_78] call _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E movups xmm0, [rsp+0D8h+var_78] movaps [rsp+0D8h+var_C8], xmm0 lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_68] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEEC2ERKSF_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&) mov rdi, r15 lea rsi, [rsp+0D8h+var_C8] call _ZNSt10_HashtableI12common_ngramSt4pairIKS0_St13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS1_IKiiEEEESaISC_ENSt8__detail10_Select1stES6_IS0_E26common_ngram_hash_functionNSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS2_; std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(common_ngram const&) mov rbx, rax test rax, rax jz short loc_98661 mov r13, [rsp+0D8h+var_A0] add rbx, 18h loc_9861B: test r13, r13 jz short loc_98673 mov eax, [r13+8] mov ecx, [r13+0Ch] mov [rsp+0D8h+var_CC], eax mov [rsp+0D8h+var_D0], ecx test ecx, ecx jle short loc_9869E mov rdi, rbx mov rsi, r12 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_9864D mov ecx, [rsp+0D8h+var_D0] add [rax+0Ch], ecx jmp short loc_9865B loc_9864D: mov rdi, rbx mov rsi, r12 mov rdx, rbp call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_emplaceIJRS1_SH_EEES0_INS4_14_Node_iteratorIS2_Lb0ELb0EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<int const&,int const&>(std::integral_constant<bool,true>,int const&,int const&) loc_9865B: mov r13, [r13+0] jmp short loc_9861B loc_98661: mov rdi, r15 lea rsi, [rsp+0D8h+var_C8] lea rdx, [rsp+0D8h+var_B0] call _ZNSt10_HashtableI12common_ngramSt4pairIKS0_St13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS1_IKiiEEEESaISC_ENSt8__detail10_Select1stES6_IS0_E26common_ngram_hash_functionNSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRS2_RSB_EEES1_INSE_14_Node_iteratorISC_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<common_ngram const&,std::unordered_map<int,int>&>(std::integral_constant<bool,true>,common_ngram const&,std::unordered_map<int,int>&) loc_98673: lea rdi, [rsp+0D8h+var_B0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() lea rdi, [rsp+0D8h+var_68] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() jmp loc_985CA loc_9868C: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9869E: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 112h xor eax, eax call _ggml_abort mov rbx, rax jmp short loc_986D5 jmp short loc_986C8 jmp short $+2 loc_986C8: mov rbx, rax lea rdi, [rsp+0D8h+var_B0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_986D5: lea rdi, [rsp+0D8h+var_68] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
void common_ngram_cache_merge(long long a1, long long a2) { _QWORD *v2; // r14 long long v3; // rax int v4; // ecx int v5; // r8d int v6; // r9d long long *v7; // r13 long long v8; // rbx int v9; // ecx long long v10; // rax long long v11; // rbx char v12; // [rsp+0h] [rbp-D8h] int v13; // [rsp+8h] [rbp-D0h] BYREF int v14; // [rsp+Ch] [rbp-CCh] BYREF __int128 v15; // [rsp+10h] [rbp-C8h] BYREF _BYTE v16[16]; // [rsp+28h] [rbp-B0h] BYREF long long *v17; // [rsp+38h] [rbp-A0h] __int128 v18; // [rsp+60h] [rbp-78h] BYREF _BYTE v19[104]; // [rsp+70h] [rbp-68h] BYREF v2 = (_QWORD *)(a2 + 16); while ( 1 ) { v2 = (_QWORD *)*v2; if ( !v2 ) break; ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E( &v18, v2 + 1); v15 = v18; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable( v16, v19); v3 = std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( a1, &v15); if ( v3 ) { v7 = v17; v8 = v3 + 24; while ( v7 ) { v9 = *((_DWORD *)v7 + 3); v14 = *((_DWORD *)v7 + 2); v13 = v9; if ( v9 <= 0 ) { v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 274LL, "GGML_ASSERT(%s) failed", "count > 0"); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v19); _Unwind_Resume(v11); } v10 = std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v8, &v14); if ( v10 ) *(_DWORD *)(v10 + 12) += v13; else std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<int const&,int const&>( v8, &v14, &v13); v7 = (long long *)*v7; } } else { std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<common_ngram const&,std::unordered_map<int,int>&>( a1, (unsigned int)&v15, (unsigned int)v16, v4, v5, v6, v12); } std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v16); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v19); } }
common_ngram_cache_merge: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV R15,RDI ADD R14,0x10 LEA R12,[RSP + 0xc] LEA RBP,[RSP + 0x8] LAB_001985ca: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x0019868c LEA RSI,[R14 + 0x8] LEA RDI,[RSP + 0x60] CALL 0x0019873c MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_001985ee: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x70] CALL 0x00198a4c LAB_001985fd: MOV RDI,R15 LEA RSI,[RSP + 0x10] CALL 0x00198b66 MOV RBX,RAX TEST RAX,RAX JZ 0x00198661 MOV R13,qword ptr [RSP + 0x38] ADD RBX,0x18 LAB_0019861b: TEST R13,R13 JZ 0x00198673 MOV EAX,dword ptr [R13 + 0x8] MOV ECX,dword ptr [R13 + 0xc] MOV dword ptr [RSP + 0xc],EAX MOV dword ptr [RSP + 0x8],ECX TEST ECX,ECX JLE 0x0019869e LAB_00198634: MOV RDI,RBX MOV RSI,R12 CALL 0x0019927c TEST RAX,RAX JZ 0x0019864d MOV ECX,dword ptr [RSP + 0x8] ADD dword ptr [RAX + 0xc],ECX JMP 0x0019865b LAB_0019864d: MOV RDI,RBX MOV RSI,R12 MOV RDX,RBP CALL 0x001995f8 LAB_0019865b: MOV R13,qword ptr [R13] JMP 0x0019861b LAB_00198661: MOV RDI,R15 LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x28] CALL 0x001994e2 LAB_00198673: LEA RDI,[RSP + 0x28] CALL 0x0012800e LEA RDI,[RSP + 0x70] CALL 0x0012800e JMP 0x001985ca LAB_0019868c: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019869e: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf77] MOV ESI,0x112 XOR EAX,EAX CALL 0x00124e90
/* common_ngram_cache_merge(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&, std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&) */ void common_ngram_cache_merge(unordered_map *param_1,unordered_map *param_2) { long lVar1; long lVar2; int8 *puVar3; unordered_map *puVar4; int local_d0; int local_cc; int8 local_c8; int8 uStack_c0; _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> local_b0 [16]; int8 *local_a0; int8 local_78; int8 uStack_70; _Hashtable local_68 [56]; puVar4 = param_2 + 0x10; do { puVar4 = *(unordered_map **)puVar4; if (puVar4 == (unordered_map *)0x0) { return; } _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E (&local_78,puVar4 + 8); local_c8 = local_78; uStack_c0 = uStack_70; /* try { // try from 001985ee to 001985fc has its CatchHandler @ 001986bf */ std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::_Hashtable(local_b0,local_68); /* try { // try from 001985fd to 00198609 has its CatchHandler @ 001986c4 */ lVar1 = std:: _Hashtable<common_ngram,std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>,std::allocator<std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<common_ngram,std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>,std::allocator<std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)param_1,(common_ngram *)&local_c8); if (lVar1 == 0) { /* try { // try from 00198661 to 00198672 has its CatchHandler @ 001986c4 */ std:: _Hashtable<common_ngram,std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>,std::allocator<std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> :: _M_emplace<common_ngram_const&,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>&> (param_1,&local_c8,local_b0); } else { for (puVar3 = local_a0; puVar3 != (int8 *)0x0; puVar3 = (int8 *)*puVar3) { local_cc = *(int *)(puVar3 + 1); local_d0 = *(int *)((long)puVar3 + 0xc); if (local_d0 < 1) { /* try { // try from 0019869e to 001986be has its CatchHandler @ 001986c6 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0x112,"GGML_ASSERT(%s) failed","count > 0"); } /* try { // try from 00198634 to 0019865a has its CatchHandler @ 001986c8 */ lVar2 = std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(lVar1 + 0x18),&local_cc); if (lVar2 == 0) { std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::_M_emplace<int_const&,int_const&> ((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(lVar1 + 0x18),&local_cc,&local_d0); } else { *(int *)(lVar2 + 0xc) = *(int *)(lVar2 + 0xc) + local_d0; } } } std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable(local_b0); std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)local_68); } while( true ); }
256
common_ngram_cache_merge(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_merge(common_ngram_cache & ngram_cache_target, common_ngram_cache & ngram_cache_add) { for (std::pair<common_ngram, common_ngram_cache_part> ngram_part : ngram_cache_add) { const common_ngram ngram = ngram_part.first; common_ngram_cache_part part = ngram_part.second; common_ngram_cache::iterator part_merged_it = ngram_cache_target.find(ngram); if (part_merged_it == ngram_cache_target.end()) { ngram_cache_target.emplace(ngram, part); continue; } for (std::pair<llama_token, int32_t> token_count : part) { const llama_token token = token_count.first; const int32_t count = token_count.second; GGML_ASSERT(count > 0); common_ngram_cache_part::iterator token_count_merged_it = part_merged_it->second.find(token); if (token_count_merged_it == part_merged_it->second.end()) { part_merged_it->second.emplace(token, count); continue; } token_count_merged_it->second += count; } } }
O3
cpp
common_ngram_cache_merge(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsi), %r14 testq %r14, %r14 je 0xcdc2a leaq 0x80(%rsp), %rbx leaq 0x38(%rsp), %r13 leaq 0x18(%rsp), %r12 movups 0x8(%r14), %xmm0 movaps %xmm0, 0x70(%rsp) leaq 0x18(%r14), %rsi xorl %r15d, %r15d movq %r15, 0x80(%rsp) movq 0x20(%r14), %rax movq %rax, 0x88(%rsp) movq %r15, 0x90(%rsp) movq 0x30(%r14), %rax movq %rax, 0x98(%rsp) movups 0x38(%r14), %xmm0 movups %xmm0, 0x20(%rbx) movq %r15, 0xb0(%rsp) movq %rbx, 0x38(%rsp) movq %rbx, %rdi movq %r13, %rdx callq 0xcdf9a movaps 0x70(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) movq %r15, 0x38(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x40(%rsp) movq %r15, 0x48(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x50(%rsp) movups 0x20(%rbx), %xmm0 leaq 0x58(%rsp), %rax movups %xmm0, (%rax) movq %r15, 0x68(%rsp) movq %r13, 0x18(%rsp) movq %r13, %r15 movq %r13, %rdi movq %rbx, %rbp movq %rbx, %rsi movq %r12, %rdx callq 0xcdf9a movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0xce0dc movq %rax, %r13 testq %rax, %rax je 0xcdbf6 movq 0x48(%rsp), %rbx testq %rbx, %rbx je 0xcdc08 addq $0x18, %r13 movl 0x8(%rbx), %eax movl 0xc(%rbx), %ecx movl %eax, 0x18(%rsp) movl %ecx, 0xc(%rsp) testl %ecx, %ecx jle 0xcdc3c movq %r13, %rdi movq %r12, %rsi callq 0xce7cc testq %rax, %rax je 0xcdbdc movl 0xc(%rsp), %ecx addl %ecx, 0xc(%rax) jmp 0xcdbec movq %r13, %rdi movq %r12, %rsi leaq 0xc(%rsp), %rdx callq 0xceba4 movq (%rbx), %rbx testq %rbx, %rbx jne 0xcdbb1 jmp 0xcdc08 movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rsi movq %r15, %rdx callq 0xcea2c movq %r15, %r13 movq %r15, %rdi callq 0x21ec2 movq %rbp, %rbx movq %rbp, %rdi callq 0x21ec2 movq (%r14), %r14 testq %r14, %r14 jne 0xcdada addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x292bb(%rip), %rdi # 0xf6efe leaq 0x1a4f6(%rip), %rdx # 0xe8140 leaq 0x29350(%rip), %rcx # 0xf6fa1 movl $0x112, %esi # imm = 0x112 xorl %eax, %eax callq 0x1be80 movq %rax, %r14 jmp 0xcdc73 jmp 0xcdc66 jmp 0xcdc66 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x21ec2 movq %rbp, %rdi callq 0x21ec2 movq %r14, %rdi callq 0x1bf70 nop
_Z24common_ngram_cache_mergeRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEESG_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_D8], rdi mov r14, [rsi+10h] test r14, r14 jz loc_CDC2A lea rbx, [rsp+0E8h+var_68] lea r13, [rsp+0E8h+var_B0] lea r12, [rsp+0E8h+var_D0] loc_CDADA: movups xmm0, xmmword ptr [r14+8] movaps [rsp+0E8h+var_78], xmm0 lea rsi, [r14+18h] xor r15d, r15d mov [rsp+0E8h+var_68], r15 mov rax, [r14+20h] mov [rsp+0E8h+var_60], rax mov [rsp+0E8h+var_58], r15 mov rax, [r14+30h] mov [rsp+0E8h+var_50], rax movups xmm0, xmmword ptr [r14+38h] movups xmmword ptr [rbx+20h], xmm0 mov [rsp+0E8h+var_38], r15 mov [rsp+0E8h+var_B0], rbx mov rdi, rbx mov rdx, r13 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) movaps xmm0, [rsp+0E8h+var_78] movaps [rsp+0E8h+var_C8], xmm0 mov [rsp+0E8h+var_B0], r15 mov rax, [rsp+0E8h+var_60] mov [rsp+0E8h+var_A8], rax mov [rsp+0E8h+var_A0], r15 mov rax, [rsp+0E8h+var_50] mov [rsp+0E8h+var_98], rax movups xmm0, xmmword ptr [rbx+20h] lea rax, [rsp+0E8h+var_90] movups xmmword ptr [rax], xmm0 mov [rsp+0E8h+var_80], r15 mov [rsp+0E8h+var_D0], r13 mov r15, r13 mov rdi, r13 mov rbp, rbx mov rsi, rbx mov rdx, r12 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) mov rdi, [rsp+0E8h+var_D8] lea rsi, [rsp+0E8h+var_C8] call _ZNSt10_HashtableI12common_ngramSt4pairIKS0_St13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS1_IKiiEEEESaISC_ENSt8__detail10_Select1stES6_IS0_E26common_ngram_hash_functionNSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS2_; std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(common_ngram const&) mov r13, rax test rax, rax jz short loc_CDBF6 mov rbx, [rsp+0E8h+var_A0] test rbx, rbx jz short loc_CDC08 add r13, 18h loc_CDBB1: mov eax, [rbx+8] mov ecx, [rbx+0Ch] mov dword ptr [rsp+0E8h+var_D0], eax mov [rsp+0E8h+var_DC], ecx test ecx, ecx jle short loc_CDC3C mov rdi, r13 mov rsi, r12 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_CDBDC mov ecx, [rsp+0E8h+var_DC] add [rax+0Ch], ecx jmp short loc_CDBEC loc_CDBDC: mov rdi, r13 mov rsi, r12 lea rdx, [rsp+0E8h+var_DC] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_emplaceIJRS1_SH_EEES0_INS4_14_Node_iteratorIS2_Lb0ELb0EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<int const&,int const&>(std::integral_constant<bool,true>,int const&,int const&) loc_CDBEC: mov rbx, [rbx] test rbx, rbx jnz short loc_CDBB1 jmp short loc_CDC08 loc_CDBF6: mov rdi, [rsp+0E8h+var_D8] lea rsi, [rsp+0E8h+var_C8] mov rdx, r15 call _ZNSt10_HashtableI12common_ngramSt4pairIKS0_St13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS1_IKiiEEEESaISC_ENSt8__detail10_Select1stES6_IS0_E26common_ngram_hash_functionNSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRS2_RSB_EEES1_INSE_14_Node_iteratorISC_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<common_ngram const&,std::unordered_map<int,int>&>(std::integral_constant<bool,true>,common_ngram const&,std::unordered_map<int,int>&) loc_CDC08: mov r13, r15 mov rdi, r15 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rbx, rbp mov rdi, rbp call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov r14, [r14] test r14, r14 jnz loc_CDADA loc_CDC2A: add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CDC3C: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 112h xor eax, eax call _ggml_abort mov r14, rax jmp short loc_CDC73 jmp short loc_CDC66 jmp short $+2 loc_CDC66: mov r14, rax lea rdi, [rsp+0E8h+var_B0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_CDC73: mov rdi, rbp call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, r14 call __Unwind_Resume
void common_ngram_cache_merge(long long a1, long long a2) { long long *v2; // r14 long long *v3; // rbx _QWORD *v4; // r13 long long v5; // r15 long long v6; // rbp long long v7; // rdx long long v8; // rcx long long v9; // rax long long *v10; // rbx long long v11; // r13 int v12; // ecx long long v13; // rax long long v14; // rax long long v15; // r14 int v16; // [rsp+Ch] [rbp-DCh] BYREF long long v17; // [rsp+10h] [rbp-D8h] _QWORD *v18; // [rsp+18h] [rbp-D0h] BYREF __int128 v19; // [rsp+20h] [rbp-C8h] BYREF _QWORD v20[2]; // [rsp+38h] [rbp-B0h] BYREF long long *v21; // [rsp+48h] [rbp-A0h] long long v22; // [rsp+50h] [rbp-98h] __int128 v23; // [rsp+58h] [rbp-90h] long long v24; // [rsp+68h] [rbp-80h] __int128 v25; // [rsp+70h] [rbp-78h] long long v26; // [rsp+80h] [rbp-68h] BYREF long long v27; // [rsp+88h] [rbp-60h] long long v28; // [rsp+90h] [rbp-58h] long long v29; // [rsp+98h] [rbp-50h] long long v30; // [rsp+B0h] [rbp-38h] v17 = a1; v2 = *(long long **)(a2 + 16); if ( v2 ) { v3 = &v26; v4 = v20; do { v25 = *(_OWORD *)(v2 + 1); v26 = 0LL; v27 = v2[4]; v28 = 0LL; v29 = v2[6]; *((_OWORD *)v3 + 2) = *(_OWORD *)(v2 + 7); v30 = 0LL; v20[0] = v3; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( v3, v2 + 3, v4); v19 = v25; v20[0] = 0LL; v20[1] = v27; v21 = 0LL; v22 = v29; v23 = *((_OWORD *)v3 + 2); v24 = 0LL; v18 = v4; v5 = (long long)v4; v6 = (long long)v3; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( v4, v3, &v18); v9 = std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( v17, &v19, v7, v8); if ( v9 ) { v10 = v21; if ( v21 ) { v11 = v9 + 24; do { v12 = *((_DWORD *)v10 + 3); LODWORD(v18) = *((_DWORD *)v10 + 2); v16 = v12; if ( v12 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 274LL, "GGML_ASSERT(%s) failed", "count > 0"); v15 = v14; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v6); _Unwind_Resume(v15); } v13 = std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v11, &v18); if ( v13 ) *(_DWORD *)(v13 + 12) += v16; else std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<int const&,int const&>( v11, &v18, &v16); v10 = (long long *)*v10; } while ( v10 ); } } else { std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<common_ngram const&,std::unordered_map<int,int>&>( v17, &v19, v4); } v4 = (_QWORD *)v5; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v5); v3 = (long long *)v6; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v6); v2 = (long long *)*v2; } while ( v2 ); } }
257
ggml_set_i32_nd
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, int32_t value) { void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3]; switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(data))[0] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(data))[0] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(data))[0] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(data))[0] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_set_i32_nd: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movl %esi, 0x5c(%rsp) movl %edx, 0x58(%rsp) movl %ecx, 0x54(%rsp) movl %r8d, 0x50(%rsp) movl %r9d, 0x4c(%rsp) movq 0x60(%rsp), %rdx movq 0xf8(%rdx), %rax movslq 0x5c(%rsp), %rcx movq 0x30(%rdx), %rdi movq 0x38(%rdx), %rsi imulq %rdi, %rcx addq %rcx, %rax movslq 0x58(%rsp), %rcx imulq %rsi, %rcx addq %rcx, %rax movslq 0x54(%rsp), %rcx movq 0x40(%rdx), %rsi imulq %rsi, %rcx addq %rcx, %rax movslq 0x50(%rsp), %rcx movq 0x48(%rdx), %rdx imulq %rdx, %rcx addq %rcx, %rax movq %rax, 0x40(%rsp) movq 0x60(%rsp), %rax movl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x1e, %rax ja 0x122d8 movq 0x10(%rsp), %rax leaq 0x9904a(%rip), %rcx # 0xab26c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x4c(%rsp), %eax movb %al, %cl movq 0x40(%rsp), %rax movb %cl, (%rax) jmp 0x122f2 movl 0x4c(%rsp), %eax movw %ax, %cx movq 0x40(%rsp), %rax movw %cx, (%rax) jmp 0x122f2 movl 0x4c(%rsp), %ecx movq 0x40(%rsp), %rax movl %ecx, (%rax) jmp 0x122f2 vcvtsi2ssl 0x4c(%rsp), %xmm0, %xmm1 vxorps %xmm0, %xmm0, %xmm0 vblendps $0x1, %xmm1, %xmm0, %xmm0 # xmm0 = xmm1[0],xmm0[1,2,3] vmovaps %xmm0, 0x20(%rsp) vmovaps 0x20(%rsp), %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vmovd %xmm0, %eax movw %ax, 0x3e(%rsp) movw 0x3e(%rsp), %cx movq 0x40(%rsp), %rax movw %cx, (%rax) jmp 0x122f2 movq 0x40(%rsp), %rax movq %rax, 0x8(%rsp) vcvtsi2ssl 0x4c(%rsp), %xmm0, %xmm0 callq 0x119d0 movw %ax, %cx movq 0x8(%rsp), %rax movw %cx, 0x1e(%rsp) movw 0x1e(%rsp), %cx movw %cx, (%rax) jmp 0x122f2 vcvtsi2ssl 0x4c(%rsp), %xmm0, %xmm0 movq 0x40(%rsp), %rax vmovss %xmm0, (%rax) jmp 0x122f2 leaq 0x99647(%rip), %rdi # 0xab926 movl $0x40c, %esi # imm = 0x40C leaq 0x997a9(%rip), %rdx # 0xaba94 movb $0x0, %al callq 0x10660 addq $0x68, %rsp retq nopw (%rax,%rax)
ggml_set_i32_nd: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_C], esi mov [rsp+68h+var_10], edx mov [rsp+68h+var_14], ecx mov [rsp+68h+var_18], r8d mov [rsp+68h+var_1C], r9d mov rdx, [rsp+68h+var_8] mov rax, [rdx+0F8h] movsxd rcx, [rsp+68h+var_C] mov rdi, [rdx+30h] mov rsi, [rdx+38h] imul rcx, rdi add rax, rcx movsxd rcx, [rsp+68h+var_10] imul rcx, rsi add rax, rcx movsxd rcx, [rsp+68h+var_14] mov rsi, [rdx+40h] imul rcx, rsi add rax, rcx movsxd rcx, [rsp+68h+var_18] mov rdx, [rdx+48h] imul rcx, rdx add rax, rcx mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_8] mov eax, [rax] mov [rsp+68h+var_58], rax sub rax, 1Eh; switch 31 cases ja def_12229; jumptable 0000000000012229 default case, cases 2-23,27-29 mov rax, [rsp+68h+var_58] lea rcx, jpt_12229 movsxd rax, ds:(jpt_12229 - 0AB26Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1222B: mov eax, [rsp+68h+var_1C]; jumptable 0000000000012229 case 24 mov cl, al mov rax, [rsp+68h+var_28] mov [rax], cl jmp loc_122F2 loc_1223D: mov eax, [rsp+68h+var_1C]; jumptable 0000000000012229 case 25 mov cx, ax mov rax, [rsp+68h+var_28] mov [rax], cx jmp loc_122F2 loc_12251: mov ecx, [rsp+68h+var_1C]; jumptable 0000000000012229 case 26 mov rax, [rsp+68h+var_28] mov [rax], ecx jmp loc_122F2 loc_12261: vcvtsi2ss xmm1, xmm0, [rsp+68h+var_1C]; jumptable 0000000000012229 case 1 vxorps xmm0, xmm0, xmm0 vblendps xmm0, xmm0, xmm1, 1 vmovaps [rsp+68h+var_48], xmm0 vmovaps xmm0, [rsp+68h+var_48] vcvtps2ph xmm0, xmm0, 0 vmovd eax, xmm0 mov [rsp+68h+var_2A], ax mov cx, [rsp+68h+var_2A] mov rax, [rsp+68h+var_28] mov [rax], cx jmp short loc_122F2 loc_1229B: mov rax, [rsp+68h+var_28]; jumptable 0000000000012229 case 30 mov [rsp+68h+var_60], rax vcvtsi2ss xmm0, xmm0, [rsp+68h+var_1C] call ggml_compute_fp32_to_bf16 mov cx, ax mov rax, [rsp+68h+var_60] mov [rsp+68h+var_4A], cx mov cx, [rsp+68h+var_4A] mov [rax], cx jmp short loc_122F2 loc_122C7: vcvtsi2ss xmm0, xmm0, [rsp+68h+var_1C]; jumptable 0000000000012229 case 0 mov rax, [rsp+68h+var_28] vmovss dword ptr [rax], xmm0 jmp short loc_122F2 def_12229: lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000012229 default case, cases 2-23,27-29 mov esi, 40Ch lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_122F2: add rsp, 68h retn
double ggml_set_i32_nd(long long a1, int a2, int a3, int a4, int a5, int a6, __m128 _XMM0) { __int16 *v15; // [rsp+40h] [rbp-28h] v15 = (__int16 *)(*(_QWORD *)(a1 + 72) * a5 + *(_QWORD *)(a1 + 64) * a4 + *(_QWORD *)(a1 + 56) * a3 + *(_QWORD *)(a1 + 48) * a2 + *(_QWORD *)(a1 + 248)); switch ( *(_DWORD *)a1 ) { case 0: __asm { vcvtsi2ss xmm0, xmm0, [rsp+68h+var_1C]; jumptable 0000000000012229 case 0 } _RAX = *(_QWORD *)(a1 + 72) * a5 + *(_QWORD *)(a1 + 64) * a4 + *(_QWORD *)(a1 + 56) * a3 + *(_QWORD *)(a1 + 48) * a2 + *(_QWORD *)(a1 + 248); __asm { vmovss dword ptr [rax], xmm0 } break; case 1: __asm { vcvtsi2ss xmm1, xmm0, [rsp+68h+var_1C]; jumptable 0000000000012229 case 1 vxorps xmm0, xmm0, xmm0 vblendps xmm0, xmm0, xmm1, 1 vmovaps [rsp+68h+var_48], xmm0 vmovaps xmm0, [rsp+68h+var_48] vcvtps2ph xmm0, xmm0, 0 vmovd eax, xmm0 } *v15 = _EAX; break; case 0x18: *(_BYTE *)v15 = a6; break; case 0x19: *v15 = a6; break; case 0x1A: *(_DWORD *)v15 = a6; break; case 0x1E: __asm { vcvtsi2ss xmm0, xmm0, [rsp+68h+var_1C] } *v15 = ggml_compute_fp32_to_bf16(_XMM0); break; default: *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 1036LL, "fatal error"); break; } return *(double *)_XMM0.m128_u64; }
ggml_set_i32_nd: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV dword ptr [RSP + 0x5c],ESI MOV dword ptr [RSP + 0x58],EDX MOV dword ptr [RSP + 0x54],ECX MOV dword ptr [RSP + 0x50],R8D MOV dword ptr [RSP + 0x4c],R9D MOV RDX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RDX + 0xf8] MOVSXD RCX,dword ptr [RSP + 0x5c] MOV RDI,qword ptr [RDX + 0x30] MOV RSI,qword ptr [RDX + 0x38] IMUL RCX,RDI ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x58] IMUL RCX,RSI ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RDX + 0x40] IMUL RCX,RSI ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x50] MOV RDX,qword ptr [RDX + 0x48] IMUL RCX,RDX ADD RAX,RCX MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x1e JA 0x001122d8 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x1ab26c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_18: MOV EAX,dword ptr [RSP + 0x4c] MOV CL,AL MOV RAX,qword ptr [RSP + 0x40] MOV byte ptr [RAX],CL JMP 0x001122f2 caseD_19: MOV EAX,dword ptr [RSP + 0x4c] MOV CX,AX MOV RAX,qword ptr [RSP + 0x40] MOV word ptr [RAX],CX JMP 0x001122f2 caseD_1a: MOV ECX,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],ECX JMP 0x001122f2 caseD_1: VCVTSI2SS XMM1,XMM0,dword ptr [RSP + 0x4c] VXORPS XMM0,XMM0,XMM0 VBLENDPS XMM0,XMM0,XMM1,0x1 VMOVAPS xmmword ptr [RSP + 0x20],XMM0 VMOVAPS XMM0,xmmword ptr [RSP + 0x20] VCVTPS2PH XMM0,XMM0,0x0 VMOVD EAX,XMM0 MOV word ptr [RSP + 0x3e],AX MOV CX,word ptr [RSP + 0x3e] MOV RAX,qword ptr [RSP + 0x40] MOV word ptr [RAX],CX JMP 0x001122f2 caseD_1e: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RAX VCVTSI2SS XMM0,XMM0,dword ptr [RSP + 0x4c] CALL 0x001119d0 MOV CX,AX MOV RAX,qword ptr [RSP + 0x8] MOV word ptr [RSP + 0x1e],CX MOV CX,word ptr [RSP + 0x1e] MOV word ptr [RAX],CX JMP 0x001122f2 caseD_0: VCVTSI2SS XMM0,XMM0,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RSP + 0x40] VMOVSS dword ptr [RAX],XMM0 JMP 0x001122f2 caseD_2: LEA RDI,[0x1ab926] MOV ESI,0x40c LEA RDX,[0x1aba94] MOV AL,0x0 CALL 0x00110660 LAB_001122f2: ADD RSP,0x68 RET
void ggml_set_i32_nd(int4 *param_1,int param_2,int param_3,int param_4,int param_5, float param_6) { int2 uVar1; float *pfVar2; int1 auVar3 [16]; int1 in_ZMM0 [64]; int1 auVar4 [16]; pfVar2 = (float *)(*(long *)(param_1 + 0x3e) + (long)param_2 * *(long *)(param_1 + 0xc) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_5 * *(long *)(param_1 + 0x12)); auVar3._4_12_ = in_ZMM0._4_12_; switch(*param_1) { case 0: *pfVar2 = (float)(int)param_6; break; case 1: auVar4._0_4_ = (float)(int)param_6; auVar4._4_12_ = auVar3._4_12_; auVar3 = vblendps_avx(ZEXT816(0) << 0x40,auVar4,1); auVar3 = vcvtps2ph_f16c(auVar3,0); *(short *)pfVar2 = auVar3._0_2_; break; default: ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c" ,0x40c,"fatal error"); break; case 0x18: *(char *)pfVar2 = SUB41(param_6,0); break; case 0x19: *(short *)pfVar2 = SUB42(param_6,0); break; case 0x1a: *pfVar2 = param_6; break; case 0x1e: auVar3._0_4_ = (float)(int)param_6; uVar1 = ggml_compute_fp32_to_bf16(auVar3._0_8_); *(int2 *)pfVar2 = uVar1; } return; }
258
ggml_set_i32_nd
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, int32_t value) { void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3]; switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(data))[0] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(data))[0] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(data))[0] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(data))[0] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O1
c
ggml_set_i32_nd: movslq %esi, %rsi imulq 0x30(%rdi), %rsi addq 0xf8(%rdi), %rsi movslq %edx, %rdx imulq 0x38(%rdi), %rdx movslq %ecx, %rax imulq 0x40(%rdi), %rax addq %rdx, %rax addq %rsi, %rax movslq %r8d, %rcx imulq 0x48(%rdi), %rcx movl (%rdi), %edx leal -0x18(%rdx), %esi cmpl $0x6, %esi ja 0xcdba leaq 0x3c388(%rip), %rdx # 0x49134 movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi movb %r9b, (%rax,%rcx) retq testl %edx, %edx je 0xce04 cmpl $0x1, %edx jne 0xce22 vcvtsi2ss %r9d, %xmm0, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rax,%rcx) retq movw %r9w, (%rax,%rcx) retq movl %r9d, (%rax,%rcx) retq vcvtsi2ss %r9d, %xmm0, %xmm0 vmovd %xmm0, %esi movl %esi, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF movl %esi, %edx shrl $0x10, %edx cmpl $0x7f800001, %edi # imm = 0x7F800001 jb 0xce0f orl $0x40, %edx jmp 0xce1d vcvtsi2ss %r9d, %xmm0, %xmm0 vmovss %xmm0, (%rax,%rcx) retq andl $0x1, %edx addl %esi, %edx addl $0x7fff, %edx # imm = 0x7FFF shrl $0x10, %edx movw %dx, (%rax,%rcx) retq pushq %rax leaq 0x3c6e8(%rip), %rdi # 0x49512 leaq 0x3c84f(%rip), %rdx # 0x49680 movl $0x40c, %esi # imm = 0x40C xorl %eax, %eax callq 0xaf40
ggml_set_i32_nd: movsxd rsi, esi imul rsi, [rdi+30h] add rsi, [rdi+0F8h] movsxd rdx, edx imul rdx, [rdi+38h] movsxd rax, ecx imul rax, [rdi+40h] add rax, rdx add rax, rsi movsxd rcx, r8d imul rcx, [rdi+48h] mov edx, [rdi] lea esi, [rdx-18h]; switch 7 cases cmp esi, 6 ja short def_CDB3; jumptable 000000000000CDB3 default case lea rdx, jpt_CDB3 movsxd rsi, ds:(jpt_CDB3 - 49134h)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_CDB5: mov [rax+rcx], r9b; jumptable 000000000000CDB3 case 24 retn def_CDB3: test edx, edx; jumptable 000000000000CDB3 default case jz short loc_CE04 cmp edx, 1 jnz short loc_CE22; jumptable 000000000000CDB3 cases 27-29 vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 retn loc_CDD6: mov [rax+rcx], r9w; jumptable 000000000000CDB3 case 25 retn loc_CDDC: mov [rax+rcx], r9d; jumptable 000000000000CDB3 case 26 retn loc_CDE1: vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000CDB3 case 30 vmovd esi, xmm0 mov edi, esi and edi, 7FFFFFFFh mov edx, esi shr edx, 10h cmp edi, 7F800001h jb short loc_CE0F or edx, 40h jmp short loc_CE1D loc_CE04: vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 retn loc_CE0F: and edx, 1 add edx, esi add edx, 7FFFh shr edx, 10h loc_CE1D: mov [rax+rcx], dx retn loc_CE22: push rax; jumptable 000000000000CDB3 cases 27-29 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 40Ch xor eax, eax call _ggml_abort
long long ggml_set_i32_nd(int *a1, int a2, int a3, int a4, int a5, int a6, __m128 _XMM0) { long long result; // rax int v9; // edx unsigned int v14; // edx result = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4; _RCX = *((_QWORD *)a1 + 9) * a5; v9 = *a1; switch ( *a1 ) { case 24: *(_BYTE *)(result + _RCX) = a6; break; case 25: *(_WORD *)(result + _RCX) = a6; break; case 26: *(_DWORD *)(result + _RCX) = a6; break; case 27: case 28: case 29: goto LABEL_13; case 30: __asm { vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000CDB3 case 30 vmovd esi, xmm0 } if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 ) v14 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16; else LOWORD(v14) = HIWORD(_ESI) | 0x40; *(_WORD *)(result + _RCX) = v14; break; default: if ( v9 ) { if ( v9 == 1 ) { __asm { vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 } } else { LABEL_13: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 1036LL, "fatal error", _RCX); result = ggml_get_f32_1d(); } } else { __asm { vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 } } break; } return result; }
ggml_set_i32_nd: MOVSXD RSI,ESI IMUL RSI,qword ptr [RDI + 0x30] ADD RSI,qword ptr [RDI + 0xf8] MOVSXD RDX,EDX IMUL RDX,qword ptr [RDI + 0x38] MOVSXD RAX,ECX IMUL RAX,qword ptr [RDI + 0x40] ADD RAX,RDX ADD RAX,RSI MOVSXD RCX,R8D IMUL RCX,qword ptr [RDI + 0x48] MOV EDX,dword ptr [RDI] LEA ESI,[RDX + -0x18] CMP ESI,0x6 JA 0x0010cdba LEA RDX,[0x149134] MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_18: MOV byte ptr [RAX + RCX*0x1],R9B RET default: TEST EDX,EDX JZ 0x0010ce04 CMP EDX,0x1 JNZ 0x0010ce22 VCVTSI2SS XMM0,XMM0,R9D VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RAX + RCX*0x1],XMM0,0x0 RET caseD_19: MOV word ptr [RAX + RCX*0x1],R9W RET caseD_1a: MOV dword ptr [RAX + RCX*0x1],R9D RET caseD_1e: VCVTSI2SS XMM0,XMM0,R9D VMOVD ESI,XMM0 MOV EDI,ESI AND EDI,0x7fffffff MOV EDX,ESI SHR EDX,0x10 CMP EDI,0x7f800001 JC 0x0010ce0f OR EDX,0x40 JMP 0x0010ce1d LAB_0010ce04: VCVTSI2SS XMM0,XMM0,R9D VMOVSS dword ptr [RAX + RCX*0x1],XMM0 RET LAB_0010ce0f: AND EDX,0x1 ADD EDX,ESI ADD EDX,0x7fff SHR EDX,0x10 LAB_0010ce1d: MOV word ptr [RAX + RCX*0x1],DX RET caseD_1b: PUSH RAX LEA RDI,[0x149512] LEA RDX,[0x149680] MOV ESI,0x40c XOR EAX,EAX CALL 0x0010af40
void ggml_set_i32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5,int param_6) { int iVar1; long lVar2; long lVar3; ushort uVar4; float fVar5; int1 auVar6 [16]; int1 in_ZMM0 [64]; lVar2 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e); lVar3 = (long)param_5 * *(long *)(param_1 + 0x12); iVar1 = *param_1; auVar6._4_12_ = in_ZMM0._4_12_; switch(iVar1) { case 0x18: *(char *)(lVar2 + lVar3) = (char)param_6; return; case 0x19: *(short *)(lVar2 + lVar3) = (short)param_6; return; case 0x1a: *(int *)(lVar2 + lVar3) = param_6; return; case 0x1b: case 0x1c: case 0x1d: goto switchD_0010cdb3_caseD_1b; case 0x1e: fVar5 = (float)param_6; if ((uint)ABS(fVar5) < 0x7f800001) { uVar4 = (ushort)(((uint)fVar5 >> 0x10 & 1) + (int)fVar5 + 0x7fff >> 0x10); } else { uVar4 = (ushort)((uint)fVar5 >> 0x10) | 0x40; } *(ushort *)(lVar2 + lVar3) = uVar4; return; default: if (iVar1 == 0) { *(float *)(lVar2 + lVar3) = (float)param_6; return; } if (iVar1 == 1) { auVar6._0_4_ = (float)param_6; auVar6 = vcvtps2ph_f16c(auVar6,0); vpextrw_avx(auVar6,0); return; } switchD_0010cdb3_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c" ,0x40c,"fatal error"); } }
259
ggml_set_i32_nd
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, int32_t value) { void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3]; switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(data))[0] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(data))[0] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(data))[0] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(data))[0] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O3
c
ggml_set_i32_nd: movslq %esi, %rsi imulq 0x30(%rdi), %rsi addq 0xf8(%rdi), %rsi movslq %edx, %rdx imulq 0x38(%rdi), %rdx movslq %ecx, %rax imulq 0x40(%rdi), %rax addq %rdx, %rax addq %rsi, %rax movslq %r8d, %rcx imulq 0x48(%rdi), %rcx movl (%rdi), %edx leal -0x18(%rdx), %esi cmpl $0x6, %esi ja 0xcd93 leaq 0x3b3af(%rip), %rdx # 0x48134 movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi movb %r9b, (%rax,%rcx) retq testl %edx, %edx je 0xcddd cmpl $0x1, %edx jne 0xcdfb vcvtsi2ss %r9d, %xmm0, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rax,%rcx) retq movw %r9w, (%rax,%rcx) retq movl %r9d, (%rax,%rcx) retq vcvtsi2ss %r9d, %xmm0, %xmm0 vmovd %xmm0, %esi movl %esi, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF movl %esi, %edx shrl $0x10, %edx cmpl $0x7f800001, %edi # imm = 0x7F800001 jb 0xcde8 orl $0x40, %edx jmp 0xcdf6 vcvtsi2ss %r9d, %xmm0, %xmm0 vmovss %xmm0, (%rax,%rcx) retq andl $0x1, %edx addl %esi, %edx addl $0x7fff, %edx # imm = 0x7FFF shrl $0x10, %edx movw %dx, (%rax,%rcx) retq pushq %rax leaq 0x3b70f(%rip), %rdi # 0x48512 leaq 0x3b876(%rip), %rdx # 0x48680 movl $0x40c, %esi # imm = 0x40C xorl %eax, %eax callq 0xaf40
ggml_set_i32_nd: movsxd rsi, esi imul rsi, [rdi+30h] add rsi, [rdi+0F8h] movsxd rdx, edx imul rdx, [rdi+38h] movsxd rax, ecx imul rax, [rdi+40h] add rax, rdx add rax, rsi movsxd rcx, r8d imul rcx, [rdi+48h] mov edx, [rdi] lea esi, [rdx-18h]; switch 7 cases cmp esi, 6 ja short def_CD8C; jumptable 000000000000CD8C default case lea rdx, jpt_CD8C movsxd rsi, ds:(jpt_CD8C - 48134h)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_CD8E: mov [rax+rcx], r9b; jumptable 000000000000CD8C case 24 retn def_CD8C: test edx, edx; jumptable 000000000000CD8C default case jz short loc_CDDD cmp edx, 1 jnz short loc_CDFB; jumptable 000000000000CD8C cases 27-29 vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 retn loc_CDAF: mov [rax+rcx], r9w; jumptable 000000000000CD8C case 25 retn loc_CDB5: mov [rax+rcx], r9d; jumptable 000000000000CD8C case 26 retn loc_CDBA: vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000CD8C case 30 vmovd esi, xmm0 mov edi, esi and edi, 7FFFFFFFh mov edx, esi shr edx, 10h cmp edi, 7F800001h jb short loc_CDE8 or edx, 40h jmp short loc_CDF6 loc_CDDD: vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 retn loc_CDE8: and edx, 1 add edx, esi add edx, 7FFFh shr edx, 10h loc_CDF6: mov [rax+rcx], dx retn loc_CDFB: push rax; jumptable 000000000000CD8C cases 27-29 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 40Ch xor eax, eax call _ggml_abort
long long ggml_set_i32_nd(int *a1, int a2, int a3, int a4, int a5, int a6, __m128 _XMM0) { long long result; // rax int v9; // edx unsigned int v14; // edx result = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4; _RCX = *((_QWORD *)a1 + 9) * a5; v9 = *a1; switch ( *a1 ) { case 24: *(_BYTE *)(result + _RCX) = a6; break; case 25: *(_WORD *)(result + _RCX) = a6; break; case 26: *(_DWORD *)(result + _RCX) = a6; break; case 27: case 28: case 29: goto LABEL_13; case 30: __asm { vcvtsi2ss xmm0, xmm0, r9d; jumptable 000000000000CD8C case 30 vmovd esi, xmm0 } if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 ) v14 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16; else LOWORD(v14) = HIWORD(_ESI) | 0x40; *(_WORD *)(result + _RCX) = v14; break; default: if ( v9 ) { if ( v9 == 1 ) { __asm { vcvtsi2ss xmm0, xmm0, r9d vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 } } else { LABEL_13: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 1036LL, "fatal error", _RCX); result = ggml_get_f32_1d(); } } else { __asm { vcvtsi2ss xmm0, xmm0, r9d vmovss dword ptr [rax+rcx], xmm0 } } break; } return result; }
ggml_set_i32_nd: MOVSXD RSI,ESI IMUL RSI,qword ptr [RDI + 0x30] ADD RSI,qword ptr [RDI + 0xf8] MOVSXD RDX,EDX IMUL RDX,qword ptr [RDI + 0x38] MOVSXD RAX,ECX IMUL RAX,qword ptr [RDI + 0x40] ADD RAX,RDX ADD RAX,RSI MOVSXD RCX,R8D IMUL RCX,qword ptr [RDI + 0x48] MOV EDX,dword ptr [RDI] LEA ESI,[RDX + -0x18] CMP ESI,0x6 JA 0x0010cd93 LEA RDX,[0x148134] MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_18: MOV byte ptr [RAX + RCX*0x1],R9B RET default: TEST EDX,EDX JZ 0x0010cddd CMP EDX,0x1 JNZ 0x0010cdfb VCVTSI2SS XMM0,XMM0,R9D VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RAX + RCX*0x1],XMM0,0x0 RET caseD_19: MOV word ptr [RAX + RCX*0x1],R9W RET caseD_1a: MOV dword ptr [RAX + RCX*0x1],R9D RET caseD_1e: VCVTSI2SS XMM0,XMM0,R9D VMOVD ESI,XMM0 MOV EDI,ESI AND EDI,0x7fffffff MOV EDX,ESI SHR EDX,0x10 CMP EDI,0x7f800001 JC 0x0010cde8 OR EDX,0x40 JMP 0x0010cdf6 LAB_0010cddd: VCVTSI2SS XMM0,XMM0,R9D VMOVSS dword ptr [RAX + RCX*0x1],XMM0 RET LAB_0010cde8: AND EDX,0x1 ADD EDX,ESI ADD EDX,0x7fff SHR EDX,0x10 LAB_0010cdf6: MOV word ptr [RAX + RCX*0x1],DX RET caseD_1b: PUSH RAX LEA RDI,[0x148512] LEA RDX,[0x148680] MOV ESI,0x40c XOR EAX,EAX CALL 0x0010af40
void ggml_set_i32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5,int param_6) { int iVar1; long lVar2; long lVar3; ushort uVar4; float fVar5; int1 auVar6 [16]; int1 in_ZMM0 [64]; lVar2 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e); lVar3 = (long)param_5 * *(long *)(param_1 + 0x12); iVar1 = *param_1; auVar6._4_12_ = in_ZMM0._4_12_; switch(iVar1) { case 0x18: *(char *)(lVar2 + lVar3) = (char)param_6; return; case 0x19: *(short *)(lVar2 + lVar3) = (short)param_6; return; case 0x1a: *(int *)(lVar2 + lVar3) = param_6; return; case 0x1b: case 0x1c: case 0x1d: goto switchD_0010cd8c_caseD_1b; case 0x1e: fVar5 = (float)param_6; if ((uint)ABS(fVar5) < 0x7f800001) { uVar4 = (ushort)(((uint)fVar5 >> 0x10 & 1) + (int)fVar5 + 0x7fff >> 0x10); } else { uVar4 = (ushort)((uint)fVar5 >> 0x10) | 0x40; } *(ushort *)(lVar2 + lVar3) = uVar4; return; default: if (iVar1 == 0) { *(float *)(lVar2 + lVar3) = (float)param_6; return; } if (iVar1 == 1) { auVar6._0_4_ = (float)param_6; auVar6 = vcvtps2ph_f16c(auVar6,0); vpextrw_avx(auVar6,0); return; } switchD_0010cd8c_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c" ,0x40c,"fatal error"); } }
260
MNN::ListValue::UnPackTo(MNN::ListValueT*, std::__1::function<void (void**, unsigned long)> const*) const
mnn-tts/MNN/schema/current/Tensor_generated.h
inline void ListValue::UnPackTo(ListValueT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = s(); if (_e) { _o->s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->s[_i] = _e->Get(_i)->str(); } } }; { auto _e = i(); if (_e) { _o->i.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->i[_i] = _e->Get(_i); } } }; { auto _e = f(); if (_e) { _o->f.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->f[_i] = _e->Get(_i); } } }; { auto _e = b(); if (_e) { _o->b.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->b[_i] = _e->Get(_i) != 0; } } }; { auto _e = type(); if (_e) { _o->type.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->type[_i] = static_cast<DataType>(_e->Get(_i)); } } }; }
O0
c
MNN::ListValue::UnPackTo(MNN::ListValueT*, std::__1::function<void (void**, unsigned long)> const*) const: subq $0xe8, %rsp movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq %rdx, 0xd0(%rsp) movq 0xe0(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0x1bae0 movq %rax, 0xc8(%rsp) cmpq $0x0, 0xc8(%rsp) je 0x1b71c movq 0xd8(%rsp), %rax movq %rax, 0x48(%rsp) movq 0xc8(%rsp), %rdi callq 0x8ba0 movq 0x48(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0x8b30 movl $0x0, 0xc4(%rsp) movl 0xc4(%rsp), %eax movl %eax, 0x44(%rsp) movq 0xc8(%rsp), %rdi callq 0x8ba0 movl %eax, %ecx movl 0x44(%rsp), %eax cmpl %ecx, %eax jae 0x1b71a movq 0xc8(%rsp), %rdi movl 0xc4(%rsp), %esi callq 0x8bc0 movq %rax, %rsi leaq 0xa8(%rsp), %rdi callq 0x8540 movq 0xd8(%rsp), %rdi movl 0xc4(%rsp), %eax movl %eax, %esi callq 0x8c30 movq %rax, %rdi leaq 0xa8(%rsp), %rsi callq 0x85a0 leaq 0xa8(%rsp), %rdi callq 0x6230 movl 0xc4(%rsp), %eax addl $0x1, %eax movl %eax, 0xc4(%rsp) jmp 0x1b68b jmp 0x1b71c movq 0x50(%rsp), %rdi callq 0x1bb00 movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0x1b7e3 movq 0xd8(%rsp), %rax addq $0x18, %rax movq %rax, 0x38(%rsp) movq 0xa0(%rsp), %rdi callq 0xb480 movq 0x38(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0xb410 movl $0x0, 0x9c(%rsp) movl 0x9c(%rsp), %eax movl %eax, 0x34(%rsp) movq 0xa0(%rsp), %rdi callq 0xb480 movl %eax, %ecx movl 0x34(%rsp), %eax cmpl %ecx, %eax jae 0x1b7e1 movq 0xa0(%rsp), %rdi movl 0x9c(%rsp), %esi callq 0xb4a0 movl %eax, 0x30(%rsp) movq 0xd8(%rsp), %rdi addq $0x18, %rdi movl 0x9c(%rsp), %eax movl %eax, %esi callq 0xb510 movl 0x30(%rsp), %ecx movl %ecx, (%rax) movl 0x9c(%rsp), %eax addl $0x1, %eax movl %eax, 0x9c(%rsp) jmp 0x1b774 jmp 0x1b7e3 movq 0x50(%rsp), %rdi callq 0x1bb20 movq %rax, 0x90(%rsp) cmpq $0x0, 0x90(%rsp) je 0x1b8b0 movq 0xd8(%rsp), %rax addq $0x30, %rax movq %rax, 0x28(%rsp) movq 0x90(%rsp), %rdi callq 0xb9e0 movq 0x28(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0xb970 movl $0x0, 0x8c(%rsp) movl 0x8c(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x90(%rsp), %rdi callq 0xb9e0 movl %eax, %ecx movl 0x24(%rsp), %eax cmpl %ecx, %eax jae 0x1b8ae movq 0x90(%rsp), %rdi movl 0x8c(%rsp), %esi callq 0xba00 movss %xmm0, 0x20(%rsp) movq 0xd8(%rsp), %rdi addq $0x30, %rdi movl 0x8c(%rsp), %eax movl %eax, %esi callq 0xba70 movss 0x20(%rsp), %xmm0 movss %xmm0, (%rax) movl 0x8c(%rsp), %eax addl $0x1, %eax movl %eax, 0x8c(%rsp) jmp 0x1b83b jmp 0x1b8b0 movq 0x50(%rsp), %rdi callq 0x1bb40 movq %rax, 0x80(%rsp) cmpq $0x0, 0x80(%rsp) je 0x1b98e movq 0xd8(%rsp), %rax addq $0x48, %rax movq %rax, 0x18(%rsp) movq 0x80(%rsp), %rdi callq 0xb600 movq 0x18(%rsp), %rdi movl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0x1bb60 movl $0x0, 0x7c(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x80(%rsp), %rdi callq 0xb600 movl %eax, %ecx movl 0x14(%rsp), %eax cmpl %ecx, %eax jae 0x1b98c movq 0x80(%rsp), %rdi movl 0x7c(%rsp), %esi callq 0xb620 movzbl %al, %eax cmpl $0x0, %eax setne %al movb %al, 0x13(%rsp) movq 0xd8(%rsp), %rdi addq $0x48, %rdi movl 0x7c(%rsp), %eax movl %eax, %esi callq 0x1bdd0 movq %rax, %rcx movb 0x13(%rsp), %al movq %rcx, 0x68(%rsp) movq %rdx, 0x70(%rsp) movzbl %al, %esi andl $0x1, %esi leaq 0x68(%rsp), %rdi callq 0x1be10 movl 0x7c(%rsp), %eax addl $0x1, %eax movl %eax, 0x7c(%rsp) jmp 0x1b907 jmp 0x1b98e movq 0x50(%rsp), %rdi callq 0x1be60 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) je 0x1ba32 movq 0xd8(%rsp), %rax addq $0x60, %rax movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdi callq 0xb480 movq 0x8(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0x1be80 movl $0x0, 0x5c(%rsp) movl 0x5c(%rsp), %eax movl %eax, 0x4(%rsp) movq 0x60(%rsp), %rdi callq 0xb480 movl %eax, %ecx movl 0x4(%rsp), %eax cmpl %ecx, %eax jae 0x1ba30 movq 0x60(%rsp), %rdi movl 0x5c(%rsp), %esi callq 0xb4a0 movl %eax, (%rsp) movq 0xd8(%rsp), %rdi addq $0x60, %rdi movl 0x5c(%rsp), %eax movl %eax, %esi callq 0x1bef0 movl (%rsp), %ecx movl %ecx, (%rax) movl 0x5c(%rsp), %eax addl $0x1, %eax movl %eax, 0x5c(%rsp) jmp 0x1b9da jmp 0x1ba32 addq $0xe8, %rsp retq nopw (%rax,%rax)
_ZNK3MNN9ListValue8UnPackToEPNS_10ListValueTEPKNSt3__18functionIFvPPvmEEE: sub rsp, 0E8h mov [rsp+0E8h+var_8], rdi mov [rsp+0E8h+var_10], rsi mov [rsp+0E8h+var_18], rdx mov rdi, [rsp+0E8h+var_8]; this mov [rsp+0E8h+var_98], rdi call _ZNK3MNN9ListValue1sEv; MNN::ListValue::s(void) mov [rsp+0E8h+var_20], rax cmp [rsp+0E8h+var_20], 0 jz loc_1B71C mov rax, [rsp+0E8h+var_10] mov [rsp+0E8h+var_A0], rax mov rdi, [rsp+0E8h+var_20] call _ZNK11flatbuffers6VectorINS_6OffsetINS_6StringEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(void) mov rdi, [rsp+0E8h+var_A0] mov eax, eax mov esi, eax call _ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE6resizeEm; std::vector<std::string>::resize(ulong) mov [rsp+0E8h+var_24], 0 loc_1B68B: mov eax, [rsp+0E8h+var_24] mov [rsp+0E8h+var_A4], eax mov rdi, [rsp+0E8h+var_20] call _ZNK11flatbuffers6VectorINS_6OffsetINS_6StringEEEE4sizeEv; flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(void) mov ecx, eax mov eax, [rsp+0E8h+var_A4] cmp eax, ecx jnb short loc_1B71A mov rdi, [rsp+0E8h+var_20] mov esi, [rsp+0E8h+var_24] call _ZNK11flatbuffers6VectorINS_6OffsetINS_6StringEEEE3GetEj; flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::Get(uint) mov rsi, rax lea rdi, [rsp+0E8h+var_40]; this call _ZNK11flatbuffers6String3strEv; flatbuffers::String::str(void) mov rdi, [rsp+0E8h+var_10] mov eax, [rsp+0E8h+var_24] mov esi, eax call _ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEEixB8nn200100Em; std::vector<std::string>::operator[](ulong) mov rdi, rax lea rsi, [rsp+0E8h+var_40] call _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8nn200100EOS5_; std::string::operator=(std::string&&) lea rdi, [rsp+0E8h+var_40] call __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev; std::string::~string() mov eax, [rsp+0E8h+var_24] add eax, 1 mov [rsp+0E8h+var_24], eax jmp loc_1B68B loc_1B71A: jmp short $+2 loc_1B71C: mov rdi, [rsp+0E8h+var_98]; this call _ZNK3MNN9ListValue1iEv; MNN::ListValue::i(void) mov [rsp+0E8h+var_48], rax cmp [rsp+0E8h+var_48], 0 jz loc_1B7E3 mov rax, [rsp+0E8h+var_10] add rax, 18h mov [rsp+0E8h+var_B0], rax mov rdi, [rsp+0E8h+var_48] call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void) mov rdi, [rsp+0E8h+var_B0] mov eax, eax mov esi, eax call _ZNSt3__16vectorIiNS_9allocatorIiEEE6resizeEm; std::vector<int>::resize(ulong) mov [rsp+0E8h+var_4C], 0 loc_1B774: mov eax, [rsp+0E8h+var_4C] mov [rsp+0E8h+var_B4], eax mov rdi, [rsp+0E8h+var_48] call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void) mov ecx, eax mov eax, [rsp+0E8h+var_B4] cmp eax, ecx jnb short loc_1B7E1 mov rdi, [rsp+0E8h+var_48] mov esi, [rsp+0E8h+var_4C] call _ZNK11flatbuffers6VectorIiE3GetEj; flatbuffers::Vector<int>::Get(uint) mov [rsp+0E8h+var_B8], eax mov rdi, [rsp+0E8h+var_10] add rdi, 18h mov eax, [rsp+0E8h+var_4C] mov esi, eax call _ZNSt3__16vectorIiNS_9allocatorIiEEEixB8nn200100Em; std::vector<int>::operator[](ulong) mov ecx, [rsp+0E8h+var_B8] mov [rax], ecx mov eax, [rsp+0E8h+var_4C] add eax, 1 mov [rsp+0E8h+var_4C], eax jmp short loc_1B774 loc_1B7E1: jmp short $+2 loc_1B7E3: mov rdi, [rsp+0E8h+var_98]; this call _ZNK3MNN9ListValue1fEv; MNN::ListValue::f(void) mov [rsp+0E8h+var_58], rax cmp [rsp+0E8h+var_58], 0 jz loc_1B8B0 mov rax, [rsp+0E8h+var_10] add rax, 30h ; '0' mov [rsp+0E8h+var_C0], rax mov rdi, [rsp+0E8h+var_58] call _ZNK11flatbuffers6VectorIfE4sizeEv; flatbuffers::Vector<float>::size(void) mov rdi, [rsp+0E8h+var_C0] mov eax, eax mov esi, eax call _ZNSt3__16vectorIfNS_9allocatorIfEEE6resizeEm; std::vector<float>::resize(ulong) mov [rsp+0E8h+var_5C], 0 loc_1B83B: mov eax, [rsp+0E8h+var_5C] mov [rsp+0E8h+var_C4], eax mov rdi, [rsp+0E8h+var_58] call _ZNK11flatbuffers6VectorIfE4sizeEv; flatbuffers::Vector<float>::size(void) mov ecx, eax mov eax, [rsp+0E8h+var_C4] cmp eax, ecx jnb short loc_1B8AE mov rdi, [rsp+0E8h+var_58] mov esi, [rsp+0E8h+var_5C] call _ZNK11flatbuffers6VectorIfE3GetEj; flatbuffers::Vector<float>::Get(uint) movss [rsp+0E8h+var_C8], xmm0 mov rdi, [rsp+0E8h+var_10] add rdi, 30h ; '0' mov eax, [rsp+0E8h+var_5C] mov esi, eax call _ZNSt3__16vectorIfNS_9allocatorIfEEEixB8nn200100Em; std::vector<float>::operator[](ulong) movss xmm0, [rsp+0E8h+var_C8] movss dword ptr [rax], xmm0 mov eax, [rsp+0E8h+var_5C] add eax, 1 mov [rsp+0E8h+var_5C], eax jmp short loc_1B83B loc_1B8AE: jmp short $+2 loc_1B8B0: mov rdi, [rsp+0E8h+var_98]; this call _ZNK3MNN9ListValue1bEv; MNN::ListValue::b(void) mov [rsp+0E8h+var_68], rax cmp [rsp+0E8h+var_68], 0 jz loc_1B98E mov rax, [rsp+0E8h+var_10] add rax, 48h ; 'H' mov [rsp+0E8h+var_D0], rax mov rdi, [rsp+0E8h+var_68] call _ZNK11flatbuffers6VectorIhE4sizeEv; flatbuffers::Vector<uchar>::size(void) mov rdi, [rsp+0E8h+var_D0] mov eax, eax mov esi, eax xor edx, edx call _ZNSt3__16vectorIbNS_9allocatorIbEEE6resizeEmb; std::vector<bool>::resize(ulong,bool) mov [rsp+0E8h+var_6C], 0 loc_1B907: mov eax, [rsp+0E8h+var_6C] mov [rsp+0E8h+var_D4], eax mov rdi, [rsp+0E8h+var_68] call _ZNK11flatbuffers6VectorIhE4sizeEv; flatbuffers::Vector<uchar>::size(void) mov ecx, eax mov eax, [rsp+0E8h+var_D4] cmp eax, ecx jnb short loc_1B98C mov rdi, [rsp+0E8h+var_68] mov esi, [rsp+0E8h+var_6C] call _ZNK11flatbuffers6VectorIhE3GetEj; flatbuffers::Vector<uchar>::Get(uint) movzx eax, al cmp eax, 0 setnz al mov [rsp+0E8h+var_D5], al mov rdi, [rsp+0E8h+var_10] add rdi, 48h ; 'H' mov eax, [rsp+0E8h+var_6C] mov esi, eax call _ZNSt3__16vectorIbNS_9allocatorIbEEEixB8nn200100Em; std::vector<bool>::operator[](ulong) mov rcx, rax mov al, [rsp+0E8h+var_D5] mov [rsp+0E8h+var_80], rcx mov [rsp+0E8h+var_78], rdx movzx esi, al and esi, 1 lea rdi, [rsp+0E8h+var_80] call _ZNSt3__115__bit_referenceINS_6vectorIbNS_9allocatorIbEEEELb1EEaSB8nn200100Eb; std::__bit_reference<std::vector<bool>,true>::operator=(bool) mov eax, [rsp+0E8h+var_6C] add eax, 1 mov [rsp+0E8h+var_6C], eax jmp loc_1B907 loc_1B98C: jmp short $+2 loc_1B98E: mov rdi, [rsp+0E8h+var_98]; this call _ZNK3MNN9ListValue4typeEv; MNN::ListValue::type(void) mov [rsp+0E8h+var_88], rax cmp [rsp+0E8h+var_88], 0 jz loc_1BA32 mov rax, [rsp+0E8h+var_10] add rax, 60h ; '`' mov [rsp+0E8h+var_E0], rax mov rdi, [rsp+0E8h+var_88] call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void) mov rdi, [rsp+0E8h+var_E0] mov eax, eax mov esi, eax call _ZNSt3__16vectorIN3MNN8DataTypeENS_9allocatorIS2_EEE6resizeEm; std::vector<MNN::DataType>::resize(ulong) mov [rsp+0E8h+var_8C], 0 loc_1B9DA: mov eax, [rsp+0E8h+var_8C] mov [rsp+0E8h+var_E4], eax mov rdi, [rsp+0E8h+var_88] call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void) mov ecx, eax mov eax, [rsp+0E8h+var_E4] cmp eax, ecx jnb short loc_1BA30 mov rdi, [rsp+0E8h+var_88] mov esi, [rsp+0E8h+var_8C] call _ZNK11flatbuffers6VectorIiE3GetEj; flatbuffers::Vector<int>::Get(uint) mov [rsp+0E8h+var_E8], eax mov rdi, [rsp+0E8h+var_10] add rdi, 60h ; '`' mov eax, [rsp+0E8h+var_8C] mov esi, eax call _ZNSt3__16vectorIN3MNN8DataTypeENS_9allocatorIS2_EEEixB8nn200100Em; std::vector<MNN::DataType>::operator[](ulong) mov ecx, [rsp+0E8h+var_E8] mov [rax], ecx mov eax, [rsp+0E8h+var_8C] add eax, 1 mov [rsp+0E8h+var_8C], eax jmp short loc_1B9DA loc_1BA30: jmp short $+2 loc_1BA32: add rsp, 0E8h retn
unsigned int * MNN::ListValue::UnPackTo(MNN::ListValue *a1, _QWORD *a2, long long a3, float a4) { unsigned int v4; // eax flatbuffers::String *v5; // rax long long v6; // rax unsigned int v7; // eax unsigned int v8; // eax unsigned int v9; // eax long long v10; // rdx unsigned int *result; // rax unsigned int v12; // eax unsigned int v13; // ecx int v14; // [rsp+0h] [rbp-E8h] _QWORD *v15; // [rsp+8h] [rbp-E0h] bool v16; // [rsp+13h] [rbp-D5h] unsigned int v17; // [rsp+14h] [rbp-D4h] _QWORD *v18; // [rsp+18h] [rbp-D0h] _QWORD *v19; // [rsp+28h] [rbp-C0h] int v20; // [rsp+30h] [rbp-B8h] _QWORD *v21; // [rsp+38h] [rbp-B0h] unsigned int v22; // [rsp+44h] [rbp-A4h] unsigned int n; // [rsp+5Ch] [rbp-8Ch] unsigned int *v24; // [rsp+60h] [rbp-88h] _QWORD v25[2]; // [rsp+68h] [rbp-80h] BYREF unsigned int m; // [rsp+7Ch] [rbp-6Ch] unsigned int *v27; // [rsp+80h] [rbp-68h] unsigned int k; // [rsp+8Ch] [rbp-5Ch] unsigned int *v29; // [rsp+90h] [rbp-58h] unsigned int j; // [rsp+9Ch] [rbp-4Ch] unsigned int *v31; // [rsp+A0h] [rbp-48h] _BYTE v32[28]; // [rsp+A8h] [rbp-40h] BYREF unsigned int i; // [rsp+C4h] [rbp-24h] unsigned int *v34; // [rsp+C8h] [rbp-20h] long long v35; // [rsp+D0h] [rbp-18h] _QWORD *v36; // [rsp+D8h] [rbp-10h] MNN::ListValue *v37; // [rsp+E0h] [rbp-8h] v37 = a1; v36 = a2; v35 = a3; v34 = (unsigned int *)MNN::ListValue::s(a1); if ( v34 ) { v4 = flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(v34); std::vector<std::string>::resize(v36, v4); for ( i = 0; ; ++i ) { v22 = i; if ( v22 >= (unsigned int)flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(v34) ) break; v5 = (flatbuffers::String *)flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::Get(v34, i); flatbuffers::String::str((flatbuffers::String *)v32, v5); v6 = std::vector<std::string>::operator[][abi:nn200100](v36, i); std::string::operator=[abi:nn200100](v6, (long long)v32); std::string::~string(v32); } } v31 = (unsigned int *)MNN::ListValue::i(a1); if ( v31 ) { v21 = v36 + 3; v7 = flatbuffers::Vector<int>::size(v31); std::vector<int>::resize(v21, v7); for ( j = 0; j < (unsigned int)flatbuffers::Vector<int>::size(v31); ++j ) { v20 = flatbuffers::Vector<int>::Get(v31, j); *(_DWORD *)std::vector<int>::operator[][abi:nn200100](v36 + 3, j) = v20; } } v29 = (unsigned int *)MNN::ListValue::f(a1); if ( v29 ) { v19 = v36 + 6; v8 = flatbuffers::Vector<float>::size(v29); std::vector<float>::resize(v19, v8); for ( k = 0; k < (unsigned int)flatbuffers::Vector<float>::size(v29); ++k ) { flatbuffers::Vector<float>::Get(v29, k); *(float *)std::vector<float>::operator[][abi:nn200100](v36 + 6, k) = a4; } } v27 = (unsigned int *)MNN::ListValue::b(a1); if ( v27 ) { v18 = v36 + 9; v9 = flatbuffers::Vector<unsigned char>::size(v27); std::vector<bool>::resize(v18, v9, 0LL); for ( m = 0; ; ++m ) { v17 = m; if ( v17 >= (unsigned int)flatbuffers::Vector<unsigned char>::size(v27) ) break; v16 = (unsigned __int8)flatbuffers::Vector<unsigned char>::Get(v27, m) != 0; v25[0] = std::vector<bool>::operator[][abi:nn200100](v36 + 9, m); v25[1] = v10; std::__bit_reference<std::vector<bool>,true>::operator=[abi:nn200100](v25, v16); } } result = (unsigned int *)MNN::ListValue::type(a1); v24 = result; if ( result ) { v15 = v36 + 12; v12 = flatbuffers::Vector<int>::size(result); std::vector<MNN::DataType>::resize(v15, v12); for ( n = 0; ; ++n ) { v13 = flatbuffers::Vector<int>::size(v24); result = (unsigned int *)n; if ( n >= v13 ) break; v14 = flatbuffers::Vector<int>::Get(v24, n); *(_DWORD *)std::vector<MNN::DataType>::operator[][abi:nn200100](v36 + 12, n) = v14; } } return result; }
UnPackTo: SUB RSP,0xe8 MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV qword ptr [RSP + 0xd0],RDX MOV RDI,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x50],RDI CALL 0x0011bae0 MOV qword ptr [RSP + 0xc8],RAX CMP qword ptr [RSP + 0xc8],0x0 JZ 0x0011b71c MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00108ba0 MOV RDI,qword ptr [RSP + 0x48] MOV EAX,EAX MOV ESI,EAX CALL 0x00108b30 MOV dword ptr [RSP + 0xc4],0x0 LAB_0011b68b: MOV EAX,dword ptr [RSP + 0xc4] MOV dword ptr [RSP + 0x44],EAX MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00108ba0 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x44] CMP EAX,ECX JNC 0x0011b71a MOV RDI,qword ptr [RSP + 0xc8] MOV ESI,dword ptr [RSP + 0xc4] CALL 0x00108bc0 MOV RSI,RAX LEA RDI,[RSP + 0xa8] CALL 0x00108540 MOV RDI,qword ptr [RSP + 0xd8] MOV EAX,dword ptr [RSP + 0xc4] MOV ESI,EAX CALL 0x00108c30 MOV RDI,RAX LEA RSI,[RSP + 0xa8] CALL 0x001085a0 LEA RDI,[RSP + 0xa8] CALL 0x00106230 MOV EAX,dword ptr [RSP + 0xc4] ADD EAX,0x1 MOV dword ptr [RSP + 0xc4],EAX JMP 0x0011b68b LAB_0011b71a: JMP 0x0011b71c LAB_0011b71c: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0011bb00 MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JZ 0x0011b7e3 MOV RAX,qword ptr [RSP + 0xd8] ADD RAX,0x18 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x0010b480 MOV RDI,qword ptr [RSP + 0x38] MOV EAX,EAX MOV ESI,EAX CALL 0x0010b410 MOV dword ptr [RSP + 0x9c],0x0 LAB_0011b774: MOV EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x34],EAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x0010b480 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x34] CMP EAX,ECX JNC 0x0011b7e1 MOV RDI,qword ptr [RSP + 0xa0] MOV ESI,dword ptr [RSP + 0x9c] CALL 0x0010b4a0 MOV dword ptr [RSP + 0x30],EAX MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x9c] MOV ESI,EAX CALL 0x0010b510 MOV ECX,dword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x9c] ADD EAX,0x1 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0011b774 LAB_0011b7e1: JMP 0x0011b7e3 LAB_0011b7e3: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0011bb20 MOV qword ptr [RSP + 0x90],RAX CMP qword ptr [RSP + 0x90],0x0 JZ 0x0011b8b0 MOV RAX,qword ptr [RSP + 0xd8] ADD RAX,0x30 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x0010b9e0 MOV RDI,qword ptr [RSP + 0x28] MOV EAX,EAX MOV ESI,EAX CALL 0x0010b970 MOV dword ptr [RSP + 0x8c],0x0 LAB_0011b83b: MOV EAX,dword ptr [RSP + 0x8c] MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x0010b9e0 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x24] CMP EAX,ECX JNC 0x0011b8ae MOV RDI,qword ptr [RSP + 0x90] MOV ESI,dword ptr [RSP + 0x8c] CALL 0x0010ba00 MOVSS dword ptr [RSP + 0x20],XMM0 MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x30 MOV EAX,dword ptr [RSP + 0x8c] MOV ESI,EAX CALL 0x0010ba70 MOVSS XMM0,dword ptr [RSP + 0x20] MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0x8c] ADD EAX,0x1 MOV dword ptr [RSP + 0x8c],EAX JMP 0x0011b83b LAB_0011b8ae: JMP 0x0011b8b0 LAB_0011b8b0: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0011bb40 MOV qword ptr [RSP + 0x80],RAX CMP qword ptr [RSP + 0x80],0x0 JZ 0x0011b98e MOV RAX,qword ptr [RSP + 0xd8] ADD RAX,0x48 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0010b600 MOV RDI,qword ptr [RSP + 0x18] MOV EAX,EAX MOV ESI,EAX XOR EDX,EDX CALL 0x0011bb60 MOV dword ptr [RSP + 0x7c],0x0 LAB_0011b907: MOV EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0010b600 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x14] CMP EAX,ECX JNC 0x0011b98c MOV RDI,qword ptr [RSP + 0x80] MOV ESI,dword ptr [RSP + 0x7c] CALL 0x0010b620 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0x13],AL MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x7c] MOV ESI,EAX CALL 0x0011bdd0 MOV RCX,RAX MOV AL,byte ptr [RSP + 0x13] MOV qword ptr [RSP + 0x68],RCX MOV qword ptr [RSP + 0x70],RDX MOVZX ESI,AL AND ESI,0x1 LEA RDI,[RSP + 0x68] CALL 0x0011be10 MOV EAX,dword ptr [RSP + 0x7c] ADD EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x0011b907 LAB_0011b98c: JMP 0x0011b98e LAB_0011b98e: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0011be60 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 JZ 0x0011ba32 MOV RAX,qword ptr [RSP + 0xd8] ADD RAX,0x60 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010b480 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,EAX MOV ESI,EAX CALL 0x0011be80 MOV dword ptr [RSP + 0x5c],0x0 LAB_0011b9da: MOV EAX,dword ptr [RSP + 0x5c] MOV dword ptr [RSP + 0x4],EAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010b480 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x4] CMP EAX,ECX JNC 0x0011ba30 MOV RDI,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RSP + 0x5c] CALL 0x0010b4a0 MOV dword ptr [RSP],EAX MOV RDI,qword ptr [RSP + 0xd8] ADD RDI,0x60 MOV EAX,dword ptr [RSP + 0x5c] MOV ESI,EAX CALL 0x0011bef0 MOV ECX,dword ptr [RSP] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x5c] ADD EAX,0x1 MOV dword ptr [RSP + 0x5c],EAX JMP 0x0011b9da LAB_0011ba30: JMP 0x0011ba32 LAB_0011ba32: ADD RSP,0xe8 RET
/* MNN::ListValue::UnPackTo(MNN::ListValueT*, std::function<void (void**, unsigned long)> const*) const */ void __thiscall MNN::ListValue::UnPackTo(ListValue *this,ListValueT *param_1,function *param_2) { vector<std::string,std::allocator<std::string>> *this_00; char cVar1; uint uVar2; uint uVar3; int4 uVar4; string *this_01; vector<int,std::allocator<int>> *this_02; int4 *puVar5; vector<float,std::allocator<float>> *this_03; vector<bool,std::allocator<bool>> *this_04; Vector<int> *this_05; vector<MNN::DataType,std::allocator<MNN::DataType>> *this_06; int1 auVar6 [16]; uint local_8c; int1 local_80 [16]; uint local_6c; Vector<unsigned_char> *local_68; uint local_5c; Vector<float> *local_58; uint local_4c; Vector<int> *local_48; string local_40 [28]; uint local_24; Vector<flatbuffers::Offset<flatbuffers::String>> *local_20; function *local_18; vector<std::string,std::allocator<std::string>> *local_10; ListValue *local_8; local_18 = param_2; local_10 = (vector<std::string,std::allocator<std::string>> *)param_1; local_8 = this; local_20 = (Vector<flatbuffers::Offset<flatbuffers::String>> *)s(this); this_00 = local_10; if (local_20 != (Vector<flatbuffers::Offset<flatbuffers::String>> *)0x0) { uVar2 = flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(local_20); std::vector<std::string,std::allocator<std::string>>::resize(this_00,(ulong)uVar2); for (local_24 = 0; uVar2 = local_24, uVar3 = flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::size(local_20), uVar2 < uVar3; local_24 = local_24 + 1) { flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>::Get(local_20,local_24); flatbuffers::String::str(); this_01 = (string *) std::vector<std::string,std::allocator<std::string>>::operator[][abi_nn200100_ (local_10,(ulong)local_24); std::string::operator=[abi_nn200100_(this_01,local_40); std::string::~string(local_40); } } local_48 = (Vector<int> *)i(this); if (local_48 != (Vector<int> *)0x0) { this_02 = (vector<int,std::allocator<int>> *)(local_10 + 0x18); uVar2 = flatbuffers::Vector<int>::size(local_48); std::vector<int,std::allocator<int>>::resize(this_02,(ulong)uVar2); for (local_4c = 0; uVar2 = local_4c, uVar3 = flatbuffers::Vector<int>::size(local_48), uVar2 < uVar3; local_4c = local_4c + 1) { uVar4 = flatbuffers::Vector<int>::Get(local_48,local_4c); puVar5 = (int4 *) std::vector<int,std::allocator<int>>::operator[][abi_nn200100_ ((vector<int,std::allocator<int>> *)(local_10 + 0x18),(ulong)local_4c); *puVar5 = uVar4; } } local_58 = (Vector<float> *)f(this); if (local_58 != (Vector<float> *)0x0) { this_03 = (vector<float,std::allocator<float>> *)(local_10 + 0x30); uVar2 = flatbuffers::Vector<float>::size(local_58); std::vector<float,std::allocator<float>>::resize(this_03,(ulong)uVar2); for (local_5c = 0; uVar2 = local_5c, uVar3 = flatbuffers::Vector<float>::size(local_58), uVar2 < uVar3; local_5c = local_5c + 1) { uVar4 = flatbuffers::Vector<float>::Get(local_58,local_5c); puVar5 = (int4 *) std::vector<float,std::allocator<float>>::operator[][abi_nn200100_ ((vector<float,std::allocator<float>> *)(local_10 + 0x30),(ulong)local_5c); *puVar5 = uVar4; } } local_68 = (Vector<unsigned_char> *)b(this); if (local_68 != (Vector<unsigned_char> *)0x0) { this_04 = (vector<bool,std::allocator<bool>> *)(local_10 + 0x48); uVar2 = flatbuffers::Vector<unsigned_char>::size(local_68); std::vector<bool,std::allocator<bool>>::resize(this_04,(ulong)uVar2,false); local_6c = 0; while( true ) { uVar2 = local_6c; uVar3 = flatbuffers::Vector<unsigned_char>::size(local_68); if (uVar3 <= uVar2) break; cVar1 = flatbuffers::Vector<unsigned_char>::Get(local_68,local_6c); auVar6 = std::vector<bool,std::allocator<bool>>::operator[][abi_nn200100_ ((vector<bool,std::allocator<bool>> *)(local_10 + 0x48),(ulong)local_6c); local_80 = auVar6; std::__bit_reference<std::vector<bool,std::allocator<bool>>,true>::operator=[abi_nn200100_ ((__bit_reference<std::vector<bool,std::allocator<bool>>,true> *)local_80, cVar1 != '\0'); local_6c = local_6c + 1; } } this_05 = (Vector<int> *)type(this); if (this_05 != (Vector<int> *)0x0) { this_06 = (vector<MNN::DataType,std::allocator<MNN::DataType>> *)(local_10 + 0x60); uVar2 = flatbuffers::Vector<int>::size(this_05); std::vector<MNN::DataType,std::allocator<MNN::DataType>>::resize(this_06,(ulong)uVar2); local_8c = 0; while( true ) { uVar2 = flatbuffers::Vector<int>::size(this_05); if (uVar2 <= local_8c) break; uVar4 = flatbuffers::Vector<int>::Get(this_05,local_8c); puVar5 = (int4 *) std::vector<MNN::DataType,std::allocator<MNN::DataType>>::operator[][abi_nn200100_ ((vector<MNN::DataType,std::allocator<MNN::DataType>> *)(local_10 + 0x60), (ulong)local_8c); *puVar5 = uVar4; local_8c = local_8c + 1; } } return; }
261
my_print_default_files
eloqsql/mysys/my_default.c
void my_print_default_files(const char *conf_file) { const char *empty_list[]= { "", 0 }; my_bool have_ext= fn_ext(conf_file)[0] != 0; const char **exts_to_use= have_ext ? empty_list : f_extensions; char name[FN_REFLEN], **ext; puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file) { puts(my_defaults_file); return; } if (dirname_length(conf_file)) fputs(conf_file,stdout); else { const char **dirs; MEM_ROOT alloc; init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0)); if ((dirs= init_default_directories(&alloc)) == NULL) { fputs("Internal error initializing default directories list", stdout); } else { for ( ; *dirs; dirs++) { for (ext= (char**) exts_to_use; *ext; ext++) { const char *pos; char *end; if (**dirs) pos= *dirs; else if (my_defaults_extra_file) { pos= my_defaults_extra_file; fputs(pos, stdout); fputs(" ", stdout); continue; } else continue; end= convert_dirname(name, pos, NullS); if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ *end++= '.'; strxmov(end, conf_file, *ext, " ", NullS); fputs(name, stdout); } } } free_root(&alloc, MYF(0)); } puts(""); }
O0
c
my_print_default_files: pushq %rbp movq %rsp, %rbp subq $0x2b0, %rsp # imm = 0x2B0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq 0x1d998a(%rip), %rax # 0x281a00 movq %rax, -0x230(%rbp) movq 0x1d9984(%rip), %rax # 0x281a08 movq %rax, -0x228(%rbp) movq -0x218(%rbp), %rdi callq 0xab410 movsbl (%rax), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x231(%rbp) movsbl -0x231(%rbp), %eax cmpl $0x0, %eax je 0xa80c7 leaq -0x230(%rbp), %rax movq %rax, -0x2a8(%rbp) jmp 0xa80d7 leaq 0x1e5af2(%rip), %rax # 0x28dbc0 movq %rax, -0x2a8(%rbp) jmp 0xa80d7 movq -0x2a8(%rbp), %rax movq %rax, -0x240(%rbp) leaq 0x6fda0(%rip), %rdi # 0x117e8c callq 0x3bb50 leaq 0x3a7770(%rip), %rax # 0x44f868 cmpq $0x0, (%rax) je 0xa8112 leaq 0x3a7763(%rip), %rax # 0x44f868 movq (%rax), %rdi callq 0x3bb50 jmp 0xa830e movq -0x218(%rbp), %rdi callq 0xab270 cmpq $0x0, %rax je 0xa813f movq -0x218(%rbp), %rdi movq 0x1e1ea6(%rip), %rax # 0x289fd8 movq (%rax), %rsi callq 0x3b3c0 jmp 0xa8302 leaq 0x3a8562(%rip), %rax # 0x4506a8 movl (%rax), %edi leaq -0x290(%rbp), %rsi movl $0x200, %edx # imm = 0x200 xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0xb26e0 leaq -0x290(%rbp), %rdi callq 0xa7bb0 movq %rax, -0x250(%rbp) cmpq $0x0, %rax jne 0xa8195 movq 0x1e1e57(%rip), %rax # 0x289fd8 movq (%rax), %rsi leaq 0x6fd48(%rip), %rdi # 0x117ed3 callq 0x3b3c0 jmp 0xa82f2 jmp 0xa8197 movq -0x250(%rbp), %rax cmpq $0x0, (%rax) je 0xa82f0 movq -0x240(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x248(%rbp), %rax cmpq $0x0, (%rax) je 0xa82d7 movq -0x250(%rbp), %rax movq (%rax), %rax cmpb $0x0, (%rax) je 0xa81e9 movq -0x250(%rbp), %rax movq (%rax), %rax movq %rax, -0x298(%rbp) jmp 0xa823d leaq 0x3a7688(%rip), %rax # 0x44f878 cmpq $0x0, (%rax) je 0xa8238 leaq 0x3a767b(%rip), %rax # 0x44f878 movq (%rax), %rax movq %rax, -0x298(%rbp) movq -0x298(%rbp), %rdi movq 0x1e1dc3(%rip), %rax # 0x289fd8 movq (%rax), %rsi callq 0x3b3c0 movq 0x1e1db4(%rip), %rax # 0x289fd8 movq (%rax), %rsi leaq 0x6a15f(%rip), %rdi # 0x11238d callq 0x3b3c0 jmp 0xa82c0 jmp 0xa82c0 leaq -0x210(%rbp), %rdi movq -0x298(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xab350 movq %rax, -0x2a0(%rbp) movsbl -0x210(%rbp), %eax cmpl $0x7e, %eax jne 0xa827f movq -0x2a0(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x2a0(%rbp) movb $0x2e, (%rax) movq -0x2a0(%rbp), %rdi movq -0x218(%rbp), %rsi movq -0x248(%rbp), %rax movq (%rax), %rdx leaq 0x6a0ef(%rip), %rcx # 0x11238d xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0x10cc20 leaq -0x210(%rbp), %rdi movq 0x1e1d20(%rip), %rax # 0x289fd8 movq (%rax), %rsi callq 0x3b3c0 movq -0x248(%rbp), %rax addq $0x8, %rax movq %rax, -0x248(%rbp) jmp 0xa81b6 jmp 0xa82d9 movq -0x250(%rbp), %rax addq $0x8, %rax movq %rax, -0x250(%rbp) jmp 0xa8197 jmp 0xa82f2 leaq -0x290(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb2f50 leaq 0x6a5b8(%rip), %rdi # 0x1128c1 callq 0x3bb50 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa8329 addq $0x2b0, %rsp # imm = 0x2B0 popq %rbp retq callq 0x3b340 nop
my_print_default_files: push rbp mov rbp, rsp sub rsp, 2B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov rax, cs:off_281A00; "" mov [rbp+var_230], rax mov rax, cs:qword_281A08 mov [rbp+var_228], rax mov rdi, [rbp+var_218] call fn_ext movsx eax, byte ptr [rax] cmp eax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_231], al movsx eax, [rbp+var_231] cmp eax, 0 jz short loc_A80C7 lea rax, [rbp+var_230] mov [rbp+var_2A8], rax jmp short loc_A80D7 loc_A80C7: lea rax, f_extensions mov [rbp+var_2A8], rax jmp short $+2 loc_A80D7: mov rax, [rbp+var_2A8] mov [rbp+var_240], rax lea rdi, aDefaultOptions; "\nDefault options are read from the fol"... call _puts lea rax, my_defaults_file cmp qword ptr [rax], 0 jz short loc_A8112 lea rax, my_defaults_file mov rdi, [rax] call _puts jmp loc_A830E loc_A8112: mov rdi, [rbp+var_218] call dirname_length cmp rax, 0 jz short loc_A813F mov rdi, [rbp+var_218] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs jmp loc_A8302 loc_A813F: lea rax, key_memory_defaults mov edi, [rax] lea rsi, [rbp+var_290] mov edx, 200h xor eax, eax mov r8d, eax mov rcx, r8 call init_alloc_root lea rdi, [rbp+var_290] call init_default_directories mov [rbp+var_250], rax cmp rax, 0 jnz short loc_A8195 mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aInternalErrorI; "Internal error initializing default dir"... call _fputs jmp loc_A82F2 loc_A8195: jmp short $+2 loc_A8197: mov rax, [rbp+var_250] cmp qword ptr [rax], 0 jz loc_A82F0 mov rax, [rbp+var_240] mov [rbp+var_248], rax loc_A81B6: mov rax, [rbp+var_248] cmp qword ptr [rax], 0 jz loc_A82D7 mov rax, [rbp+var_250] mov rax, [rax] cmp byte ptr [rax], 0 jz short loc_A81E9 mov rax, [rbp+var_250] mov rax, [rax] mov [rbp+var_298], rax jmp short loc_A823D loc_A81E9: lea rax, my_defaults_extra_file cmp qword ptr [rax], 0 jz short loc_A8238 lea rax, my_defaults_extra_file mov rax, [rax] mov [rbp+var_298], rax mov rdi, [rbp+var_298] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, asc_112382+0Bh; " " call _fputs jmp loc_A82C0 loc_A8238: jmp loc_A82C0 loc_A823D: lea rdi, [rbp+var_210] mov rsi, [rbp+var_298] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_2A0], rax movsx eax, [rbp+var_210] cmp eax, 7Eh ; '~' jnz short loc_A827F mov rax, [rbp+var_2A0] mov rcx, rax add rcx, 1 mov [rbp+var_2A0], rcx mov byte ptr [rax], 2Eh ; '.' loc_A827F: mov rdi, [rbp+var_2A0] mov rsi, [rbp+var_218] mov rax, [rbp+var_248] mov rdx, [rax] lea rcx, asc_112382+0Bh; " " xor eax, eax mov r8d, eax mov al, 0 call strxmov lea rdi, [rbp+var_210] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs loc_A82C0: mov rax, [rbp+var_248] add rax, 8 mov [rbp+var_248], rax jmp loc_A81B6 loc_A82D7: jmp short $+2 loc_A82D9: mov rax, [rbp+var_250] add rax, 8 mov [rbp+var_250], rax jmp loc_A8197 loc_A82F0: jmp short $+2 loc_A82F2: lea rdi, [rbp+var_290] xor eax, eax mov esi, eax call free_root loc_A8302: lea rdi, aDumpsAMariadbB+6Bh; "" call _puts loc_A830E: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A8329 add rsp, 2B0h pop rbp retn loc_A8329: call ___stack_chk_fail
unsigned long long my_print_default_files(long long a1) { _BYTE *v1; // rax int v2; // r9d char **v4; // [rsp+8h] [rbp-2A8h] int v5; // [rsp+10h] [rbp-2A0h] _BYTE v6[64]; // [rsp+20h] [rbp-290h] BYREF _QWORD *inited; // [rsp+60h] [rbp-250h] char **i; // [rsp+68h] [rbp-248h] char **v9; // [rsp+70h] [rbp-240h] _QWORD v11[3]; // [rsp+80h] [rbp-230h] BYREF long long v12; // [rsp+98h] [rbp-218h] _BYTE v13[520]; // [rsp+A0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2A8h] [rbp-8h] v14 = __readfsqword(0x28u); v12 = a1; v11[0] = ""; v11[1] = &dword_0; if ( *(_BYTE *)fn_ext(a1) != 0 ) v4 = (char **)v11; else v4 = &f_extensions; v9 = v4; puts("\nDefault options are read from the following files in the given order:"); if ( my_defaults_file ) { puts(my_defaults_file); } else { if ( dirname_length(v12) ) { fputs(v12, stdout); } else { init_alloc_root(key_memory_defaults, v6, 512LL, 0LL); inited = (_QWORD *)init_default_directories((long long)v6); if ( inited ) { while ( *inited ) { for ( i = v9; *i; ++i ) { if ( *(_BYTE *)*inited ) { v1 = (_BYTE *)convert_dirname(v13, *inited, 0LL); v5 = (int)v1; if ( v13[0] == 126 ) { v5 = (_DWORD)v1 + 1; *v1 = 46; } strxmov(v5, v12, (unsigned int)*i, (unsigned int)" ", 0, v2); fputs(v13, stdout); } else if ( my_defaults_extra_file ) { fputs(my_defaults_extra_file, stdout); fputs(" ", stdout); } } ++inited; } } else { fputs("Internal error initializing default directories list", stdout); } free_root(v6, 0LL); } puts(""); } return __readfsqword(0x28u); }
my_print_default_files: PUSH RBP MOV RBP,RSP SUB RSP,0x2b0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV RAX,qword ptr [0x00381a00] MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [0x00381a08] MOV qword ptr [RBP + -0x228],RAX MOV RDI,qword ptr [RBP + -0x218] CALL 0x001ab410 MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x231],AL MOVSX EAX,byte ptr [RBP + -0x231] CMP EAX,0x0 JZ 0x001a80c7 LEA RAX,[RBP + -0x230] MOV qword ptr [RBP + -0x2a8],RAX JMP 0x001a80d7 LAB_001a80c7: LEA RAX,[0x38dbc0] MOV qword ptr [RBP + -0x2a8],RAX JMP 0x001a80d7 LAB_001a80d7: MOV RAX,qword ptr [RBP + -0x2a8] MOV qword ptr [RBP + -0x240],RAX LEA RDI,[0x217e8c] CALL 0x0013bb50 LEA RAX,[0x54f868] CMP qword ptr [RAX],0x0 JZ 0x001a8112 LEA RAX,[0x54f868] MOV RDI,qword ptr [RAX] CALL 0x0013bb50 JMP 0x001a830e LAB_001a8112: MOV RDI,qword ptr [RBP + -0x218] CALL 0x001ab270 CMP RAX,0x0 JZ 0x001a813f MOV RDI,qword ptr [RBP + -0x218] MOV RAX,qword ptr [0x00389fd8] MOV RSI,qword ptr [RAX] CALL 0x0013b3c0 JMP 0x001a8302 LAB_001a813f: LEA RAX,[0x5506a8] MOV EDI,dword ptr [RAX] LEA RSI,[RBP + -0x290] MOV EDX,0x200 XOR EAX,EAX MOV R8D,EAX MOV RCX,R8 CALL 0x001b26e0 LEA RDI,[RBP + -0x290] CALL 0x001a7bb0 MOV qword ptr [RBP + -0x250],RAX CMP RAX,0x0 JNZ 0x001a8195 MOV RAX,qword ptr [0x00389fd8] MOV RSI,qword ptr [RAX] LEA RDI,[0x217ed3] CALL 0x0013b3c0 JMP 0x001a82f2 LAB_001a8195: JMP 0x001a8197 LAB_001a8197: MOV RAX,qword ptr [RBP + -0x250] CMP qword ptr [RAX],0x0 JZ 0x001a82f0 MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x248],RAX LAB_001a81b6: MOV RAX,qword ptr [RBP + -0x248] CMP qword ptr [RAX],0x0 JZ 0x001a82d7 MOV RAX,qword ptr [RBP + -0x250] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX],0x0 JZ 0x001a81e9 MOV RAX,qword ptr [RBP + -0x250] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x298],RAX JMP 0x001a823d LAB_001a81e9: LEA RAX,[0x54f878] CMP qword ptr [RAX],0x0 JZ 0x001a8238 LEA RAX,[0x54f878] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x298],RAX MOV RDI,qword ptr [RBP + -0x298] MOV RAX,qword ptr [0x00389fd8] MOV RSI,qword ptr [RAX] CALL 0x0013b3c0 MOV RAX,qword ptr [0x00389fd8] MOV RSI,qword ptr [RAX] LEA RDI,[0x21238d] CALL 0x0013b3c0 JMP 0x001a82c0 LAB_001a8238: JMP 0x001a82c0 LAB_001a823d: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x298] XOR EAX,EAX MOV EDX,EAX CALL 0x001ab350 MOV qword ptr [RBP + -0x2a0],RAX MOVSX EAX,byte ptr [RBP + -0x210] CMP EAX,0x7e JNZ 0x001a827f MOV RAX,qword ptr [RBP + -0x2a0] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x2a0],RCX MOV byte ptr [RAX],0x2e LAB_001a827f: MOV RDI,qword ptr [RBP + -0x2a0] MOV RSI,qword ptr [RBP + -0x218] MOV RAX,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RAX] LEA RCX,[0x21238d] XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x0020cc20 LEA RDI,[RBP + -0x210] MOV RAX,qword ptr [0x00389fd8] MOV RSI,qword ptr [RAX] CALL 0x0013b3c0 LAB_001a82c0: MOV RAX,qword ptr [RBP + -0x248] ADD RAX,0x8 MOV qword ptr [RBP + -0x248],RAX JMP 0x001a81b6 LAB_001a82d7: JMP 0x001a82d9 LAB_001a82d9: MOV RAX,qword ptr [RBP + -0x250] ADD RAX,0x8 MOV qword ptr [RBP + -0x250],RAX JMP 0x001a8197 LAB_001a82f0: JMP 0x001a82f2 LAB_001a82f2: LEA RDI,[RBP + -0x290] XOR EAX,EAX MOV ESI,EAX CALL 0x001b2f50 LAB_001a8302: LEA RDI,[0x2128c1] CALL 0x0013bb50 LAB_001a830e: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a8329 ADD RSP,0x2b0 POP RBP RET LAB_001a8329: CALL 0x0013b340
void my_print_default_files(char *param_1) { char *pcVar1; long lVar2; int1 *puVar3; long in_FS_OFFSET; int **local_2b0; int1 *local_2a8; int1 local_298 [64]; long *local_258; int **local_250; int **local_248; int1 local_239; int *local_238; int8 local_230; char *local_220; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_238 = PTR_s__00381a00; local_230 = DAT_00381a08; local_220 = param_1; pcVar1 = (char *)fn_ext(param_1); local_239 = *pcVar1 != '\0'; if ((bool)local_239) { local_2b0 = &local_238; } else { local_2b0 = &f_extensions; } local_248 = local_2b0; puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file == (char *)0x0) { lVar2 = dirname_length(local_220); if (lVar2 == 0) { init_alloc_root(key_memory_defaults,local_298,0x200,0); local_258 = (long *)init_default_directories(local_298); if (local_258 == (long *)0x0) { fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_00389fd8); } else { for (; *local_258 != 0; local_258 = local_258 + 1) { for (local_250 = local_248; *local_250 != (int *)0x0; local_250 = local_250 + 1) { if (*(char *)*local_258 == '\0') { if (my_defaults_extra_file != (char *)0x0) { fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_00389fd8); fputs(" ",*(FILE **)PTR_stdout_00389fd8); } } else { puVar3 = (int1 *)convert_dirname(local_218,*local_258,0); local_2a8 = puVar3; if (local_218[0] == '~') { local_2a8 = puVar3 + 1; *puVar3 = 0x2e; } strxmov(local_2a8,local_220,*local_250,&DAT_0021238d,0); fputs(local_218,*(FILE **)PTR_stdout_00389fd8); } } } } free_root(local_298,0); } else { fputs(local_220,*(FILE **)PTR_stdout_00389fd8); } puts(""); } else { puts(my_defaults_file); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
262
ma_new
eloqsql/storage/maria/ma_page.c
my_off_t _ma_new(register MARIA_HA *info, int level, MARIA_PINNED_PAGE **page_link) { my_off_t pos; MARIA_SHARE *share= info->s; uint block_size= share->block_size; DBUG_ENTER("_ma_new"); if (_ma_lock_key_del(info, 1)) { mysql_mutex_lock(&share->intern_lock); pos= share->state.state.key_file_length; if (pos >= share->base.max_key_file_length - block_size) { my_errno=HA_ERR_INDEX_FILE_FULL; mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(HA_OFFSET_ERROR); } share->state.state.key_file_length+= block_size; /* Following is for not transactional tables */ info->state->key_file_length= share->state.state.key_file_length; mysql_mutex_unlock(&share->intern_lock); (*page_link)->changed= 0; (*page_link)->write_lock= PAGECACHE_LOCK_WRITE; } else { uchar *buff; pos= share->key_del_current; /* Protected */ DBUG_ASSERT(share->pagecache->block_size == block_size); if (!(buff= pagecache_read(share->pagecache, &share->kfile, (pgcache_page_no_t) (pos / block_size), level, 0, share->page_type, PAGECACHE_LOCK_WRITE, &(*page_link)->link))) { pos= HA_OFFSET_ERROR; _ma_set_fatal_error(info, my_errno); } else { /* Next deleted page's number is in the header of the present page (single linked list): */ #ifdef DBUG_ASSERT_EXISTS my_off_t key_del_current; #endif share->key_del_current= mi_sizekorr(buff+share->keypage_header); #ifdef DBUG_ASSERT_EXISTS key_del_current= share->key_del_current; DBUG_ASSERT((key_del_current != 0) && ((key_del_current == HA_OFFSET_ERROR) || (key_del_current <= (share->state.state.key_file_length - block_size)))); #endif } (*page_link)->unlock= PAGECACHE_LOCK_WRITE_UNLOCK; (*page_link)->write_lock= PAGECACHE_LOCK_WRITE; /* We have to mark it changed as _ma_flush_pending_blocks() uses 'changed' to know if we used the page cache or not */ (*page_link)->changed= 1; push_dynamic(&info->pinned_pages, (void*) *page_link); *page_link= dynamic_element(&info->pinned_pages, info->pinned_pages.elements-1, MARIA_PINNED_PAGE *); } share->state.changed|= STATE_NOT_SORTED_PAGES; DBUG_PRINT("exit",("Pos: %ld",(long) pos)); DBUG_RETURN(pos); }
O0
c
ma_new: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x46900 cmpb $0x0, %al je 0x9a1ce movq -0x30(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xb87de(%rip), %rsi # 0x152901 movl $0x19b, %edx # imm = 0x19B callq 0x9a3c0 movq -0x30(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movq 0x370(%rcx), %rcx movl -0x34(%rbp), %edx subq %rdx, %rcx cmpq %rcx, %rax jb 0x9a17b callq 0xf6210 movl $0x88, (%rax) movq -0x30(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x9a430 movq $-0x1, -0x8(%rbp) jmp 0x9a3ae movl -0x34(%rbp), %eax movl %eax, %ecx movq -0x30(%rbp), %rax addq 0x38(%rax), %rcx movq %rcx, 0x38(%rax) movq -0x30(%rbp), %rax movq 0x38(%rax), %rcx movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rcx, 0x20(%rax) movq -0x30(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x9a430 movq -0x20(%rbp), %rax movq (%rax), %rax movb $0x0, 0x10(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movl $0x4, 0xc(%rax) jmp 0x9a38f movq -0x30(%rbp), %rax movq 0x700(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x9a1df movq -0x30(%rbp), %rax movq 0x600(%rax), %rdi movq -0x30(%rbp), %rsi addq $0x750, %rsi # imm = 0x750 movq -0x28(%rbp), %rax movl -0x34(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, %rdx movl -0x14(%rbp), %ecx movq -0x30(%rbp), %rax movl 0x7d4(%rax), %r9d movq -0x20(%rbp), %rax movq (%rax), %rax xorl %r8d, %r8d movl $0x4, (%rsp) movq %rax, 0x8(%rsp) callq 0x3d190 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x9a25c movq $-0x1, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) callq 0xf6210 movq -0x48(%rbp), %rdi movl (%rax), %esi callq 0x43f20 jmp 0x9a329 movq -0x40(%rbp), %rax movq -0x30(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl 0x7(%rax,%rcx), %eax movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rdx movl 0x744(%rdx), %edx movzbl 0x6(%rcx,%rdx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rdx movl 0x744(%rdx), %edx movzbl 0x5(%rcx,%rdx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rdx movl 0x744(%rdx), %edx movzbl 0x4(%rcx,%rdx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x40(%rbp), %rax movq -0x30(%rbp), %rdx movl 0x744(%rdx), %edx movzbl 0x3(%rax,%rdx), %eax movq -0x40(%rbp), %rdx movq -0x30(%rbp), %rsi movl 0x744(%rsi), %esi movzbl 0x2(%rdx,%rsi), %edx shll $0x8, %edx orl %edx, %eax movq -0x40(%rbp), %rdx movq -0x30(%rbp), %rsi movl 0x744(%rsi), %esi movzbl 0x1(%rdx,%rsi), %edx shll $0x10, %edx orl %edx, %eax movq -0x40(%rbp), %rdx movq -0x30(%rbp), %rsi movl 0x744(%rsi), %esi movzbl (%rdx,%rsi), %edx shll $0x18, %edx orl %edx, %eax movl %eax, %eax shlq $0x20, %rax orq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, 0x700(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movl $0x6, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movl $0x4, 0xc(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movb $0x1, 0x10(%rax) movq -0x10(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 movq -0x20(%rbp), %rax movq (%rax), %rsi callq 0xda810 movq -0x10(%rbp), %rax movq 0x2e8(%rax), %rcx movq -0x10(%rbp), %rax movl 0x2f0(%rax), %eax subl $0x1, %eax movl %eax, %eax imulq $0x18, %rax, %rax addq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movl 0x170(%rax), %ecx orl $0x20, %ecx movl %ecx, 0x170(%rax) jmp 0x9a3a4 jmp 0x9a3a6 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_new: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov eax, [rax+7BCh] mov [rbp+var_34], eax mov rdi, [rbp+var_10] mov esi, 1 call _ma_lock_key_del cmp al, 0 jz loc_9A1CE mov rdi, [rbp+var_30] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 19Bh call inline_mysql_mutex_lock_14 mov rax, [rbp+var_30] mov rax, [rax+38h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_30] mov rcx, [rcx+370h] mov edx, [rbp+var_34] sub rcx, rdx cmp rax, rcx jb short loc_9A17B call _my_thread_var mov dword ptr [rax], 88h mov rdi, [rbp+var_30] add rdi, 8F0h call inline_mysql_mutex_unlock_15 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_9A3AE loc_9A17B: mov eax, [rbp+var_34] mov ecx, eax mov rax, [rbp+var_30] add rcx, [rax+38h] mov [rax+38h], rcx mov rax, [rbp+var_30] mov rcx, [rax+38h] mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rax+20h], rcx mov rdi, [rbp+var_30] add rdi, 8F0h call inline_mysql_mutex_unlock_15 mov rax, [rbp+var_20] mov rax, [rax] mov byte ptr [rax+10h], 0 mov rax, [rbp+var_20] mov rax, [rax] mov dword ptr [rax+0Ch], 4 jmp loc_9A38F loc_9A1CE: mov rax, [rbp+var_30] mov rax, [rax+700h] mov [rbp+var_28], rax jmp short $+2 loc_9A1DF: mov rax, [rbp+var_30] mov rdi, [rax+600h] mov rsi, [rbp+var_30] add rsi, 750h mov rax, [rbp+var_28] mov ecx, [rbp+var_34] xor edx, edx div rcx mov rdx, rax mov ecx, [rbp+var_14] mov rax, [rbp+var_30] mov r9d, [rax+7D4h] mov rax, [rbp+var_20] mov rax, [rax] xor r8d, r8d mov [rsp+60h+var_60], 4 mov [rsp+60h+var_58], rax call pagecache_read mov [rbp+var_40], rax cmp rax, 0 jnz short loc_9A25C mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov [rbp+var_48], rax call _my_thread_var mov rdi, [rbp+var_48] mov esi, [rax] call _ma_set_fatal_error jmp loc_9A329 loc_9A25C: mov rax, [rbp+var_40] mov rcx, [rbp+var_30] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx+7] mov rcx, [rbp+var_40] mov rdx, [rbp+var_30] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx+6] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_40] mov rdx, [rbp+var_30] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx+5] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_40] mov rdx, [rbp+var_30] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx+4] shl ecx, 18h or eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_40] mov rdx, [rbp+var_30] mov edx, [rdx+744h] movzx eax, byte ptr [rax+rdx+3] mov rdx, [rbp+var_40] mov rsi, [rbp+var_30] mov esi, [rsi+744h] movzx edx, byte ptr [rdx+rsi+2] shl edx, 8 or eax, edx mov rdx, [rbp+var_40] mov rsi, [rbp+var_30] mov esi, [rsi+744h] movzx edx, byte ptr [rdx+rsi+1] shl edx, 10h or eax, edx mov rdx, [rbp+var_40] mov rsi, [rbp+var_30] mov esi, [rsi+744h] movzx edx, byte ptr [rdx+rsi] shl edx, 18h or eax, edx mov eax, eax shl rax, 20h or rcx, rax mov rax, [rbp+var_30] mov [rax+700h], rcx loc_9A329: mov rax, [rbp+var_20] mov rax, [rax] mov dword ptr [rax+8], 6 mov rax, [rbp+var_20] mov rax, [rax] mov dword ptr [rax+0Ch], 4 mov rax, [rbp+var_20] mov rax, [rax] mov byte ptr [rax+10h], 1 mov rdi, [rbp+var_10] add rdi, 2E8h mov rax, [rbp+var_20] mov rsi, [rax] call insert_dynamic mov rax, [rbp+var_10] mov rcx, [rax+2E8h] mov rax, [rbp+var_10] mov eax, [rax+2F0h] sub eax, 1 mov eax, eax imul rax, 18h add rcx, rax mov rax, [rbp+var_20] mov [rax], rcx loc_9A38F: mov rax, [rbp+var_30] mov ecx, [rax+170h] or ecx, 20h mov [rax+170h], ecx jmp short $+2 loc_9A3A4: jmp short $+2 loc_9A3A6: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_9A3AE: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long ma_new(long long *a1, int a2, char **a3) { _QWORD *v3; // rdi int *v4; // rax long long v5; // rdx long long v6; // rcx long long v7; // r8 int v8; // r9d long long v10; // [rsp+20h] [rbp-40h] unsigned int v11; // [rsp+2Ch] [rbp-34h] long long v12; // [rsp+30h] [rbp-30h] unsigned long long v13; // [rsp+38h] [rbp-28h] v12 = *a1; v11 = *(_DWORD *)(*a1 + 1980); if ( !ma_lock_key_del(a1, 1) ) { v13 = *(_QWORD *)(v12 + 1792); v3 = *(_QWORD **)(v12 + 1536); v10 = pagecache_read(v3, v12 + 1872, v13 / v11, a2, 0LL, *(_DWORD *)(v12 + 2004), 4u, *a3); if ( v10 ) { *(_QWORD *)(v12 + 1792) = ((unsigned long long)_byteswap_ulong(*(_DWORD *)(v10 + *(unsigned int *)(v12 + 1860))) << 32) | _byteswap_ulong(*(_DWORD *)(v10 + *(unsigned int *)(v12 + 1860) + 4)); } else { v13 = -1LL; v4 = (int *)my_thread_var(v3, (const char *)(v12 + 1872)); ma_set_fatal_error(a1, *v4, v5, v6, v7, v8); } *((_DWORD *)*a3 + 2) = 6; *((_DWORD *)*a3 + 3) = 4; (*a3)[16] = 1; insert_dynamic(a1 + 93, *a3); *a3 = (char *)(24LL * (unsigned int)(*((_DWORD *)a1 + 188) - 1) + a1[93]); goto LABEL_9; } inline_mysql_mutex_lock_14(v12 + 2288, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c", 411LL); v13 = *(_QWORD *)(v12 + 56); if ( v13 < *(_QWORD *)(v12 + 880) - (unsigned long long)v11 ) { *(_QWORD *)(v12 + 56) += v11; *(_QWORD *)(a1[4] + 32) = *(_QWORD *)(v12 + 56); inline_mysql_mutex_unlock_15(v12 + 2288); (*a3)[16] = 0; *((_DWORD *)*a3 + 3) = 4; LABEL_9: *(_DWORD *)(v12 + 368) |= 0x20u; return v13; } *(_DWORD *)my_thread_var(v12 + 2288, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c") = 136; inline_mysql_mutex_unlock_15(v12 + 2288); return -1LL; }
_ma_new: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00146900 CMP AL,0x0 JZ 0x0019a1ce MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x8f0 LEA RSI,[0x252901] MOV EDX,0x19b CALL 0x0019a3c0 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x370] MOV EDX,dword ptr [RBP + -0x34] SUB RCX,RDX CMP RAX,RCX JC 0x0019a17b CALL 0x001f6210 MOV dword ptr [RAX],0x88 MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x8f0 CALL 0x0019a430 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0019a3ae LAB_0019a17b: MOV EAX,dword ptr [RBP + -0x34] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] ADD RCX,qword ptr [RAX + 0x38] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x8f0 CALL 0x0019a430 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0xc],0x4 JMP 0x0019a38f LAB_0019a1ce: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x700] MOV qword ptr [RBP + -0x28],RAX JMP 0x0019a1df LAB_0019a1df: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0x750 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x34] XOR EDX,EDX DIV RCX MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RAX + 0x7d4] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] XOR R8D,R8D MOV dword ptr [RSP],0x4 MOV qword ptr [RSP + 0x8],RAX CALL 0x0013d190 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0019a25c MOV qword ptr [RBP + -0x28],-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX CALL 0x001f6210 MOV RDI,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RAX] CALL 0x00143f20 JMP 0x0019a329 LAB_0019a25c: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x7] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RDX + 0x744] MOVZX EAX,byte ptr [RAX + RDX*0x1 + 0x3] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RSI + 0x744] MOVZX EDX,byte ptr [RDX + RSI*0x1 + 0x2] SHL EDX,0x8 OR EAX,EDX MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RSI + 0x744] MOVZX EDX,byte ptr [RDX + RSI*0x1 + 0x1] SHL EDX,0x10 OR EAX,EDX MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RSI + 0x744] MOVZX EDX,byte ptr [RDX + RSI*0x1] SHL EDX,0x18 OR EAX,EDX MOV EAX,EAX SHL RAX,0x20 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x700],RCX LAB_0019a329: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0x8],0x6 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0xc],0x4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX + 0x10],0x1 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] CALL 0x001da810 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x2e8] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2f0] SUB EAX,0x1 MOV EAX,EAX IMUL RAX,RAX,0x18 ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_0019a38f: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x20 MOV dword ptr [RAX + 0x170],ECX JMP 0x0019a3a4 LAB_0019a3a4: JMP 0x0019a3a6 LAB_0019a3a6: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0019a3ae: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
ulong _ma_new(long *param_1,int4 param_2,long *param_3) { uint uVar1; long lVar2; char cVar3; int4 *puVar4; long lVar5; ulong local_30; lVar2 = *param_1; uVar1 = *(uint *)(lVar2 + 0x7bc); cVar3 = _ma_lock_key_del(param_1,1); if (cVar3 == '\0') { local_30 = *(ulong *)(lVar2 + 0x700); lVar5 = pagecache_read(*(int8 *)(lVar2 + 0x600),lVar2 + 0x750,local_30 / uVar1,param_2,0, *(int4 *)(lVar2 + 0x7d4),4,*param_3); if (lVar5 == 0) { local_30 = 0xffffffffffffffff; puVar4 = (int4 *)_my_thread_var(); _ma_set_fatal_error(param_1,*puVar4); } else { *(ulong *)(lVar2 + 0x700) = CONCAT44(CONCAT13(*(int1 *)(lVar5 + (ulong)*(uint *)(lVar2 + 0x744)), CONCAT12(*(int1 *)(lVar5 + 1 + (ulong)*(uint *)(lVar2 + 0x744)), CONCAT11(*(int1 *) (lVar5 + 2 + (ulong)*(uint *)(lVar2 + 0x744)), *(int1 *) (lVar5 + 3 + (ulong)*(uint *)(lVar2 + 0x744))))), CONCAT13(*(int1 *)(lVar5 + 4 + (ulong)*(uint *)(lVar2 + 0x744)), CONCAT12(*(int1 *)(lVar5 + 5 + (ulong)*(uint *)(lVar2 + 0x744)), CONCAT11(*(int1 *) (lVar5 + 6 + (ulong)*(uint *)(lVar2 + 0x744)), *(int1 *) (lVar5 + 7 + (ulong)*(uint *)(lVar2 + 0x744)))))); } *(int4 *)(*param_3 + 8) = 6; *(int4 *)(*param_3 + 0xc) = 4; *(int1 *)(*param_3 + 0x10) = 1; insert_dynamic(param_1 + 0x5d,*param_3); *param_3 = param_1[0x5d] + (ulong)((int)param_1[0x5e] - 1) * 0x18; } else { inline_mysql_mutex_lock (lVar2 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_page.c", 0x19b); local_30 = *(ulong *)(lVar2 + 0x38); if (*(long *)(lVar2 + 0x370) - (ulong)uVar1 <= local_30) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x88; inline_mysql_mutex_unlock(lVar2 + 0x8f0); return 0xffffffffffffffff; } *(ulong *)(lVar2 + 0x38) = (ulong)uVar1 + *(long *)(lVar2 + 0x38); *(int8 *)(param_1[4] + 0x20) = *(int8 *)(lVar2 + 0x38); inline_mysql_mutex_unlock(lVar2 + 0x8f0); *(int1 *)(*param_3 + 0x10) = 0; *(int4 *)(*param_3 + 0xc) = 4; } *(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x20; return local_30; }
263
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>() const
monkey531[P]llama/common/minja.hpp
inline json Value::get<json>() const { if (is_primitive()) return primitive_; if (is_null()) return json(); if (array_) { std::vector<json> res; for (const auto& item : *array_) { res.push_back(item.get<json>()); } return res; } if (object_) { json res = json::object(); for (const auto& [key, value] : *object_) { if (key.is_string()) { res[key.get<std::string>()] = value.get<json>(); } else if (key.is_primitive()) { res[key.dump()] = value.get<json>(); } else { throw std::runtime_error("Invalid key type for conversion to JSON: " + key.dump()); } } if (is_callable()) { res["__callable__"] = true; } return res; } throw std::runtime_error("get<json> not defined for this value type: " + dump()); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r14 movq %rdi, %r13 movq %rsi, %rdi callq 0x63900 testb %al, %al je 0x83057 addq $0x40, %r14 movq %r13, %rdi movq %r14, %rsi callq 0x428ca jmp 0x8321b movq %r14, %rdi callq 0x63efa testb %al, %al je 0x83072 movq %r13, %rdi xorl %esi, %esi callq 0x3db86 jmp 0x8321b movq 0x10(%r14), %rax testq %rax, %rax je 0x830dd xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r14 andq $0x0, 0x10(%r14) movaps %xmm0, (%r14) movq (%rax), %r15 movq 0x8(%rax), %rbx leaq 0x38(%rsp), %r12 cmpq %rbx, %r15 je 0x830c1 movq %r12, %rdi movq %r15, %rsi callq 0x83020 movq %r14, %rdi movq %r12, %rsi callq 0x42450 movq %r12, %rdi callq 0x3db72 addq $0x50, %r15 jmp 0x83098 leaq 0x10(%rsp), %rsi movq %r13, %rdi callq 0x83a26 leaq 0x10(%rsp), %rdi callq 0x4361a jmp 0x8321b cmpq $0x0, 0x20(%r14) je 0x83293 movq %r13, 0x8(%rsp) movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x83a5e movq 0x20(%r14), %rax movq (%rax), %r15 movq 0x8(%rax), %rax movq %rax, 0x30(%rsp) leaq 0x78(%rsp), %rbp leaq 0xa8(%rsp), %r13 leaq 0x88(%rsp), %r12 cmpq 0x30(%rsp), %r15 je 0x831d6 leaq 0x10(%r15), %rsi movzbl (%r15), %eax testl %eax, %eax je 0x83183 cmpl $0x4, %eax je 0x83183 cmpl $0x3, %eax jne 0x83179 leaq 0x68(%rsp), %rdi callq 0x83020 movq %r12, %rdi movq %r15, %rsi callq 0x645da movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x7ec26 movq %r12, %rbx movq %rax, %rdi leaq 0x68(%rsp), %r12 movq %r12, %rsi callq 0x406f8 movq %rbx, %rdi jmp 0x831c0 addb $-0x5, %al cmpb $0x3, %al ja 0x83230 movq %rbp, %rdi callq 0x83020 movq %r13, %rdi movq %r15, %rsi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x5daf4 movq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x7ec26 movq %rax, %rdi movq %rbp, %rsi callq 0x406f8 movq %r13, %rdi movq %rbp, %r12 callq 0x241c8 movq %r12, %rdi callq 0x3db72 addq $0x60, %r15 jmp 0x83116 cmpq $0x0, 0x30(%r14) movq 0x8(%rsp), %r13 je 0x8321b leaq 0x10(%rsp), %rsi movb $0x1, (%rsi) leaq 0x58(%rsp), %rdi callq 0x83a72 leaq 0x321a3(%rip), %rsi # 0xb539e movq %r13, %rdi callq 0x7af6e leaq 0x58(%rsp), %r14 movq %rax, %rdi movq %r14, %rsi callq 0x406f8 movq %r14, %rdi callq 0x3db72 movq %r13, %rax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r12 leaq 0x38(%rsp), %rdi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx movq %r15, %rsi xorl %r8d, %r8d xorl %r9d, %r9d callq 0x5daf4 leaq 0x32119(%rip), %rsi # 0xb5374 leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0x5906a movb $0x1, %bl leaq 0x10(%rsp), %rsi movq %r12, %rdi callq 0x23e40 xorl %ebx, %ebx movq 0x7ad6e(%rip), %rsi # 0xfdff0 movq 0x7accf(%rip), %rdx # 0xfdf58 movq %r12, %rdi callq 0x23f10 jmp 0x832ee pushq $0x10 popq %rdi callq 0x23470 movq %rax, %rbx leaq 0x38(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63910 leaq 0x320f4(%rip), %rsi # 0xb53ab leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0x5906a movb $0x1, %bpl leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x23e40 xorl %ebp, %ebp movq 0x7ad11(%rip), %rsi # 0xfdff0 movq 0x7ac72(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f10 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241c8 jmp 0x83303 movq %rax, %r14 movb $0x1, %bpl leaq 0x38(%rsp), %rdi callq 0x241c8 testb %bpl, %bpl jne 0x8331a jmp 0x833cc movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x833cc movq %rax, %r14 leaq 0x58(%rsp), %rdi jmp 0x8339a jmp 0x833b0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241c8 jmp 0x83347 movq %rax, %r14 movb $0x1, %bl leaq 0x38(%rsp), %rdi callq 0x241c8 testb %bl, %bl jne 0x8335a jmp 0x833a4 movq %rax, %r14 movq %r12, %rdi callq 0x236b0 jmp 0x833a4 movq %rax, %r14 leaq 0x88(%rsp), %rdi callq 0x241c8 jmp 0x83379 movq %rax, %r14 leaq 0x68(%rsp), %rdi jmp 0x8339a movq %rax, %r14 leaq 0xa8(%rsp), %rdi callq 0x241c8 jmp 0x83395 movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x3db72 jmp 0x833a4 movq %rax, %r14 movq 0x8(%rsp), %rdi callq 0x3db72 jmp 0x833cc movq %rax, %r14 jmp 0x833c2 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x3db72 leaq 0x10(%rsp), %rdi callq 0x4361a movq %r14, %rdi callq 0x23f90
_ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rsi mov r13, rdi mov rdi, rsi; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_83057 add r14, 40h ; '@' mov rdi, r13 mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp loc_8321B loc_83057: mov rdi, r14; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_83072 mov rdi, r13 xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) jmp loc_8321B loc_83072: mov rax, [r14+10h] test rax, rax jz short loc_830DD xorps xmm0, xmm0 lea r14, [rsp+0F8h+var_E8] and qword ptr [r14+10h], 0 movaps xmmword ptr [r14], xmm0 mov r15, [rax] mov rbx, [rax+8] lea r12, [rsp+0F8h+var_C0] loc_83098: cmp r15, rbx jz short loc_830C1 mov rdi, r12 mov rsi, r15 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, r14 mov rsi, r12 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r15, 50h ; 'P' jmp short loc_83098 loc_830C1: lea rsi, [rsp+0F8h+var_E8] mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ lea rdi, [rsp+0F8h+var_E8] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() jmp loc_8321B loc_830DD: cmp qword ptr [r14+20h], 0 jz loc_83293 mov [rsp+0F8h+var_F0], r13 mov rdi, r13 xor esi, esi xor edx, edx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6objectESt16initializer_listINS0_6detail8json_refISD_EEE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::object(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov rax, [r14+20h] mov r15, [rax] mov rax, [rax+8] mov [rsp+0F8h+var_C8], rax lea rbp, [rsp+0F8h+var_80] lea r13, [rsp+0F8h+var_50] loc_83116: lea r12, [rsp+0F8h+var_70] cmp r15, [rsp+0F8h+var_C8] jz loc_831D6 lea rsi, [r15+10h] movzx eax, byte ptr [r15] test eax, eax jz short loc_83183 cmp eax, 4 jz short loc_83183 cmp eax, 3 jnz short loc_83179 lea rdi, [rsp+0F8h+var_90] call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, r12 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov rdi, [rsp+0F8h+var_F0] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string) mov rbx, r12 mov rdi, rax lea r12, [rsp+0F8h+var_90] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, rbx jmp short loc_831C0 loc_83179: add al, 0FBh cmp al, 3 ja loc_83230 loc_83183: mov rdi, rbp call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, r13 mov rsi, r15 push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) mov rdi, [rsp+0F8h+var_F0] mov rsi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string) mov rdi, rax mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r13; void * mov r12, rbp loc_831C0: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r15, 60h ; '`' jmp loc_83116 loc_831D6: cmp qword ptr [r14+30h], 0 mov r13, [rsp+0F8h+var_F0] jz short loc_8321B lea rsi, [rsp+0F8h+var_E8] mov byte ptr [rsi], 1 lea rdi, [rsp+0F8h+var_A0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ lea rsi, aCallable; "__callable__" mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) lea r14, [rsp+0F8h+var_A0] mov rdi, rax mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_8321B: mov rax, r13 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83230: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r12, rax lea rdi, [rsp+0F8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx mov rsi, r15 xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) lea rsi, aInvalidKeyType; "Invalid key type for conversion to JSON"... lea rdi, [rsp+0F8h+var_E8] lea rdx, [rsp+0F8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bl, 1 lea rsi, [rsp+0F8h+var_E8] mov rdi, r12 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebx, ebx mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r12; void * call ___cxa_throw jmp short loc_832EE loc_83293: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0F8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetJsonNotDefi; "get<json> not defined for this value ty"... lea rdi, [rsp+0F8h+var_E8] lea rdx, [rsp+0F8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+0F8h+var_E8] 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 loc_832EE: mov r14, rax lea rdi, [rsp+0F8h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_83303 mov r14, rax mov bpl, 1 loc_83303: lea rdi, [rsp+0F8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_8331A jmp loc_833CC mov r14, rax loc_8331A: mov rdi, rbx; void * call ___cxa_free_exception jmp loc_833CC mov r14, rax lea rdi, [rsp+0F8h+var_A0] jmp short loc_8339A jmp short loc_833B0 mov r14, rax lea rdi, [rsp+0F8h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_83347 mov r14, rax mov bl, 1 loc_83347: lea rdi, [rsp+0F8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bl, bl jnz short loc_8335A jmp short loc_833A4 mov r14, rax loc_8335A: mov rdi, r12; void * call ___cxa_free_exception jmp short loc_833A4 mov r14, rax lea rdi, [rsp+0F8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_83379 mov r14, rax loc_83379: lea rdi, [rsp+0F8h+var_90] jmp short loc_8339A mov r14, rax lea rdi, [rsp+0F8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_83395 mov r14, rax loc_83395: lea rdi, [rsp+0F8h+var_80] loc_8339A: call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_833A4 mov r14, rax loc_833A4: mov rdi, [rsp+0F8h+var_F0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_833CC loc_833B0: mov r14, rax jmp short loc_833C2 mov r14, rax lea rdi, [rsp+0F8h+var_C0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_833C2: lea rdi, [rsp+0F8h+var_E8] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() loc_833CC: mov rdi, r14 call __Unwind_Resume
unsigned __int8 * minja::Value::get<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>>( unsigned __int8 *a1, long long a2) { long long *v4; // rax long long v5; // r15 long long v6; // rbx long long v7; // rax _BYTE *v8; // r15 _BYTE *v9; // rsi int v10; // eax long long v11; // rax _BYTE *v12; // r12 _QWORD *v13; // rdi long long v14; // rax long long v15; // rax void *v17; // r12 void *exception; // rbx __int128 v20; // [rsp+10h] [rbp-E8h] BYREF long long v21; // [rsp+20h] [rbp-D8h] _BYTE *v22; // [rsp+30h] [rbp-C8h] _BYTE v23[32]; // [rsp+38h] [rbp-C0h] BYREF _BYTE v24[16]; // [rsp+58h] [rbp-A0h] BYREF _BYTE v25[16]; // [rsp+68h] [rbp-90h] BYREF _BYTE v26[16]; // [rsp+78h] [rbp-80h] BYREF _QWORD v27[4]; // [rsp+88h] [rbp-70h] BYREF _QWORD v28[10]; // [rsp+A8h] [rbp-50h] BYREF if ( minja::Value::is_primitive((minja::Value *)a2) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, (unsigned __int8 *)(a2 + 64)); return a1; } if ( minja::Value::is_null((minja::Value *)a2) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)a1); return a1; } v4 = *(long long **)(a2 + 16); if ( v4 ) { v21 = 0LL; v20 = 0LL; v5 = *v4; v6 = v4[1]; while ( v5 != v6 ) { minja::Value::get<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>>( v23, v5); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (long long)&v20, (long long)v23); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v23); v5 += 80LL; } ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_( a1, &v20); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector((long long *)&v20); return a1; } if ( !*(_QWORD *)(a2 + 32) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v23, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)&v20, (long long)"get<json> not defined for this value type: ", (long long)v23); std::runtime_error::runtime_error(exception, &v20); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::object( a1, 0LL, 0LL); v7 = *(_QWORD *)(a2 + 32); v8 = *(_BYTE **)v7; v22 = *(_BYTE **)(v7 + 8); while ( v8 != v22 ) { v9 = v8 + 16; v10 = (unsigned __int8)*v8; if ( *v8 && v10 != 4 ) { if ( v10 == 3 ) { minja::Value::get<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>>( v25, v9); ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v27, (long long)v8); v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( (long long)a1, v27); v12 = v25; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v11, (long long)v25); v13 = v27; goto LABEL_19; } if ( (unsigned __int8)(v10 - 5) > 3u ) { v17 = __cxa_allocate_exception(0x10uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump( (long long)v23, (long long)v8, -1, 32, 0, 0); std::operator+<char>((long long)&v20, (long long)"Invalid key type for conversion to JSON: ", (long long)v23); std::runtime_error::runtime_error(v17, &v20); __cxa_throw( v17, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } minja::Value::get<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>>( v26, v9); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump( (long long)v28, (long long)v8, -1, 32, 0, 0); v14 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( (long long)a1, v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v14, (long long)v26); v13 = v28; v12 = v26; LABEL_19: std::string::~string(v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v12); v8 += 96; } if ( *(_QWORD *)(a2 + 48) ) { LOBYTE(v20) = 1; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_( v24, &v20); v15 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( (long long)a1, (long long)"__callable__"); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v15, (long long)v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v24); } return a1; }
get<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>>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RSI MOV R13,RDI MOV RDI,RSI CALL 0x00163900 TEST AL,AL JZ 0x00183057 ADD R14,0x40 MOV RDI,R13 MOV RSI,R14 CALL 0x001428ca JMP 0x0018321b LAB_00183057: MOV RDI,R14 CALL 0x00163efa TEST AL,AL JZ 0x00183072 MOV RDI,R13 XOR ESI,ESI CALL 0x0013db86 JMP 0x0018321b LAB_00183072: MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x001830dd XORPS XMM0,XMM0 LEA R14,[RSP + 0x10] AND qword ptr [R14 + 0x10],0x0 MOVAPS xmmword ptr [R14],XMM0 MOV R15,qword ptr [RAX] MOV RBX,qword ptr [RAX + 0x8] LEA R12,[RSP + 0x38] LAB_00183098: CMP R15,RBX JZ 0x001830c1 LAB_0018309d: MOV RDI,R12 MOV RSI,R15 CALL 0x00183020 LAB_001830a8: MOV RDI,R14 MOV RSI,R12 CALL 0x00142450 MOV RDI,R12 CALL 0x0013db72 ADD R15,0x50 JMP 0x00183098 LAB_001830c1: LEA RSI,[RSP + 0x10] MOV RDI,R13 CALL 0x00183a26 LAB_001830ce: LEA RDI,[RSP + 0x10] CALL 0x0014361a JMP 0x0018321b LAB_001830dd: CMP qword ptr [R14 + 0x20],0x0 JZ 0x00183293 MOV qword ptr [RSP + 0x8],R13 MOV RDI,R13 XOR ESI,ESI XOR EDX,EDX CALL 0x00183a5e MOV RAX,qword ptr [R14 + 0x20] MOV R15,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RAX LEA RBP,[RSP + 0x78] LEA R13,[RSP + 0xa8] LAB_00183116: LEA R12,[RSP + 0x88] CMP R15,qword ptr [RSP + 0x30] JZ 0x001831d6 LEA RSI,[R15 + 0x10] MOVZX EAX,byte ptr [R15] TEST EAX,EAX JZ 0x00183183 CMP EAX,0x4 JZ 0x00183183 CMP EAX,0x3 JNZ 0x00183179 LAB_0018313f: LEA RDI,[RSP + 0x68] CALL 0x00183020 LAB_00183149: MOV RDI,R12 MOV RSI,R15 CALL 0x001645da LAB_00183154: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x0017ec26 MOV RBX,R12 MOV RDI,RAX LEA R12,[RSP + 0x68] MOV RSI,R12 CALL 0x001406f8 MOV RDI,RBX JMP 0x001831c0 LAB_00183179: ADD AL,0xfb CMP AL,0x3 JA 0x00183230 LAB_00183183: MOV RDI,RBP CALL 0x00183020 LAB_0018318b: MOV RDI,R13 MOV RSI,R15 PUSH -0x1 POP RDX PUSH 0x20 POP RCX XOR R8D,R8D XOR R9D,R9D CALL 0x0015daf4 LAB_001831a2: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R13 CALL 0x0017ec26 MOV RDI,RAX MOV RSI,RBP CALL 0x001406f8 MOV RDI,R13 MOV R12,RBP LAB_001831c0: CALL 0x001241c8 MOV RDI,R12 CALL 0x0013db72 ADD R15,0x60 JMP 0x00183116 LAB_001831d6: CMP qword ptr [R14 + 0x30],0x0 MOV R13,qword ptr [RSP + 0x8] JZ 0x0018321b LEA RSI,[RSP + 0x10] MOV byte ptr [RSI],0x1 LEA RDI,[RSP + 0x58] CALL 0x00183a72 LAB_001831f4: LEA RSI,[0x1b539e] MOV RDI,R13 CALL 0x0017af6e LAB_00183203: LEA R14,[RSP + 0x58] MOV RDI,RAX MOV RSI,R14 CALL 0x001406f8 MOV RDI,R14 CALL 0x0013db72 LAB_0018321b: MOV RAX,R13 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183230: PUSH 0x10 POP RDI CALL 0x00123470 MOV R12,RAX LAB_0018323b: LEA RDI,[RSP + 0x38] PUSH -0x1 POP RDX PUSH 0x20 POP RCX MOV RSI,R15 XOR R8D,R8D XOR R9D,R9D CALL 0x0015daf4 LAB_00183254: LEA RSI,[0x1b5374] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x38] CALL 0x0015906a MOV BL,0x1 LAB_0018326c: LEA RSI,[RSP + 0x10] MOV RDI,R12 CALL 0x00123e40 XOR EBX,EBX MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R12 CALL 0x00123f10 LAB_00183293: PUSH 0x10 POP RDI CALL 0x00123470 MOV RBX,RAX LAB_0018329e: LEA RDI,[RSP + 0x38] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163910 LAB_001832b0: LEA RSI,[0x1b53ab] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x38] CALL 0x0015906a MOV BPL,0x1 LAB_001832c9: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00123e40 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f10
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >() const */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * minja::Value:: get<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>> (void) { long *plVar1; long lVar2; char cVar3; 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> *pbVar4; runtime_error *prVar5; Value *in_RSI; 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> *in_RDI; string *this; long lVar6; char *pcVar7; int8 local_e8; int8 uStack_e0; int8 local_d8; char *local_c8; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_c0 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_a0 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_90 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_80 [16]; string local_70 [32]; string local_50 [32]; cVar3 = is_primitive(in_RSI); if (cVar3 == '\0') { cVar3 = is_null(in_RSI); if (cVar3 == '\0') { plVar1 = *(long **)(in_RSI + 0x10); if (plVar1 == (long *)0x0) { if (*(long *)(in_RSI + 0x20) == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018329e to 001832af has its CatchHandler @ 00183317 */ dump_abi_cxx11_((int)local_c0,SUB81(in_RSI,0)); /* try { // try from 001832b0 to 001832c5 has its CatchHandler @ 001832fd */ std::operator+((char *)&local_e8,(string *)"get<json> not defined for this value type: "); /* try { // try from 001832c9 to 001832ed has its CatchHandler @ 001832ee */ std::runtime_error::runtime_error(prVar5,(string *)&local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::object(); local_c8 = (char *)(*(int8 **)(in_RSI + 0x20))[1]; for (pcVar7 = (char *)**(int8 **)(in_RSI + 0x20); pcVar7 != local_c8; pcVar7 = pcVar7 + 0x60) { cVar3 = *pcVar7; if ((cVar3 == '\0') || (cVar3 == '\x04')) { LAB_00183183: /* try { // try from 00183183 to 0018318a has its CatchHandler @ 001833a1 */ get<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>> (); /* try { // try from 0018318b to 001831a1 has its CatchHandler @ 00183392 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::dump(local_50,pcVar7,0xffffffffffffffff,0x20,0,0); /* try { // try from 001831a2 to 001831ae has its CatchHandler @ 00183380 */ pbVar4 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](in_RDI,local_50); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(pbVar4,local_80); this = local_50; pbVar4 = local_80; } else { if (cVar3 != '\x03') { if (3 < (byte)(cVar3 - 5U)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10,pcVar7 + 0x10); /* try { // try from 0018323b to 00183253 has its CatchHandler @ 00183357 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::dump(local_c0,pcVar7,0xffffffffffffffff,0x20,0,0); /* try { // try from 00183254 to 00183269 has its CatchHandler @ 00183342 */ std::operator+((char *)&local_e8, (string *)"Invalid key type for conversion to JSON: "); /* try { // try from 0018326c to 00183290 has its CatchHandler @ 00183333 */ std::runtime_error::runtime_error(prVar5,(string *)&local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } goto LAB_00183183; } /* try { // try from 0018313f to 00183148 has its CatchHandler @ 001833a1 */ get<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>> (); /* try { // try from 00183149 to 00183153 has its CatchHandler @ 00183376 */ _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_70,pcVar7); /* try { // try from 00183154 to 00183160 has its CatchHandler @ 00183364 */ pbVar4 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](in_RDI,local_70); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(pbVar4,local_90); this = local_70; pbVar4 = local_90; } std::__cxx11::string::~string(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(pbVar4); } if (*(long *)(in_RSI + 0x30) != 0) { local_e8 = CONCAT71(local_e8._1_7_,1); _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_a0); /* try { // try from 001831f4 to 00183202 has its CatchHandler @ 00183327 */ pbVar4 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(in_RDI,"__callable__"); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(pbVar4,local_a0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_a0); } } else { local_d8 = 0; local_e8 = 0; uStack_e0 = 0; lVar2 = plVar1[1]; for (lVar6 = *plVar1; lVar6 != lVar2; lVar6 = lVar6 + 0x50) { /* try { // try from 0018309d to 001830a7 has its CatchHandler @ 001833b0 */ get<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>> (); /* try { // try from 001830a8 to 001830b2 has its CatchHandler @ 001833b5 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_e8,local_c0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_c0); } /* try { // try from 001830c1 to 001830cd has its CatchHandler @ 00183331 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ (); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_e8); } } else { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((_func_decltype_nullptr *)in_RDI); } } else { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(in_RDI,in_RSI + 0x40); } return in_RDI; }
264
js_os_mkdir
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_mkdir(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int mode, ret; const char *path; if (argc >= 2) { if (JS_ToInt32(ctx, &mode, argv[1])) return JS_EXCEPTION; } else { mode = 0777; } path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) (void)mode; ret = js_get_errno(mkdir(path)); #else ret = js_get_errno(mkdir(path, mode)); #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O1
c
js_os_mkdir: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %r14 movq %rdi, %rbx cmpl $0x2, %ecx jl 0x1d6d6 movq 0x10(%r14), %rdx movq 0x18(%r14), %rcx leaq 0x4(%rsp), %rsi movq %rbx, %rdi callq 0x2ba0c testl %eax, %eax je 0x1d6de movl $0x6, %edx xorl %r14d, %r14d jmp 0x1d730 movl $0x1ff, 0x4(%rsp) # imm = 0x1FF movq (%r14), %rdx movq 0x8(%r14), %rcx xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x24c53 testq %rax, %rax je 0x1d72b movq %rax, %r15 movl 0x4(%rsp), %esi movq %rax, %rdi callq 0xe140 movl %eax, %ebp cmpl $-0x1, %eax jne 0x1d719 callq 0xe0b0 xorl %ebp, %ebp subl (%rax), %ebp movq %rbx, %rdi movq %r15, %rsi callq 0x24f39 movl %ebp, %r14d xorl %edx, %edx jmp 0x1d730 movl $0x6, %edx movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_os_mkdir: push rbp push r15 push r14 push rbx push rax mov r14, r8 mov rbx, rdi cmp ecx, 2 jl short loc_1D6D6 mov rdx, [r14+10h] mov rcx, [r14+18h] lea rsi, [rsp+28h+var_24] mov rdi, rbx call JS_ToInt32 test eax, eax jz short loc_1D6DE mov edx, 6 xor r14d, r14d jmp short loc_1D730 loc_1D6D6: mov [rsp+28h+var_24], 1FFh loc_1D6DE: mov rdx, [r14] mov rcx, [r14+8] xor r14d, r14d mov rdi, rbx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_1D72B mov r15, rax mov esi, [rsp+28h+var_24] mov rdi, rax call _mkdir mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_1D719 call ___errno_location xor ebp, ebp sub ebp, [rax] loc_1D719: mov rdi, rbx mov rsi, r15 call JS_FreeCString mov r14d, ebp xor edx, edx jmp short loc_1D730 loc_1D72B: mov edx, 6 loc_1D730: mov rax, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_os_mkdir(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v5; // rax long long v8; // r14 long long v9; // rdx long long v10; // rcx long long v11; // rax long long v12; // r15 long long v13; // rdi unsigned int v14; // ebp unsigned int v16[9]; // [rsp+0h] [rbp-24h] BYREF v16[0] = HIDWORD(v5); if ( a4 < 2 ) { v16[0] = 511; } else if ( (unsigned int)JS_ToInt32(a1, v16, a5[2], a5[3]) ) { return 0LL; } v9 = *a5; v10 = a5[1]; v8 = 0LL; v11 = JS_ToCStringLen2(a1, 0LL, v9, v10, 0LL); if ( v11 ) { v12 = v11; v13 = v11; v14 = mkdir(v11, v16[0]); if ( v14 == -1 ) v14 = -*(_DWORD *)__errno_location(v13); JS_FreeCString(a1, v12); return v14; } return v8; }
js_os_mkdir: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,R8 MOV RBX,RDI CMP ECX,0x2 JL 0x0011d6d6 MOV RDX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x18] LEA RSI,[RSP + 0x4] MOV RDI,RBX CALL 0x0012ba0c TEST EAX,EAX JZ 0x0011d6de MOV EDX,0x6 XOR R14D,R14D JMP 0x0011d730 LAB_0011d6d6: MOV dword ptr [RSP + 0x4],0x1ff LAB_0011d6de: MOV RDX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI XOR R8D,R8D CALL 0x00124c53 TEST RAX,RAX JZ 0x0011d72b MOV R15,RAX MOV ESI,dword ptr [RSP + 0x4] MOV RDI,RAX CALL 0x0010e140 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x0011d719 CALL 0x0010e0b0 XOR EBP,EBP SUB EBP,dword ptr [RAX] LAB_0011d719: MOV RDI,RBX MOV RSI,R15 CALL 0x00124f39 MOV R14D,EBP XOR EDX,EDX JMP 0x0011d730 LAB_0011d72b: MOV EDX,0x6 LAB_0011d730: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int js_os_mkdir(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; int8 in_RAX; char *__path; int *piVar2; int8 uStack_28; if (param_4 < 2) { uStack_28 = CONCAT44(0x1ff,(int)in_RAX); } else { uStack_28 = in_RAX; iVar1 = JS_ToInt32(param_1,(long)&uStack_28 + 4,param_5[2],param_5[3]); if (iVar1 != 0) { return 0; } } iVar1 = 0; __path = (char *)JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0); if (__path != (char *)0x0) { iVar1 = mkdir(__path,uStack_28._4_4_); if (iVar1 == -1) { piVar2 = __errno_location(); iVar1 = -*piVar2; } JS_FreeCString(param_1,__path); } return iVar1; }
265
js_os_mkdir
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_mkdir(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int mode, ret; const char *path; if (argc >= 2) { if (JS_ToInt32(ctx, &mode, argv[1])) return JS_EXCEPTION; } else { mode = 0777; } path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) (void)mode; ret = js_get_errno(mkdir(path)); #else ret = js_get_errno(mkdir(path, mode)); #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O2
c
js_os_mkdir: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %r8, %r15 movq %rdi, %r14 pushq $0x6 popq %rbx cmpl $0x2, %ecx jl 0x17d8e movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx leaq 0xc(%rsp), %rsi movq %r14, %rdi callq 0x25187 testl %eax, %eax jne 0x17dd5 jmp 0x17d96 movl $0x1ff, 0xc(%rsp) # imm = 0x1FF movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r14, %rdi callq 0x1561c testq %rax, %rax je 0x17dd5 movq %rax, %r15 movl 0xc(%rsp), %esi movq %rax, %rdi callq 0xe150 movslq %eax, %rdi callq 0x14f5b movq %rax, %rbx movq %r14, %rdi movq %r15, %rsi callq 0x1ec07 movl %ebx, %eax xorl %ebx, %ebx jmp 0x17dd7 xorl %eax, %eax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
js_os_mkdir: push r15 push r14 push rbx sub rsp, 10h mov r15, r8 mov r14, rdi push 6 pop rbx cmp ecx, 2 jl short loc_17D8E mov rdx, [r15+10h] mov rcx, [r15+18h] lea rsi, [rsp+28h+var_1C] mov rdi, r14 call JS_ToInt32 test eax, eax jnz short loc_17DD5 jmp short loc_17D96 loc_17D8E: mov [rsp+28h+var_1C], 1FFh loc_17D96: mov rsi, [r15] mov rdx, [r15+8] mov rdi, r14 call JS_ToCString_0 test rax, rax jz short loc_17DD5 mov r15, rax mov esi, [rsp+28h+var_1C] mov rdi, rax call _mkdir movsxd rdi, eax call js_get_errno mov rbx, rax mov rdi, r14 mov rsi, r15 call JS_FreeCString mov eax, ebx xor ebx, ebx jmp short loc_17DD7 loc_17DD5: xor eax, eax loc_17DD7: mov rdx, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
long long js_os_mkdir(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v6; // rax long long v7; // r15 int v8; // eax unsigned int errno; // ebx unsigned int v11[7]; // [rsp+Ch] [rbp-1Ch] BYREF if ( a4 < 2 ) { v11[0] = 511; } else if ( (unsigned int)JS_ToInt32(a1, v11, a5[2], a5[3]) ) { return 0LL; } v6 = JS_ToCString_0(a1, *a5, a5[1]); if ( v6 ) { v7 = v6; v8 = mkdir(v6, v11[0]); errno = js_get_errno(v8); JS_FreeCString(a1, v7); return errno; } return 0LL; }
js_os_mkdir: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,R8 MOV R14,RDI PUSH 0x6 POP RBX CMP ECX,0x2 JL 0x00117d8e MOV RDX,qword ptr [R15 + 0x10] MOV RCX,qword ptr [R15 + 0x18] LEA RSI,[RSP + 0xc] MOV RDI,R14 CALL 0x00125187 TEST EAX,EAX JNZ 0x00117dd5 JMP 0x00117d96 LAB_00117d8e: MOV dword ptr [RSP + 0xc],0x1ff LAB_00117d96: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,R14 CALL 0x0011561c TEST RAX,RAX JZ 0x00117dd5 MOV R15,RAX MOV ESI,dword ptr [RSP + 0xc] MOV RDI,RAX CALL 0x0010e150 MOVSXD RDI,EAX CALL 0x00114f5b MOV RBX,RAX MOV RDI,R14 MOV RSI,R15 CALL 0x0011ec07 MOV EAX,EBX XOR EBX,EBX JMP 0x00117dd7 LAB_00117dd5: XOR EAX,EAX LAB_00117dd7: MOV RDX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
int4 js_os_mkdir(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5 ) { int iVar1; int4 uVar2; char *__path; __mode_t local_1c; if (param_4 < 2) { local_1c = 0x1ff; } else { iVar1 = JS_ToInt32(param_1,&local_1c,param_5[2],param_5[3]); if (iVar1 != 0) { return 0; } } __path = (char *)JS_ToCString(param_1,*param_5,param_5[1]); if (__path == (char *)0x0) { return 0; } iVar1 = mkdir(__path,local_1c); uVar2 = js_get_errno((long)iVar1); JS_FreeCString(param_1,__path); return uVar2; }
266
aimrt::common::util::HttpHeaderEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool)
aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/url_encode.h
inline std::string HttpHeaderEncode(std::string_view str, bool up = true) { std::string ret_str; ret_str.reserve(str.length() * 3); for (unsigned char c : str) { if (std::isalnum(c) || c == '-') { ret_str += static_cast<char>(c); } else { ret_str += '%'; ret_str += static_cast<char>(ToHex(c >> 4, up)); ret_str += static_cast<char>(ToHex(c & 0xF, up)); } } return ret_str; }
O0
c
aimrt::common::util::HttpHeaderEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool): subq $0x68, %rsp movq %rdi, 0x10(%rsp) movb %cl, %al movq %rdi, %rcx movq %rcx, 0x8(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) andb $0x1, %al movb %al, 0x4f(%rsp) movb $0x0, 0x4e(%rsp) callq 0x1c50a0 leaq 0x50(%rsp), %rdi callq 0x1dbde0 movq 0x10(%rsp), %rdi leaq (%rax,%rax,2), %rsi callq 0x1d5440 jmp 0x2558ec leaq 0x50(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi callq 0x1dec90 movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi callq 0x1d0ba0 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rax cmpq 0x20(%rsp), %rax je 0x2559e8 movq 0x28(%rsp), %rax movb (%rax), %al movb %al, 0x1f(%rsp) movzbl 0x1f(%rsp), %edi callq 0x1cb7d0 cmpl $0x0, %eax jne 0x255948 movzbl 0x1f(%rsp), %eax cmpl $0x2d, %eax jne 0x255978 movq 0x10(%rsp), %rdi movsbl 0x1f(%rsp), %esi callq 0x1c3920 jmp 0x255959 jmp 0x2559d3 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) callq 0x1e03b0 jmp 0x255a08 movq 0x10(%rsp), %rdi movl $0x25, %esi callq 0x1c3920 jmp 0x255989 movzbl 0x1f(%rsp), %edi shrl $0x4, %edi movzbl 0x4f(%rsp), %esi andl $0x1, %esi callq 0x292880 movq 0x10(%rsp), %rdi movsbl %al, %esi callq 0x1c3920 jmp 0x2559ad movzbl 0x1f(%rsp), %edi andl $0xf, %edi movzbl 0x4f(%rsp), %esi andl $0x1, %esi callq 0x292880 movq 0x10(%rsp), %rdi movsbl %al, %esi callq 0x1c3920 jmp 0x2559d1 jmp 0x2559d3 jmp 0x2559d5 movq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) jmp 0x255914 movb $0x1, 0x4e(%rsp) testb $0x1, 0x4e(%rsp) jne 0x2559fe movq 0x10(%rsp), %rdi callq 0x1e03b0 movq 0x8(%rsp), %rax addq $0x68, %rsp retq movq 0x40(%rsp), %rdi callq 0x1d0790 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5aimrt6common4util16HttpHeaderEncodeB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEEb: sub rsp, 68h mov [rsp+68h+var_58], rdi mov al, cl mov rcx, rdi mov [rsp+68h+var_60], rcx mov [rsp+68h+var_8], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_10], rdx and al, 1 mov [rsp+68h+var_19], al mov [rsp+68h+var_1A], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void) lea rdi, [rsp+68h+var_18] call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov rdi, [rsp+68h+var_58] lea rsi, [rax+rax*2] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_2558EC: lea rax, [rsp+68h+var_18] mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_38] call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE5beginEv; std::string_view::begin(void) mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_38] call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE3endEv; std::string_view::end(void) mov [rsp+68h+var_48], rax loc_255914: mov rax, [rsp+68h+var_40] cmp rax, [rsp+68h+var_48] jz loc_2559E8 mov rax, [rsp+68h+var_40] mov al, [rax] mov [rsp+68h+var_49], al movzx edi, [rsp+68h+var_49] call _isalnum cmp eax, 0 jnz short loc_255948 movzx eax, [rsp+68h+var_49] cmp eax, 2Dh ; '-' jnz short loc_255978 loc_255948: mov rdi, [rsp+68h+var_58] movsx esi, [rsp+68h+var_49] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_255959: jmp short loc_2559D3 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_255A08 loc_255978: mov rdi, [rsp+68h+var_58] mov esi, 25h ; '%' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_255989: movzx edi, [rsp+68h+var_49] shr edi, 4; this movzx esi, [rsp+68h+var_19] and esi, 1; unsigned __int8 call _ZN5aimrt6common4util5ToHexEhb; aimrt::common::util::ToHex(uchar,bool) mov rdi, [rsp+68h+var_58] movsx esi, al call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_2559AD: movzx edi, [rsp+68h+var_49] and edi, 0Fh; this movzx esi, [rsp+68h+var_19] and esi, 1; unsigned __int8 call _ZN5aimrt6common4util5ToHexEhb; aimrt::common::util::ToHex(uchar,bool) mov rdi, [rsp+68h+var_58] movsx esi, al call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_2559D1: jmp short $+2 loc_2559D3: jmp short $+2 loc_2559D5: mov rax, [rsp+68h+var_40] add rax, 1 mov [rsp+68h+var_40], rax jmp loc_255914 loc_2559E8: mov [rsp+68h+var_1A], 1 test [rsp+68h+var_1A], 1 jnz short loc_2559FE mov rdi, [rsp+68h+var_58]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2559FE: mov rax, [rsp+68h+var_60] add rsp, 68h retn loc_255A08: mov rdi, [rsp+arg_38] call __Unwind_Resume
long long aimrt::common::util::HttpHeaderEncode[abi:cxx11](long long a1, long long a2, long long a3, char a4) { long long v4; // rax bool v5; // dl char v6; // al bool v7; // dl char v8; // al unsigned __int8 v10; // [rsp+1Fh] [rbp-49h] long long v11; // [rsp+20h] [rbp-48h] unsigned __int8 *v12; // [rsp+28h] [rbp-40h] char v13; // [rsp+4Fh] [rbp-19h] _QWORD v14[3]; // [rsp+50h] [rbp-18h] BYREF v14[2] = a1; v14[0] = a2; v14[1] = a3; v13 = a4 & 1; std::string::basic_string(a1); v4 = std::string_view::length(v14); std::string::reserve(a1, 3 * v4); v12 = (unsigned __int8 *)std::string_view::begin(v14); v11 = std::string_view::end(v14); while ( v12 != (unsigned __int8 *)v11 ) { v10 = *v12; if ( (unsigned int)isalnum(*v12) || v10 == 45 ) { std::string::operator+=(a1, (unsigned int)(char)v10); } else { std::string::operator+=(a1, 37LL); v6 = aimrt::common::util::ToHex((aimrt::common::util *)(v10 >> 4), v13 & 1, v5); std::string::operator+=(a1, (unsigned int)v6); v8 = aimrt::common::util::ToHex((aimrt::common::util *)(v10 & 0xF), v13 & 1, v7); std::string::operator+=(a1, (unsigned int)v8); } ++v12; } return a1; }
267
aimrt::common::util::HttpHeaderEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool)
aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/url_encode.h
inline std::string HttpHeaderEncode(std::string_view str, bool up = true) { std::string ret_str; ret_str.reserve(str.length() * 3); for (unsigned char c : str) { if (std::isalnum(c) || c == '-') { ret_str += static_cast<char>(c); } else { ret_str += '%'; ret_str += static_cast<char>(ToHex(c >> 4, up)); ret_str += static_cast<char>(ToHex(c & 0xF, up)); } } return ret_str; }
O3
c
aimrt::common::util::HttpHeaderEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r14d movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq (%rsi,%rsi,2), %rsi callq 0x92490 testq %r12, %r12 je 0xb56d0 xorb $0x1, %r14b shlb $0x5, %r14b addb $0x37, %r14b xorl %ebp, %ebp movzbl (%r15,%rbp), %r13d movl %r13d, %edi callq 0x92810 cmpl $0x2d, %r13d je 0xb56bc testl %eax, %eax jne 0xb56bc movq %rbx, %rdi movl $0x25, %esi callq 0x906f0 movl %r13d, %eax shrb $0x4, %al leal (%r14,%rax), %ecx orb $0x30, %al cmpb $-0x60, %r13b movzbl %cl, %ecx movzbl %al, %eax cmovael %ecx, %eax movzbl %al, %esi movq %rbx, %rdi callq 0x906f0 andb $0xf, %r13b leal (%r14,%r13), %eax leal 0x30(%r13), %ecx cmpb $0xa, %r13b movzbl %al, %eax movzbl %cl, %r13d cmovael %eax, %r13d movsbl %r13b, %esi movq %rbx, %rdi callq 0x906f0 incq %rbp cmpq %rbp, %r12 jne 0xb5659 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xb56e4 movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0xb56ff movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x927a0 movq %r14, %rdi callq 0x945e0
_ZN5aimrt6common4util16HttpHeaderEncodeB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEEb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, ecx mov r15, rdx mov r12, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, [rsi+rsi*2] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) test r12, r12 jz loc_B56D0 xor r14b, 1 shl r14b, 5 add r14b, 37h ; '7' xor ebp, ebp loc_B5659: movzx r13d, byte ptr [r15+rbp] mov edi, r13d call _isalnum cmp r13d, 2Dh ; '-' jz short loc_B56BC test eax, eax jnz short loc_B56BC mov rdi, rbx mov esi, 25h ; '%' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, r13d shr al, 4 lea ecx, [r14+rax] or al, 30h cmp r13b, 0A0h movzx ecx, cl movzx eax, al cmovnb eax, ecx movzx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) and r13b, 0Fh lea eax, [r14+r13] lea ecx, [r13+30h] cmp r13b, 0Ah movzx eax, al movzx r13d, cl cmovnb r13d, eax loc_B56BC: movsx esi, r13b mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) inc rbp cmp r12, rbp jnz short loc_B5659 loc_B56D0: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_B56E4: mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_B56FF mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B56FF: mov rdi, r14 call __Unwind_Resume
long long aimrt::common::util::HttpHeaderEncode[abi:cxx11](long long a1, long long a2, long long a3, char a4) { char v6; // r14 long long i; // rbp int v8; // r13d int v9; // eax unsigned __int8 v10; // al unsigned __int8 v11; // r13 bool v12; // cf char v13; // al *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, 3 * a2); if ( a2 ) { v6 = 32 * (a4 ^ 1) + 55; for ( i = 0LL; i != a2; ++i ) { v8 = *(unsigned __int8 *)(a3 + i); v9 = isalnum(*(unsigned __int8 *)(a3 + i)); if ( v8 != 45 && !v9 ) { std::string::push_back(a1, 37LL); v10 = ((unsigned __int8)v8 >> 4) | 0x30; if ( (unsigned __int8)v8 >= 0xA0u ) v10 = v6 + ((unsigned __int8)v8 >> 4); std::string::push_back(a1, v10); v11 = v8 & 0xF; v12 = v11 < 0xAu; v13 = v6 + v11; LOBYTE(v8) = v11 + 48; if ( !v12 ) LOBYTE(v8) = v13; } std::string::push_back(a1, (unsigned int)(char)v8); } } return a1; }
HttpHeaderEncode[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,ECX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LEA RSI,[RSI + RSI*0x2] LAB_001b563d: CALL 0x00192490 TEST R12,R12 JZ 0x001b56d0 XOR R14B,0x1 SHL R14B,0x5 ADD R14B,0x37 XOR EBP,EBP LAB_001b5659: MOVZX R13D,byte ptr [R15 + RBP*0x1] MOV EDI,R13D CALL 0x00192810 CMP R13D,0x2d JZ 0x001b56bc TEST EAX,EAX JNZ 0x001b56bc LAB_001b5670: MOV RDI,RBX MOV ESI,0x25 CALL 0x001906f0 MOV EAX,R13D SHR AL,0x4 LEA ECX,[R14 + RAX*0x1] OR AL,0x30 CMP R13B,0xa0 MOVZX ECX,CL MOVZX EAX,AL CMOVNC EAX,ECX MOVZX ESI,AL MOV RDI,RBX CALL 0x001906f0 AND R13B,0xf LEA EAX,[R14 + R13*0x1] LEA ECX,[R13 + 0x30] CMP R13B,0xa MOVZX EAX,AL MOVZX R13D,CL CMOVNC R13D,EAX LAB_001b56bc: MOVSX ESI,R13B MOV RDI,RBX CALL 0x001906f0 LAB_001b56c8: INC RBP CMP R12,RBP JNZ 0x001b5659 LAB_001b56d0: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* aimrt::common::util::HttpHeaderEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >, bool) */ string * aimrt::common::util::HttpHeaderEncode_abi_cxx11_ (string *param_1,long param_2,long param_3,byte param_4) { int iVar1; long lVar2; byte bVar3; byte bVar4; char cVar5; *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; /* try { // try from 001b563d to 001b5641 has its CatchHandler @ 001b56e2 */ std::__cxx11::string::reserve(param_1,param_2 * 3); if (param_2 != 0) { cVar5 = (param_4 ^ 1) * ' ' + '7'; lVar2 = 0; do { bVar4 = *(byte *)(param_3 + lVar2); iVar1 = isalnum((uint)bVar4); if ((bVar4 != 0x2d) && (iVar1 == 0)) { /* try { // try from 001b5670 to 001b56c7 has its CatchHandler @ 001b56e4 */ std::__cxx11::string::push_back(param_1,'%'); bVar3 = bVar4 >> 4 | 0x30; if (0x9f < bVar4) { bVar3 = cVar5 + (bVar4 >> 4); } std::__cxx11::string::push_back(param_1,bVar3); bVar3 = bVar4 & 0xf; bVar4 = bVar3 + 0x30; if (9 < bVar3) { bVar4 = cVar5 + bVar3; } } std::__cxx11::string::push_back(param_1,bVar4); lVar2 = lVar2 + 1; } while (param_2 != lVar2); } return param_1; }
268
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_ucs2_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x7368a movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x6df60 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x73696 jmp 0x73730 movq -0x48(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x73750 jmp 0x736a5 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x736e1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x7371a movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x7365a movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_hash_sort_ucs2_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_7365A: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_7368A mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_ucs2_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_7368A: mov al, [rbp+var_59] test al, 1 jnz short loc_73696 jmp loc_73730 loc_73696: mov rdi, [rbp+var_48] lea rsi, [rbp+var_30] call my_tosort_ucs2 jmp short $+2 loc_736A5: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFh imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_736E1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 8 imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_7371A: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_7365A loc_73730: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_ucs2_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+18h] [rbp-48h] unsigned long long v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+2Ch] [rbp-34h] unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF _QWORD *v16; // [rsp+38h] [rbp-28h] unsigned long long *v17; // [rsp+40h] [rbp-20h] long long v18; // [rsp+48h] [rbp-18h] unsigned long long v19; // [rsp+50h] [rbp-10h] long long v20; // [rsp+58h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v13 = a3 + a2; v12 = *(_QWORD *)(a1 + 120); v10 = *a4; v8 = *a5; while ( 1 ) { v7 = 0; if ( v19 < v13 ) { v14 = my_ucs2_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6); v7 = v14 > 0; } if ( !v7 ) break; my_tosort_ucs2(v12, &v15); v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F))); v9 = v8 + 3; v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F))); v8 = v9 + 3; v19 += v14; } *v17 = v10; result = v16; *v16 = v8; return result; }
my_hash_sort_ucs2_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_0017365a: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x0017368a MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x0016df60 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_0017368a: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x00173696 JMP 0x00173730 LAB_00173696: MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL 0x00173750 JMP 0x001736a5 LAB_001736a5: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001736e1 LAB_001736e1: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0017371a LAB_0017371a: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0017365a LAB_00173730: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_ucs2_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; bool bVar2; long local_60; ulong local_58; int local_3c; ulong local_38; long *local_30; ulong *local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_tosort_ucs2(uVar1,&local_38); local_58 = ((local_58 & 0x3f) + local_60) * (local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (local_38 >> 8) + local_58 * 0x100 ^ local_58; local_60 = local_60 + 6; local_18 = local_18 + (long)local_3c; } *local_28 = local_58; *local_30 = local_60; return; }
269
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0x53a0d pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0x539a9 leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0x539b0 shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0x53a0b addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0x5398c popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_53A0D push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_5398C: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_539A9 lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_539B0 loc_539A9: shl r10d, 8 or r10, r11 loc_539B0: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_53A0B add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_5398C loc_53A0B: pop rbx pop rbp loc_53A0D: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x00153a0d PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_0015398c: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001539a9 LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001539b0 LAB_001539a9: SHL R10D,0x8 OR R10,R11 LAB_001539b0: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x00153a0b ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x0015398c LAB_00153a0b: POP RBX POP RBP LAB_00153a0d: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
270
SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _not_strings(const std::vector<std::string> & strings) { struct TrieNode { std::map<char, TrieNode> children; bool is_end_of_string; TrieNode() : is_end_of_string(false) {} void insert(const std::string & string) { auto node = this; for (char c : string) { node = &node->children[c]; } node->is_end_of_string = true; } }; TrieNode trie; for (const auto & s : strings) { trie.insert(s); } std::string char_rule = _add_primitive("char", PRIMITIVE_RULES.at("char")); std::ostringstream out; out << "[\"] ( "; std::function<void(const TrieNode &)> visit = [&](const TrieNode & node) { std::ostringstream rejects; auto first = true; for (const auto & kv : node.children) { rejects << kv.first; if (first) { first = false; } else { out << " | "; } out << "[" << kv.first << "]"; if (!kv.second.children.empty()) { out << " ("; visit(kv.second); out << ")"; } else if (kv.second.is_end_of_string) { out << " " << char_rule << "+"; } } if (!node.children.empty()) { if (!first) { out << " | "; } out << "[^\"" << rejects.str() << "] " << char_rule << "*"; } }; visit(trie); out << " )"; if (!trie.is_end_of_string) { out << "?"; } out << " [\"] space"; return out.str(); }
O3
cpp
SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movq %rsi, %r12 movq %rdi, %rbx leaq 0x50(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movb $0x0, 0x28(%rax) movq (%rdx), %r14 movq 0x8(%rdx), %r13 cmpq %r13, %r14 je 0xc6aeb leaq 0x48(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0xc7262 addq $0x20, %r14 cmpq %r13, %r14 jne 0xc6ad7 leaq 0x90(%rsp), %r13 movq %r13, -0x10(%r13) movl $0x72616863, %eax # imm = 0x72616863 movl %eax, (%r13) movl $0x4, %ecx movq %rcx, -0x8(%r13) xorl %edx, %edx movb %dl, 0x4(%r13) leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) movl %eax, (%rbp) movq %rcx, -0x8(%rbp) movb %dl, 0x4(%rbp) leaq 0x66747(%rip), %rdi # 0x12d270 leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0xcafa4 testq %rax, %rax je 0xc6cd9 addq $0x28, %rax leaq 0x28(%rsp), %r15 leaq 0x80(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movq %rax, %rcx callq 0xc57e0 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xc6b75 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x80(%rsp), %rdi cmpq %r13, %rdi je 0xc6b92 movq 0x90(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x80(%rsp), %rdi callq 0x1abb0 leaq 0x2e5b6(%rip), %rsi # 0xf515c leaq 0x80(%rsp), %r12 movl $0x6, %edx movq %r12, %rdi callq 0x1aa10 movq $0x0, 0x10(%rsp) movl $0x18, %edi callq 0x1a8d0 movq %r12, (%rax) movq %r14, 0x8(%rax) movq %r15, 0x10(%rax) movq %rax, 0x8(%rsp) leaq 0x967(%rip), %rcx # 0xc754c movq %rcx, 0x20(%rsp) leaq 0x963(%rip), %rcx # 0xc7554 movq %rcx, 0x18(%rsp) leaq 0x48(%rsp), %rsi movq %rax, %rdi callq 0xc757c leaq 0x2e268(%rip), %rsi # 0xf4e72 leaq 0x80(%rsp), %rdi movl $0x2, %edx callq 0x1aa10 cmpb $0x0, 0x78(%rsp) jne 0xc6c3c leaq 0x2e376(%rip), %rsi # 0xf4fa0 leaq 0x80(%rsp), %rdi movl $0x1, %edx callq 0x1aa10 leaq 0x2e520(%rip), %rsi # 0xf5163 leaq 0x80(%rsp), %rdi movl $0xa, %edx callq 0x1aa10 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x1add0 movq 0x18(%rsp), %rax testq %rax, %rax je 0xc6c7e leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x652f3(%rip), %rsi # 0x12bf78 leaq 0x80(%rsp), %rdi callq 0x1a4b0 leaq 0xf0(%rsp), %rdi callq 0x1a2c0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc6cba movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x48(%rsp), %rdi callq 0xc787e movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2e42d(%rip), %rdi # 0xf510d callq 0x1acd0 jmp 0xc6d81 jmp 0xc6cec movq %rax, %rbx jmp 0xc6d43 movq %rax, %rbx jmp 0xc6d64 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xc6d10 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x80(%rsp), %rdi cmpq %r13, %rdi je 0xc6d8c movq 0x90(%rsp), %rsi jmp 0xc6d77 movq %rax, %rbx movq 0x18(%rsp), %rax testq %rax, %rax je 0xc6d43 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x6522e(%rip), %rsi # 0x12bf78 leaq 0x80(%rsp), %rdi callq 0x1a4b0 leaq 0xf0(%rsp), %rdi callq 0x1a2c0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc6d8c movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0xc6d8c movq %rax, %rdi callq 0x21a05 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0xc787e movq %rbx, %rdi callq 0x1afb0
_ZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r12, rsi mov rbx, rdi lea rax, [rsp+228h+var_1D8] mov dword ptr [rax], 0 xor ecx, ecx mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx mov byte ptr [rax+28h], 0 mov r14, [rdx] mov r13, [rdx+8] cmp r14, r13 jz short loc_C6AEB lea r15, [rsp+228h+var_1E0] loc_C6AD7: mov rdi, r15 mov rsi, r14 call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(std::string const&) add r14, 20h ; ' ' cmp r14, r13 jnz short loc_C6AD7 loc_C6AEB: lea r13, [rsp+228h+var_198] mov [r13-10h], r13 mov eax, 72616863h mov [r13+0], eax mov ecx, 4 mov [r13-8], rcx xor edx, edx mov [r13+4], dl lea rbp, [rsp+228h+var_210] mov [rbp-10h], rbp mov [rbp+0], eax mov [rbp-8], rcx mov [rbp+4], dl lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES lea r14, [rsp+228h+var_220] mov rsi, r14 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jz loc_C6CD9 add rax, 28h ; '(' lea r15, [rsp+228h+var_200] lea rdx, [rsp+228h+var_1A8]; int mov rdi, r15; int mov rsi, r12; int mov rcx, rax; int call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&) mov rdi, [rsp+228h+var_220]; void * cmp rdi, rbp jz short loc_C6B75 mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C6B75: mov rdi, [rsp+228h+var_1A8]; void * cmp rdi, r13 jz short loc_C6B92 mov rsi, [rsp+228h+var_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C6B92: lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, asc_F515C; "[\"] ( " lea r12, [rsp+228h+var_1A8] mov edx, 6 mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov [rsp+228h+var_218], 0 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r12 mov [rax+8], r14 mov [rax+10h], r15 mov [rsp+228h+var_220], rax lea rcx, _ZNSt17_Function_handlerIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEZNS0_12_not_stringsESB_EUlSE_E_E9_M_invokeERKSt9_Any_dataSE_; std::_Function_handler<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&),SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}>::_M_invoke(std::_Any_data const&,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&) mov [rsp+228h+var_208], rcx lea rcx, _ZNSt17_Function_handlerIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEZNS0_12_not_stringsESB_EUlSE_E_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation; std::_Function_handler<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&),SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+228h+var_210], rcx lea rsi, [rsp+228h+var_1E0] mov rdi, rax call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEENKUlRKZNS_12_not_stringsESA_E8TrieNodeE_clESD_; SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}::operator()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&) lea rsi, a09401910201912+50h; " )" lea rdi, [rsp+228h+var_1A8] mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) cmp [rsp+228h+var_1B0], 0 jnz short loc_C6C3C lea rsi, asc_F4F9D+3; "?" lea rdi, [rsp+228h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_C6C3C: lea rsi, aSpace_6; " [\"] space" lea rdi, [rsp+228h+var_1A8] mov edx, 0Ah call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rax, [rsp+228h+var_210] test rax, rax jz short loc_C6C7E lea rdi, [rsp+228h+var_220] mov rsi, rdi mov edx, 3 call rax loc_C6C7E: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C6CBA mov rsi, [rsp+228h+var_1F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C6CBA: lea rdi, [rsp+228h+var_1E0] call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C6CD9: lea rdi, aMapBaseAt; "_Map_base::at" call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*) jmp loc_C6D81 jmp short $+2 loc_C6CEC: mov rbx, rax jmp short loc_C6D43 mov rbx, rax jmp short loc_C6D64 mov rbx, rax mov rdi, [rsp+228h+var_220]; void * cmp rdi, rbp jz short loc_C6D10 mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C6D10: mov rdi, [rsp+228h+var_1A8] cmp rdi, r13 jz short loc_C6D8C mov rsi, [rsp+228h+var_198] jmp short loc_C6D77 mov rbx, rax mov rax, [rsp+228h+var_210] test rax, rax jz short loc_C6D43 lea rdi, [rsp+228h+var_220] mov rsi, rdi mov edx, 3 call rax loc_C6D43: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_C6D64: lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C6D8C mov rsi, [rsp+228h+var_1F0] loc_C6D77: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C6D8C loc_C6D81: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_C6D8C: lea rdi, [rsp+228h+var_1E0] call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_not_strings(long long a1, long long a2, long long *a3) { long long v3; // r14 long long v4; // r13 long long v5; // rax void ***v6; // rax void *v8; // [rsp+8h] [rbp-220h] BYREF long long v9; // [rsp+10h] [rbp-218h] _QWORD v10[2]; // [rsp+18h] [rbp-210h] BYREF int v11[4]; // [rsp+28h] [rbp-200h] BYREF long long v12; // [rsp+38h] [rbp-1F0h] BYREF _BYTE v13[8]; // [rsp+48h] [rbp-1E0h] BYREF int v14; // [rsp+50h] [rbp-1D8h] BYREF long long v15; // [rsp+58h] [rbp-1D0h] int *v16; // [rsp+60h] [rbp-1C8h] int *v17; // [rsp+68h] [rbp-1C0h] long long v18; // [rsp+70h] [rbp-1B8h] char v19; // [rsp+78h] [rbp-1B0h] void *v20; // [rsp+80h] [rbp-1A8h] BYREF long long v21; // [rsp+88h] [rbp-1A0h] BYREF char v22[96]; // [rsp+90h] [rbp-198h] BYREF _BYTE v23[312]; // [rsp+F0h] [rbp-138h] BYREF v14 = 0; v15 = 0LL; v16 = &v14; v17 = &v14; v18 = 0LL; v19 = 0; v3 = *a3; v4 = a3[1]; if ( *a3 != v4 ) { do { SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(v13, v3); v3 += 32LL; } while ( v3 != v4 ); } v20 = v22; strcpy(v22, "char"); v21 = 4LL; v8 = v10; strcpy((char *)v10, "char"); v9 = 4LL; v5 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( PRIMITIVE_RULES[abi:cxx11], &v8); if ( !v5 ) std::__throw_out_of_range("_Map_base::at"); SchemaConverter::_add_primitive((long long)v11, a2, (long long *)&v20, (_QWORD *)(v5 + 40)); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); if ( v20 != v22 ) operator delete(v20, *(_QWORD *)v22 + 1LL); std::ostringstream::basic_ostringstream(&v20); std::__ostream_insert<char,std::char_traits<char>>(&v20, "[\"] ( ", 6LL); v9 = 0LL; v6 = (void ***)operator new(0x18uLL); *v6 = &v20; v6[1] = &v8; v6[2] = (void **)v11; v8 = v6; v10[1] = std::_Function_handler<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&),SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}>::_M_invoke; v10[0] = std::_Function_handler<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&),SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}>::_M_manager; SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1}::operator()( v6, v13); std::__ostream_insert<char,std::char_traits<char>>(&v20, " )", 2LL); if ( !v19 ) std::__ostream_insert<char,std::char_traits<char>>(&v20, "?", 1LL); std::__ostream_insert<char,std::char_traits<char>>(&v20, " [\"] space", 10LL); std::stringbuf::str(a1, &v21); if ( v10[0] ) ((void ( *)(void **, void **, long long))v10[0])(&v8, &v8, 3LL); std::ostringstream::~ostringstream(&v20, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v23); if ( *(long long **)v11 != &v12 ) operator delete(*(void **)v11, v12 + 1); std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree(v13); return a1; }
_not_strings: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R12,RSI MOV RBX,RDI LEA RAX,[RSP + 0x50] MOV dword ptr [RAX],0x0 XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX MOV qword ptr [RAX + 0x20],RCX MOV byte ptr [RAX + 0x28],0x0 MOV R14,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] CMP R14,R13 JZ 0x001c6aeb LEA R15,[RSP + 0x48] LAB_001c6ad7: MOV RDI,R15 MOV RSI,R14 CALL 0x001c7262 ADD R14,0x20 CMP R14,R13 JNZ 0x001c6ad7 LAB_001c6aeb: LEA R13,[RSP + 0x90] MOV qword ptr [R13 + -0x10],R13 MOV EAX,0x72616863 MOV dword ptr [R13],EAX MOV ECX,0x4 MOV qword ptr [R13 + -0x8],RCX XOR EDX,EDX MOV byte ptr [R13 + 0x4],DL LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP MOV dword ptr [RBP],EAX MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RBP + 0x4],DL LAB_001c6b22: LEA RDI,[0x22d270] LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x001cafa4 TEST RAX,RAX JZ 0x001c6cd9 ADD RAX,0x28 LEA R15,[RSP + 0x28] LEA RDX,[RSP + 0x80] MOV RDI,R15 MOV RSI,R12 MOV RCX,RAX CALL 0x001c57e0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001c6b75 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001c6b75: MOV RDI,qword ptr [RSP + 0x80] CMP RDI,R13 JZ 0x001c6b92 MOV RSI,qword ptr [RSP + 0x90] INC RSI CALL 0x0011a8f0 LAB_001c6b92: LEA RDI,[RSP + 0x80] CALL 0x0011abb0 LAB_001c6b9f: LEA RSI,[0x1f515c] LEA R12,[RSP + 0x80] MOV EDX,0x6 MOV RDI,R12 CALL 0x0011aa10 MOV qword ptr [RSP + 0x10],0x0 LAB_001c6bc4: MOV EDI,0x18 CALL 0x0011a8d0 MOV qword ptr [RAX],R12 MOV qword ptr [RAX + 0x8],R14 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RSP + 0x8],RAX LEA RCX,[0x1c754c] MOV qword ptr [RSP + 0x20],RCX LEA RCX,[0x1c7554] MOV qword ptr [RSP + 0x18],RCX LAB_001c6bf6: LEA RSI,[RSP + 0x48] MOV RDI,RAX CALL 0x001c757c LEA RSI,[0x1f4e72] LEA RDI,[RSP + 0x80] MOV EDX,0x2 CALL 0x0011aa10 CMP byte ptr [RSP + 0x78],0x0 JNZ 0x001c6c3c LEA RSI,[0x1f4fa0] LEA RDI,[RSP + 0x80] MOV EDX,0x1 CALL 0x0011aa10 LAB_001c6c3c: LEA RSI,[0x1f5163] LEA RDI,[RSP + 0x80] MOV EDX,0xa CALL 0x0011aa10 LEA RSI,[RSP + 0x88] MOV RDI,RBX CALL 0x0011add0 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001c6c7e LAB_001c6c6f: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001c6c7e: MOV RSI,qword ptr [0x0022bf78] LEA RDI,[RSP + 0x80] CALL 0x0011a4b0 LEA RDI,[RSP + 0xf0] CALL 0x0011a2c0 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c6cba MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8f0 LAB_001c6cba: LEA RDI,[RSP + 0x48] CALL 0x001c787e MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c6cd9: LEA RDI,[0x1f510d] CALL 0x0011acd0 LAB_001c6ce5: JMP 0x001c6d81 LAB_001c6d81: MOV RDI,RAX CALL 0x00121a05
/* SchemaConverter::_not_strings(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * SchemaConverter::_not_strings(vector *param_1) { long lVar1; int8 uVar2; long *in_RDX; BuiltinRule *in_RSI; long lVar3; _lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const____TrieNode_const___1_ *local_220; int8 local_218; code *local_210; code *local_208; long *local_200 [2]; long local_1f0 [2]; TrieNode local_1e0 [8]; int4 local_1d8 [2]; int8 local_1d0; int4 *local_1c8; int4 *local_1c0; int8 local_1b8; char local_1b0; int4 *local_1a8; int8 local_1a0; int4 local_198; uint uStack_194; ios_base local_138 [264]; local_1c8 = local_1d8; local_1d8[0] = 0; local_1d0 = 0; local_1b8 = 0; local_1b0 = '\0'; lVar3 = *in_RDX; lVar1 = in_RDX[1]; local_1c0 = local_1c8; if (lVar3 != lVar1) { do { /* try { // try from 001c6ad7 to 001c6ae1 has its CatchHandler @ 001c6d89 */ _not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&):: TrieNode::insert(std::__cxx11::string_const__(local_1e0,lVar3); lVar3 = lVar3 + 0x20; } while (lVar3 != lVar1); } local_198 = 0x72616863; local_1a0 = 4; uStack_194 = uStack_194 & 0xffffff00; local_218 = 4; local_210 = (code *)CONCAT35(local_210._5_3_,0x72616863); /* try { // try from 001c6b22 to 001c6b5d has its CatchHandler @ 001c6cf6 */ local_220 = (_lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const____TrieNode_const___1_ *)&local_210; local_1a8 = &local_198; lVar3 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)PRIMITIVE_RULES_abi_cxx11_,(string *)&local_220); if (lVar3 != 0) { _add_primitive((string *)local_200,in_RSI); if (local_220 != (_lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const____TrieNode_const___1_ *)&local_210) { operator_delete(local_220,(ulong)(local_210 + 1)); } if (local_1a8 != &local_198) { operator_delete(local_1a8,CONCAT44(uStack_194,local_198) + 1); } /* try { // try from 001c6b92 to 001c6b9e has its CatchHandler @ 001c6cf1 */ std::__cxx11::ostringstream::ostringstream((ostringstream *)&local_1a8); /* try { // try from 001c6b9f to 001c6bba has its CatchHandler @ 001c6cec */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_1a8,"[\"] ( ",6); local_218 = 0; /* try { // try from 001c6bc4 to 001c6bcd has its CatchHandler @ 001c6cea */ local_220 = (_lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const____TrieNode_const___1_ *)operator_new(0x18); *(ostream **)local_220 = (ostream *)&local_1a8; *(string **)(local_220 + 8) = (string *)&local_220; *(string **)(local_220 + 0x10) = (string *)local_200; local_208 = std:: _Function_handler<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&),SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)#1}> ::_M_invoke; local_210 = std:: _Function_handler<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&),SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)#1}> ::_M_manager; /* try { // try from 001c6bf6 to 001c6c64 has its CatchHandler @ 001c6d27 */ _not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&):: {lambda(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)#1} ::operator()(local_220,local_1e0); std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_1a8," )",2); if (local_1b0 == '\0') { std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_1a8,"?",1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_1a8," [\"] space",10); std::__cxx11::stringbuf::str(); if (local_210 != (code *)0x0) { /* try { // try from 001c6c6f to 001c6c7d has its CatchHandler @ 001c6ce5 */ (*local_210)(&local_220,&local_220,3); } std::__cxx11::ostringstream::~ostringstream((ostringstream *)&local_1a8); std::ios_base::~ios_base(local_138); if (local_200[0] != local_1f0) { operator_delete(local_200[0],local_1f0[0] + 1); } std:: _Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>> ::~_Rb_tree((_Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>> *)local_1e0); return param_1; } /* try { // try from 001c6cd9 to 001c6ce4 has its CatchHandler @ 001c6cf6 */ uVar2 = std::__throw_out_of_range("_Map_base::at"); /* catch(type#1 @ 00000000) { ... } // from try @ 001c6c6f with catch @ 001c6ce5 */ /* catch(type#1 @ 00000000) { ... } // from try @ 001c6d34 with catch @ 001c6d81 */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar2); }
271
get_bool_argument
eloqsql/mysys/my_getopt.c
static my_bool get_bool_argument(const struct my_option *opts, const char *argument) { DBUG_ENTER("get_bool_argument"); if (!my_strcasecmp(&my_charset_latin1, argument, "true") || !my_strcasecmp(&my_charset_latin1, argument, "on") || !my_strcasecmp(&my_charset_latin1, argument, "1")) DBUG_RETURN(1); else if (!my_strcasecmp(&my_charset_latin1, argument, "false") || !my_strcasecmp(&my_charset_latin1, argument, "off") || !my_strcasecmp(&my_charset_latin1, argument, "0")) DBUG_RETURN(0); my_getopt_error_reporter(WARNING_LEVEL, "option '%s': boolean value '%s' wasn't recognized. Set to OFF.", opts->name, argument); DBUG_RETURN(0); }
O0
c
get_bool_argument: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq 0x24ebf9(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24ebe3(%rip), %rdi # 0x27bd00 leaq 0x52a65(%rip), %rdx # 0x7fb89 callq *%rax cmpl $0x0, %eax je 0x2d181 leaq 0x24ebce(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24ebb8(%rip), %rdi # 0x27bd00 leaq 0x55833(%rip), %rdx # 0x82982 callq *%rax cmpl $0x0, %eax je 0x2d181 leaq 0x24eba3(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24eb8d(%rip), %rdi # 0x27bd00 leaq 0x5361f(%rip), %rdx # 0x80799 callq *%rax cmpl $0x0, %eax jne 0x2d18c jmp 0x2d183 movb $0x1, -0x1(%rbp) jmp 0x2d241 leaq 0x24eb6d(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24eb57(%rip), %rdi # 0x27bd00 leaq 0x529de(%rip), %rdx # 0x7fb8e callq *%rax cmpl $0x0, %eax je 0x2d20d leaq 0x24eb42(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24eb2c(%rip), %rdi # 0x27bd00 leaq 0x529b9(%rip), %rdx # 0x7fb94 callq *%rax cmpl $0x0, %eax je 0x2d20d leaq 0x24eb17(%rip), %rax # 0x27bd00 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x24eb01(%rip), %rdi # 0x27bd00 leaq 0x54025(%rip), %rdx # 0x8122b callq *%rax cmpl $0x0, %eax jne 0x2d215 jmp 0x2d20f movb $0x0, -0x1(%rbp) jmp 0x2d241 jmp 0x2d217 leaq 0x1a82e2(%rip), %rax # 0x1d5500 movq (%rax), %r8 movq -0x10(%rbp), %rax movq (%rax), %rdx movq -0x18(%rbp), %rcx movl $0x1, %edi leaq 0x52d7f(%rip), %rsi # 0x7ffb7 movb $0x0, %al callq *%r8 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_bool_argument: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aTrue; "true" call rax cmp eax, 0 jz short loc_2D181 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aExpansion+7; "on" call rax cmp eax, 0 jz short loc_2D181 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aIso88591_2+9; "1" call rax cmp eax, 0 jnz short loc_2D18C loc_2D181: jmp short $+2 loc_2D183: mov [rbp+var_1], 1 jmp loc_2D241 loc_2D18C: lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aFalse; "false" call rax cmp eax, 0 jz short loc_2D20D lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aOff; "off" call rax cmp eax, 0 jz short loc_2D20D lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, unk_8122B call rax cmp eax, 0 jnz short loc_2D215 loc_2D20D: jmp short $+2 loc_2D20F: mov [rbp+var_1], 0 jmp short loc_2D241 loc_2D215: jmp short $+2 loc_2D217: lea rax, my_getopt_error_reporter mov r8, [rax] mov rax, [rbp+var_10] mov rdx, [rax] mov rcx, [rbp+var_18] mov edi, 1 lea rsi, aOptionSBoolean; "option '%s': boolean value '%s' wasn't "... mov al, 0 call r8 mov [rbp+var_1], 0 loc_2D241: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char get_bool_argument(const char **a1, const char *a2) { if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "true") || !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "on") || !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "1") ) { return 1; } if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "false") || !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "off") || !(*(unsigned int ( **)(void *, const char *, void *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, &unk_8122B) ) { return 0; } my_getopt_error_reporter(1, (long long)"option '%s': boolean value '%s' wasn't recognized. Set to OFF.", *a1, a2); return 0; }
get_bool_argument: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x17fb89] CALL RAX CMP EAX,0x0 JZ 0x0012d181 LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x182982] CALL RAX CMP EAX,0x0 JZ 0x0012d181 LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x180799] CALL RAX CMP EAX,0x0 JNZ 0x0012d18c LAB_0012d181: JMP 0x0012d183 LAB_0012d183: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012d241 LAB_0012d18c: LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x17fb8e] CALL RAX CMP EAX,0x0 JZ 0x0012d20d LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x17fb94] CALL RAX CMP EAX,0x0 JZ 0x0012d20d LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x37bd00] LEA RDX,[0x18122b] CALL RAX CMP EAX,0x0 JNZ 0x0012d215 LAB_0012d20d: JMP 0x0012d20f LAB_0012d20f: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012d241 LAB_0012d215: JMP 0x0012d217 LAB_0012d217: LEA RAX,[0x2d5500] MOV R8,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV EDI,0x1 LEA RSI,[0x17ffb7] MOV AL,0x0 CALL R8 MOV byte ptr [RBP + -0x1],0x0 LAB_0012d241: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 get_bool_argument(int8 *param_1,int8 param_2) { int iVar1; iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,&DAT_0017fb89); if (((iVar1 == 0) || (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,"on"), iVar1 == 0)) || (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,&DAT_00180799), iVar1 == 0)) { return 1; } iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,"false"); if (((iVar1 != 0) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,&DAT_0017fb94), iVar1 != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bdc0 + 0x40)) (&my_charset_latin1,param_2,&DAT_0018122b), iVar1 != 0)) { (*(code *)my_getopt_error_reporter) (1,"option \'%s\': boolean value \'%s\' wasn\'t recognized. Set to OFF.",*param_1, param_2); return 0; } return 0; }
272
get_bool_argument
eloqsql/mysys/my_getopt.c
static my_bool get_bool_argument(const struct my_option *opts, const char *argument) { DBUG_ENTER("get_bool_argument"); if (!my_strcasecmp(&my_charset_latin1, argument, "true") || !my_strcasecmp(&my_charset_latin1, argument, "on") || !my_strcasecmp(&my_charset_latin1, argument, "1")) DBUG_RETURN(1); else if (!my_strcasecmp(&my_charset_latin1, argument, "false") || !my_strcasecmp(&my_charset_latin1, argument, "off") || !my_strcasecmp(&my_charset_latin1, argument, "0")) DBUG_RETURN(0); my_getopt_error_reporter(WARNING_LEVEL, "option '%s': boolean value '%s' wasn't recognized. Set to OFF.", opts->name, argument); DBUG_RETURN(0); }
O3
c
get_bool_argument: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 leaq 0x2efcb3(%rip), %r15 # 0x319ca0 movq 0xc0(%r15), %rax leaq 0x35b67(%rip), %rdx # 0x5fb62 movq %r15, %rdi callq *0x40(%rax) movb $0x1, %r12b testl %eax, %eax je 0x2a0bd movq 0xc0(%r15), %rax leaq 0x3893a(%rip), %rdx # 0x62954 movq %r15, %rdi movq %rbx, %rsi callq *0x40(%rax) testl %eax, %eax je 0x2a0bd movq 0xc0(%r15), %rax leaq 0x36739(%rip), %rdx # 0x60772 movq %r15, %rdi movq %rbx, %rsi callq *0x40(%rax) testl %eax, %eax je 0x2a0bd movq 0xc0(%r15), %rax leaq 0x35b13(%rip), %rdx # 0x5fb67 movq %r15, %rdi movq %rbx, %rsi callq *0x40(%rax) testl %eax, %eax je 0x2a0ba movq 0xc0(%r15), %rax leaq 0x35afe(%rip), %rdx # 0x5fb6d movq %r15, %rdi movq %rbx, %rsi callq *0x40(%rax) testl %eax, %eax je 0x2a0ba movq 0xc0(%r15), %rax leaq 0x37173(%rip), %rdx # 0x611fd movq %r15, %rdi movq %rbx, %rsi callq *0x40(%rax) testl %eax, %eax je 0x2a0ba leaq 0x2c944a(%rip), %r8 # 0x2f34e8 movq (%r14), %rdx leaq 0x35ee8(%rip), %rsi # 0x5ff90 xorl %r12d, %r12d movl $0x1, %edi movq %rbx, %rcx xorl %eax, %eax callq *(%r8) jmp 0x2a0bd xorl %r12d, %r12d movl %r12d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
get_bool_argument: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi lea r15, my_charset_latin1 mov rax, [r15+0C0h] lea rdx, aTrue; "true" mov rdi, r15 call qword ptr [rax+40h] mov r12b, 1 test eax, eax jz loc_2A0BD mov rax, [r15+0C0h] lea rdx, aExpansion+7; "on" mov rdi, r15 mov rsi, rbx call qword ptr [rax+40h] test eax, eax jz loc_2A0BD mov rax, [r15+0C0h] lea rdx, aIso88591_2+9; "1" mov rdi, r15 mov rsi, rbx call qword ptr [rax+40h] test eax, eax jz short loc_2A0BD mov rax, [r15+0C0h] lea rdx, aFalse; "false" mov rdi, r15 mov rsi, rbx call qword ptr [rax+40h] test eax, eax jz short loc_2A0BA mov rax, [r15+0C0h] lea rdx, aOff; "off" mov rdi, r15 mov rsi, rbx call qword ptr [rax+40h] test eax, eax jz short loc_2A0BA mov rax, [r15+0C0h] lea rdx, unk_611FD mov rdi, r15 mov rsi, rbx call qword ptr [rax+40h] test eax, eax jz short loc_2A0BA lea r8, my_getopt_error_reporter mov rdx, [r14] lea rsi, aOptionSBoolean; "option '%s': boolean value '%s' wasn't "... xor r12d, r12d mov edi, 1 mov rcx, rbx xor eax, eax call qword ptr [r8] jmp short loc_2A0BD loc_2A0BA: xor r12d, r12d loc_2A0BD: mov eax, r12d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_bool_argument(const char **a1, const char *a2) { unsigned int v2; // r12d LOBYTE(v2) = 1; if ( (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "true") && (*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "on") && (*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "1") ) { if ( (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "false") && (*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "off") && (*(unsigned int ( **)(void *, const char *, void *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, &unk_611FD) ) { v2 = 0; my_getopt_error_reporter(1, "option '%s': boolean value '%s' wasn't recognized. Set to OFF.", *a1, a2); } else { return 0; } } return v2; }
get_bool_argument: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI LEA R15,[0x419ca0] MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x15fb62] MOV RDI,R15 CALL qword ptr [RAX + 0x40] MOV R12B,0x1 TEST EAX,EAX JZ 0x0012a0bd MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x162954] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a0bd MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x160772] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a0bd MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x15fb67] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a0ba MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x15fb6d] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a0ba MOV RAX,qword ptr [R15 + 0xc0] LEA RDX,[0x1611fd] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a0ba LEA R8,[0x3f34e8] MOV RDX,qword ptr [R14] LEA RSI,[0x15ff90] XOR R12D,R12D MOV EDI,0x1 MOV RCX,RBX XOR EAX,EAX CALL qword ptr [R8] JMP 0x0012a0bd LAB_0012a0ba: XOR R12D,R12D LAB_0012a0bd: MOV EAX,R12D POP RBX POP R12 POP R14 POP R15 POP RBP RET
ulong get_bool_argument(int8 *param_1,int8 param_2) { int iVar1; int8 unaff_R12; ulong uVar2; iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,&DAT_0015fb62); uVar2 = CONCAT71((int7)((ulong)unaff_R12 >> 8),1); if (iVar1 != 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,"on"); if (iVar1 != 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,&DAT_00160772); if (iVar1 != 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,"false"); if (iVar1 != 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,&DAT_0015fb6d); if (iVar1 != 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419d60 + 0x40)) (&my_charset_latin1,param_2,&DAT_001611fd); if (iVar1 != 0) { uVar2 = 0; (*(code *)my_getopt_error_reporter) (1,"option \'%s\': boolean value \'%s\' wasn\'t recognized. Set to OFF.", *param_1,param_2); goto LAB_0012a0bd; } } } uVar2 = 0; } } } LAB_0012a0bd: return uVar2 & 0xffffffff; }
273
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { auto *layer = getDeviceLayer(device); ScratchAllocator scratch; auto *createInfos = scratch.copy(pCreateInfos, createInfoCount); for (uint32_t i = 0; i < createInfoCount; i++) { createInfos[i].pStages = scratch.copy(createInfos[i].pStages, createInfos[i].stageCount); for (uint32_t j = 0; j < createInfos[i].stageCount; j++) layer->overrideStage(const_cast<VkPipelineShaderStageCreateInfo *>(&createInfos[i].pStages[j]), scratch); } return layer->getTable()->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); }
O0
cpp
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq 0x10(%rbp), %rax 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 -0x8(%rbp), %rdi callq 0x188770 movq %rax, -0x38(%rbp) leaq -0x70(%rbp), %rdi movq %rdi, -0xa0(%rbp) callq 0x199720 movq -0xa0(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x1c(%rbp), %eax movl %eax, %edx callq 0x19ae70 movq %rax, -0x98(%rbp) jmp 0x188551 movq -0x98(%rbp), %rax movq %rax, -0x78(%rbp) movl $0x0, -0x88(%rbp) movl -0x88(%rbp), %eax cmpl -0x1c(%rbp), %eax jae 0x188658 movq -0x78(%rbp), %rax movl -0x88(%rbp), %ecx imulq $0x68, %rcx, %rcx movq 0x18(%rax,%rcx), %rsi movl 0x14(%rax,%rcx), %eax movl %eax, %edx leaq -0x70(%rbp), %rdi callq 0x19ae10 movq %rax, -0xa8(%rbp) jmp 0x1885a0 movq -0xa8(%rbp), %rcx movq -0x78(%rbp), %rax movl -0x88(%rbp), %edx imulq $0x68, %rdx, %rdx addq %rdx, %rax movq %rcx, 0x18(%rax) movl $0x0, -0x8c(%rbp) movl -0x8c(%rbp), %eax movq -0x78(%rbp), %rcx movl -0x88(%rbp), %edx imulq $0x68, %rdx, %rdx addq %rdx, %rcx cmpl 0x14(%rcx), %eax jae 0x188642 movq -0x38(%rbp), %rdi movq -0x78(%rbp), %rax movl -0x88(%rbp), %ecx imulq $0x68, %rcx, %rcx movq 0x18(%rax,%rcx), %rsi movl -0x8c(%rbp), %eax leaq (%rax,%rax,2), %rax shlq $0x4, %rax addq %rax, %rsi leaq -0x70(%rbp), %rdx callq 0x186540 jmp 0x188615 jmp 0x188617 movl -0x8c(%rbp), %eax addl $0x1, %eax movl %eax, -0x8c(%rbp) jmp 0x1885c6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) leaq -0x70(%rbp), %rdi callq 0x1997a0 jmp 0x1886a8 jmp 0x188644 movl -0x88(%rbp), %eax addl $0x1, %eax movl %eax, -0x88(%rbp) jmp 0x188566 movq -0x38(%rbp), %rdi callq 0x1990c0 movq 0x38(%rax), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %r8 movq -0x30(%rbp), %r9 movq 0x10(%rbp), %r11 movq %rsp, %r10 movq %r11, (%r10) callq *%rax movl %eax, -0xac(%rbp) jmp 0x188690 leaq -0x70(%rbp), %rdi callq 0x1997a0 movl -0xac(%rbp), %eax addq $0xc0, %rsp popq %rbp retq movq -0x80(%rbp), %rdi callq 0x171c30 nopw %cs:(%rax,%rax)
_ZL28CreateRayTracingPipelinesKHRP10VkDevice_TP24VkDeferredOperationKHR_TP17VkPipelineCache_TjPK33VkRayTracingPipelineCreateInfoKHRPK21VkAllocationCallbacksPP12VkPipeline_T: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, [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 rdi, [rbp+var_8] call _ZL14getDeviceLayerP10VkDevice_T; getDeviceLayer(VkDevice_T *) mov [rbp+var_38], rax lea rdi, [rbp+var_70]; this mov [rbp+var_A0], rdi call _ZN16ScratchAllocatorC2Ev; ScratchAllocator::ScratchAllocator(void) mov rdi, [rbp+var_A0] mov rsi, [rbp+var_28] mov eax, [rbp+var_1C] mov edx, eax call _ZN16ScratchAllocator4copyI33VkRayTracingPipelineCreateInfoKHREEPT_PKS2_m; ScratchAllocator::copy<VkRayTracingPipelineCreateInfoKHR>(VkRayTracingPipelineCreateInfoKHR const*,ulong) mov [rbp+var_98], rax jmp short $+2 loc_188551: mov rax, [rbp+var_98] mov [rbp+var_78], rax mov [rbp+var_88], 0 loc_188566: mov eax, [rbp+var_88] cmp eax, [rbp+var_1C] jnb loc_188658 mov rax, [rbp+var_78] mov ecx, [rbp+var_88] imul rcx, 68h ; 'h' mov rsi, [rax+rcx+18h] mov eax, [rax+rcx+14h] mov edx, eax lea rdi, [rbp+var_70] call _ZN16ScratchAllocator4copyI31VkPipelineShaderStageCreateInfoEEPT_PKS2_m; ScratchAllocator::copy<VkPipelineShaderStageCreateInfo>(VkPipelineShaderStageCreateInfo const*,ulong) mov [rbp+var_A8], rax jmp short $+2 loc_1885A0: mov rcx, [rbp+var_A8] mov rax, [rbp+var_78] mov edx, [rbp+var_88] imul rdx, 68h ; 'h' add rax, rdx mov [rax+18h], rcx mov [rbp+var_8C], 0 loc_1885C6: mov eax, [rbp+var_8C] mov rcx, [rbp+var_78] mov edx, [rbp+var_88] imul rdx, 68h ; 'h' add rcx, rdx cmp eax, [rcx+14h] jnb short loc_188642 mov rdi, [rbp+var_38] mov rax, [rbp+var_78] mov ecx, [rbp+var_88] imul rcx, 68h ; 'h' mov rsi, [rax+rcx+18h] mov eax, [rbp+var_8C] lea rax, [rax+rax*2] shl rax, 4 add rsi, rax lea rdx, [rbp+var_70] call _ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator; Device::overrideStage(VkPipelineShaderStageCreateInfo *,ScratchAllocator &) jmp short $+2 loc_188615: jmp short $+2 loc_188617: mov eax, [rbp+var_8C] add eax, 1 mov [rbp+var_8C], eax jmp short loc_1885C6 mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax lea rdi, [rbp+var_70]; this call _ZN16ScratchAllocatorD2Ev; ScratchAllocator::~ScratchAllocator() jmp short loc_1886A8 loc_188642: jmp short $+2 loc_188644: mov eax, [rbp+var_88] add eax, 1 mov [rbp+var_88], eax jmp loc_188566 loc_188658: mov rdi, [rbp+var_38]; this call _ZNK6Device8getTableEv; Device::getTable(void) mov rax, [rax+38h] mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8, [rbp+var_28] mov r9, [rbp+var_30] mov r11, [rbp+arg_0] mov r10, rsp mov [r10], r11 call rax mov [rbp+var_AC], eax jmp short $+2 loc_188690: lea rdi, [rbp+var_70]; this call _ZN16ScratchAllocatorD2Ev; ScratchAllocator::~ScratchAllocator() mov eax, [rbp+var_AC] add rsp, 0C0h pop rbp retn loc_1886A8: mov rdi, [rbp+var_80] call __Unwind_Resume
long long CreateRayTracingPipelinesKHR( long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7) { long long Table; // rax unsigned int v9; // [rsp+14h] [rbp-ACh] unsigned int j; // [rsp+34h] [rbp-8Ch] unsigned int i; // [rsp+38h] [rbp-88h] long long Info; // [rsp+48h] [rbp-78h] _BYTE v13[56]; // [rsp+50h] [rbp-70h] BYREF Device *DeviceLayer; // [rsp+88h] [rbp-38h] long long v15; // [rsp+90h] [rbp-30h] long long v16; // [rsp+98h] [rbp-28h] unsigned int v17; // [rsp+A4h] [rbp-1Ch] long long v18; // [rsp+A8h] [rbp-18h] long long v19; // [rsp+B0h] [rbp-10h] long long v20; // [rsp+B8h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; DeviceLayer = (Device *)getDeviceLayer(a1); ScratchAllocator::ScratchAllocator((ScratchAllocator *)v13); Info = ScratchAllocator::copy<VkRayTracingPipelineCreateInfoKHR>(v13, v16, v17); for ( i = 0; i < v17; ++i ) { *(_QWORD *)(104LL * i + Info + 24) = ScratchAllocator::copy<VkPipelineShaderStageCreateInfo>( v13, *(_QWORD *)(Info + 104LL * i + 24), *(unsigned int *)(Info + 104LL * i + 20)); for ( j = 0; j < *(_DWORD *)(104LL * i + Info + 20); ++j ) Device::overrideStage( (long long)DeviceLayer, 48LL * j + *(_QWORD *)(Info + 104LL * i + 24), (ScratchAllocator *)v13); } Table = Device::getTable(DeviceLayer); v9 = (*(long long ( **)(long long, long long, long long, _QWORD, long long, long long, long long))(Table + 56))( v20, v19, v18, v17, v16, v15, a7); ScratchAllocator::~ScratchAllocator((ScratchAllocator *)v13); return v9; }
274
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { auto *layer = getDeviceLayer(device); ScratchAllocator scratch; auto *createInfos = scratch.copy(pCreateInfos, createInfoCount); for (uint32_t i = 0; i < createInfoCount; i++) { createInfos[i].pStages = scratch.copy(createInfos[i].pStages, createInfos[i].stageCount); for (uint32_t j = 0; j < createInfos[i].stageCount; j++) layer->overrideStage(const_cast<VkPipelineShaderStageCreateInfo *>(&createInfos[i].pStages[j]), scratch); } return layer->getTable()->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); }
O1
cpp
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %r9, %r15 movq %r8, %r12 movl %ecx, %ebx movq %rdx, %r13 movq %rsi, -0x60(%rbp) movq %rdi, -0x58(%rbp) movq (%rdi), %r14 leaq 0x5584b6(%rip), %rdi # 0x5e4038 callq 0x80290 testl %eax, %eax jne 0x8bd5f movq 0x558472(%rip), %rdi # 0x5e4008 xorl %r9d, %r9d movq %r14, %rax xorl %edx, %edx divq %rdi movq 0x558458(%rip), %rax # 0x5e4000 movq (%rax,%rdx,8), %rax testq %rax, %rax je 0x8bbef movq (%rax), %r8 movq %rax, %r9 cmpq %r14, 0x8(%r8) je 0x8bbef movq %rdx, %rcx movq %r8, %r10 movq (%r8), %r8 testq %r8, %r8 je 0x8bbec movq 0x8(%r8), %rsi movq %rsi, %rax xorl %edx, %edx divq %rdi movl $0x0, %r9d cmpq %rcx, %rdx jne 0x8bbef movq %r10, %r9 cmpq %r14, %rsi jne 0x8bbc0 jmp 0x8bbef xorl %r9d, %r9d testq %r9, %r9 je 0x8bbf9 movq (%r9), %rax jmp 0x8bbfb xorl %eax, %eax movq %r13, -0x50(%rbp) testq %rax, %rax je 0x8bc0a movq 0x10(%rax), %r13 jmp 0x8bc0d xorl %r13d, %r13d leaq 0x558424(%rip), %rdi # 0x5e4038 callq 0x7efe0 leaq -0xb0(%rbp), %rdi movq %rdi, 0x8(%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movq $0x1, 0x18(%rdi) leaq -0x90(%rbp), %rcx xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movq %rax, 0x10(%rcx) movl %ebx, -0x2c(%rbp) movl %ebx, %eax movq %rax, -0x68(%rbp) imulq $0x68, %rax, %rbx movq %rbx, %rsi callq 0x888ec movq %rax, %r14 movq %r15, -0x48(%rbp) testq %rax, %rax je 0x8bc72 movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x7f1b0 movq %r12, -0x40(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x8bd17 xorl %eax, %eax leaq -0xb0(%rbp), %r12 movq %r14, -0x38(%rbp) movq %rax, -0x78(%rbp) imulq $0x68, %rax, %rbx movq 0x18(%r14,%rbx), %rax movq %rax, -0x70(%rbp) movl 0x14(%r14,%rbx), %eax shlq $0x4, %rax leaq (%rax,%rax,2), %r15 movq %r12, %rdi movq %r15, %rsi callq 0x888ec movq %rax, %r14 testq %rax, %rax je 0x8bccd movq %r14, %rdi movq -0x70(%rbp), %rsi movq %r15, %rdx callq 0x7f1b0 addq -0x38(%rbp), %rbx movq %r14, 0x18(%rbx) cmpl $0x0, 0x14(%rbx) je 0x8bd02 xorl %r14d, %r14d xorl %r15d, %r15d movq 0x18(%rbx), %rsi addq %r14, %rsi movq %r13, %rdi movq %r12, %rdx callq 0x8a18e incq %r15 movl 0x14(%rbx), %eax addq $0x30, %r14 cmpq %rax, %r15 jb 0x8bce1 movq -0x78(%rbp), %rax incq %rax cmpq -0x68(%rbp), %rax movq -0x38(%rbp), %r14 jne 0x8bc8d movq 0x10(%rbp), %rax movq 0x50(%r13), %r10 movq %rax, (%rsp) movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movq -0x40(%rbp), %r8 movq -0x48(%rbp), %r9 callq *%r10 movl %eax, %ebx leaq -0x90(%rbp), %rdi callq 0x8ee9a movl %ebx, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7ee10 jmp 0x8bd6a jmp 0x8bd6a movq %rax, %rbx leaq -0x90(%rbp), %rdi callq 0x8ee9a movq %rbx, %rdi callq 0x809f0 nop
_ZL28CreateRayTracingPipelinesKHRP10VkDevice_TP24VkDeferredOperationKHR_TP17VkPipelineCache_TjPK33VkRayTracingPipelineCreateInfoKHRPK21VkAllocationCallbacksPP12VkPipeline_T: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, r9 mov r12, r8 mov ebx, ecx mov r13, rdx mov [rbp+var_60], rsi mov [rbp+var_58], rdi mov r14, [rdi] lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_lock test eax, eax jnz loc_8BD5F mov rdi, cs:qword_5E4008 xor r9d, r9d mov rax, r14 xor edx, edx div rdi mov rax, cs:_ZL10deviceData; deviceData mov rax, [rax+rdx*8] test rax, rax jz short loc_8BBEF mov r8, [rax] mov r9, rax cmp [r8+8], r14 jz short loc_8BBEF mov rcx, rdx loc_8BBC0: mov r10, r8 mov r8, [r8] test r8, r8 jz short loc_8BBEC mov rsi, [r8+8] mov rax, rsi xor edx, edx div rdi mov r9d, 0 cmp rdx, rcx jnz short loc_8BBEF mov r9, r10 cmp rsi, r14 jnz short loc_8BBC0 jmp short loc_8BBEF loc_8BBEC: xor r9d, r9d loc_8BBEF: test r9, r9 jz short loc_8BBF9 mov rax, [r9] jmp short loc_8BBFB loc_8BBF9: xor eax, eax loc_8BBFB: mov [rbp+var_50], r13 test rax, rax jz short loc_8BC0A mov r13, [rax+10h] jmp short loc_8BC0D loc_8BC0A: xor r13d, r13d loc_8BC0D: lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_unlock lea rdi, [rbp+var_B0]; this mov [rdi+8], rdi xor eax, eax mov [rdi+10h], rax mov qword ptr [rdi+18h], 1 lea rcx, [rbp+var_90] xorps xmm0, xmm0 movups xmmword ptr [rcx], xmm0 mov [rcx+10h], rax mov [rbp+var_2C], ebx mov eax, ebx mov [rbp+var_68], rax imul rbx, rax, 68h ; 'h' mov rsi, rbx; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) mov r14, rax mov [rbp+var_48], r15 test rax, rax jz short loc_8BC72 mov rdi, r14 mov rsi, r12 mov rdx, rbx call _memcpy loc_8BC72: mov [rbp+var_40], r12 cmp [rbp+var_2C], 0 jz loc_8BD17 xor eax, eax lea r12, [rbp+var_B0] mov [rbp+var_38], r14 loc_8BC8D: mov [rbp+var_78], rax imul rbx, rax, 68h ; 'h' mov rax, [r14+rbx+18h] mov [rbp+var_70], rax mov eax, [r14+rbx+14h] shl rax, 4 lea r15, [rax+rax*2] mov rdi, r12; this mov rsi, r15; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) mov r14, rax test rax, rax jz short loc_8BCCD mov rdi, r14 mov rsi, [rbp+var_70] mov rdx, r15 call _memcpy loc_8BCCD: add rbx, [rbp+var_38] mov [rbx+18h], r14 cmp dword ptr [rbx+14h], 0 jz short loc_8BD02 xor r14d, r14d xor r15d, r15d loc_8BCE1: mov rsi, [rbx+18h] add rsi, r14 mov rdi, r13 mov rdx, r12 call _ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator; Device::overrideStage(VkPipelineShaderStageCreateInfo *,ScratchAllocator &) inc r15 mov eax, [rbx+14h] add r14, 30h ; '0' cmp r15, rax jb short loc_8BCE1 loc_8BD02: mov rax, [rbp+var_78] inc rax cmp rax, [rbp+var_68] mov r14, [rbp+var_38] jnz loc_8BC8D loc_8BD17: mov rax, [rbp+arg_0] mov r10, [r13+50h] mov [rsp+0C0h+var_C0], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8, [rbp+var_40] mov r9, [rbp+var_48] call r10 mov ebx, eax lea rdi, [rbp+var_90] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() mov eax, ebx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8BD5F: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_8BD6A jmp short $+2 loc_8BD6A: mov rbx, rax lea rdi, [rbp+var_90] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() mov rdi, rbx call __Unwind_Resume
long long CreateRayTracingPipelinesKHR( _QWORD *a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7) { unsigned long long v11; // r14 int v12; // eax long long *v13; // r9 long long **v14; // rax long long *v15; // r8 long long *v16; // r10 long long v17; // rax ScratchAllocator *v18; // r13 unsigned long long v19; // rax unsigned long long v20; // r14 long long v21; // rax long long v22; // rbx unsigned long long v23; // rax unsigned long long v24; // r14 unsigned long long v25; // rbx long long v26; // r14 unsigned long long v27; // r15 unsigned int v28; // ebx char v30[8]; // [rsp+10h] [rbp-B0h] BYREF char *v31; // [rsp+18h] [rbp-A8h] long long v32; // [rsp+20h] [rbp-A0h] long long v33; // [rsp+28h] [rbp-98h] __int128 v34; // [rsp+30h] [rbp-90h] BYREF long long v35; // [rsp+40h] [rbp-80h] long long v36; // [rsp+48h] [rbp-78h] long long v37; // [rsp+50h] [rbp-70h] long long v38; // [rsp+58h] [rbp-68h] long long v39; // [rsp+60h] [rbp-60h] _QWORD *v40; // [rsp+68h] [rbp-58h] long long v41; // [rsp+70h] [rbp-50h] long long v42; // [rsp+78h] [rbp-48h] long long v43; // [rsp+80h] [rbp-40h] unsigned long long v44; // [rsp+88h] [rbp-38h] unsigned int v45; // [rsp+94h] [rbp-2Ch] v39 = a2; v40 = a1; v11 = *a1; v12 = pthread_mutex_lock(&globalLock); if ( v12 ) std::__throw_system_error(v12); v13 = 0LL; v14 = *(long long ***)(deviceData + 8 * (v11 % qword_5E4008)); if ( v14 ) { v15 = *v14; v13 = *(long long **)(deviceData + 8 * (v11 % qword_5E4008)); if ( (*v14)[1] != v11 ) { while ( 1 ) { v16 = v15; v15 = (long long *)*v15; if ( !v15 ) break; v13 = 0LL; if ( v15[1] % (unsigned long long)qword_5E4008 == v11 % qword_5E4008 ) { v13 = v16; if ( v15[1] != v11 ) continue; } goto LABEL_9; } v13 = 0LL; } } LABEL_9: if ( v13 ) v17 = *v13; else v17 = 0LL; v41 = a3; if ( v17 ) v18 = *(ScratchAllocator **)(v17 + 16); else v18 = 0LL; pthread_mutex_unlock(&globalLock); v31 = v30; v32 = 0LL; v33 = 1LL; v34 = 0LL; v35 = 0LL; v45 = a4; v38 = a4; v19 = ScratchAllocator::allocBytes((ScratchAllocator *)v30, 104LL * a4); v20 = v19; v42 = a6; if ( v19 ) memcpy(v19); v43 = a5; if ( v45 ) { v21 = 0LL; v44 = v20; do { v36 = v21; v22 = 104 * v21; v37 = *(_QWORD *)(v20 + 104 * v21 + 24); v23 = ScratchAllocator::allocBytes((ScratchAllocator *)v30, 48LL * *(unsigned int *)(v20 + 104 * v21 + 20)); v24 = v23; if ( v23 ) memcpy(v23); v25 = v44 + v22; *(_QWORD *)(v25 + 24) = v24; if ( *(_DWORD *)(v25 + 20) ) { v26 = 0LL; v27 = 0LL; do { Device::overrideStage(v18, (_QWORD *)(v26 + *(_QWORD *)(v25 + 24)), (ScratchAllocator *)v30); ++v27; v26 += 48LL; } while ( v27 < *(unsigned int *)(v25 + 20) ); } v21 = v36 + 1; v20 = v44; } while ( v36 + 1 != v38 ); } v28 = (*((long long ( **)(_QWORD *, long long, long long, _QWORD, long long, long long, long long))v18 + 10))( v40, v39, v41, v45, v43, v42, a7); std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector(&v34); return v28; }
CreateRayTracingPipelinesKHR: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,R9 MOV R12,R8 MOV EBX,ECX MOV R13,RDX MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x58],RDI MOV R14,qword ptr [RDI] LEA RDI,[0x6e4038] CALL 0x00180290 TEST EAX,EAX JNZ 0x0018bd5f MOV RDI,qword ptr [0x006e4008] XOR R9D,R9D MOV RAX,R14 XOR EDX,EDX DIV RDI MOV RAX,qword ptr [0x006e4000] MOV RAX,qword ptr [RAX + RDX*0x8] TEST RAX,RAX JZ 0x0018bbef MOV R8,qword ptr [RAX] MOV R9,RAX CMP qword ptr [R8 + 0x8],R14 JZ 0x0018bbef MOV RCX,RDX LAB_0018bbc0: MOV R10,R8 MOV R8,qword ptr [R8] TEST R8,R8 JZ 0x0018bbec MOV RSI,qword ptr [R8 + 0x8] MOV RAX,RSI XOR EDX,EDX DIV RDI MOV R9D,0x0 CMP RDX,RCX JNZ 0x0018bbef MOV R9,R10 CMP RSI,R14 JNZ 0x0018bbc0 JMP 0x0018bbef LAB_0018bbec: XOR R9D,R9D LAB_0018bbef: TEST R9,R9 JZ 0x0018bbf9 MOV RAX,qword ptr [R9] JMP 0x0018bbfb LAB_0018bbf9: XOR EAX,EAX LAB_0018bbfb: MOV qword ptr [RBP + -0x50],R13 TEST RAX,RAX JZ 0x0018bc0a MOV R13,qword ptr [RAX + 0x10] JMP 0x0018bc0d LAB_0018bc0a: XOR R13D,R13D LAB_0018bc0d: LEA RDI,[0x6e4038] CALL 0x0017efe0 LEA RDI,[RBP + -0xb0] MOV qword ptr [RDI + 0x8],RDI XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x1 LEA RCX,[RBP + -0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],RAX MOV dword ptr [RBP + -0x2c],EBX MOV EAX,EBX MOV qword ptr [RBP + -0x68],RAX IMUL RBX,RAX,0x68 LAB_0018bc50: MOV RSI,RBX CALL 0x001888ec LAB_0018bc58: MOV R14,RAX MOV qword ptr [RBP + -0x48],R15 TEST RAX,RAX JZ 0x0018bc72 MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX CALL 0x0017f1b0 LAB_0018bc72: MOV qword ptr [RBP + -0x40],R12 CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0018bd17 XOR EAX,EAX LEA R12,[RBP + -0xb0] MOV qword ptr [RBP + -0x38],R14 LAB_0018bc8d: MOV qword ptr [RBP + -0x78],RAX IMUL RBX,RAX,0x68 MOV RAX,qword ptr [R14 + RBX*0x1 + 0x18] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [R14 + RBX*0x1 + 0x14] SHL RAX,0x4 LEA R15,[RAX + RAX*0x2] LAB_0018bcab: MOV RDI,R12 MOV RSI,R15 CALL 0x001888ec LAB_0018bcb6: MOV R14,RAX TEST RAX,RAX JZ 0x0018bccd MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 CALL 0x0017f1b0 LAB_0018bccd: ADD RBX,qword ptr [RBP + -0x38] MOV qword ptr [RBX + 0x18],R14 CMP dword ptr [RBX + 0x14],0x0 JZ 0x0018bd02 XOR R14D,R14D XOR R15D,R15D LAB_0018bce1: MOV RSI,qword ptr [RBX + 0x18] ADD RSI,R14 LAB_0018bce8: MOV RDI,R13 MOV RDX,R12 CALL 0x0018a18e INC R15 MOV EAX,dword ptr [RBX + 0x14] ADD R14,0x30 CMP R15,RAX JC 0x0018bce1 LAB_0018bd02: MOV RAX,qword ptr [RBP + -0x78] INC RAX CMP RAX,qword ptr [RBP + -0x68] MOV R14,qword ptr [RBP + -0x38] JNZ 0x0018bc8d LAB_0018bd17: MOV RAX,qword ptr [RBP + 0x10] MOV R10,qword ptr [R13 + 0x50] LAB_0018bd1f: MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8,qword ptr [RBP + -0x40] MOV R9,qword ptr [RBP + -0x48] CALL R10 LAB_0018bd3d: MOV EBX,EAX LEA RDI,[RBP + -0x90] CALL 0x0018ee9a MOV EAX,EBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018bd5f: MOV EDI,EAX CALL 0x0017ee10
/* CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**) */ int4 CreateRayTracingPipelinesKHR (VkDevice_T *param_1,VkDeferredOperationKHR_T *param_2,VkPipelineCache_T *param_3, uint param_4,VkRayTracingPipelineCreateInfoKHR *param_5,VkAllocationCallbacks *param_6, VkPipeline_T **param_7) { long *plVar1; ulong __n; void *pvVar2; int iVar3; int4 uVar4; void *pvVar5; ulong uVar6; long lVar7; long *plVar8; long *plVar9; Device *this; long lVar10; ScratchAllocator local_b8 [8]; ScratchAllocator *local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 uStack_90; int8 local_88; ulong local_80; void *local_78; ulong local_70; VkDeferredOperationKHR_T *local_68; VkDevice_T *local_60; VkPipelineCache_T *local_58; VkAllocationCallbacks *local_50; VkRayTracingPipelineCreateInfoKHR *local_48; void *local_40; uint local_34; uVar6 = *(ulong *)param_1; local_68 = param_2; local_60 = param_1; iVar3 = pthread_mutex_lock((pthread_mutex_t *)globalLock); if (iVar3 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } plVar8 = *(long **)(deviceData + (uVar6 % DAT_006e4008) * 8); plVar9 = (long *)0x0; if ((plVar8 != (long *)0x0) && (plVar1 = (long *)*plVar8, plVar9 = plVar8, ((long *)*plVar8)[1] != uVar6)) { while (plVar8 = plVar1, plVar1 = (long *)*plVar8, plVar1 != (long *)0x0) { plVar9 = (long *)0x0; if (((ulong)plVar1[1] % DAT_006e4008 != uVar6 % DAT_006e4008) || (plVar9 = plVar8, plVar1[1] == uVar6)) goto LAB_0018bbef; } plVar9 = (long *)0x0; } LAB_0018bbef: if (plVar9 == (long *)0x0) { lVar7 = 0; } else { lVar7 = *plVar9; } if (lVar7 == 0) { this = (Device *)0x0; } else { this = *(Device **)(lVar7 + 0x10); } local_58 = param_3; pthread_mutex_unlock((pthread_mutex_t *)globalLock); local_b0 = local_b8; local_a8 = 0; local_a0 = 1; local_98 = 0; uStack_90 = 0; local_88 = 0; local_70 = (ulong)param_4; uVar6 = local_70 * 0x68; local_34 = param_4; /* try { // try from 0018bc50 to 0018bc57 has its CatchHandler @ 0018bd66 */ pvVar5 = (void *)ScratchAllocator::allocBytes(local_b0,uVar6); local_50 = param_6; if (pvVar5 != (void *)0x0) { memcpy(pvVar5,param_5,uVar6); } local_48 = param_5; if (local_34 != 0) { uVar6 = 0; local_40 = pvVar5; do { lVar7 = uVar6 * 0x68; local_78 = *(void **)((long)local_40 + lVar7 + 0x18); __n = (ulong)*(uint *)((long)local_40 + lVar7 + 0x14) * 0x30; local_80 = uVar6; /* try { // try from 0018bcab to 0018bcb5 has its CatchHandler @ 0018bd68 */ pvVar5 = (void *)ScratchAllocator::allocBytes(local_b8,__n); if (pvVar5 != (void *)0x0) { memcpy(pvVar5,local_78,__n); } pvVar2 = local_40; *(void **)((long)local_40 + lVar7 + 0x18) = pvVar5; if (*(int *)((long)local_40 + lVar7 + 0x14) != 0) { lVar10 = 0; uVar6 = 0; do { /* try { // try from 0018bce8 to 0018bcf2 has its CatchHandler @ 0018bd6a */ Device::overrideStage (this,(VkPipelineShaderStageCreateInfo *) (*(long *)((long)pvVar2 + lVar7 + 0x18) + lVar10),local_b8); uVar6 = uVar6 + 1; lVar10 = lVar10 + 0x30; } while (uVar6 < *(uint *)((long)pvVar2 + lVar7 + 0x14)); } uVar6 = local_80 + 1; } while (uVar6 != local_70); } /* try { // try from 0018bd1f to 0018bd3c has its CatchHandler @ 0018bd66 */ uVar4 = (**(code **)(this + 0x50))(local_60,local_68,local_58,local_34,local_48,local_50,param_7); std:: vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> ::~vector((vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> *)&local_98); return uVar4; }
275
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { auto *layer = getDeviceLayer(device); ScratchAllocator scratch; auto *createInfos = scratch.copy(pCreateInfos, createInfoCount); for (uint32_t i = 0; i < createInfoCount; i++) { createInfos[i].pStages = scratch.copy(createInfos[i].pStages, createInfos[i].stageCount); for (uint32_t j = 0; j < createInfos[i].stageCount; j++) layer->overrideStage(const_cast<VkPipelineShaderStageCreateInfo *>(&createInfos[i].pStages[j]), scratch); } return layer->getTable()->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); }
O2
cpp
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r9, -0x58(%rbp) movq %r8, %rbx movl %ecx, %r14d movq %rdx, -0x48(%rbp) movq %rsi, -0x40(%rbp) movq %rdi, -0x38(%rbp) callq 0xabb27 movq %rax, %r13 leaq -0xa8(%rbp), %rdi movq %rdi, 0x8(%rdi) andq $0x0, 0x10(%rdi) movq $0x1, 0x18(%rdi) leaq -0x88(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) andq $0x0, 0x10(%rax) movl %r14d, -0x2c(%rbp) movl %r14d, %edx movq %rbx, -0x50(%rbp) movq %rbx, %rsi movq %rdx, -0x68(%rbp) callq 0xaf90a movq %rax, %r14 xorl %eax, %eax leaq -0xa8(%rbp), %r12 movq %r14, -0x60(%rbp) cmpq -0x68(%rbp), %rax je 0xaba97 movq %rax, -0x70(%rbp) imulq $0x68, %rax, %rbx movq 0x18(%r14,%rbx), %rsi movl 0x14(%r14,%rbx), %edx movq %r12, %rdi callq 0xaf8ee addq %r14, %rbx movq %rax, 0x18(%rbx) xorl %r15d, %r15d xorl %r14d, %r14d movl 0x14(%rbx), %eax cmpq %rax, %r14 jae 0xaba8a movq 0x18(%rbx), %rsi addq %r15, %rsi movq %r13, %rdi movq %r12, %rdx callq 0xaa9ca incq %r14 addq $0x30, %r15 jmp 0xaba67 movq -0x70(%rbp), %rax incq %rax movq -0x60(%rbp), %r14 jmp 0xaba3a movq 0x50(%r13), %rax movq 0x10(%rbp), %rcx movq %rcx, (%rsp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx movl -0x2c(%rbp), %ecx movq -0x50(%rbp), %r8 movq -0x58(%rbp), %r9 callq *%rax movl %eax, %ebx leaq -0x88(%rbp), %rdi callq 0xaf710 movl %ebx, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xabae2 jmp 0xabae2 movq %rax, %rbx leaq -0x88(%rbp), %rdi callq 0xaf710 movq %rbx, %rdi callq 0xa55e0
_ZL28CreateRayTracingPipelinesKHRP10VkDevice_TP24VkDeferredOperationKHR_TP17VkPipelineCache_TjPK33VkRayTracingPipelineCreateInfoKHRPK21VkAllocationCallbacksPP12VkPipeline_T: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rbp+var_58], r9 mov rbx, r8 mov r14d, ecx mov [rbp+var_48], rdx mov [rbp+var_40], rsi mov [rbp+var_38], rdi call _ZL14getDeviceLayerP10VkDevice_T; getDeviceLayer(VkDevice_T *) mov r13, rax lea rdi, [rbp+var_A8] mov [rdi+8], rdi and qword ptr [rdi+10h], 0 mov qword ptr [rdi+18h], 1 lea rax, [rbp+var_88] xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 and qword ptr [rax+10h], 0 mov [rbp+var_2C], r14d mov edx, r14d mov [rbp+var_50], rbx mov rsi, rbx mov [rbp+var_68], rdx call _ZN16ScratchAllocator4copyI33VkRayTracingPipelineCreateInfoKHREEPT_PKS2_m; ScratchAllocator::copy<VkRayTracingPipelineCreateInfoKHR>(VkRayTracingPipelineCreateInfoKHR const*,ulong) mov r14, rax xor eax, eax lea r12, [rbp+var_A8] mov [rbp+var_60], r14 loc_ABA3A: cmp rax, [rbp+var_68] jz short loc_ABA97 mov [rbp+var_70], rax imul rbx, rax, 68h ; 'h' mov rsi, [r14+rbx+18h] mov edx, [r14+rbx+14h] mov rdi, r12 call _ZN16ScratchAllocator4copyI31VkPipelineShaderStageCreateInfoEEPT_PKS2_m; ScratchAllocator::copy<VkPipelineShaderStageCreateInfo>(VkPipelineShaderStageCreateInfo const*,ulong) add rbx, r14 mov [rbx+18h], rax xor r15d, r15d xor r14d, r14d loc_ABA67: mov eax, [rbx+14h] cmp r14, rax jnb short loc_ABA8A mov rsi, [rbx+18h] add rsi, r15 mov rdi, r13 mov rdx, r12 call _ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator; Device::overrideStage(VkPipelineShaderStageCreateInfo *,ScratchAllocator &) inc r14 add r15, 30h ; '0' jmp short loc_ABA67 loc_ABA8A: mov rax, [rbp+var_70] inc rax mov r14, [rbp+var_60] jmp short loc_ABA3A loc_ABA97: mov rax, [r13+50h] mov rcx, [rbp+arg_0] mov [rsp+0B0h+var_B0], rcx mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] mov rdx, [rbp+var_48] mov ecx, [rbp+var_2C] mov r8, [rbp+var_50] mov r9, [rbp+var_58] call rax mov ebx, eax lea rdi, [rbp+var_88] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() mov eax, ebx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_ABAE2 jmp short $+2 loc_ABAE2: mov rbx, rax lea rdi, [rbp+var_88] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() mov rdi, rbx call __Unwind_Resume
long long CreateRayTracingPipelinesKHR( long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7) { long long DeviceLayer; // r13 long long Info; // r14 long long v11; // rax long long v12; // rbx long long v13; // r15 unsigned long long i; // r14 unsigned int v15; // ebx _BYTE v17[8]; // [rsp+8h] [rbp-A8h] BYREF _BYTE *v18; // [rsp+10h] [rbp-A0h] long long v19; // [rsp+18h] [rbp-98h] long long v20; // [rsp+20h] [rbp-90h] __int128 v21; // [rsp+28h] [rbp-88h] BYREF long long v22; // [rsp+38h] [rbp-78h] long long v23; // [rsp+40h] [rbp-70h] long long v24; // [rsp+48h] [rbp-68h] long long v25; // [rsp+50h] [rbp-60h] long long v26; // [rsp+58h] [rbp-58h] long long v27; // [rsp+60h] [rbp-50h] long long v28; // [rsp+68h] [rbp-48h] long long v29; // [rsp+70h] [rbp-40h] long long v30; // [rsp+78h] [rbp-38h] unsigned int v31; // [rsp+84h] [rbp-2Ch] v26 = a6; v28 = a3; v29 = a2; v30 = a1; DeviceLayer = getDeviceLayer(); v18 = v17; v19 = 0LL; v20 = 1LL; v21 = 0LL; v22 = 0LL; v31 = a4; v27 = a5; v24 = a4; Info = ScratchAllocator::copy<VkRayTracingPipelineCreateInfoKHR>(v17, a5); v11 = 0LL; v25 = Info; while ( v11 != v24 ) { v23 = v11; v12 = Info + 104 * v11; *(_QWORD *)(v12 + 24) = ScratchAllocator::copy<VkPipelineShaderStageCreateInfo>( v17, *(_QWORD *)(v12 + 24), *(unsigned int *)(v12 + 20)); v13 = 0LL; for ( i = 0LL; i < *(unsigned int *)(v12 + 20); ++i ) { Device::overrideStage(DeviceLayer, v13 + *(_QWORD *)(v12 + 24), (ScratchAllocator *)v17); v13 += 48LL; } v11 = v23 + 1; Info = v25; } v15 = (*(long long ( **)(long long, long long, long long, _QWORD, long long, long long, long long))(DeviceLayer + 80))( v30, v29, v28, v31, v27, v26, a7); std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector(&v21); return v15; }
CreateRayTracingPipelinesKHR: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RBP + -0x58],R9 MOV RBX,R8 MOV R14D,ECX MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x40],RSI MOV qword ptr [RBP + -0x38],RDI CALL 0x001abb27 MOV R13,RAX LEA RDI,[RBP + -0xa8] MOV qword ptr [RDI + 0x8],RDI AND qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],0x1 LEA RAX,[RBP + -0x88] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 AND qword ptr [RAX + 0x10],0x0 MOV dword ptr [RBP + -0x2c],R14D MOV EDX,R14D LAB_001aba1a: MOV qword ptr [RBP + -0x50],RBX MOV RSI,RBX MOV qword ptr [RBP + -0x68],RDX CALL 0x001af90a MOV R14,RAX XOR EAX,EAX LEA R12,[RBP + -0xa8] MOV qword ptr [RBP + -0x60],R14 LAB_001aba3a: CMP RAX,qword ptr [RBP + -0x68] JZ 0x001aba97 MOV qword ptr [RBP + -0x70],RAX IMUL RBX,RAX,0x68 MOV RSI,qword ptr [R14 + RBX*0x1 + 0x18] MOV EDX,dword ptr [R14 + RBX*0x1 + 0x14] LAB_001aba52: MOV RDI,R12 CALL 0x001af8ee ADD RBX,R14 MOV qword ptr [RBX + 0x18],RAX XOR R15D,R15D XOR R14D,R14D LAB_001aba67: MOV EAX,dword ptr [RBX + 0x14] CMP R14,RAX JNC 0x001aba8a MOV RSI,qword ptr [RBX + 0x18] ADD RSI,R15 LAB_001aba76: MOV RDI,R13 MOV RDX,R12 CALL 0x001aa9ca INC R14 ADD R15,0x30 JMP 0x001aba67 LAB_001aba8a: MOV RAX,qword ptr [RBP + -0x70] INC RAX MOV R14,qword ptr [RBP + -0x60] JMP 0x001aba3a LAB_001aba97: MOV RAX,qword ptr [R13 + 0x50] LAB_001aba9b: MOV RCX,qword ptr [RBP + 0x10] MOV qword ptr [RSP],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x2c] MOV R8,qword ptr [RBP + -0x50] MOV R9,qword ptr [RBP + -0x58] CALL RAX LAB_001ababc: MOV EBX,EAX LEA RDI,[RBP + -0x88] CALL 0x001af710 MOV EAX,EBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**) */ int4 CreateRayTracingPipelinesKHR (VkDevice_T *param_1,VkDeferredOperationKHR_T *param_2,VkPipelineCache_T *param_3, uint param_4,VkRayTracingPipelineCreateInfoKHR *param_5,VkAllocationCallbacks *param_6, VkPipeline_T **param_7) { VkRayTracingPipelineCreateInfoKHR *pVVar1; int4 uVar2; Device *this; VkPipelineShaderStageCreateInfo *pVVar3; long lVar4; ulong uVar5; long lVar6; ScratchAllocator local_b0 [8]; ScratchAllocator *local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 uStack_88; int8 local_80; ulong local_78; ulong local_70; VkRayTracingPipelineCreateInfoKHR *local_68; VkAllocationCallbacks *local_60; VkRayTracingPipelineCreateInfoKHR *local_58; VkPipelineCache_T *local_50; VkDeferredOperationKHR_T *local_48; VkDevice_T *local_40; uint local_34; local_60 = param_6; local_50 = param_3; local_48 = param_2; local_40 = param_1; this = (Device *)getDeviceLayer(param_1); local_a8 = local_b0; local_a0 = 0; local_98 = 1; local_90 = 0; uStack_88 = 0; local_80 = 0; local_70 = (ulong)param_4; local_58 = param_5; local_34 = param_4; /* try { // try from 001aba1a to 001aba29 has its CatchHandler @ 001abade */ local_68 = ScratchAllocator::copy<VkRayTracingPipelineCreateInfoKHR>(local_a8,param_5,local_70); uVar5 = 0; while (pVVar1 = local_68, uVar5 != local_70) { lVar4 = uVar5 * 0x68; local_78 = uVar5; /* try { // try from 001aba52 to 001aba59 has its CatchHandler @ 001abae0 */ pVVar3 = ScratchAllocator::copy<VkPipelineShaderStageCreateInfo> (local_b0,*(VkPipelineShaderStageCreateInfo **)(local_68 + lVar4 + 0x18), (ulong)*(uint *)(local_68 + lVar4 + 0x14)); *(VkPipelineShaderStageCreateInfo **)(pVVar1 + lVar4 + 0x18) = pVVar3; lVar6 = 0; for (uVar5 = 0; uVar5 < *(uint *)(pVVar1 + lVar4 + 0x14); uVar5 = uVar5 + 1) { /* try { // try from 001aba76 to 001aba80 has its CatchHandler @ 001abae2 */ Device::overrideStage (this,(VkPipelineShaderStageCreateInfo *)(*(long *)(pVVar1 + lVar4 + 0x18) + lVar6), local_b0); lVar6 = lVar6 + 0x30; } uVar5 = local_78 + 1; } /* try { // try from 001aba9b to 001ababb has its CatchHandler @ 001abade */ uVar2 = (**(code **)(this + 0x50))(local_40,local_48,local_50,local_34,local_58,local_60,param_7); std:: vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> ::~vector((vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> *)&local_90); return uVar2; }
276
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { auto *layer = getDeviceLayer(device); ScratchAllocator scratch; auto *createInfos = scratch.copy(pCreateInfos, createInfoCount); for (uint32_t i = 0; i < createInfoCount; i++) { createInfos[i].pStages = scratch.copy(createInfos[i].pStages, createInfos[i].stageCount); for (uint32_t j = 0; j < createInfos[i].stageCount; j++) layer->overrideStage(const_cast<VkPipelineShaderStageCreateInfo *>(&createInfos[i].pStages[j]), scratch); } return layer->getTable()->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); }
O3
cpp
CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %r9, %r15 movq %r8, -0x38(%rbp) movl %ecx, %r12d movq %rdx, %r13 movq %rsi, -0x60(%rbp) movq %rdi, -0x58(%rbp) movq (%rdi), %r14 leaq 0x54050a(%rip), %rdi # 0x5cafe8 callq 0x7f220 testl %eax, %eax jne 0x8ac62 leaq -0xb0(%rbp), %rbx movq %r14, (%rbx) leaq 0x5404b4(%rip), %rdi # 0x5cafb0 movq %rbx, %rsi callq 0x8da5a movq %r13, -0x50(%rbp) testq %rax, %rax je 0x8ab13 movq 0x10(%rax), %r13 jmp 0x8ab16 xorl %r13d, %r13d leaq 0x5404cb(%rip), %rdi # 0x5cafe8 callq 0x7e000 leaq -0x90(%rbp), %rcx movq %rbx, -0x18(%rcx) xorl %eax, %eax movq %rax, -0x10(%rcx) movq $0x1, -0x8(%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movq %rax, 0x10(%rcx) movl %r12d, -0x2c(%rbp) movl %r12d, %eax movq %rax, -0x68(%rbp) imulq $0x68, %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x87dac movq %rax, %r14 movq %r15, -0x48(%rbp) testq %rax, %rax je 0x8ab7a movq %r14, %rdi movq -0x38(%rbp), %rsi movq %r12, %rdx callq 0x7e1f0 cmpl $0x0, -0x2c(%rbp) je 0x8ac1a xorl %eax, %eax movq %r14, -0x40(%rbp) movq %rax, -0x78(%rbp) imulq $0x68, %rax, %r12 movq 0x18(%r14,%r12), %rax movq %rax, -0x70(%rbp) movl 0x14(%r14,%r12), %eax shlq $0x4, %rax leaq (%rax,%rax,2), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x87dac movq %rax, %r14 testq %rax, %rax je 0x8abca movq %r14, %rdi movq -0x70(%rbp), %rsi movq %r15, %rdx callq 0x7e1f0 addq -0x40(%rbp), %r12 movq %r14, 0x18(%r12) cmpl $0x0, 0x14(%r12) je 0x8ac05 xorl %r14d, %r14d xorl %r15d, %r15d movq 0x18(%r12), %rsi addq %r14, %rsi movq %r13, %rdi movq %rbx, %rdx callq 0x895dc incq %r15 movl 0x14(%r12), %eax addq $0x30, %r14 cmpq %rax, %r15 jb 0x8abe1 movq -0x78(%rbp), %rax incq %rax cmpq -0x68(%rbp), %rax movq -0x40(%rbp), %r14 jne 0x8ab8a movq 0x10(%rbp), %rax movq 0x50(%r13), %r10 movq %rax, (%rsp) movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movq -0x38(%rbp), %r8 movq -0x48(%rbp), %r9 callq *%r10 movl %eax, %ebx leaq -0x90(%rbp), %rdi callq 0x8de98 movl %ebx, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7de30 movq %rax, %rbx leaq 0x540375(%rip), %rdi # 0x5cafe8 callq 0x7e000 jmp 0x8ac8d jmp 0x8ac7e jmp 0x8ac7e movq %rax, %rbx leaq -0x90(%rbp), %rdi callq 0x8de98 movq %rbx, %rdi callq 0x7f950 nop
_ZL28CreateRayTracingPipelinesKHRP10VkDevice_TP24VkDeferredOperationKHR_TP17VkPipelineCache_TjPK33VkRayTracingPipelineCreateInfoKHRPK21VkAllocationCallbacksPP12VkPipeline_T: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, r9 mov [rbp+var_38], r8 mov r12d, ecx mov r13, rdx mov [rbp+var_60], rsi mov [rbp+var_58], rdi mov r14, [rdi] lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_lock test eax, eax jnz loc_8AC62 lea rbx, [rbp+var_B0] mov [rbx], r14 lea rdi, _ZL10deviceData; deviceData mov rsi, rbx call _ZNKSt10_HashtableIPvSt4pairIKS0_St10unique_ptrI6DeviceSt14default_deleteIS4_EEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS0_ESt4hashIS0_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS2_; std::_Hashtable<void *,std::pair<void * const,std::unique_ptr<Device>>,std::allocator<std::pair<void * const,std::unique_ptr<Device>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(void * const&) mov [rbp+var_50], r13 test rax, rax jz short loc_8AB13 mov r13, [rax+10h] jmp short loc_8AB16 loc_8AB13: xor r13d, r13d loc_8AB16: lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_unlock lea rcx, [rbp+var_90] mov [rcx-18h], rbx xor eax, eax mov [rcx-10h], rax mov qword ptr [rcx-8], 1 xorps xmm0, xmm0 movups xmmword ptr [rcx], xmm0 mov [rcx+10h], rax mov [rbp+var_2C], r12d mov eax, r12d mov [rbp+var_68], rax imul r12, rax, 68h ; 'h' mov rdi, rbx; this mov rsi, r12; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) mov r14, rax mov [rbp+var_48], r15 test rax, rax jz short loc_8AB7A mov rdi, r14 mov rsi, [rbp+var_38] mov rdx, r12 call _memcpy loc_8AB7A: cmp [rbp+var_2C], 0 jz loc_8AC1A xor eax, eax mov [rbp+var_40], r14 loc_8AB8A: mov [rbp+var_78], rax imul r12, rax, 68h ; 'h' mov rax, [r14+r12+18h] mov [rbp+var_70], rax mov eax, [r14+r12+14h] shl rax, 4 lea r15, [rax+rax*2] mov rdi, rbx; this mov rsi, r15; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) mov r14, rax test rax, rax jz short loc_8ABCA mov rdi, r14 mov rsi, [rbp+var_70] mov rdx, r15 call _memcpy loc_8ABCA: add r12, [rbp+var_40] mov [r12+18h], r14 cmp dword ptr [r12+14h], 0 jz short loc_8AC05 xor r14d, r14d xor r15d, r15d loc_8ABE1: mov rsi, [r12+18h] add rsi, r14 mov rdi, r13 mov rdx, rbx call _ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator; Device::overrideStage(VkPipelineShaderStageCreateInfo *,ScratchAllocator &) inc r15 mov eax, [r12+14h] add r14, 30h ; '0' cmp r15, rax jb short loc_8ABE1 loc_8AC05: mov rax, [rbp+var_78] inc rax cmp rax, [rbp+var_68] mov r14, [rbp+var_40] jnz loc_8AB8A loc_8AC1A: mov rax, [rbp+arg_0] mov r10, [r13+50h] mov [rsp+0C0h+var_C0], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8, [rbp+var_38] mov r9, [rbp+var_48] call r10 mov ebx, eax lea rdi, [rbp+var_90] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() mov eax, ebx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8AC62: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax lea rdi, _ZL10globalLock; globalLock call _pthread_mutex_unlock jmp short loc_8AC8D jmp short loc_8AC7E jmp short $+2 loc_8AC7E: mov rbx, rax lea rdi, [rbp+var_90] call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EED2Ev; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector() loc_8AC8D: mov rdi, rbx call __Unwind_Resume
long long CreateRayTracingPipelinesKHR( _QWORD *a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7) { long long v10; // r14 int v11; // eax long long v12; // rax long long v13; // r13 unsigned long long v14; // rax unsigned long long v15; // r14 long long v16; // rax long long v17; // r12 unsigned long long v18; // rax unsigned long long v19; // r14 unsigned long long v20; // r12 long long v21; // r14 unsigned long long v22; // r15 unsigned int v23; // ebx _QWORD v25[4]; // [rsp+10h] [rbp-B0h] BYREF __int128 v26; // [rsp+30h] [rbp-90h] BYREF long long v27; // [rsp+40h] [rbp-80h] long long v28; // [rsp+48h] [rbp-78h] long long v29; // [rsp+50h] [rbp-70h] long long v30; // [rsp+58h] [rbp-68h] long long v31; // [rsp+60h] [rbp-60h] _QWORD *v32; // [rsp+68h] [rbp-58h] long long v33; // [rsp+70h] [rbp-50h] long long v34; // [rsp+78h] [rbp-48h] unsigned long long v35; // [rsp+80h] [rbp-40h] long long v36; // [rsp+88h] [rbp-38h] unsigned int v37; // [rsp+94h] [rbp-2Ch] v36 = a5; v31 = a2; v32 = a1; v10 = *a1; v11 = pthread_mutex_lock(&globalLock); if ( v11 ) std::__throw_system_error(v11); v25[0] = v10; v12 = std::_Hashtable<void *,std::pair<void * const,std::unique_ptr<Device>>,std::allocator<std::pair<void * const,std::unique_ptr<Device>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(&deviceData); v33 = a3; if ( v12 ) v13 = *(_QWORD *)(v12 + 16); else v13 = 0LL; pthread_mutex_unlock(&globalLock); v25[1] = v25; v25[2] = 0LL; v25[3] = 1LL; v26 = 0LL; v27 = 0LL; v37 = a4; v30 = a4; v14 = ScratchAllocator::allocBytes((ScratchAllocator *)v25, 104LL * a4); v15 = v14; v34 = a6; if ( v14 ) memcpy(v14); if ( v37 ) { v16 = 0LL; v35 = v15; do { v28 = v16; v17 = 104 * v16; v29 = *(_QWORD *)(v15 + 104 * v16 + 24); v18 = ScratchAllocator::allocBytes((ScratchAllocator *)v25, 48LL * *(unsigned int *)(v15 + 104 * v16 + 20)); v19 = v18; if ( v18 ) memcpy(v18); v20 = v35 + v17; *(_QWORD *)(v20 + 24) = v19; if ( *(_DWORD *)(v20 + 20) ) { v21 = 0LL; v22 = 0LL; do { Device::overrideStage(v13, v21 + *(_QWORD *)(v20 + 24), (ScratchAllocator *)v25); ++v22; v21 += 48LL; } while ( v22 < *(unsigned int *)(v20 + 20) ); } v16 = v28 + 1; v15 = v35; } while ( v28 + 1 != v30 ); } v23 = (*(long long ( **)(_QWORD *, long long, long long, _QWORD, long long, long long, long long))(v13 + 80))( v32, v31, v33, v37, v36, v34, a7); std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::~vector(&v26); return v23; }
CreateRayTracingPipelinesKHR: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,R9 MOV qword ptr [RBP + -0x38],R8 MOV R12D,ECX MOV R13,RDX MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x58],RDI MOV R14,qword ptr [RDI] LEA RDI,[0x6cafe8] CALL 0x0017f220 TEST EAX,EAX JNZ 0x0018ac62 LEA RBX,[RBP + -0xb0] MOV qword ptr [RBX],R14 LAB_0018aaf5: LEA RDI,[0x6cafb0] MOV RSI,RBX CALL 0x0018da5a MOV qword ptr [RBP + -0x50],R13 TEST RAX,RAX JZ 0x0018ab13 MOV R13,qword ptr [RAX + 0x10] JMP 0x0018ab16 LAB_0018ab13: XOR R13D,R13D LAB_0018ab16: LEA RDI,[0x6cafe8] CALL 0x0017e000 LEA RCX,[RBP + -0x90] MOV qword ptr [RCX + -0x18],RBX XOR EAX,EAX MOV qword ptr [RCX + -0x10],RAX MOV qword ptr [RCX + -0x8],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],RAX MOV dword ptr [RBP + -0x2c],R12D MOV EAX,R12D MOV qword ptr [RBP + -0x68],RAX IMUL R12,RAX,0x68 LAB_0018ab54: MOV RDI,RBX MOV RSI,R12 CALL 0x00187dac LAB_0018ab5f: MOV R14,RAX MOV qword ptr [RBP + -0x48],R15 TEST RAX,RAX JZ 0x0018ab7a MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x38] MOV RDX,R12 CALL 0x0017e1f0 LAB_0018ab7a: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0018ac1a XOR EAX,EAX MOV qword ptr [RBP + -0x40],R14 LAB_0018ab8a: MOV qword ptr [RBP + -0x78],RAX IMUL R12,RAX,0x68 MOV RAX,qword ptr [R14 + R12*0x1 + 0x18] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [R14 + R12*0x1 + 0x14] SHL RAX,0x4 LEA R15,[RAX + RAX*0x2] LAB_0018aba8: MOV RDI,RBX MOV RSI,R15 CALL 0x00187dac LAB_0018abb3: MOV R14,RAX TEST RAX,RAX JZ 0x0018abca MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 CALL 0x0017e1f0 LAB_0018abca: ADD R12,qword ptr [RBP + -0x40] MOV qword ptr [R12 + 0x18],R14 CMP dword ptr [R12 + 0x14],0x0 JZ 0x0018ac05 XOR R14D,R14D XOR R15D,R15D LAB_0018abe1: MOV RSI,qword ptr [R12 + 0x18] ADD RSI,R14 LAB_0018abe9: MOV RDI,R13 MOV RDX,RBX CALL 0x001895dc INC R15 MOV EAX,dword ptr [R12 + 0x14] ADD R14,0x30 CMP R15,RAX JC 0x0018abe1 LAB_0018ac05: MOV RAX,qword ptr [RBP + -0x78] INC RAX CMP RAX,qword ptr [RBP + -0x68] MOV R14,qword ptr [RBP + -0x40] JNZ 0x0018ab8a LAB_0018ac1a: MOV RAX,qword ptr [RBP + 0x10] MOV R10,qword ptr [R13 + 0x50] LAB_0018ac22: MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x48] CALL R10 LAB_0018ac40: MOV EBX,EAX LEA RDI,[RBP + -0x90] CALL 0x0018de98 MOV EAX,EBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018ac62: MOV EDI,EAX CALL 0x0017de30 LAB_0018ac69: MOV RBX,RAX LEA RDI,[0x6cafe8] CALL 0x0017e000 JMP 0x0018ac8d LAB_0018ac8d: MOV RDI,RBX CALL 0x0017f950
/* CreateRayTracingPipelinesKHR(VkDevice_T*, VkDeferredOperationKHR_T*, VkPipelineCache_T*, unsigned int, VkRayTracingPipelineCreateInfoKHR const*, VkAllocationCallbacks const*, VkPipeline_T**) */ int4 CreateRayTracingPipelinesKHR (VkDevice_T *param_1,VkDeferredOperationKHR_T *param_2,VkPipelineCache_T *param_3, uint param_4,VkRayTracingPipelineCreateInfoKHR *param_5,VkAllocationCallbacks *param_6, VkPipeline_T **param_7) { ulong __n; void *pvVar1; int iVar2; int4 uVar3; long lVar4; void *pvVar5; int8 uVar6; ulong uVar7; Device *this; long lVar8; int8 local_b8; ScratchAllocator *local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 uStack_90; int8 local_88; ulong local_80; void *local_78; ulong local_70; VkDeferredOperationKHR_T *local_68; VkDevice_T *local_60; VkPipelineCache_T *local_58; VkAllocationCallbacks *local_50; void *local_48; VkRayTracingPipelineCreateInfoKHR *local_40; uint local_34; uVar6 = *(int8 *)param_1; local_68 = param_2; local_60 = param_1; local_40 = param_5; iVar2 = pthread_mutex_lock((pthread_mutex_t *)globalLock); if (iVar2 == 0) { local_b8 = uVar6; /* try { // try from 0018aaf5 to 0018ab03 has its CatchHandler @ 0018ac69 */ lVar4 = std:: _Hashtable<void*,std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>,std::allocator<std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<void*,std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>,std::allocator<std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)deviceData,(void **)&local_b8); if (lVar4 == 0) { this = (Device *)0x0; } else { this = *(Device **)(lVar4 + 0x10); } local_58 = param_3; pthread_mutex_unlock((pthread_mutex_t *)globalLock); local_a8 = 0; local_a0 = 1; local_98 = 0; uStack_90 = 0; local_88 = 0; local_70 = (ulong)param_4; uVar7 = local_70 * 0x68; local_b0 = (ScratchAllocator *)&local_b8; local_34 = param_4; /* try { // try from 0018ab54 to 0018ab5e has its CatchHandler @ 0018ac7a */ pvVar5 = (void *)ScratchAllocator::allocBytes((ScratchAllocator *)&local_b8,uVar7); local_50 = param_6; if (pvVar5 != (void *)0x0) { memcpy(pvVar5,local_40,uVar7); } if (local_34 != 0) { uVar7 = 0; local_48 = pvVar5; do { lVar4 = uVar7 * 0x68; local_78 = *(void **)((long)local_48 + lVar4 + 0x18); __n = (ulong)*(uint *)((long)local_48 + lVar4 + 0x14) * 0x30; local_80 = uVar7; /* try { // try from 0018aba8 to 0018abb2 has its CatchHandler @ 0018ac7c */ pvVar5 = (void *)ScratchAllocator::allocBytes((ScratchAllocator *)&local_b8,__n); if (pvVar5 != (void *)0x0) { memcpy(pvVar5,local_78,__n); } pvVar1 = local_48; *(void **)((long)local_48 + lVar4 + 0x18) = pvVar5; if (*(int *)((long)local_48 + lVar4 + 0x14) != 0) { lVar8 = 0; uVar7 = 0; do { /* try { // try from 0018abe9 to 0018abf3 has its CatchHandler @ 0018ac7e */ Device::overrideStage (this,(VkPipelineShaderStageCreateInfo *) (*(long *)((long)pvVar1 + lVar4 + 0x18) + lVar8), (ScratchAllocator *)&local_b8); uVar7 = uVar7 + 1; lVar8 = lVar8 + 0x30; } while (uVar7 < *(uint *)((long)pvVar1 + lVar4 + 0x14)); } uVar7 = local_80 + 1; } while (uVar7 != local_70); } /* try { // try from 0018ac22 to 0018ac3f has its CatchHandler @ 0018ac7a */ uVar3 = (**(code **)(this + 0x50)) (local_60,local_68,local_58,local_34,local_40,local_50,param_7); std:: vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> ::~vector((vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>> *)&local_98); return uVar3; } uVar6 = std::__throw_system_error(iVar2); /* catch() { ... } // from try @ 0018aaf5 with catch @ 0018ac69 */ pthread_mutex_unlock((pthread_mutex_t *)globalLock); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar6); }
277
js_proxy_getPrototypeOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_proxy_getPrototypeOf(JSContext *ctx, JSValue obj) { JSProxyData *s; JSValue method, ret, proto1; int res; s = get_proxy_method(ctx, &method, obj, JS_ATOM_getPrototypeOf); if (!s) return JS_EXCEPTION; if (JS_IsUndefined(method)) return JS_GetPrototype(ctx, s->target); ret = JS_CallFree(ctx, method, s->handler, 1, &s->target); if (JS_IsException(ret)) return ret; if (JS_VALUE_GET_TAG(ret) != JS_TAG_NULL && JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT) { goto fail; } res = JS_IsExtensible(ctx, s->target); if (res < 0) { JS_FreeValue(ctx, ret); return JS_EXCEPTION; } if (!res) { /* check invariant */ proto1 = JS_GetPrototype(ctx, s->target); if (JS_IsException(proto1)) { JS_FreeValue(ctx, ret); return JS_EXCEPTION; } if (JS_VALUE_GET_OBJ(proto1) != JS_VALUE_GET_OBJ(ret)) { JS_FreeValue(ctx, proto1); fail: JS_FreeValue(ctx, ret); return JS_ThrowTypeError(ctx, "proxy: inconsistent prototype"); } JS_FreeValue(ctx, proto1); } return ret; }
O3
c
js_proxy_getPrototypeOf: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %r15 leaq 0x10(%rsp), %rsi movl $0x60, %r8d callq 0x3e9d6 movl $0x6, %ebx testq %rax, %rax je 0x23214 movq %rax, %r13 movq 0x18(%rsp), %rdx cmpl $0x3, %edx jne 0x23179 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %r15, %rdi callq 0x230a6 movq %rax, %r14 movq %rdx, %rbx jmp 0x23217 movq 0x10(%rsp), %rsi movq 0x10(%r13), %rcx movq 0x18(%r13), %r8 movq %r13, (%rsp) movq %r15, %rdi movl $0x1, %r9d callq 0x234e7 movq %rax, %r14 movq %rdx, %r12 cmpl $0x6, %r12d je 0x231d7 cmpl $0x2, %r12d je 0x231b4 cmpl $-0x1, %r12d jne 0x23254 movq (%r13), %rsi movq 0x8(%r13), %rdx cmpl $-0x1, %edx jne 0x231e4 cmpw $0x30, 0x6(%rsi) je 0x2328d movzbl 0x5(%rsi), %eax andl $0x1, %eax testl %eax, %eax je 0x231dc movq %r12, %rbx jmp 0x23217 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %r15, %rdi callq 0x230a6 cmpl $0x6, %edx jne 0x2322b cmpl $-0x9, %r12d jb 0x23214 movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x23214 movq %r14, %rsi movq %r12, %rdx callq 0x219cc xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r13 cmpl $-0x9, %edx jb 0x2324f movq 0x18(%r15), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x2324f movq %r13, %rsi callq 0x219cc cmpq %r14, %r13 je 0x231d7 cmpl $-0x9, %r12d jb 0x23277 movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x23277 movq %r14, %rsi movq %r12, %rdx callq 0x219cc leaq 0x7ecfa(%rip), %rsi # 0xa1f78 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x22d8b jmp 0x23217 movq %r15, %rdi callq 0xf74a testl %eax, %eax jns 0x231d3 jmp 0x231f1
js_proxy_getPrototypeOf: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov rcx, rdx mov rdx, rsi mov r15, rdi lea rsi, [rsp+48h+var_38] mov r8d, 60h ; '`' call get_proxy_method mov ebx, 6 test rax, rax jz loc_23214 mov r13, rax mov rdx, [rsp+48h+var_30] cmp edx, 3 jnz short loc_23179 mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, r15 call JS_GetPrototype mov r14, rax mov rbx, rdx jmp loc_23217 loc_23179: mov rsi, [rsp+48h+var_38] mov rcx, [r13+10h] mov r8, [r13+18h] mov [rsp+48h+var_48], r13 mov rdi, r15 mov r9d, 1 call JS_CallFree mov r14, rax mov r12, rdx cmp r12d, 6 jz short loc_231D7 cmp r12d, 2 jz short loc_231B4 cmp r12d, 0FFFFFFFFh jnz loc_23254 loc_231B4: mov rsi, [r13+0] mov rdx, [r13+8] cmp edx, 0FFFFFFFFh jnz short loc_231E4 cmp word ptr [rsi+6], 30h ; '0' jz loc_2328D movzx eax, byte ptr [rsi+5] and eax, 1 loc_231D3: test eax, eax jz short loc_231DC loc_231D7: mov rbx, r12 jmp short loc_23217 loc_231DC: mov rsi, [r13+0] mov rdx, [r13+8] loc_231E4: mov rdi, r15 call JS_GetPrototype cmp edx, 6 jnz short loc_2322B loc_231F1: cmp r12d, 0FFFFFFF7h jb short loc_23214 mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_23214 mov rsi, r14 mov rdx, r12 call js_free_value_rt loc_23214: xor r14d, r14d loc_23217: mov rax, r14 mov rdx, rbx add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_2322B: mov r13, rax cmp edx, 0FFFFFFF7h jb short loc_2324F mov rdi, [r15+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_2324F mov rsi, r13 call js_free_value_rt loc_2324F: cmp r13, r14 jz short loc_231D7 loc_23254: cmp r12d, 0FFFFFFF7h jb short loc_23277 mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_23277 mov rsi, r14 mov rdx, r12 call js_free_value_rt loc_23277: lea rsi, aProxyInconsist_1; "proxy: inconsistent prototype" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_23217 loc_2328D: mov rdi, r15 call js_proxy_isExtensible test eax, eax jns loc_231D3 jmp loc_231F1
unsigned long long js_proxy_getPrototypeOf( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long *proxy_method; // rax long long *v13; // r13 _QWORD *v14; // r14 long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 unsigned int v21; // r12d long long v22; // rsi long long v23; // rdx int isExtensible; // eax _DWORD *Prototype; // rax long long v26; // rdi int v27; // eax _QWORD *v29; // r13 long long v30; // rdi int v31; // eax long long v32; // rdi int v33; // eax char v34; // [rsp+0h] [rbp-48h] long long v35; // [rsp+10h] [rbp-38h] BYREF long long v36; // [rsp+18h] [rbp-30h] proxy_method = (long long *)get_proxy_method(a1, &v35, a2, a3, 96LL); if ( !proxy_method ) return 0LL; v13 = proxy_method; if ( (_DWORD)v36 == 3 ) return JS_GetPrototype(a1, *proxy_method, proxy_method[1]); v14 = (_QWORD *)JS_CallFree(a1, v35, v36, proxy_method[2], proxy_method[3], 1, (long long)proxy_method); v21 = v15; if ( (_DWORD)v15 == 6 ) return (unsigned long long)v14; if ( (_DWORD)v15 != 2 && (_DWORD)v15 != -1 ) goto LABEL_31; v22 = *v13; v23 = v13[1]; if ( (_DWORD)v23 == -1 ) { if ( *(_WORD *)(v22 + 6) == 48 ) { isExtensible = js_proxy_isExtensible(a1, v22, v23); if ( isExtensible < 0 ) goto LABEL_14; } else { isExtensible = *(_BYTE *)(v22 + 5) & 1; } if ( isExtensible ) return (unsigned long long)v14; v22 = *v13; v23 = v13[1]; } Prototype = (_DWORD *)JS_GetPrototype(a1, v22, v23); if ( (_DWORD)v15 == 6 ) { LABEL_14: if ( v21 >= 0xFFFFFFF7 ) { v26 = *(_QWORD *)(a1 + 24); v27 = (*(_DWORD *)v14)--; if ( v27 <= 1 ) js_free_value_rt(v26, v14, v21); } return 0LL; } v29 = Prototype; if ( (unsigned int)v15 >= 0xFFFFFFF7 ) { v30 = *(_QWORD *)(a1 + 24); v31 = *Prototype; v16 = (unsigned int)(v31 - 1); *(_DWORD *)v29 = v16; if ( v31 <= 1 ) js_free_value_rt(v30, v29, v15); } if ( v29 != v14 ) { LABEL_31: if ( v21 >= 0xFFFFFFF7 ) { v32 = *(_QWORD *)(a1 + 24); v33 = *(_DWORD *)v14; v16 = (unsigned int)(*(_DWORD *)v14 - 1); *(_DWORD *)v14 = v16; if ( v33 <= 1 ) js_free_value_rt(v32, v14, v21); } v14 = 0LL; JS_ThrowTypeError( a1, (long long)"proxy: inconsistent prototype", v15, v16, v17, v18, a4, a5, a6, a7, v19, v20, a10, a11, v34); } return (unsigned long long)v14; }
js_proxy_getPrototypeOf: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RCX,RDX MOV RDX,RSI MOV R15,RDI LEA RSI,[RSP + 0x10] MOV R8D,0x60 CALL 0x0013e9d6 MOV EBX,0x6 TEST RAX,RAX JZ 0x00123214 MOV R13,RAX MOV RDX,qword ptr [RSP + 0x18] CMP EDX,0x3 JNZ 0x00123179 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,R15 CALL 0x001230a6 MOV R14,RAX MOV RBX,RDX JMP 0x00123217 LAB_00123179: MOV RSI,qword ptr [RSP + 0x10] MOV RCX,qword ptr [R13 + 0x10] MOV R8,qword ptr [R13 + 0x18] MOV qword ptr [RSP],R13 MOV RDI,R15 MOV R9D,0x1 CALL 0x001234e7 MOV R14,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x001231d7 CMP R12D,0x2 JZ 0x001231b4 CMP R12D,-0x1 JNZ 0x00123254 LAB_001231b4: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] CMP EDX,-0x1 JNZ 0x001231e4 CMP word ptr [RSI + 0x6],0x30 JZ 0x0012328d MOVZX EAX,byte ptr [RSI + 0x5] AND EAX,0x1 LAB_001231d3: TEST EAX,EAX JZ 0x001231dc LAB_001231d7: MOV RBX,R12 JMP 0x00123217 LAB_001231dc: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_001231e4: MOV RDI,R15 CALL 0x001230a6 CMP EDX,0x6 JNZ 0x0012322b LAB_001231f1: CMP R12D,-0x9 JC 0x00123214 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00123214 MOV RSI,R14 MOV RDX,R12 CALL 0x001219cc LAB_00123214: XOR R14D,R14D LAB_00123217: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0012322b: MOV R13,RAX CMP EDX,-0x9 JC 0x0012324f MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x0012324f MOV RSI,R13 CALL 0x001219cc LAB_0012324f: CMP R13,R14 JZ 0x001231d7 LAB_00123254: CMP R12D,-0x9 JC 0x00123277 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00123277 MOV RSI,R14 MOV RDX,R12 CALL 0x001219cc LAB_00123277: LEA RSI,[0x1a1f78] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x00122d8b JMP 0x00123217 LAB_0012328d: MOV RDI,R15 CALL 0x0010f74a TEST EAX,EAX JNS 0x001231d3 JMP 0x001231f1
int1 [16] js_proxy_getPrototypeOf(long param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; uint uVar3; long *plVar4; int *piVar5; int *piVar6; long lVar7; long lVar8; uint uVar9; int1 auVar10 [12]; int1 auVar11 [16]; int8 local_38; int8 local_30; plVar4 = (long *)get_proxy_method(param_1,&local_38,param_2,param_3,0x60); if (plVar4 == (long *)0x0) goto LAB_00123214; if ((int)local_30 == 3) { auVar11 = JS_GetPrototype(param_1,*plVar4,plVar4[1]); return auVar11; } auVar11 = JS_CallFree(param_1,local_38,local_30,plVar4[2],plVar4[3],1,plVar4); piVar5 = auVar11._0_8_; uVar9 = auVar11._8_4_; if (uVar9 == 6) { return auVar11; } if ((uVar9 != 2) && (uVar9 != 0xffffffff)) goto LAB_00123254; lVar8 = *plVar4; lVar7 = plVar4[1]; if ((int)lVar7 == -1) { if (*(short *)(lVar8 + 6) != 0x30) { uVar3 = *(byte *)(lVar8 + 5) & 1; LAB_001231d3: if (uVar3 != 0) { return auVar11; } lVar8 = *plVar4; lVar7 = plVar4[1]; goto LAB_001231e4; } uVar3 = js_proxy_isExtensible(param_1); if (-1 < (int)uVar3) goto LAB_001231d3; } else { LAB_001231e4: auVar10 = JS_GetPrototype(param_1,lVar8,lVar7); piVar6 = auVar10._0_8_; if (auVar10._8_4_ != 6) { if (0xfffffff6 < auVar10._8_4_) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar6; *piVar6 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,piVar6); } } if (piVar6 == piVar5) { return auVar11; } LAB_00123254: if (0xfffffff6 < uVar9) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar5; *piVar5 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,piVar5,auVar11._8_8_); } } JS_ThrowTypeError(param_1,"proxy: inconsistent prototype"); return ZEXT816(6) << 0x40; } } if (0xfffffff6 < uVar9) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar5; *piVar5 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,piVar5,auVar11._8_8_); } } LAB_00123214: return ZEXT816(6) << 0x40; }
278
aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long)
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/util/buffer_array_allocator.h
static bool Reserve(aimrt_buffer_array_t* buffer_array, size_t new_cap) { aimrt_buffer_t* cur_data = buffer_array->data; buffer_array->data = new aimrt_buffer_t[new_cap]; buffer_array->capacity = new_cap; if (cur_data) { memcpy(buffer_array->data, cur_data, buffer_array->len * sizeof(aimrt_buffer_t)); delete[] cur_data; } return true; }
O3
c
aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rbx movq %rsi, %rax shrq $0x3c, %rax movq %rsi, %rcx shlq $0x4, %rcx xorl %edi, %edi negq %rax sbbq %rdi, %rdi orq %rcx, %rdi callq 0x1e070 movq %rax, (%r14) movq %r15, 0x10(%r14) testq %rbx, %rbx je 0x3d3c5 movq 0x8(%r14), %rdx shlq $0x4, %rdx movq %rax, %rdi movq %rbx, %rsi callq 0x1edd0 movq %rbx, %rdi callq 0x1f660 movb $0x1, %al popq %rbx popq %r14 popq %r15 retq nop
_ZN5aimrt4util26SimpleBufferArrayAllocator7ReserveEP20aimrt_buffer_array_tm: push r15 push r14 push rbx mov r15, rsi mov r14, rdi mov rbx, [rdi] mov rax, rsi shr rax, 3Ch mov rcx, rsi shl rcx, 4 xor edi, edi neg rax sbb rdi, rdi or rdi, rcx; unsigned __int64 call __Znam; operator new[](ulong) mov [r14], rax mov [r14+10h], r15 test rbx, rbx jz short loc_3D3C5 mov rdx, [r14+8] shl rdx, 4 mov rdi, rax mov rsi, rbx call _memcpy mov rdi, rbx; void * call __ZdaPv; operator delete[](void *) loc_3D3C5: mov al, 1 pop rbx pop r14 pop r15 retn
char aimrt::util::SimpleBufferArrayAllocator::Reserve(long long a1, long long a2) { void *v2; // rbx long long v3; // rax v2 = *(void **)a1; v3 = operator new[](16 * a2); *(_QWORD *)a1 = v3; *(_QWORD *)(a1 + 16) = a2; if ( v2 ) { memcpy(v3); operator delete[](v2); } return 1; }
Reserve: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] MOV RAX,RSI SHR RAX,0x3c MOV RCX,RSI SHL RCX,0x4 XOR EDI,EDI NEG RAX SBB RDI,RDI OR RDI,RCX CALL 0x0011e070 MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x10],R15 TEST RBX,RBX JZ 0x0013d3c5 MOV RDX,qword ptr [R14 + 0x8] SHL RDX,0x4 MOV RDI,RAX MOV RSI,RBX CALL 0x0011edd0 MOV RDI,RBX CALL 0x0011f660 LAB_0013d3c5: MOV AL,0x1 POP RBX POP R14 POP R15 RET
/* aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long) */ int8 aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t *param_1,ulong param_2) { void *__src; void *__dest; __src = *(void **)param_1; __dest = operator_new__(-(ulong)(param_2 >> 0x3c != 0) | param_2 << 4); *(void **)param_1 = __dest; *(ulong *)(param_1 + 0x10) = param_2; if (__src != (void *)0x0) { memcpy(__dest,__src,*(long *)(param_1 + 8) << 4); operator_delete__(__src); } return 1; }
279
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O3
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x8(%rdi), %r13 testq %r13, %r13 je 0xf82db leaq 0xf(%rsp), %r12 xorl %r14d, %r14d leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %ecx, %ecx movq (%rbx), %rax movb (%rax,%rcx), %dl cmpb $0x5c, %dl jne 0xf81fa leaq 0x1(%rcx), %rbp cmpq %r13, %rbp jae 0xf81fa movzbl (%rax,%rbp), %edx cmpl $0x6d, %edx jle 0xf8214 cmpl $0x73, %edx jg 0xf8235 cmpl $0x6e, %edx je 0xf82a4 cmpl $0x72, %edx jne 0xf8284 movb $0xd, (%rax,%r14) jmp 0xf82b7 movb %dl, (%rax,%r14) incq %r14 movq %rcx, %rbp incq %rbp movq %rbp, %rcx cmpq %r13, %rbp jb 0xf81bc jmp 0xf82de cmpl $0x22, %edx je 0xf829d cmpl $0x27, %edx je 0xf82b2 cmpl $0x5c, %edx jne 0xf8284 movb $0x5c, (%rax,%r14) jmp 0xf82b7 cmpl $0x74, %edx je 0xf82ab cmpl $0x78, %edx jne 0xf8284 leaq 0x3(%rcx), %r15 cmpq %r13, %r15 jae 0xf8284 movb 0x2(%rax,%rcx), %dl movb %dl, 0xd(%rsp) movb 0x3(%rax,%rcx), %al movb %al, 0xe(%rsp) movb $0x0, 0xf(%rsp) movq $0x0, 0x10(%rsp) movl $0x10, %edx callq 0x21ea0 cmpq %r12, 0x10(%rsp) je 0xf82bf movq (%rbx), %rax leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi movb $0x5c, (%rax,%r14) movq (%rbx), %rax movb (%rax,%rbp), %cl movb %cl, 0x1(%rax,%r14) addq $0x2, %r14 jmp 0xf8204 movb $0x22, (%rax,%r14) jmp 0xf82b7 movb $0xa, (%rax,%r14) jmp 0xf82b7 movb $0x9, (%rax,%r14) jmp 0xf82b7 movb $0x27, (%rax,%r14) incq %r14 jmp 0xf8204 movq (%rbx), %rcx movb %al, (%rcx,%r14) incq %r14 movq %r15, %rbp leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi jmp 0xf8204 xorl %r14d, %r14d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x21b70 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13, [rdi+8] test r13, r13 jz loc_F82DB lea r12, [rsp+48h+var_39] xor r14d, r14d lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] xor ecx, ecx loc_F81BC: mov rax, [rbx] mov dl, [rax+rcx] cmp dl, 5Ch ; '\' jnz short loc_F81FA lea rbp, [rcx+1] cmp rbp, r13 jnb short loc_F81FA movzx edx, byte ptr [rax+rbp] cmp edx, 6Dh ; 'm' jle short loc_F8214 cmp edx, 73h ; 's' jg short loc_F8235 cmp edx, 6Eh ; 'n' jz loc_F82A4 cmp edx, 72h ; 'r' jnz loc_F8284 mov byte ptr [rax+r14], 0Dh jmp loc_F82B7 loc_F81FA: mov [rax+r14], dl inc r14 mov rbp, rcx loc_F8204: inc rbp mov rcx, rbp cmp rbp, r13 jb short loc_F81BC jmp loc_F82DE loc_F8214: cmp edx, 22h ; '"' jz loc_F829D cmp edx, 27h ; ''' jz loc_F82B2 cmp edx, 5Ch ; '\' jnz short loc_F8284 mov byte ptr [rax+r14], 5Ch ; '\' jmp loc_F82B7 loc_F8235: cmp edx, 74h ; 't' jz short loc_F82AB cmp edx, 78h ; 'x' jnz short loc_F8284 lea r15, [rcx+3] cmp r15, r13 jnb short loc_F8284 mov dl, [rax+rcx+2] mov [rsp+48h+var_3B], dl mov al, [rax+rcx+3] mov [rsp+48h+var_3A], al mov [rsp+48h+var_39], 0 mov [rsp+48h+var_38], 0 mov edx, 10h call _strtol cmp [rsp+48h+var_38], r12 jz short loc_F82BF mov rax, [rbx] lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] loc_F8284: mov byte ptr [rax+r14], 5Ch ; '\' mov rax, [rbx] mov cl, [rax+rbp] mov [rax+r14+1], cl add r14, 2 jmp loc_F8204 loc_F829D: mov byte ptr [rax+r14], 22h ; '"' jmp short loc_F82B7 loc_F82A4: mov byte ptr [rax+r14], 0Ah jmp short loc_F82B7 loc_F82AB: mov byte ptr [rax+r14], 9 jmp short loc_F82B7 loc_F82B2: mov byte ptr [rax+r14], 27h ; ''' loc_F82B7: inc r14 jmp loc_F8204 loc_F82BF: mov rcx, [rbx] mov [rcx+r14], al inc r14 mov rbp, r15 lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] jmp loc_F8204 loc_F82DB: xor r14d, r14d loc_F82DE: mov rdi, rbx mov rsi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_process_escapes(long long *a1) { unsigned long long v1; // r13 long long v2; // r14 long long v3; // rcx long long v4; // rax char v5; // dl long long v6; // rbp unsigned int v7; // edx long long v8; // r15 char v9; // al _BYTE v11[2]; // [rsp+Dh] [rbp-3Bh] BYREF char v12; // [rsp+Fh] [rbp-39h] BYREF char *v13; // [rsp+10h] [rbp-38h] BYREF v1 = a1[1]; if ( v1 ) { v2 = 0LL; v3 = 0LL; while ( 1 ) { v4 = *a1; v5 = *(_BYTE *)(*a1 + v3); if ( v5 == 92 && (v6 = v3 + 1, v3 + 1 < v1) ) { v7 = *(unsigned __int8 *)(v4 + v6); if ( v7 <= 0x6D ) { switch ( v7 ) { case '"': *(_BYTE *)(v4 + v2) = 34; goto LABEL_27; case '\'': *(_BYTE *)(v4 + v2) = 39; goto LABEL_27; case '\\': *(_BYTE *)(v4 + v2) = 92; goto LABEL_27; } } else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u ) { if ( v7 == 116 ) { *(_BYTE *)(v4 + v2) = 9; goto LABEL_27; } if ( v7 == 120 ) { v8 = v3 + 3; if ( v3 + 3 < v1 ) { v11[0] = *(_BYTE *)(v4 + v3 + 2); v11[1] = *(_BYTE *)(v4 + v3 + 3); v12 = 0; v13 = 0LL; v9 = strtol(v11, &v13, 16LL); if ( v13 == &v12 ) { *(_BYTE *)(*a1 + v2++) = v9; v6 = v8; goto LABEL_11; } v4 = *a1; } } } else { if ( v7 == 110 ) { *(_BYTE *)(v4 + v2) = 10; goto LABEL_27; } if ( v7 == 114 ) { *(_BYTE *)(v4 + v2) = 13; LABEL_27: ++v2; goto LABEL_11; } } *(_BYTE *)(v4 + v2) = 92; *(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6); v2 += 2LL; } else { *(_BYTE *)(v4 + v2++) = v5; v6 = v3; } LABEL_11: v3 = v6 + 1; if ( v6 + 1 >= v1 ) return std::string::resize(a1, v2, 0LL); } } v2 = 0LL; return std::string::resize(a1, v2, 0LL); }
string_process_escapes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x8] TEST R13,R13 JZ 0x001f82db LEA R12,[RSP + 0xf] XOR R14D,R14D LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] XOR ECX,ECX LAB_001f81bc: MOV RAX,qword ptr [RBX] MOV DL,byte ptr [RAX + RCX*0x1] CMP DL,0x5c JNZ 0x001f81fa LEA RBP,[RCX + 0x1] CMP RBP,R13 JNC 0x001f81fa MOVZX EDX,byte ptr [RAX + RBP*0x1] CMP EDX,0x6d JLE 0x001f8214 CMP EDX,0x73 JG 0x001f8235 CMP EDX,0x6e JZ 0x001f82a4 CMP EDX,0x72 JNZ 0x001f8284 MOV byte ptr [RAX + R14*0x1],0xd JMP 0x001f82b7 LAB_001f81fa: MOV byte ptr [RAX + R14*0x1],DL INC R14 MOV RBP,RCX LAB_001f8204: INC RBP MOV RCX,RBP CMP RBP,R13 JC 0x001f81bc JMP 0x001f82de LAB_001f8214: CMP EDX,0x22 JZ 0x001f829d CMP EDX,0x27 JZ 0x001f82b2 CMP EDX,0x5c JNZ 0x001f8284 MOV byte ptr [RAX + R14*0x1],0x5c JMP 0x001f82b7 LAB_001f8235: CMP EDX,0x74 JZ 0x001f82ab CMP EDX,0x78 JNZ 0x001f8284 LEA R15,[RCX + 0x3] CMP R15,R13 JNC 0x001f8284 MOV DL,byte ptr [RAX + RCX*0x1 + 0x2] MOV byte ptr [RSP + 0xd],DL MOV AL,byte ptr [RAX + RCX*0x1 + 0x3] MOV byte ptr [RSP + 0xe],AL MOV byte ptr [RSP + 0xf],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x10 CALL 0x00121ea0 CMP qword ptr [RSP + 0x10],R12 JZ 0x001f82bf MOV RAX,qword ptr [RBX] LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] LAB_001f8284: MOV byte ptr [RAX + R14*0x1],0x5c MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX + RBP*0x1] MOV byte ptr [RAX + R14*0x1 + 0x1],CL ADD R14,0x2 JMP 0x001f8204 LAB_001f829d: MOV byte ptr [RAX + R14*0x1],0x22 JMP 0x001f82b7 LAB_001f82a4: MOV byte ptr [RAX + R14*0x1],0xa JMP 0x001f82b7 LAB_001f82ab: MOV byte ptr [RAX + R14*0x1],0x9 JMP 0x001f82b7 LAB_001f82b2: MOV byte ptr [RAX + R14*0x1],0x27 LAB_001f82b7: INC R14 JMP 0x001f8204 LAB_001f82bf: MOV RCX,qword ptr [RBX] MOV byte ptr [RCX + R14*0x1],AL INC R14 MOV RBP,R15 LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] JMP 0x001f8204 LAB_001f82db: XOR R14D,R14D LAB_001f82de: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00121b70 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { ulong uVar1; byte bVar2; ulong uVar3; long lVar4; ulong uVar5; long lVar6; char local_3b; int1 local_3a; char local_39; char *local_38; uVar3 = *(ulong *)(param_1 + 8); if (uVar3 == 0) { lVar6 = 0; } else { lVar6 = 0; uVar5 = 0; do { lVar4 = *(long *)param_1; if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) { bVar2 = *(byte *)(lVar4 + uVar1); if (bVar2 < 0x6e) { if (bVar2 == 0x22) { *(int1 *)(lVar4 + lVar6) = 0x22; } else if (bVar2 == 0x27) { *(int1 *)(lVar4 + lVar6) = 0x27; } else { if (bVar2 != 0x5c) goto LAB_001f8284; *(int1 *)(lVar4 + lVar6) = 0x5c; } } else if (bVar2 < 0x74) { if (bVar2 == 0x6e) { *(int1 *)(lVar4 + lVar6) = 10; } else { if (bVar2 != 0x72) goto LAB_001f8284; *(int1 *)(lVar4 + lVar6) = 0xd; } } else { if (bVar2 != 0x74) { if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) { local_3b = *(char *)(lVar4 + 2 + uVar5); local_3a = *(int1 *)(lVar4 + 3 + uVar5); local_39 = '\0'; local_38 = (char *)0x0; lVar4 = strtol(&local_3b,&local_38,0x10); if (local_38 == &local_39) { *(char *)(*(long *)param_1 + lVar6) = (char)lVar4; lVar6 = lVar6 + 1; uVar5 = uVar5 + 3; goto LAB_001f8204; } lVar4 = *(long *)param_1; } LAB_001f8284: *(int1 *)(lVar4 + lVar6) = 0x5c; *(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar1); lVar6 = lVar6 + 2; uVar5 = uVar1; goto LAB_001f8204; } *(int1 *)(lVar4 + lVar6) = 9; } lVar6 = lVar6 + 1; uVar5 = uVar1; } else { *(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5); lVar6 = lVar6 + 1; } LAB_001f8204: uVar5 = uVar5 + 1; } while (uVar5 < uVar3); } std::__cxx11::string::resize((ulong)param_1,(char)lVar6); return; }
280
ma_scan_end_block_record
eloqsql/storage/maria/ma_blockrec.c
void _ma_scan_end_block_record(MARIA_HA *info) { DBUG_ENTER("_ma_scan_end_block_record"); my_free(info->scan.bitmap_buff); info->scan.bitmap_buff= 0; if (info->scan_save) { my_free(info->scan_save); info->scan_save= 0; } DBUG_VOID_RETURN; }
O3
c
ma_scan_end_block_record: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x220(%rdi), %rdi callq 0xa600e movq $0x0, 0x220(%rbx) movq 0x280(%rbx), %rdi testq %rdi, %rdi je 0x4ba5f callq 0xa600e movq $0x0, 0x280(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_ma_scan_end_block_record: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+220h] call my_free mov qword ptr [rbx+220h], 0 mov rdi, [rbx+280h] test rdi, rdi jz short loc_4BA5F call my_free mov qword ptr [rbx+280h], 0 loc_4BA5F: add rsp, 8 pop rbx pop rbp retn
long long ma_scan_end_block_record(long long a1) { long long result; // rax long long v3; // rdi result = my_free(*(_QWORD *)(a1 + 544)); *(_QWORD *)(a1 + 544) = 0LL; v3 = *(_QWORD *)(a1 + 640); if ( v3 ) { result = my_free(v3); *(_QWORD *)(a1 + 640) = 0LL; } return result; }
_ma_scan_end_block_record: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x220] CALL 0x001a600e MOV qword ptr [RBX + 0x220],0x0 MOV RDI,qword ptr [RBX + 0x280] TEST RDI,RDI JZ 0x0014ba5f CALL 0x001a600e MOV qword ptr [RBX + 0x280],0x0 LAB_0014ba5f: ADD RSP,0x8 POP RBX POP RBP RET
void _ma_scan_end_block_record(long param_1) { my_free(*(int8 *)(param_1 + 0x220)); *(int8 *)(param_1 + 0x220) = 0; if (*(long *)(param_1 + 0x280) != 0) { my_free(); *(int8 *)(param_1 + 0x280) = 0; } return; }
281
mysql_stmt_send_long_data_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_send_long_data_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_send_long_data, (parms->stmt, parms->param_number, parms->data, parms->length), parms->stmt->mysql, my_bool, r_my_bool) }
O0
c
mysql_stmt_send_long_data_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx callq 0x46c50 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nop
mysql_stmt_send_long_data_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] mov rax, [rbp+var_10] mov rcx, [rax+18h] call mysql_stmt_send_long_data mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_stmt_send_long_data_start_internal(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 56LL) + 1152LL) + 40LL); *(_BYTE *)(v2 + 8) = mysql_stmt_send_long_data( *(_QWORD *)a1, *(_DWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_stmt_send_long_data_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] CALL 0x00146c50 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_send_long_data_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_send_long_data(*param_1,(int)param_1[1],param_1[2],param_1[3]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
282
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O3
c
my_register_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rsi, %r15 testl %edi, %edi js 0x2b6ed movl %edi, %ebx leaq 0x33aa65(%rip), %rax # 0x3660f4 lock incl (%rax) testl $0x2004, %r14d # imm = 0x2004 jne 0x2b73c leaq 0x2c3cba(%rip), %rax # 0x2ef360 cmpl %ebx, (%rax) jbe 0x2b73c movl %edx, %r13d leaq 0x33af6c(%rip), %rax # 0x366624 movl (%rax), %edi movq %r15, %rsi movq %r14, %rdx callq 0x2b50c leaq 0x2c3c9c(%rip), %rcx # 0x2ef368 movq (%rcx), %rdx movl %ebx, %esi shlq $0x4, %rsi movq %rax, (%rdx,%rsi) leaq 0x33aa00(%rip), %rax # 0x3660e0 incq (%rax) movq (%rcx), %rax movl %r13d, 0x8(%rax,%rsi) jmp 0x2b73c movl %ecx, %r12d callq 0x24060 movl (%rax), %ebx callq 0x2696e movl %ebx, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb $0x19, %r14b je 0x2b73c callq 0x2696e cmpl $0x18, (%rax) movl $0x17, %eax cmovel %eax, %r12d andl $0x440, %r14d # imm = 0x440 orq $0x4, %r14 callq 0x2696e movl (%rax), %ecx movl %r12d, %edi movq %r14, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x2a83f movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_register_filename: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rsi test edi, edi js short loc_2B6ED mov ebx, edi lea rax, my_file_opened lock inc dword ptr [rax] test r14d, 2004h jnz loc_2B73C lea rax, my_file_limit cmp [rax], ebx jbe loc_2B73C mov r13d, edx lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, r15 mov rdx, r14 call my_strdup lea rcx, my_file_info mov rdx, [rcx] mov esi, ebx shl rsi, 4 mov [rdx+rsi], rax lea rax, my_file_total_opened inc qword ptr [rax] mov rax, [rcx] mov [rax+rsi+8], r13d jmp short loc_2B73C loc_2B6ED: mov r12d, ecx call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx mov ebx, 0FFFFFFFFh test r14b, 19h jz short loc_2B73C call _my_thread_var cmp dword ptr [rax], 18h mov eax, 17h cmovz r12d, eax and r14d, 440h or r14, 4 call _my_thread_var mov ecx, [rax] mov edi, r12d mov rsi, r14 mov rdx, r15 xor eax, eax call my_error loc_2B73C: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_register_filename(long long a1, long long a2, int a3, unsigned int a4, __int16 a5) { unsigned int v6; // ebx long long v8; // rax long long v9; // rsi int v11; // ebx unsigned int *v12; // rax if ( (int)a1 < 0 ) { v11 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v11; v6 = -1; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var() == 24 ) a4 = 23; v12 = (unsigned int *)my_thread_var(); my_error(a4, a5 & 0x440 | 4, a2, *v12); } } else { v6 = a1; _InterlockedIncrement(my_file_opened); if ( (a5 & 0x2004) == 0 && my_file_limit > (unsigned int)a1 ) { v8 = my_strdup(key_memory_my_file_info, a2, a5); v9 = 16LL * (unsigned int)a1; *(_QWORD *)((char *)my_file_info + v9) = v8; ++my_file_total_opened; *(_DWORD *)((char *)my_file_info + v9 + 8) = a3; } } return v6; }
my_register_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RSI TEST EDI,EDI JS 0x0012b6ed MOV EBX,EDI LEA RAX,[0x4660f4] INC.LOCK dword ptr [RAX] TEST R14D,0x2004 JNZ 0x0012b73c LEA RAX,[0x3ef360] CMP dword ptr [RAX],EBX JBE 0x0012b73c MOV R13D,EDX LEA RAX,[0x466624] MOV EDI,dword ptr [RAX] MOV RSI,R15 MOV RDX,R14 CALL 0x0012b50c LEA RCX,[0x3ef368] MOV RDX,qword ptr [RCX] MOV ESI,EBX SHL RSI,0x4 MOV qword ptr [RDX + RSI*0x1],RAX LEA RAX,[0x4660e0] INC qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV dword ptr [RAX + RSI*0x1 + 0x8],R13D JMP 0x0012b73c LAB_0012b6ed: MOV R12D,ECX CALL 0x00124060 MOV EBX,dword ptr [RAX] CALL 0x0012696e MOV dword ptr [RAX],EBX MOV EBX,0xffffffff TEST R14B,0x19 JZ 0x0012b73c CALL 0x0012696e CMP dword ptr [RAX],0x18 MOV EAX,0x17 CMOVZ R12D,EAX AND R14D,0x440 OR R14,0x4 CALL 0x0012696e MOV ECX,dword ptr [RAX] MOV EDI,R12D MOV RSI,R14 MOV RDX,R15 XOR EAX,EAX CALL 0x0012a83f LAB_0012b73c: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; param_1 = 0xffffffff; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); if (*piVar3 == 0x18) { param_4 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(param_4,(uint)param_5 & 0x440 | 4,param_2,*puVar4); } } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); if (((param_5 & 0x2004) == 0) && (param_1 < my_file_limit)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (ulong)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (ulong)param_1 * 0x10 + 8) = param_3; } } return param_1; }
283
google::protobuf::compiler::cpp::RepeatedMessageFieldGenerator::GenerateByteSize(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/message_field.cc
void RepeatedMessageFieldGenerator::GenerateByteSize( io::Printer* printer) const { GOOGLE_CHECK(!IsFieldStripped(descriptor_, options_)); Formatter format(printer, variables_); format( "total_size += $tag_size$UL * this->_internal_$name$_size();\n" "for (const auto& msg : this->$field$) {\n" " total_size +=\n" " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(msg);\n" "}\n"); }
O0
cpp
google::protobuf::compiler::cpp::RepeatedMessageFieldGenerator::GenerateByteSize(google::protobuf::io::Printer*) const: subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x8(%rax), %rdi movq 0x10(%rax), %rsi callq 0x10d3e0 movb $0x0, 0x6f(%rsp) testb $0x1, %al jne 0x18e5bc jmp 0x18e60c leaq 0x24a3d0(%rip), %rdx # 0x3d8993 leaq 0x70(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x39e, %ecx # imm = 0x39E callq 0x219560 movq 0x8(%rsp), %rdi movb $0x1, 0x6f(%rsp) leaq 0x248e6a(%rip), %rsi # 0x3d7457 callq 0x218e20 movq %rax, 0x10(%rsp) jmp 0x18e5f9 movq 0x10(%rsp), %rsi leaq 0x5b(%rsp), %rdi callq 0x218fd0 jmp 0x18e60a jmp 0x18e60c testb $0x1, 0x6f(%rsp) jne 0x18e615 jmp 0x18e61f leaq 0x70(%rsp), %rdi callq 0x2195a0 movq 0x18(%rsp), %rdx movq 0xa8(%rsp), %rsi addq $0x18, %rdx leaq 0x20(%rsp), %rdi movq %rdi, (%rsp) callq 0xdf0d0 movq (%rsp), %rdi leaq 0x24bfeb(%rip), %rsi # 0x3da634 callq 0x5ae90 jmp 0x18e650 leaq 0x20(%rsp), %rdi callq 0xdf130 addq $0xb8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) testb $0x1, 0x6f(%rsp) jne 0x18e679 jmp 0x18e683 leaq 0x70(%rsp), %rdi callq 0x2195a0 jmp 0x18e69d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x20(%rsp), %rdi callq 0xdf130 movq 0x60(%rsp), %rdi callq 0x21700 nopw (%rax,%rax)
_ZNK6google8protobuf8compiler3cpp29RepeatedMessageFieldGenerator16GenerateByteSizeEPNS0_2io7PrinterE: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov rax, [rsp+0B8h+var_8] mov [rsp+0B8h+var_A0], rax mov rdi, [rax+8] mov rsi, [rax+10h] call _ZN6google8protobuf8compiler3cpp15IsFieldStrippedEPKNS0_15FieldDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::IsFieldStripped(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::cpp::Options const&) mov [rsp+0B8h+var_49], 0 test al, 1 jnz short loc_18E5BC jmp short loc_18E60C loc_18E5BC: lea rdx, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0B8h+var_48] mov [rsp+0B8h+var_B0], rdi mov esi, 3 mov ecx, 39Eh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_49], 1 lea rsi, aCheckFailedIsf_0; "CHECK failed: !IsFieldStripped(descript"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_18E5F9: mov rsi, [rsp+0B8h+var_A8] lea rdi, [rsp+0B8h+var_5D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_18E60A: jmp short $+2 loc_18E60C: test [rsp+0B8h+var_49], 1 jnz short loc_18E615 jmp short loc_18E61F loc_18E615: lea rdi, [rsp+0B8h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_18E61F: mov rdx, [rsp+0B8h+var_A0] mov rsi, [rsp+0B8h+var_10] add rdx, 18h lea rdi, [rsp+0B8h+var_98] mov [rsp+0B8h+var_B8], rdi call _ZN6google8protobuf8compiler3cpp9FormatterC2EPNS0_2io7PrinterERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEE; google::protobuf::compiler::cpp::Formatter::Formatter(google::protobuf::io::Printer *,std::map<std::string,std::string> const&) mov rdi, [rsp+0B8h+var_B8] lea rsi, aTotalSizeTagSi_1; "total_size += $tag_size$UL * this->_int"... call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ jmp short $+2 loc_18E650: lea rdi, [rsp+0B8h+var_98]; this call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter() add rsp, 0B8h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax test [rsp+arg_67], 1 jnz short loc_18E679 jmp short loc_18E683 loc_18E679: lea rdi, [rsp+arg_68]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_18E683: jmp short loc_18E69D mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_18]; this call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter() loc_18E69D: mov rdi, [rsp+arg_58] call __Unwind_Resume
void google::protobuf::compiler::cpp::RepeatedMessageFieldGenerator::GenerateByteSize( google::protobuf::compiler::cpp **this, google::protobuf::io::Printer *a2, const google::protobuf::compiler::cpp::Options *a3) { char IsFieldStripped; // al long long v4; // rcx long long v5; // r8 long long v6; // r9 int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // [rsp+10h] [rbp-A8h] _QWORD v12[7]; // [rsp+20h] [rbp-98h] BYREF _BYTE v13[20]; // [rsp+5Bh] [rbp-5Dh] BYREF char v14; // [rsp+6Fh] [rbp-49h] _BYTE v15[56]; // [rsp+70h] [rbp-48h] BYREF google::protobuf::io::Printer *v16; // [rsp+A8h] [rbp-10h] google::protobuf::compiler::cpp **v17; // [rsp+B0h] [rbp-8h] v17 = this; v16 = a2; IsFieldStripped = google::protobuf::compiler::cpp::IsFieldStripped(this[1], this[2], a3); v14 = 0; if ( (IsFieldStripped & 1) != 0 ) { google::protobuf::internal::LogMessage::LogMessage( v15, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/message_field.cc", 926LL); v14 = 1; v11 = google::protobuf::internal::LogMessage::operator<<( v15, "CHECK failed: !IsFieldStripped(descriptor_, options_): "); google::protobuf::internal::LogFinisher::operator=(v13, v11); } if ( (v14 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v15); google::protobuf::compiler::cpp::Formatter::Formatter(v12, (long long)v16, (long long)(this + 3), v4, v5, v6); google::protobuf::compiler::cpp::Formatter::operator()<>( (unsigned int)v12, (unsigned int)"total_size += $tag_size$UL * this->_internal_$name$_size();\n" "for (const auto& msg : this->$field$) {\n" " total_size +=\n" " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(msg);\n" "}\n", v7, v8, v9, v10); google::protobuf::compiler::cpp::Formatter::~Formatter((google::protobuf::compiler::cpp::Formatter *)v12); }
EnsureSpace: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RCX] JC 0x0018e5b8 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x002ecd60 MOV qword ptr [RSP + 0x20],RAX JMP 0x0018e5c2 LAB_0018e5b8: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX LAB_0018e5c2: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* google::protobuf::io::EpsCopyOutputStream::EnsureSpace(unsigned char*) */ uchar * __thiscall google::protobuf::io::EpsCopyOutputStream::EnsureSpace(EpsCopyOutputStream *this,uchar *param_1) { uchar *local_8; local_8 = param_1; if (*(uchar **)this <= param_1) { local_8 = (uchar *)EnsureSpaceFallback(this,param_1); } return local_8; }
284
get_key_cache_statistics
eloqsql/mysys/mf_keycache.c
void get_key_cache_statistics(KEY_CACHE *keycache, uint partition_no, KEY_CACHE_STATISTICS *key_cache_stats) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->get_stats(keycache->keycache_cb, partition_no, key_cache_stats); pthread_mutex_unlock(&keycache->op_lock); } }
O0
c
get_key_cache_statistics: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0x73404 movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x284e0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x48(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx callq *%rax movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x28260 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_key_cache_statistics: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_8] cmp byte ptr [rax+48h], 0 jz short loc_73404 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+48h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] call rax mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_73404: add rsp, 20h pop rbp retn
long long get_key_cache_statistics(long long a1, unsigned int a2, long long a3) { long long result; // rax result = a1; if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, long long))(*(_QWORD *)(a1 + 16) + 72LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
get_key_cache_statistics: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48],0x0 JZ 0x00173404 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x001284e0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] CALL RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x00128260 LAB_00173404: ADD RSP,0x20 POP RBP RET
void get_key_cache_statistics(long param_1,int4 param_2,int8 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x48))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } return; }
285
list_delete
eloqsql/libmariadb/libmariadb/ma_list.c
LIST *list_delete(LIST *root, LIST *element) { if (element->prev) element->prev->next=element->next; else root=element->next; if (element->next) element->next->prev=element->prev; return root; }
O0
c
list_delete: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0xab40b movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) jmp 0xab417 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xab434 movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
list_delete: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_AB40B mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx jmp short loc_AB417 loc_AB40B: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_8], rax loc_AB417: mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_AB434 mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax], rcx loc_AB434: mov rax, [rbp+var_8] pop rbp retn
long long list_delete(long long a1, _QWORD *a2) { if ( *a2 ) *(_QWORD *)(*a2 + 8LL) = a2[1]; else a1 = a2[1]; if ( a2[1] ) *(_QWORD *)a2[1] = *a2; return a1; }
list_delete: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x001ab40b MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX JMP 0x001ab417 LAB_001ab40b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX LAB_001ab417: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001ab434 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RCX LAB_001ab434: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long list_delete(long param_1,long *param_2) { long local_10; if (*param_2 == 0) { local_10 = param_2[1]; } else { *(long *)(*param_2 + 8) = param_2[1]; local_10 = param_1; } if (param_2[1] != 0) { *(long *)param_2[1] = *param_2; } return local_10; }
286
pfs_spawn_thread
eloqsql/storage/perfschema/pfs.cc
void* pfs_spawn_thread(void *arg) { PFS_spawn_thread_arg *typed_arg= (PFS_spawn_thread_arg*) arg; void *user_arg; void *(*user_start_routine)(void*); PFS_thread *pfs; /* First, attach instrumentation to this newly created pthread. */ PFS_thread_class *klass= find_thread_class(typed_arg->m_child_key); if (likely(klass != NULL)) { pfs= create_thread(klass, typed_arg->m_child_identity, 0); if (likely(pfs != NULL)) { clear_thread_account(pfs); pfs->m_parent_thread_internal_id= typed_arg->m_thread_internal_id; memcpy(pfs->m_username, typed_arg->m_username, sizeof(pfs->m_username)); pfs->m_username_length= typed_arg->m_username_length; memcpy(pfs->m_hostname, typed_arg->m_hostname, sizeof(pfs->m_hostname)); pfs->m_hostname_length= typed_arg->m_hostname_length; set_thread_account(pfs); } } else { pfs= NULL; } my_thread_set_THR_PFS(pfs); /* Secondly, free the memory allocated in spawn_thread_v1(). It is preferable to do this before invoking the user routine, to avoid memory leaks at shutdown, in case the server exits without waiting for this thread. */ user_start_routine= typed_arg->m_user_start_routine; user_arg= typed_arg->m_user_arg; my_free(typed_arg); /* Then, execute the user code for this thread. */ (*user_start_routine)(user_arg); return NULL; }
O3
cpp
pfs_spawn_thread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x290(%rdi), %edi callq 0x35a9e testq %rax, %rax je 0x28576 movq 0x298(%rbx), %rsi xorl %r15d, %r15d movq %rax, %rdi xorl %edx, %edx callq 0x2fa63 testq %rax, %rax je 0x2853f movq %rax, %r14 movq %rax, %rdi callq 0x32085 movq (%rbx), %rax movq %rax, 0x858(%r14) leaq 0xcdc(%r14), %rdi leaq 0x8(%rbx), %rsi movl $0x180, %edx # imm = 0x180 callq 0x26290 movl 0x188(%rbx), %eax movl %eax, 0xe5c(%r14) movq %r14, %rdi addq $0xe60, %rdi # imm = 0xE60 leaq 0x18c(%rbx), %rsi movl $0xff, %edx callq 0x26290 movl 0x28c(%rbx), %eax movl %eax, 0xf60(%r14) movq %r14, %rdi callq 0x2fc2a movq %r14, %r15 movl 0x3a7d27(%rip), %edi # 0x3d026c movq %r15, %rsi callq 0x260c0 movq 0x2a0(%rbx), %r15 movq 0x2a8(%rbx), %r14 movq %rbx, %rdi callq 0x45546 movq %r14, %rdi callq *%r15 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %r15d, %r15d jmp 0x2853f
pfs_spawn_thread: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov edi, [rdi+290h]; unsigned int call _Z17find_thread_classj; find_thread_class(uint) test rax, rax jz loc_28576 mov rsi, [rbx+298h] xor r15d, r15d mov rdi, rax xor edx, edx call _Z13create_threadP16PFS_thread_classPKvy; create_thread(PFS_thread_class *,void const*,ulong long) test rax, rax jz short loc_2853F mov r14, rax mov rdi, rax; PFS_thread * call _Z20clear_thread_accountP10PFS_thread; clear_thread_account(PFS_thread *) mov rax, [rbx] mov [r14+858h], rax lea rdi, [r14+0CDCh] lea rsi, [rbx+8] mov edx, 180h call _memcpy mov eax, [rbx+188h] mov [r14+0E5Ch], eax mov rdi, r14 add rdi, 0E60h lea rsi, [rbx+18Ch] mov edx, 0FFh call _memcpy mov eax, [rbx+28Ch] mov [r14+0F60h], eax mov rdi, r14; PFS_thread * call _Z18set_thread_accountP10PFS_thread; set_thread_account(PFS_thread *) mov r15, r14 loc_2853F: mov edi, cs:THR_PFS mov rsi, r15 call _pthread_setspecific mov r15, [rbx+2A0h] mov r14, [rbx+2A8h] mov rdi, rbx call my_free mov rdi, r14 call r15 xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_28576: xor r15d, r15d jmp short loc_2853F
long long pfs_spawn_thread(long long a1) { long long thread_class; // rax PFS_thread *v2; // r15 PFS_thread *thread; // rax PFS_thread *v4; // r14 void ( *v5)(long long); // r15 long long v6; // r14 thread_class = find_thread_class(*(_DWORD *)(a1 + 656)); if ( thread_class ) { v2 = 0LL; thread = (PFS_thread *)create_thread(thread_class, *(_QWORD *)(a1 + 664), 0LL); if ( thread ) { v4 = thread; clear_thread_account(thread); *((_QWORD *)v4 + 267) = *(_QWORD *)a1; memcpy((char *)v4 + 3292, a1 + 8, 384LL); *((_DWORD *)v4 + 919) = *(_DWORD *)(a1 + 392); memcpy((char *)v4 + 3680, a1 + 396, 255LL); *((_DWORD *)v4 + 984) = *(_DWORD *)(a1 + 652); set_thread_account(v4); v2 = v4; } } else { v2 = 0LL; } pthread_setspecific((unsigned int)THR_PFS, v2); v5 = *(void ( **)(long long))(a1 + 672); v6 = *(_QWORD *)(a1 + 680); my_free(a1); v5(v6); return 0LL; }
pfs_spawn_thread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EDI,dword ptr [RDI + 0x290] CALL 0x00135a9e TEST RAX,RAX JZ 0x00128576 MOV RSI,qword ptr [RBX + 0x298] XOR R15D,R15D MOV RDI,RAX XOR EDX,EDX CALL 0x0012fa63 TEST RAX,RAX JZ 0x0012853f MOV R14,RAX MOV RDI,RAX CALL 0x00132085 MOV RAX,qword ptr [RBX] MOV qword ptr [R14 + 0x858],RAX LEA RDI,[R14 + 0xcdc] LEA RSI,[RBX + 0x8] MOV EDX,0x180 CALL 0x00126290 MOV EAX,dword ptr [RBX + 0x188] MOV dword ptr [R14 + 0xe5c],EAX MOV RDI,R14 ADD RDI,0xe60 LEA RSI,[RBX + 0x18c] MOV EDX,0xff CALL 0x00126290 MOV EAX,dword ptr [RBX + 0x28c] MOV dword ptr [R14 + 0xf60],EAX MOV RDI,R14 CALL 0x0012fc2a MOV R15,R14 LAB_0012853f: MOV EDI,dword ptr [0x004d026c] MOV RSI,R15 CALL 0x001260c0 MOV R15,qword ptr [RBX + 0x2a0] MOV R14,qword ptr [RBX + 0x2a8] MOV RDI,RBX CALL 0x00145546 MOV RDI,R14 CALL R15 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00128576: XOR R15D,R15D JMP 0x0012853f
int8 pfs_spawn_thread(int8 *param_1) { code *pcVar1; int8 uVar2; PFS_thread_class *pPVar3; PFS_thread *pPVar4; PFS_thread *__pointer; pPVar3 = (PFS_thread_class *)find_thread_class(*(uint *)(param_1 + 0x52)); if (pPVar3 == (PFS_thread_class *)0x0) { __pointer = (PFS_thread *)0x0; } else { pPVar4 = (PFS_thread *)create_thread(pPVar3,(void *)param_1[0x53],0); __pointer = (PFS_thread *)0x0; if (pPVar4 != (PFS_thread *)0x0) { clear_thread_account(pPVar4); *(int8 *)(pPVar4 + 0x858) = *param_1; memcpy(pPVar4 + 0xcdc,param_1 + 1,0x180); *(int4 *)(pPVar4 + 0xe5c) = *(int4 *)(param_1 + 0x31); memcpy(pPVar4 + 0xe60,(void *)((long)param_1 + 0x18c),0xff); *(int4 *)(pPVar4 + 0xf60) = *(int4 *)((long)param_1 + 0x28c); set_thread_account(pPVar4); __pointer = pPVar4; } } pthread_setspecific(THR_PFS,__pointer); pcVar1 = (code *)param_1[0x54]; uVar2 = param_1[0x55]; my_free(param_1); (*pcVar1)(uVar2); return 0; }
287
minja::Value::operator+(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator+(const Value& rhs) const { if (is_string() || rhs.is_string()) { return to_str() + rhs.to_str(); } else if (is_number_integer() && rhs.is_number_integer()) { return get<int64_t>() + rhs.get<int64_t>(); } else if (is_array() && rhs.is_array()) { auto res = Value::array(); for (const auto& item : *array_) res.push_back(item); for (const auto& item : *rhs.array_) res.push_back(item); return res; } else { return get<double>() + rhs.get<double>(); } }
O3
cpp
minja::Value::operator+(minja::Value const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movb 0x40(%rsi), %al cmpb $0x3, %al je 0x57719 movb 0x40(%r14), %cl cmpb $0x3, %cl jne 0x57787 leaq 0x50(%rsp), %rdi movq %r15, %rsi callq 0x57558 leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x57558 leaq 0x60(%rsp), %r14 movq -0x10(%r14), %rcx movq -0x8(%r14), %r8 movq 0x30(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r14, %rcx je 0x57758 movq 0x60(%rsp), %rdi movq 0x28(%rsp), %rsi cmpq %rdi, %rax jbe 0x5777b leaq 0x38(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x57776 movq 0x38(%rsp), %rdi cmpq %rdi, %rax jbe 0x577dd leaq 0x50(%rsp), %rdi callq 0x181d0 jmp 0x577eb addb $-0x5, %al addb $-0x5, %cl orb %al, %cl cmpb $0x1, %cl ja 0x57897 movq %r15, %rdi callq 0x3cedc movq %rax, %r15 movq %r14, %rdi callq 0x3cedc addq %rax, %r15 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movq %r15, %rsi callq 0x3e046 jmp 0x5792b leaq 0x28(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x18750 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x5780f movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x57817 movupd (%rcx), %xmm0 movupd %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x41a72 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5785c movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x57877 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x50(%rsp), %rdi cmpq %r14, %rdi je 0x57938 movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x57938 cmpq $0x0, 0x10(%r15) je 0x578ed cmpq $0x0, 0x10(%r14) je 0x578ed xorpd %xmm0, %xmm0 leaq 0x70(%rsp), %rsi movapd %xmm0, (%rsi) movq $0x0, 0x10(%rsi) movq %rbx, %rdi callq 0x4eb58 leaq 0x70(%rsp), %rdi callq 0x4e342 movq 0x10(%r15), %rax movq (%rax), %r15 movq 0x8(%rax), %r12 cmpq %r12, %r15 je 0x5794a movq %rbx, %rdi movq %r15, %rsi callq 0x4ec10 addq $0x50, %r15 jmp 0x578d7 movq %r15, %rdi callq 0x3d026 movsd %xmm0, 0x48(%rsp) movq %r14, %rdi callq 0x3d026 addsd 0x48(%rsp), %xmm0 leaq 0x40(%rbx), %r14 xorps %xmm1, %xmm1 movups %xmm1, (%rbx) movups %xmm1, 0x10(%rbx) movups %xmm1, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movups %xmm1, 0x40(%rbx) movq %r14, %rdi callq 0x3e9b0 movq %r14, %rdi movl $0x1, %esi callq 0x3ce3c movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x10(%r14), %rax movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x57938 movq %rbx, %rdi movq %r14, %rsi callq 0x4ec10 addq $0x50, %r14 jmp 0x57955 movq %rax, %r14 leaq 0x70(%rsp), %rdi callq 0x4e342 jmp 0x579e7 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5799d movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x5799d movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x579bd movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x579bd movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x579e7 movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x579e7 jmp 0x579dc movq %rax, %r14 movq %rbx, %rdi callq 0x3cdb0 movq %r14, %rdi callq 0x18ba0 nop
_ZNK5minja5ValueplERKS0_: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov al, [rsi+40h] cmp al, 3 jz short loc_57719 mov cl, [r14+40h] cmp cl, 3 jnz short loc_57787 loc_57719: lea rdi, [rsp+0A8h+var_58] mov rsi, r15 call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_80] mov rsi, r14 call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea r14, [rsp+0A8h+var_48] mov rcx, [r14-10h] mov r8, [r14-8] mov rdx, [rsp+0A8h+var_78] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r14 jz short loc_57758 mov rdi, [rsp+0A8h+var_48] loc_57758: mov rsi, [rsp+0A8h+var_80] cmp rax, rdi jbe short loc_5777B lea r9, [rsp+0A8h+var_70] mov edi, 0Fh cmp rsi, r9 jz short loc_57776 mov rdi, [rsp+0A8h+var_70] loc_57776: cmp rax, rdi jbe short loc_577DD loc_5777B: lea rdi, [rsp+0A8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_577EB loc_57787: add al, 0FBh add cl, 0FBh or cl, al cmp cl, 1 ja loc_57897 mov rdi, r15 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) add r15, rax lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_integer_t) jmp loc_5792B loc_577DD: lea rdi, [rsp+0A8h+var_80] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_577EB: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_5780F mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_57817 loc_5780F: movupd xmm0, xmmword ptr [rcx] movupd xmmword ptr [rdx], xmm0 loc_57817: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5785C mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5785C: lea rax, [rsp+0A8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_57877 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_57877: mov rdi, [rsp+0A8h+var_58]; void * cmp rdi, r14 jz loc_57938 mov rsi, [rsp+0A8h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_57938 loc_57897: cmp qword ptr [r15+10h], 0 jz short loc_578ED cmp qword ptr [r14+10h], 0 jz short loc_578ED xorpd xmm0, xmm0 lea rsi, [rsp+0A8h+var_38] movapd xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 mov rdi, rbx call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [r15+10h] mov r15, [rax] mov r12, [rax+8] loc_578D7: cmp r15, r12 jz short loc_5794A mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r15, 50h ; 'P' jmp short loc_578D7 loc_578ED: mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0A8h+var_60], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) addsd xmm0, [rsp+0A8h+var_60] lea r14, [rbx+40h] xorps xmm1, xmm1 movups xmmword ptr [rbx], xmm1 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx+20h], xmm1 movups xmmword ptr [rbx+30h], xmm1 movups xmmword ptr [rbx+40h], xmm1 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_float_t) loc_5792B: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_57938: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_5794A: mov rax, [r14+10h] mov r14, [rax] mov r15, [rax+8] loc_57955: cmp r14, r15 jz short loc_57938 mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r14, 50h ; 'P' jmp short loc_57955 mov r14, rax lea rdi, [rsp+arg_68] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_579E7 mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5799D mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5799D mov r14, rax loc_5799D: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_579BD mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_579BD mov r14, rax loc_579BD: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_579E7 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_579E7 jmp short $+2 loc_579DC: mov r14, rax mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_579E7: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::operator+(minja::Value *this, long long a2, long long a3) { char v5; // al char v6; // cl char *v7; // rax unsigned long long v8; // rdi unsigned long long v9; // rdi __int128 **v10; // rax long long v11; // r15 long long v12; // rax char *v13; // r14 __int128 *v14; // rcx const minja::Value **v15; // rax const minja::Value *v16; // r15 const minja::Value *v17; // r12 double v18; // xmm0_8 const minja::Value **v20; // rax const minja::Value *v21; // r14 const minja::Value *v22; // r15 __int128 *v23; // [rsp+8h] [rbp-A0h] __int128 v24; // [rsp+18h] [rbp-90h] BYREF void *v25[2]; // [rsp+28h] [rbp-80h] BYREF _QWORD v26[2]; // [rsp+38h] [rbp-70h] BYREF double v27; // [rsp+48h] [rbp-60h] void *v28; // [rsp+50h] [rbp-58h] BYREF long long v29; // [rsp+58h] [rbp-50h] _QWORD v30[2]; // [rsp+60h] [rbp-48h] BYREF __int128 v31; // [rsp+70h] [rbp-38h] BYREF long long v32; // [rsp+80h] [rbp-28h] v5 = *(_BYTE *)(a2 + 64); if ( v5 != 3 ) { v6 = *(_BYTE *)(a3 + 64); if ( v6 != 3 ) { if ( (unsigned __int8)((v5 - 5) | (v6 - 5)) > 1u ) { if ( *(_QWORD *)(a2 + 16) && *(_QWORD *)(a3 + 16) ) { v31 = 0LL; v32 = 0LL; minja::Value::array((long long)this, (long long *)&v31); std::vector<minja::Value>::~vector(&v31); v15 = *(const minja::Value ***)(a2 + 16); v16 = *v15; v17 = v15[1]; while ( v16 != v17 ) { minja::Value::push_back(this, v16); v16 = (const minja::Value *)((char *)v16 + 80); } v20 = *(const minja::Value ***)(a3 + 16); v21 = *v20; v22 = v20[1]; while ( v21 != v22 ) { minja::Value::push_back(this, v21); v21 = (const minja::Value *)((char *)v21 + 80); } return this; } v27 = minja::Value::get<double>(a2); v18 = minja::Value::get<double>(a3) + v27; v13 = (char *)this + 64; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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>>( (unsigned __int8 *)this + 64, v18); } else { v11 = minja::Value::get<long>(a2); v12 = minja::Value::get<long>(a3); v13 = (char *)this + 64; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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>>( (char *)this + 64, v12 + v11); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13); return this; } } minja::Value::to_str[abi:cxx11](&v28, a2); minja::Value::to_str[abi:cxx11](v25, a3); v7 = (char *)v25[1] + v29; v8 = 15LL; if ( v28 != v30 ) v8 = v30[0]; if ( (unsigned long long)v7 <= v8 ) goto LABEL_9; v9 = 15LL; if ( v25[0] != v26 ) v9 = v26[0]; if ( (unsigned long long)v7 <= v9 ) v10 = (__int128 **)std::string::replace(v25, 0LL, 0LL, v28, v29); else LABEL_9: v10 = (__int128 **)std::string::_M_append(&v28, v25[0]); v23 = &v24; v14 = (__int128 *)(v10 + 2); if ( *v10 == (__int128 *)(v10 + 2) ) { v24 = *v14; } else { v23 = *v10; *(_QWORD *)&v24 = *(_QWORD *)v14; } *v10 = v14; v10[1] = 0LL; *(_BYTE *)v14 = 0; minja::Value::Value(this); if ( v23 != &v24 ) operator delete(v23, v24 + 1); if ( v25[0] != v26 ) operator delete(v25[0], v26[0] + 1LL); if ( v28 != v30 ) operator delete(v28, v30[0] + 1LL); return this; }
operator+: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] CMP AL,0x3 JZ 0x00157719 MOV CL,byte ptr [R14 + 0x40] CMP CL,0x3 JNZ 0x00157787 LAB_00157719: LEA RDI,[RSP + 0x50] MOV RSI,R15 CALL 0x00157558 LAB_00157726: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x00157558 LEA R14,[RSP + 0x60] MOV RCX,qword ptr [R14 + -0x10] MOV R8,qword ptr [R14 + -0x8] MOV RDX,qword ptr [RSP + 0x30] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R14 JZ 0x00157758 MOV RDI,qword ptr [RSP + 0x60] LAB_00157758: MOV RSI,qword ptr [RSP + 0x28] CMP RAX,RDI JBE 0x0015777b LEA R9,[RSP + 0x38] MOV EDI,0xf CMP RSI,R9 JZ 0x00157776 MOV RDI,qword ptr [RSP + 0x38] LAB_00157776: CMP RAX,RDI JBE 0x001577dd LAB_0015777b: LEA RDI,[RSP + 0x50] CALL 0x001181d0 LAB_00157785: JMP 0x001577eb LAB_00157787: ADD AL,0xfb ADD CL,0xfb OR CL,AL CMP CL,0x1 JA 0x00157897 MOV RDI,R15 CALL 0x0013cedc MOV R15,RAX MOV RDI,R14 CALL 0x0013cedc ADD R15,RAX LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,R15 CALL 0x0013e046 JMP 0x0015792b LAB_001577dd: LEA RDI,[RSP + 0x28] XOR ESI,ESI XOR EDX,EDX CALL 0x00118750 LAB_001577eb: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x0015780f MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00157817 LAB_0015780f: MOVUPD XMM0,xmmword ptr [RCX] MOVUPD xmmword ptr [RDX],XMM0 LAB_00157817: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_00157834: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00141a72 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015785c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0015785c: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00157877 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00157877: MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R14 JZ 0x00157938 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001186a0 JMP 0x00157938 LAB_00157897: CMP qword ptr [R15 + 0x10],0x0 JZ 0x001578ed CMP qword ptr [R14 + 0x10],0x0 JZ 0x001578ed XORPD XMM0,XMM0 LEA RSI,[RSP + 0x70] MOVAPD xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_001578ba: MOV RDI,RBX CALL 0x0014eb58 LEA RDI,[RSP + 0x70] CALL 0x0014e342 MOV RAX,qword ptr [R15 + 0x10] MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LAB_001578d7: CMP R15,R12 JZ 0x0015794a LAB_001578dc: MOV RDI,RBX MOV RSI,R15 CALL 0x0014ec10 LAB_001578e7: ADD R15,0x50 JMP 0x001578d7 LAB_001578ed: MOV RDI,R15 CALL 0x0013d026 MOVSD qword ptr [RSP + 0x48],XMM0 MOV RDI,R14 CALL 0x0013d026 ADDSD XMM0,qword ptr [RSP + 0x48] LEA R14,[RBX + 0x40] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RBX],XMM1 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX + 0x20],XMM1 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOVUPS xmmword ptr [RBX + 0x40],XMM1 MOV RDI,R14 CALL 0x0013e9b0 LAB_0015792b: MOV RDI,R14 MOV ESI,0x1 CALL 0x0013ce3c LAB_00157938: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_0015794a: MOV RAX,qword ptr [R14 + 0x10] MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_00157955: CMP R14,R15 JZ 0x00157938 LAB_0015795a: MOV RDI,RBX MOV RSI,R14 CALL 0x0014ec10 LAB_00157965: ADD R14,0x50 JMP 0x00157955
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator+(Value *this,Value *param_1) { long *plVar1; Value *pVVar2; int8 *puVar3; long lVar4; long lVar5; Value *in_RDX; ulong uVar6; Value *pVVar7; double dVar8; long *local_a0; int8 local_98; long local_90; int8 uStack_88; ulong *local_80; long local_78; ulong local_70 [2]; double local_60; ulong *local_58; long local_50; ulong local_48 [2]; int8 local_38; int8 uStack_30; int8 local_28; if ((param_1[0x40] != (Value)0x3) && (in_RDX[0x40] != (Value)0x3)) { if ((byte)((char)in_RDX[0x40] - 5U | (char)param_1[0x40] - 5U) < 2) { lVar4 = get<long>(param_1); lVar5 = get<long>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,lVar4 + lVar5); } else { if ((*(long *)(param_1 + 0x10) != 0) && (*(long *)(in_RDX + 0x10) != 0)) { local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 001578ba to 001578c1 has its CatchHandler @ 0015796b */ array(this); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); pVVar2 = (Value *)(*(int8 **)(param_1 + 0x10))[1]; for (pVVar7 = (Value *)**(int8 **)(param_1 + 0x10); pVVar7 != pVVar2; pVVar7 = pVVar7 + 0x50) { /* try { // try from 001578dc to 001578e6 has its CatchHandler @ 001579dc */ push_back(this,pVVar7); } pVVar2 = (Value *)(*(int8 **)(in_RDX + 0x10))[1]; for (pVVar7 = (Value *)**(int8 **)(in_RDX + 0x10); pVVar7 != pVVar2; pVVar7 = pVVar7 + 0x50) { /* try { // try from 0015795a to 00157964 has its CatchHandler @ 001579da */ push_back(this,pVVar7); } return this; } local_60 = get<double>(param_1); dVar8 = get<double>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<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>> (dVar8 + local_60,this + 0x40); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + '@')); return this; } to_str_abi_cxx11_(); /* try { // try from 00157726 to 00157732 has its CatchHandler @ 001579ba */ to_str_abi_cxx11_(); uVar6 = 0xf; if (local_58 != local_48) { uVar6 = local_48[0]; } if (uVar6 < (ulong)(local_78 + local_50)) { uVar6 = 0xf; if (local_80 != local_70) { uVar6 = local_70[0]; } if ((ulong)(local_78 + local_50) <= uVar6) { /* try { // try from 001577dd to 001577ea has its CatchHandler @ 0015799a */ puVar3 = (int8 *) std::__cxx11::string::replace((ulong)&local_80,0,(char *)0x0,(ulong)local_58); goto LAB_001577eb; } } /* try { // try from 0015777b to 00157784 has its CatchHandler @ 0015799a */ puVar3 = (int8 *)std::__cxx11::string::_M_append((char *)&local_58,(ulong)local_80); LAB_001577eb: local_a0 = &local_90; plVar1 = puVar3 + 2; if ((long *)*puVar3 == plVar1) { local_90 = *plVar1; uStack_88 = puVar3[3]; } else { local_90 = *plVar1; local_a0 = (long *)*puVar3; } local_98 = puVar3[1]; *puVar3 = plVar1; puVar3[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 00157834 to 00157840 has its CatchHandler @ 0015797a */ Value(this,(string *)&local_a0); if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } return this; }
288
convert_dirname
eloqsql/mysys/mf_dirname.c
char *convert_dirname(char *to, const char *from, const char *from_end) { char *to_org=to; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("convert_dirname"); /* We use -2 here, becasue we need place for the last FN_LIBCHAR */ if (!from_end || (from_end - from) > FN_REFLEN-2) from_end=from+FN_REFLEN -2; #if FN_LIBCHAR != '/' { for (; from != from_end && *from ; from++) { if (*from == '/') *to++= FN_LIBCHAR; else { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from, from + 3))) { memmove(to, from, l); to+= l; from+= l - 1; to_org= to; /* Don't look inside mbchar */ } else #endif { *to++= *from; } } } *to=0; } #else /* This is ok even if to == from, becasue we need to cut the string */ to= strmake(to, from, (size_t) (from_end-from)); #endif /* Add FN_LIBCHAR to the end of directory path */ if (to != to_org && (to[-1] != FN_LIBCHAR && to[-1] != FN_DEVCHAR)) { *to++=FN_LIBCHAR; *to=0; } DBUG_RETURN(to); /* Pointer to end of dir */ }
O3
c
convert_dirname: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq %rdx, %rax subq %rsi, %rax leaq 0x1fe(%rsi), %rcx cmpq $0x1ff, %rax # imm = 0x1FF movq %rdx, %rax cmovgeq %rcx, %rax testq %rdx, %rdx cmoveq %rcx, %rax subq %rsi, %rax movq %rax, %rdx callq 0xd71d8 cmpq %rbx, %rax je 0x949ca movzbl -0x1(%rax), %ecx testl %ecx, %ecx je 0x949ca cmpl $0x2f, %ecx je 0x949ca movw $0x2f, (%rax) incq %rax addq $0x8, %rsp popq %rbx popq %rbp retq nopl (%rax)
convert_dirname: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, rdx sub rax, rsi lea rcx, [rsi+1FEh] cmp rax, 1FFh mov rax, rdx cmovge rax, rcx test rdx, rdx cmovz rax, rcx sub rax, rsi mov rdx, rax call strmake cmp rax, rbx jz short loc_949CA movzx ecx, byte ptr [rax-1] test ecx, ecx jz short loc_949CA cmp ecx, 2Fh ; '/' jz short loc_949CA mov word ptr [rax], 2Fh ; '/' inc rax loc_949CA: add rsp, 8 pop rbx pop rbp retn
_WORD * convert_dirname(_WORD *a1, long long a2, long long a3) { long long v3; // rax _WORD *result; // rax v3 = a3; if ( a3 - a2 >= 511 ) v3 = a2 + 510; if ( !a3 ) v3 = a2 + 510; result = (_WORD *)strmake(a1, a2, v3 - a2); if ( result != a1 && *((_BYTE *)result - 1) && *((_BYTE *)result - 1) != 47 ) { *result = 47; return (_WORD *)((char *)result + 1); } return result; }
convert_dirname: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,RDX SUB RAX,RSI LEA RCX,[RSI + 0x1fe] CMP RAX,0x1ff MOV RAX,RDX CMOVGE RAX,RCX TEST RDX,RDX CMOVZ RAX,RCX SUB RAX,RSI MOV RDX,RAX CALL 0x001d71d8 CMP RAX,RBX JZ 0x001949ca MOVZX ECX,byte ptr [RAX + -0x1] TEST ECX,ECX JZ 0x001949ca CMP ECX,0x2f JZ 0x001949ca MOV word ptr [RAX],0x2f INC RAX LAB_001949ca: ADD RSP,0x8 POP RBX POP RBP RET
int2 * convert_dirname(int2 *param_1,long param_2,long param_3) { long lVar1; int2 *puVar2; lVar1 = param_3; if (0x1fe < param_3 - param_2) { lVar1 = param_2 + 0x1fe; } if (param_3 == 0) { lVar1 = param_2 + 0x1fe; } puVar2 = (int2 *)strmake(param_1,param_2,lVar1 - param_2); if (((puVar2 != param_1) && (*(char *)((long)puVar2 + -1) != '\0')) && (*(char *)((long)puVar2 + -1) != '/')) { *puVar2 = 0x2f; puVar2 = (int2 *)((long)puVar2 + 1); } return puVar2; }
289
YAML::Exp::AnchorEnd()
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/exp.h
inline const RegEx& AnchorEnd() { static const RegEx e = RegEx("?:,]}%@`", REGEX_OR) | BlankOrBreak(); return e; }
O3
c
YAML::Exp::AnchorEnd(): pushq %r14 pushq %rbx subq $0x48, %rsp movb 0x1aa9e0(%rip), %al # 0x214028 testb %al, %al je 0x6965b leaq 0x1aa9b5(%rip), %rax # 0x214008 addq $0x48, %rsp popq %rbx popq %r14 retq leaq 0x1aa9c6(%rip), %rdi # 0x214028 callq 0x2e2e0 testl %eax, %eax je 0x6964c leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xfb762(%rip), %rsi # 0x164ddd leaq 0xfb763(%rip), %rdx # 0x164de5 leaq 0x8(%rsp), %rdi callq 0x2c610 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi movl $0x3, %edx callq 0x6f158 callq 0x65be7 leaq 0x1aa95c(%rip), %rdi # 0x214008 leaq 0x28(%rsp), %rsi movq %rax, %rdx callq 0x6f1ca leaq 0x30(%rsp), %rdi callq 0x65eb4 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x696da movq 0x18(%rsp), %rsi incq %rsi callq 0x2d2d0 leaq -0x41d7(%rip), %rdi # 0x6550a leaq 0x1aa920(%rip), %rsi # 0x214008 leaq 0x1a7c41(%rip), %rdx # 0x211330 callq 0x2d030 leaq 0x1aa92d(%rip), %rdi # 0x214028 callq 0x2cb40 jmp 0x6964c movq %rax, %rbx jmp 0x6971c movq %rax, %rbx jmp 0x69733 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x65eb4 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x69733 movq 0x18(%rsp), %rsi incq %rsi callq 0x2d2d0 leaq 0x1aa8ee(%rip), %rdi # 0x214028 callq 0x2cb10 movq %rbx, %rdi callq 0x2e220
_ZN4YAML3Exp9AnchorEndEv: push r14 push rbx sub rsp, 48h mov al, cs:_ZGVZN4YAML3Exp9AnchorEndEvE1e; `guard variable for'YAML::Exp::AnchorEnd(void)::e test al, al jz short loc_6965B loc_6964C: lea rax, _ZZN4YAML3Exp9AnchorEndEvE1e; YAML::Exp::AnchorEnd(void)::e add rsp, 48h pop rbx pop r14 retn loc_6965B: lea rdi, _ZGVZN4YAML3Exp9AnchorEndEvE1e; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_6964C lea r14, [rsp+58h+var_40] mov [r14-10h], r14 lea rsi, asc_164DDD; "?:,]}%@`" lea rdx, asc_164DDD+8; "" lea rdi, [rsp+58h+var_50] 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, [rsp+58h+var_30]; this lea rsi, [rsp+58h+var_50] mov edx, 3 call _ZN4YAML5RegExC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_8REGEX_OPE; YAML::RegEx::RegEx(std::string const&,YAML::REGEX_OP) call _ZN4YAML3Exp12BlankOrBreakEv; YAML::Exp::BlankOrBreak(void) lea rdi, _ZZN4YAML3Exp9AnchorEndEvE1e; YAML::Exp::AnchorEnd(void)::e lea rsi, [rsp+58h+var_30] mov rdx, rax call _ZN4YAMLorERKNS_5RegExES2_; YAML::operator|(YAML::RegEx const&,YAML::RegEx const&) lea rdi, [rsp+58h+var_28] call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector() mov rdi, [rsp+58h+var_50]; void * cmp rdi, r14 jz short loc_696DA mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_696DA: lea rdi, _ZN4YAML5RegExD2Ev; lpfunc lea rsi, _ZZN4YAML3Exp9AnchorEndEvE1e; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN4YAML3Exp9AnchorEndEvE1e; __guard * call ___cxa_guard_release jmp loc_6964C mov rbx, rax jmp short loc_6971C mov rbx, rax jmp short loc_69733 mov rbx, rax lea rdi, [rsp+arg_28] call _ZNSt6vectorIN4YAML5RegExESaIS1_EED2Ev; std::vector<YAML::RegEx>::~vector() loc_6971C: mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_69733 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69733: lea rdi, _ZGVZN4YAML3Exp9AnchorEndEvE1e; __guard * call ___cxa_guard_abort mov rdi, rbx call __Unwind_Resume
void * YAML::Exp::AnchorEnd(YAML::Exp *this) { void *v2; // rax void *v3[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v4[2]; // [rsp+18h] [rbp-40h] BYREF _BYTE v5[8]; // [rsp+28h] [rbp-30h] BYREF char *v6; // [rsp+30h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'YAML::Exp::AnchorEnd(void)::e && __cxa_guard_acquire(&`guard variable for'YAML::Exp::AnchorEnd(void)::e) ) { v3[0] = v4; std::string::_M_construct<char const*>(v3, "?:,]}%@`", ""); YAML::RegEx::RegEx(v5, v3, 3LL); v2 = YAML::Exp::BlankOrBreak((YAML::Exp *)v5); YAML::operator|(&YAML::Exp::AnchorEnd(void)::e, v5, v2); std::vector<YAML::RegEx>::~vector(&v6); if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); __cxa_atexit((void (*)(void *))YAML::RegEx::~RegEx, &YAML::Exp::AnchorEnd(void)::e, &_dso_handle); __cxa_guard_release(&`guard variable for'YAML::Exp::AnchorEnd(void)::e); } return &YAML::Exp::AnchorEnd(void)::e; }
AnchorEnd: PUSH R14 PUSH RBX SUB RSP,0x48 MOV AL,byte ptr [0x00314028] TEST AL,AL JZ 0x0016965b LAB_0016964c: LEA RAX,[0x314008] ADD RSP,0x48 POP RBX POP R14 RET LAB_0016965b: LEA RDI,[0x314028] CALL 0x0012e2e0 TEST EAX,EAX JZ 0x0016964c LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LAB_00169674: LEA RSI,[0x264ddd] LEA RDX,[0x264de5] LEA RDI,[RSP + 0x8] CALL 0x0012c610 LAB_0016968c: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] MOV EDX,0x3 CALL 0x0016f158 LAB_001696a0: CALL 0x00165be7 LEA RDI,[0x314008] LEA RSI,[RSP + 0x28] MOV RDX,RAX CALL 0x0016f1ca LAB_001696b9: LEA RDI,[RSP + 0x30] CALL 0x00165eb4 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x001696da MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0012d2d0 LAB_001696da: LEA RDI,[0x16550a] LEA RSI,[0x314008] LEA RDX,[0x311330] CALL 0x0012d030 LEA RDI,[0x314028] CALL 0x0012cb40 JMP 0x0016964c
/* YAML::Exp::AnchorEnd() */ int1 * YAML::Exp::AnchorEnd(void) { int iVar1; RegEx *pRVar2; long *local_50 [2]; long local_40 [2]; RegEx local_30 [8]; vector<YAML::RegEx,std::allocator<YAML::RegEx>> local_28 [24]; if (AnchorEnd()::e == '\0') { iVar1 = __cxa_guard_acquire(&AnchorEnd()::e); if (iVar1 != 0) { /* try { // try from 00169674 to 0016968b has its CatchHandler @ 0016970a */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_00264ddd,&DAT_00264de5); /* try { // try from 0016968c to 0016969f has its CatchHandler @ 00169705 */ RegEx::RegEx(local_30,local_50,3); /* try { // try from 001696a0 to 001696b8 has its CatchHandler @ 0016970f */ pRVar2 = (RegEx *)BlankOrBreak(); operator|((YAML *)AnchorEnd()::e,local_30,pRVar2); std::vector<YAML::RegEx,std::allocator<YAML::RegEx>>::~vector(local_28); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } __cxa_atexit(RegEx::~RegEx,AnchorEnd()::e,&__dso_handle); __cxa_guard_release(&AnchorEnd()::e); } } return AnchorEnd()::e; }
290
translog_purge
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge(TRANSLOG_ADDRESS low) { uint32 last_need_file= LSN_FILE_NO(low); uint32 min_unsync; int soft; TRANSLOG_ADDRESS horizon= translog_get_horizon(); int rc= 0; DBUG_ENTER("translog_purge"); DBUG_PRINT("enter", ("low: " LSN_FMT, LSN_IN_PARTS(low))); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); soft= soft_sync; min_unsync= soft_sync_min; DBUG_PRINT("info", ("min_unsync: %lu", (ulong) min_unsync)); if (soft && min_unsync < last_need_file) { last_need_file= min_unsync; DBUG_PRINT("info", ("last_need_file set to %lu", (ulong)last_need_file)); } mysql_mutex_lock(&log_descriptor.purger_lock); DBUG_PRINT("info", ("last_lsn_checked file: %lu:", (ulong) log_descriptor.last_lsn_checked)); if (LSN_FILE_NO(log_descriptor.last_lsn_checked) < last_need_file) { uint32 i; uint32 min_file= translog_first_file(horizon, 1); DBUG_ASSERT(min_file != 0); /* log is already started */ DBUG_PRINT("info", ("min_file: %lu:",(ulong) min_file)); for(i= min_file; i < last_need_file && rc == 0; i++) { LSN lsn= translog_get_file_max_lsn_stored(i); if (lsn == LSN_IMPOSSIBLE) break; /* files are still in writing */ if (lsn == LSN_ERROR) { rc= 1; break; } if (cmp_translog_addr(lsn, low) >= 0) break; DBUG_PRINT("info", ("purge file %lu", (ulong) i)); /* remove file descriptor from the cache */ /* log_descriptor.min_file can be changed only here during execution and the function is serialized, so we can access it without problems */ if (i >= log_descriptor.min_file) { TRANSLOG_FILE *file; mysql_rwlock_wrlock(&log_descriptor.open_files_lock); DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(log_descriptor.min_file == i); file= *((TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files)); DBUG_PRINT("info", ("Files : %d", log_descriptor.open_files.elements)); DBUG_ASSERT(i == file->number); log_descriptor.min_file++; DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); mysql_rwlock_unlock(&log_descriptor.open_files_lock); translog_close_log_file(file); } if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled) { char path[FN_REFLEN], *file_name; file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } } if (unlikely(rc == 1)) log_descriptor.min_need_file= 0; /* impossible value */ else log_descriptor.min_need_file= i; } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O3
c
translog_purge: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rdi, %r15 shrq $0x20, %r15 callq 0x6adbc movq %rax, %r14 movl 0xb9edaa(%rip), %r12d # 0xc0b7dc cmpl %r15d, %r12d cmovael %r15d, %r12d cmpb $0x0, 0xb9ed98(%rip) # 0xc0b7d8 cmovel %r15d, %r12d cmpq $0x0, 0xb9ed24(%rip) # 0xc0b770 jne 0x6cc2d leaq 0xb9ecd7(%rip), %rdi # 0xc0b730 callq 0x2a1f0 cmpl 0xb9ed17(%rip), %r12d # 0xc0b77c jbe 0x6cbd1 movq %r14, %rdi movl $0x1, %esi callq 0x69244 movl %eax, %r14d cmpl %r12d, %eax jae 0x6cbd5 leaq -0x230(%rbp), %r15 movl %r14d, %edi callq 0x67b0c testq %rax, %rax je 0x6cbd5 cmpq $0x1, %rax je 0x6cc19 cmpq %rbx, %rax jge 0x6cbd5 cmpl 0x39e04e(%rip), %r14d # 0x40ab04 jb 0x6cb0b cmpq $0x0, 0x39e0d8(%rip) # 0x40ab98 jne 0x6cb91 leaq 0x39e03b(%rip), %rdi # 0x40ab08 callq 0xab6fd leaq 0x39dfff(%rip), %rdi # 0x40aad8 callq 0x96aaf movq (%rax), %r13 incl 0x39e01d(%rip) # 0x40ab04 movq 0x39e0aa(%rip), %rdi # 0x40ab98 testq %rdi, %rdi jne 0x6cb9b leaq 0x39e00a(%rip), %rdi # 0x40ab08 callq 0xab79e movq %r13, %rdi callq 0x6ab48 cmpq $0x0, 0x39cb75(%rip) # 0x409688 movb $0x1, %al jne 0x6cb78 cmpl $0x0, 0x39cb62(%rip) # 0x409680 jne 0x6cb78 movl %r14d, %edi movq %r15, %rsi callq 0x67925 leaq 0x39c6d2(%rip), %rax # 0x409204 movl (%rax), %esi leaq 0x32439d(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0x288(%rbp), %rdi movl $0xe, %edx movq %r15, %rcx leaq -0x240(%rbp), %r8 callq *0x148(%rax) movq %rax, -0x240(%rbp) testq %rax, %rax jne 0x6cbb0 movl $0x10, %esi movq %r15, %rdi callq 0xa2d54 testl %eax, %eax sete %al incl %r14d cmpl %r12d, %r14d jae 0x6cc20 testb %al, %al jne 0x6ca8b jmp 0x6cc20 callq 0x2e121 jmp 0x6cad2 leaq 0x324336(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x168(%rax) jmp 0x6caf7 movq %rax, %rdi movq %r15, %rsi leaq -0x240(%rbp), %rdx leaq -0x234(%rbp), %rcx callq 0x2e13f movl -0x234(%rbp), %eax jmp 0x6cb73 xorl %ebx, %ebx jmp 0x6cbde xorl %ebx, %ebx movl %r14d, 0xb9eb4a(%rip) # 0xc0b728 movq 0xb9eb8b(%rip), %rdi # 0xc0b770 testq %rdi, %rdi jne 0x6cc37 leaq 0xb9eb3f(%rip), %rdi # 0xc0b730 callq 0x2a1c0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6cc49 movl %ebx, %eax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d movb $0x1, %bl jmp 0x6cbd7 xorl %ebx, %ebx testb %al, %al jne 0x6cbd7 movb $0x1, %bl xorl %r14d, %r14d jmp 0x6cbd7 callq 0x2e104 jmp 0x6ca5e leaq 0x32429a(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x160(%rax) jmp 0x6cbea callq 0x2a240
translog_purge: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, rdi shr r15, 20h call translog_get_horizon mov r14, rax mov r12d, cs:soft_sync_min cmp r12d, r15d cmovnb r12d, r15d cmp cs:soft_sync, 0 cmovz r12d, r15d cmp cs:qword_C0B770, 0 jnz loc_6CC2D lea rdi, unk_C0B730 call _pthread_mutex_lock loc_6CA5E: cmp r12d, dword ptr cs:qword_C0B778+4 jbe loc_6CBD1 mov rdi, r14 mov esi, 1 call translog_first_file mov r14d, eax cmp eax, r12d jnb loc_6CBD5 lea r15, [rbp+var_230] loc_6CA8B: mov edi, r14d call translog_get_file_max_lsn_stored test rax, rax jz loc_6CBD5 cmp rax, 1 jz loc_6CC19 cmp rax, rbx jge loc_6CBD5 cmp r14d, dword ptr cs:qword_40AB00+4 jb short loc_6CB0B cmp cs:qword_40AB98, 0 jnz loc_6CB91 lea rdi, unk_40AB08 call my_rw_wrlock loc_6CAD2: lea rdi, qword_40AAD8 call pop_dynamic mov r13, [rax] inc dword ptr cs:qword_40AB00+4 mov rdi, cs:qword_40AB98 test rdi, rdi jnz loc_6CB9B loc_6CAF7: lea rdi, unk_40AB08 call my_rw_unlock mov rdi, r13 call translog_close_log_file loc_6CB0B: cmp cs:log_purge_type, 0 mov al, 1 jnz short loc_6CB78 cmp cs:log_purge_disabled, 0 jnz short loc_6CB78 mov edi, r14d mov rsi, r15 call translog_filename_by_fileno lea rax, key_file_translog mov esi, [rax] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_288] mov edx, 0Eh mov rcx, r15 lea r8, [rbp+var_240] call qword ptr [rax+148h] mov [rbp+var_240], rax test rax, rax jnz short loc_6CBB0 mov esi, 10h mov rdi, r15 call my_delete loc_6CB73: test eax, eax setz al loc_6CB78: inc r14d cmp r14d, r12d jnb loc_6CC20 test al, al jnz loc_6CA8B jmp loc_6CC20 loc_6CB91: call translog_purge_cold_2 jmp loc_6CAD2 loc_6CB9B: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_6CAF7 loc_6CBB0: mov rdi, rax mov rsi, r15 lea rdx, [rbp+var_240] lea rcx, [rbp+var_234] call translog_purge_cold_3 mov eax, [rbp+var_234] jmp short loc_6CB73 loc_6CBD1: xor ebx, ebx jmp short loc_6CBDE loc_6CBD5: xor ebx, ebx loc_6CBD7: mov dword ptr cs:qword_C0B728, r14d loc_6CBDE: mov rdi, cs:qword_C0B770 test rdi, rdi jnz short loc_6CC37 loc_6CBEA: lea rdi, unk_C0B730 call _pthread_mutex_unlock mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_6CC49 mov eax, ebx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6CC19: xor r14d, r14d mov bl, 1 jmp short loc_6CBD7 loc_6CC20: xor ebx, ebx test al, al jnz short loc_6CBD7 mov bl, 1 xor r14d, r14d jmp short loc_6CBD7 loc_6CC2D: call translog_purge_cold_1 jmp loc_6CA5E loc_6CC37: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_6CBEA loc_6CC49: call ___stack_chk_fail
long long translog_purge(signed long long a1) { unsigned int v1; // ebx unsigned long long horizon; // r14 unsigned int v3; // r12d unsigned int file; // r14d signed long long file_max_lsn_stored; // rax long long v6; // rdx long long v7; // rcx int v8; // r8d int v9; // r9d long long v10; // r13 bool v11; // al long long v12; // rax unsigned int v13; // eax _BYTE v15[72]; // [rsp+8h] [rbp-288h] BYREF long long v16; // [rsp+50h] [rbp-240h] BYREF unsigned int v17; // [rsp+5Ch] [rbp-234h] BYREF _BYTE v18[512]; // [rsp+60h] [rbp-230h] BYREF unsigned long long v19; // [rsp+260h] [rbp-30h] v1 = a1; v19 = __readfsqword(0x28u); horizon = translog_get_horizon(); v3 = soft_sync_min; if ( (unsigned int)soft_sync_min >= HIDWORD(a1) ) v3 = HIDWORD(a1); if ( !soft_sync ) v3 = HIDWORD(a1); if ( qword_C0B770 ) translog_purge_cold_1(); else pthread_mutex_lock(&unk_C0B730); if ( v3 <= HIDWORD(qword_C0B778) ) { v1 = 0; } else { file = translog_first_file(horizon, 1); if ( file < v3 ) { while ( 1 ) { file_max_lsn_stored = translog_get_file_max_lsn_stored(file); if ( !file_max_lsn_stored ) break; if ( file_max_lsn_stored == 1 ) { file = 0; LOBYTE(v1) = 1; goto LABEL_30; } if ( file_max_lsn_stored >= a1 ) break; if ( file >= HIDWORD(qword_40AB00) ) { if ( qword_40AB98 ) translog_purge_cold_2(); else my_rw_wrlock(&unk_40AB08); v10 = *(_QWORD *)pop_dynamic(&qword_40AAD8); ++HIDWORD(qword_40AB00); if ( qword_40AB98 ) PSI_server[45](); my_rw_unlock(&unk_40AB08); translog_close_log_file(v10); } v11 = 1; if ( !log_purge_type && !log_purge_disabled ) { translog_filename_by_fileno(file, (long long)v18, v6, v7, v8, v9); v12 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])( v15, key_file_translog, 14LL, v18, &v16); v16 = v12; if ( v12 ) { translog_purge_cold_3(v12, (long long)v18, &v16, &v17); v13 = v17; } else { v13 = my_delete(v18, 16LL); } v11 = v13 == 0; } if ( ++file >= v3 || !v11 ) { v1 = 0; if ( !v11 ) { LOBYTE(v1) = 1; file = 0; } goto LABEL_30; } } } v1 = 0; LABEL_30: LODWORD(qword_C0B728) = file; } if ( qword_C0B770 ) PSI_server[44](); pthread_mutex_unlock(&unk_C0B730); return v1; }
translog_purge: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,RDI SHR R15,0x20 CALL 0x0016adbc MOV R14,RAX MOV R12D,dword ptr [0x00d0b7dc] CMP R12D,R15D CMOVNC R12D,R15D CMP byte ptr [0x00d0b7d8],0x0 CMOVZ R12D,R15D CMP qword ptr [0x00d0b770],0x0 JNZ 0x0016cc2d LEA RDI,[0xd0b730] CALL 0x0012a1f0 LAB_0016ca5e: CMP R12D,dword ptr [0x00d0b77c] JBE 0x0016cbd1 MOV RDI,R14 MOV ESI,0x1 CALL 0x00169244 MOV R14D,EAX CMP EAX,R12D JNC 0x0016cbd5 LEA R15,[RBP + -0x230] LAB_0016ca8b: MOV EDI,R14D CALL 0x00167b0c TEST RAX,RAX JZ 0x0016cbd5 CMP RAX,0x1 JZ 0x0016cc19 CMP RAX,RBX JGE 0x0016cbd5 CMP R14D,dword ptr [0x0050ab04] JC 0x0016cb0b CMP qword ptr [0x0050ab98],0x0 JNZ 0x0016cb91 LEA RDI,[0x50ab08] CALL 0x001ab6fd LAB_0016cad2: LEA RDI,[0x50aad8] CALL 0x00196aaf MOV R13,qword ptr [RAX] INC dword ptr [0x0050ab04] MOV RDI,qword ptr [0x0050ab98] TEST RDI,RDI JNZ 0x0016cb9b LAB_0016caf7: LEA RDI,[0x50ab08] CALL 0x001ab79e MOV RDI,R13 CALL 0x0016ab48 LAB_0016cb0b: CMP qword ptr [0x00509688],0x0 MOV AL,0x1 JNZ 0x0016cb78 CMP dword ptr [0x00509680],0x0 JNZ 0x0016cb78 MOV EDI,R14D MOV RSI,R15 CALL 0x00167925 LEA RAX,[0x509204] MOV ESI,dword ptr [RAX] LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x288] MOV EDX,0xe MOV RCX,R15 LEA R8,[RBP + -0x240] CALL qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x240],RAX TEST RAX,RAX JNZ 0x0016cbb0 MOV ESI,0x10 MOV RDI,R15 CALL 0x001a2d54 LAB_0016cb73: TEST EAX,EAX SETZ AL LAB_0016cb78: INC R14D CMP R14D,R12D JNC 0x0016cc20 TEST AL,AL JNZ 0x0016ca8b JMP 0x0016cc20 LAB_0016cb91: CALL 0x0012e121 JMP 0x0016cad2 LAB_0016cb9b: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0016caf7 LAB_0016cbb0: MOV RDI,RAX MOV RSI,R15 LEA RDX,[RBP + -0x240] LEA RCX,[RBP + -0x234] CALL 0x0012e13f MOV EAX,dword ptr [RBP + -0x234] JMP 0x0016cb73 LAB_0016cbd1: XOR EBX,EBX JMP 0x0016cbde LAB_0016cbd5: XOR EBX,EBX LAB_0016cbd7: MOV dword ptr [0x00d0b728],R14D LAB_0016cbde: MOV RDI,qword ptr [0x00d0b770] TEST RDI,RDI JNZ 0x0016cc37 LAB_0016cbea: LEA RDI,[0xd0b730] CALL 0x0012a1c0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016cc49 MOV EAX,EBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016cc19: XOR R14D,R14D MOV BL,0x1 JMP 0x0016cbd7 LAB_0016cc20: XOR EBX,EBX TEST AL,AL JNZ 0x0016cbd7 MOV BL,0x1 XOR R14D,R14D JMP 0x0016cbd7 LAB_0016cc2d: CALL 0x0012e104 JMP 0x0016ca5e LAB_0016cc37: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0016cbea LAB_0016cc49: CALL 0x0012a240
ulong translog_purge(long param_1) { uint uVar1; int iVar2; int8 uVar3; long lVar4; int8 *puVar5; ulong uVar6; uint uVar7; long in_FS_OFFSET; bool bVar8; int1 local_290 [72]; long local_248; int local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = translog_get_horizon(); uVar1 = (uint)((ulong)param_1 >> 0x20); uVar7 = soft_sync_min; if (uVar1 <= soft_sync_min) { uVar7 = uVar1; } if (soft_sync == '\0') { uVar7 = uVar1; } if (DAT_00d0b770 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d0b730); } else { translog_purge_cold_1(); } if (DAT_00d0b77c < uVar7) { uVar1 = translog_first_file(uVar3,1); if (uVar1 < uVar7) { do { lVar4 = translog_get_file_max_lsn_stored(uVar1); if (lVar4 == 0) goto LAB_0016cbd5; if (lVar4 == 1) { DAT_00d0b728 = 0; uVar6 = CONCAT71((int7)((ulong)param_1 >> 8),1); goto LAB_0016cbde; } if (param_1 <= lVar4) goto LAB_0016cbd5; if (DAT_0050ab04 <= uVar1) { if (DAT_0050ab98 == 0) { my_rw_wrlock(&DAT_0050ab08); } else { translog_purge_cold_2(); } puVar5 = (int8 *)pop_dynamic(&DAT_0050aad8); uVar3 = *puVar5; DAT_0050ab04 = DAT_0050ab04 + 1; if (DAT_0050ab98 != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(&DAT_0050ab08); translog_close_log_file(uVar3); } bVar8 = true; if ((log_purge_type == 0) && (log_purge_disabled == 0)) { translog_filename_by_fileno(uVar1,local_238); local_248 = (**(code **)(PSI_server + 0x148)) (local_290,key_file_translog,0xe,local_238,&local_248); if (local_248 == 0) { iVar2 = my_delete(local_238,0x10); } else { translog_purge_cold_3(local_248,local_238,&local_248,&local_23c); iVar2 = local_23c; } bVar8 = iVar2 == 0; } uVar1 = uVar1 + 1; } while ((uVar1 < uVar7) && (bVar8)); uVar6 = 0; DAT_00d0b728 = uVar1; if (!bVar8) { uVar6 = 1; DAT_00d0b728 = 0; } } else { LAB_0016cbd5: uVar6 = 0; DAT_00d0b728 = uVar1; } } else { uVar6 = 0; } LAB_0016cbde: if (DAT_00d0b770 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d0b730); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar6 & 0xffffffff; }
291
rapidcsv::Document::ReadCsv(std::istream&)
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
void ReadCsv(std::istream& pStream) { Clear(); pStream.seekg(0, std::ios::end); std::streamsize length = pStream.tellg(); pStream.seekg(0, std::ios::beg); #ifdef HAS_CODECVT std::vector<char> bom2b(2, '\0'); if (length >= 2) { pStream.read(bom2b.data(), 2); pStream.seekg(0, std::ios::beg); } static const std::vector<char> bomU16le = { '\xff', '\xfe' }; static const std::vector<char> bomU16be = { '\xfe', '\xff' }; if ((bom2b == bomU16le) || (bom2b == bomU16be)) { mIsUtf16 = true; mIsLE = (bom2b == bomU16le); std::wifstream wstream; wstream.exceptions(std::wifstream::failbit | std::wifstream::badbit); wstream.open(mPath, std::ios::binary); if (mIsLE) { wstream.imbue(std::locale(wstream.getloc(), new std::codecvt_utf16<wchar_t, 0x10ffff, static_cast<std::codecvt_mode>(std::consume_header | std::little_endian)>)); } else { wstream.imbue(std::locale(wstream.getloc(), new std::codecvt_utf16<wchar_t, 0x10ffff, std::consume_header>)); } std::wstringstream wss; wss << wstream.rdbuf(); std::string utf8 = ToString(wss.str()); std::stringstream ss(utf8); ParseCsv(ss, static_cast<std::streamsize>(utf8.size())); } else #endif { // check for UTF-8 Byte order mark and skip it when found if (length >= 3) { std::vector<char> bom3b(3, '\0'); pStream.read(bom3b.data(), 3); if (bom3b != s_Utf8BOM) { // file does not start with a UTF-8 Byte order mark pStream.seekg(0, std::ios::beg); } else { // file did start with a UTF-8 Byte order mark, simply skip it length -= 3; mHasUtf8BOM = true; } } ParseCsv(pStream, length); } }
O1
c
rapidcsv::Document::ReadCsv(std::istream&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 callq 0x1d7d6 movq %rbx, %rdi xorl %esi, %esi movl $0x2, %edx callq 0xb580 movq %rbx, %rdi callq 0xb760 movq %rax, %r15 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xb580 cmpq $0x3, %r15 jl 0x1d797 movl $0x3, %edi callq 0xb3e0 movq %rax, %r12 movw $0x0, (%rax) movb $0x0, 0x2(%rax) movl $0x3, %edx movq %rbx, %rdi movq %rax, %rsi callq 0xb510 movq 0x3cd0a(%rip), %rcx # 0x5a460 movq 0x3ccfb(%rip), %rax # 0x5a458 subq %rax, %rcx cmpq $0x3, %rcx jne 0x1d77e movzwl (%r12), %ecx xorw (%rax), %cx movb 0x2(%r12), %dl xorb 0x2(%rax), %dl movzbl %dl, %eax orw %cx, %ax je 0x1d7b0 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xb580 movl $0x3, %esi movq %r12, %rdi callq 0xb400 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1d832 addq $-0x3, %r15 movb $0x1, 0xe0(%r14) jmp 0x1d78a movq %rax, %rbx movl $0x3, %esi movq %r12, %rdi callq 0xb400 movq %rbx, %rdi callq 0xb780
_ZN8rapidcsv8Document7ReadCsvERSi: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi call _ZN8rapidcsv8Document5ClearEv; rapidcsv::Document::Clear(void) mov rdi, rbx xor esi, esi mov edx, 2 call __ZNSi5seekgElSt12_Ios_Seekdir; std::istream::seekg(long,std::_Ios_Seekdir) mov rdi, rbx; this call __ZNSi5tellgEv; std::istream::tellg(void) mov r15, rax mov rdi, rbx xor esi, esi xor edx, edx call __ZNSi5seekgElSt12_Ios_Seekdir; std::istream::seekg(long,std::_Ios_Seekdir) cmp r15, 3 jl short loc_1D797 mov edi, 3; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax mov word ptr [rax], 0 mov byte ptr [rax+2], 0 mov edx, 3; __int64 mov rdi, rbx; this mov rsi, rax; char * call __ZNSi4readEPcl; std::istream::read(char *,long) mov rcx, cs:qword_5A460 mov rax, cs:_ZN8rapidcsvL9s_Utf8BOME; rapidcsv::s_Utf8BOM sub rcx, rax cmp rcx, 3 jnz short loc_1D77E movzx ecx, word ptr [r12] xor cx, [rax] mov dl, [r12+2] xor dl, [rax+2] movzx eax, dl or ax, cx jz short loc_1D7B0 loc_1D77E: mov rdi, rbx xor esi, esi xor edx, edx call __ZNSi5seekgElSt12_Ios_Seekdir; std::istream::seekg(long,std::_Ios_Seekdir) loc_1D78A: mov esi, 3; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) loc_1D797: mov rdi, r14; this mov rsi, rbx; std::istream * mov rdx, r15; __int64 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN8rapidcsv8Document8ParseCsvERSil; rapidcsv::Document::ParseCsv(std::istream &,long) loc_1D7B0: add r15, 0FFFFFFFFFFFFFFFDh mov byte ptr [r14+0E0h], 1 jmp short loc_1D78A mov rbx, rax mov esi, 3; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume
long long rapidcsv::Document::ReadCsv(rapidcsv::Document *this, std::istream *a2) { long long v2; // r15 char *v3; // r12 rapidcsv::Document::Clear(this); std::istream::seekg(a2, 0LL, 2LL); v2 = std::istream::tellg(a2); std::istream::seekg(a2, 0LL, 0LL); if ( v2 >= 3 ) { v3 = (char *)operator new(3uLL); *(_WORD *)v3 = 0; v3[2] = 0; std::istream::read(a2, v3, 3LL); if ( qword_5A460 - (_QWORD)rapidcsv::s_Utf8BOM == 3 && !((unsigned __int16)(*(_WORD *)rapidcsv::s_Utf8BOM ^ *(_WORD *)v3) | (unsigned __int8)(rapidcsv::s_Utf8BOM[2] ^ v3[2])) ) { v2 -= 3LL; *((_BYTE *)this + 224) = 1; } else { std::istream::seekg(a2, 0LL, 0LL); } operator delete(v3, 3uLL); } return rapidcsv::Document::ParseCsv(this, a2, v2); }
ReadCsv: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CALL 0x0011d7d6 MOV RDI,RBX XOR ESI,ESI MOV EDX,0x2 CALL 0x0010b580 MOV RDI,RBX CALL 0x0010b760 MOV R15,RAX MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0010b580 CMP R15,0x3 JL 0x0011d797 MOV EDI,0x3 CALL 0x0010b3e0 MOV R12,RAX MOV word ptr [RAX],0x0 MOV byte ptr [RAX + 0x2],0x0 LAB_0011d73f: MOV EDX,0x3 MOV RDI,RBX MOV RSI,RAX CALL 0x0010b510 MOV RCX,qword ptr [0x0015a460] MOV RAX,qword ptr [0x0015a458] SUB RCX,RAX CMP RCX,0x3 JNZ 0x0011d77e MOVZX ECX,word ptr [R12] XOR CX,word ptr [RAX] MOV DL,byte ptr [R12 + 0x2] XOR DL,byte ptr [RAX + 0x2] MOVZX EAX,DL OR AX,CX JZ 0x0011d7b0 LAB_0011d77e: MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0010b580 LAB_0011d78a: MOV ESI,0x3 MOV RDI,R12 CALL 0x0010b400 LAB_0011d797: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0011d832 LAB_0011d7b0: ADD R15,-0x3 MOV byte ptr [R14 + 0xe0],0x1 JMP 0x0011d78a
/* rapidcsv::Document::ReadCsv(std::istream&) */ void __thiscall rapidcsv::Document::ReadCsv(Document *this,istream *param_1) { long lVar1; short *psVar2; Clear(this); std::istream::seekg(param_1,0,2); lVar1 = std::istream::tellg(); std::istream::seekg(param_1,0,0); if (2 < lVar1) { psVar2 = (short *)operator_new(3); *psVar2 = 0; *(int1 *)(psVar2 + 1) = 0; /* try { // try from 0011d73f to 0011d789 has its CatchHandler @ 0011d7be */ std::istream::read((char *)param_1,(long)psVar2); if ((DAT_0015a460 - (long)s_Utf8BOM == 3) && ((char)psVar2[1] == (char)s_Utf8BOM[1] && *psVar2 == *s_Utf8BOM)) { lVar1 = lVar1 + -3; this[0xe0] = (Document)0x1; } else { std::istream::seekg(param_1,0,0); } operator_delete(psVar2,3); } ParseCsv(this,param_1,lVar1); return; }
292
testing::internal::CreateCodePointFromUtf16SurrogatePair(wchar_t, wchar_t)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
inline uint32_t CreateCodePointFromUtf16SurrogatePair(wchar_t first, wchar_t second) { const auto first_u = static_cast<uint32_t>(first); const auto second_u = static_cast<uint32_t>(second); const uint32_t mask = (1 << 10) - 1; return (sizeof(wchar_t) == 2) ? (((first_u & mask) << 10) | (second_u & mask)) + 0x10000 : // This function should not be called when the condition is // false, but we provide a sensible default in case it is. first_u; }
O0
cpp
testing::internal::CreateCodePointFromUtf16SurrogatePair(wchar_t, wchar_t): movl %edi, -0x4(%rsp) movl %esi, -0x8(%rsp) movl -0x4(%rsp), %eax movl %eax, -0xc(%rsp) movl -0x8(%rsp), %eax movl %eax, -0x10(%rsp) movl $0x3ff, -0x14(%rsp) # imm = 0x3FF movl -0xc(%rsp), %eax retq nopw %cs:(%rax,%rax) nop
_ZN7testing8internal37CreateCodePointFromUtf16SurrogatePairEww: mov [rsp+var_4], edi mov [rsp+var_8], esi mov eax, [rsp+var_4] mov [rsp+var_C], eax mov eax, [rsp+var_8] mov [rsp+var_10], eax mov [rsp+var_14], 3FFh mov eax, [rsp+var_C] retn
long long testing::internal::CreateCodePointFromUtf16SurrogatePair(unsigned int a1) { return a1; }
CreateCodePointFromUtf16SurrogatePair: MOV dword ptr [RSP + -0x4],EDI MOV dword ptr [RSP + -0x8],ESI MOV EAX,dword ptr [RSP + -0x4] MOV dword ptr [RSP + -0xc],EAX MOV EAX,dword ptr [RSP + -0x8] MOV dword ptr [RSP + -0x10],EAX MOV dword ptr [RSP + -0x14],0x3ff MOV EAX,dword ptr [RSP + -0xc] RET
/* testing::internal::CreateCodePointFromUtf16SurrogatePair(wchar_t, wchar_t) */ wchar_t testing::internal::CreateCodePointFromUtf16SurrogatePair(wchar_t param_1,wchar_t param_2) { return param_1; }
293
ma_tls_init
eloqsql/libmariadb/libmariadb/secure/openssl.c
void *ma_tls_init(MYSQL *mysql) { SSL *ssl= NULL; SSL_CTX *ctx= NULL; long default_options= SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; long options= 0; pthread_mutex_lock(&LOCK_openssl_config); #if OPENSSL_VERSION_NUMBER >= 0x10100000L if (!(ctx= SSL_CTX_new(TLS_client_method()))) #else if (!(ctx= SSL_CTX_new(SSLv23_client_method()))) #endif goto error; if (mysql->options.extension) options= ma_tls_version_options(mysql->options.extension->tls_version); SSL_CTX_set_options(ctx, options ? options : default_options); if (ma_tls_set_certs(mysql, ctx)) { goto error; } if (!(ssl= SSL_new(ctx))) goto error; if (!SSL_set_app_data(ssl, mysql)) goto error; pthread_mutex_unlock(&LOCK_openssl_config); return (void *)ssl; error: pthread_mutex_unlock(&LOCK_openssl_config); if (ctx) SSL_CTX_free(ctx); if (ssl) SSL_free(ssl); return NULL; }
O0
c
ma_tls_init: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq $0x0, -0x20(%rbp) movl $0x82000850, %eax # imm = 0x82000850 movq %rax, -0x28(%rbp) movq $0x0, -0x30(%rbp) leaq 0x2bf4c(%rip), %rdi # 0x66fc0 callq 0x13670 callq 0x13200 movq %rax, %rdi callq 0x13640 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x3b095 jmp 0x3b141 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x3b0be movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0xc0(%rax), %rdi callq 0x3b180 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x30(%rbp) je 0x3b0d7 movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x3b0df movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x13800 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x3b270 cmpl $0x0, %eax je 0x3b100 jmp 0x3b141 movq -0x20(%rbp), %rdi callq 0x13450 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3b115 jmp 0x3b141 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x13140 cmpl $0x0, %eax jne 0x3b12b jmp 0x3b141 leaq 0x2be8e(%rip), %rdi # 0x66fc0 callq 0x13320 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3b175 leaq 0x2be78(%rip), %rdi # 0x66fc0 callq 0x13320 cmpq $0x0, -0x20(%rbp) je 0x3b15d movq -0x20(%rbp), %rdi callq 0x13090 cmpq $0x0, -0x18(%rbp) je 0x3b16d movq -0x18(%rbp), %rdi callq 0x13280 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
ma_tls_init: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], 0 mov [rbp+var_20], 0 mov eax, 82000850h mov [rbp+var_28], rax mov [rbp+var_30], 0 lea rdi, LOCK_openssl_config call _pthread_mutex_lock call _TLS_client_method mov rdi, rax call _SSL_CTX_new mov [rbp+var_20], rax cmp rax, 0 jnz short loc_3B095 jmp loc_3B141 loc_3B095: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_3B0BE mov rax, [rbp+var_10] mov rax, [rax+480h] mov rdi, [rax+0C0h] call ma_tls_version_options mov [rbp+var_30], rax loc_3B0BE: mov rax, [rbp+var_20] mov [rbp+var_38], rax cmp [rbp+var_30], 0 jz short loc_3B0D7 mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_3B0DF loc_3B0D7: mov rax, [rbp+var_28] mov [rbp+var_40], rax loc_3B0DF: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] call _SSL_CTX_set_options mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call ma_tls_set_certs cmp eax, 0 jz short loc_3B100 jmp short loc_3B141 loc_3B100: mov rdi, [rbp+var_20] call _SSL_new mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3B115 jmp short loc_3B141 loc_3B115: mov rdi, [rbp+var_18] mov rdx, [rbp+var_10] xor esi, esi call _SSL_set_ex_data cmp eax, 0 jnz short loc_3B12B jmp short loc_3B141 loc_3B12B: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_3B175 loc_3B141: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock cmp [rbp+var_20], 0 jz short loc_3B15D mov rdi, [rbp+var_20] call _SSL_CTX_free loc_3B15D: cmp [rbp+var_18], 0 jz short loc_3B16D mov rdi, [rbp+var_18] call _SSL_free loc_3B16D: mov [rbp+var_8], 0 loc_3B175: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_tls_init(long long a1) { long long v1; // rax long long v3; // [rsp+10h] [rbp-30h] long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v5 = 0LL; v3 = 0LL; pthread_mutex_lock(&LOCK_openssl_config); v1 = TLS_client_method(); v4 = SSL_CTX_new(v1); if ( !v4 ) goto LABEL_11; if ( *(_QWORD *)(a1 + 1152) ) v3 = ma_tls_version_options(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 192LL)); if ( v3 ) SSL_CTX_set_options(v4, v3); else SSL_CTX_set_options(v4, 2181040208LL); if ( !(unsigned int)ma_tls_set_certs(a1, v4) && (v5 = SSL_new(v4)) != 0 && (unsigned int)SSL_set_ex_data(v5, 0LL, a1) ) { pthread_mutex_unlock(&LOCK_openssl_config); return v5; } else { LABEL_11: pthread_mutex_unlock(&LOCK_openssl_config); if ( v4 ) SSL_CTX_free(v4); if ( v5 ) SSL_free(v5); return 0LL; } }
ma_tls_init: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x0 MOV EAX,0x82000850 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x30],0x0 LEA RDI,[0x166fc0] CALL 0x00113670 CALL 0x00113200 MOV RDI,RAX CALL 0x00113640 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0013b095 JMP 0x0013b141 LAB_0013b095: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0013b0be MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x0013b180 MOV qword ptr [RBP + -0x30],RAX LAB_0013b0be: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0013b0d7 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x0013b0df LAB_0013b0d7: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0013b0df: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00113800 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0013b270 CMP EAX,0x0 JZ 0x0013b100 JMP 0x0013b141 LAB_0013b100: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113450 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013b115 JMP 0x0013b141 LAB_0013b115: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00113140 CMP EAX,0x0 JNZ 0x0013b12b JMP 0x0013b141 LAB_0013b12b: LEA RDI,[0x166fc0] CALL 0x00113320 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013b175 LAB_0013b141: LEA RDI,[0x166fc0] CALL 0x00113320 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013b15d MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113090 LAB_0013b15d: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013b16d MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113280 LAB_0013b16d: MOV qword ptr [RBP + -0x8],0x0 LAB_0013b175: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
SSL * ma_tls_init(void *param_1) { int iVar1; SSL_METHOD *meth; SSL_CTX *ctx; long local_48; long local_38; SSL *local_20; local_20 = (SSL *)0x0; local_38 = 0; pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); meth = (SSL_METHOD *)TLS_client_method(); ctx = SSL_CTX_new(meth); if (ctx != (SSL_CTX *)0x0) { if (*(long *)((long)param_1 + 0x480) != 0) { local_38 = ma_tls_version_options(*(int8 *)(*(long *)((long)param_1 + 0x480) + 0xc0)); } if (local_38 == 0) { local_48 = 0x82000850; } else { local_48 = local_38; } SSL_CTX_set_options(ctx,local_48); iVar1 = ma_tls_set_certs(param_1); if (((iVar1 == 0) && (local_20 = SSL_new(ctx), local_20 != (SSL *)0x0)) && (iVar1 = SSL_set_ex_data(local_20,0,param_1), iVar1 != 0)) { pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); return local_20; } } pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); if (ctx != (SSL_CTX *)0x0) { SSL_CTX_free(ctx); } if (local_20 != (SSL *)0x0) { SSL_free(local_20); } return (SSL *)0x0; }
294
unreg_request
eloqsql/mysys/mf_keycache.c
static void unreg_request(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, int at_end) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); /* Unregister the request, but do not link erroneous blocks into the LRU ring. */ if (!--block->requests && !(block->status & BLOCK_ERROR)) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && keycache->warm_blocks > keycache->min_warm_blocks; if (hot) { if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } link_block(keycache, block, hot, (my_bool)at_end); block->last_hit_time= keycache->keycache_time; keycache->keycache_time++; /* At this place, the block might be in the LRU ring or not. If an evicter was waiting for a block, it was selected for eviction and not linked in the LRU ring. */ /* Check if we should link a hot block to the warm block sub-chain. It is possible that we select the same block as above. But it can also be another block. In any case a block from the LRU ring is selected. In other words it works even if the above block was selected for eviction and not linked in the LRU ring. Since this happens only if the LRU ring is empty, the block selected below would be NULL and the rest of the function skipped. */ block= keycache->used_ins; if (block && keycache->keycache_time - block->last_hit_time > keycache->age_threshold) { unlink_block(keycache, block); link_block(keycache, block, 0, 0); if (block->temperature != BLOCK_WARM) { keycache->warm_blocks++; block->temperature= BLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } } }
O0
c
unreg_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0xe4255 jmp 0xe4257 jmp 0xe4259 jmp 0xe425b jmp 0xe425d jmp 0xe425f jmp 0xe4261 jmp 0xe4263 jmp 0xe4265 jmp 0xe4267 jmp 0xe4269 movq -0x10(%rbp), %rcx movl 0x38(%rcx), %eax addl $-0x1, %eax movl %eax, 0x38(%rcx) cmpl $0x0, %eax jne 0xe43c7 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe43c7 movq -0x10(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0xe42a9 movq -0x10(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x58(%rcx) movb %al, -0x16(%rbp) jne 0xe42d9 xorl %eax, %eax cmpl $0x0, -0x14(%rbp) movb %al, -0x16(%rbp) je 0xe42d9 movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x20(%rcx), %rax seta %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x15(%rbp) cmpb $0x0, -0x15(%rbp) je 0xe4313 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) jne 0xe4304 movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x2, 0x54(%rax) jmp 0xe4311 jmp 0xe4313 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movb -0x15(%rbp), %cl movl -0x14(%rbp), %eax movsbl %cl, %edx movsbl %al, %ecx callq 0xe5830 movq -0x8(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x8(%rbp), %rax movq 0x30(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0xe43c5 movq -0x8(%rbp), %rax movq 0x30(%rax), %rax movq -0x10(%rbp), %rcx subq 0x60(%rcx), %rax movq -0x8(%rbp), %rcx cmpq 0x28(%rcx), %rax jbe 0xe43c5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe5700 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %ecx, %ecx movl %ecx, %edx callq 0xe5830 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) je 0xe43bf movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x1, 0x54(%rax) jmp 0xe43c1 jmp 0xe43c3 jmp 0xe43c5 jmp 0xe43c7 addq $0x20, %rsp popq %rbp retq nopl (%rax)
unreg_request_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_E4255: jmp short $+2 loc_E4257: jmp short $+2 loc_E4259: jmp short $+2 loc_E425B: jmp short $+2 loc_E425D: jmp short $+2 loc_E425F: jmp short $+2 loc_E4261: jmp short $+2 loc_E4263: jmp short $+2 loc_E4265: jmp short $+2 loc_E4267: jmp short $+2 loc_E4269: mov rcx, [rbp+var_10] mov eax, [rcx+38h] add eax, 0FFFFFFFFh mov [rcx+38h], eax cmp eax, 0 jnz loc_E43C7 mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz loc_E43C7 mov rax, [rbp+var_10] cmp dword ptr [rax+58h], 0 jz short loc_E42A9 mov rax, [rbp+var_10] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx loc_E42A9: mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+58h], 0 mov [rbp+var_16], al jnz short loc_E42D9 xor eax, eax cmp [rbp+var_14], 0 mov [rbp+var_16], al jz short loc_E42D9 mov rax, [rbp+var_8] mov rax, [rax+68h] mov rcx, [rbp+var_8] cmp rax, [rcx+20h] setnbe al mov [rbp+var_16], al loc_E42D9: mov al, [rbp+var_16] and al, 1 movzx eax, al mov [rbp+var_15], al cmp [rbp+var_15], 0 jz short loc_E4313 mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jnz short loc_E4304 mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+68h], rcx loc_E4304: mov rax, [rbp+var_10] mov dword ptr [rax+54h], 2 jmp short $+2 loc_E4311: jmp short $+2 loc_E4313: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov cl, [rbp+var_15] mov eax, [rbp+var_14] movsx edx, cl movsx ecx, al call link_block_0 mov rax, [rbp+var_8] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+60h], rcx mov rax, [rbp+var_8] mov rcx, [rax+30h] add rcx, 1 mov [rax+30h], rcx mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_E43C5 mov rax, [rbp+var_8] mov rax, [rax+30h] mov rcx, [rbp+var_10] sub rax, [rcx+60h] mov rcx, [rbp+var_8] cmp rax, [rcx+28h] jbe short loc_E43C5 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block_0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor ecx, ecx mov edx, ecx call link_block_0 mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jz short loc_E43BF mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 1 mov [rax+68h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+54h], 1 loc_E43BF: jmp short $+2 loc_E43C1: jmp short $+2 loc_E43C3: jmp short $+2 loc_E43C5: jmp short $+2 loc_E43C7: add rsp, 20h pop rbp retn
unsigned long long unreg_request_0(_QWORD *a1, long long a2, int a3) { unsigned long long result; // rax bool v4; // [rsp+Ah] [rbp-16h] unsigned long long v5; // [rsp+10h] [rbp-10h] result = (unsigned int)(*(_DWORD *)(a2 + 56) - 1); *(_DWORD *)(a2 + 56) = result; if ( !(_DWORD)result ) { result = *(_DWORD *)(a2 + 80) & 1; if ( !(_DWORD)result ) { if ( *(_DWORD *)(a2 + 88) ) --*(_DWORD *)(a2 + 88); v4 = 0; if ( !*(_DWORD *)(a2 + 88) ) { v4 = 0; if ( a3 ) v4 = a1[13] > a1[4]; } if ( v4 ) { if ( *(_DWORD *)(a2 + 84) == 1 ) --a1[13]; *(_DWORD *)(a2 + 84) = 2; } link_block_0(a1, a2, v4, (unsigned int)(char)a3); *(_QWORD *)(a2 + 96) = a1[6]++; result = a1[23]; v5 = result; if ( result ) { result = a1[6] - *(_QWORD *)(result + 96); if ( result > a1[5] ) { unlink_block_0(a1, v5); link_block_0(a1, v5, 0LL, 0LL); result = v5; if ( *(_DWORD *)(v5 + 84) != 1 ) { ++a1[13]; result = v5; *(_DWORD *)(v5 + 84) = 1; } } } } } return result; }
unreg_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x001e4255 LAB_001e4255: JMP 0x001e4257 LAB_001e4257: JMP 0x001e4259 LAB_001e4259: JMP 0x001e425b LAB_001e425b: JMP 0x001e425d LAB_001e425d: JMP 0x001e425f LAB_001e425f: JMP 0x001e4261 LAB_001e4261: JMP 0x001e4263 LAB_001e4263: JMP 0x001e4265 LAB_001e4265: JMP 0x001e4267 LAB_001e4267: JMP 0x001e4269 LAB_001e4269: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x38] ADD EAX,-0x1 MOV dword ptr [RCX + 0x38],EAX CMP EAX,0x0 JNZ 0x001e43c7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e43c7 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x58],0x0 JZ 0x001e42a9 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX LAB_001e42a9: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x58],0x0 MOV byte ptr [RBP + -0x16],AL JNZ 0x001e42d9 XOR EAX,EAX CMP dword ptr [RBP + -0x14],0x0 MOV byte ptr [RBP + -0x16],AL JZ 0x001e42d9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x20] SETA AL MOV byte ptr [RBP + -0x16],AL LAB_001e42d9: MOV AL,byte ptr [RBP + -0x16] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x15],AL CMP byte ptr [RBP + -0x15],0x0 JZ 0x001e4313 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JNZ 0x001e4304 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,-0x1 MOV qword ptr [RAX + 0x68],RCX LAB_001e4304: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x2 JMP 0x001e4311 LAB_001e4311: JMP 0x001e4313 LAB_001e4313: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV CL,byte ptr [RBP + -0x15] MOV EAX,dword ptr [RBP + -0x14] MOVSX EDX,CL MOVSX ECX,AL CALL 0x001e5830 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x30] ADD RCX,0x1 MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x001e43c5 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX + 0x60] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x28] JBE 0x001e43c5 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001e5700 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR ECX,ECX MOV EDX,ECX CALL 0x001e5830 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JZ 0x001e43bf MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,0x1 MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x1 LAB_001e43bf: JMP 0x001e43c1 LAB_001e43c1: JMP 0x001e43c3 LAB_001e43c3: JMP 0x001e43c5 LAB_001e43c5: JMP 0x001e43c7 LAB_001e43c7: ADD RSP,0x20 POP RBP RET
void unreg_request(long param_1,long param_2,int param_3) { long lVar1; int iVar2; bool local_1e; iVar2 = *(int *)(param_2 + 0x38) + -1; *(int *)(param_2 + 0x38) = iVar2; if ((iVar2 == 0) && ((*(uint *)(param_2 + 0x50) & 1) == 0)) { if (*(int *)(param_2 + 0x58) != 0) { *(int *)(param_2 + 0x58) = *(int *)(param_2 + 0x58) + -1; } local_1e = false; if ((*(int *)(param_2 + 0x58) == 0) && (local_1e = false, param_3 != 0)) { local_1e = *(ulong *)(param_1 + 0x20) < *(ulong *)(param_1 + 0x68); } if (local_1e != false) { if (*(int *)(param_2 + 0x54) == 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1; } *(int4 *)(param_2 + 0x54) = 2; } link_block(param_1,param_2,local_1e,(int)(char)param_3); *(int8 *)(param_2 + 0x60) = *(int8 *)(param_1 + 0x30); *(long *)(param_1 + 0x30) = *(long *)(param_1 + 0x30) + 1; lVar1 = *(long *)(param_1 + 0xb8); if ((lVar1 != 0) && (*(ulong *)(param_1 + 0x28) < (ulong)(*(long *)(param_1 + 0x30) - *(long *)(lVar1 + 0x60)))) { unlink_block(param_1,lVar1); link_block(param_1,lVar1,0); if (*(int *)(lVar1 + 0x54) != 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; *(int4 *)(lVar1 + 0x54) = 1; } } } return; }
295
unreg_request
eloqsql/mysys/mf_keycache.c
static void unreg_request(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, int at_end) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); /* Unregister the request, but do not link erroneous blocks into the LRU ring. */ if (!--block->requests && !(block->status & BLOCK_ERROR)) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && keycache->warm_blocks > keycache->min_warm_blocks; if (hot) { if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } link_block(keycache, block, hot, (my_bool)at_end); block->last_hit_time= keycache->keycache_time; keycache->keycache_time++; /* At this place, the block might be in the LRU ring or not. If an evicter was waiting for a block, it was selected for eviction and not linked in the LRU ring. */ /* Check if we should link a hot block to the warm block sub-chain. It is possible that we select the same block as above. But it can also be another block. In any case a block from the LRU ring is selected. In other words it works even if the above block was selected for eviction and not linked in the LRU ring. Since this happens only if the LRU ring is empty, the block selected below would be NULL and the rest of the function skipped. */ block= keycache->used_ins; if (block && keycache->keycache_time - block->last_hit_time > keycache->age_threshold) { unlink_block(keycache, block); link_block(keycache, block, 0, 0); if (block->temperature != BLOCK_WARM) { keycache->warm_blocks++; block->temperature= BLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } } }
O3
c
unreg_request: decl 0x38(%rsi) je 0x980b2 retq pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 testb $0x1, 0x50(%rsi) jne 0x98198 movq %rdi, %rbx movl 0x58(%r14), %eax testl %eax, %eax je 0x980dc decl %eax movl %eax, 0x58(%r14) sete %al jmp 0x980de movb $0x1, %al testl %edx, %edx sete %cl xorb $0x1, %al orb %cl, %al jne 0x98136 movq 0x68(%rbx), %rax cmpq 0x20(%rbx), %rax jbe 0x98136 cmpl $0x1, 0x54(%r14) jne 0x98101 decq %rax movq %rax, 0x68(%rbx) movl $0x2, 0x54(%r14) movq 0xb8(%rbx), %rax testq %rax, %rax je 0x9819d movq (%rax), %rcx movq %r14, 0x8(%rcx) movq (%rax), %rcx movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rax) movq %r14, 0xb8(%rbx) jmp 0x98146 movsbl %dl, %ecx movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x98b13 movq 0x30(%rbx), %rax movq %rax, 0x60(%r14) incq %rax movq %rax, 0x30(%rbx) movq 0xb8(%rbx), %r14 testq %r14, %r14 je 0x98198 subq 0x60(%r14), %rax cmpq 0x28(%rbx), %rax jbe 0x98198 movq %rbx, %rdi movq %r14, %rsi callq 0x98abc movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x98b13 cmpl $0x1, 0x54(%r14) je 0x98198 incq 0x68(%rbx) movl $0x1, 0x54(%r14) popq %rbx popq %r14 popq %rbp retq movq %r14, (%r14) movq %r14, 0xb8(%rbx) movq %r14, 0xb0(%rbx) movq %r14, 0x8(%r14) jmp 0x98146
unreg_request_0: dec dword ptr [rsi+38h] jz short loc_980B2 retn loc_980B2: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi test byte ptr [rsi+50h], 1 jnz loc_98198 mov rbx, rdi mov eax, [r14+58h] test eax, eax jz short loc_980DC dec eax mov [r14+58h], eax setz al jmp short loc_980DE loc_980DC: mov al, 1 loc_980DE: test edx, edx setz cl xor al, 1 or al, cl jnz short loc_98136 mov rax, [rbx+68h] cmp rax, [rbx+20h] jbe short loc_98136 cmp dword ptr [r14+54h], 1 jnz short loc_98101 dec rax mov [rbx+68h], rax loc_98101: mov dword ptr [r14+54h], 2 mov rax, [rbx+0B8h] test rax, rax jz loc_9819D mov rcx, [rax] mov [rcx+8], r14 mov rcx, [rax] mov [r14], rcx mov [r14+8], rax mov [rax], r14 mov [rbx+0B8h], r14 jmp short loc_98146 loc_98136: movsx ecx, dl mov rdi, rbx mov rsi, r14 xor edx, edx call link_block_0 loc_98146: mov rax, [rbx+30h] mov [r14+60h], rax inc rax mov [rbx+30h], rax mov r14, [rbx+0B8h] test r14, r14 jz short loc_98198 sub rax, [r14+60h] cmp rax, [rbx+28h] jbe short loc_98198 mov rdi, rbx mov rsi, r14 call unlink_block_0 mov rdi, rbx mov rsi, r14 xor edx, edx xor ecx, ecx call link_block_0 cmp dword ptr [r14+54h], 1 jz short loc_98198 inc qword ptr [rbx+68h] mov dword ptr [r14+54h], 1 loc_98198: pop rbx pop r14 pop rbp retn loc_9819D: mov [r14], r14 mov [rbx+0B8h], r14 mov [rbx+0B0h], r14 mov [r14+8], r14 jmp short loc_98146
void unreg_request_0(_QWORD *a1, long long a2, long long a3) { bool v3; // zf int v4; // eax int v5; // eax bool v6; // al unsigned long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // r14 v3 = (*(_DWORD *)(a2 + 56))-- == 1; if ( v3 && (*(_BYTE *)(a2 + 80) & 1) == 0 ) { v4 = *(_DWORD *)(a2 + 88); if ( v4 ) { v5 = v4 - 1; *(_DWORD *)(a2 + 88) = v5; v6 = v5 == 0; } else { v6 = 1; } if ( (_DWORD)a3 == 0 || !v6 || (v7 = a1[13], v7 <= a1[4]) ) { link_block_0(a1, a2, 0LL, (unsigned int)(char)a3); } else { if ( *(_DWORD *)(a2 + 84) == 1 ) a1[13] = v7 - 1; *(_DWORD *)(a2 + 84) = 2; v8 = a1[23]; if ( v8 ) { *(_QWORD *)(*(_QWORD *)v8 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v8; *(_QWORD *)(a2 + 8) = v8; *(_QWORD *)v8 = a2; a1[23] = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } } v9 = a1[6]; *(_QWORD *)(a2 + 96) = v9; v10 = v9 + 1; a1[6] = v10; v11 = a1[23]; if ( v11 && (unsigned long long)(v10 - *(_QWORD *)(v11 + 96)) > a1[5] ) { unlink_block_0(a1, a1[23], a3); link_block_0(a1, v11, 0LL, 0LL); if ( *(_DWORD *)(v11 + 84) != 1 ) { ++a1[13]; *(_DWORD *)(v11 + 84) = 1; } } } }
unreg_request: DEC dword ptr [RSI + 0x38] JZ 0x001980b2 RET LAB_001980b2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI TEST byte ptr [RSI + 0x50],0x1 JNZ 0x00198198 MOV RBX,RDI MOV EAX,dword ptr [R14 + 0x58] TEST EAX,EAX JZ 0x001980dc DEC EAX MOV dword ptr [R14 + 0x58],EAX SETZ AL JMP 0x001980de LAB_001980dc: MOV AL,0x1 LAB_001980de: TEST EDX,EDX SETZ CL XOR AL,0x1 OR AL,CL JNZ 0x00198136 MOV RAX,qword ptr [RBX + 0x68] CMP RAX,qword ptr [RBX + 0x20] JBE 0x00198136 CMP dword ptr [R14 + 0x54],0x1 JNZ 0x00198101 DEC RAX MOV qword ptr [RBX + 0x68],RAX LAB_00198101: MOV dword ptr [R14 + 0x54],0x2 MOV RAX,qword ptr [RBX + 0xb8] TEST RAX,RAX JZ 0x0019819d MOV RCX,qword ptr [RAX] MOV qword ptr [RCX + 0x8],R14 MOV RCX,qword ptr [RAX] MOV qword ptr [R14],RCX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [RAX],R14 MOV qword ptr [RBX + 0xb8],R14 JMP 0x00198146 LAB_00198136: MOVSX ECX,DL MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00198b13 LAB_00198146: MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x60],RAX INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R14,qword ptr [RBX + 0xb8] TEST R14,R14 JZ 0x00198198 SUB RAX,qword ptr [R14 + 0x60] CMP RAX,qword ptr [RBX + 0x28] JBE 0x00198198 MOV RDI,RBX MOV RSI,R14 CALL 0x00198abc MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x00198b13 CMP dword ptr [R14 + 0x54],0x1 JZ 0x00198198 INC qword ptr [RBX + 0x68] MOV dword ptr [R14 + 0x54],0x1 LAB_00198198: POP RBX POP R14 POP RBP RET LAB_0019819d: MOV qword ptr [R14],R14 MOV qword ptr [RBX + 0xb8],R14 MOV qword ptr [RBX + 0xb0],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x00198146
void unreg_request(long param_1,long *param_2,int param_3) { long *plVar1; long lVar2; int iVar3; long lVar4; bool bVar5; plVar1 = param_2 + 7; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 != 0) { return; } if ((*(byte *)(param_2 + 10) & 1) == 0) { if ((int)param_2[0xb] == 0) { bVar5 = true; } else { iVar3 = (int)param_2[0xb] + -1; bVar5 = iVar3 == 0; *(int *)(param_2 + 0xb) = iVar3; } if (((bool)(bVar5 ^ 1U | param_3 == 0)) || (*(ulong *)(param_1 + 0x68) <= *(ulong *)(param_1 + 0x20))) { link_block(param_1,param_2,0,(int)(char)param_3); } else { if (*(int *)((long)param_2 + 0x54) == 1) { *(ulong *)(param_1 + 0x68) = *(ulong *)(param_1 + 0x68) - 1; } *(int4 *)((long)param_2 + 0x54) = 2; plVar1 = *(long **)(param_1 + 0xb8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; *(long **)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; } } lVar4 = *(long *)(param_1 + 0x30); param_2[0xc] = lVar4; lVar4 = lVar4 + 1; *(long *)(param_1 + 0x30) = lVar4; lVar2 = *(long *)(param_1 + 0xb8); if ((lVar2 != 0) && (*(ulong *)(param_1 + 0x28) < (ulong)(lVar4 - *(long *)(lVar2 + 0x60)))) { unlink_block(param_1,lVar2); link_block(param_1,lVar2,0,0); if (*(int *)(lVar2 + 0x54) != 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; *(int4 *)(lVar2 + 0x54) = 1; } } } return; }
296
ggml_set_zero
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_set_zero(struct ggml_tensor * tensor) { if (ggml_is_empty(tensor)) { return tensor; } if (tensor->buffer) { ggml_backend_tensor_memset(tensor, 0, 0, ggml_nbytes(tensor)); } else { GGML_ASSERT(tensor->data); memset(tensor->data, 0, ggml_nbytes(tensor)); } return tensor; }
O3
c
ggml_set_zero: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0x10(%rdi) je 0x21fa9 movl $0x3, %eax cmpq $0x6, %rax je 0x21f68 leaq 0x1(%rax), %rcx cmpq $0x0, (%rbx,%rax,8) movq %rcx, %rax jne 0x21f4a addq $-0x4, %rcx cmpq $0x3, %rcx jb 0x21fa9 cmpq $0x0, 0x8(%rbx) je 0x21f88 movq %rbx, %rdi callq 0x161c0 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx movq %rax, %rcx callq 0x17920 jmp 0x21fa9 movq 0xf8(%rbx), %r14 testq %r14, %r14 je 0x21fb4 movq %rbx, %rdi callq 0x161c0 movq %r14, %rdi xorl %esi, %esi movq %rax, %rdx callq 0x168e0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x28658(%rip), %rdi # 0x4a613 leaq 0x2869b(%rip), %rdx # 0x4a65d leaq 0x29740(%rip), %rcx # 0x4b709 movl $0x179c, %esi # imm = 0x179C xorl %eax, %eax callq 0x17c60
ggml_set_zero: push r14 push rbx push rax mov rbx, rdi cmp qword ptr [rdi+10h], 0 jz short loc_21FA9 mov eax, 3 loc_21F4A: cmp rax, 6 jz short loc_21F68 lea rcx, [rax+1] cmp qword ptr [rbx+rax*8], 0 mov rax, rcx jnz short loc_21F4A add rcx, 0FFFFFFFFFFFFFFFCh cmp rcx, 3 jb short loc_21FA9 loc_21F68: cmp qword ptr [rbx+8], 0 jz short loc_21F88 mov rdi, rbx call _ggml_nbytes mov rdi, rbx xor esi, esi xor edx, edx mov rcx, rax call _ggml_backend_tensor_memset jmp short loc_21FA9 loc_21F88: mov r14, [rbx+0F8h] test r14, r14 jz short loc_21FB4 mov rdi, rbx call _ggml_nbytes mov rdi, r14 xor esi, esi mov rdx, rax call _memset loc_21FA9: mov rax, rbx add rsp, 8 pop rbx pop r14 retn loc_21FB4: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorData; "tensor->data" mov esi, 179Ch xor eax, eax call _ggml_abort
long long ggml_set_zero(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax long long v7; // rcx unsigned long long v9; // rax long long v10; // r14 unsigned long long v11; // rax if ( *(_QWORD *)(a1 + 16) ) { v6 = 3LL; while ( v6 != 6 ) { v7 = v6 + 1; if ( *(_QWORD *)(a1 + 8 * v6++) == 0LL ) { if ( (unsigned long long)(v7 - 4) < 3 ) return a1; break; } } if ( *(_QWORD *)(a1 + 8) ) { v9 = ggml_nbytes((unsigned int *)a1); ggml_backend_tensor_memset(a1, 0LL, 0LL, v9); } else { v10 = *(_QWORD *)(a1 + 248); if ( !v10 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 6044, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"tensor->data", a5, a6); v11 = ggml_nbytes((unsigned int *)a1); memset(v10, 0LL, v11); } } return a1; }
ggml_set_zero: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [RDI + 0x10],0x0 JZ 0x00121fa9 MOV EAX,0x3 LAB_00121f4a: CMP RAX,0x6 JZ 0x00121f68 LEA RCX,[RAX + 0x1] CMP qword ptr [RBX + RAX*0x8],0x0 MOV RAX,RCX JNZ 0x00121f4a ADD RCX,-0x4 CMP RCX,0x3 JC 0x00121fa9 LAB_00121f68: CMP qword ptr [RBX + 0x8],0x0 JZ 0x00121f88 MOV RDI,RBX CALL 0x001161c0 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX MOV RCX,RAX CALL 0x00117920 JMP 0x00121fa9 LAB_00121f88: MOV R14,qword ptr [RBX + 0xf8] TEST R14,R14 JZ 0x00121fb4 MOV RDI,RBX CALL 0x001161c0 MOV RDI,R14 XOR ESI,ESI MOV RDX,RAX CALL 0x001168e0 LAB_00121fa9: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_00121fb4: LEA RDI,[0x14a613] LEA RDX,[0x14a65d] LEA RCX,[0x14b709] MOV ESI,0x179c XOR EAX,EAX CALL 0x00117c60
long ggml_set_zero(long param_1) { void *__s; long lVar1; long lVar2; int8 uVar3; size_t __n; if (*(long *)(param_1 + 0x10) != 0) { lVar1 = 3; do { lVar2 = lVar1; if (lVar2 == 6) goto LAB_00121f68; lVar1 = lVar2 + 1; } while (*(long *)(param_1 + lVar2 * 8) != 0); if (2 < lVar2 - 3U) { LAB_00121f68: if (*(long *)(param_1 + 8) == 0) { __s = *(void **)(param_1 + 0xf8); if (__s == (void *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 0x179c,"GGML_ASSERT(%s) failed","tensor->data"); } __n = ggml_nbytes(param_1); memset(__s,0,__n); } else { uVar3 = ggml_nbytes(param_1); ggml_backend_tensor_memset(param_1,0,0,uVar3); } } } return param_1; }
297
OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get(unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp
Point2ndDerivWeight<REAL> Get(size_t index) { return Point2ndDerivWeight<REAL>(_tbl->_weights[index], _tbl->_duWeights[index], _tbl->_dvWeights[index], _tbl->_duuWeights[index], _tbl->_duvWeights[index], _tbl->_dvvWeights[index]); }
O0
cpp
OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get(unsigned long): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x38(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x8(%rbp) movq %rdx, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x40(%rbp) movq (%rax), %rdi addq $0x30, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq %rax, %rcx movq -0x40(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, -0x2c(%rbp) movq (%rax), %rdi addq $0x48, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq %rax, %rcx movq -0x40(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, -0x28(%rbp) movq (%rax), %rdi addq $0x60, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq %rax, %rcx movq -0x40(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, -0x24(%rbp) movq (%rax), %rdi addq $0x78, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq %rax, %rcx movq -0x40(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, -0x20(%rbp) movq (%rax), %rdi addq $0x90, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq %rax, %rcx movq -0x40(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, -0x1c(%rbp) movq (%rax), %rdi addq $0xa8, %rdi movq -0x10(%rbp), %rsi callq 0xd6c50 movq -0x38(%rbp), %rdi movss -0x2c(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 movss -0x24(%rbp), %xmm2 movss -0x20(%rbp), %xmm3 movss -0x1c(%rbp), %xmm4 movss (%rax), %xmm5 callq 0xd2ed0 movq -0x18(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIfE24Point2ndDerivAccumulator3GetEm: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_18], rdi mov [rbp+var_8], rsi mov [rbp+var_10], rdx mov rax, [rbp+var_8] mov [rbp+var_40], rax mov rdi, [rax] add rdi, 30h ; '0' mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] movss xmm0, dword ptr [rcx] movss [rbp+var_2C], xmm0 mov rdi, [rax] add rdi, 48h ; 'H' mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] movss xmm0, dword ptr [rcx] movss [rbp+var_28], xmm0 mov rdi, [rax] add rdi, 60h ; '`' mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] movss xmm0, dword ptr [rcx] movss [rbp+var_24], xmm0 mov rdi, [rax] add rdi, 78h ; 'x' mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] movss xmm0, dword ptr [rcx] movss [rbp+var_20], xmm0 mov rdi, [rax] add rdi, 90h mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] movss xmm0, dword ptr [rcx] movss [rbp+var_1C], xmm0 mov rdi, [rax] add rdi, 0A8h mov rsi, [rbp+var_10] call __ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rdi, [rbp+var_38] movss xmm0, [rbp+var_2C] movss xmm1, [rbp+var_28] movss xmm2, [rbp+var_24] movss xmm3, [rbp+var_20] movss xmm4, [rbp+var_1C] movss xmm5, dword ptr [rax] call __ZN10OpenSubdiv6v3_6_03Far8internal19Point2ndDerivWeightIfEC2Effffff; OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>::Point2ndDerivWeight(float,float,float,float,float,float) mov rax, [rbp+var_18] add rsp, 40h pop rbp retn
long long OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get( long long a1, _QWORD *a2, long long a3) { float *v3; // rax float v5; // [rsp+14h] [rbp-2Ch] float v6; // [rsp+18h] [rbp-28h] float v7; // [rsp+1Ch] [rbp-24h] float v8; // [rsp+20h] [rbp-20h] float v9; // [rsp+24h] [rbp-1Ch] v5 = *(float *)std::vector<float>::operator[](*a2 + 48LL, a3); v6 = *(float *)std::vector<float>::operator[](*a2 + 72LL, a3); v7 = *(float *)std::vector<float>::operator[](*a2 + 96LL, a3); v8 = *(float *)std::vector<float>::operator[](*a2 + 120LL, a3); v9 = *(float *)std::vector<float>::operator[](*a2 + 144LL, a3); v3 = (float *)std::vector<float>::operator[](*a2 + 168LL, a3); OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>::Point2ndDerivWeight(a1, v5, v6, v7, v8, v9, *v3); return a1; }
298
OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get(unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp
Point2ndDerivWeight<REAL> Get(size_t index) { return Point2ndDerivWeight<REAL>(_tbl->_weights[index], _tbl->_duWeights[index], _tbl->_dvWeights[index], _tbl->_duuWeights[index], _tbl->_duvWeights[index], _tbl->_dvvWeights[index]); }
O2
cpp
OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get(unsigned long): movq %rdi, %rax movq (%rsi), %rcx movq 0x30(%rcx), %rsi movq 0x48(%rcx), %rdi movss (%rsi,%rdx,4), %xmm0 movss (%rdi,%rdx,4), %xmm1 movq 0x60(%rcx), %rsi movss (%rsi,%rdx,4), %xmm2 movq 0x78(%rcx), %rsi movss (%rsi,%rdx,4), %xmm3 movq 0x90(%rcx), %rsi movss (%rsi,%rdx,4), %xmm4 movq 0xa8(%rcx), %rcx movss (%rcx,%rdx,4), %xmm5 movss %xmm0, (%rax) movss %xmm1, 0x4(%rax) movss %xmm2, 0x8(%rax) movss %xmm3, 0xc(%rax) movss %xmm4, 0x10(%rax) movss %xmm5, 0x14(%rax) retq
_ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIfE24Point2ndDerivAccumulator3GetEm: mov rax, rdi mov rcx, [rsi] mov rsi, [rcx+30h] mov rdi, [rcx+48h] movss xmm0, dword ptr [rsi+rdx*4] movss xmm1, dword ptr [rdi+rdx*4] mov rsi, [rcx+60h] movss xmm2, dword ptr [rsi+rdx*4] mov rsi, [rcx+78h] movss xmm3, dword ptr [rsi+rdx*4] mov rsi, [rcx+90h] movss xmm4, dword ptr [rsi+rdx*4] mov rcx, [rcx+0A8h] movss xmm5, dword ptr [rcx+rdx*4] movss dword ptr [rax], xmm0 movss dword ptr [rax+4], xmm1 movss dword ptr [rax+8], xmm2 movss dword ptr [rax+0Ch], xmm3 movss dword ptr [rax+10h], xmm4 movss dword ptr [rax+14h], xmm5 retn
_DWORD * OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get( _DWORD *a1, long long a2, long long a3) { _DWORD *result; // rax int v4; // xmm1_4 int v5; // xmm2_4 int v6; // xmm3_4 int v7; // xmm4_4 int v8; // xmm5_4 result = a1; v4 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 72LL) + 4 * a3); v5 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 96LL) + 4 * a3); v6 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 120LL) + 4 * a3); v7 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 144LL) + 4 * a3); v8 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 168LL) + 4 * a3); *a1 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 48LL) + 4 * a3); a1[1] = v4; a1[2] = v5; a1[3] = v6; a1[4] = v7; a1[5] = v8; return result; }
Get: MOV RAX,RDI MOV RCX,qword ptr [RSI] MOV RSI,qword ptr [RCX + 0x30] MOV RDI,qword ptr [RCX + 0x48] MOVSS XMM0,dword ptr [RSI + RDX*0x4] MOVSS XMM1,dword ptr [RDI + RDX*0x4] MOV RSI,qword ptr [RCX + 0x60] MOVSS XMM2,dword ptr [RSI + RDX*0x4] MOV RSI,qword ptr [RCX + 0x78] MOVSS XMM3,dword ptr [RSI + RDX*0x4] MOV RSI,qword ptr [RCX + 0x90] MOVSS XMM4,dword ptr [RSI + RDX*0x4] MOV RCX,qword ptr [RCX + 0xa8] MOVSS XMM5,dword ptr [RCX + RDX*0x4] MOVSS dword ptr [RAX],XMM0 MOVSS dword ptr [RAX + 0x4],XMM1 MOVSS dword ptr [RAX + 0x8],XMM2 MOVSS dword ptr [RAX + 0xc],XMM3 MOVSS dword ptr [RAX + 0x10],XMM4 MOVSS dword ptr [RAX + 0x14],XMM5 RET
/* OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get(unsigned long) */ void OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::Get (ulong param_1) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; long lVar6; long in_RDX; long *in_RSI; lVar6 = *in_RSI; uVar1 = *(int4 *)(*(long *)(lVar6 + 0x48) + in_RDX * 4); uVar2 = *(int4 *)(*(long *)(lVar6 + 0x60) + in_RDX * 4); uVar3 = *(int4 *)(*(long *)(lVar6 + 0x78) + in_RDX * 4); uVar4 = *(int4 *)(*(long *)(lVar6 + 0x90) + in_RDX * 4); uVar5 = *(int4 *)(*(long *)(lVar6 + 0xa8) + in_RDX * 4); *(int4 *)param_1 = *(int4 *)(*(long *)(lVar6 + 0x30) + in_RDX * 4); *(int4 *)(param_1 + 4) = uVar1; *(int4 *)(param_1 + 8) = uVar2; *(int4 *)(param_1 + 0xc) = uVar3; *(int4 *)(param_1 + 0x10) = uVar4; *(int4 *)(param_1 + 0x14) = uVar5; return; }
299
free_root
eloqsql/mysys/my_alloc.c
void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) /* There is no point in using mark_blocks_free when using valgrind as it will not reclaim any memory */ if (MyFlags & MY_MARK_BLOCKS_FREE) { mark_blocks_free(root); DBUG_VOID_RETURN; } #endif if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for (next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) my_free(old); } for (next=root->free ; next ;) { old=next; next= next->next; if (old != root->pre_alloc) my_free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(root->pre_alloc); root->free->next=0; } root->block_num= 4; root->first_block_usage= 0; DBUG_VOID_RETURN; }
O3
c
free_root: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx testb $0x2, %sil jne 0x9cdf8 testb $0x1, %sil jne 0x9cd91 movq $0x0, 0x10(%rbx) movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x9cdb0 movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x9cda8 callq 0x9ffe2 movq %r14, %rdi testq %r14, %r14 jne 0x9cd9a movq (%rbx), %rdi testq %rdi, %rdi je 0x9cdce movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x9cdc6 callq 0x9ffe2 movq %r14, %rdi testq %r14, %r14 jne 0x9cdb8 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq 0x10(%rbx), %rax testq %rax, %rax je 0x9ce42 movq %rax, (%rbx) movq 0x10(%rax), %rcx addq $-0x18, %rcx movq %rcx, 0x8(%rax) movq (%rbx), %rax movq $0x0, (%rax) jmp 0x9ce42 movq (%rbx), %rax movq %rbx, %rcx testq %rax, %rax je 0x9ce17 movq %rax, %rcx movq (%rax), %rax movq 0x10(%rcx), %rdx addq $-0x18, %rdx movq %rdx, 0x8(%rcx) jmp 0x9cdfe movq 0x8(%rbx), %rax movq %rax, (%rcx) testq %rax, %rax je 0x9ce3a movq (%rax), %rcx movq 0x10(%rax), %rdx addq $-0x18, %rdx movq %rdx, 0x8(%rax) movq %rcx, %rax testq %rcx, %rcx jne 0x9ce23 movq $0x0, 0x8(%rbx) movq $0x4, 0x28(%rbx) popq %rbx popq %r14 popq %rbp retq
free_root: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi test sil, 2 jnz short loc_9CDF8 test sil, 1 jnz short loc_9CD91 mov qword ptr [rbx+10h], 0 loc_9CD91: mov rdi, [rbx+8] test rdi, rdi jz short loc_9CDB0 loc_9CD9A: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_9CDA8 call my_free loc_9CDA8: mov rdi, r14 test r14, r14 jnz short loc_9CD9A loc_9CDB0: mov rdi, [rbx] test rdi, rdi jz short loc_9CDCE loc_9CDB8: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_9CDC6 call my_free loc_9CDC6: mov rdi, r14 test r14, r14 jnz short loc_9CDB8 loc_9CDCE: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rax, [rbx+10h] test rax, rax jz short loc_9CE42 mov [rbx], rax mov rcx, [rax+10h] add rcx, 0FFFFFFFFFFFFFFE8h mov [rax+8], rcx mov rax, [rbx] mov qword ptr [rax], 0 jmp short loc_9CE42 loc_9CDF8: mov rax, [rbx] mov rcx, rbx loc_9CDFE: test rax, rax jz short loc_9CE17 mov rcx, rax mov rax, [rax] mov rdx, [rcx+10h] add rdx, 0FFFFFFFFFFFFFFE8h mov [rcx+8], rdx jmp short loc_9CDFE loc_9CE17: mov rax, [rbx+8] mov [rcx], rax test rax, rax jz short loc_9CE3A loc_9CE23: mov rcx, [rax] mov rdx, [rax+10h] add rdx, 0FFFFFFFFFFFFFFE8h mov [rax+8], rdx mov rax, rcx test rcx, rcx jnz short loc_9CE23 loc_9CE3A: mov qword ptr [rbx+8], 0 loc_9CE42: mov qword ptr [rbx+28h], 4 pop rbx pop r14 pop rbp retn
_QWORD * free_root(_QWORD *a1, char a2) { _QWORD *v3; // rdi _QWORD *v4; // r14 _QWORD *v5; // rdi _QWORD *v6; // r14 _QWORD *result; // rax _QWORD *v8; // rax _QWORD *v9; // rcx _QWORD *v10; // rcx if ( (a2 & 2) != 0 ) { v8 = (_QWORD *)*a1; v9 = a1; while ( v8 ) { v9 = v8; v8 = (_QWORD *)*v8; v9[1] = v9[2] - 24LL; } result = (_QWORD *)a1[1]; *v9 = result; if ( result ) { do { v10 = (_QWORD *)*result; result[1] = result[2] - 24LL; result = v10; } while ( v10 ); } a1[1] = 0LL; } else { if ( (a2 & 1) == 0 ) a1[2] = 0LL; v3 = (_QWORD *)a1[1]; if ( v3 ) { do { v4 = (_QWORD *)*v3; if ( v3 != (_QWORD *)a1[2] ) my_free(v3); v3 = v4; } while ( v4 ); } v5 = (_QWORD *)*a1; if ( *a1 ) { do { v6 = (_QWORD *)*v5; if ( v5 != (_QWORD *)a1[2] ) my_free(v5); v5 = v6; } while ( v6 ); } *(_OWORD *)a1 = 0LL; result = (_QWORD *)a1[2]; if ( result ) { *a1 = result; result[1] = result[2] - 24LL; result = (_QWORD *)*a1; *(_QWORD *)*a1 = 0LL; } } a1[5] = 4LL; return result; }
free_root: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI TEST SIL,0x2 JNZ 0x0019cdf8 TEST SIL,0x1 JNZ 0x0019cd91 MOV qword ptr [RBX + 0x10],0x0 LAB_0019cd91: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0019cdb0 LAB_0019cd9a: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0019cda8 CALL 0x0019ffe2 LAB_0019cda8: MOV RDI,R14 TEST R14,R14 JNZ 0x0019cd9a LAB_0019cdb0: MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0019cdce LAB_0019cdb8: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0019cdc6 CALL 0x0019ffe2 LAB_0019cdc6: MOV RDI,R14 TEST R14,R14 JNZ 0x0019cdb8 LAB_0019cdce: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x0019ce42 MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RAX + 0x10] ADD RCX,-0x18 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBX] MOV qword ptr [RAX],0x0 JMP 0x0019ce42 LAB_0019cdf8: MOV RAX,qword ptr [RBX] MOV RCX,RBX LAB_0019cdfe: TEST RAX,RAX JZ 0x0019ce17 MOV RCX,RAX MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RCX + 0x10] ADD RDX,-0x18 MOV qword ptr [RCX + 0x8],RDX JMP 0x0019cdfe LAB_0019ce17: MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RCX],RAX TEST RAX,RAX JZ 0x0019ce3a LAB_0019ce23: MOV RCX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x10] ADD RDX,-0x18 MOV qword ptr [RAX + 0x8],RDX MOV RAX,RCX TEST RCX,RCX JNZ 0x0019ce23 LAB_0019ce3a: MOV qword ptr [RBX + 0x8],0x0 LAB_0019ce42: MOV qword ptr [RBX + 0x28],0x4 POP RBX POP R14 POP RBP RET
void free_root(long *param_1,byte param_2) { int8 *puVar1; long lVar2; int8 *puVar3; long *plVar4; long *plVar5; long *plVar6; bool bVar7; if ((param_2 & 2) == 0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar3 = (int8 *)param_1[1]; while (puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; bVar7 = puVar3 != (int8 *)param_1[2]; puVar3 = puVar1; if (bVar7) { my_free(); } } puVar3 = (int8 *)*param_1; while (puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; bVar7 = puVar3 != (int8 *)param_1[2]; puVar3 = puVar1; if (bVar7) { my_free(); } } *param_1 = 0; param_1[1] = 0; lVar2 = param_1[2]; if (lVar2 != 0) { *param_1 = lVar2; *(long *)(lVar2 + 8) = *(long *)(lVar2 + 0x10) + -0x18; *(int8 *)*param_1 = 0; } } else { plVar4 = (long *)*param_1; plVar6 = param_1; while (plVar5 = plVar4, plVar5 != (long *)0x0) { plVar5[1] = plVar5[2] + -0x18; plVar4 = (long *)*plVar5; plVar6 = plVar5; } puVar3 = (int8 *)param_1[1]; *plVar6 = (long)puVar3; while (puVar3 != (int8 *)0x0) { puVar3[1] = puVar3[2] + -0x18; puVar3 = (int8 *)*puVar3; } param_1[1] = 0; } param_1[5] = 4; return; }