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
50,400
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0xd8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xd0(%rsp) movl %esi, 0xcc(%rsp) movq %rdx, 0xc0(%rsp) movq %rcx, 0xb8(%rsp) leaq 0x57(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5b0d0 movq 0x18(%rsp), %rdx leaq 0xb2382(%rip), %rsi # 0x20fc40 leaq 0x58(%rsp), %rdi callq 0x62190 jmp 0x15d8ca movl 0xcc(%rsp), %edx leaq 0x78(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xa4080 jmp 0x15d8e2 xorl %eax, %eax movl %eax, %esi leaq 0x20(%rsp), %rdi callq 0xa4120 jmp 0x15d8f2 movq 0xc0(%rsp), %rcx leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0xa3fc0 jmp 0x15d913 leaq 0x20(%rsp), %rdi callq 0x5b568 leaq 0x78(%rsp), %rdi callq 0x5b568 leaq 0x58(%rsp), %rdi callq 0x5b568 leaq 0x57(%rsp), %rdi callq 0x5b540 movl 0xcc(%rsp), %eax movl %eax, 0x4(%rsp) leaq 0x98(%rsp), %rdi callq 0x5a1c0 movq 0x8(%rsp), %rdi movl 0x4(%rsp), %esi movq %rax, %rdx callq 0xb85f0 jmp 0x15d966 leaq 0x98(%rsp), %rdi callq 0x5b568 movq 0x10(%rsp), %rax addq $0xd8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15d9dc movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15d9d2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15d9c8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x20(%rsp), %rdi callq 0x5b568 leaq 0x78(%rsp), %rdi callq 0x5b568 leaq 0x58(%rsp), %rdi callq 0x5b568 leaq 0x57(%rsp), %rdi callq 0x5b540 jmp 0x15da03 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x98(%rsp), %rdi callq 0x5b568 movq 0x48(%rsp), %rdi callq 0x5abc0 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 0D8h mov [rsp+0D8h+var_D0], rdi; int mov rax, rdi mov qword ptr [rsp+0D8h+var_C8], rax; int mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_C], esi mov qword ptr [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_20], rcx lea rdi, [rsp+0D8h+var_81] mov qword ptr [rsp+0D8h+var_C0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+0D8h+var_C0] lea rsi, aTypeError; "type_error" lea rdi, [rsp+0D8h+var_81+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_15D8CA: mov edx, [rsp+0D8h+var_C] lea rdi, [rsp+0D8h+var_60]; int lea rsi, [rsp+0D8h+var_81+1] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_15D8E2: xor eax, eax mov esi, eax lea rdi, [rsp+0D8h+var_B8] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_15D8F2: mov rcx, qword ptr [rsp+0D8h+var_18]; int lea rdi, [rsp+0D8h+var_40]; int lea rsi, [rsp+0D8h+var_60]; int lea rdx, [rsp+0D8h+var_B8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) jmp short $+2 loc_15D913: lea rdi, [rsp+0D8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+0D8h+var_C] mov [rsp+0D8h+var_D4], eax lea rdi, [rsp+0D8h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+0D8h+var_D0]; this mov esi, [rsp+0D8h+var_D4]; int mov rdx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(int,char const*) jmp short $+2 loc_15D966: lea rdi, [rsp+0D8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+0D8h+var_C8] add rsp, 0D8h retn mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15D9DC mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15D9D2 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15D9C8 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15D9C8: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15D9D2: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15D9DC: lea rdi, [rsp+arg_4F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_15DA03 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15DA03: mov rdi, [rsp+arg_40] call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::type_error *a1, int a2, long long a3, long long a4) { const char *v4; // rax int v6; // [rsp+4h] [rbp-D4h] int v7[13]; // [rsp+20h] [rbp-B8h] BYREF int v8[8]; // [rsp+57h] [rbp-81h] BYREF int v9[8]; // [rsp+78h] [rbp-60h] BYREF int v10[8]; // [rsp+98h] [rbp-40h] BYREF long long v11; // [rsp+B8h] [rbp-20h] int v12[2]; // [rsp+C0h] [rbp-18h] int v13; // [rsp+CCh] [rbp-Ch] nlohmann::json_abi_v3_11_3::detail::type_error *v14; // [rsp+D0h] [rbp-8h] v14 = a1; v13 = a2; *(_QWORD *)v12 = a3; v11 = a4; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v8 + 1, (long long)"type_error", (long long)v8); nlohmann::json_abi_v3_11_3::detail::exception::name(v9, (long long)v8 + 1, v13); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v7, 0LL); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v10, (long long)v9, (long long)v7, *(long long *)v12); std::string::~string(v7); std::string::~string(v9); std::string::~string((char *)v8 + 1); std::allocator<char>::~allocator(v8); v6 = v13; v4 = (const char *)std::string::c_str(v10); nlohmann::json_abi_v3_11_3::detail::type_error::type_error(a1, v6, v4); std::string::~string(v10); return a1; }
50,401
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x8e8ed(%rip), %rsi # 0xed6aa leaq 0x8e8f0(%rip), %rdx # 0xed6b4 leaq 0x28(%rsp), %rdi callq 0x22338 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x58c10 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1ada0 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x5ee67 movq 0x78(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5ee82 movq 0x58(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5ee99 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x58e7e leaq 0xcb0c1(%rip), %rax # 0x129f70 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5eecd movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5ef5b movq 0x18(%rsp), %rsi jmp 0x5ef53 movq %rax, %rbx jmp 0x5ef44 movq %rax, %rbx jmp 0x5ef5b movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5ef1d movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x1b6cf movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5ef5b movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rdi callq 0x1afb0
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aTypeError; "type_error" lea rdx, aTypeError+0Ah; "" lea rdi, [rsp+0C8h+var_A0] 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+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_5EE67 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EE67: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5EE82 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EE82: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_5EE99 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EE99: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail10type_errorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::type_error add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_5EECD mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EECD: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_5EF5B mov rsi, [rsp+arg_10] jmp short loc_5EF53 mov rbx, rax jmp short loc_5EF44 mov rbx, rax jmp short loc_5EF5B mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_5EF1D mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EF1D: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_5EF44: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_5EF5B mov rsi, [rsp+arg_30] loc_5EF53: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EF5B: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "type_error", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::type_error + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0015edb6: LEA RSI,[0x1ed6aa] LEA RDX,[0x1ed6b4] LEA RDI,[RSP + 0x28] CALL 0x00122338 LAB_0015edce: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x00158c10 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0015ee0d: LEA RDI,[RSP + 0x8] CALL 0x0011ada0 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0015ee67 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011a8f0 LAB_0015ee67: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015ee82 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011a8f0 LAB_0015ee82: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0015ee99 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8f0 LAB_0015ee99: MOV RDX,qword ptr [RSP + 0x8] LAB_0015ee9e: MOV RDI,RBX MOV ESI,EBP CALL 0x00158e7e LAB_0015eea8: LEA RAX,[0x229f70] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0015eecd MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_0015eecd: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0015edb6 to 0015edcd has its CatchHandler @ 0015eefb */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error",""); /* try { // try from 0015edce to 0015edde has its CatchHandler @ 0015eef6 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0015ee0d to 0015ee4f has its CatchHandler @ 0015ef00 */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0015ee9e to 0015eea7 has its CatchHandler @ 0015eee2 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_00229f80; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
50,402
my_open
eloqsql/mysys/my_open.c
File my_open(const char *FileName, int Flags, myf MyFlags) /* Path-name of file */ /* Read | write .. */ /* Special flags */ { File fd; DBUG_ENTER("my_open"); DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu", FileName, Flags, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF))) MyFlags|= my_global_flags; #if defined(_WIN32) fd= my_win_open(FileName, Flags); #else if (MyFlags & MY_NOSYMLINKS) fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask); else fd = open(FileName, Flags | O_CLOEXEC, my_umask); #endif fd= my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags); DBUG_RETURN(fd); }
O3
c
my_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r15d movq %rdi, %rbx testb $0x19, %dl jne 0x2d022 leaq 0x34458b(%rip), %rax # 0x3715a8 movq (%rax), %r14 jmp 0x2d025 xorl %r14d, %r14d orq %rdx, %r14 btl $0x9, %r14d jb 0x2d051 orl $0x80000, %r15d # imm = 0x80000 leaq 0x2cd70b(%rip), %rax # 0x2fa748 movl (%rax), %edx movq %rbx, %rdi movl %r15d, %esi xorl %eax, %eax callq 0x246c0 movl %eax, %r15d jmp 0x2d09d leaq 0x2cd6f0(%rip), %rax # 0x2fa748 movl (%rax), %r12d leaq -0x24(%rbp), %rsi movq %rbx, %rdi callq 0x2d780 testq %rax, %rax je 0x2d097 movl -0x24(%rbp), %edi orl $0xa0000, %r15d # imm = 0xA0000 movq %rax, %rsi movl %r15d, %edx movl %r12d, %ecx xorl %eax, %eax callq 0x24360 movl %eax, %r15d movl -0x24(%rbp), %edi testl %edi, %edi js 0x2d09d callq 0x24740 jmp 0x2d09d movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movl %r15d, %edi movq %rbx, %rsi movl $0x1, %edx movl $0x1d, %ecx movq %r14, %r8 callq 0x2d0c2 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_open: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15d, esi mov rbx, rdi test dl, 19h jnz short loc_2D022 lea rax, my_global_flags mov r14, [rax] jmp short loc_2D025 loc_2D022: xor r14d, r14d loc_2D025: or r14, rdx bt r14d, 9 jb short loc_2D051 or r15d, 80000h lea rax, my_umask mov edx, [rax] mov rdi, rbx mov esi, r15d xor eax, eax call _open64 mov r15d, eax jmp short loc_2D09D loc_2D051: lea rax, my_umask mov r12d, [rax] lea rsi, [rbp+var_24] mov rdi, rbx call my_open_parent_dir_nosymlinks test rax, rax jz short loc_2D097 mov edi, [rbp+var_24] or r15d, 0A0000h mov rsi, rax mov edx, r15d mov ecx, r12d xor eax, eax call _openat64 mov r15d, eax mov edi, [rbp+var_24] test edi, edi js short loc_2D09D call _close jmp short loc_2D09D loc_2D097: mov r15d, 0FFFFFFFFh loc_2D09D: mov edi, r15d mov rsi, rbx mov edx, 1 mov ecx, 1Dh mov r8, r14 call my_register_filename add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_open(long long a1, int a2, long long a3) { long long v3; // r14 long long v4; // r14 unsigned int v5; // r15d unsigned int v6; // r12d long long v7; // rax int v9[9]; // [rsp+Ch] [rbp-24h] BYREF if ( (a3 & 0x19) != 0 ) v3 = 0LL; else v3 = my_global_flags; v4 = a3 | v3; if ( (v4 & 0x200) != 0 ) { v6 = my_umask; v7 = my_open_parent_dir_nosymlinks(a1, v9); if ( v7 ) { v5 = openat64((unsigned int)v9[0], v7, a2 | 0xA0000u, v6); if ( v9[0] >= 0 ) close(); } else { v5 = -1; } } else { v5 = open64(a1, a2 | 0x80000u, my_umask); } return my_register_filename(v5, a1, 1LL, 29LL, v4); }
my_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15D,ESI MOV RBX,RDI TEST DL,0x19 JNZ 0x0012d022 LEA RAX,[0x4715a8] MOV R14,qword ptr [RAX] JMP 0x0012d025 LAB_0012d022: XOR R14D,R14D LAB_0012d025: OR R14,RDX BT R14D,0x9 JC 0x0012d051 OR R15D,0x80000 LEA RAX,[0x3fa748] MOV EDX,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D XOR EAX,EAX CALL 0x001246c0 MOV R15D,EAX JMP 0x0012d09d LAB_0012d051: LEA RAX,[0x3fa748] MOV R12D,dword ptr [RAX] LEA RSI,[RBP + -0x24] MOV RDI,RBX CALL 0x0012d780 TEST RAX,RAX JZ 0x0012d097 MOV EDI,dword ptr [RBP + -0x24] OR R15D,0xa0000 MOV RSI,RAX MOV EDX,R15D MOV ECX,R12D XOR EAX,EAX CALL 0x00124360 MOV R15D,EAX MOV EDI,dword ptr [RBP + -0x24] TEST EDI,EDI JS 0x0012d09d CALL 0x00124740 JMP 0x0012d09d LAB_0012d097: MOV R15D,0xffffffff LAB_0012d09d: MOV EDI,R15D MOV RSI,RBX MOV EDX,0x1 MOV ECX,0x1d MOV R8,R14 CALL 0x0012d0c2 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void my_open(char *param_1,uint param_2,ulong param_3) { uint uVar1; int iVar2; char *__file; ulong uVar3; int local_2c; uVar1 = my_umask; uVar3 = my_global_flags; if ((param_3 & 0x19) != 0) { uVar3 = 0; } if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) { iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask); } else { __file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c); if (__file == (char *)0x0) { iVar2 = -1; } else { iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1); if (-1 < local_2c) { close(local_2c); } } } my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3); return; }
50,403
ma_alloc_buffer
eloqsql/storage/maria/ma_open.c
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size, size_t new_size, myf flag) { if (*old_size < new_size) { uchar *addr; if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size, MYF(MY_ALLOW_ZERO_PTR | flag)))) return 1; *old_addr= addr; *old_size= new_size; } return 0; }
O3
c
ma_alloc_buffer: cmpq %rdx, (%rsi) jae 0x54ee0 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rsi orq $0x40, %rcx xorl %edi, %edi callq 0x9fed4 testq %rax, %rax je 0x54ee3 movq %rax, (%r15) movq %rbx, (%r14) xorl %eax, %eax jmp 0x54ee5 xorl %eax, %eax retq movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_alloc_buffer: cmp [rsi], rdx jnb short loc_54EE0 push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rdi] or rcx, 40h xor edi, edi call my_realloc test rax, rax jz short loc_54EE3 mov [r15], rax mov [r14], rbx xor eax, eax jmp short loc_54EE5 loc_54EE0: xor eax, eax retn loc_54EE3: mov al, 1 loc_54EE5: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_alloc_buffer( long long *a1, unsigned long long *a2, unsigned long long a3, long long a4, long long a5, long long a6) { long long v7; // rax if ( *a2 >= a3 ) return 0LL; v7 = my_realloc(0LL, *a1, a3, a4 | 0x40, a5, a6); if ( !v7 ) return 1LL; *a1 = v7; *a2 = a3; return 0LL; }
_ma_alloc_buffer: CMP qword ptr [RSI],RDX JNC 0x00154ee0 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RDI] OR RCX,0x40 XOR EDI,EDI CALL 0x0019fed4 TEST RAX,RAX JZ 0x00154ee3 MOV qword ptr [R15],RAX MOV qword ptr [R14],RBX XOR EAX,EAX JMP 0x00154ee5 LAB_00154ee0: XOR EAX,EAX RET LAB_00154ee3: MOV AL,0x1 LAB_00154ee5: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4) { long lVar1; if (param_3 <= *param_2) { return false; } lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40); if (lVar1 != 0) { *param_1 = lVar1; *param_2 = param_3; } return lVar1 == 0; }
50,404
camellia_ctx_alloc
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher_wrap.c
static void *camellia_ctx_alloc(void) { mbedtls_camellia_context *ctx; ctx = mbedtls_calloc(1, sizeof(mbedtls_camellia_context)); if (ctx == NULL) { return NULL; } mbedtls_camellia_init(ctx); return ctx; }
O3
c
camellia_ctx_alloc: pushq %rbx movl $0x1, %edi movl $0x114, %esi # imm = 0x114 callq 0xf2f0 movq %rax, %rbx testq %rax, %rax je 0x9b2ad movq %rbx, %rdi callq 0x9ddcc movq %rbx, %rax popq %rbx retq
camellia_ctx_alloc: push rbx mov edi, 1 mov esi, 114h call _calloc mov rbx, rax test rax, rax jz short loc_9B2AD mov rdi, rbx call mbedtls_camellia_init loc_9B2AD: mov rax, rbx pop rbx retn
long long camellia_ctx_alloc() { long long v0; // rax long long v1; // rbx v0 = calloc(1LL, 276LL); v1 = v0; if ( v0 ) mbedtls_camellia_init(v0); return v1; }
camellia_ctx_alloc: PUSH RBX MOV EDI,0x1 MOV ESI,0x114 CALL 0x0010f2f0 MOV RBX,RAX TEST RAX,RAX JZ 0x0019b2ad MOV RDI,RBX CALL 0x0019ddcc LAB_0019b2ad: MOV RAX,RBX POP RBX RET
void * camellia_ctx_alloc(void) { void *pvVar1; pvVar1 = calloc(1,0x114); if (pvVar1 != (void *)0x0) { mbedtls_camellia_init(pvVar1); } return pvVar1; }
50,405
GAParameterTLCS47Addr6::match(GAParserOperand*, int)
goodasm/galangtlcs47.cpp
int GAParameterTLCS47Addr6::match(GAParserOperand *op, int len){ int64_t val=op->uint64(false); //False on a match. if(op->prefix!=prefix || op->suffix!=suffix) return 0; //Reject values that don't fit. if(((val)&0xFFC0) != ((1+op->goodasm->address())&0xffc0)){ op->goodasm->error("TLCS47 ADDR6 is out of range."); return 0; } return 1; }
O0
cpp
GAParameterTLCS47Addr6::match(GAParserOperand*, int): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x360a0 movq -0x58(%rbp), %rsi movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi addq $0x8, %rsi callq 0x53180 testb $0x1, %al jne 0x52eba movq -0x58(%rbp), %rsi movq -0x18(%rbp), %rdi addq $0x30, %rdi addq $0x20, %rsi callq 0x53180 testb $0x1, %al jne 0x52eba jmp 0x52ec6 movl $0x0, -0x4(%rbp) jmp 0x52f57 movq -0x28(%rbp), %rax andq $0xffc0, %rax # imm = 0xFFC0 movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rdi callq 0x16cd0 movq %rax, %rcx movq -0x60(%rbp), %rax addq $0x1, %rcx andq $0xffc0, %rcx # imm = 0xFFC0 cmpq %rcx, %rax je 0x52f50 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x70(%rbp) leaq 0xc05be(%rip), %rsi # 0x1134c9 leaq -0x40(%rbp), %rdi movq %rdi, -0x68(%rbp) callq 0xe710 movq -0x70(%rbp), %rdi movq -0x68(%rbp), %rsi callq 0x13870 jmp 0x52f27 leaq -0x40(%rbp), %rdi callq 0xe770 movl $0x0, -0x4(%rbp) jmp 0x52f57 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x40(%rbp), %rdi callq 0xe770 jmp 0x52f60 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x7210 nopl (%rax)
_ZN22GAParameterTLCS47Addr65matchEP15GAParserOperandi: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_58], rax mov rdi, [rbp+var_18]; this xor esi, esi; bool call _ZN15GAParserOperand6uint64Eb; GAParserOperand::uint64(bool) mov rsi, [rbp+var_58] mov [rbp+var_28], rax mov rdi, [rbp+var_18] add rsi, 8 call _ZneRK7QStringS1_; operator!=(QString const&,QString const&) test al, 1 jnz short loc_52EBA mov rsi, [rbp+var_58] mov rdi, [rbp+var_18] add rdi, 30h ; '0' add rsi, 20h ; ' ' call _ZneRK7QStringS1_; operator!=(QString const&,QString const&) test al, 1 jnz short loc_52EBA jmp short loc_52EC6 loc_52EBA: mov [rbp+var_4], 0 jmp loc_52F57 loc_52EC6: mov rax, [rbp+var_28] and rax, 0FFC0h mov [rbp+var_60], rax mov rax, [rbp+var_18] mov rdi, [rax+48h]; this call _ZN7GoodASM7addressEv; GoodASM::address(void) mov rcx, rax mov rax, [rbp+var_60] add rcx, 1 and rcx, 0FFC0h cmp rax, rcx jz short loc_52F50 mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_70], rax lea rsi, aTlcs47Addr6IsO; "TLCS47 ADDR6 is out of range." lea rdi, [rbp+var_40]; this mov [rbp+var_68], rdi call _ZN7QStringC2EPKc; QString::QString(char const*) mov rdi, [rbp+var_70] mov rsi, [rbp+var_68] call _ZN7GoodASM5errorE7QString; GoodASM::error(QString) jmp short $+2 loc_52F27: lea rdi, [rbp+var_40]; this call _ZN7QStringD2Ev; QString::~QString() mov [rbp+var_4], 0 jmp short loc_52F57 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_40]; this call _ZN7QStringD2Ev; QString::~QString() jmp short loc_52F60 loc_52F50: mov [rbp+var_4], 1 loc_52F57: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn loc_52F60: mov rdi, [rbp+var_48] call __Unwind_Resume
long long GAParameterTLCS47Addr6::match(GAParameterTLCS47Addr6 *this, GAParserOperand *a2, int a3) { long long v4; // [rsp+0h] [rbp-70h] _BYTE v5[24]; // [rsp+30h] [rbp-40h] BYREF long long v6; // [rsp+48h] [rbp-28h] int v7; // [rsp+54h] [rbp-1Ch] GAParserOperand *v8; // [rsp+58h] [rbp-18h] GAParameterTLCS47Addr6 *v9; // [rsp+60h] [rbp-10h] v9 = this; v8 = a2; v7 = a3; v6 = GAParserOperand::uint64(a2, 0); if ( (operator!=(a2, (char *)this + 8) & 1) != 0 || (operator!=((char *)v8 + 48, (char *)this + 32) & 1) != 0 ) { return 0; } else if ( (v6 & 0xFFC0) == (((unsigned __int16)GoodASM::address(*((GoodASM **)v8 + 9)) + 1) & 0xFFC0) ) { return 1; } else { v4 = *((_QWORD *)v8 + 9); QString::QString((QString *)v5, "TLCS47 ADDR6 is out of range."); GoodASM::error(v4, (long long)v5); QString::~QString((QString *)v5); return 0; } }
match: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI CALL 0x001360a0 MOV RSI,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RSI,0x8 CALL 0x00153180 TEST AL,0x1 JNZ 0x00152eba MOV RSI,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30 ADD RSI,0x20 CALL 0x00153180 TEST AL,0x1 JNZ 0x00152eba JMP 0x00152ec6 LAB_00152eba: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00152f57 LAB_00152ec6: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0xffc0 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00116cd0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x60] ADD RCX,0x1 AND RCX,0xffc0 CMP RAX,RCX JZ 0x00152f50 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x70],RAX LEA RSI,[0x2134c9] LEA RDI,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RDI CALL 0x0010e710 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x68] LAB_00152f20: CALL 0x00113870 LAB_00152f25: JMP 0x00152f27 LAB_00152f27: LEA RDI,[RBP + -0x40] CALL 0x0010e770 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00152f57 LAB_00152f50: MOV dword ptr [RBP + -0x4],0x1 LAB_00152f57: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
/* GAParameterTLCS47Addr6::match(GAParserOperand*, int) */ int4 __thiscall GAParameterTLCS47Addr6::match(GAParameterTLCS47Addr6 *this,GAParserOperand *param_1,int param_2) { GoodASM *pGVar1; ulong uVar2; long lVar3; QString local_48 [24]; ulong local_30; int local_24; QString *local_20; GAParameterTLCS47Addr6 *local_18; local_24 = param_2; local_20 = (QString *)param_1; local_18 = this; local_30 = GAParserOperand::uint64(param_1,false); uVar2 = ::operator!=(local_20,(QString *)(this + 8)); if (((uVar2 & 1) == 0) && (uVar2 = ::operator!=(local_20 + 0x30,(QString *)(this + 0x20)), (uVar2 & 1) == 0)) { uVar2 = local_30 & 0xffc0; lVar3 = GoodASM::address(*(GoodASM **)(local_20 + 0x48)); if (uVar2 != (lVar3 + 1U & 0xffc0)) { pGVar1 = *(GoodASM **)(local_20 + 0x48); QString::QString(local_48,"TLCS47 ADDR6 is out of range."); /* try { // try from 00152f20 to 00152f24 has its CatchHandler @ 00152f39 */ GoodASM::error(pGVar1,local_48); QString::~QString(local_48); return 0; } return 1; } return 0; }
50,406
create_last_word_mask
eloqsql/mysys/my_bitmap.c
void create_last_word_mask(MY_BITMAP *map) { unsigned char const mask= invers_last_byte_mask(map->n_bits); /* The first bytes are to be set to zero since they represent real bits in the bitvector. The last bytes are set to 0xFF since they represent bytes not used by the bitvector. Finally the last byte contains bits as set by the mask above. */ unsigned char *ptr= (unsigned char*)&map->last_word_mask; map->last_word_ptr= map->bitmap + no_words_in_map(map)-1; switch (no_bytes_in_map(map) & 3) { case 1: map->last_word_mask= ~0U; ptr[0]= mask; return; case 2: map->last_word_mask= ~0U; ptr[0]= 0; ptr[1]= mask; return; case 3: map->last_word_mask= 0U; ptr[2]= mask; ptr[3]= 0xFFU; return; case 0: map->last_word_mask= 0U; ptr[3]= mask; return; } }
O3
c
create_last_word_mask: pushq %rbp movq %rsp, %rbp movl 0x1c(%rdi), %eax leal 0x7(%rax), %ecx movq (%rdi), %rdx addl $0x1f, %eax shrl $0x5, %eax leaq (%rdx,%rax,4), %rax addq $-0x4, %rax movq %rax, 0x8(%rdi) movl %ecx, %eax shrl $0x3, %eax andl $0x3, %eax leaq 0x44c52(%rip), %rdx # 0xe1d8c movslq (%rdx,%rax,4), %rax addq %rdx, %rax jmpq *%rax movl $0x0, 0x18(%rdi) addq $0x1b, %rdi jmp 0x9d174 movl $0xffffff00, 0x18(%rdi) # imm = 0xFFFFFF00 addq $0x19, %rdi jmp 0x9d174 movl $0xff000000, 0x18(%rdi) # imm = 0xFF000000 addq $0x1a, %rdi jmp 0x9d174 addq $0x18, %rdi movl $0xffffffff, (%rdi) # imm = 0xFFFFFFFF andb $0x7, %cl movl $0xfffffffe, %eax # imm = 0xFFFFFFFE shll %cl, %eax movb %al, (%rdi) popq %rbp retq
create_last_word_mask: push rbp mov rbp, rsp mov eax, [rdi+1Ch] lea ecx, [rax+7] mov rdx, [rdi] add eax, 1Fh shr eax, 5 lea rax, [rdx+rax*4] add rax, 0FFFFFFFFFFFFFFFCh mov [rdi+8], rax mov eax, ecx shr eax, 3 and eax, 3 lea rdx, jpt_9D141 movsxd rax, ds:(jpt_9D141 - 0E1D8Ch)[rdx+rax*4]; switch 4 cases add rax, rdx jmp rax; switch jump loc_9D143: mov dword ptr [rdi+18h], 0; jumptable 000000000009D141 case 0 add rdi, 1Bh jmp short loc_9D174 loc_9D150: mov dword ptr [rdi+18h], 0FFFFFF00h; jumptable 000000000009D141 case 2 add rdi, 19h jmp short loc_9D174 loc_9D15D: mov dword ptr [rdi+18h], 0FF000000h; jumptable 000000000009D141 case 3 add rdi, 1Ah jmp short loc_9D174 loc_9D16A: add rdi, 18h; jumptable 000000000009D141 case 1 mov dword ptr [rdi], 0FFFFFFFFh loc_9D174: and cl, 7 mov eax, 0FFFFFFFEh shl eax, cl mov [rdi], al pop rbp retn
long long create_last_word_mask(long long a1) { int v1; // eax _DWORD *v2; // rdi long long result; // rax v1 = *(_DWORD *)(a1 + 28); *(_QWORD *)(a1 + 8) = *(_QWORD *)a1 + 4LL * ((unsigned int)(v1 + 31) >> 5) - 4; switch ( ((unsigned int)(v1 + 7) >> 3) & 3 ) { case 0u: *(_DWORD *)(a1 + 24) = 0; v2 = (_DWORD *)(a1 + 27); break; case 1u: v2 = (_DWORD *)(a1 + 24); *v2 = -1; break; case 2u: *(_DWORD *)(a1 + 24) = -256; v2 = (_DWORD *)(a1 + 25); break; case 3u: *(_DWORD *)(a1 + 24) = -16777216; v2 = (_DWORD *)(a1 + 26); break; } result = (unsigned int)(-2 << ((v1 + 7) & 7)); *(_BYTE *)v2 = result; return result; }
create_last_word_mask: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x1c] LEA ECX,[RAX + 0x7] MOV RDX,qword ptr [RDI] ADD EAX,0x1f SHR EAX,0x5 LEA RAX,[RDX + RAX*0x4] ADD RAX,-0x4 MOV qword ptr [RDI + 0x8],RAX MOV EAX,ECX SHR EAX,0x3 AND EAX,0x3 LEA RDX,[0x1e1d8c] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX switchD: JMP RAX caseD_0: MOV dword ptr [RDI + 0x18],0x0 ADD RDI,0x1b JMP 0x0019d174 caseD_2: MOV dword ptr [RDI + 0x18],0xffffff00 ADD RDI,0x19 JMP 0x0019d174 caseD_3: MOV dword ptr [RDI + 0x18],0xff000000 ADD RDI,0x1a JMP 0x0019d174 caseD_1: ADD RDI,0x18 MOV dword ptr [RDI],0xffffffff LAB_0019d174: AND CL,0x7 MOV EAX,0xfffffffe SHL EAX,CL MOV byte ptr [RDI],AL POP RBP RET
void create_last_word_mask(long *param_1) { uint uVar1; uVar1 = *(int *)((long)param_1 + 0x1c) + 7; param_1[1] = *param_1 + (ulong)(*(int *)((long)param_1 + 0x1c) + 0x1fU >> 5) * 4 + -4; switch(uVar1 >> 3 & 3) { case 0: *(int4 *)(param_1 + 3) = 0; param_1 = (long *)((long)param_1 + 0x1b); break; case 1: param_1 = param_1 + 3; *(int4 *)param_1 = 0xffffffff; break; case 2: *(int4 *)(param_1 + 3) = 0xffffff00; param_1 = (long *)((long)param_1 + 0x19); break; case 3: *(int4 *)(param_1 + 3) = 0xff000000; param_1 = (long *)((long)param_1 + 0x1a); } *(char *)param_1 = (char)(-2 << ((byte)uVar1 & 7)); return; }
50,407
LefDefParser::lefwInit(_IO_FILE*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwInit(FILE *f) { int i; // Check if the user is valid /* don't need anymore if (!lefiValidUser()) exit(77); */ // if (lefwFile) return LEFW_BAD_ORDER; lefwFile = f; if (lefwHasInitCbk == 1) { // lefwInitCbk has already called, issue an error fprintf(lefwFile, "ERROR (LEFWRIT-4000): lefwInitCbk has already called, cannot call lefwInit again.\n"); fprintf(lefwFile, "Writer Exit.\n"); exit(LEFW_BAD_ORDER); } lefwState = LEFW_UNINIT; // Current state of writer lefwDidInit = 0; // required section for (i = 0; i < MAXSYN; i++) lefwSynArray[i] = 0; lefwDidInit = 1; lefwState = LEFW_INIT; lefwHasInit = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwInit(_IO_FILE*): pushq %rbx leaq 0x7d3bb(%rip), %rbx # 0x8d0f0 movq %rdi, (%rbx) leaq 0x7d699(%rip), %rax # 0x8d3d8 cmpl $0x1, (%rax) je 0xfd7b leaq 0x7d3b5(%rip), %rdi # 0x8d100 movl $0x23c, %edx # imm = 0x23C xorl %esi, %esi callq 0x2120 leaq 0x7d5e6(%rip), %rax # 0x8d344 movl $0x1, %ecx movl %ecx, (%rax) leaq 0x7d5d4(%rip), %rax # 0x8d340 movl %ecx, (%rax) leaq 0x7d65f(%rip), %rax # 0x8d3d4 movl %ecx, (%rax) xorl %eax, %eax popq %rbx retq movq %rdi, %rcx leaq 0x4a88d(%rip), %rdi # 0x5a612 movl $0x52, %esi movl $0x1, %edx callq 0x23d0 movq (%rbx), %rcx leaq 0x4a8c7(%rip), %rdi # 0x5a665 movl $0xd, %esi movl $0x1, %edx callq 0x23d0 movl $0x2, %edi callq 0x2270
_ZN12LefDefParser8lefwInitEP8_IO_FILE: push rbx lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov [rbx], rdi lea rax, _ZN12LefDefParser14lefwHasInitCbkE; LefDefParser::lefwHasInitCbk cmp dword ptr [rax], 1 jz short loc_FD7B lea rdi, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov edx, 23Ch xor esi, esi call _memset lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov ecx, 1 mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov [rax], ecx lea rax, _ZN12LefDefParser11lefwHasInitE; LefDefParser::lefwHasInit mov [rax], ecx xor eax, eax pop rbx retn loc_FD7B: mov rcx, rdi lea rdi, aErrorLefwrit40; "ERROR (LEFWRIT-4000): lefwInitCbk has a"... mov esi, 52h ; 'R' mov edx, 1 call _fwrite mov rcx, [rbx] lea rdi, aWriterExit; "Writer Exit.\n" mov esi, 0Dh mov edx, 1 call _fwrite mov edi, 2 call _exit
long long LefDefParser::lefwInit(long long a1) { LefDefParser::lefwFile = a1; if ( LefDefParser::lefwHasInitCbk == 1 ) { fwrite("ERROR (LEFWRIT-4000): lefwInitCbk has already called, cannot call lefwInit again.\n", 82LL, 1LL, a1); fwrite("Writer Exit.\n", 13LL, 1LL, LefDefParser::lefwFile); exit(2LL); } memset(&LefDefParser::lefwSynArray, 0LL, 572LL); LefDefParser::lefwDidInit = 1; LefDefParser::lefwState = 1; LefDefParser::lefwHasInit = 1; return 0LL; }
lefwInit: PUSH RBX LEA RBX,[0x18d0f0] MOV qword ptr [RBX],RDI LEA RAX,[0x18d3d8] CMP dword ptr [RAX],0x1 JZ 0x0010fd7b LEA RDI,[0x18d100] MOV EDX,0x23c XOR ESI,ESI CALL 0x00102120 LEA RAX,[0x18d344] MOV ECX,0x1 MOV dword ptr [RAX],ECX LEA RAX,[0x18d340] MOV dword ptr [RAX],ECX LEA RAX,[0x18d3d4] MOV dword ptr [RAX],ECX XOR EAX,EAX POP RBX RET LAB_0010fd7b: MOV RCX,RDI LEA RDI,[0x15a612] MOV ESI,0x52 MOV EDX,0x1 CALL 0x001023d0 MOV RCX,qword ptr [RBX] LEA RDI,[0x15a665] MOV ESI,0xd MOV EDX,0x1 CALL 0x001023d0 MOV EDI,0x2 CALL 0x00102270
/* LefDefParser::lefwInit(_IO_FILE*) */ int8 LefDefParser::lefwInit(_IO_FILE *param_1) { lefwFile = param_1; if (lefwHasInitCbk != 1) { memset(lefwSynArray,0,0x23c); lefwDidInit = 1; lefwState = 1; lefwHasInit = 1; return 0; } fwrite("ERROR (LEFWRIT-4000): lefwInitCbk has already called, cannot call lefwInit again.\n",0x52, 1,param_1); fwrite("Writer Exit.\n",0xd,1,lefwFile); /* WARNING: Subroutine does not return */ exit(2); }
50,408
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!filter) throw std::runtime_error("FilterNode.filter is null"); if (!body) throw std::runtime_error("FilterNode.body is null"); auto filter_value = filter->evaluate(context); if (!filter_value.is_callable()) { throw std::runtime_error("Filter must be a callable: " + filter_value.dump()); } std::string rendered_body = body->render(context); ArgumentsValue filter_args = {{Value(rendered_body)}, {}}; auto result = filter_value.call(context, filter_args); out << result.to_str(); }
O3
cpp
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0xa3533 movq %rdi, %r14 cmpq $0x0, 0x30(%rdi) je 0xa3551 movq %rdx, %r15 leaq 0xc0(%rsp), %r12 movq %r12, %rdi callq 0x88bba cmpq $0x0, 0x30(%r12) je 0xa3583 movq 0x30(%r14), %rsi leaq 0xa0(%rsp), %rdi movq %r15, %rdx callq 0xa19c0 leaq 0x50(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x8cf0a movq %rsp, %rdi leaq 0x50(%rsp), %rsi leaq 0x30(%rsp), %rcx movl $0x1, %edx callq 0x960d2 xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq $0x0, 0x28(%rsp) leaq 0x90(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5b4ca movq %r14, %rdi callq 0x60938 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0xa3344 callq 0x70324 movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0xa3353 callq 0x70324 movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0xa3362 callq 0x70324 movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0xa3398 movq 0x8ac0d(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0xa3383 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa338d movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa3398 movq (%rdi), %rax callq *0x18(%rax) leaq 0x18(%rsp), %r14 leaq 0x50(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %rsp, %rcx movq %r15, %rdx callq 0x964b4 leaq 0x30(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x997ac movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x1bb70 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa33f1 movq 0x40(%rsp), %rsi incq %rsi callq 0x1ba20 leaq 0x90(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5b4ca movq %rbx, %rdi callq 0x60938 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0xa3419 callq 0x70324 movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0xa3428 callq 0x70324 movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0xa3437 callq 0x70324 movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0xa346d movq 0x8ab38(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0xa3458 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa3462 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa346d movq (%rdi), %rax callq *0x18(%rax) movq %r14, %rdi callq 0x977fc movq %rsp, %rdi callq 0x9068e leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa349e movq 0xb0(%rsp), %rsi incq %rsi callq 0x1ba20 leaq 0x100(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5b4ca movq %rbx, %rdi callq 0x60938 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0xa34c6 callq 0x70324 movq 0xe8(%rsp), %rdi testq %rdi, %rdi je 0xa34d8 callq 0x70324 movq 0xd8(%rsp), %rdi testq %rdi, %rdi je 0xa34ea callq 0x70324 movq 0xc8(%rsp), %rdi testq %rdi, %rdi je 0xa3523 movq 0x8aa82(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0xa350e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa3518 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa3523 movq (%rdi), %rax callq *0x18(%rax) addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b4f0 movq %rax, %r14 leaq 0x4fa6d(%rip), %rsi # 0xf2fb4 movq %rax, %rdi callq 0x1b380 jmp 0xa356d movl $0x10, %edi callq 0x1b4f0 movq %rax, %r14 leaq 0x4fa69(%rip), %rsi # 0xf2fce movq %rax, %rdi callq 0x1b380 movq 0x8aa74(%rip), %rsi # 0x12dfe8 movq 0x8a9dd(%rip), %rdx # 0x12df58 movq %r14, %rdi callq 0x1c150 movl $0x10, %edi callq 0x1b4f0 movq %rax, %r14 movq %rsp, %rdi leaq 0xc0(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x891ce leaq 0x4fa38(%rip), %rsi # 0xf2fe6 leaq 0x50(%rsp), %rdi movq %rsp, %rdx callq 0x7b895 movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %r14, %rdi callq 0x1c030 xorl %ebp, %ebp movq 0x8aa14(%rip), %rsi # 0x12dfe8 movq 0x8a97d(%rip), %rdx # 0x12df58 movq %r14, %rdi callq 0x1c150 movq %rax, %rbx leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa3601 movq 0x60(%rsp), %rsi incq %rsi callq 0x1ba20 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa361c movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 testb %bpl, %bpl jne 0xa3649 jmp 0xa36e4 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa3649 movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0xa3649 movq %rax, %rbx movq %r14, %rdi callq 0x1b770 jmp 0xa36e4 jmp 0xa3658 movq %rax, %rbx movq %r14, %rdi callq 0x1b770 jmp 0xa36f1 movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa368b movq 0x40(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0xa368b movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x88eac jmp 0xa369a movq %rax, %rbx movq %r14, %rdi callq 0x977fc movq %rsp, %rdi callq 0x9068e jmp 0xa36be movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x88eac jmp 0xa36be movq %rax, %rbx leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa36e4 movq 0xb0(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0xa36e4 movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0x88eac movq %rbx, %rdi callq 0x1c1e0 nop
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_A3533 mov r14, rdi cmp qword ptr [rdi+30h], 0 jz loc_A3551 mov r15, rdx lea r12, [rsp+138h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_A3583 mov rsi, [r14+30h] lea rdi, [rsp+138h+var_98] mov rdx, r15 call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&) lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_98] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, rsp lea rsi, [rsp+138h+var_E8] lea rcx, [rsp+138h+var_108] mov edx, 1 call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&) xorps xmm0, xmm0 movups [rsp+138h+var_120], xmm0 mov [rsp+138h+var_110], 0 lea r14, [rsp+138h+var_A8] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_A3344 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3344: mov rdi, [rsp+138h+var_C0] test rdi, rdi jz short loc_A3353 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3353: mov rdi, [rsp+138h+var_D0] test rdi, rdi jz short loc_A3362 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3362: mov rdi, [rsp+138h+var_E0] test rdi, rdi jz short loc_A3398 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A3383 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A338D loc_A3383: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A338D: cmp eax, 1 jnz short loc_A3398 mov rax, [rdi] call qword ptr [rax+18h] loc_A3398: lea r14, [rsp+138h+var_120] lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_78] mov rcx, rsp mov rdx, r15 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_E8] call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) mov rsi, [rsp+138h+var_108] mov rdx, [rsp+138h+var_100] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A33F1 mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A33F1: lea rbx, [rsp+138h+var_A8] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_A3419 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3419: mov rdi, [rsp+138h+var_C0] test rdi, rdi jz short loc_A3428 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3428: mov rdi, [rsp+138h+var_D0] test rdi, rdi jz short loc_A3437 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A3437: mov rdi, [rsp+138h+var_E0] test rdi, rdi jz short loc_A346D mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A3458 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A3462 loc_A3458: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A3462: cmp eax, 1 jnz short loc_A346D mov rax, [rdi] call qword ptr [rax+18h] loc_A346D: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A349E mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A349E: lea rbx, [rsp+138h+var_38] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_A34C6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A34C6: mov rdi, [rsp+138h+var_50] test rdi, rdi jz short loc_A34D8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A34D8: mov rdi, [rsp+138h+var_60] test rdi, rdi jz short loc_A34EA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A34EA: mov rdi, [rsp+138h+var_70] test rdi, rdi jz short loc_A3523 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A350E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A3518 loc_A350E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A3518: cmp eax, 1 jnz short loc_A3523 mov rax, [rdi] call qword ptr [rax+18h] loc_A3523: add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A3533: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeFilt; "FilterNode.filter is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_A356D loc_A3551: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeBody; "FilterNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_A356D: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_A3583: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp lea rsi, [rsp+138h+var_78] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aFilterMustBeAC; "Filter must be a callable: " lea rdi, [rsp+138h+var_E8] 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+138h+var_E8] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+138h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A3601 mov rsi, [rsp+138h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A3601: lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A361C mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A361C: test bpl, bpl jnz short loc_A3649 jmp loc_A36E4 mov rbx, rax lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A3649 mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A3649 mov rbx, rax loc_A3649: mov rdi, r14; void * call ___cxa_free_exception jmp loc_A36E4 jmp short $+2 loc_A3658: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp loc_A36F1 mov rbx, rax lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A368B mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A368B mov rbx, rax loc_A368B: lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_A369A mov rbx, rax loc_A369A: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_A36BE mov rbx, rax lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_A36BE mov rbx, rax loc_A36BE: lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A36E4 mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A36E4 mov rbx, rax loc_A36E4: lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_A36F1: mov rdi, rbx call __Unwind_Resume
long long minja::FilterNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi long long v4; // rdi signed __int32 v5; // eax long long v6; // rdi signed __int32 v7; // eax long long result; // rax long long v9; // rdi std::runtime_error *exception; // r14 void *v11; // r14 _QWORD v12[2]; // [rsp+0h] [rbp-138h] BYREF __int128 v13; // [rsp+18h] [rbp-120h] BYREF long long v14; // [rsp+28h] [rbp-110h] void *v15[2]; // [rsp+30h] [rbp-108h] BYREF long long v16; // [rsp+40h] [rbp-F8h] BYREF _BYTE v17[8]; // [rsp+50h] [rbp-E8h] BYREF long long v18; // [rsp+58h] [rbp-E0h] volatile signed __int32 *v19; // [rsp+68h] [rbp-D0h] volatile signed __int32 *v20; // [rsp+78h] [rbp-C0h] volatile signed __int32 *v21; // [rsp+88h] [rbp-B0h] char v22[16]; // [rsp+90h] [rbp-A8h] BYREF void *v23[2]; // [rsp+A0h] [rbp-98h] BYREF long long v24; // [rsp+B0h] [rbp-88h] BYREF _BYTE v25[8]; // [rsp+C0h] [rbp-78h] BYREF long long v26; // [rsp+C8h] [rbp-70h] volatile signed __int32 *v27; // [rsp+D8h] [rbp-60h] volatile signed __int32 *v28; // [rsp+E8h] [rbp-50h] long long v29; // [rsp+F0h] [rbp-48h] volatile signed __int32 *v30; // [rsp+F8h] [rbp-40h] char v31[56]; // [rsp+100h] [rbp-38h] BYREF v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.filter is null"); goto LABEL_47; } if ( !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.body is null"); LABEL_47: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v25, v3); if ( !v29 ) { v11 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v12, (long long)v25, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Filter must be a callable: ", (long long)v12); std::runtime_error::runtime_error(v11); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render[abi:cxx11]((long long)v23, *(long long ( ****)(_QWORD))(a1 + 48)); minja::Value::Value((long long)v17, (long long)v23); std::vector<minja::Value>::vector((long long)v12, (long long)v17, 1LL); v13 = 0LL; v14 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v4 = v18; if ( v18 ) { if ( _libc_single_threaded ) { v5 = *(_DWORD *)(v18 + 12); *(_DWORD *)(v18 + 12) = v5 - 1; } else { v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( v5 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL); } minja::Value::call((long long)v17, (long long)v25); minja::Value::to_str[abi:cxx11](v15, (long long)v17); std::__ostream_insert<char,std::char_traits<char>>(a2, v15[0], v15[1]); if ( v15[0] != &v16 ) operator delete(v15[0], v16 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v6 = v18; if ( v18 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v18 + 12); *(_DWORD *)(v18 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v13); std::vector<minja::Value>::~vector(v12); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v31); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31); if ( v30 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); if ( v28 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28); if ( v27 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27); v9 = v26; if ( v26 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v26 + 12); *(_DWORD *)(v26 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v26 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } return result; }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x001a3533 MOV R14,RDI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001a3551 MOV R15,RDX LEA R12,[RSP + 0xc0] MOV RDI,R12 CALL 0x00188bba CMP qword ptr [R12 + 0x30],0x0 JZ 0x001a3583 MOV RSI,qword ptr [R14 + 0x30] LAB_001a32d2: LEA RDI,[RSP + 0xa0] MOV RDX,R15 CALL 0x001a19c0 LAB_001a32e2: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xa0] CALL 0x0018cf0a LAB_001a32f4: MOV RDI,RSP LEA RSI,[RSP + 0x50] LEA RCX,[RSP + 0x30] MOV EDX,0x1 CALL 0x001960d2 LAB_001a330b: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV qword ptr [RSP + 0x28],0x0 LEA R14,[RSP + 0x90] MOV RDI,R14 XOR ESI,ESI CALL 0x0015b4ca MOV RDI,R14 CALL 0x00160938 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x001a3344 CALL 0x00170324 LAB_001a3344: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x001a3353 CALL 0x00170324 LAB_001a3353: MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x001a3362 CALL 0x00170324 LAB_001a3362: MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001a3398 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x001a3383 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a338d LAB_001a3383: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a338d: CMP EAX,0x1 JNZ 0x001a3398 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a3398: LEA R14,[RSP + 0x18] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xc0] MOV RCX,RSP MOV RDX,R15 CALL 0x001964b4 LAB_001a33b5: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x50] CALL 0x001997ac MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_001a33ce: MOV RDI,RBX CALL 0x0011bb70 LAB_001a33d6: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a33f1 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x0011ba20 LAB_001a33f1: LEA RBX,[RSP + 0x90] MOV RDI,RBX XOR ESI,ESI CALL 0x0015b4ca MOV RDI,RBX CALL 0x00160938 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x001a3419 CALL 0x00170324 LAB_001a3419: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x001a3428 CALL 0x00170324 LAB_001a3428: MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x001a3437 CALL 0x00170324 LAB_001a3437: MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001a346d MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x001a3458 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a3462 LAB_001a3458: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a3462: CMP EAX,0x1 JNZ 0x001a346d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a346d: MOV RDI,R14 CALL 0x001977fc MOV RDI,RSP CALL 0x0019068e LEA RAX,[RSP + 0xb0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a349e MOV RSI,qword ptr [RSP + 0xb0] INC RSI CALL 0x0011ba20 LAB_001a349e: LEA RBX,[RSP + 0x100] MOV RDI,RBX XOR ESI,ESI CALL 0x0015b4ca MOV RDI,RBX CALL 0x00160938 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x001a34c6 CALL 0x00170324 LAB_001a34c6: MOV RDI,qword ptr [RSP + 0xe8] TEST RDI,RDI JZ 0x001a34d8 CALL 0x00170324 LAB_001a34d8: MOV RDI,qword ptr [RSP + 0xd8] TEST RDI,RDI JZ 0x001a34ea CALL 0x00170324 LAB_001a34ea: MOV RDI,qword ptr [RSP + 0xc8] TEST RDI,RDI JZ 0x001a3523 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x001a350e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a3518 LAB_001a350e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a3518: CMP EAX,0x1 JNZ 0x001a3523 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a3523: ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a3533: MOV EDI,0x10 CALL 0x0011b4f0 MOV R14,RAX LAB_001a3540: LEA RSI,[0x1f2fb4] MOV RDI,RAX CALL 0x0011b380 LAB_001a354f: JMP 0x001a356d LAB_001a3551: MOV EDI,0x10 CALL 0x0011b4f0 MOV R14,RAX LAB_001a355e: LEA RSI,[0x1f2fce] MOV RDI,RAX CALL 0x0011b380 LAB_001a356d: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df58] MOV RDI,R14 CALL 0x0011c150 LAB_001a3583: MOV EDI,0x10 CALL 0x0011b4f0 MOV R14,RAX LAB_001a3590: MOV RDI,RSP LEA RSI,[RSP + 0xc0] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001891ce LAB_001a35a7: LEA RSI,[0x1f2fe6] LEA RDI,[RSP + 0x50] MOV RDX,RSP CALL 0x0017b895 MOV BPL,0x1 LAB_001a35be: LEA RSI,[RSP + 0x50] MOV RDI,R14 CALL 0x0011c030 XOR EBP,EBP MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df58] MOV RDI,R14 CALL 0x0011c150
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *prVar3; vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24]; int8 local_120; int8 uStack_118; int8 local_110; long *local_108; long local_100; long local_f8 [2]; Value local_e8 [8]; long *local_e0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b0; data local_a8 [16]; long *local_98 [2]; long local_88 [2]; Expression local_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3540 to 001a354e has its CatchHandler @ 001a3658 */ std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 001a32d2 to 001a32e1 has its CatchHandler @ 001a36e1 */ TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30)); /* try { // try from 001a32e2 to 001a32f3 has its CatchHandler @ 001a36bb */ Value::Value(local_e8,(string *)local_98); /* try { // try from 001a32f4 to 001a330a has its CatchHandler @ 001a36ac */ std::vector<minja::Value,std::allocator<minja::Value>>::vector (avStack_138,local_e8,1,&local_108); local_120 = 0; uStack_118 = 0; local_110 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0); } if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0); } if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0); } if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } /* try { // try from 001a3398 to 001a33b4 has its CatchHandler @ 001a3697 */ Value::call((shared_ptr *)local_e8,(ArgumentsValue *)local_78); /* try { // try from 001a33b5 to 001a33c3 has its CatchHandler @ 001a3688 */ Value::to_str_abi_cxx11_(); /* try { // try from 001a33ce to 001a33d5 has its CatchHandler @ 001a3668 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,(char *)local_108,local_100); if (local_108 != local_f8) { operator_delete(local_108,local_f8[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0); } if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0); } if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0); } if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)&local_120); std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_70 + 0x18))(); } } return; } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3590 to 001a35a6 has its CatchHandler @ 001a3646 */ Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0)); /* try { // try from 001a35a7 to 001a35ba has its CatchHandler @ 001a3626 */ std::operator+((char *)local_e8,(string *)"Filter must be a callable: "); /* try { // try from 001a35be to 001a35e2 has its CatchHandler @ 001a35e3 */ std::runtime_error::runtime_error(prVar3,(string *)local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df58); } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a355e to 001a356c has its CatchHandler @ 001a3656 */ std::runtime_error::runtime_error(prVar3,"FilterNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df58); }
50,409
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O2
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x6d642 testb %al, %al je 0x74b83 movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6d4b0 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x74ba2 movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x41e2d(%rip), %rsi # 0xb69f3 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58a46 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x8b402(%rip), %rsi # 0xffff0 movq 0x8b35b(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x251b8 jmp 0x74c12 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x74c26 jmp 0x74c2e movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_74B83 mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_74B83: mov rdi, [rbx+68h] test rdi, rdi jz short loc_74BA2 mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_74BA2: 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, aUndefinedVaria; "Undefined variable: " 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:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_74C12 mov r14, rax mov bpl, 1 loc_74C12: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_74C26 jmp short loc_74C2E mov r14, rax loc_74C26: mov rdi, rbx; void * call ___cxa_free_exception loc_74C2E: mov rdi, r14 call __Unwind_Resume
long long minja::Context::at(unsigned __int8 ***this, const minja::Value *a2, __m128d a3) { unsigned __int8 **v4; // rdi void *exception; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[64]; // [rsp+28h] [rbp-40h] BYREF if ( (unsigned __int8)minja::Value::contains(this + 3, a2, a3) ) return minja::Value::at((minja::Value *)(this + 3), a2); v4 = this[13]; if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*((long long ( **)(unsigned __int8 **, const minja::Value *))*v4 + 3))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x0016d642 TEST AL,AL JZ 0x00174b83 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0016d4b0 LAB_00174b83: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x00174ba2 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_00174ba2: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_00174bad: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_00174bbf: LEA RSI,[0x1b69f3] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00158a46 MOV BPL,0x1 LAB_00174bd8: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x00174ba0. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00174bad to 00174bbe has its CatchHandler @ 00174c23 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 00174bbf to 00174bd4 has its CatchHandler @ 00174c0c */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 00174bd8 to 00174bfc has its CatchHandler @ 00174bfd */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); }
50,410
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O3
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x93284 testb %al, %al je 0x9ca4b movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x93072 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x9ca6a movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86334 leaq 0x55f71(%rip), %rsi # 0xf2a03 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x78ac9 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1be00 xorl %ebp, %ebp movq 0x9152e(%rip), %rsi # 0x12dfe8 movq 0x9148f(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cae7 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb02 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 testb %bpl, %bpl jne 0x9cb2c jmp 0x9cb34 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb2c movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x9cb2c movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9CA4B mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_9CA4B: mov rdi, [rbx+68h] test rdi, rdi jz short loc_9CA6A mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_9CA6A: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " 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:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CAE7 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CAE7: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB02 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB02: test bpl, bpl jnz short loc_9CB2C jmp short loc_9CB34 mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB2C mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9CB2C mov r14, rax loc_9CB2C: mov rdi, rbx; void * call ___cxa_free_exception loc_9CB34: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
50,411
minja::Value::Value(char const*)
monkey531[P]llama/common/minja.hpp
Value(const char * v) : primitive_(std::string(v)) {}
O2
cpp
minja::Value::Value(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x283ac leaq 0x40(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0x5fe5c leaq 0x8(%rsp), %rdi callq 0x25478 addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25478 jmp 0x76c97 movq %rax, %r14 leaq 0x38(%rbx), %rdi callq 0x5224c leaq 0x28(%rbx), %rdi callq 0x5224c leaq 0x18(%rbx), %rdi callq 0x5224c addq $0x8, %rbx movq %rbx, %rdi callq 0x6697c movq %r14, %rdi callq 0x251e0
_ZN5minja5ValueC2EPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 lea rdi, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rbx+40h] lea rsi, [rsp+38h+var_30] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ lea rdi, [rsp+38h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 28h pop rbx pop r14 retn mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_76C97 mov r14, rax loc_76C97: lea rdi, [rbx+38h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rbx+28h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rbx, 8 mov rdi, rbx call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() mov rdi, r14 call __Unwind_Resume
void minja::Value::Value(minja::Value *this, const char *a2) { _QWORD v2[6]; // [rsp+8h] [rbp-30h] BYREF *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; std::string::basic_string<std::allocator<char>>(v2, (long long)a2); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((char *)this + 64); std::string::~string(v2); }
Value: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00176c56: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x001283ac LEA RDI,[RBX + 0x40] LAB_00176c69: LEA RSI,[RSP + 0x8] CALL 0x0015fe5c LAB_00176c73: LEA RDI,[RSP + 0x8] CALL 0x00125478 ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::Value(char const*) */ void __thiscall minja::Value::Value(Value *this,char *param_1) { allocator local_31; string local_30 [32]; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 00176c56 to 00176c64 has its CatchHandler @ 00176c94 */ std::__cxx11::string::string<std::allocator<char>>(local_30,param_1,&local_31); /* try { // try from 00176c69 to 00176c72 has its CatchHandler @ 00176c85 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (this + 0x40,local_30); std::__cxx11::string::~string(local_30); return; }
50,412
minja::Value::Value(char const*)
monkey531[P]llama/common/minja.hpp
Value(const char * v) : primitive_(std::string(v)) {}
O3
cpp
minja::Value::Value(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x22508 leaq 0x40(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0x8275c leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ef16 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba20 addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ef41 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0x9ef41 movq %rax, %r14 movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x9ef4f callq 0x70324 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x9ef5d callq 0x70324 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x9ef6b callq 0x70324 movq %rbx, %rdi callq 0x8a408 movq %r14, %rdi callq 0x1c1e0 nop
_ZN5minja5ValueC2EPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 lea rdi, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rbx+40h] lea rsi, [rsp+38h+var_30] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9EF16 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9EF16: add rsp, 28h pop rbx pop r14 retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9EF41 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9EF41 mov r14, rax loc_9EF41: mov rdi, [rbx+38h] test rdi, rdi jz short loc_9EF4F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9EF4F: mov rdi, [rbx+28h] test rdi, rdi jz short loc_9EF5D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9EF5D: mov rdi, [rbx+18h] test rdi, rdi jz short loc_9EF6B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9EF6B: mov rdi, rbx call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this() mov rdi, r14 call __Unwind_Resume
void minja::Value::Value(minja::Value *this, const char *a2) { long long *v2; // [rsp+8h] [rbp-30h] BYREF long long v3; // [rsp+18h] [rbp-20h] BYREF *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; std::string::basic_string<std::allocator<char>>(&v2, (long long)a2); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((char *)this + 64); if ( v2 != &v3 ) operator delete(v2, v3 + 1); }
Value: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_0019eede: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00122508 LEA RDI,[RBX + 0x40] LAB_0019eef1: LEA RSI,[RSP + 0x8] CALL 0x0018275c LAB_0019eefb: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019ef16 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011ba20 LAB_0019ef16: ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::Value(char const*) */ void __thiscall minja::Value::Value(Value *this,char *param_1) { allocator local_31; long *local_30 [2]; long local_20 [2]; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 0019eede to 0019eeec has its CatchHandler @ 0019ef3e */ std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 0019eef1 to 0019eefa has its CatchHandler @ 0019ef1e */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (this + 0x40,local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return; }
50,413
JS_AtomGetStrRT
bluesky950520[P]quickjs/quickjs.c
static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size, JSAtom atom) { if (__JS_AtomIsTaggedInt(atom)) { snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom)); } else if (atom == JS_ATOM_NULL) { snprintf(buf, buf_size, "<null>"); } else if (atom >= rt->atom_size) { assert(atom < rt->atom_size); snprintf(buf, buf_size, "<invalid %x>", atom); } else { JSAtomStruct *p = rt->atom_array[atom]; *buf = '\0'; if (atom_is_free(p)) { assert(!atom_is_free(p)); snprintf(buf, buf_size, "<free %x>", atom); } else if (p != NULL) { JSString *str = p; if (str->is_wide_char) { /* encode surrogates correctly */ utf8_encode_buf16(buf, buf_size, str->u.str16, str->len); } else { /* special case ASCII strings */ int i, c = 0; for(i = 0; i < str->len; i++) { c |= str->u.str8[i]; } if (c < 0x80) return (const char *)str->u.str8; utf8_encode_buf8(buf, buf_size, str->u.str8, str->len); } } } return buf; }
O2
c
JS_AtomGetStrRT: pushq %rbx movl %edx, %ecx movq %rsi, %rbx testl %edx, %edx js 0x1ff70 je 0x1ff7f cmpl %ecx, 0x58(%rdi) jbe 0x1ff8e movq 0x68(%rdi), %rax movl %ecx, %edx movq (%rax,%rdx,8), %rdx movb $0x0, (%rbx) testb $0x1, %dl jne 0x1ff97 testq %rdx, %rdx je 0x1ffab movq 0x4(%rdx), %rcx addq $0x18, %rdx movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF testl %ecx, %ecx js 0x1ffb0 xorl %esi, %esi xorl %edi, %edi cmpq %rsi, %rax je 0x1ffc0 movzbl (%rdx,%rsi), %r8d orl %r8d, %edi incq %rsi jmp 0x1ff5e andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq 0x69b4d(%rip), %rdx # 0x89aca jmp 0x1ff9e movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C jmp 0x1ffab leaq 0x6913d(%rip), %rdx # 0x890d2 jmp 0x1ff9e leaq 0x69141(%rip), %rdx # 0x890df pushq $0x40 popq %rsi movq %rbx, %rdi xorl %eax, %eax callq 0xe310 movq %rbx, %rax popq %rbx retq pushq $0x40 popq %rsi movq %rbx, %rdi movq %rax, %rcx callq 0x19eb4 jmp 0x1ffab cmpl $0x80, %edi jl 0x1ffdb andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF pushq $0x40 popq %rsi movq %rbx, %rdi callq 0x19e3d jmp 0x1ffab movq %rdx, %rbx jmp 0x1ffab
JS_AtomGetStrRT: push rbx mov ecx, edx mov rbx, rsi test edx, edx js short loc_1FF70 jz short loc_1FF7F cmp [rdi+58h], ecx jbe short loc_1FF8E mov rax, [rdi+68h] mov edx, ecx mov rdx, [rax+rdx*8] mov byte ptr [rbx], 0 test dl, 1 jnz short loc_1FF97 test rdx, rdx jz short loc_1FFAB mov rcx, [rdx+4] add rdx, 18h mov eax, ecx and eax, 7FFFFFFFh test ecx, ecx js short loc_1FFB0 xor esi, esi xor edi, edi loc_1FF5E: cmp rax, rsi jz short loc_1FFC0 movzx r8d, byte ptr [rdx+rsi] or edi, r8d inc rsi jmp short loc_1FF5E loc_1FF70: and ecx, 7FFFFFFFh lea rdx, aUnreasonableAt+19h; "%u" jmp short loc_1FF9E loc_1FF7F: mov dword ptr [rbx+3], 3E6C6Ch mov dword ptr [rbx], 6C756E3Ch jmp short loc_1FFAB loc_1FF8E: lea rdx, aInvalidX; "<invalid %x>" jmp short loc_1FF9E loc_1FF97: lea rdx, aFreeX; "<free %x>" loc_1FF9E: push 40h ; '@' pop rsi mov rdi, rbx xor eax, eax call _snprintf loc_1FFAB: mov rax, rbx pop rbx retn loc_1FFB0: push 40h ; '@' pop rsi mov rdi, rbx mov rcx, rax call utf8_encode_buf16 jmp short loc_1FFAB loc_1FFC0: cmp edi, 80h jl short loc_1FFDB and ecx, 7FFFFFFFh push 40h ; '@' pop rsi mov rdi, rbx call utf8_encode_buf8 jmp short loc_1FFAB loc_1FFDB: mov rbx, rdx jmp short loc_1FFAB
long long JS_AtomGetStrRT(long long a1, char *a2, int a3) { long long v3; // rbx long long v4; // rdx long long v5; // rcx long long v6; // rdx long long v7; // rsi int v8; // edi v3 = (long long)a2; if ( a3 < 0 ) { snprintf(a2, 64LL, "%u"); } else if ( a3 ) { if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 ) { snprintf(a2, 64LL, "<invalid %x>"); } else { v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3); *a2 = 0; if ( (v4 & 1) != 0 ) { snprintf(a2, 64LL, "<free %x>"); } else if ( v4 ) { v5 = *(_QWORD *)(v4 + 4); v6 = v4 + 24; if ( (int)v5 < 0 ) { utf8_encode_buf16((long long)a2, 0x40uLL, v6, v5 & 0x7FFFFFFF); } else { v7 = 0LL; v8 = 0; while ( (v5 & 0x7FFFFFFF) != v7 ) v8 |= *(unsigned __int8 *)(v6 + v7++); if ( v8 < 128 ) return v6; else utf8_encode_buf8(v3, 0x40uLL, v6, v5 & 0x7FFFFFFF); } } } } else { strcpy(a2, "<null>"); } return v3; }
JS_AtomGetStrRT: PUSH RBX MOV ECX,EDX MOV RBX,RSI TEST EDX,EDX JS 0x0011ff70 JZ 0x0011ff7f CMP dword ptr [RDI + 0x58],ECX JBE 0x0011ff8e MOV RAX,qword ptr [RDI + 0x68] MOV EDX,ECX MOV RDX,qword ptr [RAX + RDX*0x8] MOV byte ptr [RBX],0x0 TEST DL,0x1 JNZ 0x0011ff97 TEST RDX,RDX JZ 0x0011ffab MOV RCX,qword ptr [RDX + 0x4] ADD RDX,0x18 MOV EAX,ECX AND EAX,0x7fffffff TEST ECX,ECX JS 0x0011ffb0 XOR ESI,ESI XOR EDI,EDI LAB_0011ff5e: CMP RAX,RSI JZ 0x0011ffc0 MOVZX R8D,byte ptr [RDX + RSI*0x1] OR EDI,R8D INC RSI JMP 0x0011ff5e LAB_0011ff70: AND ECX,0x7fffffff LEA RDX,[0x189aca] JMP 0x0011ff9e LAB_0011ff7f: MOV dword ptr [RBX + 0x3],0x3e6c6c MOV dword ptr [RBX],0x6c756e3c JMP 0x0011ffab LAB_0011ff8e: LEA RDX,[0x1890d2] JMP 0x0011ff9e LAB_0011ff97: LEA RDX,[0x1890df] LAB_0011ff9e: PUSH 0x40 POP RSI MOV RDI,RBX XOR EAX,EAX CALL 0x0010e310 LAB_0011ffab: MOV RAX,RBX POP RBX RET LAB_0011ffb0: PUSH 0x40 POP RSI MOV RDI,RBX MOV RCX,RAX CALL 0x00119eb4 JMP 0x0011ffab LAB_0011ffc0: CMP EDI,0x80 JL 0x0011ffdb AND ECX,0x7fffffff PUSH 0x40 POP RSI MOV RDI,RBX CALL 0x00119e3d JMP 0x0011ffab LAB_0011ffdb: MOV RBX,RDX JMP 0x0011ffab
char * JS_AtomGetStrRT(long param_1,char *param_2,uint param_3) { ulong uVar1; uint uVar2; char *pcVar3; ulong uVar4; byte bVar5; uVar4 = (ulong)param_3; if ((int)param_3 < 0) { uVar4 = (ulong)(param_3 & 0x7fffffff); pcVar3 = "%u"; } else { if (param_3 == 0) { builtin_strncpy(param_2,"<null>",7); return param_2; } if (param_3 < *(uint *)(param_1 + 0x58)) { uVar1 = *(ulong *)(*(long *)(param_1 + 0x68) + uVar4 * 8); *param_2 = '\0'; if ((uVar1 & 1) == 0) { if (uVar1 == 0) { return param_2; } pcVar3 = (char *)(uVar1 + 0x18); uVar2 = (uint)*(int8 *)(uVar1 + 4); if (-1 < (int)uVar2) { bVar5 = 0; for (uVar4 = 0; (uVar2 & 0x7fffffff) != uVar4; uVar4 = uVar4 + 1) { bVar5 = bVar5 | pcVar3[uVar4]; } if (bVar5 < 0x80) { return pcVar3; } utf8_encode_buf8(param_2,0x40,pcVar3,uVar2 & 0x7fffffff); return param_2; } utf8_encode_buf16(param_2,0x40,pcVar3,(ulong)(uVar2 & 0x7fffffff)); return param_2; } pcVar3 = "<free %x>"; } else { pcVar3 = "<invalid %x>"; } } snprintf(param_2,0x40,pcVar3,uVar4); return param_2; }
50,414
insert_events_statements_history(PFS_thread*, PFS_events_statements*)
eloqsql/storage/perfschema/pfs_events_statements.cc
void insert_events_statements_history(PFS_thread *thread, PFS_events_statements *statement) { if (unlikely(events_statements_history_per_thread == 0)) return; assert(thread->m_statements_history != NULL); uint index= thread->m_statements_history_index; /* A concurrent thread executing TRUNCATE TABLE EVENTS_STATEMENTS_CURRENT could alter the data that this thread is inserting, causing a potential race condition. We are not testing for this and insert a possibly empty record, to make this thread (the writer) faster. This is ok, the readers of m_statements_history will filter this out. */ thread->m_statements_history[index].copy(*statement); index++; if (index >= events_statements_history_per_thread) { index= 0; thread->m_statements_history_full= true; } thread->m_statements_history_index= index; }
O0
cpp
insert_events_statements_history(PFS_thread*, PFS_events_statements*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq 0x3b64a1(%rip), %rax # 0x40daa8 cmpq $0x0, (%rax) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x5761a jmp 0x5767f movq -0x8(%rbp), %rax movl 0xcbc(%rax), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0xcc0(%rax), %rdi movl -0x14(%rbp), %eax imulq $0x590, %rax, %rax # imm = 0x590 addq %rax, %rdi movq -0x10(%rbp), %rsi callq 0x57a80 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax leaq 0x3b644d(%rip), %rcx # 0x40daa8 cmpq (%rcx), %rax jb 0x57672 movl $0x0, -0x14(%rbp) movq -0x8(%rbp), %rax movb $0x1, 0xcb8(%rax) movl -0x14(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xcbc(%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z32insert_events_statements_historyP10PFS_threadP21PFS_events_statements: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rax, events_statements_history_per_thread cmp qword ptr [rax], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_5761A jmp short loc_5767F loc_5761A: mov rax, [rbp+var_8] mov eax, [rax+0CBCh] mov [rbp+var_14], eax mov rax, [rbp+var_8] mov rdi, [rax+0CC0h] mov eax, [rbp+var_14] imul rax, 590h add rdi, rax mov rsi, [rbp+var_10] call _ZN21PFS_events_statements4copyERKS_; PFS_events_statements::copy(PFS_events_statements const&) mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_14] lea rcx, events_statements_history_per_thread cmp rax, [rcx] jb short loc_57672 mov [rbp+var_14], 0 mov rax, [rbp+var_8] mov byte ptr [rax+0CB8h], 1 loc_57672: mov ecx, [rbp+var_14] mov rax, [rbp+var_8] mov [rax+0CBCh], ecx loc_5767F: add rsp, 20h pop rbp retn
_BOOL8 insert_events_statements_history(long long a1, long long a2) { _BOOL8 result; // rax unsigned int v3; // [rsp+Ch] [rbp-14h] unsigned int v4; // [rsp+Ch] [rbp-14h] result = events_statements_history_per_thread == 0; if ( events_statements_history_per_thread ) { v3 = *(_DWORD *)(a1 + 3260); PFS_events_statements::copy(1424LL * v3 + *(_QWORD *)(a1 + 3264), a2); v4 = v3 + 1; if ( v4 >= (unsigned long long)events_statements_history_per_thread ) { v4 = 0; *(_BYTE *)(a1 + 3256) = 1; } result = a1; *(_DWORD *)(a1 + 3260) = v4; } return result; }
insert_events_statements_history: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[0x50daa8] CMP qword ptr [RAX],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0015761a JMP 0x0015767f LAB_0015761a: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xcbc] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xcc0] MOV EAX,dword ptr [RBP + -0x14] IMUL RAX,RAX,0x590 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] CALL 0x00157a80 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] LEA RCX,[0x50daa8] CMP RAX,qword ptr [RCX] JC 0x00157672 MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xcb8],0x1 LAB_00157672: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xcbc],ECX LAB_0015767f: ADD RSP,0x20 POP RBP RET
/* insert_events_statements_history(PFS_thread*, PFS_events_statements*) */ void insert_events_statements_history(PFS_thread *param_1,PFS_events_statements *param_2) { uint local_1c; if (events_statements_history_per_thread != 0) { local_1c = *(uint *)(param_1 + 0xcbc); PFS_events_statements::copy ((PFS_events_statements *)(*(long *)(param_1 + 0xcc0) + (ulong)local_1c * 0x590), param_2); local_1c = local_1c + 1; if (events_statements_history_per_thread <= local_1c) { local_1c = 0; param_1[0xcb8] = (PFS_thread)0x1; } *(uint *)(param_1 + 0xcbc) = local_1c; } return; }
50,415
ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l>>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/animation.cpp
Animator::Animator(float* from, float to, Duration duration, easing::Function easing_function, Duration delay) : value_(from), from_(*from), to_(to), duration_(duration), easing_function_(std::move(easing_function)), current_(-delay) { RequestAnimationFrame(); }
O1
cpp
ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l>>): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movq %rsi, (%rdi) movss (%rsi), %xmm3 movss %xmm3, 0x8(%rdi) movss %xmm0, 0xc(%rdi) movss %xmm1, 0x10(%rdi) leaq 0x18(%rdi), %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rdi) movq $0x0, 0x28(%rdi) movq 0x18(%rdx), %rax movq %rax, 0x30(%rdi) cmpq $0x0, 0x10(%rdx) je 0x37d1d leaq 0x10(%rdx), %rax movups (%rdx), %xmm1 movups %xmm1, (%rbx) movq 0x10(%rdx), %rcx movq %rcx, 0x28(%r14) movups %xmm0, (%rax) xorps 0x869c(%rip), %xmm2 # 0x403c0 movss %xmm2, 0x38(%r14) callq 0x2db30 popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 movq 0x28(%r14), %rax testq %rax, %rax je 0x37d4e movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0xb780 movq %rax, %rdi callq 0x106a9
_ZN5ftxui9animation8AnimatorC2EPffNSt6chrono8durationIfSt5ratioILl1ELl1EEEESt8functionIFffEES7_: push r15; Alternative name is 'ftxui::animation::Animator::Animator(float *, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float ()(float)>, std::chrono::duration<float, std::ratio<1l, 1l>>)' push r14 push rbx mov r14, rdi mov [rdi], rsi movss xmm3, dword ptr [rsi] movss dword ptr [rdi+8], xmm3 movss dword ptr [rdi+0Ch], xmm0 movss dword ptr [rdi+10h], xmm1 lea rbx, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi+18h], xmm0 mov qword ptr [rdi+28h], 0 mov rax, [rdx+18h] mov [rdi+30h], rax cmp qword ptr [rdx+10h], 0 jz short loc_37D1D lea rax, [rdx+10h] movups xmm1, xmmword ptr [rdx] movups xmmword ptr [rbx], xmm1 mov rcx, [rdx+10h] mov [r14+28h], rcx movups xmmword ptr [rax], xmm0 loc_37D1D: xorps xmm2, cs:xmmword_403C0 movss dword ptr [r14+38h], xmm2 call _ZN5ftxui9animation21RequestAnimationFrameEv; ftxui::animation::RequestAnimationFrame(void) pop rbx pop r14 pop r15 retn mov r15, rax mov rax, [r14+28h] test rax, rax jz short loc_37D4E mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_37D4E: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void ftxui::animation::Animator::Animator(long long a1, _DWORD *a2, long long a3, float a4, float a5, float a6) { *(_QWORD *)a1 = a2; *(_DWORD *)(a1 + 8) = *a2; *(float *)(a1 + 12) = a4; *(float *)(a1 + 16) = a5; *(_OWORD *)(a1 + 24) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = *(_QWORD *)(a3 + 24); if ( *(_QWORD *)(a3 + 16) ) { *(_OWORD *)(a1 + 24) = *(_OWORD *)a3; *(_QWORD *)(a1 + 40) = *(_QWORD *)(a3 + 16); *(_OWORD *)(a3 + 16) = 0LL; } *(float *)(a1 + 56) = -a6; ftxui::animation::RequestAnimationFrame((ftxui::animation *)a1); }
Animator: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV qword ptr [RDI],RSI MOVSS XMM3,dword ptr [RSI] MOVSS dword ptr [RDI + 0x8],XMM3 MOVSS dword ptr [RDI + 0xc],XMM0 MOVSS dword ptr [RDI + 0x10],XMM1 LEA RBX,[RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOV qword ptr [RDI + 0x28],0x0 MOV RAX,qword ptr [RDX + 0x18] MOV qword ptr [RDI + 0x30],RAX CMP qword ptr [RDX + 0x10],0x0 JZ 0x00137d1d LEA RAX,[RDX + 0x10] MOVUPS XMM1,xmmword ptr [RDX] MOVUPS xmmword ptr [RBX],XMM1 MOV RCX,qword ptr [RDX + 0x10] MOV qword ptr [R14 + 0x28],RCX MOVUPS xmmword ptr [RAX],XMM0 LAB_00137d1d: XORPS XMM2,xmmword ptr [0x001403c0] MOVSS dword ptr [R14 + 0x38],XMM2 LAB_00137d2a: CALL 0x0012db30 POP RBX POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l> >, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l> >) */ void __thiscall ftxui::animation::Animator::Animator (int4 param_2,int4 param_2_00,uint param_3,Animator *this,int4 *param_1, int8 *param_6) { int8 uVar1; *(int4 **)this = param_1; *(int4 *)(this + 8) = *param_1; *(int4 *)(this + 0xc) = param_2; *(int4 *)(this + 0x10) = param_2_00; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = param_6[3]; if (param_6[2] != 0) { uVar1 = param_6[1]; *(int8 *)(this + 0x18) = *param_6; *(int8 *)(this + 0x20) = uVar1; *(int8 *)(this + 0x28) = param_6[2]; param_6[2] = 0; param_6[3] = 0; } *(uint *)(this + 0x38) = param_3 ^ _DAT_001403c0; /* try { // try from 00137d2a to 00137d2e has its CatchHandler @ 00137d35 */ RequestAnimationFrame(); return; }
50,416
Engine::moveToSan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
std::string Engine::moveToSan(const std::string& uciMove) { if (isGameOver()) { return ""; } Move move = uci::uciToMove(board, uciMove); return uci::moveToSan(board, move); }
O0
cpp
Engine::moveToSan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x48(%rbp) movq %rdi, %rax movq %rax, -0x40(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x38(%rbp) callq 0x11370 testb $0x1, %al jne 0xf532 jmp 0xf577 leaq -0x19(%rbp), %rdi movq %rdi, -0x50(%rbp) callq 0x34e0 movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rdx leaq 0x15a7d(%rip), %rsi # 0x24fcb callq 0xe9e0 jmp 0xf555 leaq -0x19(%rbp), %rdi callq 0x3320 jmp 0xf598 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x19(%rbp), %rdi callq 0x3320 jmp 0xf5a2 movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x10b90 movq -0x48(%rbp), %rdi movq -0x38(%rbp), %rsi movl %eax, -0x30(%rbp) leaq -0x30(%rbp), %rdx callq 0x113a0 movq -0x40(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq -0x28(%rbp), %rdi callq 0x34d0 nopl (%rax,%rax)
_ZN6Engine9moveToSanERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_48], rdi mov rax, rdi mov [rbp+var_40], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10]; this mov [rbp+var_38], rdi call _ZN6Engine10isGameOverEv; Engine::isGameOver(void) test al, 1 jnz short loc_F532 jmp short loc_F577 loc_F532: lea rdi, [rbp+var_19] mov [rbp+var_50], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_48] mov rdx, [rbp+var_50] lea rsi, asc_24FC9+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F555: lea rdi, [rbp+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_F598 mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax lea rdi, [rbp+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_F5A2 loc_F577: mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] call _ZN5chess3uci9uciToMoveERKNS_5BoardERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::uciToMove(chess::Board const&,std::string const&) mov rdi, [rbp+var_48] mov rsi, [rbp+var_38] mov [rbp+var_30], eax lea rdx, [rbp+var_30] call _ZN5chess3uci9moveToSanB5cxx11ERKNS_5BoardERKNS_4MoveE; chess::uci::moveToSan(chess::Board const&,chess::Move const&) loc_F598: mov rax, [rbp+var_40] add rsp, 50h pop rbp retn loc_F5A2: mov rdi, [rbp+var_28] call __Unwind_Resume
long long Engine::moveToSan(long long a1, Engine *a2, long long a3) { int v4; // [rsp+20h] [rbp-30h] BYREF char v5; // [rsp+37h] [rbp-19h] BYREF long long v6; // [rsp+38h] [rbp-18h] Engine *v7; // [rsp+40h] [rbp-10h] long long v8; // [rsp+48h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; if ( (Engine::isGameOver(a2) & 1) != 0 ) { std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v5); std::allocator<char>::~allocator(&v5); } else { v4 = chess::uci::uciToMove(a2, v6); chess::uci::moveToSan[abi:cxx11](a1, a2, &v4); } return a1; }
moveToSan: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x48],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RDI CALL 0x00111370 TEST AL,0x1 JNZ 0x0010f532 JMP 0x0010f577 LAB_0010f532: LEA RDI,[RBP + -0x19] MOV qword ptr [RBP + -0x50],RDI CALL 0x001034e0 MOV RDI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] LAB_0010f547: LEA RSI,[0x124fcb] CALL 0x0010e9e0 LAB_0010f553: JMP 0x0010f555 LAB_0010f555: LEA RDI,[RBP + -0x19] CALL 0x00103320 JMP 0x0010f598 LAB_0010f577: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00110b90 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x30],EAX LEA RDX,[RBP + -0x30] CALL 0x001113a0 LAB_0010f598: MOV RAX,qword ptr [RBP + -0x40] ADD RSP,0x50 POP RBP RET
/* Engine::moveToSan(std::__cxx11::string const&) */ string * Engine::moveToSan(string *param_1) { Board *in_RDX; Engine *in_RSI; int1 auVar1 [16]; int4 local_38 [5]; allocator local_21; Board *local_20; string *local_10; local_20 = in_RDX; local_10 = param_1; auVar1 = isGameOver(in_RSI); if ((auVar1 & (int1 [16])0x1) == (int1 [16])0x0) { local_38[0] = chess::uci::uciToMove((uci *)in_RSI,local_20,auVar1._8_8_); chess::uci::moveToSan_abi_cxx11_((uci *)param_1,(Board *)in_RSI,(Move *)local_38); } else { std::allocator<char>::allocator(); /* try { // try from 0010f547 to 0010f552 has its CatchHandler @ 0010f560 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_21); std::allocator<char>::~allocator((allocator<char> *)&local_21); } return param_1; }
50,417
Engine::moveToSan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
std::string Engine::moveToSan(const std::string& uciMove) { if (isGameOver()) { return ""; } Move move = uci::uciToMove(board, uciMove); return uci::moveToSan(board, move); }
O1
cpp
Engine::moveToSan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x8128 shrq $0x20, %rax cmpl $0x3, %eax jne 0x6cc2 movq %r14, %rdi movq %r15, %rsi callq 0x7878 leaq 0xc(%rsp), %rdx movl %eax, (%rdx) movq %rbx, %rdi movq %r14, %rsi callq 0x7bfa jmp 0x6cdb leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x9f8b(%rip), %rdx # 0x10c5b movq %rbx, %rdi movq %rdx, %rsi callq 0x50dc movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN6Engine9moveToSanERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx; __int64 sub rsp, 10h mov r15, rdx mov r14, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK5chess5Board10isGameOverEv; chess::Board::isGameOver(void) shr rax, 20h cmp eax, 3 jnz short loc_6CC2 mov rdi, r14 mov rsi, r15 call _ZN5chess3uci9uciToMoveERKNS_5BoardERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::uciToMove(chess::Board const&,std::string const&) lea rdx, [rsp+28h+var_1C] mov [rdx], eax mov rdi, rbx; int mov rsi, r14 call _ZN5chess3uci9moveToSanB5cxx11ERKNS_5BoardERKNS_4MoveE; chess::uci::moveToSan(chess::Board const&,chess::Move const&) jmp short loc_6CDB loc_6CC2: lea rax, [rbx+10h] mov [rbx], rax lea rdx, asc_10C59+2; "" mov rdi, rbx mov rsi, rdx 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) loc_6CDB: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
_QWORD * Engine::moveToSan(_QWORD *a1, chess::Board *this, long long a3) { void *v5; // [rsp+0h] [rbp-28h] int v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+10h] [rbp-18h] if ( (unsigned long long)chess::Board::isGameOver(this) >> 32 == 3 ) { chess::uci::uciToMove(this, a3); chess::uci::moveToSan[abi:cxx11]((int)a1, v5, v6, v7); } else { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "", (long long)""); } return a1; }
moveToSan: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00108128 SHR RAX,0x20 CMP EAX,0x3 JNZ 0x00106cc2 MOV RDI,R14 MOV RSI,R15 CALL 0x00107878 LEA RDX,[RSP + 0xc] MOV dword ptr [RDX],EAX MOV RDI,RBX MOV RSI,R14 CALL 0x00107bfa JMP 0x00106cdb LAB_00106cc2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x110c5b] MOV RDI,RBX MOV RSI,RDX CALL 0x001050dc LAB_00106cdb: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* Engine::moveToSan(std::__cxx11::string const&) */ string * Engine::moveToSan(string *param_1) { int extraout_var; Board *in_RDX; string *extraout_RDX; Board *in_RSI; int4 local_1c; chess::Board::isGameOver(in_RSI); if (extraout_var == 3) { local_1c = chess::uci::uciToMove((uci *)in_RSI,in_RDX,extraout_RDX); chess::uci::moveToSan_abi_cxx11_((uci *)param_1,in_RSI,(Move *)&local_1c); } else { *(string **)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_00110c5b); } return param_1; }
50,418
ggml_compute_forward_im2col
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_im2col( const struct ggml_compute_params * params, struct ggml_tensor * dst) { switch (dst->type) { case GGML_TYPE_F16: { ggml_compute_forward_im2col_f16(params, dst); } break; case GGML_TYPE_F32: { ggml_compute_forward_im2col_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_im2col: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x14(%rbp) testl %eax, %eax je 0x16bf8 jmp 0x16bdf movl -0x14(%rbp), %eax subl $0x1, %eax jne 0x16c07 jmp 0x16be9 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x33160 jmp 0x16c21 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x33930 jmp 0x16c21 leaq 0x5cf54(%rip), %rdi # 0x73b62 movl $0x26f9, %esi # imm = 0x26F9 leaq 0x5d1a3(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_im2col: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_14], eax test eax, eax jz short loc_16BF8 jmp short $+2 loc_16BDF: mov eax, [rbp+var_14] sub eax, 1 jnz short loc_16C07 jmp short $+2 loc_16BE9: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_im2col_f16 jmp short loc_16C21 loc_16BF8: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_im2col_f32 jmp short loc_16C21 loc_16C07: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 26F9h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_16C21: add rsp, 20h pop rbp retn
double ggml_compute_forward_im2col(long long a1, _DWORD *a2) { double result; // xmm0_8 if ( *a2 ) { if ( *a2 == 1 ) ggml_compute_forward_im2col_f16(a1, a2); else return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 9977LL, "fatal error"); } else { ggml_compute_forward_im2col_f32(a1, a2); } return result; }
ggml_compute_forward_im2col: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX TEST EAX,EAX JZ 0x00116bf8 JMP 0x00116bdf LAB_00116bdf: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 JNZ 0x00116c07 JMP 0x00116be9 LAB_00116be9: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00133160 JMP 0x00116c21 LAB_00116bf8: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00133930 JMP 0x00116c21 LAB_00116c07: LEA RDI,[0x173b62] MOV ESI,0x26f9 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00116c21: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_im2col(int8 param_1,int *param_2) { if (*param_2 == 0) { ggml_compute_forward_im2col_f32(param_1,param_2); } else if (*param_2 == 1) { ggml_compute_forward_im2col_f16(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x26f9,"fatal error"); } return; }
50,419
_JS_ToFloat64Free
bluesky950520[P]quickjs/quickjs.c
static __exception int __JS_ToFloat64Free(JSContext *ctx, double *pres, JSValue val) { double d; uint32_t tag; val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = JS_FLOAT64_NAN; return -1; } tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: d = JS_VALUE_GET_INT(val); break; case JS_TAG_FLOAT64: d = JS_VALUE_GET_FLOAT64(val); break; case JS_TAG_BIG_INT: { JSBigInt *p = JS_VALUE_GET_PTR(val); /* XXX: there can be a double rounding issue with some primitives (such as JS_ToUint8ClampFree()), but it is not critical to fix it. */ bf_get_float64(&p->num, &d, BF_RNDN); JS_FreeValue(ctx, val); } break; default: abort(); } *pres = d; return 0; }
O0
c
_JS_ToFloat64Free: subq $0x58, %rsp movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x56da0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x67ffc movq 0x30(%rsp), %rax movsd 0xaba85(%rip), %xmm0 # 0x113a70 movsd %xmm0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x68095 movl 0x48(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax movl %eax, 0x4(%rsp) subl $-0x9, %eax je 0x68044 jmp 0x68013 movl 0x4(%rsp), %eax testl %eax, %eax je 0x68028 jmp 0x6801d movl 0x4(%rsp), %eax subl $0x7, %eax je 0x68036 jmp 0x68079 cvtsi2sdl 0x40(%rsp), %xmm0 movsd %xmm0, 0x28(%rsp) jmp 0x6807e movsd 0x40(%rsp), %xmm0 movsd %xmm0, 0x28(%rsp) jmp 0x6807e movq 0x40(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi addq $0x8, %rdi leaq 0x28(%rsp), %rsi xorl %edx, %edx callq 0xf1090 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x29f80 jmp 0x6807e callq 0xe090 movsd 0x28(%rsp), %xmm0 movq 0x30(%rsp), %rax movsd %xmm0, (%rax) movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nop
__JS_ToFloat64Free: sub rsp, 58h mov [rsp+58h+var_18], rdx mov [rsp+58h+var_10], rcx mov [rsp+58h+var_20], rdi mov [rsp+58h+var_28], rsi mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_ToNumberFree mov [rsp+58h+var_48], rax mov [rsp+58h+var_40], rdx mov rax, [rsp+58h+var_48] mov [rsp+58h+var_18], rax mov rax, [rsp+58h+var_40] mov [rsp+58h+var_10], rax mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_10] call JS_IsException_1 cmp eax, 0 jz short loc_67FFC mov rax, [rsp+58h+var_28] movsd xmm0, cs:qword_113A70 movsd qword ptr [rax], xmm0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp loc_68095 loc_67FFC: mov eax, dword ptr [rsp+58h+var_10] mov [rsp+58h+var_34], eax mov eax, [rsp+58h+var_34] mov [rsp+58h+var_54], eax sub eax, 0FFFFFFF7h jz short loc_68044 jmp short $+2 loc_68013: mov eax, [rsp+58h+var_54] test eax, eax jz short loc_68028 jmp short $+2 loc_6801D: mov eax, [rsp+58h+var_54] sub eax, 7 jz short loc_68036 jmp short loc_68079 loc_68028: cvtsi2sd xmm0, dword ptr [rsp+58h+var_18] movsd [rsp+58h+var_30], xmm0 jmp short loc_6807E loc_68036: movsd xmm0, [rsp+58h+var_18] movsd [rsp+58h+var_30], xmm0 jmp short loc_6807E loc_68044: mov rax, [rsp+58h+var_18] mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_50] add rdi, 8 lea rsi, [rsp+58h+var_30] xor edx, edx call bf_get_float64 mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_FreeValue jmp short loc_6807E loc_68079: call _abort loc_6807E: movsd xmm0, [rsp+58h+var_30] mov rax, [rsp+58h+var_28] movsd qword ptr [rax], xmm0 mov [rsp+58h+var_4], 0 loc_68095: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long _JS_ToFloat64Free(long long a1, double *a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // rdx const char *v8; // [rsp+10h] [rbp-48h] double v9; // [rsp+28h] [rbp-30h] BYREF double *v10; // [rsp+30h] [rbp-28h] long long v11; // [rsp+38h] [rbp-20h] const char *v12; // [rsp+40h] [rbp-18h] long long v13; // [rsp+48h] [rbp-10h] v11 = a1; v10 = a2; v8 = (const char *)JS_ToNumberFree(a1, a3, a4, a4, a5, a6); v12 = v8; v13 = v6; if ( JS_IsException_1((long long)v8, v6) ) { *v10 = NAN; return (unsigned int)-1; } else { if ( (_DWORD)v13 == -9 ) { bf_get_float64(v12 + 8, &v9, 0LL); JS_FreeValue(v11, (long long)v12, v13); } else if ( (_DWORD)v13 ) { if ( (_DWORD)v13 != 7 ) abort(v8); v9 = *(double *)&v12; } else { v9 = (double)(int)v12; } *v10 = v9; return 0; } }
__JS_ToFloat64Free: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00156da0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x00167ffc MOV RAX,qword ptr [RSP + 0x30] MOVSD XMM0,qword ptr [0x00213a70] MOVSD qword ptr [RAX],XMM0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x00168095 LAB_00167ffc: MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x4],EAX SUB EAX,-0x9 JZ 0x00168044 JMP 0x00168013 LAB_00168013: MOV EAX,dword ptr [RSP + 0x4] TEST EAX,EAX JZ 0x00168028 JMP 0x0016801d LAB_0016801d: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x7 JZ 0x00168036 JMP 0x00168079 LAB_00168028: CVTSI2SD XMM0,dword ptr [RSP + 0x40] MOVSD qword ptr [RSP + 0x28],XMM0 JMP 0x0016807e LAB_00168036: MOVSD XMM0,qword ptr [RSP + 0x40] MOVSD qword ptr [RSP + 0x28],XMM0 JMP 0x0016807e LAB_00168044: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 LEA RSI,[RSP + 0x28] XOR EDX,EDX CALL 0x001f1090 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00129f80 JMP 0x0016807e LAB_00168079: CALL 0x0010e090 LAB_0016807e: MOVSD XMM0,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOVSD qword ptr [RAX],XMM0 MOV dword ptr [RSP + 0x54],0x0 LAB_00168095: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 __JS_ToFloat64Free(int8 param_1,double *param_2,int8 param_3,int8 param_4) { int iVar1; double local_30; double *local_28; int8 local_20; int1 local_18 [16]; int4 local_4; local_28 = param_2; local_20 = param_1; local_18._0_8_ = param_3; local_18._8_8_ = param_4; local_18 = JS_ToNumberFree(param_1,param_3,param_4); iVar1 = JS_IsException(local_18._0_8_,local_18._8_8_); if (iVar1 == 0) { if (local_18._8_4_ == -9) { bf_get_float64(local_18._0_8_ + 8,&local_30,0); JS_FreeValue(local_20,local_18._0_8_,local_18._8_8_); } else if (local_18._8_4_ == 0) { local_30 = (double)(int)local_18._0_4_; } else { if (local_18._8_4_ != 7) { /* WARNING: Subroutine does not return */ abort(); } local_30 = (double)local_18._0_8_; } *local_28 = local_30; local_4 = 0; } else { *local_28 = DAT_00213a70; local_4 = 0xffffffff; } return local_4; }
50,420
translog_filename_by_fileno
eloqsql/storage/maria/ma_loghandler.c
char *translog_filename_by_fileno(uint32 file_no, char *path) { char buff[11], *end; uint length; DBUG_ENTER("translog_filename_by_fileno"); DBUG_ASSERT(file_no <= 0xfffffff); /* log_descriptor.directory is already formated */ end= strxmov(path, log_descriptor.directory, "aria_log.0000000", NullS); length= (uint) (int10_to_str(file_no, buff, 10) - buff); strmov(end - length +1, buff); DBUG_PRINT("info", ("Path: '%s' path: %p", path, path)); DBUG_RETURN(path); }
O3
c
translog_filename_by_fileno: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movl %edi, %r14d movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x3b93ec(%rip), %rsi # 0x3fd188 leaq 0x94eb4(%rip), %rdx # 0xd8c57 movq %rbx, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0xd6a88 movq %rax, %r15 movl %r14d, %edi leaq -0x2b(%rbp), %r14 movq %r14, %rsi movl $0xa, %edx callq 0xd505a subl %r14d, %eax subq %rax, %r15 incq %r15 movq %r15, %rdi movq %r14, %rsi callq 0x29350 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x43df7 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29260
translog_filename_by_fileno: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov rbx, rsi mov r14d, edi mov rax, fs:28h mov [rbp+var_20], rax lea rsi, unk_3FD188 lea rdx, aAriaLog0000000; "aria_log.0000000" mov rdi, rbx xor ecx, ecx xor eax, eax call strxmov mov r15, rax mov edi, r14d lea r14, [rbp+var_2B] mov rsi, r14 mov edx, 0Ah call int10_to_str sub eax, r14d sub r15, rax inc r15 mov rdi, r15 mov rsi, r14 call _strcpy mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_43DF7 mov rax, rbx add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_43DF7: call ___stack_chk_fail
long long translog_filename_by_fileno(unsigned int a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // r15 int v7; // eax _BYTE v9[11]; // [rsp+5h] [rbp-2Bh] BYREF unsigned long long v10; // [rsp+10h] [rbp-20h] v10 = __readfsqword(0x28u); v6 = strxmov(a2, (unsigned int)&unk_3FD188, (unsigned int)"aria_log.0000000", 0, a5, a6); v7 = int10_to_str(a1, v9, 10LL); strcpy(v6 - (v7 - (unsigned int)v9) + 1, v9); return a2; }
translog_filename_by_fileno: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RSI,[0x4fd188] LEA RDX,[0x1d8c57] MOV RDI,RBX XOR ECX,ECX XOR EAX,EAX CALL 0x001d6a88 MOV R15,RAX MOV EDI,R14D LEA R14,[RBP + -0x2b] MOV RSI,R14 MOV EDX,0xa CALL 0x001d505a SUB EAX,R14D SUB R15,RAX INC R15 MOV RDI,R15 MOV RSI,R14 CALL 0x00129350 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00143df7 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_00143df7: CALL 0x00129260
int8 translog_filename_by_fileno(int4 param_1,int8 param_2) { int iVar1; long lVar2; long in_FS_OFFSET; char local_33 [11]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = strxmov(param_2,&DAT_004fd188,"aria_log.0000000",0); iVar1 = int10_to_str(param_1,local_33,10); strcpy((char *)((lVar2 - (ulong)(uint)(iVar1 - (int)local_33)) + 1),local_33); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return param_2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,421
lunasvg::calculateBaselineOffset(lunasvg::SVGTextPositioningElement const*)
dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp
static float calculateBaselineOffset(const SVGTextPositioningElement* element) { auto offset = element->baseline_offset(); auto parent = element->parentElement(); while(parent->isTextPositioningElement()) { offset += toSVGTextPositioningElement(parent)->baseline_offset(); parent = parent->parentElement(); } auto baseline = element->alignment_baseline(); if(baseline == AlignmentBaseline::Auto || baseline == AlignmentBaseline::Baseline) { baseline = resolveDominantBaseline(element); } const auto& font = element->font(); switch(baseline) { case AlignmentBaseline::BeforeEdge: case AlignmentBaseline::TextBeforeEdge: offset -= font.ascent(); break; case AlignmentBaseline::Middle: offset -= font.xHeight() / 2.f; break; case AlignmentBaseline::Central: offset -= (font.ascent() + font.descent()) / 2.f; break; case AlignmentBaseline::AfterEdge: case AlignmentBaseline::TextAfterEdge: case AlignmentBaseline::Ideographic: offset -= font.descent(); break; case AlignmentBaseline::Hanging: offset -= font.ascent() * 8.f / 10.f; break; case AlignmentBaseline::Mathematical: offset -= font.ascent() / 2.f; break; default: break; } return offset; }
O0
cpp
lunasvg::calculateBaselineOffset(lunasvg::SVGTextPositioningElement const*): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x508b0 movss %xmm0, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0xe710 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi movq (%rdi), %rax callq *0x38(%rax) testb $0x1, %al jne 0x4db47 jmp 0x4db71 movq -0x18(%rbp), %rdi callq 0x4f690 movq %rax, %rdi callq 0x508b0 addss -0xc(%rbp), %xmm0 movss %xmm0, -0xc(%rbp) movq -0x18(%rbp), %rdi callq 0xe710 movq %rax, -0x18(%rbp) jmp 0x4db37 movq -0x8(%rbp), %rdi callq 0x508d0 movb %al, -0x19(%rbp) cmpb $0x0, -0x19(%rbp) je 0x4db89 cmpb $0x1, -0x19(%rbp) jne 0x4db95 movq -0x8(%rbp), %rdi callq 0x4f2b0 movb %al, -0x19(%rbp) movq -0x8(%rbp), %rdi callq 0x50580 movq %rax, -0x28(%rbp) movb -0x19(%rbp), %al addb $-0x2, %al movzbl %al, %ecx movq %rcx, -0x30(%rbp) subb $0x9, %al ja 0x4dcc8 movq -0x30(%rbp), %rax leaq 0x3f92f(%rip), %rcx # 0x8d4f0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x28(%rbp), %rdi callq 0x131c0 movaps %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca movq -0x28(%rbp), %rdi callq 0x13320 movaps %xmm0, %xmm1 movss 0x3ec4f(%rip), %xmm0 # 0x8c84c divss %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca movq -0x28(%rbp), %rdi callq 0x131c0 movss %xmm0, -0x34(%rbp) movq -0x28(%rbp), %rdi callq 0x13230 movss -0x34(%rbp), %xmm1 addss %xmm0, %xmm1 movss 0x3ec10(%rip), %xmm0 # 0x8c84c divss %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca movq -0x28(%rbp), %rdi callq 0x13230 movaps %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca movq -0x28(%rbp), %rdi callq 0x131c0 movaps %xmm0, %xmm1 movss 0x3f86c(%rip), %xmm0 # 0x8d4ec mulss %xmm0, %xmm1 movss 0x3ecc8(%rip), %xmm0 # 0x8c954 divss %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca movq -0x28(%rbp), %rdi callq 0x131c0 movaps %xmm0, %xmm1 movss 0x3eb98(%rip), %xmm0 # 0x8c84c divss %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) jmp 0x4dcca jmp 0x4dcca movss -0xc(%rbp), %xmm0 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvgL23calculateBaselineOffsetEPKNS_25SVGTextPositioningElementE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this call _ZNK7lunasvg25SVGTextPositioningElement15baseline_offsetEv; lunasvg::SVGTextPositioningElement::baseline_offset(void) movss [rbp+var_C], xmm0 mov rdi, [rbp+var_8]; this call _ZNK7lunasvg7SVGNode13parentElementEv; lunasvg::SVGNode::parentElement(void) mov [rbp+var_18], rax loc_4DB37: mov rdi, [rbp+var_18] mov rax, [rdi] call qword ptr [rax+38h] test al, 1 jnz short loc_4DB47 jmp short loc_4DB71 loc_4DB47: mov rdi, [rbp+var_18]; this call _ZN7lunasvg27toSVGTextPositioningElementEPKNS_7SVGNodeE; lunasvg::toSVGTextPositioningElement(lunasvg::SVGNode const*) mov rdi, rax; this call _ZNK7lunasvg25SVGTextPositioningElement15baseline_offsetEv; lunasvg::SVGTextPositioningElement::baseline_offset(void) addss xmm0, [rbp+var_C] movss [rbp+var_C], xmm0 mov rdi, [rbp+var_18]; this call _ZNK7lunasvg7SVGNode13parentElementEv; lunasvg::SVGNode::parentElement(void) mov [rbp+var_18], rax jmp short loc_4DB37 loc_4DB71: mov rdi, [rbp+var_8]; this call _ZNK7lunasvg25SVGTextPositioningElement18alignment_baselineEv; lunasvg::SVGTextPositioningElement::alignment_baseline(void) mov [rbp+var_19], al cmp [rbp+var_19], 0 jz short loc_4DB89 cmp [rbp+var_19], 1 jnz short loc_4DB95 loc_4DB89: mov rdi, [rbp+var_8]; this call _ZN7lunasvgL23resolveDominantBaselineEPKNS_25SVGTextPositioningElementE; lunasvg::resolveDominantBaseline(lunasvg::SVGTextPositioningElement const*) mov [rbp+var_19], al loc_4DB95: mov rdi, [rbp+var_8]; this call _ZNK7lunasvg25SVGTextPositioningElement4fontEv; lunasvg::SVGTextPositioningElement::font(void) mov [rbp+var_28], rax mov al, [rbp+var_19] add al, 0FEh; switch 10 cases movzx ecx, al mov [rbp+var_30], rcx sub al, 9 ja def_4DBC8; jumptable 000000000004DBC8 default case, case -247 mov rax, [rbp+var_30] lea rcx, jpt_4DBC8 movsxd rax, ds:(jpt_4DBC8 - 8D4F0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4DBCA: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 cases -254,-253 call _ZNK7lunasvg4Font6ascentEv; lunasvg::Font::ascent(void) movaps xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp loc_4DCCA loc_4DBE9: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 case -252 call _ZNK7lunasvg4Font7xHeightEv; lunasvg::Font::xHeight(void) movaps xmm1, xmm0 movss xmm0, cs:dword_8C84C divss xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp loc_4DCCA loc_4DC14: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 case -251 call _ZNK7lunasvg4Font6ascentEv; lunasvg::Font::ascent(void) movss [rbp+var_34], xmm0 mov rdi, [rbp+var_28]; this call _ZNK7lunasvg4Font7descentEv; lunasvg::Font::descent(void) movss xmm1, [rbp+var_34] addss xmm1, xmm0 movss xmm0, cs:dword_8C84C divss xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp short loc_4DCCA loc_4DC50: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 cases -250--248 call _ZNK7lunasvg4Font7descentEv; lunasvg::Font::descent(void) movaps xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp short loc_4DCCA loc_4DC6C: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 case -246 call _ZNK7lunasvg4Font6ascentEv; lunasvg::Font::ascent(void) movaps xmm1, xmm0 movss xmm0, cs:dword_8D4EC mulss xmm1, xmm0 movss xmm0, cs:dword_8C954 divss xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp short loc_4DCCA loc_4DCA0: mov rdi, [rbp+var_28]; jumptable 000000000004DBC8 case -245 call _ZNK7lunasvg4Font6ascentEv; lunasvg::Font::ascent(void) movaps xmm1, xmm0 movss xmm0, cs:dword_8C84C divss xmm1, xmm0 movss xmm0, [rbp+var_C] subss xmm0, xmm1 movss [rbp+var_C], xmm0 jmp short loc_4DCCA def_4DBC8: jmp short $+2; jumptable 000000000004DBC8 default case, case -247 loc_4DCCA: movss xmm0, [rbp+var_C] add rsp, 40h pop rbp retn
float lunasvg::calculateBaselineOffset( lunasvg *this, const lunasvg::SVGTextPositioningElement *a2, float a3) { char i; // al lunasvg::SVGTextPositioningElement *v4; // rax float v6; // [rsp+Ch] [rbp-34h] lunasvg::Font *v7; // [rsp+18h] [rbp-28h] unsigned __int8 v8; // [rsp+27h] [rbp-19h] lunasvg::SVGNode *v9; // [rsp+28h] [rbp-18h] float v10; // [rsp+34h] [rbp-Ch] lunasvg::SVGTextPositioningElement::baseline_offset(this); v10 = a3; v9 = (lunasvg::SVGNode *)lunasvg::SVGNode::parentElement(this); for ( i = (*(long long ( **)(lunasvg::SVGNode *, const lunasvg::SVGTextPositioningElement *))(*(_QWORD *)v9 + 56LL))( v9, a2); (i & 1) != 0; i = (*(long long ( **)(lunasvg::SVGNode *, const lunasvg::SVGTextPositioningElement *))(*(_QWORD *)v9 + 56LL))( v9, a2) ) { v4 = (lunasvg::SVGTextPositioningElement *)lunasvg::toSVGTextPositioningElement(v9, a2); lunasvg::SVGTextPositioningElement::baseline_offset(v4); a3 = a3 + v10; v10 = a3; v9 = (lunasvg::SVGNode *)lunasvg::SVGNode::parentElement(v9); } v8 = lunasvg::SVGTextPositioningElement::alignment_baseline(this); if ( v8 <= 1u ) v8 = lunasvg::resolveDominantBaseline(this, a2); v7 = (lunasvg::Font *)lunasvg::SVGTextPositioningElement::font(this); switch ( v8 ) { case 2u: case 3u: v10 = v10 - lunasvg::Font::ascent(v7); break; case 4u: v10 = v10 - (float)(lunasvg::Font::xHeight(v7) / 2.0); break; case 5u: v6 = lunasvg::Font::ascent(v7); v10 = v10 - (float)((float)(v6 + lunasvg::Font::descent(v7)) / 2.0); break; case 6u: case 7u: case 8u: v10 = v10 - lunasvg::Font::descent(v7); break; case 0xAu: v10 = v10 - (float)((float)(lunasvg::Font::ascent(v7) * 8.0) / 10.0); break; case 0xBu: v10 = v10 - (float)(lunasvg::Font::ascent(v7) / 2.0); break; default: return v10; } return v10; }
calculateBaselineOffset: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x001508b0 MOVSS dword ptr [RBP + -0xc],XMM0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010e710 MOV qword ptr [RBP + -0x18],RAX LAB_0014db37: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x38] TEST AL,0x1 JNZ 0x0014db47 JMP 0x0014db71 LAB_0014db47: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014f690 MOV RDI,RAX CALL 0x001508b0 ADDSS XMM0,dword ptr [RBP + -0xc] MOVSS dword ptr [RBP + -0xc],XMM0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010e710 MOV qword ptr [RBP + -0x18],RAX JMP 0x0014db37 LAB_0014db71: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001508d0 MOV byte ptr [RBP + -0x19],AL CMP byte ptr [RBP + -0x19],0x0 JZ 0x0014db89 CMP byte ptr [RBP + -0x19],0x1 JNZ 0x0014db95 LAB_0014db89: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014f2b0 MOV byte ptr [RBP + -0x19],AL LAB_0014db95: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00150580 MOV qword ptr [RBP + -0x28],RAX MOV AL,byte ptr [RBP + -0x19] ADD AL,0xfe MOVZX ECX,AL MOV qword ptr [RBP + -0x30],RCX SUB AL,0x9 JA 0x0014dcc8 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x18d4f0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001131c0 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_4: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00113320 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0018c84c] DIVSS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_5: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001131c0 MOVSS dword ptr [RBP + -0x34],XMM0 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00113230 MOVSS XMM1,dword ptr [RBP + -0x34] ADDSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0018c84c] DIVSS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_6: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00113230 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_a: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001131c0 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0018d4ec] MULSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0018c954] DIVSS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_b: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001131c0 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0018c84c] DIVSS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] SUBSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 JMP 0x0014dcca caseD_9: JMP 0x0014dcca LAB_0014dcca: MOVSS XMM0,dword ptr [RBP + -0xc] ADD RSP,0x40 POP RBP RET
/* lunasvg::calculateBaselineOffset(lunasvg::SVGTextPositioningElement const*) */ float lunasvg::calculateBaselineOffset(SVGTextPositioningElement *param_1) { ulong uVar1; SVGTextPositioningElement *this; Font *this_00; float fVar2; float fVar3; char local_21; SVGNode *local_20; float local_14; local_14 = (float)SVGTextPositioningElement::baseline_offset(param_1); local_20 = (SVGNode *)SVGNode::parentElement((SVGNode *)param_1); while (uVar1 = (**(code **)(*(long *)local_20 + 0x38))(), (uVar1 & 1) != 0) { this = (SVGTextPositioningElement *)toSVGTextPositioningElement(local_20); fVar2 = (float)SVGTextPositioningElement::baseline_offset(this); local_14 = fVar2 + local_14; local_20 = (SVGNode *)SVGNode::parentElement(local_20); } local_21 = SVGTextPositioningElement::alignment_baseline(param_1); if ((local_21 == '\0') || (local_21 == '\x01')) { local_21 = resolveDominantBaseline(param_1); } this_00 = (Font *)SVGTextPositioningElement::font(param_1); switch(local_21) { case '\x02': case '\x03': fVar2 = (float)Font::ascent(this_00); local_14 = local_14 - fVar2; break; case '\x04': fVar2 = (float)Font::xHeight(this_00); local_14 = local_14 - fVar2 / DAT_0018c84c; break; case '\x05': fVar2 = (float)Font::ascent(this_00); fVar3 = (float)Font::descent(this_00); local_14 = local_14 - (fVar2 + fVar3) / DAT_0018c84c; break; case '\x06': case '\a': case '\b': fVar2 = (float)Font::descent(this_00); local_14 = local_14 - fVar2; break; default: break; case '\n': fVar2 = (float)Font::ascent(this_00); local_14 = local_14 - (fVar2 * DAT_0018d4ec) / DAT_0018c954; break; case '\v': fVar2 = (float)Font::ascent(this_00); local_14 = local_14 - fVar2 / DAT_0018c84c; } return local_14; }
50,422
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string string_join(const std::vector<std::string> & values, const std::string & separator) { std::ostringstream result; for (size_t i = 0; i < values.size(); ++i) { if (i > 0) { result << separator; } result << values[i]; } return result.str(); }
O0
cpp
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x1c8, %rsp # imm = 0x1C8 movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x1c0(%rsp) movq %rsi, 0x1b8(%rsp) movq %rdx, 0x1b0(%rsp) leaq 0x38(%rsp), %rdi callq 0x5b150 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x1b8(%rsp), %rdi callq 0x91b00 movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax jae 0xefde1 cmpq $0x0, 0x30(%rsp) jbe 0xefdab movq 0x1b0(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0x5a540 jmp 0xefd8f jmp 0xefdab movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x5b070 jmp 0xefe09 movq 0x1b8(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0xfac80 movq %rax, %rsi leaq 0x38(%rsp), %rdi callq 0x5a540 jmp 0xefdcc jmp 0xefdce movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) jmp 0xefd4f movq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x5b520 jmp 0xefdf2 leaq 0x38(%rsp), %rdi callq 0x5b070 movq 0x18(%rsp), %rax addq $0x1c8, %rsp # imm = 0x1C8 retq movq 0x28(%rsp), %rdi callq 0x5ac00 nopw %cs:(%rax,%rax)
_Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: sub rsp, 1C8h mov [rsp+1C8h+var_1B8], rdi mov rax, rdi mov [rsp+1C8h+var_1B0], rax mov [rsp+1C8h+var_8], rdi mov [rsp+1C8h+var_10], rsi mov [rsp+1C8h+var_18], rdx lea rdi, [rsp+1C8h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov [rsp+1C8h+var_198], 0 loc_EFD4F: mov rax, [rsp+1C8h+var_198] mov [rsp+1C8h+var_1C0], rax mov rdi, [rsp+1C8h+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+1C8h+var_1C0] cmp rax, rcx jnb short loc_EFDE1 cmp [rsp+1C8h+var_198], 0 jbe short loc_EFDAB mov rsi, [rsp+1C8h+var_18] lea rdi, [rsp+1C8h+var_190] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_EFD8F: jmp short loc_EFDAB mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_30] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() jmp short loc_EFE09 loc_EFDAB: mov rdi, [rsp+1C8h+var_10] mov rsi, [rsp+1C8h+var_198] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+1C8h+var_190] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_EFDCC: jmp short $+2 loc_EFDCE: mov rax, [rsp+1C8h+var_198] add rax, 1 mov [rsp+1C8h+var_198], rax jmp loc_EFD4F loc_EFDE1: mov rdi, [rsp+1C8h+var_1B8] lea rsi, [rsp+1C8h+var_190] call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void) jmp short $+2 loc_EFDF2: lea rdi, [rsp+1C8h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, [rsp+1C8h+var_1B0] add rsp, 1C8h retn loc_EFE09: mov rdi, [rsp+arg_20] call __Unwind_Resume
long long string_join(long long a1, _QWORD *a2, long long a3) { long long v3; // rax unsigned long long i; // [rsp+30h] [rbp-198h] _BYTE v6[376]; // [rsp+38h] [rbp-190h] BYREF long long v7; // [rsp+1B0h] [rbp-18h] _QWORD *v8; // [rsp+1B8h] [rbp-10h] long long v9; // [rsp+1C0h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; std::ostringstream::basic_ostringstream(v6); for ( i = 0LL; i < std::vector<std::string>::size(v8); ++i ) { if ( i ) std::operator<<<char>(v6, v7); v3 = std::vector<std::string>::operator[](v8, i); std::operator<<<char>(v6, v3); } std::ostringstream::str(a1, v6); std::ostringstream::~ostringstream(v6); return a1; }
string_join: SUB RSP,0x1c8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x1c0],RDI MOV qword ptr [RSP + 0x1b8],RSI MOV qword ptr [RSP + 0x1b0],RDX LEA RDI,[RSP + 0x38] CALL 0x0015b150 MOV qword ptr [RSP + 0x30],0x0 LAB_001efd4f: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x1b8] CALL 0x00191b00 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,RCX JNC 0x001efde1 CMP qword ptr [RSP + 0x30],0x0 JBE 0x001efdab MOV RSI,qword ptr [RSP + 0x1b0] LAB_001efd83: LEA RDI,[RSP + 0x38] CALL 0x0015a540 JMP 0x001efd8f LAB_001efd8f: JMP 0x001efdab LAB_001efdab: MOV RDI,qword ptr [RSP + 0x1b8] MOV RSI,qword ptr [RSP + 0x30] CALL 0x001fac80 MOV RSI,RAX LEA RDI,[RSP + 0x38] CALL 0x0015a540 JMP 0x001efdcc LAB_001efdcc: JMP 0x001efdce LAB_001efdce: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX JMP 0x001efd4f LAB_001efde1: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x38] CALL 0x0015b520 LAB_001efdf0: JMP 0x001efdf2 LAB_001efdf2: LEA RDI,[RSP + 0x38] CALL 0x0015b070 MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x1c8 RET
/* string_join(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::__cxx11::string const&) */ vector * string_join(vector *param_1,string *param_2) { ulong uVar1; string *psVar2; string *in_RDX; ulong local_198; ostringstream local_190 [376]; string *local_18; string *local_10; vector *local_8; local_18 = in_RDX; local_10 = param_2; local_8 = param_1; std::__cxx11::ostringstream::ostringstream(local_190); local_198 = 0; while( true ) { uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_10 ); if (uVar1 <= local_198) break; if (local_198 != 0) { /* try { // try from 001efd83 to 001efdef has its CatchHandler @ 001efd91 */ std::operator<<((ostream *)local_190,local_18); } psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_10,local_198); std::operator<<((ostream *)local_190,psVar2); local_198 = local_198 + 1; } std::__cxx11::ostringstream::str(); std::__cxx11::ostringstream::~ostringstream(local_190); return param_1; }
50,423
mysql_session_track_get_next
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_session_track_get_next(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length) { MYSQL_LEX_STRING *str; if (!mysql->extension->session_state[type].current) return 1; str= (MYSQL_LEX_STRING *)mysql->extension->session_state[type].current->data; mysql->extension->session_state[type].current= mysql->extension->session_state[type].current->next; *data= str->str ? str->str : NULL; *length= str->str ? str->length : 0; return 0; }
O0
c
mysql_session_track_get_next: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0x5132f movl $0x1, -0x4(%rbp) jmp 0x513ee movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0x14(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x513a9 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x513b1 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x513b1 movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x513d4 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x513dc xorl %eax, %eax movq %rax, -0x40(%rbp) jmp 0x513dc movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
mysql_session_track_get_next: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_5132F mov [rbp+var_4], 1 jmp loc_513EE loc_5132F: mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov rax, [rax+10h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax+4F0h] add rax, 8 mov edx, [rbp+var_14] shl rdx, 4 add rax, rdx mov [rax+8], rcx mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_513A9 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_513B1 loc_513A9: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_513B1: mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_513D4 mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_40], rax jmp short loc_513DC loc_513D4: xor eax, eax mov [rbp+var_40], rax jmp short $+2 loc_513DC: mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx mov [rbp+var_4], 0 loc_513EE: mov eax, [rbp+var_4] pop rbp retn
long long mysql_session_track_get_next(long long a1, unsigned int a2, _QWORD *a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-40h] long long v6; // [rsp+8h] [rbp-38h] long long *v7; // [rsp+10h] [rbp-30h] if ( *(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) ) { v7 = *(long long **)(*(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) + 16LL); *(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) = *(_QWORD *)(*(_QWORD *)(16LL * a2 + *(_QWORD *)(a1 + 1264) + 8LL + 8) + 8LL); if ( *v7 ) v6 = *v7; else v6 = 0LL; *a3 = v6; if ( *v7 ) v5 = v7[1]; else v5 = 0LL; *a4 = v5; return 0; } else { return 1; } }
mysql_session_track_get_next: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0015132f MOV dword ptr [RBP + -0x4],0x1 JMP 0x001513ee LAB_0015132f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV EDX,dword ptr [RBP + -0x14] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x001513a9 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x001513b1 LAB_001513a9: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x001513b1 LAB_001513b1: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x001513d4 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x001513dc LAB_001513d4: XOR EAX,EAX MOV qword ptr [RBP + -0x40],RAX JMP 0x001513dc LAB_001513dc: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_001513ee: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_session_track_get_next(long param_1,uint param_2,long *param_3,long *param_4) { long *plVar1; long local_48; long local_40; int4 local_c; if (*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) == 0) { local_c = 1; } else { plVar1 = *(long **)(*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) + 0x10) ; *(int8 *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) = *(int8 *)(*(long *)(*(long *)(param_1 + 0x4f0) + (ulong)param_2 * 0x10 + 0x10) + 8); if (*plVar1 == 0) { local_40 = 0; } else { local_40 = *plVar1; } *param_3 = local_40; if (*plVar1 == 0) { local_48 = 0; } else { local_48 = plVar1[1]; } *param_4 = local_48; local_c = 0; } return local_c; }
50,424
ma_delete_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_delete_static_record(MARIA_HA *info, const uchar *record __attribute__ ((unused))) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _ma_dpointer(info->s, temp+1, info->s->state.dellink); info->s->state.dellink= info->cur_row.lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info, temp, 1+info->s->rec_reflength, info->cur_row.lastpos, MYF(MY_NABP)) != 0); }
O0
c
ma_delete_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx incq %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0x20(%rax), %rax movq 0x3a0(%rcx), %rdx movq 0x10(%rax), %rcx addq %rdx, %rcx movq %rcx, 0x10(%rax) movb $0x0, -0x11(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rdi leaq -0x10(%rbp), %rsi movq 0xc8(%rdi), %rdx callq 0x6b480 movq -0x20(%rbp), %rcx movq (%rcx), %rax movq 0x98(%rcx), %rcx movq %rcx, 0xc8(%rax) movq -0x20(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x20(%rbp), %rdi movq (%rdi), %rdx movq 0x98(%rdi), %rcx movq 0x6e8(%rdx), %rax movl 0x740(%rdx), %edx incl %edx leaq -0x11(%rbp), %rsi movl $0x4, %r8d callq *%rax testq %rax, %rax setne %al movb %al, -0x29(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x736e8 movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
_ma_delete_static_record: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rax, [rbp+var_20] mov rax, [rax+20h] mov rcx, [rax+8] inc rcx mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rax+20h] mov rdx, [rcx+3A0h] mov rcx, [rax+10h] add rcx, rdx mov [rax+10h], rcx mov [rbp+var_11], 0 mov rax, [rbp+var_20] mov rdi, [rax] lea rsi, [rbp+var_10] mov rdx, [rdi+0C8h] call _ma_dpointer mov rcx, [rbp+var_20] mov rax, [rcx] mov rcx, [rcx+98h] mov [rax+0C8h], rcx mov rax, [rbp+var_20] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_20] mov rdx, [rdi] mov rcx, [rdi+98h] mov rax, [rdx+6E8h] mov edx, [rdx+740h] inc edx lea rsi, [rbp+var_11] mov r8d, 4 call rax test rax, rax setnz al mov [rbp+var_29], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_736E8 mov al, [rbp+var_29] add rsp, 30h pop rbp retn loc_736E8: call ___stack_chk_fail
bool ma_delete_static_record(long long *a1) { char v2; // [rsp+1Fh] [rbp-11h] BYREF char v3[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v4; // [rsp+28h] [rbp-8h] v4 = __readfsqword(0x28u); ++*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928); v2 = 0; ma_dpointer(*a1, v3, *(_QWORD *)(*a1 + 200)); *(_QWORD *)(*a1 + 200) = a1[19]; *((_DWORD *)a1 + 358) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))( a1, &v2, (unsigned int)(*(_DWORD *)(*a1 + 1856) + 1), a1[19], 4LL) != 0; }
_ma_delete_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] INC RCX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RCX + 0x3a0] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x11],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x10] MOV RDX,qword ptr [RDI + 0xc8] CALL 0x0016b480 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x98] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x98] MOV RAX,qword ptr [RDX + 0x6e8] MOV EDX,dword ptr [RDX + 0x740] INC EDX LEA RSI,[RBP + -0x11] MOV R8D,0x4 CALL RAX TEST RAX,RAX SETNZ AL MOV byte ptr [RBP + -0x29],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001736e8 MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET LAB_001736e8: CALL 0x0012a270
int8 _ma_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0); local_19 = 0; _ma_dpointer(*param_1,local_18,*(int8 *)(*param_1 + 200)); *(long *)(*param_1 + 200) = param_1[0x13]; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,&local_19,*(int *)(*param_1 + 0x740) + 1,param_1[0x13],4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,425
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 0x85563 movq %rdi, %rbx movl %esi, %eax leaq 0x3005b(%rip), %rcx # 0xb5498 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3107c(%rip), %rsi # 0xb64d0 leaq 0x31081(%rip), %rdx # 0xb64dc jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3108e(%rip), %rsi # 0xb64fc leaq 0x310a3(%rip), %rdx # 0xb6518 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x310d9(%rip), %rsi # 0xb6561 leaq 0x310de(%rip), %rdx # 0xb656d jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x31043(%rip), %rsi # 0xb64e5 leaq 0x31048(%rip), %rdx # 0xb64f1 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x31036(%rip), %rsi # 0xb64f2 leaq 0x31038(%rip), %rdx # 0xb64fb jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3105f(%rip), %rsi # 0xb6535 leaq 0x31068(%rip), %rdx # 0xb6545 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30ff0(%rip), %rsi # 0xb64dd leaq 0x30ff0(%rip), %rdx # 0xb64e4 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x31015(%rip), %rsi # 0xb6519 leaq 0x31019(%rip), %rdx # 0xb6524 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3100a(%rip), %rsi # 0xb6525 leaq 0x31012(%rip), %rdx # 0xb6534 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3103c(%rip), %rsi # 0xb656e leaq 0x31040(%rip), %rdx # 0xb6579 jmp 0x85550 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30ffd(%rip), %rsi # 0xb6546 leaq 0x31010(%rip), %rdx # 0xb6560 movq %rbx, %rdi callq 0x20d82 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x1a390 movq %rax, %rbx leaq 0x31003(%rip), %rsi # 0xb657a movq %rax, %rdi callq 0x1a290 movq 0x5da6a(%rip), %rsi # 0xe2ff0 movq 0x5d9e3(%rip), %rdx # 0xe2f70 movq %rbx, %rdi callq 0x1acd0 movq %rax, %r14 movq %rbx, %rdi callq 0x1a530 movq %r14, %rdi callq 0x1ad30
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx push rax cmp esi, 0Ah; switch 11 cases ja def_85444; jumptable 0000000000085444 default case mov rbx, rdi mov eax, esi lea rcx, jpt_85444 movsxd rax, ds:(jpt_85444 - 0B5498h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_85446: lea rax, [rbx+10h]; jumptable 0000000000085444 case 0 mov [rbx], rax lea rsi, aContentOnly; "Content-only" lea rdx, aContentOnly+0Ch; "" jmp loc_85550 loc_85460: lea rax, [rbx+10h]; jumptable 0000000000085444 case 4 mov [rbx], rax lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools" lea rdx, aLlama3XWithBui+1Ch; "" jmp loc_85550 loc_8547A: lea rax, [rbx+10h]; jumptable 0000000000085444 case 9 mov [rbx], rax lea rsi, aHermes2Pro; "Hermes 2 Pro" lea rdx, aHermes2Pro+0Ch; "" jmp loc_85550 loc_85494: lea rax, [rbx+10h]; jumptable 0000000000085444 case 2 mov [rbx], rax lea rsi, aMistralNemo; "Mistral Nemo" lea rdx, aMistralNemo+0Ch; "" jmp loc_85550 loc_854AE: lea rax, [rbx+10h]; jumptable 0000000000085444 case 3 mov [rbx], rax lea rsi, aLlama3X; "Llama 3.x" lea rdx, aLlama3X+9; "" jmp loc_85550 loc_854C8: lea rax, [rbx+10h]; jumptable 0000000000085444 case 7 mov [rbx], rax lea rsi, aFunctionaryV32; "Functionary v3.2" lea rdx, aFunctionaryV32+10h; "" jmp short loc_85550 loc_854DF: lea rax, [rbx+10h]; jumptable 0000000000085444 case 1 mov [rbx], rax lea rsi, aGeneric; "Generic" lea rdx, aGeneric+7; "" jmp short loc_85550 loc_854F6: lea rax, [rbx+10h]; jumptable 0000000000085444 case 5 mov [rbx], rax lea rsi, aDeepseekR1; "DeepSeek R1" lea rdx, aDeepseekR1+0Bh; "" jmp short loc_85550 loc_8550D: lea rax, [rbx+10h]; jumptable 0000000000085444 case 6 mov [rbx], rax lea rsi, aFirefunctionV2; "FireFunction v2" lea rdx, aFirefunctionV2+0Fh; "" jmp short loc_85550 loc_85524: lea rax, [rbx+10h]; jumptable 0000000000085444 case 10 mov [rbx], rax lea rsi, aCommandR7b; "Command R7B" lea rdx, aCommandR7b+0Bh; "" jmp short loc_85550 loc_8553B: lea rax, [rbx+10h]; jumptable 0000000000085444 case 8 mov [rbx], rax lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1" lea rdx, aFunctionaryV31+1Ah; "" loc_85550: 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_85444: mov edi, 10h; jumptable 0000000000085444 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 0x00185563 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1b5498] 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,[0x1b64d0] LEA RDX,[0x1b64dc] JMP 0x00185550 caseD_4: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b64fc] LEA RDX,[0x1b6518] JMP 0x00185550 caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b6561] LEA RDX,[0x1b656d] JMP 0x00185550 caseD_2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b64e5] LEA RDX,[0x1b64f1] JMP 0x00185550 caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b64f2] LEA RDX,[0x1b64fb] JMP 0x00185550 caseD_7: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b6535] LEA RDX,[0x1b6545] JMP 0x00185550 caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b64dd] LEA RDX,[0x1b64e4] JMP 0x00185550 caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b6519] LEA RDX,[0x1b6524] JMP 0x00185550 caseD_6: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b6525] LEA RDX,[0x1b6534] JMP 0x00185550 caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b656e] LEA RDX,[0x1b6579] JMP 0x00185550 caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b6546] LEA RDX,[0x1b6560] LAB_00185550: MOV RDI,RBX CALL 0x00120d82 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET default: MOV EDI,0x10 CALL 0x0011a390 MOV RBX,RAX LAB_00185570: LEA RSI,[0x1b657a] MOV RDI,RAX CALL 0x0011a290 LAB_0018557f: MOV RSI,qword ptr [0x001e2ff0] MOV RDX,qword ptr [0x001e2f70] MOV RDI,RBX CALL 0x0011acd0
/* 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 00185570 to 0018557e has its CatchHandler @ 00185595 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f70); } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
50,426
real_open_cached_file
eloqsql/mysys/mf_cache.c
my_bool real_open_cached_file(IO_CACHE *cache) { char name_buff[FN_REFLEN]; int error=1; DBUG_ENTER("real_open_cached_file"); if ((cache->file= create_temp_file(name_buff, cache->dir, cache->prefix[0] ? cache->prefix : 0, O_BINARY, MYF(MY_WME | MY_TEMPORARY))) >= 0) { error=0; } DBUG_RETURN(error); }
O3
c
real_open_cached_file: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq 0xc8(%rdi), %rsi leaq 0xd0(%rdi), %rax xorl %edx, %edx cmpb $0x0, 0xd0(%rdi) cmovneq %rax, %rdx leaq -0x210(%rbp), %rdi movl $0x50, %r8d xorl %ecx, %ecx callq 0x35dac movl %eax, 0xd4(%rbx) movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x347ef shrl $0x1f, %eax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %rbp retq callq 0x243e0
real_open_cached_file: push rbp mov rbp, rsp push rbx sub rsp, 208h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax mov rsi, [rdi+0C8h] lea rax, [rdi+0D0h] xor edx, edx cmp byte ptr [rdi+0D0h], 0 cmovnz rdx, rax lea rdi, [rbp+var_210] mov r8d, 50h ; 'P' xor ecx, ecx call create_temp_file mov [rbx+0D4h], eax mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_347EF shr eax, 1Fh add rsp, 208h pop rbx pop rbp retn loc_347EF: call ___stack_chk_fail
long long real_open_cached_file(long long a1) { long long v1; // rdx unsigned int temp_file; // eax _BYTE v4[512]; // [rsp+0h] [rbp-210h] BYREF unsigned long long v5; // [rsp+200h] [rbp-10h] v5 = __readfsqword(0x28u); v1 = 0LL; if ( *(_BYTE *)(a1 + 208) ) v1 = a1 + 208; temp_file = create_temp_file(v4, *(_QWORD *)(a1 + 200), v1, 0LL, 80LL); *(_DWORD *)(a1 + 212) = temp_file; return temp_file >> 31; }
real_open_cached_file: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x208 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RSI,qword ptr [RDI + 0xc8] LEA RAX,[RDI + 0xd0] XOR EDX,EDX CMP byte ptr [RDI + 0xd0],0x0 CMOVNZ RDX,RAX LEA RDI,[RBP + -0x210] MOV R8D,0x50 XOR ECX,ECX CALL 0x00135dac MOV dword ptr [RBX + 0xd4],EAX MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x001347ef SHR EAX,0x1f ADD RSP,0x208 POP RBX POP RBP RET LAB_001347ef: CALL 0x001243e0
uint real_open_cached_file(long param_1) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_218 [512]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = 0; if (*(char *)(param_1 + 0xd0) != '\0') { lVar2 = param_1 + 0xd0; } uVar1 = create_temp_file(local_218,*(int8 *)(param_1 + 200),lVar2,0,0x50); *(uint *)(param_1 + 0xd4) = uVar1; if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return uVar1 >> 0x1f; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,427
bool 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<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::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>>, nullptr>(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::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/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<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::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>>, nullptr>(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::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 %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x5e65d testq %rax, %rax je 0x5e6bb movzbl (%rax), %eax cmpl $0x2, %eax je 0x5e63d cmpl $0x1, %eax jne 0x5e647 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x5e64f movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x5e64f movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1a450 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x8e778(%rip), %rsi # 0xecdf2 leaq 0x8e7a1(%rip), %rdx # 0xece22 leaq 0x8(%rsp), %rdi callq 0x21cae movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x5e710 xorl %ebp, %ebp leaq 0xcb86c(%rip), %rsi # 0x129f18 leaq -0x3875(%rip), %rdx # 0x5ae3e movq %rbx, %rdi callq 0x1af40 leaq 0x8d70b(%rip), %rdi # 0xebdcd leaq 0x8d74e(%rip), %rdx # 0xebe17 leaq 0x929dd(%rip), %rcx # 0xf10ad movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x1aed0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x5e6f6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0x5e700 jmp 0x5e708 movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_5E65D test rax, rax jz loc_5E6BB movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_5E63D cmp eax, 1 jnz short loc_5E647 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_5E64F loc_5E63D: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_5E64F loc_5E647: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_5E64F: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_5E65D: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] 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 rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_5E6BB: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_5E6F6 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E6F6: test bpl, bpl jnz short loc_5E700 jmp short loc_5E708 mov r14, rax loc_5E700: mov rdi, rbx; void * call ___cxa_free_exception loc_5E708: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0015e65d TEST RAX,RAX JZ 0x0015e6bb MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0015e63d CMP EAX,0x1 JNZ 0x0015e647 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0015e64f LAB_0015e63d: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0015e64f LAB_0015e647: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0015e64f: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0015e65d: MOV EDI,0x20 CALL 0x0011a450 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0015e673: LEA RSI,[0x1ecdf2] LEA RDX,[0x1ece22] LEA RDI,[RSP + 0x8] CALL 0x00121cae MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0015e691: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0015e710 XOR EBP,EBP LEA RSI,[0x229f18] LEA RDX,[0x15ae3e] MOV RDI,RBX CALL 0x0011af40 LAB_0015e6bb: LEA RDI,[0x1ebdcd] LEA RDX,[0x1ebe17] LEA RCX,[0x1f10ad] MOV ESI,0x3422 XOR EAX,EAX CALL 0x0011aed0
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0015e673 to 0015e68a has its CatchHandler @ 0015e6fd */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0015e691 to 0015e6ba has its CatchHandler @ 0015e6dc */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
50,428
my_thread_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_init(void) { struct st_my_thread_var *tmp; my_bool error=0; if (!my_thread_global_init_done) return 1; /* cannot proceed with uninitialized library */ #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self()); #endif if (my_thread_var) { #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n", (long) pthread_self()); #endif goto end; } #ifdef _MSC_VER install_sigabrt_handler(); #endif if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp)))) { error= 1; goto end; } set_mysys_var(tmp); tmp->pthread_self= pthread_self(); my_thread_init_thr_mutex(tmp); tmp->stack_ends_here= (char*)&tmp + STACK_DIRECTION * (long)my_thread_stack_size; mysql_mutex_lock(&THR_LOCK_threads); tmp->id= tmp->dbug_id= ++thread_id; ++THR_thread_count; mysql_mutex_unlock(&THR_LOCK_threads); tmp->init= 1; #ifndef DBUG_OFF /* Generate unique name for thread */ (void) my_thread_name(); #endif end: return error; }
O0
c
my_thread_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb $0x0, -0x11(%rbp) cmpb $0x0, 0xb8d3dd(%rip) # 0xc835f0 jne 0xf621e movb $0x1, -0x1(%rbp) jmp 0xf6307 callq 0xf60c0 cmpq $0x0, %rax je 0xf622e jmp 0xf6301 movl $0x1, %edi movl $0xf0, %esi callq 0x2a6a0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax jne 0xf6250 movb $0x1, -0x11(%rbp) jmp 0xf6301 movq -0x10(%rbp), %rdi callq 0xf6570 callq 0x2a540 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc8(%rax) movq -0x10(%rbp), %rdi callq 0xf6110 leaq 0x1c95f4(%rip), %rax # 0x2bf870 movq (%rax), %rax shlq $0x0, %rax leaq -0x10(%rbp), %rcx addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xb8(%rax) leaq 0xb8d28c(%rip), %rdi # 0xc83528 leaq 0x5e367(%rip), %rsi # 0x15460a movl $0x12e, %edx # imm = 0x12E callq 0xf6420 movq 0xb8d344(%rip), %rcx # 0xc835f8 addq $0x1, %rcx movq %rcx, 0xb8d339(%rip) # 0xc835f8 movq -0x10(%rbp), %rax movq %rcx, 0xd8(%rax) movq -0x10(%rbp), %rax movq %rcx, 0xd0(%rax) leaq 0xb8d04c(%rip), %rax # 0xc83328 movl (%rax), %ecx addl $0x1, %ecx leaq 0xb8d040(%rip), %rax # 0xc83328 movl %ecx, (%rax) leaq 0xb8d237(%rip), %rdi # 0xc83528 callq 0xf6510 movq -0x10(%rbp), %rax movb $0x1, 0xe8(%rax) movb -0x11(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
my_thread_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_11], 0 cmp cs:my_thread_global_init_done, 0 jnz short loc_F621E mov [rbp+var_1], 1 jmp loc_F6307 loc_F621E: call _my_thread_var cmp rax, 0 jz short loc_F622E jmp loc_F6301 loc_F622E: mov edi, 1 mov esi, 0F0h call _calloc mov [rbp+var_10], rax cmp rax, 0 jnz short loc_F6250 mov [rbp+var_11], 1 jmp loc_F6301 loc_F6250: mov rdi, [rbp+var_10] call set_mysys_var call _pthread_self mov rcx, rax mov rax, [rbp+var_10] mov [rax+0C8h], rcx mov rdi, [rbp+var_10] call my_thread_init_thr_mutex lea rax, my_thread_stack_size mov rax, [rax] shl rax, 0 lea rcx, [rbp+var_10] add rcx, rax mov rax, [rbp+var_10] mov [rax+0B8h], rcx lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12Eh call inline_mysql_mutex_lock_26 mov rcx, cs:thread_id add rcx, 1 mov cs:thread_id, rcx mov rax, [rbp+var_10] mov [rax+0D8h], rcx mov rax, [rbp+var_10] mov [rax+0D0h], rcx lea rax, THR_thread_count mov ecx, [rax] add ecx, 1 lea rax, THR_thread_count mov [rax], ecx lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock_27 mov rax, [rbp+var_10] mov byte ptr [rax+0E8h], 1 loc_F6301: mov al, [rbp+var_11] mov [rbp+var_1], al loc_F6307: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_thread_init(long long a1, const char *a2) { long long v2; // rcx char v4; // [rsp+Fh] [rbp-11h] long long v5; // [rsp+10h] [rbp-10h] BYREF v4 = 0; if ( !my_thread_global_init_done ) return 1; if ( !my_thread_var(a1, a2) ) { v5 = calloc(1LL, 240LL); if ( v5 ) { set_mysys_var(v5); *(_QWORD *)(v5 + 200) = pthread_self(); my_thread_init_thr_mutex(v5); *(_QWORD *)(v5 + 184) = (char *)&v5 + my_thread_stack_size; inline_mysql_mutex_lock_26( &THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 302LL); v2 = thread_id + 1; thread_id = v2; *(_QWORD *)(v5 + 216) = v2; *(_QWORD *)(v5 + 208) = v2; ++THR_thread_count; inline_mysql_mutex_unlock_27(&THR_LOCK_threads); *(_BYTE *)(v5 + 232) = 1; } else { return 1; } } return v4; }
my_thread_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV byte ptr [RBP + -0x11],0x0 CMP byte ptr [0x00d835f0],0x0 JNZ 0x001f621e MOV byte ptr [RBP + -0x1],0x1 JMP 0x001f6307 LAB_001f621e: CALL 0x001f60c0 CMP RAX,0x0 JZ 0x001f622e JMP 0x001f6301 LAB_001f622e: MOV EDI,0x1 MOV ESI,0xf0 CALL 0x0012a6a0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JNZ 0x001f6250 MOV byte ptr [RBP + -0x11],0x1 JMP 0x001f6301 LAB_001f6250: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f6570 CALL 0x0012a540 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc8],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f6110 LEA RAX,[0x3bf870] MOV RAX,qword ptr [RAX] SHL RAX,0x0 LEA RCX,[RBP + -0x10] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xb8],RCX LEA RDI,[0xd83528] LEA RSI,[0x25460a] MOV EDX,0x12e CALL 0x001f6420 MOV RCX,qword ptr [0x00d835f8] ADD RCX,0x1 MOV qword ptr [0x00d835f8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xd8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xd0],RCX LEA RAX,[0xd83328] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0xd83328] MOV dword ptr [RAX],ECX LEA RDI,[0xd83528] CALL 0x001f6510 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xe8],0x1 LAB_001f6301: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x1],AL LAB_001f6307: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_thread_init(void) { long lVar1; pthread_t pVar2; int1 local_19; void *local_18; int1 local_9; local_19 = 0; if (my_thread_global_init_done == '\0') { local_9 = 1; } else { lVar1 = _my_thread_var(); if (lVar1 == 0) { local_18 = calloc(1,0xf0); if (local_18 == (void *)0x0) { local_19 = 1; } else { set_mysys_var(local_18); pVar2 = pthread_self(); *(pthread_t *)((long)local_18 + 200) = pVar2; my_thread_init_thr_mutex(local_18); *(long *)((long)local_18 + 0xb8) = (long)&local_18 + my_thread_stack_size; inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 0x12e); lVar1 = thread_id + 1; thread_id = lVar1; *(long *)((long)local_18 + 0xd8) = lVar1; *(long *)((long)local_18 + 0xd0) = lVar1; THR_thread_count = THR_thread_count + 1; inline_mysql_mutex_unlock(THR_LOCK_threads); *(int1 *)((long)local_18 + 0xe8) = 1; } } local_9 = local_19; } return local_9; }
50,429
ma_net_read
eloqsql/libmariadb/libmariadb/ma_net.c
ulong ma_net_read(NET *net) { size_t len,complen; #ifdef HAVE_COMPRESS if (!net->compress) { #endif len = ma_real_read (net,(size_t *)&complen); if (len == MAX_PACKET_LENGTH) { /* multi packet read */ size_t length= 0; ulong last_pos= net->where_b; do { length+= len; net->where_b+= (unsigned long)len; len= ma_real_read(net, &complen); } while (len == MAX_PACKET_LENGTH); net->where_b= last_pos; if (len != packet_error) len+= length; } net->read_pos = net->buff + net->where_b; if (len != packet_error) net->read_pos[len]=0; /* Safeguard for mysql_use_result */ return (ulong)len; #ifdef HAVE_COMPRESS } else { /* compressed protocol: -------------------------------------- packet_length 3 sequence_id 1 uncompressed_length 3 -------------------------------------- compressed data packet_length - 7 -------------------------------------- Another packet will follow if: packet_length == MAX_PACKET_LENGTH Last package will be identified by - packet_length is zero (special case) - packet_length < MAX_PACKET_LENGTH */ size_t packet_length, buffer_length; size_t current= 0, start= 0; my_bool is_multi_packet= 0; /* check if buffer is empty */ if (!net->remain_in_buf) { buffer_length= 0; } else { /* save position and restore \0 character */ buffer_length= net->buf_length; current= net->buf_length - net->remain_in_buf; start= current; net->buff[net->buf_length - net->remain_in_buf]=net->save_char; } for (;;) { if (buffer_length - current >= 4) { uchar *pos= net->buff + current; packet_length= uint3korr(pos); /* check if we have last package (special case: zero length) */ if (!packet_length) { current+= 4; /* length + sequence_id, no more data will follow */ break; } if (packet_length + 4 <= buffer_length - current) { if (!is_multi_packet) { current= current + packet_length + 4; } else { /* remove packet_header */ memmove(net->buff + current, net->buff + current + 4, buffer_length - current); buffer_length-= 4; current+= packet_length; } /* do we have last packet ? */ if (packet_length != MAX_PACKET_LENGTH) { is_multi_packet= 0; break; } else is_multi_packet= 1; if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen*/ buffer_length-= start; start= 0; } continue; } } if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen and current */ current -= start; buffer_length-= start; start= 0; } net->where_b=(unsigned long)buffer_length; if ((packet_length = ma_real_read(net,(size_t *)&complen)) == packet_error) return packet_error; if (_mariadb_uncompress(net, (unsigned char*) net->buff + net->where_b, &packet_length, &complen)) { net->error=2; /* caller will close socket */ net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_UNCOMPRESS, SQLSTATE_UNKNOWN, 0); return packet_error; } buffer_length+= complen; } /* set values */ net->buf_length= (unsigned long)buffer_length; net->remain_in_buf= (unsigned long)(buffer_length - current); net->read_pos= net->buff + start + 4; len= current - start - 4; if (is_multi_packet) len-= 4; net->save_char= net->read_pos[len]; /* Must be saved */ net->read_pos[len]=0; /* Safeguard for mysql_use_result */ } #endif return (ulong)len; }
O3
c
ma_net_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpb $0x0, 0x84(%rdi) je 0x38530 movq 0x30(%rbx), %rax testq %rax, %rax je 0x38590 movq 0x8(%rbx), %rcx movq 0x40(%rbx), %r15 movq %r15, %r14 subq %rax, %r14 movb 0x81(%rbx), %al movb %al, (%rcx,%r14) jmp 0x38596 leaq -0x38(%rbp), %rsi movq %rbx, %rdi callq 0x38742 movq 0x48(%rbx), %r15 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x38708 xorl %r12d, %r12d movl $0xffffff, %r13d # imm = 0xFFFFFF leaq -0x38(%rbp), %r14 addq %r13, %r12 addq %r13, 0x48(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x38742 cmpq %r13, %rax je 0x38559 movq %r15, 0x48(%rbx) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax jne 0x38705 addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) jmp 0x38723 xorl %r15d, %r15d xorl %r14d, %r14d movb $0x1, %cl leaq -0x38(%rbp), %r12 movq %r14, %rax movq %rcx, -0x40(%rbp) movq %rax, %r13 movq %r15, %rdx subq %r14, %rdx cmpq $0x4, %rdx jb 0x385da movq 0x8(%rbx), %rdi movzwl (%rdi,%r14), %ecx movzbl 0x2(%rdi,%r14), %eax shll $0x10, %eax orq %rcx, %rax movq %rax, -0x30(%rbp) je 0x386c8 leaq 0x4(%rax), %rcx cmpq %rdx, %rcx jbe 0x3863d testq %r13, %r13 je 0x385f5 movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13760 subq %r13, %r14 movq %r15, 0x48(%rbx) movq %rbx, %rdi movq %r12, %rsi callq 0x38742 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x386c0 movq 0x8(%rbx), %rsi addq 0x48(%rbx), %rsi movq %rbx, %rdi leaq -0x30(%rbp), %rdx movq %r12, %rcx callq 0x24f6d testb %al, %al jne 0x3869b addq -0x38(%rbp), %r15 xorl %r13d, %r13d jmp 0x385a6 testb $0x1, -0x40(%rbp) je 0x3864c addq %rax, %r14 addq $0x4, %r14 jmp 0x38663 addq %r14, %rdi leaq 0x4(%rdi), %rsi callq 0x13760 addq $-0x4, %r15 movq -0x30(%rbp), %rax addq %rax, %r14 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x38735 xorl %eax, %eax movl $0x0, %ecx testq %r13, %r13 je 0x3859f movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13760 xorl %eax, %eax xorl %ecx, %ecx jmp 0x3859f movb $0x2, 0x94(%rbx) movq (%rbx), %r8 movq 0x40(%r8), %rdi leaq 0x19b60(%rip), %rax # 0x52210 movq (%rax), %rdx movl $0x1397, %esi # imm = 0x1397 xorl %ecx, %ecx xorl %eax, %eax callq *0x50(%r8) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x38723 addq $0x4, %r14 movzbl -0x40(%rbp), %eax shll $0x2, %eax orq $-0x8, %rax movq %r15, 0x40(%rbx) subq %r14, %r15 movq %r15, 0x30(%rbx) leaq (%rdi,%r13), %rcx addq $0x4, %rcx movq %rcx, 0x20(%rbx) subq %r13, %r14 addq %rax, %r14 movb (%rcx,%r14), %al movb %al, 0x81(%rbx) movb $0x0, (%rcx,%r14) jmp 0x38723 addq %r12, %rax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) cmpq %r14, %rax je 0x38723 movb $0x0, (%r15,%rax) movq %rax, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rbx), %rdi movq $-0x4, %rax jmp 0x386d7
ma_net_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi cmp byte ptr [rdi+84h], 0 jz short loc_38530 mov rax, [rbx+30h] test rax, rax jz short loc_38590 mov rcx, [rbx+8] mov r15, [rbx+40h] mov r14, r15 sub r14, rax mov al, [rbx+81h] mov [rcx+r14], al jmp short loc_38596 loc_38530: lea rsi, [rbp+var_38] mov rdi, rbx call ma_real_read mov r15, [rbx+48h] cmp rax, 0FFFFFFh jnz loc_38708 xor r12d, r12d mov r13d, 0FFFFFFh lea r14, [rbp+var_38] loc_38559: add r12, r13 add [rbx+48h], r13 mov rdi, rbx mov rsi, r14 call ma_real_read cmp rax, r13 jz short loc_38559 mov [rbx+48h], r15 mov r14d, 0FFFFFFFFh cmp rax, r14 jnz loc_38705 add r15, [rbx+8] mov [rbx+20h], r15 jmp loc_38723 loc_38590: xor r15d, r15d xor r14d, r14d loc_38596: mov cl, 1 lea r12, [rbp+var_38] mov rax, r14 loc_3859F: mov [rbp+var_40], rcx mov r13, rax loc_385A6: mov rdx, r15 sub rdx, r14 cmp rdx, 4 jb short loc_385DA mov rdi, [rbx+8] movzx ecx, word ptr [rdi+r14] movzx eax, byte ptr [rdi+r14+2] shl eax, 10h or rax, rcx mov [rbp+var_30], rax jz loc_386C8 lea rcx, [rax+4] cmp rcx, rdx jbe short loc_3863D loc_385DA: test r13, r13 jz short loc_385F5 mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove sub r14, r13 loc_385F5: mov [rbx+48h], r15 mov rdi, rbx mov rsi, r12 call ma_real_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_386C0 mov rsi, [rbx+8] add rsi, [rbx+48h] mov rdi, rbx lea rdx, [rbp+var_30] mov rcx, r12 call _mariadb_uncompress test al, al jnz short loc_3869B add r15, [rbp+var_38] xor r13d, r13d jmp loc_385A6 loc_3863D: test byte ptr [rbp+var_40], 1 jz short loc_3864C add r14, rax add r14, 4 jmp short loc_38663 loc_3864C: add rdi, r14 lea rsi, [rdi+4] call _memmove add r15, 0FFFFFFFFFFFFFFFCh mov rax, [rbp+var_30] add r14, rax loc_38663: cmp rax, 0FFFFFFh jnz loc_38735 xor eax, eax mov ecx, 0 test r13, r13 jz loc_3859F mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove xor eax, eax xor ecx, ecx jmp loc_3859F loc_3869B: mov byte ptr [rbx+94h], 2 mov r8, [rbx] mov rdi, [r8+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 1397h xor ecx, ecx xor eax, eax call qword ptr [r8+50h] loc_386C0: mov r14d, 0FFFFFFFFh jmp short loc_38723 loc_386C8: add r14, 4 movzx eax, byte ptr [rbp+var_40] shl eax, 2 or rax, 0FFFFFFFFFFFFFFF8h loc_386D7: mov [rbx+40h], r15 sub r15, r14 mov [rbx+30h], r15 lea rcx, [rdi+r13] add rcx, 4 mov [rbx+20h], rcx sub r14, r13 add r14, rax mov al, [rcx+r14] mov [rbx+81h], al mov byte ptr [rcx+r14], 0 jmp short loc_38723 loc_38705: add rax, r12 loc_38708: mov r14d, 0FFFFFFFFh add r15, [rbx+8] mov [rbx+20h], r15 cmp rax, r14 jz short loc_38723 mov byte ptr [r15+rax], 0 mov r14, rax loc_38723: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_38735: mov rdi, [rbx+8] mov rax, 0FFFFFFFFFFFFFFFCh jmp short loc_386D7
long long ma_net_read(long long a1) { long long v2; // rax long long v3; // r15 long long v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // r12 long long v8; // rax long long v9; // r14 char v10; // cl long long v11; // rax long long i; // r13 unsigned long long v13; // rdx long long v14; // rdi unsigned long long v15; // rax unsigned long long v16; // rax long long v17; // rcx long long v18; // r15 char v20; // [rsp+0h] [rbp-40h] long long v21; // [rsp+8h] [rbp-38h] BYREF long long v22[6]; // [rsp+10h] [rbp-30h] BYREF if ( *(_BYTE *)(a1 + 132) ) { v2 = *(_QWORD *)(a1 + 48); if ( v2 ) { v3 = *(_QWORD *)(a1 + 64); v4 = v3 - v2; *(_BYTE *)(*(_QWORD *)(a1 + 8) + v3 - v2) = *(_BYTE *)(a1 + 129); } else { v3 = 0LL; v4 = 0LL; } v10 = 1; v11 = v4; while ( 1 ) { v20 = v10; for ( i = v11; ; i = 0LL ) { v13 = v3 - v4; if ( (unsigned long long)(v3 - v4) >= 4 ) { v14 = *(_QWORD *)(a1 + 8); v15 = *(unsigned __int16 *)(v14 + v4) | (unsigned long long)(*(unsigned __int8 *)(v14 + v4 + 2) << 16); v22[0] = v15; if ( !v15 ) { v4 += 4LL; v16 = (4 * v20) | 0xFFFFFFFFFFFFFFF8LL; goto LABEL_29; } if ( v15 + 4 <= v13 ) break; } if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v4 -= i; } *(_QWORD *)(a1 + 72) = v3; v22[0] = ma_real_read(a1, &v21); if ( v22[0] == 0xFFFFFFFFLL ) return 0xFFFFFFFFLL; if ( (unsigned __int8)mariadb_uncompress(a1, *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8), v22, &v21) ) { *(_BYTE *)(a1 + 148) = 2; (*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))( *(_QWORD *)(*(_QWORD *)a1 + 64LL), 5015LL, SQLSTATE_UNKNOWN, 0LL); return 0xFFFFFFFFLL; } v3 += v21; } if ( (v20 & 1) != 0 ) { v4 += v15 + 4; } else { memmove(v4 + v14, v4 + v14 + 4, v13); v3 -= 4LL; v15 = v22[0]; v4 += v22[0]; } if ( v15 != 0xFFFFFF ) break; v11 = 0LL; v10 = 0; if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v11 = 0LL; v10 = 0; } } v14 = *(_QWORD *)(a1 + 8); v16 = -4LL; LABEL_29: *(_QWORD *)(a1 + 64) = v3; *(_QWORD *)(a1 + 48) = v3 - v4; v17 = v14 + i + 4; *(_QWORD *)(a1 + 32) = v17; v9 = v16 + v4 - i; *(_BYTE *)(a1 + 129) = *(_BYTE *)(v17 + v9); *(_BYTE *)(v17 + v9) = 0; } else { v5 = ma_real_read(a1, &v21); v6 = *(_QWORD *)(a1 + 72); if ( v5 == 0xFFFFFF ) { v7 = 0LL; do { v7 += 0xFFFFFFLL; *(_QWORD *)(a1 + 72) += 0xFFFFFFLL; v8 = ma_real_read(a1, &v21); } while ( v8 == 0xFFFFFF ); *(_QWORD *)(a1 + 72) = v6; v9 = 0xFFFFFFFFLL; if ( v8 == 0xFFFFFFFFLL ) { *(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 8) + v6; return v9; } v5 = v7 + v8; } v9 = 0xFFFFFFFFLL; v18 = *(_QWORD *)(a1 + 8) + v6; *(_QWORD *)(a1 + 32) = v18; if ( v5 != 0xFFFFFFFFLL ) { *(_BYTE *)(v18 + v5) = 0; return v5; } } return v9; }
ma_net_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP byte ptr [RDI + 0x84],0x0 JZ 0x00138530 MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x00138590 MOV RCX,qword ptr [RBX + 0x8] MOV R15,qword ptr [RBX + 0x40] MOV R14,R15 SUB R14,RAX MOV AL,byte ptr [RBX + 0x81] MOV byte ptr [RCX + R14*0x1],AL JMP 0x00138596 LAB_00138530: LEA RSI,[RBP + -0x38] MOV RDI,RBX CALL 0x00138742 MOV R15,qword ptr [RBX + 0x48] CMP RAX,0xffffff JNZ 0x00138708 XOR R12D,R12D MOV R13D,0xffffff LEA R14,[RBP + -0x38] LAB_00138559: ADD R12,R13 ADD qword ptr [RBX + 0x48],R13 MOV RDI,RBX MOV RSI,R14 CALL 0x00138742 CMP RAX,R13 JZ 0x00138559 MOV qword ptr [RBX + 0x48],R15 MOV R14D,0xffffffff CMP RAX,R14 JNZ 0x00138705 ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 JMP 0x00138723 LAB_00138590: XOR R15D,R15D XOR R14D,R14D LAB_00138596: MOV CL,0x1 LEA R12,[RBP + -0x38] MOV RAX,R14 LAB_0013859f: MOV qword ptr [RBP + -0x40],RCX MOV R13,RAX LAB_001385a6: MOV RDX,R15 SUB RDX,R14 CMP RDX,0x4 JC 0x001385da MOV RDI,qword ptr [RBX + 0x8] MOVZX ECX,word ptr [RDI + R14*0x1] MOVZX EAX,byte ptr [RDI + R14*0x1 + 0x2] SHL EAX,0x10 OR RAX,RCX MOV qword ptr [RBP + -0x30],RAX JZ 0x001386c8 LEA RCX,[RAX + 0x4] CMP RCX,RDX JBE 0x0013863d LAB_001385da: TEST R13,R13 JZ 0x001385f5 MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113760 SUB R14,R13 LAB_001385f5: MOV qword ptr [RBX + 0x48],R15 MOV RDI,RBX MOV RSI,R12 CALL 0x00138742 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JZ 0x001386c0 MOV RSI,qword ptr [RBX + 0x8] ADD RSI,qword ptr [RBX + 0x48] MOV RDI,RBX LEA RDX,[RBP + -0x30] MOV RCX,R12 CALL 0x00124f6d TEST AL,AL JNZ 0x0013869b ADD R15,qword ptr [RBP + -0x38] XOR R13D,R13D JMP 0x001385a6 LAB_0013863d: TEST byte ptr [RBP + -0x40],0x1 JZ 0x0013864c ADD R14,RAX ADD R14,0x4 JMP 0x00138663 LAB_0013864c: ADD RDI,R14 LEA RSI,[RDI + 0x4] CALL 0x00113760 ADD R15,-0x4 MOV RAX,qword ptr [RBP + -0x30] ADD R14,RAX LAB_00138663: CMP RAX,0xffffff JNZ 0x00138735 XOR EAX,EAX MOV ECX,0x0 TEST R13,R13 JZ 0x0013859f MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113760 XOR EAX,EAX XOR ECX,ECX JMP 0x0013859f LAB_0013869b: MOV byte ptr [RBX + 0x94],0x2 MOV R8,qword ptr [RBX] MOV RDI,qword ptr [R8 + 0x40] LEA RAX,[0x152210] MOV RDX,qword ptr [RAX] MOV ESI,0x1397 XOR ECX,ECX XOR EAX,EAX CALL qword ptr [R8 + 0x50] LAB_001386c0: MOV R14D,0xffffffff JMP 0x00138723 LAB_001386c8: ADD R14,0x4 MOVZX EAX,byte ptr [RBP + -0x40] SHL EAX,0x2 OR RAX,-0x8 LAB_001386d7: MOV qword ptr [RBX + 0x40],R15 SUB R15,R14 MOV qword ptr [RBX + 0x30],R15 LEA RCX,[RDI + R13*0x1] ADD RCX,0x4 MOV qword ptr [RBX + 0x20],RCX SUB R14,R13 ADD R14,RAX MOV AL,byte ptr [RCX + R14*0x1] MOV byte ptr [RBX + 0x81],AL MOV byte ptr [RCX + R14*0x1],0x0 JMP 0x00138723 LAB_00138705: ADD RAX,R12 LAB_00138708: MOV R14D,0xffffffff ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 CMP RAX,R14 JZ 0x00138723 MOV byte ptr [R15 + RAX*0x1],0x0 MOV R14,RAX LAB_00138723: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00138735: MOV RDI,qword ptr [RBX + 0x8] MOV RAX,-0x4 JMP 0x001386d7
long ma_net_read(long *param_1) { char cVar1; ulong uVar2; long lVar3; long lVar4; size_t __n; long lVar5; long lVar6; size_t __n_00; long local_40; ulong local_38; if (*(char *)((long)param_1 + 0x84) == '\0') { lVar4 = ma_real_read(param_1,&local_40); lVar6 = param_1[9]; if (lVar4 == 0xffffff) { lVar3 = 0; do { lVar3 = lVar3 + 0xffffff; param_1[9] = param_1[9] + 0xffffff; lVar4 = ma_real_read(param_1,&local_40); } while (lVar4 == 0xffffff); param_1[9] = lVar6; if (lVar4 == 0xffffffff) { param_1[4] = lVar6 + param_1[1]; return 0xffffffff; } lVar4 = lVar4 + lVar3; } param_1[4] = lVar6 + param_1[1]; lVar3 = 0xffffffff; if (lVar4 != 0xffffffff) { *(int1 *)(lVar6 + param_1[1] + lVar4) = 0; lVar3 = lVar4; } return lVar3; } if (param_1[6] == 0) { __n_00 = 0; lVar6 = 0; } else { __n_00 = param_1[8]; lVar6 = __n_00 - param_1[6]; *(int1 *)(param_1[1] + lVar6) = *(int1 *)((long)param_1 + 0x81); } lVar3 = 1; lVar4 = lVar6; LAB_001385a6: do { lVar5 = lVar4; __n = __n_00 - lVar6; if (3 < __n) { lVar4 = param_1[1]; local_38 = (ulong)CONCAT12(*(int1 *)(lVar4 + 2 + lVar6),*(int2 *)(lVar4 + lVar6)); if (local_38 == 0) { lVar6 = lVar6 + 4; uVar2 = lVar3 << 2 | 0xfffffffffffffff8; LAB_001386d7: param_1[8] = __n_00; param_1[6] = __n_00 - lVar6; lVar4 = lVar4 + lVar5 + 4; param_1[4] = lVar4; lVar6 = (lVar6 - lVar5) + uVar2; *(int1 *)((long)param_1 + 0x81) = *(int1 *)(lVar4 + lVar6); *(int1 *)(lVar4 + lVar6) = 0; return lVar6; } if (local_38 + 4 <= __n) { if (lVar3 == 0) { memmove((void *)(lVar4 + lVar6),(void *)(lVar4 + lVar6 + 4),__n); __n_00 = __n_00 - 4; lVar6 = lVar6 + local_38; } else { lVar6 = lVar6 + local_38 + 4; } if (local_38 != 0xffffff) { lVar4 = param_1[1]; uVar2 = 0xfffffffffffffffc; goto LAB_001386d7; } lVar3 = 0; lVar4 = 0; if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar3 = 0; lVar4 = 0; } goto LAB_001385a6; } } if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar6 = lVar6 - lVar5; } param_1[9] = __n_00; local_38 = ma_real_read(param_1,&local_40); if (local_38 == 0xffffffff) { return 0xffffffff; } cVar1 = _mariadb_uncompress(param_1,param_1[1] + param_1[9],&local_38,&local_40); if (cVar1 != '\0') { *(int1 *)((long)param_1 + 0x94) = 2; (**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x1397,SQLSTATE_UNKNOWN,0); return 0xffffffff; } __n_00 = __n_00 + local_40; lVar4 = 0; } while( true ); }
50,430
my_uca_generate_pages
eloqsql/strings/ctype-uca.c
static my_bool my_uca_generate_pages(MY_CHARSET_LOADER *loader, MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src, uint npages) { uint page; for (page= 0; page < npages; page++) { if (dst->weights[page]) { /* A page with explicit weights with no special rules */ continue; } if (!dst->lengths[page]) { /* A page with implicit weights with no special rules. Keep dst->weights[page]==NULL and dst->lengths[page]==0. Weights for this page will be generated at run time algorithmically, using my_uca_scanner_next_implicit(). */ continue; } /* Found a page with some special rules. */ if (my_uca_generate_page(loader, dst, src, page)) return TRUE; } return FALSE; }
O0
c
my_uca_generate_pages: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0x50b78 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movl -0x28(%rbp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x50b3a jmp 0x50b6d movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movl -0x28(%rbp), %ecx cmpb $0x0, (%rax,%rcx) jne 0x50b4d jmp 0x50b6d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movl -0x28(%rbp), %ecx callq 0x50ee0 cmpb $0x0, %al je 0x50b6b movb $0x1, -0x1(%rbp) jmp 0x50b7c jmp 0x50b6d movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x50b1e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_generate_pages: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], 0 loc_50B1E: mov eax, [rbp+var_28] cmp eax, [rbp+var_24] jnb short loc_50B78 mov rax, [rbp+var_18] mov rax, [rax+10h] mov ecx, [rbp+var_28] cmp qword ptr [rax+rcx*8], 0 jz short loc_50B3A jmp short loc_50B6D loc_50B3A: mov rax, [rbp+var_18] mov rax, [rax+8] mov ecx, [rbp+var_28] cmp byte ptr [rax+rcx], 0 jnz short loc_50B4D jmp short loc_50B6D loc_50B4D: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov ecx, [rbp+var_28] call my_uca_generate_page cmp al, 0 jz short loc_50B6B mov [rbp+var_1], 1 jmp short loc_50B7C loc_50B6B: jmp short $+2 loc_50B6D: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_50B1E loc_50B78: mov [rbp+var_1], 0 loc_50B7C: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_generate_pages(long long a1, long long a2, long long a3, unsigned int a4) { unsigned int i; // [rsp+8h] [rbp-28h] for ( i = 0; i < a4; ++i ) { if ( !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i) && *(_BYTE *)(*(_QWORD *)(a2 + 8) + i) && (unsigned __int8)my_uca_generate_page(a1, a2, a3, i) ) { return 1; } } return 0; }
my_uca_generate_pages: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],0x0 LAB_00150b1e: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0x24] JNC 0x00150b78 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x28] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x00150b3a JMP 0x00150b6d LAB_00150b3a: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x28] CMP byte ptr [RAX + RCX*0x1],0x0 JNZ 0x00150b4d JMP 0x00150b6d LAB_00150b4d: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x28] CALL 0x00150ee0 CMP AL,0x0 JZ 0x00150b6b MOV byte ptr [RBP + -0x1],0x1 JMP 0x00150b7c LAB_00150b6b: JMP 0x00150b6d LAB_00150b6d: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x00150b1e LAB_00150b78: MOV byte ptr [RBP + -0x1],0x0 LAB_00150b7c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_generate_pages(int8 param_1,long param_2,int8 param_3,uint param_4) { char cVar1; uint local_30; local_30 = 0; while( true ) { if (param_4 <= local_30) { return 0; } if (((*(long *)(*(long *)(param_2 + 0x10) + (ulong)local_30 * 8) == 0) && (*(char *)(*(long *)(param_2 + 8) + (ulong)local_30) != '\0')) && (cVar1 = my_uca_generate_page(param_1,param_2,param_3,local_30), cVar1 != '\0')) break; local_30 = local_30 + 1; } return 1; }
50,431
my_uca_charcmp
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { uint num_level= cs->levels_for_order; int ret; uint i; for (i= 0; i != num_level; i++) { ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i); if (ret) { return ret; } } return 0; }
O3
c
my_uca_charcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movzbl 0xb2(%rdi), %eax testq %rax, %rax je 0x3f630 movq 0x60(%rdi), %r12 movl %esi, %edi movq %rsi, %r8 shrq $0x8, %r8 movl $0xffffff, %r9d # imm = 0xFFFFFF movq %r8, -0x78(%rbp) andq %r9, %r8 movl $0xff, %ecx movq %rsi, %r10 andq %rcx, %r10 movl %edx, %r11d movq %rdx, %rbx shrq $0x8, %rbx movq %rbx, -0x70(%rbp) andq %rbx, %r9 andq %rdx, %rcx movq %rcx, -0x80(%rbp) cmpq %rdx, %rsi movl $0x0, %esi setne %sil imulq $0x38, %rax, %rdx xorl %r13d, %r13d movq %rdi, -0x68(%rbp) movq %r9, -0x60(%rbp) movq %r8, -0x58(%rbp) movq %r10, -0x50(%rbp) movq %r11, -0x48(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movq (%r12,%r13), %rax cmpq %rdi, %rax jb 0x3f50f movq 0x10(%r12,%r13), %rcx movq (%rcx,%r8,8), %rcx testq %rcx, %rcx je 0x3f50f movq 0x8(%r12,%r13), %rdx movzbl (%rdx,%r8), %edx imull %r10d, %edx leaq (%rcx,%rdx,2), %r14 movq -0x38(%rbp), %rdx jmp 0x3f512 xorl %r14d, %r14d movl %esi, %ebx cmpq %r11, %rax jb 0x3f61f movq 0x10(%r12,%r13), %rax movq (%rax,%r9,8), %rax movl %esi, %ebx testq %rax, %rax je 0x3f61f movl %esi, %ebx testq %r14, %r14 je 0x3f61f movq 0x8(%r12,%r13), %rcx movzbl (%rcx,%r9), %edx imull -0x80(%rbp), %edx leaq (%rax,%rdx,2), %r15 movzwl (%r14), %eax movl $0x1, %ebx cmpw (%r15), %ax jne 0x3f632 movq -0x78(%rbp), %rax movzbl (%rcx,%rax), %esi movq -0x70(%rbp), %rax movzbl (%rcx,%rax), %eax cmpb %al, %sil jbe 0x3f5b6 movq %rax, -0x40(%rbp) leal (%rax,%rax), %edx movq %r14, %rdi movq %r15, %rsi callq 0x242d0 movl -0x2c(%rbp), %esi movq -0x48(%rbp), %r11 movq -0x50(%rbp), %r10 movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 movq -0x68(%rbp), %rdi testl %eax, %eax movq -0x38(%rbp), %rdx jne 0x3f632 movq -0x40(%rbp), %rax movzwl (%r14,%rax,2), %ebx jmp 0x3f61f leal (%rsi,%rsi), %edx cmpb %al, %sil jae 0x3f5f7 movq %rsi, -0x40(%rbp) movq %r14, %rdi movq %r15, %rsi callq 0x242d0 testl %eax, %eax movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx jne 0x3f632 movq -0x40(%rbp), %rax movzwl (%r15,%rax,2), %ebx jmp 0x3f61f movq %r14, %rdi movq %r15, %rsi callq 0x24110 movl %eax, %ebx movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx testl %ebx, %ebx jne 0x3f632 addq $0x38, %r13 cmpq %r13, %rdx jne 0x3f4e0 xorl %ebx, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_uca_charcmp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movzx eax, byte ptr [rdi+0B2h] test rax, rax jz loc_3F630 mov r12, [rdi+60h] mov edi, esi mov r8, rsi shr r8, 8 mov r9d, 0FFFFFFh mov [rbp+var_78], r8 and r8, r9 mov ecx, 0FFh mov r10, rsi and r10, rcx mov r11d, edx mov rbx, rdx shr rbx, 8 mov [rbp+var_70], rbx and r9, rbx and rcx, rdx mov [rbp+var_80], rcx cmp rsi, rdx mov esi, 0 setnz sil imul rdx, rax, 38h ; '8' xor r13d, r13d mov [rbp+var_68], rdi mov [rbp+var_60], r9 mov [rbp+var_58], r8 mov [rbp+var_50], r10 mov [rbp+var_48], r11 mov [rbp+var_2C], esi mov [rbp+var_38], rdx loc_3F4E0: mov rax, [r12+r13] cmp rax, rdi jb short loc_3F50F mov rcx, [r12+r13+10h] mov rcx, [rcx+r8*8] test rcx, rcx jz short loc_3F50F mov rdx, [r12+r13+8] movzx edx, byte ptr [rdx+r8] imul edx, r10d lea r14, [rcx+rdx*2] mov rdx, [rbp+var_38] jmp short loc_3F512 loc_3F50F: xor r14d, r14d loc_3F512: mov ebx, esi cmp rax, r11 jb loc_3F61F mov rax, [r12+r13+10h] mov rax, [rax+r9*8] mov ebx, esi test rax, rax jz loc_3F61F mov ebx, esi test r14, r14 jz loc_3F61F mov rcx, [r12+r13+8] movzx edx, byte ptr [rcx+r9] imul edx, dword ptr [rbp+var_80] lea r15, [rax+rdx*2] movzx eax, word ptr [r14] mov ebx, 1 cmp ax, [r15] jnz loc_3F632 mov rax, [rbp+var_78] movzx esi, byte ptr [rcx+rax] mov rax, [rbp+var_70] movzx eax, byte ptr [rcx+rax] cmp sil, al jbe short loc_3F5B6 mov [rbp+var_40], rax lea edx, [rax+rax] mov rdi, r14 mov rsi, r15 call _bcmp mov esi, [rbp+var_2C] mov r11, [rbp+var_48] mov r10, [rbp+var_50] mov r8, [rbp+var_58] mov r9, [rbp+var_60] mov rdi, [rbp+var_68] test eax, eax mov rdx, [rbp+var_38] jnz loc_3F632 mov rax, [rbp+var_40] movzx ebx, word ptr [r14+rax*2] jmp short loc_3F61F loc_3F5B6: lea edx, [rsi+rsi] cmp sil, al jnb short loc_3F5F7 mov [rbp+var_40], rsi mov rdi, r14 mov rsi, r15 call _bcmp test eax, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] jnz short loc_3F632 mov rax, [rbp+var_40] movzx ebx, word ptr [r15+rax*2] jmp short loc_3F61F loc_3F5F7: mov rdi, r14 mov rsi, r15 call _memcmp mov ebx, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] loc_3F61F: test ebx, ebx jnz short loc_3F632 add r13, 38h ; '8' cmp rdx, r13 jnz loc_3F4E0 loc_3F630: xor ebx, ebx loc_3F632: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_uca_charcmp(long long a1, unsigned long long a2, unsigned long long a3) { long long v3; // rax long long v4; // r12 unsigned long long v5; // rdi long long v6; // r8 int v7; // r10d unsigned long long v8; // r11 long long v9; // r9 BOOL v10; // esi long long v11; // rdx long long v12; // r13 unsigned long long v13; // rax long long v14; // rcx _WORD *v15; // r14 unsigned int v16; // ebx long long v17; // rax long long v18; // rcx _WORD *v19; // r15 int v20; // esi int v21; // eax int v22; // eax long long v23; // rdx int v24; // eax int v26; // [rsp+0h] [rbp-80h] unsigned long long v27; // [rsp+8h] [rbp-78h] unsigned long long v28; // [rsp+10h] [rbp-70h] unsigned long long v29; // [rsp+18h] [rbp-68h] long long v30; // [rsp+20h] [rbp-60h] long long v31; // [rsp+28h] [rbp-58h] int v32; // [rsp+30h] [rbp-50h] unsigned long long v33; // [rsp+38h] [rbp-48h] long long v34; // [rsp+40h] [rbp-40h] long long v35; // [rsp+40h] [rbp-40h] long long v36; // [rsp+48h] [rbp-38h] BOOL v37; // [rsp+54h] [rbp-2Ch] v3 = *(unsigned __int8 *)(a1 + 178); if ( *(_BYTE *)(a1 + 178) ) { v4 = *(_QWORD *)(a1 + 96); v5 = (unsigned int)a2; v27 = a2 >> 8; v6 = (unsigned int)a2 >> 8; v7 = (unsigned __int8)a2; v8 = (unsigned int)a3; v28 = a3 >> 8; v9 = (unsigned int)a3 >> 8; v26 = (unsigned __int8)a3; v10 = a2 != a3; v11 = 56 * v3; v12 = 0LL; v29 = v5; v30 = v9; v31 = v6; v32 = v7; v33 = v8; v37 = v10; v36 = 56 * v3; while ( 1 ) { v13 = *(_QWORD *)(v4 + v12); if ( v13 >= v5 && (v14 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v6)) != 0 ) { v15 = (_WORD *)(v14 + 2LL * v7 * (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(v4 + v12 + 8) + v6)); v11 = v36; } else { v15 = 0LL; } v16 = v10; if ( v13 >= v8 ) { v17 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v9); v16 = v10; if ( v17 ) { v16 = v10; if ( v15 ) { v18 = *(_QWORD *)(v4 + v12 + 8); v19 = (_WORD *)(v17 + 2LL * v26 * (unsigned int)*(unsigned __int8 *)(v18 + v9)); v16 = 1; if ( *v15 != *v19 ) return v16; v20 = *(unsigned __int8 *)(v18 + v27); v21 = *(unsigned __int8 *)(v18 + v28); if ( (unsigned __int8)v20 <= (unsigned __int8)v21 ) { v23 = (unsigned int)(2 * v20); if ( (unsigned __int8)v20 >= (unsigned __int8)v21 ) { v16 = memcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; } else { v35 = *(unsigned __int8 *)(v18 + v27); v24 = bcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; if ( v24 ) return v16; v16 = (unsigned __int16)v19[v35]; } } else { v34 = *(unsigned __int8 *)(v18 + v28); v22 = bcmp(v15, v19, (unsigned int)(2 * v21)); v10 = v37; v8 = v33; v7 = v32; v6 = v31; v9 = v30; v5 = v29; v11 = v36; if ( v22 ) return v16; v16 = (unsigned __int16)v15[v34]; } } } } if ( v16 ) break; v12 += 56LL; if ( v11 == v12 ) return 0; } } else { return 0; } return v16; }
my_uca_charcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVZX EAX,byte ptr [RDI + 0xb2] TEST RAX,RAX JZ 0x0013f630 MOV R12,qword ptr [RDI + 0x60] MOV EDI,ESI MOV R8,RSI SHR R8,0x8 MOV R9D,0xffffff MOV qword ptr [RBP + -0x78],R8 AND R8,R9 MOV ECX,0xff MOV R10,RSI AND R10,RCX MOV R11D,EDX MOV RBX,RDX SHR RBX,0x8 MOV qword ptr [RBP + -0x70],RBX AND R9,RBX AND RCX,RDX MOV qword ptr [RBP + -0x80],RCX CMP RSI,RDX MOV ESI,0x0 SETNZ SIL IMUL RDX,RAX,0x38 XOR R13D,R13D MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x60],R9 MOV qword ptr [RBP + -0x58],R8 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x48],R11 MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX LAB_0013f4e0: MOV RAX,qword ptr [R12 + R13*0x1] CMP RAX,RDI JC 0x0013f50f MOV RCX,qword ptr [R12 + R13*0x1 + 0x10] MOV RCX,qword ptr [RCX + R8*0x8] TEST RCX,RCX JZ 0x0013f50f MOV RDX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RDX + R8*0x1] IMUL EDX,R10D LEA R14,[RCX + RDX*0x2] MOV RDX,qword ptr [RBP + -0x38] JMP 0x0013f512 LAB_0013f50f: XOR R14D,R14D LAB_0013f512: MOV EBX,ESI CMP RAX,R11 JC 0x0013f61f MOV RAX,qword ptr [R12 + R13*0x1 + 0x10] MOV RAX,qword ptr [RAX + R9*0x8] MOV EBX,ESI TEST RAX,RAX JZ 0x0013f61f MOV EBX,ESI TEST R14,R14 JZ 0x0013f61f MOV RCX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RCX + R9*0x1] IMUL EDX,dword ptr [RBP + -0x80] LEA R15,[RAX + RDX*0x2] MOVZX EAX,word ptr [R14] MOV EBX,0x1 CMP AX,word ptr [R15] JNZ 0x0013f632 MOV RAX,qword ptr [RBP + -0x78] MOVZX ESI,byte ptr [RCX + RAX*0x1] MOV RAX,qword ptr [RBP + -0x70] MOVZX EAX,byte ptr [RCX + RAX*0x1] CMP SIL,AL JBE 0x0013f5b6 MOV qword ptr [RBP + -0x40],RAX LEA EDX,[RAX + RAX*0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x001242d0 MOV ESI,dword ptr [RBP + -0x2c] MOV R11,qword ptr [RBP + -0x48] MOV R10,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] TEST EAX,EAX MOV RDX,qword ptr [RBP + -0x38] JNZ 0x0013f632 MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R14 + RAX*0x2] JMP 0x0013f61f LAB_0013f5b6: LEA EDX,[RSI + RSI*0x1] CMP SIL,AL JNC 0x0013f5f7 MOV qword ptr [RBP + -0x40],RSI MOV RDI,R14 MOV RSI,R15 CALL 0x001242d0 TEST EAX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x0013f632 MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R15 + RAX*0x2] JMP 0x0013f61f LAB_0013f5f7: MOV RDI,R14 MOV RSI,R15 CALL 0x00124110 MOV EBX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] LAB_0013f61f: TEST EBX,EBX JNZ 0x0013f632 ADD R13,0x38 CMP RDX,R13 JNZ 0x0013f4e0 LAB_0013f630: XOR EBX,EBX LAB_0013f632: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_uca_charcmp(long param_1,ulong param_2,ulong param_3) { short *__s2; byte bVar1; byte bVar2; byte bVar3; long lVar4; long lVar5; long lVar6; int iVar7; uint uVar8; ulong uVar9; ulong uVar10; long lVar11; short *__s1; uint local_88; bVar1 = *(byte *)(param_1 + 0xb2); if ((ulong)bVar1 != 0) { lVar4 = *(long *)(param_1 + 0x60); uVar9 = param_2 >> 8 & 0xffffff; uVar10 = param_3 >> 8 & 0xffffff; local_88 = (uint)param_3 & 0xff; lVar11 = 0; do { uVar8 = (uint)(param_2 != param_3); if ((*(ulong *)(lVar4 + lVar11) < (param_2 & 0xffffffff)) || (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar9 * 8), lVar5 == 0)) { __s1 = (short *)0x0; } else { __s1 = (short *)(lVar5 + (ulong)((uint)*(byte *)(*(long *)(lVar4 + 8 + lVar11) + uVar9) * ((uint)param_2 & 0xff)) * 2); } if ((((param_3 & 0xffffffff) <= *(ulong *)(lVar4 + lVar11)) && (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar10 * 8), lVar5 != 0)) && (__s1 != (short *)0x0)) { lVar6 = *(long *)(lVar4 + 8 + lVar11); __s2 = (short *)(lVar5 + (ulong)(*(byte *)(lVar6 + uVar10) * local_88) * 2); if (*__s1 != *__s2) { return 1; } bVar2 = *(byte *)(lVar6 + (param_2 >> 8)); bVar3 = *(byte *)(lVar6 + (param_3 >> 8)); if (bVar3 < bVar2) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar3 + (uint)bVar3)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s1[bVar3]; } else if (bVar2 < bVar3) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s2[bVar2]; } else { uVar8 = memcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); } } if (uVar8 != 0) { return uVar8; } lVar11 = lVar11 + 0x38; } while ((ulong)bVar1 * 0x38 != lVar11); } return 0; }
50,432
recursive_iterate
eloqsql/mysys/lf_dynarray.c
static int recursive_iterate(LF_DYNARRAY *array, void *ptr, int level, lf_dynarray_func func, void *arg) { int res, i; if (!ptr) return 0; if (!level) return func(ptr, arg); for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++) if ((res= recursive_iterate(array, ((void **)ptr)[i], level-1, func, arg))) return res; return 0; }
O0
c
recursive_iterate: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x18(%rbp) jne 0xfec3b movl $0x0, -0x4(%rbp) jmp 0xfecab cmpl $0x0, -0x1c(%rbp) jne 0xfec54 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rdi movq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x4(%rbp) jmp 0xfecab movl $0x0, -0x38(%rbp) cmpl $0x100, -0x38(%rbp) # imm = 0x100 jge 0xfeca4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movslq -0x38(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x1c(%rbp), %edx subl $0x1, %edx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0xfec10 movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0xfec97 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xfecab jmp 0xfec99 movl -0x38(%rbp), %eax addl $0x1, %eax movl %eax, -0x38(%rbp) jmp 0xfec5b movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
recursive_iterate: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_18], 0 jnz short loc_FEC3B mov [rbp+var_4], 0 jmp short loc_FECAB loc_FEC3B: cmp [rbp+var_1C], 0 jnz short loc_FEC54 mov rax, [rbp+var_28] mov rdi, [rbp+var_18] mov rsi, [rbp+var_30] call rax mov [rbp+var_4], eax jmp short loc_FECAB loc_FEC54: mov [rbp+var_38], 0 loc_FEC5B: cmp [rbp+var_38], 100h jge short loc_FECA4 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] movsxd rcx, [rbp+var_38] mov rsi, [rax+rcx*8] mov edx, [rbp+var_1C] sub edx, 1 mov rcx, [rbp+var_28] mov r8, [rbp+var_30] call recursive_iterate mov [rbp+var_34], eax cmp eax, 0 jz short loc_FEC97 mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_FECAB loc_FEC97: jmp short $+2 loc_FEC99: mov eax, [rbp+var_38] add eax, 1 mov [rbp+var_38], eax jmp short loc_FEC5B loc_FECA4: mov [rbp+var_4], 0 loc_FECAB: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long recursive_iterate( long long a1, long long a2, int a3, unsigned int ( *a4)(long long, long long), long long a5) { int i; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+Ch] [rbp-34h] if ( a2 ) { if ( a3 ) { for ( i = 0; i < 256; ++i ) { v7 = recursive_iterate(a1, *(_QWORD *)(a2 + 8LL * i), (unsigned int)(a3 - 1), a4, a5); if ( v7 ) return v7; } return 0; } else { return a4(a2, a5); } } else { return 0; } }
recursive_iterate: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001fec3b MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fecab LAB_001fec3b: CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x001fec54 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x001fecab LAB_001fec54: MOV dword ptr [RBP + -0x38],0x0 LAB_001fec5b: CMP dword ptr [RBP + -0x38],0x100 JGE 0x001feca4 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,dword ptr [RBP + -0x1c] SUB EDX,0x1 MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] CALL 0x001fec10 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x001fec97 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001fecab LAB_001fec97: JMP 0x001fec99 LAB_001fec99: MOV EAX,dword ptr [RBP + -0x38] ADD EAX,0x1 MOV dword ptr [RBP + -0x38],EAX JMP 0x001fec5b LAB_001feca4: MOV dword ptr [RBP + -0x4],0x0 LAB_001fecab: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int recursive_iterate(int8 param_1,long param_2,int param_3,code *param_4,int8 param_5) { int iVar1; int local_40; int local_c; if (param_2 == 0) { local_c = 0; } else if (param_3 == 0) { local_c = (*param_4)(param_2,param_5); } else { for (local_40 = 0; local_40 < 0x100; local_40 = local_40 + 1) { iVar1 = recursive_iterate(param_1,*(int8 *)(param_2 + (long)local_40 * 8),param_3 + -1, param_4,param_5); if (iVar1 != 0) { return iVar1; } } local_c = 0; } return local_c; }
50,433
LEX::stmt_drop_procedure(DDL_options_st const&, sp_name*)
eloqsql/sql/sql_lex.cc
bool LEX::stmt_drop_procedure(const DDL_options_st &options, sp_name *name) { if (unlikely(sphead)) { my_error(ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"); return true; } set_command(SQLCOM_DROP_PROCEDURE, options); spname= name; return false; }
O0
cpp
LEX::stmt_drop_procedure(DDL_options_st const&, sp_name*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, 0x1960(%rax) je 0x9ca2a3 movl $0x54d, %edi # imm = 0x54D xorl %eax, %eax movl %eax, %esi leaq 0xa7a4aa(%rip), %rdx # 0x1444740 movb $0x0, %al callq 0x131c1e0 movb $0x1, -0x1(%rbp) jmp 0x9ca2d0 movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %edx movl $0x59, %esi callq 0x9d10b0 movq -0x30(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, 0x1968(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN3LEX19stmt_drop_procedureERK14DDL_options_stP7sp_name: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_30], rax cmp qword ptr [rax+1960h], 0 jz short loc_9CA2A3 mov edi, 54Dh xor eax, eax mov esi, eax lea rdx, aFunctionOrProc+0Ch; "PROCEDURE" mov al, 0 call my_error mov [rbp+var_1], 1 jmp short loc_9CA2D0 loc_9CA2A3: mov rdi, [rbp+var_30] mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_24], eax mov edx, [rbp+var_24] mov esi, 59h ; 'Y' call _ZN3LEX11set_commandE16enum_sql_command14DDL_options_st; LEX::set_command(enum_sql_command,DDL_options_st) mov rax, [rbp+var_30] mov rcx, [rbp+var_20] mov [rax+1968h], rcx mov [rbp+var_1], 0 loc_9CA2D0: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char LEX::stmt_drop_procedure(LEX *this, const DDL_options_st *a2, sp_name *a3, int a4, int a5, int a6) { if ( *((_QWORD *)this + 812) ) { my_error(1357, 0, (unsigned int)"PROCEDURE", a4, a5, a6); return 1; } else { LEX::set_command(this, 89LL, *(unsigned int *)a2); *((_QWORD *)this + 813) = a3; return 0; } }
column_bitmaps_set_no_signal: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x1f0],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x1f8],RCX POP RBP RET
/* TABLE::column_bitmaps_set_no_signal(st_bitmap*, st_bitmap*) */ void __thiscall TABLE::column_bitmaps_set_no_signal(TABLE *this,st_bitmap *param_1,st_bitmap *param_2) { *(st_bitmap **)(this + 0x1f0) = param_1; *(st_bitmap **)(this + 0x1f8) = param_2; return; }
50,434
LEX::stmt_drop_procedure(DDL_options_st const&, sp_name*)
eloqsql/sql/sql_lex.cc
bool LEX::stmt_drop_procedure(const DDL_options_st &options, sp_name *name) { if (unlikely(sphead)) { my_error(ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"); return true; } set_command(SQLCOM_DROP_PROCEDURE, options); spname= name; return false; }
O3
cpp
LEX::stmt_drop_procedure(DDL_options_st const&, sp_name*): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq 0x1960(%rdi), %rbx testq %rbx, %rbx jne 0x7d416b movl (%rsi), %eax movl $0x59, 0x8(%rdi) movl %eax, 0x15b8(%rdi) movq %rdx, 0x1968(%rdi) testq %rbx, %rbx setne %al addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x63a09d jmp 0x7d415e
_ZN3LEX19stmt_drop_procedureERK14DDL_options_stP7sp_name: push rbp mov rbp, rsp push rbx push rax mov rbx, [rdi+1960h] test rbx, rbx jnz short loc_7D416B mov eax, [rsi] mov dword ptr [rdi+8], 59h ; 'Y' mov [rdi+15B8h], eax mov [rdi+1968h], rdx loc_7D415E: test rbx, rbx setnz al add rsp, 8 pop rbx pop rbp retn loc_7D416B: call _ZN3LEX19stmt_drop_procedureERK14DDL_options_stP7sp_name_cold_1; LEX::stmt_drop_procedure(DDL_options_st const&,sp_name *) [clone] jmp short loc_7D415E
bool LEX::stmt_drop_procedure(long long a1, int *a2, long long a3, int a4, int a5, int a6) { long long v6; // rbx int v7; // eax v6 = *(_QWORD *)(a1 + 6496); if ( v6 ) { LEX::stmt_drop_procedure(a1, (long long)a2, a3, a4, a5, a6); } else { v7 = *a2; *(_DWORD *)(a1 + 8) = 89; *(_DWORD *)(a1 + 5560) = v7; *(_QWORD *)(a1 + 6504) = a3; } return v6 != 0; }
50,435
mi_ck_write_btree
eloqsql/storage/myisam/mi_write.c
int _mi_ck_write_btree(register MI_INFO *info, uint keynr, uchar *key, uint key_length) { int error; uint comp_flag; MI_KEYDEF *keyinfo=info->s->keyinfo+keynr; my_off_t *root=&info->s->state.key_root[keynr]; DBUG_ENTER("_mi_ck_write_btree"); if (keyinfo->flag & HA_SORT_ALLOWS_SAME) comp_flag=SEARCH_BIGGER; /* Put after same key */ else if (keyinfo->flag & (HA_NOSAME|HA_FULLTEXT)) { comp_flag=SEARCH_FIND | SEARCH_UPDATE | SEARCH_INSERT; /* No duplicates */ if (keyinfo->flag & HA_NULL_ARE_EQUAL) comp_flag|= SEARCH_NULL_ARE_EQUAL; } else comp_flag=SEARCH_SAME; /* Keys in rec-pos order */ error=_mi_ck_real_write_btree(info, keyinfo, key, key_length, root, comp_flag); if (info->ft1_to_ft2) { if (!error) error= _mi_ft_convert_to_ft2(info, keynr, key); delete_dynamic(info->ft1_to_ft2); my_free(info->ft1_to_ft2); info->ft1_to_ft2=0; } DBUG_RETURN(error); }
O3
c
mi_ck_write_btree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movl %esi, %r15d movq %rdi, %rbx movq (%rdi), %rdx movq 0x218(%rdx), %rax movl %esi, %r8d imulq $0x70, %r8, %rdi leaq (%rax,%rdi), %rsi shlq $0x3, %r8 movzwl 0xa(%rax,%rdi), %eax movl $0x8, %r9d addq 0x98(%rdx), %r8 btl $0x9, %eax jb 0xa31cc testb $-0x7f, %al je 0xa31c6 andl $0x800, %eax # imm = 0x800 shll $0x4, %eax orl $0x20041, %eax # imm = 0x20041 movl %eax, %r9d jmp 0xa31cc movl $0x4, %r9d movq %rbx, %rdi movq %r14, %rdx callq 0xa322b movl %eax, %r12d movq 0x88(%rbx), %rdi testq %rdi, %rdi je 0xa321f testl %r12d, %r12d jne 0xa3203 movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x8f6d7 movl %eax, %r12d movq 0x88(%rbx), %rdi callq 0xac8e4 movq 0x88(%rbx), %rdi callq 0xbf54e movq $0x0, 0x88(%rbx) movl %r12d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_ck_write_btree: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov r15d, esi mov rbx, rdi mov rdx, [rdi] mov rax, [rdx+218h] mov r8d, esi imul rdi, r8, 70h ; 'p' lea rsi, [rax+rdi] shl r8, 3 movzx eax, word ptr [rax+rdi+0Ah] mov r9d, 8 add r8, [rdx+98h] bt eax, 9 jb short loc_A31CC test al, 81h jz short loc_A31C6 and eax, 800h shl eax, 4 or eax, 20041h mov r9d, eax jmp short loc_A31CC loc_A31C6: mov r9d, 4 loc_A31CC: mov rdi, rbx mov rdx, r14 call _mi_ck_real_write_btree mov r12d, eax mov rdi, [rbx+88h] test rdi, rdi jz short loc_A321F test r12d, r12d jnz short loc_A3203 mov rdi, rbx mov esi, r15d mov rdx, r14 call _mi_ft_convert_to_ft2 mov r12d, eax mov rdi, [rbx+88h] loc_A3203: call delete_dynamic mov rdi, [rbx+88h] call my_free mov qword ptr [rbx+88h], 0 loc_A321F: mov eax, r12d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_ck_write_btree(long long *a1, unsigned int a2, unsigned __int8 *a3, long long a4) { long long v7; // r8 long long v8; // rsi __int16 v9; // ax long long v10; // r9 long long v11; // r8 unsigned int v12; // r12d long long v13; // rdi v7 = a2; v8 = *(_QWORD *)(*a1 + 536) + 112LL * a2; v9 = *(_WORD *)(v8 + 10); v10 = 8LL; v11 = *(_QWORD *)(*a1 + 152) + 8 * v7; if ( (v9 & 0x200) == 0 ) { if ( (v9 & 0x81) != 0 ) v10 = (16 * (v9 & 0x800)) | 0x20041u; else v10 = 4LL; } v12 = mi_ck_real_write_btree(a1, v8, a3, a4, v11, v10); v13 = a1[17]; if ( v13 ) { if ( !v12 ) { v12 = mi_ft_convert_to_ft2(a1, a2, a3); v13 = a1[17]; } delete_dynamic(v13); my_free(a1[17]); a1[17] = 0LL; } return v12; }
_mi_ck_write_btree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV R15D,ESI MOV RBX,RDI MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDX + 0x218] MOV R8D,ESI IMUL RDI,R8,0x70 LEA RSI,[RAX + RDI*0x1] SHL R8,0x3 MOVZX EAX,word ptr [RAX + RDI*0x1 + 0xa] MOV R9D,0x8 ADD R8,qword ptr [RDX + 0x98] BT EAX,0x9 JC 0x001a31cc TEST AL,0x81 JZ 0x001a31c6 AND EAX,0x800 SHL EAX,0x4 OR EAX,0x20041 MOV R9D,EAX JMP 0x001a31cc LAB_001a31c6: MOV R9D,0x4 LAB_001a31cc: MOV RDI,RBX MOV RDX,R14 CALL 0x001a322b MOV R12D,EAX MOV RDI,qword ptr [RBX + 0x88] TEST RDI,RDI JZ 0x001a321f TEST R12D,R12D JNZ 0x001a3203 MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x0018f6d7 MOV R12D,EAX MOV RDI,qword ptr [RBX + 0x88] LAB_001a3203: CALL 0x001ac8e4 MOV RDI,qword ptr [RBX + 0x88] CALL 0x001bf54e MOV qword ptr [RBX + 0x88],0x0 LAB_001a321f: MOV EAX,R12D POP RBX POP R12 POP R14 POP R15 POP RBP RET
int _mi_ck_write_btree(long *param_1,uint param_2,int8 param_3,int8 param_4) { ushort uVar1; uint uVar2; int iVar3; long lVar4; long lVar5; lVar5 = *(long *)(*param_1 + 0x218); lVar4 = (ulong)param_2 * 0x70; uVar1 = *(ushort *)(lVar5 + 10 + lVar4); uVar2 = 8; if ((uVar1 >> 9 & 1) == 0) { if ((uVar1 & 0x81) == 0) { uVar2 = 4; } else { uVar2 = (uVar1 & 0x800) << 4 | 0x20041; } } iVar3 = _mi_ck_real_write_btree (param_1,lVar5 + lVar4,param_3,param_4, (ulong)param_2 * 8 + *(long *)(*param_1 + 0x98),uVar2); lVar5 = param_1[0x11]; if (lVar5 != 0) { if (iVar3 == 0) { iVar3 = _mi_ft_convert_to_ft2(param_1,param_2,param_3); lVar5 = param_1[0x11]; } delete_dynamic(lVar5); my_free(param_1[0x11]); param_1[0x11] = 0; } return iVar3; }
50,436
pvio_socket_read
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
ssize_t pvio_socket_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r; int read_flags= MSG_DONTWAIT; struct st_pvio_socket *csock; int timeout; if (!pvio || !pvio->data) return -1; csock= (struct st_pvio_socket *)pvio->data; timeout = pvio->timeout[PVIO_READ_TIMEOUT]; while ((r = ma_recv(csock->socket, (void *)buffer, length, read_flags)) == -1) { int err = socket_errno; if ((err != SOCKET_EAGAIN #ifdef HAVE_SOCKET_EWOULDBLOCK && err != SOCKET_EWOULDBLOCK #endif ) || timeout == 0) return r; if (pvio_socket_wait_io_or_timeout(pvio, TRUE, timeout) < 1) return -1; } return r; }
O3
c
pvio_socket_read: movq $-0x1, %rax testq %rdi, %rdi je 0x5d7e1 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movq (%rdi), %rbx testq %rbx, %rbx je 0x5d7d3 movq %rdx, %r14 movq %rsi, %r15 movl 0x28(%r12), %r13d movl %r13d, -0x2c(%rbp) movl (%rbx), %r13d movl %r13d, %edi movq %r15, %rsi movq %r14, %rdx movl $0x40, %ecx callq 0x379e0 cmpq $-0x1, %rax jne 0x5d7d3 callq 0x37a20 movl (%rax), %eax cmpl $0x4, %eax je 0x5d785 cmpl $0xb, %eax jne 0x5d7cc movl -0x2c(%rbp), %r13d testl %r13d, %r13d je 0x5d7cc movq %r12, %rdi movl $0x1, %esi movl %r13d, %edx callq 0x5d8a4 testl %eax, %eax jg 0x5d782 movq $-0x1, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
pvio_socket_read: mov rax, 0FFFFFFFFFFFFFFFFh test rdi, rdi jz locret_5D7E1 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdi mov rbx, [rdi] test rbx, rbx jz short loc_5D7D3 mov r14, rdx mov r15, rsi mov r13d, [r12+28h] mov [rbp-2Ch], r13d loc_5D782: mov r13d, [rbx] loc_5D785: mov edi, r13d mov rsi, r15 mov rdx, r14 mov ecx, 40h ; '@' call _recv cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_5D7D3 call ___errno_location mov eax, [rax] cmp eax, 4 jz short loc_5D785 cmp eax, 0Bh jnz short loc_5D7CC mov r13d, [rbp-2Ch] test r13d, r13d jz short loc_5D7CC mov rdi, r12 mov esi, 1 mov edx, r13d call pvio_socket_wait_io_or_timeout test eax, eax jg short loc_5D782 loc_5D7CC: mov rax, 0FFFFFFFFFFFFFFFFh loc_5D7D3: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_5D7E1: retn
long long pvio_socket_read(long long a1, long long a2, long long a3) { long long result; // rax unsigned int *v4; // rbx unsigned int v6; // r13d int v7; // eax unsigned int v8; // [rsp-34h] [rbp-34h] result = -1LL; if ( a1 ) { v4 = *(unsigned int **)a1; if ( *(_QWORD *)a1 ) { v8 = *(_DWORD *)(a1 + 40); LABEL_4: v6 = *v4; while ( 1 ) { result = recv(v6, a2, a3, 64LL); if ( result != -1 ) break; v7 = *(_DWORD *)__errno_location(v6); if ( v7 != 4 ) { if ( v7 != 11 || !v8 || (int)pvio_socket_wait_io_or_timeout(a1, 1LL, v8) <= 0 ) return -1LL; goto LABEL_4; } } } } return result; }
pvio_socket_read: MOV RAX,-0x1 TEST RDI,RDI JZ 0x0015d7e1 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDI MOV RBX,qword ptr [RDI] TEST RBX,RBX JZ 0x0015d7d3 MOV R14,RDX MOV R15,RSI MOV R13D,dword ptr [R12 + 0x28] MOV dword ptr [RBP + -0x2c],R13D LAB_0015d782: MOV R13D,dword ptr [RBX] LAB_0015d785: MOV EDI,R13D MOV RSI,R15 MOV RDX,R14 MOV ECX,0x40 CALL 0x001379e0 CMP RAX,-0x1 JNZ 0x0015d7d3 CALL 0x00137a20 MOV EAX,dword ptr [RAX] CMP EAX,0x4 JZ 0x0015d785 CMP EAX,0xb JNZ 0x0015d7cc MOV R13D,dword ptr [RBP + -0x2c] TEST R13D,R13D JZ 0x0015d7cc MOV RDI,R12 MOV ESI,0x1 MOV EDX,R13D CALL 0x0015d8a4 TEST EAX,EAX JG 0x0015d782 LAB_0015d7cc: MOV RAX,-0x1 LAB_0015d7d3: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0015d7e1: RET
ssize_t pvio_socket_read(int8 *param_1,void *param_2,size_t param_3) { int iVar1; int *piVar2; int iVar3; ssize_t sVar4; int *piVar5; if ((param_1 != (int8 *)0x0) && (piVar2 = (int *)*param_1, piVar2 != (int *)0x0)) { iVar1 = *(int *)(param_1 + 5); do { iVar3 = *piVar2; do { sVar4 = recv(iVar3,param_2,param_3,0x40); if (sVar4 != -1) { return sVar4; } piVar5 = __errno_location(); } while (*piVar5 == 4); } while (((*piVar5 == 0xb) && (iVar1 != 0)) && (iVar3 = pvio_socket_wait_io_or_timeout(param_1,1,iVar1), 0 < iVar3)); } return -1; }
50,437
allocate_dynamic
eloqsql/mysys/array.c
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) { DBUG_ENTER("allocate_dynamic"); if (max_elements >= array->max_element) { uint size; uchar *new_ptr; size= (max_elements + array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this senerio, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key, array->buffer,size * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(TRUE); array->buffer= new_ptr; array->max_element= size; } DBUG_RETURN(FALSE); }
O0
c
allocate_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0x5a3c5 movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx xorl %edx, %edx divl 0x10(%rcx) movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax imull -0x18(%rbp), %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x5a36e movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx orq $0x10, %rdx callq 0x5b130 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5a333 jmp 0x5a32a movb $0x0, -0x1(%rbp) jmp 0x5a3cb movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x26280 movq -0x10(%rbp), %rax movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF andq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) jmp 0x5a3b0 movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x50, %rcx callq 0x5b300 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5a3ae jmp 0x5a3a8 movb $0x1, -0x1(%rbp) jmp 0x5a3cb jmp 0x5a3b0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) jmp 0x5a3c7 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
allocate_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb loc_5A3C5 mov eax, [rbp+var_14] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] xor edx, edx div dword ptr [rcx+10h] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov eax, [rax+10h] imul eax, [rbp+var_18] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz short loc_5A36E mov rax, [rbp+var_10] mov edi, [rax+18h] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov esi, eax mov rax, [rbp+var_10] mov rdx, [rax+20h] or rdx, 10h call my_malloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_5A333 jmp short $+2 loc_5A32A: mov [rbp+var_1], 0 jmp loc_5A3CB loc_5A333: mov rdi, [rbp+var_20] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy mov rax, [rbp+var_10] mov rcx, 0FFFFFEFFh and rcx, [rax+20h] mov [rax+20h], rcx jmp short loc_5A3B0 loc_5A36E: mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 50h call my_realloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_5A3AE jmp short $+2 loc_5A3A8: mov [rbp+var_1], 1 jmp short loc_5A3CB loc_5A3AE: jmp short $+2 loc_5A3B0: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+0Ch], ecx loc_5A3C5: jmp short $+2 loc_5A3C7: mov [rbp+var_1], 0 loc_5A3CB: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char allocate_dynamic(long long a1, unsigned int a2) { long long v3; // [rsp+0h] [rbp-20h] unsigned int v4; // [rsp+8h] [rbp-18h] if ( a2 < *(_DWORD *)(a1 + 12) ) return 0; v4 = (*(_DWORD *)(a1 + 16) + a2) / *(_DWORD *)(a1 + 16) * *(_DWORD *)(a1 + 16); if ( (*(_QWORD *)(a1 + 32) & 0x100LL) == 0 ) { v3 = my_realloc(*(unsigned int *)(a1 + 24), *(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v4, *(_QWORD *)(a1 + 32) | 0x50LL); if ( !v3 ) return 1; goto LABEL_8; } v3 = my_malloc(*(unsigned int *)(a1 + 24), *(_DWORD *)(a1 + 20) * v4, *(_QWORD *)(a1 + 32) | 0x10LL); if ( v3 ) { memcpy(v3, *(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8))); *(_QWORD *)(a1 + 32) &= 0xFFFFFEFFuLL; LABEL_8: *(_QWORD *)a1 = v3; *(_DWORD *)(a1 + 12) = v4; return 0; } return 0; }
allocate_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x0015a3c5 MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] XOR EDX,EDX DIV dword ptr [RCX + 0x10] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] IMUL EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x0015a36e MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] OR RDX,0x10 CALL 0x0015b130 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015a333 JMP 0x0015a32a LAB_0015a32a: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015a3cb LAB_0015a333: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x00126280 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xfffffeff AND RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX JMP 0x0015a3b0 LAB_0015a36e: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x50 CALL 0x0015b300 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015a3ae JMP 0x0015a3a8 LAB_0015a3a8: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015a3cb LAB_0015a3ae: JMP 0x0015a3b0 LAB_0015a3b0: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX LAB_0015a3c5: JMP 0x0015a3c7 LAB_0015a3c7: MOV byte ptr [RBP + -0x1],0x0 LAB_0015a3cb: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 allocate_dynamic(int8 *param_1,uint param_2) { int iVar1; void *local_28; if (*(uint *)((long)param_1 + 0xc) <= param_2) { iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2)); if ((param_1[4] & 0x100) == 0) { local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1, iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3), iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10); if (local_28 == (void *)0x0) { return 0; } memcpy(local_28,(void *)*param_1, (ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14))); param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = local_28; *(int *)((long)param_1 + 0xc) = iVar1; } return 0; }
50,438
google::protobuf::SourceCodeInfo_Location::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // repeated int32 path = 1 [packed = true]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_path(), ptr, ctx); CHK_(ptr); } else if (static_cast<uint8_t>(tag) == 8) { _internal_add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // repeated int32 span = 2 [packed = true]; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_span(), ptr, ctx); CHK_(ptr); } else if (static_cast<uint8_t>(tag) == 16) { _internal_add_span(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // optional string leading_comments = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { auto str = _internal_mutable_leading_comments(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.leading_comments"); #endif // !NDEBUG } else goto handle_unusual; continue; // optional string trailing_comments = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { auto str = _internal_mutable_trailing_comments(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); #endif // !NDEBUG } else goto handle_unusual; continue; // repeated string leading_detached_comments = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { ptr -= 1; do { ptr += 1; auto str = _internal_add_leading_detached_comments(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); #endif // !NDEBUG if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(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: _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O0
cpp
google::protobuf::SourceCodeInfo_Location::_InternalParse(char const*, google::protobuf::internal::ParseContext*): subq $0x98, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x54(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x28(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq 0x28(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x30(%rsp) jne 0xcb616 jmp 0xcb636 movq 0x58(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0xd41f0 xorb $-0x1, %al testb $0x1, %al jne 0xcb650 jmp 0xcb9d4 movq 0x60(%rsp), %rdi leaq 0x50(%rsp), %rsi xorl %edx, %edx callq 0xd4220 movq %rax, 0x60(%rsp) movl 0x50(%rsp), %eax shrl $0x3, %eax decl %eax movl %eax, %ecx movq %rcx, 0x18(%rsp) subl $0x5, %eax ja 0xcb8ee movq 0x18(%rsp), %rax leaq 0x124d49(%rip), %rcx # 0x1f03d4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0xa, %eax jne 0xcb6d9 movq 0x20(%rsp), %rdi callq 0xdc5c0 movq %rax, %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b49e0 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb6d2 jmp 0xcb6d7 jmp 0xcb9f6 jmp 0xcb71a movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x8, %eax jne 0xcb713 leaq 0x60(%rsp), %rdi callq 0xd4f80 movq 0x20(%rsp), %rdi movl %eax, %esi callq 0x8b510 cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb70c jmp 0xcb711 jmp 0xcb9f6 jmp 0xcb718 jmp 0xcb8f0 jmp 0xcb71a jmp 0xcb636 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x12, %eax jne 0xcb764 movq 0x20(%rsp), %rdi callq 0xdc5e0 movq %rax, %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b49e0 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb75d jmp 0xcb762 jmp 0xcb9f6 jmp 0xcb7a5 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x10, %eax jne 0xcb79e leaq 0x60(%rsp), %rdi callq 0xd4f80 movq 0x20(%rsp), %rdi movl %eax, %esi callq 0xdc600 cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb797 jmp 0xcb79c jmp 0xcb9f6 jmp 0xcb7a3 jmp 0xcb8f0 jmp 0xcb7a5 jmp 0xcb636 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x1a, %eax jne 0xcb7f6 movq 0x20(%rsp), %rdi callq 0xdc630 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb7ef jmp 0xcb7f4 jmp 0xcb9f6 jmp 0xcb7fb jmp 0xcb8f0 jmp 0xcb636 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x22, %eax jne 0xcb84c movq 0x20(%rsp), %rdi callq 0xdc690 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb845 jmp 0xcb84a jmp 0xcb9f6 jmp 0xcb851 jmp 0xcb8f0 jmp 0xcb636 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x32, %eax jne 0xcb8e7 movq 0x60(%rsp), %rax addq $-0x1, %rax movq %rax, 0x60(%rsp) movq 0x20(%rsp), %rdi movq 0x60(%rsp), %rax addq $0x1, %rax movq %rax, 0x60(%rsp) callq 0xdc6f0 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb8bb jmp 0xcb8c0 jmp 0xcb9f6 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xd4310 testb $0x1, %al jne 0xcb8d5 jmp 0xcb8e5 jmp 0xcb8d7 movq 0x60(%rsp), %rdi callq 0xd4f40 testb $0x1, %al jne 0xcb874 jmp 0xcb8e9 jmp 0xcb8f0 jmp 0xcb636 jmp 0xcb8f0 cmpl $0x0, 0x50(%rsp) je 0xcb903 movl 0x50(%rsp), %eax andl $0x7, %eax cmpl $0x4, %eax jne 0xcb92c cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb914 jmp 0xcb919 jmp 0xcb9f6 movq 0x58(%rsp), %rdi movl 0x50(%rsp), %esi callq 0xd4350 jmp 0xcb9d6 movq 0x20(%rsp), %rax movl 0x50(%rsp), %ecx movq %rcx, 0x8(%rsp) addq $0x8, %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xcb98f movq 0x10(%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0x78(%rsp) jmp 0xcb99e movq 0x10(%rsp), %rdi callq 0xdf250 movq %rax, 0x78(%rsp) movq 0x8(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x60(%rsp), %rdx movq 0x58(%rsp), %rcx callq 0x163b20 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xcb9cd jmp 0xcb9cf jmp 0xcb9f6 jmp 0xcb636 jmp 0xcb9d6 movq 0x20(%rsp), %rdi addq $0x10, %rdi leaq 0x54(%rsp), %rsi callq 0xd5090 movq 0x60(%rsp), %rax addq $0x98, %rsp retq movq $0x0, 0x60(%rsp) jmp 0xcb9d6 nopw %cs:(%rax,%rax)
_ZN6google8protobuf23SourceCodeInfo_Location14_InternalParseEPKcPNS0_8internal12ParseContextE: sub rsp, 98h mov qword ptr [rsp+98h+var_30], rdi; int mov [rsp+98h+var_38], rsi mov [rsp+98h+var_40], rdx; int mov rax, qword ptr [rsp+98h+var_30] mov [rsp+98h+var_78], rax; int lea rax, [rsp+98h+var_48+4] mov [rsp+98h+var_10], rax mov rax, [rsp+98h+var_10] mov rcx, rax add rcx, 4 mov qword ptr [rsp+98h+var_70], rcx; int mov qword ptr [rsp+98h+var_68], rax loc_CB616: mov rax, qword ptr [rsp+98h+var_68] mov rcx, qword ptr [rsp+98h+var_70] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov qword ptr [rsp+98h+var_68], rax; int jnz short loc_CB616 jmp short $+2 loc_CB636: mov rdi, [rsp+98h+var_40]; this lea rsi, [rsp+98h+var_38]; char ** call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**) xor al, 0FFh test al, 1 jnz short loc_CB650 jmp loc_CB9D4 loc_CB650: mov rdi, [rsp+98h+var_38]; this lea rsi, [rsp+98h+var_48]; char ** xor edx, edx; unsigned int * call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint) mov [rsp+98h+var_38], rax; int mov eax, dword ptr [rsp+98h+var_48] shr eax, 3 dec eax; switch 6 cases mov ecx, eax mov qword ptr [rsp+98h+var_80], rcx; int sub eax, 5 ja def_CB692; jumptable 00000000000CB692 default case, case 5 mov rax, qword ptr [rsp+98h+var_80] lea rcx, jpt_CB692 movsxd rax, ds:(jpt_CB692 - 1F03D4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_CB694: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000CB692 case 1 movzx eax, al cmp eax, 0Ah jnz short loc_CB6D9 mov rdi, [rsp+98h+var_78]; this call _ZN6google8protobuf23SourceCodeInfo_Location22_internal_mutable_pathEv; google::protobuf::SourceCodeInfo_Location::_internal_mutable_path(void) mov rdi, rax; this mov rsi, [rsp+98h+var_38]; void * mov rdx, [rsp+98h+var_40]; char * call _ZN6google8protobuf8internal17PackedInt32ParserEPvPKcPNS1_12ParseContextE; google::protobuf::internal::PackedInt32Parser(void *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB6D2 jmp short loc_CB6D7 loc_CB6D2: jmp loc_CB9F6 loc_CB6D7: jmp short loc_CB71A loc_CB6D9: mov eax, dword ptr [rsp+98h+var_48] movzx eax, al cmp eax, 8 jnz short loc_CB713 lea rdi, [rsp+98h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**) mov rdi, [rsp+98h+var_78]; this mov esi, eax; int call _ZN6google8protobuf23SourceCodeInfo_Location18_internal_add_pathEi; google::protobuf::SourceCodeInfo_Location::_internal_add_path(int) cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB70C jmp short loc_CB711 loc_CB70C: jmp loc_CB9F6 loc_CB711: jmp short loc_CB718 loc_CB713: jmp loc_CB8F0 loc_CB718: jmp short $+2 loc_CB71A: jmp loc_CB636 loc_CB71F: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000CB692 case 2 movzx eax, al cmp eax, 12h jnz short loc_CB764 mov rdi, [rsp+98h+var_78]; this call _ZN6google8protobuf23SourceCodeInfo_Location22_internal_mutable_spanEv; google::protobuf::SourceCodeInfo_Location::_internal_mutable_span(void) mov rdi, rax; this mov rsi, [rsp+98h+var_38]; void * mov rdx, [rsp+98h+var_40]; char * call _ZN6google8protobuf8internal17PackedInt32ParserEPvPKcPNS1_12ParseContextE; google::protobuf::internal::PackedInt32Parser(void *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB75D jmp short loc_CB762 loc_CB75D: jmp loc_CB9F6 loc_CB762: jmp short loc_CB7A5 loc_CB764: mov eax, dword ptr [rsp+98h+var_48] movzx eax, al cmp eax, 10h jnz short loc_CB79E lea rdi, [rsp+98h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**) mov rdi, [rsp+98h+var_78]; this mov esi, eax; int call _ZN6google8protobuf23SourceCodeInfo_Location18_internal_add_spanEi; google::protobuf::SourceCodeInfo_Location::_internal_add_span(int) cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB797 jmp short loc_CB79C loc_CB797: jmp loc_CB9F6 loc_CB79C: jmp short loc_CB7A3 loc_CB79E: jmp loc_CB8F0 loc_CB7A3: jmp short $+2 loc_CB7A5: jmp loc_CB636 loc_CB7AA: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000CB692 case 3 movzx eax, al cmp eax, 1Ah jnz short loc_CB7F6 mov rdi, [rsp+98h+var_78] call _ZN6google8protobuf23SourceCodeInfo_Location34_internal_mutable_leading_commentsB5cxx11Ev; google::protobuf::SourceCodeInfo_Location::_internal_mutable_leading_comments(void) mov [rsp+98h+var_50], rax mov rdi, [rsp+98h+var_50] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB7EF jmp short loc_CB7F4 loc_CB7EF: jmp loc_CB9F6 loc_CB7F4: jmp short loc_CB7FB loc_CB7F6: jmp loc_CB8F0 loc_CB7FB: jmp loc_CB636 loc_CB800: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000CB692 case 4 movzx eax, al cmp eax, 22h ; '"' jnz short loc_CB84C mov rdi, [rsp+98h+var_78] call _ZN6google8protobuf23SourceCodeInfo_Location35_internal_mutable_trailing_commentsB5cxx11Ev; google::protobuf::SourceCodeInfo_Location::_internal_mutable_trailing_comments(void) mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_58] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB845 jmp short loc_CB84A loc_CB845: jmp loc_CB9F6 loc_CB84A: jmp short loc_CB851 loc_CB84C: jmp loc_CB8F0 loc_CB851: jmp loc_CB636 loc_CB856: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000CB692 case 6 movzx eax, al cmp eax, 32h ; '2' jnz loc_CB8E7 mov rax, [rsp+98h+var_38] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_38], rax loc_CB874: mov rdi, [rsp+98h+var_78] mov rax, [rsp+98h+var_38] add rax, 1 mov [rsp+98h+var_38], rax call _ZN6google8protobuf23SourceCodeInfo_Location39_internal_add_leading_detached_commentsB5cxx11Ev; google::protobuf::SourceCodeInfo_Location::_internal_add_leading_detached_comments(void) mov [rsp+98h+var_60], rax mov rdi, [rsp+98h+var_60] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB8BB jmp short loc_CB8C0 loc_CB8BB: jmp loc_CB9F6 loc_CB8C0: mov rdi, [rsp+98h+var_40]; this mov rsi, [rsp+98h+var_38]; char * call _ZN6google8protobuf8internal18EpsCopyInputStream13DataAvailableEPKc; google::protobuf::internal::EpsCopyInputStream::DataAvailable(char const*) test al, 1 jnz short loc_CB8D5 jmp short loc_CB8E5 loc_CB8D5: jmp short $+2 loc_CB8D7: mov rdi, [rsp+98h+var_38] call _ZN6google8protobuf8internal9ExpectTagILj50EEEbPKc; google::protobuf::internal::ExpectTag<50u>(char const*) test al, 1 jnz short loc_CB874 loc_CB8E5: jmp short loc_CB8E9 loc_CB8E7: jmp short loc_CB8F0 loc_CB8E9: jmp loc_CB636 def_CB692: jmp short $+2; jumptable 00000000000CB692 default case, case 5 loc_CB8F0: cmp dword ptr [rsp+98h+var_48], 0 jz short loc_CB903 mov eax, dword ptr [rsp+98h+var_48] and eax, 7 cmp eax, 4 jnz short loc_CB92C loc_CB903: cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB914 jmp short loc_CB919 loc_CB914: jmp loc_CB9F6 loc_CB919: mov rdi, [rsp+98h+var_40]; this mov esi, dword ptr [rsp+98h+var_48]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint) jmp loc_CB9D6 loc_CB92C: mov rax, [rsp+98h+var_78] mov ecx, dword ptr [rsp+98h+var_48]; int mov [rsp+98h+var_90], rcx; int add rax, 8 mov [rsp+98h+var_28], rax; int mov rax, [rsp+98h+var_28] mov [rsp+98h+var_88], rax; void * mov [rsp+98h+var_18], rax; __int64 mov rax, [rsp+98h+var_18] mov [rsp+98h+var_8], rax mov rax, [rsp+98h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_CB98F mov rdi, [rsp+98h+var_88] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+98h+var_20], rax jmp short loc_CB99E loc_CB98F: mov rdi, [rsp+98h+var_88]; int call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov [rsp+98h+var_20], rax loc_CB99E: mov rdi, [rsp+98h+var_90]; this mov rsi, [rsp+98h+var_20]; unsigned __int64 mov rdx, [rsp+98h+var_38]; google::protobuf::UnknownFieldSet * mov rcx, [rsp+98h+var_40]; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_CB9CD jmp short loc_CB9CF loc_CB9CD: jmp short loc_CB9F6 loc_CB9CF: jmp loc_CB636 loc_CB9D4: jmp short $+2 loc_CB9D6: mov rdi, [rsp+98h+var_78] add rdi, 10h lea rsi, [rsp+98h+var_48+4] call _ZN6google8protobuf8internal7HasBitsILm1EE2OrERKS3_; google::protobuf::internal::HasBits<1ul>::Or(google::protobuf::internal::HasBits<1ul> const&) mov rax, [rsp+98h+var_38] add rsp, 98h retn loc_CB9F6: mov [rsp+98h+var_38], 0 jmp short loc_CB9D6
google::protobuf::internal * google::protobuf::SourceCodeInfo_Location::_InternalParse( google::protobuf::SourceCodeInfo_Location *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { unsigned int v3; // ecx int v4; // edx int v5; // r8d int v6; // r9d google::protobuf::internal *v7; // rax google::protobuf::internal::ParseContext *v8; // rcx int Varint32; // eax google::protobuf::internal *v10; // rax google::protobuf::internal::ParseContext *v11; // rcx int v12; // eax google::protobuf::internal::ParseContext *v13; // r8 int v15; // [rsp+0h] [rbp-98h] google::protobuf::internal *v16; // [rsp+8h] [rbp-90h] _QWORD *v17; // [rsp+10h] [rbp-88h] google::protobuf::SourceCodeInfo_Location *v18; // [rsp+20h] [rbp-78h] google::protobuf::internal::EpsCopyInputStream **v19; // [rsp+28h] [rbp-70h] google::protobuf::internal::EpsCopyInputStream **v20; // [rsp+30h] [rbp-68h] long long v21; // [rsp+38h] [rbp-60h] long long v22; // [rsp+40h] [rbp-58h] long long v23; // [rsp+48h] [rbp-50h] char *v24; // [rsp+50h] [rbp-48h] BYREF google::protobuf::internal::EpsCopyInputStream *v25; // [rsp+58h] [rbp-40h] BYREF google::protobuf::internal *Tag; // [rsp+60h] [rbp-38h] BYREF int v27[2]; // [rsp+68h] [rbp-30h] void *v28; // [rsp+70h] [rbp-28h] unsigned long long v29; // [rsp+78h] [rbp-20h] long long v30; // [rsp+80h] [rbp-18h] char *v31; // [rsp+88h] [rbp-10h] char *v32; // [rsp+90h] [rbp-8h] *(_QWORD *)v27 = this; Tag = a2; v25 = a3; v18 = this; v31 = (char *)&v24 + 4; v19 = &v25; v20 = (google::protobuf::internal::EpsCopyInputStream **)((char *)&v24 + 4); do { *(_DWORD *)v20 = 0; v20 = (google::protobuf::internal::EpsCopyInputStream **)((char *)v20 + 4); } while ( v20 != &v25 ); LABEL_3: while ( 2 ) { if ( (google::protobuf::internal::ParseContext::Done(v25, (const char **)&Tag) & 1) != 0 ) goto LABEL_42; Tag = (google::protobuf::internal *)google::protobuf::internal::ReadTag(Tag, (const char *)&v24, 0LL, v3); switch ( (unsigned int)v24 >> 3 ) { case 1u: if ( (unsigned __int8)v24 == 10 ) { v7 = (google::protobuf::internal *)google::protobuf::SourceCodeInfo_Location::_internal_mutable_path(v18); Tag = (google::protobuf::internal *)google::protobuf::internal::PackedInt32Parser( v7, Tag, (const char *)v25, v8); if ( !Tag ) goto LABEL_43; continue; } if ( (unsigned __int8)v24 != 8 ) goto LABEL_33; Varint32 = google::protobuf::internal::ReadVarint32((google::protobuf::internal *)&Tag, (const char **)&v24); google::protobuf::SourceCodeInfo_Location::_internal_add_path(v18, Varint32); if ( Tag ) continue; goto LABEL_43; case 2u: if ( (unsigned __int8)v24 == 18 ) { v10 = (google::protobuf::internal *)google::protobuf::SourceCodeInfo_Location::_internal_mutable_span(v18); Tag = (google::protobuf::internal *)google::protobuf::internal::PackedInt32Parser( v10, Tag, (const char *)v25, v11); if ( !Tag ) goto LABEL_43; continue; } if ( (unsigned __int8)v24 == 16 ) { v12 = google::protobuf::internal::ReadVarint32((google::protobuf::internal *)&Tag, (const char **)&v24); google::protobuf::SourceCodeInfo_Location::_internal_add_span(v18, v12); if ( !Tag ) goto LABEL_43; continue; } LABEL_33: if ( (_DWORD)v24 && ((unsigned __int8)v24 & 7) != 4 ) { v16 = (google::protobuf::internal *)(unsigned int)v24; v28 = (char *)v18 + 8; v17 = (_QWORD *)((char *)v18 + 8); v30 = (long long)v18 + 8; v32 = (char *)v18 + 8; if ( (*((_QWORD *)v18 + 1) & 1LL) != 0 ) v29 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v17) + 8; else v29 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>( (int)v17, (int)&v24, v4, (int)v24, v5, v6, v15, (int)v24, v17, ((unsigned int)v24 >> 3) - 1, (int)v18, (int)v19, (int)v20, v21, v22, v23, (int)v24, (int)v25, (int)Tag, v27[0], (int)v28, v29, v30); Tag = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( v16, v29, Tag, (const char *)v25, v13); if ( !Tag ) goto LABEL_43; continue; } if ( Tag ) google::protobuf::internal::EpsCopyInputStream::SetLastTag(v25, (unsigned int)v24); else LABEL_43: Tag = 0LL; LABEL_42: google::protobuf::internal::HasBits<1ul>::Or((char *)v18 + 16, (char *)&v24 + 4); return Tag; case 3u: if ( (unsigned __int8)v24 != 26 ) goto LABEL_33; v23 = google::protobuf::SourceCodeInfo_Location::_internal_mutable_leading_comments[abi:cxx11](v18); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v23, Tag, v25); if ( Tag ) continue; goto LABEL_43; case 4u: if ( (unsigned __int8)v24 != 34 ) goto LABEL_33; v22 = google::protobuf::SourceCodeInfo_Location::_internal_mutable_trailing_comments[abi:cxx11](v18); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v22, Tag, v25); if ( Tag ) continue; goto LABEL_43; case 6u: if ( (unsigned __int8)v24 != 50 ) goto LABEL_33; Tag = (google::protobuf::internal *)((char *)Tag - 1); while ( 1 ) { Tag = (google::protobuf::internal *)((char *)Tag + 1); v21 = google::protobuf::SourceCodeInfo_Location::_internal_add_leading_detached_comments[abi:cxx11](v18); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v21, Tag, v25); if ( !Tag ) goto LABEL_43; if ( (google::protobuf::internal::EpsCopyInputStream::DataAvailable(v25, (const char *)Tag) & 1) == 0 || (google::protobuf::internal::ExpectTag<50u>(Tag) & 1) == 0 ) { goto LABEL_3; } } default: goto LABEL_33; } } }
_InternalParse: SUB RSP,0x98 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x54] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x30],RAX LAB_001cb616: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x28] MOV dword ptr [RAX],0x0 ADD RAX,0x4 CMP RAX,RCX MOV qword ptr [RSP + 0x30],RAX JNZ 0x001cb616 JMP 0x001cb636 LAB_001cb636: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x60] CALL 0x001d41f0 XOR AL,0xff TEST AL,0x1 JNZ 0x001cb650 JMP 0x001cb9d4 LAB_001cb650: MOV RDI,qword ptr [RSP + 0x60] LEA RSI,[RSP + 0x50] XOR EDX,EDX CALL 0x001d4220 MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RSP + 0x50] SHR EAX,0x3 DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x18],RCX SUB EAX,0x5 JA 0x001cb8ee MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[0x2f03d4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0xa JNZ 0x001cb6d9 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001dc5c0 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b49e0 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb6d2 JMP 0x001cb6d7 LAB_001cb6d2: JMP 0x001cb9f6 LAB_001cb6d7: JMP 0x001cb71a LAB_001cb6d9: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x8 JNZ 0x001cb713 LEA RDI,[RSP + 0x60] CALL 0x001d4f80 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x0018b510 CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb70c JMP 0x001cb711 LAB_001cb70c: JMP 0x001cb9f6 LAB_001cb711: JMP 0x001cb718 LAB_001cb713: JMP 0x001cb8f0 LAB_001cb718: JMP 0x001cb71a LAB_001cb71a: JMP 0x001cb636 caseD_2: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x12 JNZ 0x001cb764 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001dc5e0 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b49e0 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb75d JMP 0x001cb762 LAB_001cb75d: JMP 0x001cb9f6 LAB_001cb762: JMP 0x001cb7a5 LAB_001cb764: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x10 JNZ 0x001cb79e LEA RDI,[RSP + 0x60] CALL 0x001d4f80 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x001dc600 CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb797 JMP 0x001cb79c LAB_001cb797: JMP 0x001cb9f6 LAB_001cb79c: JMP 0x001cb7a3 LAB_001cb79e: JMP 0x001cb8f0 LAB_001cb7a3: JMP 0x001cb7a5 LAB_001cb7a5: JMP 0x001cb636 caseD_3: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x1a JNZ 0x001cb7f6 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001dc630 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb7ef JMP 0x001cb7f4 LAB_001cb7ef: JMP 0x001cb9f6 LAB_001cb7f4: JMP 0x001cb7fb LAB_001cb7f6: JMP 0x001cb8f0 LAB_001cb7fb: JMP 0x001cb636 caseD_4: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x22 JNZ 0x001cb84c MOV RDI,qword ptr [RSP + 0x20] CALL 0x001dc690 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb845 JMP 0x001cb84a LAB_001cb845: JMP 0x001cb9f6 LAB_001cb84a: JMP 0x001cb851 LAB_001cb84c: JMP 0x001cb8f0 LAB_001cb851: JMP 0x001cb636 caseD_6: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x32 JNZ 0x001cb8e7 MOV RAX,qword ptr [RSP + 0x60] ADD RAX,-0x1 MOV qword ptr [RSP + 0x60],RAX LAB_001cb874: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x60] ADD RAX,0x1 MOV qword ptr [RSP + 0x60],RAX CALL 0x001dc6f0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb8bb JMP 0x001cb8c0 LAB_001cb8bb: JMP 0x001cb9f6 LAB_001cb8c0: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001d4310 TEST AL,0x1 JNZ 0x001cb8d5 JMP 0x001cb8e5 LAB_001cb8d5: JMP 0x001cb8d7 LAB_001cb8d7: MOV RDI,qword ptr [RSP + 0x60] CALL 0x001d4f40 TEST AL,0x1 JNZ 0x001cb874 LAB_001cb8e5: JMP 0x001cb8e9 LAB_001cb8e7: JMP 0x001cb8f0 LAB_001cb8e9: JMP 0x001cb636 caseD_5: JMP 0x001cb8f0 LAB_001cb8f0: CMP dword ptr [RSP + 0x50],0x0 JZ 0x001cb903 MOV EAX,dword ptr [RSP + 0x50] AND EAX,0x7 CMP EAX,0x4 JNZ 0x001cb92c LAB_001cb903: CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb914 JMP 0x001cb919 LAB_001cb914: JMP 0x001cb9f6 LAB_001cb919: MOV RDI,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RSP + 0x50] CALL 0x001d4350 JMP 0x001cb9d6 LAB_001cb92c: MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x8],RCX ADD RAX,0x8 MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001cb98f MOV RDI,qword ptr [RSP + 0x10] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0x78],RAX JMP 0x001cb99e LAB_001cb98f: MOV RDI,qword ptr [RSP + 0x10] CALL 0x001df250 MOV qword ptr [RSP + 0x78],RAX LAB_001cb99e: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] CALL 0x00263b20 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001cb9cd JMP 0x001cb9cf LAB_001cb9cd: JMP 0x001cb9f6 LAB_001cb9cf: JMP 0x001cb636 LAB_001cb9d4: JMP 0x001cb9d6 LAB_001cb9d6: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 LEA RSI,[RSP + 0x54] CALL 0x001d5090 MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x98 RET LAB_001cb9f6: MOV qword ptr [RSP + 0x60],0x0 JMP 0x001cb9d6
/* google::protobuf::SourceCodeInfo_Location::_InternalParse(char const*, google::protobuf::internal::ParseContext*) */ char * __thiscall google::protobuf::SourceCodeInfo_Location::_InternalParse (SourceCodeInfo_Location *this,char *param_1,ParseContext *param_2) { byte bVar1; bool bVar2; int iVar3; void *pvVar4; string *psVar5; ulong uVar6; Container *pCVar7; HasBits *local_68; uint local_48; HasBits local_44 [4]; ParseContext *local_40; char *local_38; SourceCodeInfo_Location *local_30; InternalMetadata *local_28; UnknownFieldSet *local_20; InternalMetadata *local_18; HasBits *local_10; InternalMetadata *local_8; local_68 = local_44; local_40 = param_2; local_38 = param_1; local_30 = this; local_10 = local_68; do { *(int4 *)local_68 = 0; local_68 = local_68 + 4; } while (local_68 != (HasBits *)&local_40); LAB_001cb636: do { bVar1 = internal::ParseContext::Done(local_40,&local_38); if (((bVar1 ^ 0xff) & 1) == 0) goto LAB_001cb9d6; local_38 = (char *)internal::ReadTag(local_38,&local_48,0); switch(local_48 >> 3) { case 1: if ((local_48 & 0xff) == 10) { pvVar4 = (void *)_internal_mutable_path(this); local_38 = (char *)internal::PackedInt32Parser(pvVar4,local_38,local_40); } else { if ((local_48 & 0xff) != 8) goto LAB_001cb8f0; iVar3 = internal::ReadVarint32(&local_38); _internal_add_path(this,iVar3); } break; case 2: if ((local_48 & 0xff) == 0x12) { pvVar4 = (void *)_internal_mutable_span(this); local_38 = (char *)internal::PackedInt32Parser(pvVar4,local_38,local_40); } else { if ((local_48 & 0xff) != 0x10) goto LAB_001cb8f0; iVar3 = internal::ReadVarint32(&local_38); _internal_add_span(this,iVar3); } break; case 3: if ((local_48 & 0xff) != 0x1a) goto LAB_001cb8f0; psVar5 = (string *)_internal_mutable_leading_comments_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar5,local_38,local_40); break; case 4: if ((local_48 & 0xff) != 0x22) goto LAB_001cb8f0; psVar5 = (string *)_internal_mutable_trailing_comments_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar5,local_38,local_40); break; default: goto LAB_001cb8f0; case 6: if ((local_48 & 0xff) == 0x32) { local_38 = local_38 + -1; do { local_38 = local_38 + 1; psVar5 = (string *)_internal_add_leading_detached_comments_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar5,local_38,local_40); if (local_38 == (char *)0x0) goto LAB_001cb9f6; uVar6 = internal::EpsCopyInputStream::DataAvailable ((EpsCopyInputStream *)local_40,local_38); } while (((uVar6 & 1) != 0) && (bVar2 = internal::ExpectTag<50u>(local_38), bVar2)); goto LAB_001cb636; } LAB_001cb8f0: if ((local_48 == 0) || ((local_48 & 7) == 4)) { if (local_38 != (char *)0x0) { internal::EpsCopyInputStream::SetLastTag((EpsCopyInputStream *)local_40,local_48); goto LAB_001cb9d6; } goto LAB_001cb9f6; } uVar6 = (ulong)local_48; local_28 = (InternalMetadata *)(this + 8); local_18 = local_28; local_8 = local_28; if ((*(ulong *)local_28 & 1) == 0) { local_20 = internal::InternalMetadata:: mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(local_28); } else { pCVar7 = internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (local_28); local_20 = (UnknownFieldSet *)(pCVar7 + 8); } local_38 = (char *)internal::UnknownFieldParse(uVar6,local_20,local_38,local_40); } if (local_38 == (char *)0x0) { LAB_001cb9f6: local_38 = (char *)0x0; LAB_001cb9d6: internal::HasBits<1ul>::Or((HasBits<1ul> *)(this + 0x10),local_44); return local_38; } } while( true ); }
50,439
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x626f0 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x62710 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x620c9 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x620d7 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x62128 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x61ad0 cmpl $0x0, %eax jne 0x6211b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2cceb(%rip), %rdx # 0x8edf8 callq 0x62740 movb $0x1, -0x1(%rbp) jmp 0x62248 movq -0x20(%rbp), %rdi callq 0x626f0 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x621a4 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0x62260 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0x62800 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x621fb movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x621b6 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x5ffc0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0x62800 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x62225 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2cbe0(%rip), %rdx # 0x8edf8 callq 0x62740 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x62248 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x62a00 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_620C9 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_620D7 loc_620C9: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_62128 loc_620D7: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_6211B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_62248 loc_6211B: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_62128: cmp [rbp+var_40], 2 jb short loc_621A4 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_621FB loc_621A4: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_621B6: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_621FB: cmp [rbp+var_49], 0 jz short loc_62225 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_62248 loc_62225: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_62248: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001626f0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00162710 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x001620c9 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x001620d7 LAB_001620c9: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x00162128 LAB_001620d7: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x00161ad0 CMP EAX,0x0 JNZ 0x0016211b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x18edf8] CALL 0x00162740 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00162248 LAB_0016211b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001626f0 MOV qword ptr [RBP + -0x38],RAX LAB_00162128: CMP qword ptr [RBP + -0x40],0x2 JC 0x001621a4 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x00162260 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x00162800 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x001621fb LAB_001621a4: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x001621b6 LAB_001621b6: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x0015ffc0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x00162800 MOV byte ptr [RBP + -0x49],AL LAB_001621fb: CMP byte ptr [RBP + -0x49],0x0 JZ 0x00162225 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x18edf8] CALL 0x00162740 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x00162248 LAB_00162225: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x00162a00 MOV byte ptr [RBP + -0x1],AL LAB_00162248: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_00162248; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_00162248: return CONCAT71(uVar4,local_9); }
50,440
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); }
O0
c
my_write: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) jmp 0x83019 movl $0x0, -0x3c(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax jne 0x83048 leaq 0x37562b(%rip), %rax # 0x3f8668 movq (%rax), %rax orq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x83079 jmp 0x8306c movq $0x0, -0x8(%rbp) jmp 0x83223 jmp 0x8307b movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x28110 movq %rax, -0x30(%rbp) jmp 0x83091 movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x830a0 jmp 0x831fb cmpq $-0x1, -0x30(%rbp) je 0x830ce movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) callq 0x28040 movl (%rax), %eax movl %eax, -0x40(%rbp) callq 0x82360 movl -0x40(%rbp), %ecx movl %ecx, (%rax) jmp 0x830e4 callq 0x82360 movl 0xe0(%rax), %eax cmpl $0x0, %eax je 0x83106 movabsq $0xffffffdf, %rax # imm = 0xFFFFFFDF andq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) callq 0x82360 cmpl $0x1c, (%rax) je 0x8311a callq 0x82360 cmpl $0x7a, (%rax) jne 0x83149 movq -0x28(%rbp), %rax andq $0x20, %rax cmpq $0x0, %rax je 0x83149 movl -0xc(%rbp), %edi callq 0x8b160 movq %rax, %rdi movl -0x3c(%rbp), %esi callq 0x8a8b0 movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x8307b cmpq $0x0, -0x30(%rbp) je 0x83157 cmpq $-0x1, -0x30(%rbp) jne 0x83193 callq 0x82360 cmpl $0x4, (%rax) jne 0x8316a jmp 0x83163 jmp 0x83165 jmp 0x8307b cmpq $0x0, -0x30(%rbp) jne 0x83191 movl -0x3c(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x3c(%rbp) cmpl $0x0, %eax jne 0x83191 callq 0x28040 movl $0x1b, (%rax) jmp 0x8307b jmp 0x83198 jmp 0x8307b movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x831f9 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0x831ed movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x50(%rbp) movl -0xc(%rbp), %edi callq 0x8b160 movq %rax, -0x48(%rbp) callq 0x82360 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx movl (%rax), %ecx movl $0x3, %edi movb $0x0, %al callq 0x7bff0 jmp 0x831ef movq $-0x1, -0x8(%rbp) jmp 0x83223 jmp 0x831fb movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x83215 jmp 0x8320b movq $0x0, -0x8(%rbp) jmp 0x83223 jmp 0x83217 movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_write: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx jmp short $+2 loc_83019: mov [rbp+var_3C], 0 mov [rbp+var_38], 0 mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jnz short loc_83048 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_28] mov [rbp+var_28], rax loc_83048: cmp [rbp+var_20], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_83079 jmp short $+2 loc_8306C: mov [rbp+var_8], 0 jmp loc_83223 loc_83079: jmp short $+2 loc_8307B: mov edi, [rbp+var_C] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _write mov [rbp+var_30], rax jmp short $+2 loc_83091: mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnz short loc_830A0 jmp loc_831FB loc_830A0: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_830CE mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_830CE: call ___errno_location mov eax, [rax] mov [rbp+var_40], eax call _my_thread_var mov ecx, [rbp+var_40] mov [rax], ecx jmp short $+2 loc_830E4: call _my_thread_var mov eax, [rax+0E0h] cmp eax, 0 jz short loc_83106 mov rax, 0FFFFFFDFh and rax, [rbp+var_28] mov [rbp+var_28], rax loc_83106: call _my_thread_var cmp dword ptr [rax], 1Ch jz short loc_8311A call _my_thread_var cmp dword ptr [rax], 7Ah ; 'z' jnz short loc_83149 loc_8311A: mov rax, [rbp+var_28] and rax, 20h cmp rax, 0 jz short loc_83149 mov edi, [rbp+var_C] call my_filename mov rdi, rax mov esi, [rbp+var_3C] call wait_for_free_space mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp loc_8307B loc_83149: cmp [rbp+var_30], 0 jz short loc_83157 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_83193 loc_83157: call _my_thread_var cmp dword ptr [rax], 4 jnz short loc_8316A jmp short $+2 loc_83163: jmp short $+2 loc_83165: jmp loc_8307B loc_8316A: cmp [rbp+var_30], 0 jnz short loc_83191 mov eax, [rbp+var_3C] mov ecx, eax add ecx, 1 mov [rbp+var_3C], ecx cmp eax, 0 jnz short loc_83191 call ___errno_location mov dword ptr [rax], 1Bh jmp loc_8307B loc_83191: jmp short loc_83198 loc_83193: jmp loc_8307B loc_83198: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_831F9 mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz short loc_831ED mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_50], rax mov edi, [rbp+var_C] call my_filename mov [rbp+var_48], rax call _my_thread_var mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] mov ecx, [rax] mov edi, 3 mov al, 0 call my_error loc_831ED: jmp short $+2 loc_831EF: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_83223 loc_831F9: jmp short $+2 loc_831FB: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_83215 jmp short $+2 loc_8320B: mov [rbp+var_8], 0 jmp short loc_83223 loc_83215: jmp short $+2 loc_83217: mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_8], rax loc_83223: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_write(unsigned int a1, const char *a2, long long a3, __int16 a4) { const char *v4; // rsi long long v5; // rax unsigned int *v7; // rax long long v9; // [rsp+8h] [rbp-48h] int v10; // [rsp+10h] [rbp-40h] unsigned int v11; // [rsp+14h] [rbp-3Ch] long long v12; // [rsp+18h] [rbp-38h] long long v13; // [rsp+20h] [rbp-30h] __int16 v14; // [rsp+28h] [rbp-28h] long long v15; // [rsp+30h] [rbp-20h] v15 = a3; v14 = a4; v11 = 0; v12 = 0LL; if ( (a4 & 0x1A) == 0 ) v14 = a4 | my_global_flags; if ( !a3 ) return 0LL; while ( 1 ) { do { while ( 1 ) { v4 = a2; v13 = write(a1, a2, v15); if ( v13 == v15 ) goto LABEL_26; if ( v13 != -1 ) { v12 += v13; a2 += v13; v15 -= v13; } v10 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, v4) = v10; if ( *(_DWORD *)(my_thread_var(a1, v4) + 224) ) v14 &= ~0x20u; if ( *(_DWORD *)my_thread_var(a1, v4) != 28 && *(_DWORD *)my_thread_var(a1, v4) != 122 || (v14 & 0x20) == 0 ) break; v5 = my_filename(a1); wait_for_free_space(v5, v11++); } } while ( v13 && v13 != -1 || *(_DWORD *)my_thread_var(a1, v4) == 4 ); if ( v13 ) break; if ( v11++ ) break; *(_DWORD *)__errno_location() = 27; } if ( (v14 & 6) == 0 ) { LABEL_26: if ( (v14 & 6) != 0 ) return 0LL; else return v12 + v13; } if ( (v14 & 0x1A) != 0 ) { v9 = my_filename(a1); v7 = (unsigned int *)my_thread_var(a1, v4); my_error(3u, v14 & 0x440 | 4LL, v9, *v7); } return -1LL; }
my_write: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX JMP 0x00183019 LAB_00183019: MOV dword ptr [RBP + -0x3c],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JNZ 0x00183048 LEA RAX,[0x4f8668] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_00183048: CMP qword ptr [RBP + -0x20],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00183079 JMP 0x0018306c LAB_0018306c: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00183223 LAB_00183079: JMP 0x0018307b LAB_0018307b: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00128110 MOV qword ptr [RBP + -0x30],RAX JMP 0x00183091 LAB_00183091: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001830a0 JMP 0x001831fb LAB_001830a0: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x001830ce MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001830ce: CALL 0x00128040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX CALL 0x00182360 MOV ECX,dword ptr [RBP + -0x40] MOV dword ptr [RAX],ECX JMP 0x001830e4 LAB_001830e4: CALL 0x00182360 MOV EAX,dword ptr [RAX + 0xe0] CMP EAX,0x0 JZ 0x00183106 MOV RAX,0xffffffdf AND RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_00183106: CALL 0x00182360 CMP dword ptr [RAX],0x1c JZ 0x0018311a CALL 0x00182360 CMP dword ptr [RAX],0x7a JNZ 0x00183149 LAB_0018311a: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x20 CMP RAX,0x0 JZ 0x00183149 MOV EDI,dword ptr [RBP + -0xc] CALL 0x0018b160 MOV RDI,RAX MOV ESI,dword ptr [RBP + -0x3c] CALL 0x0018a8b0 MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0018307b LAB_00183149: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00183157 CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x00183193 LAB_00183157: CALL 0x00182360 CMP dword ptr [RAX],0x4 JNZ 0x0018316a JMP 0x00183163 LAB_00183163: JMP 0x00183165 LAB_00183165: JMP 0x0018307b LAB_0018316a: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00183191 MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x3c],ECX CMP EAX,0x0 JNZ 0x00183191 CALL 0x00128040 MOV dword ptr [RAX],0x1b JMP 0x0018307b LAB_00183191: JMP 0x00183198 LAB_00183193: JMP 0x0018307b LAB_00183198: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001831f9 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x001831ed MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x0018b160 MOV qword ptr [RBP + -0x48],RAX CALL 0x00182360 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX] MOV EDI,0x3 MOV AL,0x0 CALL 0x0017bff0 LAB_001831ed: JMP 0x001831ef LAB_001831ef: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00183223 LAB_001831f9: JMP 0x001831fb LAB_001831fb: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00183215 JMP 0x0018320b LAB_0018320b: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00183223 LAB_00183215: JMP 0x00183217 LAB_00183217: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00183223: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; size_t sVar2; int *piVar3; long lVar4; int8 uVar5; int4 *puVar6; int local_44; long local_40; ulong local_30; size_t local_28; void *local_20; long local_10; local_44 = 0; local_40 = 0; local_30 = param_4; if ((param_4 & 0x1a) == 0) { local_30 = my_global_flags | param_4; } local_28 = param_3; local_20 = param_2; if (param_3 == 0) { local_10 = 0; } else { while (sVar2 = write(param_1,local_20,local_28), sVar2 != local_28) { if (sVar2 != 0xffffffffffffffff) { local_40 = sVar2 + local_40; local_20 = (void *)(sVar2 + (long)local_20); local_28 = local_28 - sVar2; } piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; lVar4 = _my_thread_var(); if (*(int *)(lVar4 + 0xe0) != 0) { local_30 = local_30 & 0xffffffdf; } piVar3 = (int *)_my_thread_var(); if (((*piVar3 == 0x1c) || (piVar3 = (int *)_my_thread_var(), *piVar3 == 0x7a)) && ((local_30 & 0x20) != 0)) { uVar5 = my_filename(param_1); wait_for_free_space(uVar5,local_44); local_44 = local_44 + 1; } else if (((sVar2 == 0) || (sVar2 == 0xffffffffffffffff)) && (piVar3 = (int *)_my_thread_var(), *piVar3 != 4)) { if ((sVar2 != 0) || (local_44 != 0)) { if ((local_30 & 6) != 0) { if ((local_30 & 0x1a) != 0) { uVar5 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); my_error(3,local_30 & 0x440 | 4,uVar5,*puVar6); } return -1; } break; } piVar3 = __errno_location(); *piVar3 = 0x1b; local_44 = local_44 + 1; } } if ((local_30 & 6) == 0) { local_10 = sVar2 + local_40; } else { local_10 = 0; } } return local_10; }
50,441
LefDefParser::defwPinAntennaPinGateArea(int, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwPinAntennaPinGateArea(int value, const char *layerName) { if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PIN) return DEFW_BAD_ORDER; if (defVersionNum < 5.4) return DEFW_WRONG_VERSION; fprintf(defwFile, "\n + ANTENNAPINGATEAREA %d", value); if (layerName) fprintf(defwFile, " LAYER %s", layerName); defwLines++; return DEFW_OK; }
O0
cpp
LefDefParser::defwPinAntennaPinGateArea(int, char const*): subq $0x18, %rsp movl %edi, 0x10(%rsp) movq %rsi, 0x8(%rsp) leaq 0x143c4(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x16da7 movl $0x1, 0x14(%rsp) jmp 0x16e37 leaq 0x143b6(%rip), %rax # 0x2b164 cmpl $0x25, (%rax) je 0x16dbd movl $0x2, 0x14(%rsp) jmp 0x16e37 movsd 0xc56b(%rip), %xmm0 # 0x23330 ucomisd 0x142e3(%rip), %xmm0 # 0x2b0b0 jbe 0x16dd9 movl $0x5, 0x14(%rsp) jmp 0x16e37 leaq 0x14378(%rip), %rax # 0x2b158 movq (%rax), %rdi movl 0x10(%rsp), %edx leaq 0xdb3b(%rip), %rsi # 0x24929 movb $0x0, %al callq 0x10f0 cmpq $0x0, 0x8(%rsp) je 0x16e1a leaq 0x14354(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0xe1ff(%rip), %rsi # 0x25012 movb $0x0, %al callq 0x10f0 leaq 0x1433f(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x14333(%rip), %rax # 0x2b160 movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq
_ZN12LefDefParser25defwPinAntennaPinGateAreaEiPKc: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_10], rsi lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_16DA7 mov [rsp+18h+var_4], 1 jmp loc_16E37 loc_16DA7: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 25h ; '%' jz short loc_16DBD mov [rsp+18h+var_4], 2 jmp short loc_16E37 loc_16DBD: movsd xmm0, cs:qword_23330 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum jbe short loc_16DD9 mov [rsp+18h+var_4], 5 jmp short loc_16E37 loc_16DD9: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov edx, [rsp+18h+var_8] lea rsi, aAntennapingate; "\n + ANTENNAPINGATEAREA %d" mov al, 0 call _fprintf cmp [rsp+18h+var_10], 0 jz short loc_16E1A lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aLayerS_1+4; " LAYER %s" mov al, 0 call _fprintf loc_16E1A: lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_16E37: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwPinAntennaPinGateArea(LefDefParser *this, const char *a2, const char *a3) { if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 37 ) { if ( *(double *)&LefDefParser::defVersionNum >= 5.4 ) { fprintf(LefDefParser::defwFile, "\n + ANTENNAPINGATEAREA %d", (_DWORD)this); if ( a2 ) fprintf(LefDefParser::defwFile, " LAYER %s", a2); ++LefDefParser::defwLines; return 0; } else { return 5; } } else { return 2; } } else { return 1; } }
defwPinAntennaPinGateArea: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV qword ptr [RSP + 0x8],RSI LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x00116da7 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00116e37 LAB_00116da7: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x25 JZ 0x00116dbd MOV dword ptr [RSP + 0x14],0x2 JMP 0x00116e37 LAB_00116dbd: MOVSD XMM0,qword ptr [0x00123330] UCOMISD XMM0,qword ptr [0x0012b0b0] JBE 0x00116dd9 MOV dword ptr [RSP + 0x14],0x5 JMP 0x00116e37 LAB_00116dd9: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x10] LEA RSI,[0x124929] MOV AL,0x0 CALL 0x001010f0 CMP qword ptr [RSP + 0x8],0x0 JZ 0x00116e1a LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x125012] MOV AL,0x0 CALL 0x001010f0 LAB_00116e1a: LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_00116e37: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwPinAntennaPinGateArea(int, char const*) */ int4 LefDefParser::defwPinAntennaPinGateArea(int param_1,char *param_2) { int4 local_4; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwState == 0x25) { if (DAT_00123330 <= defVersionNum) { fprintf(defwFile,"\n + ANTENNAPINGATEAREA %d",(ulong)(uint)param_1); if (param_2 != (char *)0x0) { fprintf(defwFile," LAYER %s",param_2); } defwLines = defwLines + 1; local_4 = 0; } else { local_4 = 5; } } else { local_4 = 2; } return local_4; }
50,442
JS_GetTypedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
JSValue JS_GetTypedArrayBuffer(JSContext *ctx, JSValue obj, size_t *pbyte_offset, size_t *pbyte_length, size_t *pbytes_per_element) { JSObject *p; JSTypedArray *ta; p = get_typed_array(ctx, obj); if (!p) return JS_EXCEPTION; if (typed_array_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; if (pbyte_offset) *pbyte_offset = ta->offset; if (pbyte_length) *pbyte_length = ta->length; if (pbytes_per_element) { *pbytes_per_element = 1 << typed_array_size_log2(p->class_id); } return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer)); }
O0
c
JS_GetTypedArrayBuffer: subq $0x68, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x30(%rsp) movq %r9, 0x28(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x5ec30 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x5eb49 movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) jmp 0x5ec17 movq 0x20(%rsp), %rdi callq 0x5ecc0 cmpl $0x0, %eax je 0x5eb71 movq 0x40(%rsp), %rdi callq 0x5edd0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) jmp 0x5ec17 movq 0x20(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x18(%rsp) cmpq $0x0, 0x38(%rsp) je 0x5eb99 movq 0x18(%rsp), %rax movl 0x20(%rax), %eax movl %eax, %ecx movq 0x38(%rsp), %rax movq %rcx, (%rax) cmpq $0x0, 0x30(%rsp) je 0x5ebb3 movq 0x18(%rsp), %rax movl 0x24(%rax), %eax movl %eax, %ecx movq 0x30(%rsp), %rax movq %rcx, (%rax) cmpq $0x0, 0x28(%rsp) je 0x5ebe7 movq 0x20(%rsp), %rax movzwl 0x6(%rax), %eax subl $0x15, %eax movslq %eax, %rcx leaq 0xb401e(%rip), %rax # 0x112bef movzbl (%rax,%rcx), %ecx movl $0x1, %eax shll %cl, %eax movslq %eax, %rcx movq 0x28(%rsp), %rax movq %rcx, (%rax) movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x8(%rsp) movq $-0x1, 0x10(%rsp) movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x279c0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
JS_GetTypedArrayBuffer: sub rsp, 68h mov [rsp+68h+var_20], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_28], rdi mov [rsp+68h+var_30], rcx mov [rsp+68h+var_38], r8 mov [rsp+68h+var_40], r9 mov rdi, [rsp+68h+var_28] mov rsi, [rsp+68h+var_20] mov rdx, [rsp+68h+var_18] call get_typed_array mov [rsp+68h+var_48], rax cmp [rsp+68h+var_48], 0 jnz short loc_5EB49 mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 6 jmp loc_5EC17 loc_5EB49: mov rdi, [rsp+68h+var_48] call typed_array_is_oob cmp eax, 0 jz short loc_5EB71 mov rdi, [rsp+68h+var_28] call JS_ThrowTypeErrorArrayBufferOOB mov [rsp+68h+var_10], rax mov [rsp+68h+var_8], rdx jmp loc_5EC17 loc_5EB71: mov rax, [rsp+68h+var_48] mov rax, [rax+30h] mov [rsp+68h+var_50], rax cmp [rsp+68h+var_30], 0 jz short loc_5EB99 mov rax, [rsp+68h+var_50] mov eax, [rax+20h] mov ecx, eax mov rax, [rsp+68h+var_30] mov [rax], rcx loc_5EB99: cmp [rsp+68h+var_38], 0 jz short loc_5EBB3 mov rax, [rsp+68h+var_50] mov eax, [rax+24h] mov ecx, eax mov rax, [rsp+68h+var_38] mov [rax], rcx loc_5EBB3: cmp [rsp+68h+var_40], 0 jz short loc_5EBE7 mov rax, [rsp+68h+var_48] movzx eax, word ptr [rax+6] sub eax, 15h movsxd rcx, eax lea rax, typed_array_size_log2 movzx ecx, byte ptr [rax+rcx] mov eax, 1 shl eax, cl movsxd rcx, eax mov rax, [rsp+68h+var_40] mov [rax], rcx loc_5EBE7: mov rax, [rsp+68h+var_50] mov rax, [rax+18h] mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], 0FFFFFFFFFFFFFFFFh mov rdi, [rsp+68h+var_60] mov rsi, [rsp+68h+var_58] call js_dup mov [rsp+68h+var_10], rax mov [rsp+68h+var_8], rdx loc_5EC17: mov rax, [rsp+68h+var_10] mov rdx, [rsp+68h+var_8] add rsp, 68h retn
_DWORD * JS_GetTypedArrayBuffer(long long a1, long long a2, long long a3, _QWORD *a4, _QWORD *a5, _QWORD *a6) { long long v7; // [rsp+18h] [rbp-50h] long long typed_array; // [rsp+20h] [rbp-48h] long long v12; // [rsp+58h] [rbp-10h] typed_array = get_typed_array(a1, a2, a3); if ( typed_array ) { if ( (unsigned int)typed_array_is_oob(typed_array) ) { return (_DWORD *)JS_ThrowTypeErrorArrayBufferOOB(a1); } else { v7 = *(_QWORD *)(typed_array + 48); if ( a4 ) *a4 = *(unsigned int *)(v7 + 32); if ( a5 ) *a5 = *(unsigned int *)(v7 + 36); if ( a6 ) *a6 = 1 << typed_array_size_log2[*(unsigned __int16 *)(typed_array + 6) - 21]; return js_dup(*(_DWORD **)(v7 + 24), 0xFFFFFFFF); } } else { LODWORD(v12) = 0; } return (_DWORD *)v12; }
JS_GetTypedArrayBuffer: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],R9 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x0015ec30 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0015eb49 MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 JMP 0x0015ec17 LAB_0015eb49: MOV RDI,qword ptr [RSP + 0x20] CALL 0x0015ecc0 CMP EAX,0x0 JZ 0x0015eb71 MOV RDI,qword ptr [RSP + 0x40] CALL 0x0015edd0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX JMP 0x0015ec17 LAB_0015eb71: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x38],0x0 JZ 0x0015eb99 MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x20] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX LAB_0015eb99: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0015ebb3 MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x24] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX LAB_0015ebb3: CMP qword ptr [RSP + 0x28],0x0 JZ 0x0015ebe7 MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,word ptr [RAX + 0x6] SUB EAX,0x15 MOVSXD RCX,EAX LEA RAX,[0x212bef] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV EAX,0x1 SHL EAX,CL MOVSXD RCX,EAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX LAB_0015ebe7: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],-0x1 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001279c0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX LAB_0015ec17: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] JS_GetTypedArrayBuffer (int8 param_1,int8 param_2,int8 param_3,ulong *param_4,ulong *param_5, long *param_6) { long lVar1; int iVar2; long lVar3; int1 auVar4 [16]; int4 local_10; int4 uStack_c; int8 local_8; lVar3 = get_typed_array(param_1,param_2,param_3); if (lVar3 == 0) { local_10 = 0; local_8 = 6; } else { iVar2 = typed_array_is_oob(lVar3); if (iVar2 == 0) { lVar1 = *(long *)(lVar3 + 0x30); if (param_4 != (ulong *)0x0) { *param_4 = (ulong)*(uint *)(lVar1 + 0x20); } if (param_5 != (ulong *)0x0) { *param_5 = (ulong)*(uint *)(lVar1 + 0x24); } if (param_6 != (long *)0x0) { *param_6 = (long)(1 << ((&typed_array_size_log2)[(int)(*(ushort *)(lVar3 + 6) - 0x15)] & 0x1f)); } auVar4 = js_dup(*(int8 *)(lVar1 + 0x18),0xffffffffffffffff); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } else { auVar4 = JS_ThrowTypeErrorArrayBufferOOB(param_1); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } } auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
50,443
getopt_ll_limit_value
eloqsql/mysys/my_getopt.c
longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, my_bool *fix) { longlong old= num; my_bool adjusted= FALSE; char buf1[255], buf2[255]; ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L); DBUG_ENTER("getopt_ll_limit_value"); if (num > 0 && ((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_INT: if (num > (longlong) INT_MAX) { num= ((longlong) INT_MAX); adjusted= TRUE; } break; case GET_LONG: #if SIZEOF_LONG < SIZEOF_LONG_LONG if (num > (longlong) LONG_MAX) { num= ((longlong) LONG_MAX); adjusted= TRUE; } #endif break; default: DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL); break; } num= (num / block_size); num= (longlong) (num * block_size); if (num < optp->min_value) { num= optp->min_value; if (old < optp->min_value) adjusted= TRUE; } if (fix) *fix= old != num; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': signed value %s adjusted to %s", optp->name, llstr(old, buf1), llstr(num, buf2)); DBUG_RETURN(num); }
O3
c
getopt_ll_limit_value: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rdx, %rcx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq 0x60(%rsi), %r10 cmpq $0x1, %r10 adcq $0x0, %r10 testq %rdi, %rdi jle 0x9ad20 movq 0x50(%rsi), %rax cmpq %rdi, %rax setae %dl testq %rax, %rax sete %r9b orb %dl, %r9b cmovneq %rdi, %rax jmp 0x9ad26 movb $0x1, %r9b movq %rdi, %rax movl 0x30(%rsi), %edx andl $0x3f, %edx cmpl $0x3, %edx setne %dl movl $0x80000000, %r8d # imm = 0x80000000 cmpq %r8, %rax setl %r11b orb %dl, %r11b movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF cmovneq %rax, %r8 movq %r8, %rax xorl %edx, %edx divq %r10 subq %rdx, %r8 movq 0x48(%rsi), %rax cmpq %rax, %r8 movq %rax, %rbx cmovgq %r8, %rbx testq %rcx, %rcx je 0x9ad72 cmpq %rdi, %rbx setne (%rcx) jmp 0x9adcd cmpq %rax, %r8 setge %cl cmpq %rdi, %rax setle %al orb %cl, %al andb %r11b, %al testb %r9b, %al jne 0x9adcd leaq 0x34a4b1(%rip), %rax # 0x3e5240 movq (%rax), %r12 movq (%rsi), %r14 leaq -0x130(%rbp), %rsi callq 0xecde0 movq %rax, %r15 leaq -0x230(%rbp), %rsi movq %rbx, %rdi callq 0xecde0 leaq 0x77f8e(%rip), %rsi # 0x112d48 movl $0x1, %edi movq %r14, %rdx movq %r15, %rcx movq %rax, %r8 xorl %eax, %eax callq *%r12 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x9adef movq %rbx, %rax addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x5f320
getopt_ll_limit_value: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 210h mov rcx, rdx mov rax, fs:28h mov [rbp+var_28], rax mov r10, [rsi+60h] cmp r10, 1 adc r10, 0 test rdi, rdi jle short loc_9AD20 mov rax, [rsi+50h] cmp rax, rdi setnb dl test rax, rax setz r9b or r9b, dl cmovnz rax, rdi jmp short loc_9AD26 loc_9AD20: mov r9b, 1 mov rax, rdi loc_9AD26: mov edx, [rsi+30h] and edx, 3Fh cmp edx, 3 setnz dl mov r8d, 80000000h cmp rax, r8 setl r11b or r11b, dl mov r8d, 7FFFFFFFh cmovnz r8, rax mov rax, r8 xor edx, edx div r10 sub r8, rdx mov rax, [rsi+48h] cmp r8, rax mov rbx, rax cmovg rbx, r8 test rcx, rcx jz short loc_9AD72 cmp rbx, rdi setnz byte ptr [rcx] jmp short loc_9ADCD loc_9AD72: cmp r8, rax setnl cl cmp rax, rdi setle al or al, cl and al, r11b test al, r9b jnz short loc_9ADCD lea rax, my_getopt_error_reporter mov r12, [rax] mov r14, [rsi] lea rsi, [rbp+var_130] call llstr mov r15, rax lea rsi, [rbp+var_230] mov rdi, rbx call llstr lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"... mov edi, 1 mov rdx, r14 mov rcx, r15 mov r8, rax xor eax, eax call r12 loc_9ADCD: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_9ADEF mov rax, rbx add rsp, 210h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9ADEF: call ___stack_chk_fail
long long getopt_ll_limit_value(long long a1, long long a2, bool *a3) { long long v3; // rax bool v4; // r9 bool v5; // r11 unsigned long long v6; // r8 signed long long v7; // r8 long long v8; // rax long long v9; // rbx long long (*v10)(int, const char *, ...); // r12 const char *v11; // r14 const char *v12; // r15 const char *v13; // rax char v15[256]; // [rsp+0h] [rbp-230h] BYREF char v16[264]; // [rsp+100h] [rbp-130h] BYREF unsigned long long v17; // [rsp+208h] [rbp-28h] v17 = __readfsqword(0x28u); if ( a1 <= 0 ) { v4 = 1; v3 = a1; } else { v3 = *(_QWORD *)(a2 + 80); v4 = v3 >= (unsigned long long)a1 || v3 == 0; if ( v4 ) v3 = a1; } v5 = (*(_DWORD *)(a2 + 48) & 0x3F) != 3 || v3 < 0x80000000LL; v6 = 0x7FFFFFFFLL; if ( v5 ) v6 = v3; v7 = v6 - v6 % ((unsigned long long)(*(_QWORD *)(a2 + 96) == 0LL) + *(_QWORD *)(a2 + 96)); v8 = *(_QWORD *)(a2 + 72); v9 = v8; if ( v7 > v8 ) v9 = v7; if ( a3 ) { *a3 = v9 != a1; } else if ( !v4 || !v5 || v7 < v8 && v8 > a1 ) { v10 = my_getopt_error_reporter; v11 = *(const char **)a2; v12 = (const char *)llstr(a1, v16); v13 = (const char *)llstr(v9, v15); v10(1, "option '%s': signed value %s adjusted to %s", v11, v12, v13); } return v9; }
getopt_ll_limit_value: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x210 MOV RCX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV R10,qword ptr [RSI + 0x60] CMP R10,0x1 ADC R10,0x0 TEST RDI,RDI JLE 0x0019ad20 MOV RAX,qword ptr [RSI + 0x50] CMP RAX,RDI SETNC DL TEST RAX,RAX SETZ R9B OR R9B,DL CMOVNZ RAX,RDI JMP 0x0019ad26 LAB_0019ad20: MOV R9B,0x1 MOV RAX,RDI LAB_0019ad26: MOV EDX,dword ptr [RSI + 0x30] AND EDX,0x3f CMP EDX,0x3 SETNZ DL MOV R8D,0x80000000 CMP RAX,R8 SETL R11B OR R11B,DL MOV R8D,0x7fffffff CMOVNZ R8,RAX MOV RAX,R8 XOR EDX,EDX DIV R10 SUB R8,RDX MOV RAX,qword ptr [RSI + 0x48] CMP R8,RAX MOV RBX,RAX CMOVG RBX,R8 TEST RCX,RCX JZ 0x0019ad72 CMP RBX,RDI SETNZ byte ptr [RCX] JMP 0x0019adcd LAB_0019ad72: CMP R8,RAX SETGE CL CMP RAX,RDI SETLE AL OR AL,CL AND AL,R11B TEST AL,R9B JNZ 0x0019adcd LEA RAX,[0x4e5240] MOV R12,qword ptr [RAX] MOV R14,qword ptr [RSI] LEA RSI,[RBP + -0x130] CALL 0x001ecde0 MOV R15,RAX LEA RSI,[RBP + -0x230] MOV RDI,RBX CALL 0x001ecde0 LEA RSI,[0x212d48] MOV EDI,0x1 MOV RDX,R14 MOV RCX,R15 MOV R8,RAX XOR EAX,EAX CALL R12 LAB_0019adcd: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0019adef MOV RAX,RBX ADD RSP,0x210 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0019adef: CALL 0x0015f320
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3) { ulong uVar1; int8 uVar2; int *puVar3; ulong uVar4; int8 uVar5; int8 uVar6; ulong uVar7; ulong uVar8; bool bVar9; long in_FS_OFFSET; bool bVar10; int1 local_238 [256]; int1 local_138 [264]; long local_30; puVar3 = my_getopt_error_reporter; local_30 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_1 < 1) { bVar9 = true; uVar4 = param_1; } else { uVar4 = param_2[10]; bVar9 = uVar4 == 0 || param_1 <= uVar4; if (uVar4 == 0 || param_1 <= uVar4) { uVar4 = param_1; } } bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 3; uVar8 = 0x7fffffff; if ((long)uVar4 < 0x80000000 || bVar10) { uVar8 = uVar4; } uVar8 = uVar8 - uVar8 % (param_2[0xc] + (ulong)(param_2[0xc] == 0)); uVar1 = param_2[9]; uVar7 = uVar1; if ((long)uVar1 < (long)uVar8) { uVar7 = uVar8; } if (param_3 == 0) { if (!(bool)((((long)uVar1 <= (long)param_1 || (long)uVar1 <= (long)uVar8) && ((long)uVar4 < 0x80000000 || bVar10)) & bVar9)) { uVar2 = *param_2; uVar5 = llstr(param_1,local_138); uVar6 = llstr(uVar7,local_238); (*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar2,uVar5,uVar6); } } else { *(bool *)param_3 = uVar7 != param_1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar7; }
50,444
minja::FilterTemplateToken::~FilterTemplateToken()
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O1
cpp
minja::FilterTemplateToken::~FilterTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x6fd8b(%rip), %rax # 0xedfc8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x7e252 callq 0x42d00 leaq 0x6f20f(%rip), %rax # 0xed468 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x7e26f popq %rbx jmp 0x42d00 popq %rbx retq nop
_ZN5minja19FilterTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_7E252 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7E252: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_7E26F pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7E26F: pop rbx retn
void minja::FilterTemplateToken::~FilterTemplateToken(minja::FilterTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::FilterTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~FilterTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1edfc8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0017e252 CALL 0x00142d00 LAB_0017e252: LEA RAX,[0x1ed468] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0017e26f POP RBX JMP 0x00142d00 LAB_0017e26f: POP RBX RET
/* minja::FilterTemplateToken::~FilterTemplateToken() */ void __thiscall minja::FilterTemplateToken::~FilterTemplateToken(FilterTemplateToken *this) { *(int ***)this = &PTR__FilterTemplateToken_001edfd8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_001ed478; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
50,445
fill_and_get_bits
eloqsql/storage/maria/ma_packrec.c
static uint fill_and_get_bits(MARIA_BIT_BUFF *bit_buff, uint count) { uint tmp; count-=bit_buff->bits; tmp=(bit_buff->current_byte & mask[bit_buff->bits]) << count; fill_buffer(bit_buff); bit_buff->bits=BITS_SAVED - count; return tmp+(bit_buff->current_byte >> (BITS_SAVED - count)); }
O0
c
fill_and_get_bits: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %ecx movl -0xc(%rbp), %eax subl %ecx, %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x4(%rcx), %ecx movl %ecx, %edx leaq 0x28446c(%rip), %rcx # 0x2bd2e0 andl (%rcx,%rdx,4), %eax movl -0xc(%rbp), %ecx shll %cl, %eax movl %eax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0x39690 movl $0x20, %ecx subl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rcx movl (%rcx), %edx movl $0x20, %ecx subl -0xc(%rbp), %ecx shrl %cl, %edx movl %edx, %ecx addl %ecx, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
fill_and_get_bits: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov ecx, [rax+4] mov eax, [rbp+var_C] sub eax, ecx mov [rbp+var_C], eax mov rax, [rbp+var_8] mov eax, [rax] mov rcx, [rbp+var_8] mov ecx, [rcx+4] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov ecx, [rbp+var_C] shl eax, cl mov [rbp+var_10], eax mov rdi, [rbp+var_8] call fill_buffer mov ecx, 20h ; ' ' sub ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+4], ecx mov eax, [rbp+var_10] mov rcx, [rbp+var_8] mov edx, [rcx] mov ecx, 20h ; ' ' sub ecx, [rbp+var_C] shr edx, cl mov ecx, edx add eax, ecx add rsp, 10h pop rbp retn
long long fill_and_get_bits(_DWORD *a1, int a2) { int v3; // [rsp+0h] [rbp-10h] int v4; // [rsp+4h] [rbp-Ch] v4 = a2 - a1[1]; v3 = (mask[a1[1]] & *a1) << v4; fill_buffer(a1); a1[1] = 32 - v4; return (unsigned int)((*a1 >> (32 - v4)) + v3); }
fill_and_get_bits: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x4] MOV EAX,dword ptr [RBP + -0xc] SUB EAX,ECX MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x4] MOV EDX,ECX LEA RCX,[0x3bd2e0] AND EAX,dword ptr [RCX + RDX*0x4] MOV ECX,dword ptr [RBP + -0xc] SHL EAX,CL MOV dword ptr [RBP + -0x10],EAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00139690 MOV ECX,0x20 SUB ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV EAX,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RCX] MOV ECX,0x20 SUB ECX,dword ptr [RBP + -0xc] SHR EDX,CL MOV ECX,EDX ADD EAX,ECX ADD RSP,0x10 POP RBP RET
int fill_and_get_bits(uint *param_1,int param_2) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; uVar1 = param_1[1]; uVar2 = *param_1; uVar3 = *(uint *)(mask + (ulong)param_1[1] * 4); bVar4 = (byte)(param_2 - uVar1); fill_buffer(param_1); param_1[1] = 0x20 - (param_2 - uVar1); return ((uVar2 & uVar3) << (bVar4 & 0x1f)) + (*param_1 >> (0x20 - bVar4 & 0x1f)); }
50,446
my_hash_sort_utf8mb3_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3_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_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 ) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb3_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 0x13dbfa movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x13ba50 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x13dc06 jmp 0x13dca7 movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x13c800 jmp 0x13dc1c 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 0x13dc58 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 0x13dc91 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x13dbca movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb3_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_13DBCA: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_13DBFA mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf8mb3_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_13DBFA: mov al, [rbp+var_59] test al, 1 jnz short loc_13DC06 jmp loc_13DCA7 loc_13DC06: mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_13DC1C: 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_13DC58: 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_13DC91: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_13DBCA loc_13DCA7: 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_utf8mb3_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] _QWORD *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_utf8mb3_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6); v7 = v14 > 0; } if ( !v7 ) break; my_tosort_unicode(v12, &v15, *(_DWORD *)(v20 + 12)); 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; }
50,447
my_hash_sort_utf8mb3_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3_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_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 ) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf8mb3_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, -0x38(%rbp) movq (%rcx), %r13 movq %r8, -0x40(%rbp) movq (%r8), %r14 testq %rdx, %rdx jle 0xcd1b2 movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq %rdi, -0x48(%rbp) movq 0x78(%rdi), %rbx leaq -0x30(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq 0xcb907 testl %eax, %eax jle 0xcd1b2 movq -0x30(%rbp), %rdx movl $0xfffd, %esi # imm = 0xFFFD cmpq (%rbx), %rdx ja 0xcd15a movq 0x8(%rbx), %rsi movq %rdx, %rcx shrq $0x8, %rcx movq (%rsi,%rcx,8), %rsi testq %rsi, %rsi je 0xcd166 movq -0x48(%rbp), %rcx movl 0xc(%rcx), %ecx xorl %edi, %edi testw %cx, %cx setns %dil movzbl %dl, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rsi,%rcx,4), %rcx movl 0x4(%rcx,%rdi,4), %esi movq %rsi, -0x30(%rbp) movl %esi, %ecx shrl $0x8, %ecx movq %rsi, %rdx movl %r13d, %esi andl $0x3f, %esi addq %r14, %rsi movzbl %dl, %edx imulq %rsi, %rdx movq %r13, %rsi shlq $0x8, %rsi addq %rdx, %rsi xorq %r13, %rsi movl %esi, %edx andl $0x3f, %edx addq %r14, %rdx addq $0x3, %rdx imulq %rcx, %rdx movq %rsi, %r13 shlq $0x8, %r13 addq %rdx, %r13 xorq %rsi, %r13 addq $0x6, %r14 movl %eax, %eax addq %rax, %r12 cmpq %r15, %r12 jb 0xcd102 movq -0x38(%rbp), %rax movq %r13, (%rax) movq -0x40(%rbp), %rax movq %r14, (%rax) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf8mb3_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_38], rcx mov r13, [rcx] mov [rbp+var_40], r8 mov r14, [r8] test rdx, rdx jle loc_CD1B2 mov r15, rdx mov r12, rsi add r15, rsi mov [rbp+var_48], rdi mov rbx, [rdi+78h] loc_CD102: lea rsi, [rbp+var_30] mov rdx, r12 mov rcx, r15 call my_utf8mb3_uni test eax, eax jle loc_CD1B2 mov rdx, [rbp+var_30] mov esi, 0FFFDh cmp rdx, [rbx] ja short loc_CD15A mov rsi, [rbx+8] mov rcx, rdx shr rcx, 8 mov rsi, [rsi+rcx*8] test rsi, rsi jz short loc_CD166 mov rcx, [rbp+var_48] mov ecx, [rcx+0Ch] xor edi, edi test cx, cx setns dil movzx ecx, dl lea rcx, [rcx+rcx*2] lea rcx, [rsi+rcx*4] mov esi, [rcx+rdi*4+4] loc_CD15A: mov [rbp+var_30], rsi mov ecx, esi shr ecx, 8 mov rdx, rsi loc_CD166: mov esi, r13d and esi, 3Fh add rsi, r14 movzx edx, dl imul rdx, rsi mov rsi, r13 shl rsi, 8 add rsi, rdx xor rsi, r13 mov edx, esi and edx, 3Fh add rdx, r14 add rdx, 3 imul rdx, rcx mov r13, rsi shl r13, 8 add r13, rdx xor r13, rsi add r14, 6 mov eax, eax add r12, rax cmp r12, r15 jb loc_CD102 loc_CD1B2: mov rax, [rbp+var_38] mov [rax], r13 mov rax, [rbp+var_40] mov [rax], r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * my_hash_sort_utf8mb3_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { long long v5; // r13 long long v6; // r14 unsigned __int8 *v7; // r12 unsigned long long v8; // r15 _QWORD *v9; // rbx int v10; // eax unsigned __int8 v11; // dl long long v12; // rsi unsigned long long v13; // rcx long long v14; // rsi long long v15; // rsi _QWORD *result; // rax long long v17; // [rsp+8h] [rbp-48h] unsigned long long v20[6]; // [rsp+20h] [rbp-30h] BYREF v5 = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = a2; v8 = (unsigned long long)&a2[a3]; v17 = a1; v9 = *(_QWORD **)(a1 + 120); while ( 1 ) { v10 = my_utf8mb3_uni(a1, v20, v7, v8); if ( v10 <= 0 ) goto LABEL_9; v11 = v20[0]; v12 = 65533LL; if ( v20[0] > *v9 ) goto LABEL_7; v13 = v20[0] >> 8; v14 = *(_QWORD *)(v9[1] + 8 * (v20[0] >> 8)); if ( v14 ) break; LABEL_8: v15 = v5 ^ ((v6 + (v5 & 0x3F)) * v11 + (v5 << 8)); v5 = v15 ^ (v13 * (v6 + (((unsigned __int8)v5 ^ (unsigned __int8)((v6 + (v5 & 0x3F)) * v11)) & 0x3F) + 3) + (v15 << 8)); v6 += 6LL; v7 += (unsigned int)v10; if ( (unsigned long long)v7 >= v8 ) goto LABEL_9; } a1 = (*(_DWORD *)(v17 + 12) & 0x8000u) == 0; v12 = *(unsigned int *)(v14 + 12LL * LOBYTE(v20[0]) + 4 * a1 + 4); LABEL_7: v20[0] = v12; v13 = (unsigned int)v12 >> 8; v11 = v12; goto LABEL_8; } LABEL_9: *a4 = v5; result = a5; *a5 = v6; return result; }
my_hash_sort_utf8mb3_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x38],RCX MOV R13,qword ptr [RCX] MOV qword ptr [RBP + -0x40],R8 MOV R14,qword ptr [R8] TEST RDX,RDX JLE 0x001cd1b2 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV qword ptr [RBP + -0x48],RDI MOV RBX,qword ptr [RDI + 0x78] LAB_001cd102: LEA RSI,[RBP + -0x30] MOV RDX,R12 MOV RCX,R15 CALL 0x001cb907 TEST EAX,EAX JLE 0x001cd1b2 MOV RDX,qword ptr [RBP + -0x30] MOV ESI,0xfffd CMP RDX,qword ptr [RBX] JA 0x001cd15a MOV RSI,qword ptr [RBX + 0x8] MOV RCX,RDX SHR RCX,0x8 MOV RSI,qword ptr [RSI + RCX*0x8] TEST RSI,RSI JZ 0x001cd166 MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0xc] XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX ECX,DL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RSI + RCX*0x4] MOV ESI,dword ptr [RCX + RDI*0x4 + 0x4] LAB_001cd15a: MOV qword ptr [RBP + -0x30],RSI MOV ECX,ESI SHR ECX,0x8 MOV RDX,RSI LAB_001cd166: MOV ESI,R13D AND ESI,0x3f ADD RSI,R14 MOVZX EDX,DL IMUL RDX,RSI MOV RSI,R13 SHL RSI,0x8 ADD RSI,RDX XOR RSI,R13 MOV EDX,ESI AND EDX,0x3f ADD RDX,R14 ADD RDX,0x3 IMUL RDX,RCX MOV R13,RSI SHL R13,0x8 ADD R13,RDX XOR R13,RSI ADD R14,0x6 MOV EAX,EAX ADD R12,RAX CMP R12,R15 JC 0x001cd102 LAB_001cd1b2: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R13 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_hash_sort_utf8mb3_nopad (long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { ulong *puVar1; long lVar2; uint uVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ulong uVar8; ulong local_38; uVar6 = *param_4; lVar7 = *param_5; if (0 < param_3) { uVar8 = param_3 + param_2; puVar1 = *(ulong **)(param_1 + 0x78); do { uVar3 = my_utf8mb3_uni(); if ((int)uVar3 < 1) break; uVar5 = 0xfffd; if (*puVar1 < local_38) { LAB_001cd15a: uVar4 = uVar5 >> 8; local_38 = uVar5; } else { uVar4 = local_38 >> 8; lVar2 = *(long *)(puVar1[1] + uVar4 * 8); if (lVar2 != 0) { uVar5 = (ulong)*(uint *)(lVar2 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < (short)*(int4 *)(param_1 + 0xc)) * 4); goto LAB_001cd15a; } } uVar6 = uVar6 * 0x100 + (local_38 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar7) ^ uVar6; uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar7 + 3) * uVar4 ^ uVar6; lVar7 = lVar7 + 6; param_2 = param_2 + uVar3; } while (param_2 < uVar8); } *param_4 = uVar6; *param_5 = lVar7; return; }
50,448
mthd_stmt_read_prepare_response
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt) { ulong packet_length; uchar *p; if ((packet_length= ma_net_safe_read(stmt->mysql)) == packet_error) return(1); p= (uchar *)stmt->mysql->net.read_pos; if (0xFF == p[0]) /* Error occurred */ { return(1); } p++; stmt->stmt_id= uint4korr(p); p+= 4; stmt->field_count= uint2korr(p); p+= 2; stmt->param_count= uint2korr(p); p+= 2; /* filler */ p++; /* for backward compatibility we also update mysql->warning_count */ stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p); /* metadata not supported yet */ if (stmt->param_count && stmt->mysql->methods->db_stmt_get_param_metadata(stmt)) { return 1; } /* allocated bind buffer for parameters */ if (stmt->field_count && stmt->mysql->methods->db_stmt_get_result_metadata(stmt)) { return 1; } if (stmt->param_count) { if (stmt->prebind_params) { if (stmt->prebind_params != stmt->param_count) { SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); stmt->param_count= stmt->prebind_params; return 1; } } else { if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return 1; } memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND)); } } /* allocated bind buffer for result */ if (stmt->field_count) { MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return 1; } memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count); } stmt->state = MYSQL_STMT_PREPARED; return(0); }
O3
c
mthd_stmt_read_prepare_response: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x38(%rdi), %rdi callq 0x152fb movb $0x1, %bl movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x20cda movq 0x38(%r14), %rax movq 0x20(%rax), %rcx cmpb $-0x1, (%rcx) je 0x20cda movl 0x1(%rcx), %edx movq %rdx, 0x40(%r14) movzwl 0x5(%rcx), %edx movl %edx, 0x60(%r14) movzwl 0x7(%rcx), %edx movl %edx, 0x64(%r14) movzwl 0xa(%rcx), %ecx movl %ecx, 0xf0(%r14) movl %ecx, 0x388(%rax) cmpl $0x0, 0x64(%r14) je 0x20b7a movq 0x38(%r14), %rax movq 0x4d0(%rax), %rax movq %r14, %rdi callq *0x58(%rax) testb %al, %al jne 0x20cda cmpl $0x0, 0x60(%r14) je 0x20b9a movq 0x38(%r14), %rax movq 0x4d0(%rax), %rax movq %r14, %rdi callq *0x50(%rax) testb %al, %al jne 0x20cda movl 0x64(%r14), %eax testq %rax, %rax je 0x20c47 movl 0x378(%r14), %ecx testl %ecx, %ecx je 0x20c20 cmpl %eax, %ecx je 0x20c47 movl $0x7f2, 0x108(%r14) # imm = 0x7F2 leaq 0x30d(%r14), %rdi leaq 0x27e2d(%rip), %rax # 0x48a00 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x312(%r14) leaq 0x10c(%r14), %rdi leaq 0x27e18(%rip), %rax # 0x48a10 movq 0x110(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r15b, 0x30b(%r14) movl 0x378(%r14), %eax movl %eax, 0x64(%r14) jmp 0x20cda imulq $0x70, %rax, %rsi movq %r14, %rdi callq 0x1db33 movq %rax, 0x70(%r14) testq %rax, %rax je 0x20c87 movl 0x64(%r14), %ecx imulq $0x70, %rcx, %rdx movq %rax, %rdi xorl %esi, %esi callq 0x13260 movl 0x60(%r14), %eax testq %rax, %rax je 0x20c7b movq 0x340(%r14), %rdi imulq $0x70, %rax, %rsi callq 0x1db33 movq %rax, 0x78(%r14) testq %rax, %rax je 0x20c87 movl 0x60(%r14), %ecx imulq $0x70, %rcx, %rdx movq %rax, %rdi xorl %esi, %esi callq 0x13260 movl $0x1, 0x50(%r14) xorl %ebx, %ebx jmp 0x20cda movl $0x7d8, 0x108(%r14) # imm = 0x7D8 leaq 0x30d(%r14), %rdi leaq 0x27d60(%rip), %rax # 0x48a00 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x312(%r14) leaq 0x10c(%r14), %rdi leaq 0x27d4b(%rip), %rax # 0x48a10 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r15b, 0x30b(%r14) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mthd_stmt_read_prepare_response: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi mov rdi, [rdi+38h] call ma_net_safe_read mov bl, 1 mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_20CDA mov rax, [r14+38h] mov rcx, [rax+20h] cmp byte ptr [rcx], 0FFh jz loc_20CDA mov edx, [rcx+1] mov [r14+40h], rdx movzx edx, word ptr [rcx+5] mov [r14+60h], edx movzx edx, word ptr [rcx+7] mov [r14+64h], edx movzx ecx, word ptr [rcx+0Ah] mov [r14+0F0h], ecx mov [rax+388h], ecx cmp dword ptr [r14+64h], 0 jz short loc_20B7A mov rax, [r14+38h] mov rax, [rax+4D0h] mov rdi, r14 call qword ptr [rax+58h] test al, al jnz loc_20CDA loc_20B7A: cmp dword ptr [r14+60h], 0 jz short loc_20B9A mov rax, [r14+38h] mov rax, [rax+4D0h] mov rdi, r14 call qword ptr [rax+50h] test al, al jnz loc_20CDA loc_20B9A: mov eax, [r14+64h] test rax, rax jz loc_20C47 mov ecx, [r14+378h] test ecx, ecx jz short loc_20C20 cmp ecx, eax jz loc_20C47 mov dword ptr [r14+108h], 7F2h lea rdi, [r14+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [r14+312h], r15b lea rdi, [r14+10Ch] lea rax, client_errors mov rsi, [rax+110h] mov edx, 200h call _strncpy mov [r14+30Bh], r15b mov eax, [r14+378h] mov [r14+64h], eax jmp loc_20CDA loc_20C20: imul rsi, rax, 70h ; 'p' mov rdi, r14 call ma_alloc_root mov [r14+70h], rax test rax, rax jz short loc_20C87 mov ecx, [r14+64h] imul rdx, rcx, 70h ; 'p' mov rdi, rax xor esi, esi call _memset loc_20C47: mov eax, [r14+60h] test rax, rax jz short loc_20C7B mov rdi, [r14+340h] imul rsi, rax, 70h ; 'p' call ma_alloc_root mov [r14+78h], rax test rax, rax jz short loc_20C87 mov ecx, [r14+60h] imul rdx, rcx, 70h ; 'p' mov rdi, rax xor esi, esi call _memset loc_20C7B: mov dword ptr [r14+50h], 1 xor ebx, ebx jmp short loc_20CDA loc_20C87: mov dword ptr [r14+108h], 7D8h lea rdi, [r14+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [r14+312h], r15b lea rdi, [r14+10Ch] lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy mov [r14+30Bh], r15b loc_20CDA: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mthd_stmt_read_prepare_response( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { unsigned int v6; // ebx long long v7; // rax long long v8; // rcx int v9; // ecx long long v10; // rax int v11; // ecx char *v12; // rax char *v13; // rax LOBYTE(v6) = 1; if ( ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6) != 0xFFFFFFFF ) { v7 = *(_QWORD *)(a1 + 56); v8 = *(_QWORD *)(v7 + 32); if ( *(_BYTE *)v8 != 0xFF ) { *(_QWORD *)(a1 + 64) = *(unsigned int *)(v8 + 1); *(_DWORD *)(a1 + 96) = *(unsigned __int16 *)(v8 + 5); *(_DWORD *)(a1 + 100) = *(unsigned __int16 *)(v8 + 7); v9 = *(unsigned __int16 *)(v8 + 10); *(_DWORD *)(a1 + 240) = v9; *(_DWORD *)(v7 + 904) = v9; if ( (!*(_DWORD *)(a1 + 100) || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 88LL))(a1)) && (!*(_DWORD *)(a1 + 96) || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 80LL))(a1)) ) { v10 = *(unsigned int *)(a1 + 100); if ( *(_DWORD *)(a1 + 100) ) { v11 = *(_DWORD *)(a1 + 888); if ( v11 ) { if ( v11 != (_DWORD)v10 ) { *(_DWORD *)(a1 + 264) = 2034; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[34], 512LL); *(_BYTE *)(a1 + 779) = 0; *(_DWORD *)(a1 + 100) = *(_DWORD *)(a1 + 888); return v6; } } else { v12 = ma_alloc_root(a1, 112 * v10); *(_QWORD *)(a1 + 112) = v12; if ( !v12 ) goto LABEL_17; memset(v12, 0LL, 112LL * *(unsigned int *)(a1 + 100)); } } if ( !*(_DWORD *)(a1 + 96) ) { LABEL_16: *(_DWORD *)(a1 + 80) = 1; return 0; } v13 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * *(unsigned int *)(a1 + 96)); *(_QWORD *)(a1 + 120) = v13; if ( v13 ) { memset(v13, 0LL, 112LL * *(unsigned int *)(a1 + 96)); goto LABEL_16; } LABEL_17: *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[8], 512LL); *(_BYTE *)(a1 + 779) = 0; } } } return v6; }
mthd_stmt_read_prepare_response: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RDI,qword ptr [RDI + 0x38] CALL 0x001152fb MOV BL,0x1 MOV ECX,0xffffffff CMP RAX,RCX JZ 0x00120cda MOV RAX,qword ptr [R14 + 0x38] MOV RCX,qword ptr [RAX + 0x20] CMP byte ptr [RCX],0xff JZ 0x00120cda MOV EDX,dword ptr [RCX + 0x1] MOV qword ptr [R14 + 0x40],RDX MOVZX EDX,word ptr [RCX + 0x5] MOV dword ptr [R14 + 0x60],EDX MOVZX EDX,word ptr [RCX + 0x7] MOV dword ptr [R14 + 0x64],EDX MOVZX ECX,word ptr [RCX + 0xa] MOV dword ptr [R14 + 0xf0],ECX MOV dword ptr [RAX + 0x388],ECX CMP dword ptr [R14 + 0x64],0x0 JZ 0x00120b7a MOV RAX,qword ptr [R14 + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RDI,R14 CALL qword ptr [RAX + 0x58] TEST AL,AL JNZ 0x00120cda LAB_00120b7a: CMP dword ptr [R14 + 0x60],0x0 JZ 0x00120b9a MOV RAX,qword ptr [R14 + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RDI,R14 CALL qword ptr [RAX + 0x50] TEST AL,AL JNZ 0x00120cda LAB_00120b9a: MOV EAX,dword ptr [R14 + 0x64] TEST RAX,RAX JZ 0x00120c47 MOV ECX,dword ptr [R14 + 0x378] TEST ECX,ECX JZ 0x00120c20 CMP ECX,EAX JZ 0x00120c47 MOV dword ptr [R14 + 0x108],0x7f2 LEA RDI,[R14 + 0x30d] LEA RAX,[0x148a00] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [R14 + 0x312],R15B LEA RDI,[R14 + 0x10c] LEA RAX,[0x148a10] MOV RSI,qword ptr [RAX + 0x110] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [R14 + 0x30b],R15B MOV EAX,dword ptr [R14 + 0x378] MOV dword ptr [R14 + 0x64],EAX JMP 0x00120cda LAB_00120c20: IMUL RSI,RAX,0x70 MOV RDI,R14 CALL 0x0011db33 MOV qword ptr [R14 + 0x70],RAX TEST RAX,RAX JZ 0x00120c87 MOV ECX,dword ptr [R14 + 0x64] IMUL RDX,RCX,0x70 MOV RDI,RAX XOR ESI,ESI CALL 0x00113260 LAB_00120c47: MOV EAX,dword ptr [R14 + 0x60] TEST RAX,RAX JZ 0x00120c7b MOV RDI,qword ptr [R14 + 0x340] IMUL RSI,RAX,0x70 CALL 0x0011db33 MOV qword ptr [R14 + 0x78],RAX TEST RAX,RAX JZ 0x00120c87 MOV ECX,dword ptr [R14 + 0x60] IMUL RDX,RCX,0x70 MOV RDI,RAX XOR ESI,ESI CALL 0x00113260 LAB_00120c7b: MOV dword ptr [R14 + 0x50],0x1 XOR EBX,EBX JMP 0x00120cda LAB_00120c87: MOV dword ptr [R14 + 0x108],0x7d8 LEA RDI,[R14 + 0x30d] LEA RAX,[0x148a00] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [R14 + 0x312],R15B LEA RDI,[R14 + 0x10c] LEA RAX,[0x148a10] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [R14 + 0x30b],R15B LAB_00120cda: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong mthd_stmt_read_prepare_response(long param_1) { ushort uVar1; char *pcVar2; char cVar3; long lVar4; void *pvVar5; int8 unaff_RBX; ulong uVar6; lVar4 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); uVar6 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (lVar4 == 0xffffffff) goto LAB_00120cda; pcVar2 = *(char **)(*(long *)(param_1 + 0x38) + 0x20); if (*pcVar2 == -1) goto LAB_00120cda; *(ulong *)(param_1 + 0x40) = (ulong)*(uint *)(pcVar2 + 1); *(uint *)(param_1 + 0x60) = (uint)*(ushort *)(pcVar2 + 5); *(uint *)(param_1 + 100) = (uint)*(ushort *)(pcVar2 + 7); uVar1 = *(ushort *)(pcVar2 + 10); *(uint *)(param_1 + 0xf0) = (uint)uVar1; *(uint *)(*(long *)(param_1 + 0x38) + 0x388) = (uint)uVar1; if (*(int *)(param_1 + 100) != 0) { cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x58))(param_1); if (cVar3 != '\0') goto LAB_00120cda; } if (*(int *)(param_1 + 0x60) != 0) { cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x50))(param_1); if (cVar3 != '\0') goto LAB_00120cda; } if (*(int *)(param_1 + 100) == 0) { LAB_00120c47: if (*(int *)(param_1 + 0x60) != 0) { pvVar5 = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340)); *(void **)(param_1 + 0x78) = pvVar5; if (pvVar5 == (void *)0x0) goto LAB_00120c87; memset(pvVar5,0,(ulong)*(uint *)(param_1 + 0x60) * 0x70); } *(int4 *)(param_1 + 0x50) = 1; uVar6 = 0; } else { if (*(int *)(param_1 + 0x378) != 0) { if (*(int *)(param_1 + 0x378) != *(int *)(param_1 + 100)) { *(int4 *)(param_1 + 0x108) = 0x7f2; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_00148b20,0x200); *(int1 *)(param_1 + 0x30b) = 0; *(int4 *)(param_1 + 100) = *(int4 *)(param_1 + 0x378); goto LAB_00120cda; } goto LAB_00120c47; } pvVar5 = (void *)ma_alloc_root(param_1); *(void **)(param_1 + 0x70) = pvVar5; if (pvVar5 != (void *)0x0) { memset(pvVar5,0,(ulong)*(uint *)(param_1 + 100) * 0x70); goto LAB_00120c47; } LAB_00120c87: *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_00148a50,0x200); *(int1 *)(param_1 + 0x30b) = 0; } LAB_00120cda: return uVar6 & 0xffffffff; }
50,449
character
tsotchke[P]eshkol/src/frontend/lexer/lexer.c
static Token character(Lexer* lexer) { if (is_at_end(lexer)) { return error_token(lexer, "Unterminated character literal."); } char c = advance(lexer); Token token = make_token(lexer, TOKEN_CHARACTER); token.value.character = c; return token; }
O1
c
character: pushq %rbx movq %rdi, %rbx movq 0x28(%rsi), %rax cmpb $0x0, (%rax) je 0x4802 movq 0x38(%rsi), %rcx incq %rcx movq %rcx, 0x38(%rsi) leaq 0x1(%rax), %rdx movq %rdx, 0x28(%rsi) movb (%rax), %al movl $0xe, (%rbx) movq 0x20(%rsi), %rdi movq %rdi, 0x8(%rbx) subq %rdi, %rdx movq %rdx, 0x10(%rbx) movq 0x30(%rsi), %rsi movq %rsi, 0x18(%rbx) subq %rdx, %rcx movq %rcx, 0x20(%rbx) movb %al, 0x28(%rbx) jmp 0x4811 leaq 0x16be3(%rip), %rdx # 0x1b3ec movq %rbx, %rdi callq 0x4816 movq %rbx, %rax popq %rbx retq
character: push rbx mov rbx, rdi mov rax, [rsi+28h] cmp byte ptr [rax], 0 jz short loc_4802 mov rcx, [rsi+38h] inc rcx mov [rsi+38h], rcx lea rdx, [rax+1] mov [rsi+28h], rdx mov al, [rax] mov dword ptr [rbx], 0Eh mov rdi, [rsi+20h] mov [rbx+8], rdi sub rdx, rdi mov [rbx+10h], rdx mov rsi, [rsi+30h] mov [rbx+18h], rsi sub rcx, rdx mov [rbx+20h], rcx mov [rbx+28h], al jmp short loc_4811 loc_4802: lea rdx, aUnterminatedCh; "Unterminated character literal." mov rdi, rbx call error_token loc_4811: mov rax, rbx pop rbx retn
long long character(long long a1, _QWORD *a2) { char *v3; // rax long long v4; // rcx _BYTE *v5; // rdx char v6; // al long long v7; // rdi _BYTE *v8; // rdx v3 = (char *)a2[5]; if ( *v3 ) { v4 = a2[7] + 1LL; a2[7] = v4; v5 = v3 + 1; a2[5] = v3 + 1; v6 = *v3; *(_DWORD *)a1 = 14; v7 = a2[4]; *(_QWORD *)(a1 + 8) = v7; v8 = &v5[-v7]; *(_QWORD *)(a1 + 16) = v8; *(_QWORD *)(a1 + 24) = a2[6]; *(_QWORD *)(a1 + 32) = v4 - (_QWORD)v8; *(_BYTE *)(a1 + 40) = v6; } else { error_token(a1, a2, "Unterminated character literal."); } return a1; }
character: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x28] CMP byte ptr [RAX],0x0 JZ 0x00104802 MOV RCX,qword ptr [RSI + 0x38] INC RCX MOV qword ptr [RSI + 0x38],RCX LEA RDX,[RAX + 0x1] MOV qword ptr [RSI + 0x28],RDX MOV AL,byte ptr [RAX] MOV dword ptr [RBX],0xe MOV RDI,qword ptr [RSI + 0x20] MOV qword ptr [RBX + 0x8],RDI SUB RDX,RDI MOV qword ptr [RBX + 0x10],RDX MOV RSI,qword ptr [RSI + 0x30] MOV qword ptr [RBX + 0x18],RSI SUB RCX,RDX MOV qword ptr [RBX + 0x20],RCX MOV byte ptr [RBX + 0x28],AL JMP 0x00104811 LAB_00104802: LEA RDX,[0x11b3ec] MOV RDI,RBX CALL 0x00104816 LAB_00104811: MOV RAX,RBX POP RBX RET
int4 * character(int4 *param_1,long param_2) { char cVar1; char *pcVar2; long lVar3; long lVar4; pcVar2 = *(char **)(param_2 + 0x28); if (*pcVar2 == '\0') { error_token(param_1,param_2,"Unterminated character literal."); } else { lVar3 = *(long *)(param_2 + 0x38) + 1; *(long *)(param_2 + 0x38) = lVar3; *(char **)(param_2 + 0x28) = pcVar2 + 1; cVar1 = *pcVar2; *param_1 = 0xe; lVar4 = *(long *)(param_2 + 0x20); *(long *)(param_1 + 2) = lVar4; lVar4 = (long)(pcVar2 + 1) - lVar4; *(long *)(param_1 + 4) = lVar4; *(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 0x30); *(long *)(param_1 + 8) = lVar3 - lVar4; *(char *)(param_1 + 10) = cVar1; } return param_1; }
50,450
ma_read_key_record
eloqsql/storage/maria/ma_key.c
int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { fast_ma_writeinfo(info); if (filepos != HA_OFFSET_ERROR) { if (info->lastinx >= 0) { /* Read only key */ if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf)) { _ma_set_fatal_error(info, HA_ERR_CRASHED); return -1; } info->update|= HA_STATE_AKTIV; /* We should find a record */ return 0; } my_errno=HA_ERR_WRONG_INDEX; } return(-1); /* Wrong data to read */ }
O3
c
ma_read_key_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rax cmpl $0x0, 0x7b8(%rax) jne 0x44cc6 movq %r14, %rdi xorl %esi, %esi callq 0x456b6 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpq $-0x1, %r12 je 0x44d16 movl 0x62c(%r14), %esi testl %esi, %esi js 0x44cff movq %r14, %rdi movl $0x1, %edx movq %r15, %rcx callq 0x44d21 testl %eax, %eax je 0x44d0c movq %r14, %rdi movl $0x7e, %esi callq 0x42b9c jmp 0x44d16 callq 0xa813e movl $0x7c, (%rax) jmp 0x44d16 orb $0x2, 0x624(%r14) xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_read_key_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r12, rdx mov r15, rsi mov r14, rdi mov rax, [rdi] cmp dword ptr [rax+7B8h], 0 jnz short loc_44CC6 mov rdi, r14 xor esi, esi call _ma_writeinfo loc_44CC6: mov ebx, 0FFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_44D16 mov esi, [r14+62Ch] test esi, esi js short loc_44CFF mov rdi, r14 mov edx, 1 mov rcx, r15 call _ma_put_key_in_record test eax, eax jz short loc_44D0C mov rdi, r14 mov esi, 7Eh ; '~' call _ma_set_fatal_error jmp short loc_44D16 loc_44CFF: call _my_thread_var mov dword ptr [rax], 7Ch ; '|' jmp short loc_44D16 loc_44D0C: or byte ptr [r14+624h], 2 xor ebx, ebx loc_44D16: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_read_key_record(unsigned int *a1, long long a2, long long a3) { unsigned int v5; // ebx long long v6; // rsi long long v7; // rdx long long v8; // rcx long long v9; // r8 int v10; // r9d if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo(a1, 0LL); v5 = -1; if ( a3 != -1 ) { v6 = a1[395]; if ( (int)v6 < 0 ) { *(_DWORD *)my_thread_var(a1) = 124; } else if ( (unsigned int)ma_put_key_in_record(a1, v6, 1LL, a2) ) { ma_set_fatal_error(a1, 126, v7, v8, v9, v10); } else { *((_BYTE *)a1 + 1572) |= 2u; return 0; } } return v5; }
_ma_read_key_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R12,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00144cc6 MOV RDI,R14 XOR ESI,ESI CALL 0x001456b6 LAB_00144cc6: MOV EBX,0xffffffff CMP R12,-0x1 JZ 0x00144d16 MOV ESI,dword ptr [R14 + 0x62c] TEST ESI,ESI JS 0x00144cff MOV RDI,R14 MOV EDX,0x1 MOV RCX,R15 CALL 0x00144d21 TEST EAX,EAX JZ 0x00144d0c MOV RDI,R14 MOV ESI,0x7e CALL 0x00142b9c JMP 0x00144d16 LAB_00144cff: CALL 0x001a813e MOV dword ptr [RAX],0x7c JMP 0x00144d16 LAB_00144d0c: OR byte ptr [R14 + 0x624],0x2 XOR EBX,EBX LAB_00144d16: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _ma_read_key_record(long *param_1,int8 param_2,long param_3) { int iVar1; int4 *puVar2; int8 uVar3; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } uVar3 = 0xffffffff; if (param_3 != -1) { if (*(int *)((long)param_1 + 0x62c) < 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7c; } else { iVar1 = _ma_put_key_in_record(param_1,*(int *)((long)param_1 + 0x62c),1,param_2); if (iVar1 == 0) { *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2; uVar3 = 0; } else { _ma_set_fatal_error(param_1,0x7e); } } } return uVar3; }
50,451
ggml_reshape_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_reshape_1d( struct ggml_context * ctx, struct ggml_tensor * a, int64_t ne0) { GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(ggml_nelements(a) == ne0); const int64_t ne[1] = { ne0 }; struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, 1, ne, a, 0); ggml_format_name(result, "%s (reshaped)", a->name); result->op = GGML_OP_RESHAPE; result->src[0] = a; return result; }
O0
c
ggml_reshape_1d: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x42ff0 testb $0x1, %al jne 0x4f962 leaq 0x61c6f(%rip), %rdi # 0xb15b7 movl $0xbd7, %esi # imm = 0xBD7 leaq 0x61cb5(%rip), %rdx # 0xb1609 leaq 0x6206d(%rip), %rcx # 0xb19c8 movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rdi callq 0x45f50 cmpq -0x18(%rbp), %rax je 0x4f992 leaq 0x61c3f(%rip), %rdi # 0xb15b7 movl $0xbd8, %esi # imm = 0xBD8 leaq 0x61c85(%rip), %rdx # 0xb1609 leaq 0x62088(%rip), %rcx # 0xb1a13 movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl (%rax), %esi leaq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 movl $0x1, %edx xorl %eax, %eax movl %eax, %r9d callq 0x4bff0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rdx addq $0x100, %rdx # imm = 0x100 leaq 0x62030(%rip), %rsi # 0xb1a05 movb $0x0, %al callq 0x481b0 movq -0x28(%rbp), %rax movl $0x21, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq
ggml_reshape_1d: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_4F962 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0BD7h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov al, 0 call _ggml_abort loc_4F962: mov rdi, [rbp+var_10] call _ggml_nelements cmp rax, [rbp+var_18] jz short loc_4F992 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0BD8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlNelementsA_2; "ggml_nelements(a) == ne0" mov al, 0 call _ggml_abort loc_4F992: mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov esi, [rax] lea rcx, [rbp+var_20] mov r8, [rbp+var_10] mov edx, 1 xor eax, eax mov r9d, eax call ggml_new_tensor_impl mov [rbp+var_28], rax mov rdi, [rbp+var_28] mov rdx, [rbp+var_10] add rdx, 100h lea rsi, aSReshaped; "%s (reshaped)" mov al, 0 call _ggml_format_name mov rax, [rbp+var_28] mov dword ptr [rax+50h], 21h ; '!' mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+98h], rcx mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
_QWORD * ggml_reshape_1d( long long a1, unsigned int *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 char v17; // [rsp+0h] [rbp-30h] _QWORD *v18; // [rsp+8h] [rbp-28h] long long v19; // [rsp+10h] [rbp-20h] BYREF long long v20; // [rsp+18h] [rbp-18h] unsigned int *v21; // [rsp+20h] [rbp-10h] long long v22; // [rsp+28h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; if ( (ggml_is_contiguous((long long)a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 3031, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(a)"); if ( ggml_nelements(v21) != v20 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 3032, (long long)"GGML_ASSERT(%s) failed", "ggml_nelements(a) == ne0"); v19 = v20; v18 = ggml_new_tensor_impl(v22, *v21, 1, &v19, v21, 0LL, *(double *)a4.m128_u64); ggml_format_name( (long long)v18, (long long)"%s (reshaped)", (long long)(v21 + 64), v11, v12, v13, a4, a5, a6, a7, v14, v15, a10, a11, v17); *((_DWORD *)v18 + 20) = 33; v18[19] = v21; return v18; }
ggml_reshape_1d: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00142ff0 TEST AL,0x1 JNZ 0x0014f962 LEA RDI,[0x1b15b7] MOV ESI,0xbd7 LEA RDX,[0x1b1609] LEA RCX,[0x1b19c8] MOV AL,0x0 CALL 0x00148a00 LAB_0014f962: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00145f50 CMP RAX,qword ptr [RBP + -0x18] JZ 0x0014f992 LEA RDI,[0x1b15b7] MOV ESI,0xbd8 LEA RDX,[0x1b1609] LEA RCX,[0x1b1a13] MOV AL,0x0 CALL 0x00148a00 LAB_0014f992: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX] LEA RCX,[RBP + -0x20] MOV R8,qword ptr [RBP + -0x10] MOV EDX,0x1 XOR EAX,EAX MOV R9D,EAX CALL 0x0014bff0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x100 LEA RSI,[0x1b1a05] MOV AL,0x0 CALL 0x001481b0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x50],0x21 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
long ggml_reshape_1d(int8 param_1,int4 *param_2,long param_3) { ulong uVar1; long lVar2; long local_28; long local_20; int4 *local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = ggml_is_contiguous(param_2); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xbd7,"GGML_ASSERT(%s) failed","ggml_is_contiguous(a)"); } lVar2 = ggml_nelements(local_18); if (lVar2 != local_20) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xbd8,"GGML_ASSERT(%s) failed","ggml_nelements(a) == ne0"); } local_28 = local_20; lVar2 = ggml_new_tensor_impl(local_10,*local_18,1,&local_28,local_18,0); ggml_format_name(lVar2,"%s (reshaped)",local_18 + 0x40); *(int4 *)(lVar2 + 0x50) = 0x21; *(int4 **)(lVar2 + 0x98) = local_18; return lVar2; }
50,452
ggml_reshape_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_reshape_1d( struct ggml_context * ctx, struct ggml_tensor * a, int64_t ne0) { GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(ggml_nelements(a) == ne0); const int64_t ne[1] = { ne0 }; struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, 1, ne, a, 0); ggml_format_name(result, "%s (reshaped)", a->name); result->op = GGML_OP_RESHAPE; result->src[0] = a; return result; }
O1
c
ggml_reshape_1d: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi xorl %esi, %esi callq 0x1b410 testb %al, %al je 0x1d7a5 movq 0x18(%rbx), %rax imulq 0x10(%rbx), %rax imulq 0x20(%rbx), %rax imulq 0x28(%rbx), %rax cmpq %r15, %rax jne 0x1d7c1 leaq 0x8(%rsp), %rcx movq %r15, (%rcx) movl (%rbx), %esi movq %r14, %rdi movl $0x1, %edx movq %rbx, %r8 xorl %r9d, %r9d callq 0x1b871 movq %rax, %r14 leaq 0x100(%rbx), %rdx leaq 0x2f23e(%rip), %rsi # 0x4c9bd movq %rax, %rdi xorl %eax, %eax callq 0x18a70 movl $0x21, 0x50(%r14) movq %rbx, 0x98(%r14) movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x2edc3(%rip), %rdi # 0x4c56f leaq 0x2ee0e(%rip), %rdx # 0x4c5c1 leaq 0x2f1c6(%rip), %rcx # 0x4c980 movl $0xbd7, %esi # imm = 0xBD7 jmp 0x1d7db leaq 0x2eda7(%rip), %rdi # 0x4c56f leaq 0x2edf2(%rip), %rdx # 0x4c5c1 leaq 0x2f1f5(%rip), %rcx # 0x4c9cb movl $0xbd8, %esi # imm = 0xBD8 xorl %eax, %eax callq 0x18ce0
ggml_reshape_1d: push r15 push r14 push rbx sub rsp, 10h mov r15, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi xor esi, esi call ggml_is_contiguous_n test al, al jz short loc_1D7A5 mov rax, [rbx+18h] imul rax, [rbx+10h] imul rax, [rbx+20h] imul rax, [rbx+28h] cmp rax, r15 jnz short loc_1D7C1 lea rcx, [rsp+28h+var_20] mov [rcx], r15 mov esi, [rbx] mov rdi, r14 mov edx, 1 mov r8, rbx xor r9d, r9d call ggml_new_tensor_impl mov r14, rax lea rdx, [rbx+100h] lea rsi, aSReshaped; "%s (reshaped)" mov rdi, rax xor eax, eax call _ggml_format_name mov dword ptr [r14+50h], 21h ; '!' mov [r14+98h], rbx mov rax, r14 add rsp, 10h pop rbx pop r14 pop r15 retn loc_1D7A5: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov esi, 0BD7h jmp short loc_1D7DB loc_1D7C1: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlNelementsA_2; "ggml_nelements(a) == ne0" mov esi, 0BD8h loc_1D7DB: xor eax, eax call _ggml_abort
long long ggml_reshape_1d(long long a1, long long a2, long long a3, double a4) { int v5; // r8d int v6; // r9d long long v7; // r14 const char *v9; // rcx int v10; // esi long long v11[4]; // [rsp+8h] [rbp-20h] BYREF if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v9 = "ggml_is_contiguous(a)"; v10 = 3031; goto LABEL_6; } if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3 ) { v9 = "ggml_nelements(a) == ne0"; v10 = 3032; LABEL_6: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, v5, v6); } v11[0] = a3; v7 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 1, v11, a2, 0LL, a4); ggml_format_name(v7, (long long)"%s (reshaped)"); *(_DWORD *)(v7 + 80) = 33; *(_QWORD *)(v7 + 152) = a2; return v7; }
ggml_reshape_1d: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI XOR ESI,ESI CALL 0x0011b410 TEST AL,AL JZ 0x0011d7a5 MOV RAX,qword ptr [RBX + 0x18] IMUL RAX,qword ptr [RBX + 0x10] IMUL RAX,qword ptr [RBX + 0x20] IMUL RAX,qword ptr [RBX + 0x28] CMP RAX,R15 JNZ 0x0011d7c1 LEA RCX,[RSP + 0x8] MOV qword ptr [RCX],R15 MOV ESI,dword ptr [RBX] MOV RDI,R14 MOV EDX,0x1 MOV R8,RBX XOR R9D,R9D CALL 0x0011b871 MOV R14,RAX LEA RDX,[RBX + 0x100] LEA RSI,[0x14c9bd] MOV RDI,RAX XOR EAX,EAX CALL 0x00118a70 MOV dword ptr [R14 + 0x50],0x21 MOV qword ptr [R14 + 0x98],RBX MOV RAX,R14 ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_0011d7a5: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c980] MOV ESI,0xbd7 JMP 0x0011d7db LAB_0011d7c1: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c9cb] MOV ESI,0xbd8 LAB_0011d7db: XOR EAX,EAX CALL 0x00118ce0
long ggml_reshape_1d(int8 param_1,int4 *param_2,long param_3) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; long local_20; cVar1 = ggml_is_contiguous_n(param_2,0); if (cVar1 == '\0') { pcVar3 = "ggml_is_contiguous(a)"; uVar4 = 0xbd7; } else { if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) * *(long *)(param_2 + 10) - param_3 == 0) { local_20 = param_3; lVar2 = ggml_new_tensor_impl(param_1,*param_2,1,&local_20,param_2,0); ggml_format_name(lVar2,"%s (reshaped)",param_2 + 0x40); *(int4 *)(lVar2 + 0x50) = 0x21; *(int4 **)(lVar2 + 0x98) = param_2; return lVar2; } pcVar3 = "ggml_nelements(a) == ne0"; uVar4 = 0xbd8; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
50,453
ggml_reshape_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_reshape_1d( struct ggml_context * ctx, struct ggml_tensor * a, int64_t ne0) { GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(ggml_nelements(a) == ne0); const int64_t ne[1] = { ne0 }; struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, 1, ne, a, 0); ggml_format_name(result, "%s (reshaped)", a->name); result->op = GGML_OP_RESHAPE; result->src[0] = a; return result; }
O3
c
ggml_reshape_1d: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi xorl %esi, %esi callq 0x1a0b9 testb %al, %al je 0x1c4ba movq 0x18(%rbx), %rax imulq 0x10(%rbx), %rax imulq 0x20(%rbx), %rax imulq 0x28(%rbx), %rax cmpq %r15, %rax jne 0x1c4d6 leaq 0x8(%rsp), %rcx movq %r15, (%rcx) movl (%rbx), %esi movq %r14, %rdi movl $0x1, %edx movq %rbx, %r8 xorl %r9d, %r9d callq 0x1a57f movq %rax, %r14 leaq 0x100(%rbx), %rdx leaq 0x305cd(%rip), %rsi # 0x4ca61 movq %rax, %rdi xorl %eax, %eax callq 0x17a60 movl $0x21, 0x50(%r14) movq %rbx, 0x98(%r14) movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x30152(%rip), %rdi # 0x4c613 leaq 0x3019d(%rip), %rdx # 0x4c665 leaq 0x30555(%rip), %rcx # 0x4ca24 movl $0xbd7, %esi # imm = 0xBD7 jmp 0x1c4f0 leaq 0x30136(%rip), %rdi # 0x4c613 leaq 0x30181(%rip), %rdx # 0x4c665 leaq 0x30584(%rip), %rcx # 0x4ca6f movl $0xbd8, %esi # imm = 0xBD8 xorl %eax, %eax callq 0x17cd0
ggml_reshape_1d: push r15 push r14 push rbx sub rsp, 10h mov r15, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi xor esi, esi call ggml_is_contiguous_n test al, al jz short loc_1C4BA mov rax, [rbx+18h] imul rax, [rbx+10h] imul rax, [rbx+20h] imul rax, [rbx+28h] cmp rax, r15 jnz short loc_1C4D6 lea rcx, [rsp+28h+var_20] mov [rcx], r15 mov esi, [rbx] mov rdi, r14 mov edx, 1 mov r8, rbx xor r9d, r9d call ggml_new_tensor_impl mov r14, rax lea rdx, [rbx+100h] lea rsi, aSReshaped; "%s (reshaped)" mov rdi, rax xor eax, eax call _ggml_format_name mov dword ptr [r14+50h], 21h ; '!' mov [r14+98h], rbx mov rax, r14 add rsp, 10h pop rbx pop r14 pop r15 retn loc_1C4BA: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov esi, 0BD7h jmp short loc_1C4F0 loc_1C4D6: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlNelementsA_2; "ggml_nelements(a) == ne0" mov esi, 0BD8h loc_1C4F0: xor eax, eax call _ggml_abort
long long ggml_reshape_1d(long long a1, long long a2, long long a3, double a4) { int v5; // r8d int v6; // r9d long long v7; // r14 const char *v9; // rcx int v10; // esi long long v11[4]; // [rsp+8h] [rbp-20h] BYREF if ( !ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v9 = "ggml_is_contiguous(a)"; v10 = 3031; goto LABEL_6; } if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3 ) { v9 = "ggml_nelements(a) == ne0"; v10 = 3032; LABEL_6: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, v5, v6); } v11[0] = a3; v7 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 1u, v11, a2, 0LL, a4); ggml_format_name(v7, (long long)"%s (reshaped)"); *(_DWORD *)(v7 + 80) = 33; *(_QWORD *)(v7 + 152) = a2; return v7; }
ggml_reshape_1d: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI XOR ESI,ESI CALL 0x0011a0b9 TEST AL,AL JZ 0x0011c4ba MOV RAX,qword ptr [RBX + 0x18] IMUL RAX,qword ptr [RBX + 0x10] IMUL RAX,qword ptr [RBX + 0x20] IMUL RAX,qword ptr [RBX + 0x28] CMP RAX,R15 JNZ 0x0011c4d6 LEA RCX,[RSP + 0x8] MOV qword ptr [RCX],R15 MOV ESI,dword ptr [RBX] MOV RDI,R14 MOV EDX,0x1 MOV R8,RBX XOR R9D,R9D CALL 0x0011a57f MOV R14,RAX LEA RDX,[RBX + 0x100] LEA RSI,[0x14ca61] MOV RDI,RAX XOR EAX,EAX CALL 0x00117a60 MOV dword ptr [R14 + 0x50],0x21 MOV qword ptr [R14 + 0x98],RBX MOV RAX,R14 ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_0011c4ba: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14ca24] MOV ESI,0xbd7 JMP 0x0011c4f0 LAB_0011c4d6: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14ca6f] MOV ESI,0xbd8 LAB_0011c4f0: XOR EAX,EAX CALL 0x00117cd0
long ggml_reshape_1d(int8 param_1,int4 *param_2,long param_3) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; long local_20; cVar1 = ggml_is_contiguous_n(param_2,0); if (cVar1 == '\0') { pcVar3 = "ggml_is_contiguous(a)"; uVar4 = 0xbd7; } else { if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) * *(long *)(param_2 + 10) - param_3 == 0) { local_20 = param_3; lVar2 = ggml_new_tensor_impl(param_1,*param_2,1,&local_20,param_2,0); ggml_format_name(lVar2,"%s (reshaped)",param_2 + 0x40); *(int4 *)(lVar2 + 0x50) = 0x21; *(int4 **)(lVar2 + 0x98) = param_2; return lVar2; } pcVar3 = "ggml_nelements(a) == ne0"; uVar4 = 0xbd8; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
50,454
nglog::CapturedStream::StopCapture()
ng-log[P]ng-log/src/googletest.h
void StopCapture() { // Restore original stream if (uncaptured_fd_) { fflush(nullptr); CHECK(dup2(uncaptured_fd_.get(), fd_) != -1); } }
O0
c
nglog::CapturedStream::StopCapture(): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x90(%rbp) addq $0x4, %rdi callq 0x24620 testb $0x1, %al jne 0x2714c jmp 0x2721f xorl %eax, %eax movl %eax, %edi callq 0xa9d0 movq -0x90(%rbp), %rdi addq $0x4, %rdi callq 0x25fb0 movl %eax, %edi movq -0x90(%rbp), %rax movl (%rax), %esi callq 0xa770 cmpl $-0x1, %eax setne %al xorb $-0x1, %al movb $0x0, -0x71(%rbp) testb $0x1, %al jne 0x27187 jmp 0x271e8 leaq 0x46feb(%rip), %rsi # 0x6e179 leaq -0x70(%rbp), %rdi movq %rdi, -0xa0(%rbp) movl $0x15a, %edx # imm = 0x15A callq 0x35ba0 movq -0xa0(%rbp), %rdi movb $0x1, -0x71(%rbp) callq 0x316d0 movq %rax, -0x98(%rbp) jmp 0x271bc movq -0x98(%rbp), %rdi leaq 0x47198(%rip), %rsi # 0x6e362 callq 0xa7f0 movq %rax, -0xa8(%rbp) jmp 0x271d8 movq -0xa8(%rbp), %rsi leaq -0x9(%rbp), %rdi callq 0x231c0 testb $0x1, -0x71(%rbp) jne 0x271f0 jmp 0x27210 leaq -0x70(%rbp), %rdi callq 0x35c10 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) testb $0x1, -0x71(%rbp) jne 0x27212 jmp 0x2721d jmp 0x2721f leaq -0x70(%rbp), %rdi callq 0x35c10 jmp 0x2721d jmp 0x27228 addq $0xb0, %rsp popq %rbp retq movq -0x80(%rbp), %rdi callq 0xaf50 movq %rax, %rdi callq 0x226c0 nopl (%rax)
_ZN5nglog14CapturedStream11StopCaptureEv: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_90], rdi add rdi, 4 call _ZNK5nglog5tools14FileDescriptorcvbEv; nglog::tools::FileDescriptor::operator bool(void) test al, 1 jnz short loc_2714C jmp loc_2721F loc_2714C: xor eax, eax mov edi, eax call _fflush mov rdi, [rbp+var_90] add rdi, 4; this call _ZNK5nglog5tools14FileDescriptor3getEv; nglog::tools::FileDescriptor::get(void) mov edi, eax mov rax, [rbp+var_90] mov esi, [rax] call _dup2 cmp eax, 0FFFFFFFFh setnz al xor al, 0FFh mov [rbp+var_71], 0 test al, 1 jnz short loc_27187 jmp short loc_271E8 loc_27187: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_70]; this mov [rbp+var_A0], rdi mov edx, 15Ah; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, [rbp+var_A0]; this mov [rbp+var_71], 1 call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_98], rax jmp short $+2 loc_271BC: mov rdi, [rbp+var_98] lea rsi, aCheckFailedDup_0; "Check failed: dup2(uncaptured_fd_.get()"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A8], rax jmp short $+2 loc_271D8: mov rsi, [rbp+var_A8] lea rdi, [rbp+var_9] call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &) loc_271E8: test [rbp+var_71], 1 jnz short loc_271F0 jmp short loc_27210 loc_271F0: lea rdi, [rbp+var_70]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax test [rbp+var_71], 1 jnz short loc_27212 jmp short loc_2721D loc_27210: jmp short loc_2721F loc_27212: lea rdi, [rbp+var_70]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short $+2 loc_2721D: jmp short loc_27228 loc_2721F: add rsp, 0B0h pop rbp retn loc_27228: mov rdi, [rbp+var_80] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::CapturedStream::StopCapture(nglog::CapturedStream *this, long long a2) { unsigned int v2; // eax long long v3; // [rsp+18h] [rbp-98h] char v4; // [rsp+3Fh] [rbp-71h] _BYTE v5[103]; // [rsp+40h] [rbp-70h] BYREF nglog::CapturedStream *v6; // [rsp+A8h] [rbp-8h] v6 = this; if ( nglog::tools::FileDescriptor::operator bool((_DWORD *)this + 1) ) { fflush(0LL, a2); v2 = nglog::tools::FileDescriptor::get((nglog::CapturedStream *)((char *)this + 4)); v4 = 0; if ( (unsigned int)dup2(v2, *(unsigned int *)this) == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v5, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 346); v4 = 1; v3 = nglog::LogMessage::stream((nglog::LogMessage *)v5); std::operator<<<std::char_traits<char>>(v3, "Check failed: dup2(uncaptured_fd_.get(), fd_) != -1 "); nglog::internal::LogMessageVoidify::operator&(); } if ( (v4 & 1) != 0 ) nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v5); } }
StopCapture: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x90],RDI ADD RDI,0x4 CALL 0x00124620 TEST AL,0x1 JNZ 0x0012714c JMP 0x0012721f LAB_0012714c: XOR EAX,EAX MOV EDI,EAX CALL 0x0010a9d0 MOV RDI,qword ptr [RBP + -0x90] ADD RDI,0x4 CALL 0x00125fb0 MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x90] MOV ESI,dword ptr [RAX] CALL 0x0010a770 CMP EAX,-0x1 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x71],0x0 TEST AL,0x1 JNZ 0x00127187 JMP 0x001271e8 LAB_00127187: LEA RSI,[0x16e179] LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0xa0],RDI MOV EDX,0x15a CALL 0x00135ba0 MOV RDI,qword ptr [RBP + -0xa0] MOV byte ptr [RBP + -0x71],0x1 LAB_001271ae: CALL 0x001316d0 MOV qword ptr [RBP + -0x98],RAX JMP 0x001271bc LAB_001271bc: MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[0x16e362] CALL 0x0010a7f0 LAB_001271cf: MOV qword ptr [RBP + -0xa8],RAX JMP 0x001271d8 LAB_001271d8: MOV RSI,qword ptr [RBP + -0xa8] LEA RDI,[RBP + -0x9] CALL 0x001231c0 LAB_001271e8: TEST byte ptr [RBP + -0x71],0x1 JNZ 0x001271f0 JMP 0x00127210 LAB_001271f0: LEA RDI,[RBP + -0x70] CALL 0x00135c10 LAB_001271f9: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RBP + -0x80],RCX MOV dword ptr [RBP + -0x84],EAX TEST byte ptr [RBP + -0x71],0x1 JNZ 0x00127212 JMP 0x0012721d LAB_00127210: JMP 0x0012721f LAB_00127212: LEA RDI,[RBP + -0x70] CALL 0x00135c10 LAB_0012721b: JMP 0x0012721d LAB_0012721d: JMP 0x00127228 LAB_0012721f: ADD RSP,0xb0 POP RBP RET LAB_00127228: MOV RDI,qword ptr [RBP + -0x80] CALL 0x0010af50
/* nglog::CapturedStream::StopCapture() */ void __thiscall nglog::CapturedStream::StopCapture(CapturedStream *this) { bool bVar1; int iVar2; ostream *poVar3; int8 uVar4; LogMessageFatal local_78 [103]; LogMessageVoidify local_11; CapturedStream *local_10; local_10 = this; bVar1 = tools::FileDescriptor::operator_cast_to_bool((FileDescriptor *)(this + 4)); if (bVar1) { fflush((FILE *)0x0); iVar2 = tools::FileDescriptor::get((FileDescriptor *)(this + 4)); iVar2 = dup2(iVar2,*(int *)this); if (iVar2 == -1) { LogMessageFatal::LogMessageFatal (local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h" ,0x15a); /* try { // try from 001271ae to 001271ce has its CatchHandler @ 001271f9 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_78); poVar3 = std::operator<<(poVar3,"Check failed: dup2(uncaptured_fd_.get(), fd_) != -1 "); internal::LogMessageVoidify::operator&(&local_11,poVar3); uVar4 = LogMessageFatal::~LogMessageFatal(local_78); /* catch(type#1 @ 00000000) { ... } // from try @ 001271ae with catch @ 001271f9 */ if (iVar2 == -1) { /* try { // try from 00127212 to 0012721a has its CatchHandler @ 00127231 */ LogMessageFatal::~LogMessageFatal(local_78); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar4); } } return; }
50,455
my_b_append
eloqsql/mysys/mf_iocache.c
int my_b_append(IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length,length; MEM_CHECK_DEFINED(Buffer, Count); /* Assert that we cannot come here with a shared cache. If we do one day, we might need to add a call to copy_to_read_buffer(). */ DBUG_ASSERT(!info->share); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); lock_append_buffer(info); rest_length= (size_t) (info->write_end - info->write_pos); if (Count <= rest_length) goto end; memcpy(info->write_pos, Buffer, rest_length); Buffer+=rest_length; Count-=rest_length; info->write_pos+=rest_length; if (my_b_flush_io_cache(info,0)) { unlock_append_buffer(info); return 1; } if (Count >= IO_SIZE) { /* Fill first intern buffer */ length= IO_ROUND_DN(Count); if (mysql_file_write(info->file,Buffer, length, info->myflags | MY_NABP)) { unlock_append_buffer(info); return info->error= -1; } Count-=length; Buffer+=length; info->end_of_file+=length; } end: memcpy(info->write_pos,Buffer,(size_t) Count); info->write_pos+=Count; unlock_append_buffer(info); return 0; }
O3
c
my_b_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 addq $0x50, %rdi cmpq $0x0, 0x90(%r14) movq %rdi, -0x38(%rbp) jne 0x2bb92 callq 0x24510 movq 0x40(%r14), %rdi movq 0x48(%r14), %rbx subq %rdi, %rbx movq %r13, %r12 subq %rbx, %r12 jbe 0x2ba9b movq %r15, %rsi movq %rbx, %rdx callq 0x24290 addq %rbx, 0x40(%r14) movq %r14, %rdi xorl %esi, %esi callq 0x2af4d testl %eax, %eax je 0x2badb movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x2bbbd movq -0x38(%rbp), %rdi callq 0x24260 movl $0x1, %eax jmp 0x2bacc movq %r13, %r12 movq 0x40(%r14), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x24290 addq %r12, 0x40(%r14) movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x2bba8 movq -0x38(%rbp), %rdi callq 0x24260 xorl %eax, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %rbx, %r15 cmpq $0x1000, %r12 # imm = 0x1000 jb 0x2ba9e movl %r12d, %ebx andl $0xfffff000, %ebx # imm = 0xFFFFF000 movl 0xd4(%r14), %esi movq 0xf8(%r14), %r13 orq $0x4, %r13 leaq 0x2cf07f(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %esi, -0x2c(%rbp) movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax movq %rbx, -0x48(%rbp) jne 0x2bbd2 movl -0x2c(%rbp), %edi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx callq 0x2513a movq %rax, %rbx testq %rbx, %rbx je 0x2bb75 movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x2bc34 movq -0x38(%rbp), %rdi callq 0x24260 movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x2bacc movabsq $-0xfffff001, %rax # imm = 0xFFFFFFFF00000FFF andq %rax, %r12 movq -0x48(%rbp), %rax addq %rax, %r15 addq %rax, 0x8(%r14) jmp 0x2ba9e leaq 0x38acd(%rip), %rsi # 0x64666 movl $0x62b, %edx # imm = 0x62B callq 0x24cc5 jmp 0x2ba4b leaq 0x2cefd9(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x160(%rax) jmp 0x2bac1 leaq 0x2cefc4(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x160(%rax) jmp 0x2ba8b movq %rax, %rcx leaq 0x2cefac(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq 0x38a80(%rip), %rdx # 0x64666 movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %rbx, %rsi movl $0x63b, %ecx # imm = 0x63B callq *0x210(%rax) movl -0x2c(%rbp), %edi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx callq 0x2513a movq %rbx, %rcx movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmoveq %rcx, %rsi leaq 0x2cef66(%rip), %rax # 0x2fab88 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x2bb42 leaq 0x2cef4d(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x160(%rax) jmp 0x2bb57
my_b_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, rdx mov r15, rsi mov r14, rdi add rdi, 50h ; 'P' cmp qword ptr [r14+90h], 0 mov [rbp+var_38], rdi jnz loc_2BB92 call _pthread_mutex_lock loc_2BA4B: mov rdi, [r14+40h] mov rbx, [r14+48h] sub rbx, rdi mov r12, r13 sub r12, rbx jbe short loc_2BA9B mov rsi, r15 mov rdx, rbx call _memcpy add [r14+40h], rbx mov rdi, r14 xor esi, esi call my_b_flush_io_cache test eax, eax jz short loc_2BADB mov rdi, [r14+90h] test rdi, rdi jnz loc_2BBBD loc_2BA8B: mov rdi, [rbp+var_38] call _pthread_mutex_unlock mov eax, 1 jmp short loc_2BACC loc_2BA9B: mov r12, r13 loc_2BA9E: mov rdi, [r14+40h] mov rsi, r15 mov rdx, r12 call _memcpy add [r14+40h], r12 mov rdi, [r14+90h] test rdi, rdi jnz loc_2BBA8 loc_2BAC1: mov rdi, [rbp+var_38] call _pthread_mutex_unlock xor eax, eax loc_2BACC: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2BADB: add r15, rbx cmp r12, 1000h jb short loc_2BA9E mov ebx, r12d and ebx, 0FFFFF000h mov esi, [r14+0D4h] mov r13, [r14+0F8h] or r13, 4 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov [rbp+var_2C], esi mov edx, 7 call qword ptr [rax+158h] test rax, rax mov [rbp+var_48], rbx jnz loc_2BBD2 mov edi, [rbp+var_2C] mov rsi, r15 mov rdx, rbx mov rcx, r13 call my_write mov rbx, rax loc_2BB42: test rbx, rbx jz short loc_2BB75 mov rdi, [r14+90h] test rdi, rdi jnz loc_2BC34 loc_2BB57: mov rdi, [rbp+var_38] call _pthread_mutex_unlock mov dword ptr [r14+0E4h], 0FFFFFFFFh mov eax, 0FFFFFFFFh jmp loc_2BACC loc_2BB75: mov rax, 0FFFFFFFF00000FFFh and r12, rax mov rax, [rbp+var_48] add r15, rax add [r14+8], rax jmp loc_2BA9E loc_2BB92: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 62Bh call psi_mutex_lock jmp loc_2BA4B loc_2BBA8: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_2BAC1 loc_2BBBD: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_2BA8B loc_2BBD2: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, rbx mov ecx, 63Bh call qword ptr [rax+210h] mov edi, [rbp+var_2C] mov rsi, r15 mov rdx, rbx mov rcx, r13 call my_write mov rcx, rbx mov rbx, rax xor esi, esi test rax, rax cmovz rsi, rcx lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_2BB42 loc_2BC34: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_2BB57
long long my_b_append(long long a1, long long a2, unsigned long long a3) { long long v4; // r15 long long v6; // rdi bool v7; // zf long long v8; // rdi unsigned long long v9; // rbx unsigned long long v10; // r12 long long v12; // r13 long long v13; // rax long long v14; // rbx long long v15; // rsi _BYTE v16[72]; // [rsp+0h] [rbp-90h] BYREF long long v17; // [rsp+48h] [rbp-48h] long long v18; // [rsp+50h] [rbp-40h] long long v19; // [rsp+58h] [rbp-38h] unsigned int v20; // [rsp+64h] [rbp-2Ch] v4 = a2; v6 = a1 + 80; v7 = *(_QWORD *)(a1 + 144) == 0LL; v19 = v6; if ( v7 ) pthread_mutex_lock(v6); else psi_mutex_lock(v6, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x62Bu); v8 = *(_QWORD *)(a1 + 64); v9 = *(_QWORD *)(a1 + 72) - v8; v10 = a3 - v9; if ( a3 <= v9 ) { v10 = a3; } else { memcpy(v8, a2); *(_QWORD *)(a1 + 64) += v9; if ( (unsigned int)my_b_flush_io_cache((long long *)a1, 0) ) { if ( *(_QWORD *)(a1 + 144) ) (*((void (**)(void))PSI_server + 44))(); pthread_mutex_unlock(v19); return 1LL; } v4 = v9 + a2; if ( v10 >= 0x1000 ) { v12 = *(_QWORD *)(a1 + 248) | 4LL; v20 = *(_DWORD *)(a1 + 212); v13 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v16, v20, 7LL); v17 = (unsigned int)v10 & 0xFFFFF000; if ( v13 ) { v18 = v13; (*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))( v13, v10 & 0xFFFFF000, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1595LL); v14 = my_write(v20, v4, (unsigned int)v10 & 0xFFFFF000, v12); v15 = 0LL; if ( !v14 ) v15 = (unsigned int)v10 & 0xFFFFF000; (*((void ( **)(long long, long long))PSI_server + 67))(v18, v15); } else { v14 = my_write(v20, v4, (unsigned int)v10 & 0xFFFFF000, v12); } if ( v14 ) { if ( *(_QWORD *)(a1 + 144) ) (*((void (**)(void))PSI_server + 44))(); pthread_mutex_unlock(v19); *(_DWORD *)(a1 + 228) = -1; return 0xFFFFFFFFLL; } v10 &= 0xFFFFFFFF00000FFFLL; v4 += v17; *(_QWORD *)(a1 + 8) += v17; } } memcpy(*(_QWORD *)(a1 + 64), v4); *(_QWORD *)(a1 + 64) += v10; if ( *(_QWORD *)(a1 + 144) ) (*((void (**)(void))PSI_server + 44))(); pthread_mutex_unlock(v19); return 0LL; }
my_b_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,RDX MOV R15,RSI MOV R14,RDI ADD RDI,0x50 CMP qword ptr [R14 + 0x90],0x0 MOV qword ptr [RBP + -0x38],RDI JNZ 0x0012bb92 CALL 0x00124510 LAB_0012ba4b: MOV RDI,qword ptr [R14 + 0x40] MOV RBX,qword ptr [R14 + 0x48] SUB RBX,RDI MOV R12,R13 SUB R12,RBX JBE 0x0012ba9b MOV RSI,R15 MOV RDX,RBX CALL 0x00124290 ADD qword ptr [R14 + 0x40],RBX MOV RDI,R14 XOR ESI,ESI CALL 0x0012af4d TEST EAX,EAX JZ 0x0012badb MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x0012bbbd LAB_0012ba8b: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00124260 MOV EAX,0x1 JMP 0x0012bacc LAB_0012ba9b: MOV R12,R13 LAB_0012ba9e: MOV RDI,qword ptr [R14 + 0x40] MOV RSI,R15 MOV RDX,R12 CALL 0x00124290 ADD qword ptr [R14 + 0x40],R12 MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x0012bba8 LAB_0012bac1: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00124260 XOR EAX,EAX LAB_0012bacc: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012badb: ADD R15,RBX CMP R12,0x1000 JC 0x0012ba9e MOV EBX,R12D AND EBX,0xfffff000 MOV ESI,dword ptr [R14 + 0xd4] MOV R13,qword ptr [R14 + 0xf8] OR R13,0x4 LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV dword ptr [RBP + -0x2c],ESI MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x48],RBX JNZ 0x0012bbd2 MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R15 MOV RDX,RBX MOV RCX,R13 CALL 0x0012513a MOV RBX,RAX LAB_0012bb42: TEST RBX,RBX JZ 0x0012bb75 MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x0012bc34 LAB_0012bb57: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00124260 MOV dword ptr [R14 + 0xe4],0xffffffff MOV EAX,0xffffffff JMP 0x0012bacc LAB_0012bb75: MOV RAX,-0xfffff001 AND R12,RAX MOV RAX,qword ptr [RBP + -0x48] ADD R15,RAX ADD qword ptr [R14 + 0x8],RAX JMP 0x0012ba9e LAB_0012bb92: LEA RSI,[0x164666] MOV EDX,0x62b CALL 0x00124cc5 JMP 0x0012ba4b LAB_0012bba8: LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012bac1 LAB_0012bbbd: LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012ba8b LAB_0012bbd2: MOV RCX,RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDX,[0x164666] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,RBX MOV ECX,0x63b CALL qword ptr [RAX + 0x210] MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R15 MOV RDX,RBX MOV RCX,R13 CALL 0x0012513a MOV RCX,RBX MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RCX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x0012bb42 LAB_0012bc34: LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012bb57
int8 my_b_append(long param_1,void *param_2,ulong param_3) { int iVar1; long lVar2; ulong uVar3; ulong uVar4; ulong uVar5; int1 local_98 [72]; ulong local_50; long local_48; pthread_mutex_t *local_40; int4 local_34; local_40 = (pthread_mutex_t *)(param_1 + 0x50); if (*(long *)(param_1 + 0x90) == 0) { pthread_mutex_lock(local_40); } else { psi_mutex_lock(local_40,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x62b); } uVar3 = *(long *)(param_1 + 0x48) - (long)*(void **)(param_1 + 0x40); uVar4 = param_3 - uVar3; if (uVar3 <= param_3 && uVar4 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,uVar3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + uVar3; iVar1 = my_b_flush_io_cache(param_1,0); if (iVar1 != 0) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); return 1; } param_2 = (void *)((long)param_2 + uVar3); param_3 = uVar4; if (0xfff < uVar4) { uVar3 = (ulong)((uint)uVar4 & 0xfffff000); local_34 = *(int4 *)(param_1 + 0xd4); uVar5 = *(ulong *)(param_1 + 0xf8) | 4; lVar2 = (**(code **)(PSI_server + 0x158))(local_98,local_34,7); local_50 = uVar3; if (lVar2 == 0) { lVar2 = my_write(local_34,param_2,uVar3,uVar5); } else { local_48 = lVar2; (**(code **)(PSI_server + 0x210)) (lVar2,uVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x63b); lVar2 = my_write(local_34,param_2,uVar3,uVar5); uVar5 = 0; if (lVar2 == 0) { uVar5 = uVar3; } (**(code **)(PSI_server + 0x218))(local_48,uVar5); } if (lVar2 != 0) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); *(int4 *)(param_1 + 0xe4) = 0xffffffff; return 0xffffffff; } param_3 = uVar4 & 0xffffffff00000fff; param_2 = (void *)((long)param_2 + local_50); *(long *)(param_1 + 8) = *(long *)(param_1 + 8) + local_50; } } memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); return 0; }
50,456
spdlog::details::D_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 10; ScopedPadder p(field_size, padinfo_, dest); fmt_helper::pad2(tm_time.tm_mon + 1, dest); dest.push_back('/'); fmt_helper::pad2(tm_time.tm_mday, dest); dest.push_back('/'); fmt_helper::pad2(tm_time.tm_year % 100, dest); }
O0
c
spdlog::details::D_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq 0x60(%rsp), %rdx movq $0xa, 0x40(%rsp) addq $0x8, %rdx movq 0x48(%rsp), %rcx leaq 0x18(%rsp), %rdi movl $0xa, %esi callq 0x5b820 movq 0x50(%rsp), %rax movl 0x10(%rax), %edi incl %edi movq 0x48(%rsp), %rsi callq 0x55010 jmp 0x5fea4 movq 0x48(%rsp), %rdi movb $0x2f, 0xb(%rsp) leaq 0xb(%rsp), %rsi callq 0x2a310 jmp 0x5feba movq 0x50(%rsp), %rax movl 0xc(%rax), %edi movq 0x48(%rsp), %rsi callq 0x55010 jmp 0x5fece movq 0x48(%rsp), %rdi movb $0x2f, 0xa(%rsp) leaq 0xa(%rsp), %rsi callq 0x2a310 jmp 0x5fee4 movq 0x50(%rsp), %rax movslq 0x14(%rax), %rax movl %eax, %edi imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F movq %rax, %rcx shrq $0x3f, %rcx sarq $0x25, %rax addl %ecx, %eax imull $0x64, %eax, %eax subl %eax, %edi movq 0x48(%rsp), %rsi callq 0x55010 jmp 0x5ff14 leaq 0x18(%rsp), %rdi callq 0x5b910 addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x10(%rsp) movl %eax, 0xc(%rsp) leaq 0x18(%rsp), %rdi callq 0x5b910 movq 0x10(%rsp), %rdi callq 0x16cf0 nopw %cs:(%rax,%rax) nop
_ZN6spdlog7details11D_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov rdx, [rsp+68h+var_8] mov [rsp+68h+var_28], 0Ah add rdx, 8 mov rcx, [rsp+68h+var_20] lea rdi, [rsp+68h+var_50] mov esi, 0Ah call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rax, [rsp+68h+var_18] mov edi, [rax+10h] inc edi mov rsi, [rsp+68h+var_20] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp short $+2 loc_5FEA4: mov rdi, [rsp+68h+var_20] mov [rsp+68h+var_5D], 2Fh ; '/' lea rsi, [rsp+68h+var_5D] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) jmp short $+2 loc_5FEBA: mov rax, [rsp+68h+var_18] mov edi, [rax+0Ch] mov rsi, [rsp+68h+var_20] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp short $+2 loc_5FECE: mov rdi, [rsp+68h+var_20] mov [rsp+68h+var_5E], 2Fh ; '/' lea rsi, [rsp+68h+var_5E] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) jmp short $+2 loc_5FEE4: mov rax, [rsp+68h+var_18] movsxd rax, dword ptr [rax+14h] mov edi, eax imul rax, 51EB851Fh mov rcx, rax shr rcx, 3Fh sar rax, 25h add eax, ecx imul eax, 64h ; 'd' sub edi, eax mov rsi, [rsp+68h+var_20] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp short $+2 loc_5FF14: lea rdi, [rsp+68h+var_50]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_8], rcx mov [rsp+arg_4], eax lea rdi, [rsp+arg_10]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() mov rdi, [rsp+arg_8] call __Unwind_Resume
void spdlog::details::D_formatter<spdlog::details::scoped_padder>::format( long long a1, long long a2, int *a3, long long a4) { char v4; // [rsp+Ah] [rbp-5Eh] BYREF char v5[13]; // [rsp+Bh] [rbp-5Dh] BYREF _BYTE v6[40]; // [rsp+18h] [rbp-50h] BYREF long long v7; // [rsp+40h] [rbp-28h] long long v8; // [rsp+48h] [rbp-20h] int *v9; // [rsp+50h] [rbp-18h] long long v10; // [rsp+58h] [rbp-10h] long long v11; // [rsp+60h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 10LL; spdlog::details::scoped_padder::scoped_padder((spdlog::details::scoped_padder *)v6, 10LL, (_QWORD *)(a1 + 8), a4); spdlog::details::fmt_helper::pad2(v9[4] + 1, v8); v5[0] = 47; fmt::v10::detail::buffer<char>::push_back(v8, v5); spdlog::details::fmt_helper::pad2(v9[3], v8); v4 = 47; fmt::v10::detail::buffer<char>::push_back(v8, &v4); spdlog::details::fmt_helper::pad2(v9[5] % 100, v8); spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v6); }
format: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV RDX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x40],0xa ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x18] MOV ESI,0xa CALL 0x0015b820 MOV RAX,qword ptr [RSP + 0x50] MOV EDI,dword ptr [RAX + 0x10] INC EDI MOV RSI,qword ptr [RSP + 0x48] LAB_0015fe9d: CALL 0x00155010 JMP 0x0015fea4 LAB_0015fea4: MOV RDI,qword ptr [RSP + 0x48] MOV byte ptr [RSP + 0xb],0x2f LEA RSI,[RSP + 0xb] CALL 0x0012a310 JMP 0x0015feba LAB_0015feba: MOV RAX,qword ptr [RSP + 0x50] MOV EDI,dword ptr [RAX + 0xc] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00155010 JMP 0x0015fece LAB_0015fece: MOV RDI,qword ptr [RSP + 0x48] MOV byte ptr [RSP + 0xa],0x2f LEA RSI,[RSP + 0xa] CALL 0x0012a310 JMP 0x0015fee4 LAB_0015fee4: MOV RAX,qword ptr [RSP + 0x50] MOVSXD RAX,dword ptr [RAX + 0x14] MOV EDI,EAX IMUL RAX,RAX,0x51eb851f MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x25 ADD EAX,ECX IMUL EAX,EAX,0x64 SUB EDI,EAX MOV RSI,qword ptr [RSP + 0x48] CALL 0x00155010 LAB_0015ff12: JMP 0x0015ff14 LAB_0015ff14: LEA RDI,[RSP + 0x18] CALL 0x0015b910 ADD RSP,0x68 RET
/* spdlog::details::D_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::D_formatter<spdlog::details::scoped_padder>::format (D_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { char local_5e [14]; scoped_padder local_50 [40]; int8 local_28; basic_memory_buffer *local_20; tm *local_18; log_msg *local_10; D_formatter<spdlog::details::scoped_padder> *local_8; local_28 = 10; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; scoped_padder::scoped_padder(local_50,10,(padding_info *)(this + 8),param_3); /* try { // try from 0015fe9d to 0015ff11 has its CatchHandler @ 0015ff23 */ fmt_helper::pad2(local_18->tm_mon + 1,local_20); local_5e[1] = 0x2f; fmt::v10::detail::buffer<char>::push_back((buffer<char> *)local_20,local_5e + 1); fmt_helper::pad2(local_18->tm_mday,local_20); local_5e[0] = '/'; fmt::v10::detail::buffer<char>::push_back((buffer<char> *)local_20,local_5e); fmt_helper::pad2(local_18->tm_year % 100,local_20); scoped_padder::~scoped_padder(local_50); return; }
50,457
el::base::utils::Registry<el::Logger, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::deepCopy(el::base::utils::AbstractRegistry<el::Logger, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, el::Logger*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, el::Logger*>>>> const&)
opengl-water/include/easylogging++.h
virtual void deepCopy(const AbstractRegistry<T_Ptr, std::unordered_map<T_Key, T_Ptr*>>& sr) ELPP_FINAL { for (const_iterator it = sr.cbegin(); it != sr.cend(); ++it) { registerNew(it->first, new T_Ptr(*it->second)); } }
O3
c
el::base::utils::Registry<el::Logger, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::deepCopy(el::base::utils::AbstractRegistry<el::Logger, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, el::Logger*, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, el::Logger*>>>> const&): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq %rsi, %rdi callq *0x38(%rax) movq %rax, %r15 movq (%rbx), %rax movq %rbx, %rdi callq *0x40(%rax) cmpq %rax, %r15 je 0x34f55 movl $0x298, %edi # imm = 0x298 callq 0x23170 movq %rax, %r12 movq 0x28(%r15), %rsi movq %rax, %rdi callq 0x2a3b0 leaq 0x8(%r15), %rsi movq (%r14), %rax movq %r14, %rdi movq %r12, %rdx callq *0x78(%rax) movq (%r15), %r15 jmp 0x34f19 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movl $0x298, %esi # imm = 0x298 movq %r12, %rdi callq 0x23140 movq %rbx, %rdi callq 0x234d0
_ZN2el4base5utils8RegistryINS_6LoggerENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8deepCopyERKNS1_16AbstractRegistryIS3_St13unordered_mapIS9_PS3_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_SD_EEEEE: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rdi, rsi call qword ptr [rax+38h] mov r15, rax loc_34F19: mov rax, [rbx] mov rdi, rbx call qword ptr [rax+40h] cmp r15, rax jz short loc_34F55 mov edi, 298h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax mov rsi, [r15+28h]; el::Logger * mov rdi, rax; this call _ZN2el6LoggerC2ERKS0_; el::Logger::Logger(el::Logger const&) lea rsi, [r15+8] mov rax, [r14] mov rdi, r14 mov rdx, r12 call qword ptr [rax+78h] mov r15, [r15] jmp short loc_34F19 loc_34F55: pop rbx pop r12 pop r14 pop r15 pop rbp retn mov rbx, rax mov esi, 298h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume
long long el::base::utils::Registry<el::Logger,std::string>::deepCopy(long long a1, long long a2) { long long i; // r15 long long result; // rax el::Logger *v4; // r12 for ( i = (*(long long ( **)(long long))(*(_QWORD *)a2 + 56LL))(a2); ; i = *(_QWORD *)i ) { result = (*(long long ( **)(long long))(*(_QWORD *)a2 + 64LL))(a2); if ( i == result ) break; v4 = (el::Logger *)operator new(0x298uLL); el::Logger::Logger(v4, *(const el::Logger **)(i + 40)); (*(void ( **)(long long, long long, el::Logger *))(*(_QWORD *)a1 + 120LL))(a1, i + 8, v4); } return result; }
deepCopy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RDI,RSI CALL qword ptr [RAX + 0x38] MOV R15,RAX LAB_00134f19: MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x40] CMP R15,RAX JZ 0x00134f55 MOV EDI,0x298 CALL 0x00123170 MOV R12,RAX MOV RSI,qword ptr [R15 + 0x28] LAB_00134f38: MOV RDI,RAX CALL 0x0012a3b0 LAB_00134f40: LEA RSI,[R15 + 0x8] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RDX,R12 CALL qword ptr [RAX + 0x78] MOV R15,qword ptr [R15] JMP 0x00134f19 LAB_00134f55: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* el::base::utils::Registry<el::Logger, std::__cxx11::string >::deepCopy(el::base::utils::AbstractRegistry<el::Logger, std::unordered_map<std::__cxx11::string, el::Logger*, std::hash<std::__cxx11::string >, std::equal_to<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, el::Logger*> > > > const&) */ void __thiscall el::base::utils::Registry<el::Logger,std::__cxx11::string>::deepCopy (Registry<el::Logger,std::__cxx11::string> *this,AbstractRegistry *param_1) { int8 *puVar1; int8 *puVar2; Logger *this_00; puVar1 = (int8 *)(**(code **)(*(long *)param_1 + 0x38))(param_1); while( true ) { puVar2 = (int8 *)(**(code **)(*(long *)param_1 + 0x40))(param_1); if (puVar1 == puVar2) break; this_00 = (Logger *)operator_new(0x298); /* try { // try from 00134f38 to 00134f3f has its CatchHandler @ 00134f5e */ Logger::Logger(this_00,(Logger *)puVar1[5]); (**(code **)(*(long *)this + 0x78))(this,puVar1 + 1,this_00); puVar1 = (int8 *)*puVar1; } return; }
50,458
my_snprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_mb2(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rsi, %r14 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0x7ce00 movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) leaq (%rsi,%rdx), %rbx decq %rbx leaq -0x40(%rbp), %r12 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0x7ce64 testl %eax, %eax je 0x7cfca cmpq %rbx, %r14 je 0x7cfc7 movb $0x0, (%r14) movb (%r15), %al movb %al, 0x1(%r14) addq $0x2, %r14 incq %r15 jmp 0x7ce36 addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0x7ce7f movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0x7ce84 incq %r15 jmp 0x7ce68 cmpl $0x6c, %ecx jne 0x7ce8e movb (%r15), %al jmp 0x7ce91 decq %r15 cmpb $0x64, %al je 0x7cec1 movzbl %al, %eax cmpl $0x75, %eax je 0x7cec1 cmpl $0x73, %eax jne 0x7cee9 movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x7cf56 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x7cf62 movq %rbx, %rax subq %r14, %rax cmpq $0x1f, %rax jbe 0x7cfca movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x7cefd movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x7cf09 cmpq %rbx, %r14 je 0x7cfc7 movw $0x2500, (%r14) # imm = 0x2500 jmp 0x7ce5b movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0x7cf1c movq %r12, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x7cf26 movl %edi, %edi movq %r12, %rsi movl $0xa, %edx callq 0x8f4c2 cmpb $0x0, -0x40(%rbp) je 0x7ce5f leaq -0x3f(%rbp), %rax movb $0x0, (%r14) movb -0x1(%rax), %cl movb %cl, 0x1(%r14) addq $0x2, %r14 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0x7cf39 jmp 0x7ce5f movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r12 subq %r14, %r12 testq %r13, %r13 leaq 0x1c0aa(%rip), %rax # 0x9901f cmoveq %rax, %r13 movq %r13, %rdi callq 0x363e0 leaq (%rax,%rax), %rdx movq %r12, %rcx shrq %rcx decq %rcx cmpq %rdx, %r12 cmovaq %rax, %rcx testq %rcx, %rcx je 0x7cfbe xorl %eax, %eax leaq -0x40(%rbp), %r12 movb $0x0, (%r14) movb (%r13,%rax), %dl movb %dl, 0x1(%r14) addq $0x2, %r14 incq %rax cmpq %rax, %rcx jne 0x7cfa0 jmp 0x7ce5f leaq -0x40(%rbp), %r12 jmp 0x7ce5f movq %rbx, %r14 movb $0x0, (%r14) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x7cff6 subq -0x68(%rbp), %r14 movq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x36290
my_snprintf_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_7CE00 movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_7CE00: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax lea rbx, [rsi+rdx] dec rbx lea r12, [rbp+var_40] mov [rbp+var_68], rsi loc_7CE36: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_7CE64 test eax, eax jz loc_7CFCA cmp r14, rbx jz loc_7CFC7 mov byte ptr [r14], 0 mov al, [r15] mov [r14+1], al loc_7CE5B: add r14, 2 loc_7CE5F: inc r15 jmp short loc_7CE36 loc_7CE64: add r15, 2 loc_7CE68: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_7CE7F movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_7CE84 loc_7CE7F: inc r15 jmp short loc_7CE68 loc_7CE84: cmp ecx, 6Ch ; 'l' jnz short loc_7CE8E mov al, [r15] jmp short loc_7CE91 loc_7CE8E: dec r15 loc_7CE91: cmp al, 64h ; 'd' jz short loc_7CEC1 movzx eax, al cmp eax, 75h ; 'u' jz short loc_7CEC1 cmp eax, 73h ; 's' jnz short loc_7CEE9 mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_7CF56 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_7CF62 loc_7CEC1: mov rax, rbx sub rax, r14 cmp rax, 1Fh jbe loc_7CFCA mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_7CEFD mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_7CF09 loc_7CEE9: cmp r14, rbx jz loc_7CFC7 mov word ptr [r14], 2500h jmp loc_7CE5B loc_7CEFD: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_7CF09: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_7CF1C mov rsi, r12 mov edx, 0FFFFFFF6h jmp short loc_7CF26 loc_7CF1C: mov edi, edi mov rsi, r12 mov edx, 0Ah loc_7CF26: call int10_to_str cmp [rbp+var_40], 0 jz loc_7CE5F lea rax, [rbp+var_3F] loc_7CF39: mov byte ptr [r14], 0 mov cl, [rax-1] mov [r14+1], cl add r14, 2 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_7CF39 jmp loc_7CE5F loc_7CF56: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_7CF62: mov r13, [rax] mov r12, rbx sub r12, r14 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, [rax+rax] mov rcx, r12 shr rcx, 1 dec rcx cmp r12, rdx cmova rcx, rax test rcx, rcx jz short loc_7CFBE xor eax, eax lea r12, [rbp+var_40] loc_7CFA0: mov byte ptr [r14], 0 mov dl, [r13+rax+0] mov [r14+1], dl add r14, 2 inc rax cmp rcx, rax jnz short loc_7CFA0 jmp loc_7CE5F loc_7CFBE: lea r12, [rbp+var_40] jmp loc_7CE5F loc_7CFC7: mov r14, rbx loc_7CFCA: mov byte ptr [r14], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_7CFF6 sub r14, [rbp+var_68] mov rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7CFF6: call ___stack_chk_fail
_BYTE * my_snprintf_mb2( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, _BYTE *a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { _BYTE *v16; // r14 long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r12 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] _BYTE *v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = (long long)&a10[a11 - 1]; v42 = a10; while ( *a12 == 37 ) { for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 == 100 || v18 == 117 ) { if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *v16 = 0; v16[1] = *(v23 - 1); v16 += 2; } while ( *v23++ != 0 ); } } else { if ( v18 != 115 ) { if ( v16 == (_BYTE *)v17 ) goto LABEL_43; *(_WORD *)v16 = 9472; goto LABEL_6; } if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - (_QWORD)v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 1) - 1; if ( v26 > 2 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *v16 = 0; v16[1] = v25[i]; v16 += 2; } } } LABEL_7: ++a12; } if ( !*a12 ) goto LABEL_44; if ( v16 != (_BYTE *)v17 ) { *v16 = 0; v16[1] = *a12; LABEL_6: v16 += 2; goto LABEL_7; } LABEL_43: v16 = (_BYTE *)v17; LABEL_44: *v16 = 0; return (_BYTE *)(v16 - v42); }
my_snprintf_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x0017ce00 MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_0017ce00: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX LEA RBX,[RSI + RDX*0x1] DEC RBX LEA R12,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_0017ce36: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x0017ce64 TEST EAX,EAX JZ 0x0017cfca CMP R14,RBX JZ 0x0017cfc7 MOV byte ptr [R14],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R14 + 0x1],AL LAB_0017ce5b: ADD R14,0x2 LAB_0017ce5f: INC R15 JMP 0x0017ce36 LAB_0017ce64: ADD R15,0x2 LAB_0017ce68: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x0017ce7f MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x0017ce84 LAB_0017ce7f: INC R15 JMP 0x0017ce68 LAB_0017ce84: CMP ECX,0x6c JNZ 0x0017ce8e MOV AL,byte ptr [R15] JMP 0x0017ce91 LAB_0017ce8e: DEC R15 LAB_0017ce91: CMP AL,0x64 JZ 0x0017cec1 MOVZX EAX,AL CMP EAX,0x75 JZ 0x0017cec1 CMP EAX,0x73 JNZ 0x0017cee9 MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x0017cf56 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x0017cf62 LAB_0017cec1: MOV RAX,RBX SUB RAX,R14 CMP RAX,0x1f JBE 0x0017cfca MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x0017cefd MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x0017cf09 LAB_0017cee9: CMP R14,RBX JZ 0x0017cfc7 MOV word ptr [R14],0x2500 JMP 0x0017ce5b LAB_0017cefd: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_0017cf09: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x0017cf1c MOV RSI,R12 MOV EDX,0xfffffff6 JMP 0x0017cf26 LAB_0017cf1c: MOV EDI,EDI MOV RSI,R12 MOV EDX,0xa LAB_0017cf26: CALL 0x0018f4c2 CMP byte ptr [RBP + -0x40],0x0 JZ 0x0017ce5f LEA RAX,[RBP + -0x3f] LAB_0017cf39: MOV byte ptr [R14],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R14 + 0x1],CL ADD R14,0x2 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x0017cf39 JMP 0x0017ce5f LAB_0017cf56: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_0017cf62: MOV R13,qword ptr [RAX] MOV R12,RBX SUB R12,R14 TEST R13,R13 LEA RAX,[0x19901f] CMOVZ R13,RAX MOV RDI,R13 CALL 0x001363e0 LEA RDX,[RAX + RAX*0x1] MOV RCX,R12 SHR RCX,0x1 DEC RCX CMP R12,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x0017cfbe XOR EAX,EAX LEA R12,[RBP + -0x40] LAB_0017cfa0: MOV byte ptr [R14],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R14 + 0x1],DL ADD R14,0x2 INC RAX CMP RCX,RAX JNZ 0x0017cfa0 JMP 0x0017ce5f LAB_0017cfbe: LEA R12,[RBP + -0x40] JMP 0x0017ce5f LAB_0017cfc7: MOV R14,RBX LAB_0017cfca: MOV byte ptr [R14],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0017cff6 SUB R14,qword ptr [RBP + -0x68] MOV RAX,R14 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017cff6: CALL 0x00136290
long my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int2 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int2 *puVar6; ulong uVar7; char *pcVar8; int2 *puVar9; long in_FS_OFFSET; int1 local_128 [32]; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int2 *local_70; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int2 *)((long)param_10 + param_11 + -1); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar9 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x20) { LAB_0017cfca: *(int1 *)puVar9 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar9 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar8 = local_48; do { pcVar8 = pcVar8 + 1; *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[-1]; param_10 = param_10 + 1; } while (*pcVar8 != '\0'); } } else { if (bVar1 != 0x73) { puVar9 = puVar6; if (param_10 != puVar6) { *param_10 = 0x2500; goto LAB_0017ce5b; } goto LAB_0017cfca; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar8 = *(char **)puVar2; if (pcVar8 == (char *)0x0) { pcVar8 = "(null)"; } sVar3 = strlen(pcVar8); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1; if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_0017cfca; *(int1 *)param_10 = 0; *(byte *)((long)param_10 + 1) = *param_12; LAB_0017ce5b: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
50,459
ps_fetch_float
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_float(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row) { switch(r_param->buffer_type) { case MYSQL_TYPE_FLOAT: { float *value= (float *)r_param->buffer; float4get(*value, *row); r_param->buffer_length= 4; *r_param->error= 0; } break; default: { float value; memcpy(&value, *row, sizeof(float)); float4get(value, (char *)*row); convert_from_float(r_param, field, value, sizeof(float)); } break; } (*row)+= 4; }
O0
c
ps_fetch_float: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x60(%rax), %eax subl $0x4, %eax jne 0x30456 jmp 0x30422 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movl (%rcx), %ecx movl %ecx, (%rax) movq -0x8(%rbp), %rax movq $0x4, 0x40(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb $0x0, (%rax) jmp 0x30485 movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movss -0x24(%rbp), %xmm0 movl $0x4, %edx callq 0x31cd0 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
ps_fetch_float: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+60h] sub eax, 4 jnz short loc_30456 jmp short $+2 loc_30422: mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov rcx, [rcx] mov ecx, [rcx] mov [rax], ecx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 4 mov rax, [rbp+var_8] mov rax, [rax+18h] mov byte ptr [rax], 0 jmp short loc_30485 loc_30456: mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_24], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] movss xmm0, [rbp+var_24] mov edx, 4 call convert_from_float loc_30485: mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 4 mov [rax], rcx add rsp, 30h pop rbp retn
float ** ps_fetch_float(long long a1, long long a2, float **a3) { float **result; // rax if ( *(_DWORD *)(a1 + 96) == 4 ) { **(float **)(a1 + 16) = **a3; *(_QWORD *)(a1 + 64) = 4LL; **(_BYTE **)(a1 + 24) = 0; } else { convert_from_float(a1, a2, 4LL, **a3); } result = a3; ++*a3; return result; }
ps_fetch_float: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x60] SUB EAX,0x4 JNZ 0x00130456 JMP 0x00130422 LAB_00130422: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],0x0 JMP 0x00130485 LAB_00130456: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RBP + -0x24] MOV EDX,0x4 CALL 0x00131cd0 LAB_00130485: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX ADD RSP,0x30 POP RBP RET
void ps_fetch_float(long param_1,int8 param_2,long *param_3) { if (*(int *)(param_1 + 0x60) == 4) { **(int4 **)(param_1 + 0x10) = *(int4 *)*param_3; *(int8 *)(param_1 + 0x40) = 4; **(int1 **)(param_1 + 0x18) = 0; } else { convert_from_float(*(int4 *)*param_3,param_1,param_2,4); } *param_3 = *param_3 + 4; return; }
50,460
mariadb_rpl_get_optionsv
eloqsql/libmariadb/libmariadb/mariadb_rpl.c
int mariadb_rpl_get_optionsv(MARIADB_RPL *rpl, enum mariadb_rpl_option option, ...) { va_list ap; if (!rpl) return 1; va_start(ap, option); switch (option) { case MARIADB_RPL_FILENAME: { const char **name= (const char **)va_arg(ap, char **); size_t *len= (size_t*)va_arg(ap, size_t *); *name= rpl->filename; *len= rpl->filename_length; break; } case MARIADB_RPL_SERVER_ID: { unsigned int *id= va_arg(ap, unsigned int *); *id= rpl->server_id; break; } case MARIADB_RPL_FLAGS: { unsigned int *flags= va_arg(ap, unsigned int *); *flags= rpl->flags; break; } case MARIADB_RPL_START: { unsigned long *start= va_arg(ap, unsigned long *); *start= rpl->start_position; break; } default: va_end(ap); return 1; break; } va_end(ap); return 0; }
O3
c
mariadb_rpl_get_optionsv: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdx, -0xc0(%rbp) movq %rcx, -0xb8(%rbp) movq %r8, -0xb0(%rbp) movq %r9, -0xa8(%rbp) testb %al, %al je 0x28bb3 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) testq %rdi, %rdi je 0x28c27 leaq -0xd0(%rbp), %rax movq %rax, -0x10(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x18(%rbp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, -0x20(%rbp) cmpl $0x3, %esi ja 0x28c27 movl %esi, %eax leaq 0x119ad(%rip), %rcx # 0x3a594 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl -0x20(%rbp), %edx cmpq $0x29, %rdx jae 0x28ca3 movq -0x10(%rbp), %rax movq %rdx, %rcx addq $0x8, %rcx movl %ecx, -0x20(%rbp) movq (%rax,%rdx), %rax cmpl $0x20, %edx ja 0x28cb2 addq -0x10(%rbp), %rcx addl $0x10, %edx movl %edx, -0x20(%rbp) jmp 0x28cbe movl $0x1, %eax jmp 0x28ce8 movl -0x20(%rbp), %ecx cmpq $0x28, %rcx ja 0x28c79 movq %rcx, %rax addq -0x10(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x20(%rbp) jmp 0x28c85 movl -0x20(%rbp), %ecx cmpq $0x28, %rcx ja 0x28c8d movq %rcx, %rax addq -0x10(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x20(%rbp) jmp 0x28c99 movl -0x20(%rbp), %ecx cmpq $0x28, %rcx ja 0x28cd0 movq %rcx, %rax addq -0x10(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x20(%rbp) jmp 0x28cdc movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movq (%rax), %rax movl 0x30(%rdi), %ecx jmp 0x28c9f movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movq (%rax), %rax movl 0x40(%rdi), %ecx movl %ecx, (%rax) jmp 0x28ce6 movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movq (%rax), %rax movq -0x18(%rbp), %rcx leaq 0x8(%rcx), %rdx movq %rdx, -0x18(%rbp) movq (%rcx), %rcx movq 0x10(%rdi), %rdx movq %rdx, (%rax) movl 0x18(%rdi), %eax movq %rax, (%rcx) jmp 0x28ce6 movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movq (%rax), %rax movq 0x38(%rdi), %rcx movq %rcx, (%rax) xorl %eax, %eax addq $0x50, %rsp popq %rbp retq nop
mariadb_rpl_get_optionsv: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C0], rdx mov [rbp+var_B8], rcx mov [rbp+var_B0], r8 mov [rbp+var_A8], r9 test al, al jz short loc_28BB3 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_28BB3: test rdi, rdi jz short def_28BEE; jumptable 0000000000028BEE default case lea rax, [rbp+var_D0] mov [rbp+var_10], rax lea rax, [rbp+arg_0] mov [rbp+var_18], rax mov rax, 3000000010h mov [rbp+var_20], rax cmp esi, 3; switch 4 cases ja short def_28BEE; jumptable 0000000000028BEE default case mov eax, esi lea rcx, jpt_28BEE movsxd rax, ds:(jpt_28BEE - 3A594h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_28BF0: mov edx, dword ptr [rbp+var_20]; jumptable 0000000000028BEE case 0 cmp rdx, 29h ; ')' jnb loc_28CA3 mov rax, [rbp+var_10] mov rcx, rdx add rcx, 8 mov dword ptr [rbp+var_20], ecx mov rax, [rax+rdx] cmp edx, 20h ; ' ' ja loc_28CB2 add rcx, [rbp+var_10] add edx, 10h mov dword ptr [rbp+var_20], edx jmp loc_28CBE def_28BEE: mov eax, 1; jumptable 0000000000028BEE default case jmp loc_28CE8 loc_28C31: mov ecx, dword ptr [rbp+var_20]; jumptable 0000000000028BEE case 2 cmp rcx, 28h ; '(' ja short loc_28C79 mov rax, rcx add rax, [rbp+var_10] add ecx, 8 mov dword ptr [rbp+var_20], ecx jmp short loc_28C85 loc_28C49: mov ecx, dword ptr [rbp+var_20]; jumptable 0000000000028BEE case 3 cmp rcx, 28h ; '(' ja short loc_28C8D mov rax, rcx add rax, [rbp+var_10] add ecx, 8 mov dword ptr [rbp+var_20], ecx jmp short loc_28C99 loc_28C61: mov ecx, dword ptr [rbp+var_20]; jumptable 0000000000028BEE case 1 cmp rcx, 28h ; '(' ja short loc_28CD0 mov rax, rcx add rax, [rbp+var_10] add ecx, 8 mov dword ptr [rbp+var_20], ecx jmp short loc_28CDC loc_28C79: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx loc_28C85: mov rax, [rax] mov ecx, [rdi+30h] jmp short loc_28C9F loc_28C8D: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx loc_28C99: mov rax, [rax] mov ecx, [rdi+40h] loc_28C9F: mov [rax], ecx jmp short loc_28CE6 loc_28CA3: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx mov rax, [rax] loc_28CB2: mov rcx, [rbp+var_18] lea rdx, [rcx+8] mov [rbp+var_18], rdx loc_28CBE: mov rcx, [rcx] mov rdx, [rdi+10h] mov [rax], rdx mov eax, [rdi+18h] mov [rcx], rax jmp short loc_28CE6 loc_28CD0: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx loc_28CDC: mov rax, [rax] mov rcx, [rdi+38h] mov [rax], rcx loc_28CE6: xor eax, eax loc_28CE8: add rsp, 50h pop rbp retn
long long mariadb_rpl_get_optionsv(long long a1, int a2, ...) { long long gp_offset; // rdx _QWORD *v3; // rax _QWORD **v4; // rcx long long result; // rax _DWORD **v6; // rax _DWORD **v7; // rax _QWORD **v8; // rax _DWORD *v9; // rax int v10; // ecx _QWORD **overflow_arg_area; // rax _QWORD *v12; // rcx va_list va; // [rsp+B0h] [rbp-20h] BYREF if ( !a1 ) return 1LL; va_start(va, a2); switch ( a2 ) { case 0: gp_offset = va[0].gp_offset; if ( va[0].gp_offset >= 0x29uLL ) { overflow_arg_area = (_QWORD **)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; v3 = *overflow_arg_area; v4 = (_QWORD **)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { va[0].gp_offset += 8; v3 = *(_QWORD **)((char *)va[0].reg_save_area + gp_offset); v4 = (_QWORD **)((char *)va[0].reg_save_area + gp_offset + 8); va[0].gp_offset = gp_offset + 16; } v12 = *v4; *v3 = *(_QWORD *)(a1 + 16); *v12 = *(unsigned int *)(a1 + 24); goto LABEL_23; case 1: if ( va[0].gp_offset > 0x28uLL ) { v8 = (_QWORD **)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v8 = (_QWORD **)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } **v8 = *(_QWORD *)(a1 + 56); goto LABEL_23; case 2: if ( va[0].gp_offset > 0x28uLL ) { v6 = (_DWORD **)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v6 = (_DWORD **)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } v9 = *v6; v10 = *(_DWORD *)(a1 + 48); goto LABEL_17; case 3: if ( va[0].gp_offset > 0x28uLL ) { v7 = (_DWORD **)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v7 = (_DWORD **)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } v9 = *v7; v10 = *(_DWORD *)(a1 + 64); LABEL_17: *v9 = v10; LABEL_23: result = 0LL; break; default: return 1LL; } return result; }
mariadb_rpl_get_optionsv: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0xc0],RDX MOV qword ptr [RBP + -0xb8],RCX MOV qword ptr [RBP + -0xb0],R8 MOV qword ptr [RBP + -0xa8],R9 TEST AL,AL JZ 0x00128bb3 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_00128bb3: TEST RDI,RDI JZ 0x00128c27 LEA RAX,[RBP + -0xd0] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,0x3000000010 MOV qword ptr [RBP + -0x20],RAX CMP ESI,0x3 JA 0x00128c27 MOV EAX,ESI LEA RCX,[0x13a594] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV EDX,dword ptr [RBP + -0x20] CMP RDX,0x29 JNC 0x00128ca3 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RDX ADD RCX,0x8 MOV dword ptr [RBP + -0x20],ECX MOV RAX,qword ptr [RAX + RDX*0x1] CMP EDX,0x20 JA 0x00128cb2 ADD RCX,qword ptr [RBP + -0x10] ADD EDX,0x10 MOV dword ptr [RBP + -0x20],EDX JMP 0x00128cbe default: MOV EAX,0x1 JMP 0x00128ce8 caseD_2: MOV ECX,dword ptr [RBP + -0x20] CMP RCX,0x28 JA 0x00128c79 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x10] ADD ECX,0x8 MOV dword ptr [RBP + -0x20],ECX JMP 0x00128c85 caseD_3: MOV ECX,dword ptr [RBP + -0x20] CMP RCX,0x28 JA 0x00128c8d MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x10] ADD ECX,0x8 MOV dword ptr [RBP + -0x20],ECX JMP 0x00128c99 caseD_1: MOV ECX,dword ptr [RBP + -0x20] CMP RCX,0x28 JA 0x00128cd0 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x10] ADD ECX,0x8 MOV dword ptr [RBP + -0x20],ECX JMP 0x00128cdc LAB_00128c79: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX LAB_00128c85: MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RDI + 0x30] JMP 0x00128c9f LAB_00128c8d: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX LAB_00128c99: MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RDI + 0x40] LAB_00128c9f: MOV dword ptr [RAX],ECX JMP 0x00128ce6 LAB_00128ca3: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RAX] LAB_00128cb2: MOV RCX,qword ptr [RBP + -0x18] LEA RDX,[RCX + 0x8] MOV qword ptr [RBP + -0x18],RDX LAB_00128cbe: MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RDI + 0x10] MOV qword ptr [RAX],RDX MOV EAX,dword ptr [RDI + 0x18] MOV qword ptr [RCX],RAX JMP 0x00128ce6 LAB_00128cd0: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX LAB_00128cdc: MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RDI + 0x38] MOV qword ptr [RAX],RCX LAB_00128ce6: XOR EAX,EAX LAB_00128ce8: ADD RSP,0x50 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00128ca3) */ /* WARNING: Removing unreachable block (ram,0x00128cb2) */ /* WARNING: Removing unreachable block (ram,0x00128c79) */ /* WARNING: Removing unreachable block (ram,0x00128cd0) */ /* WARNING: Removing unreachable block (ram,0x00128c8d) */ /* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffff38 : 0x00128c85 */ /* WARNING: Restarted to delay deadcode elimination for space: stack */ int8 mariadb_rpl_get_optionsv(long param_1,int4 param_2,int8 *param_3) { int4 uVar1; int8 *local_c8; ulong *local_c0; if (param_1 != 0) { switch(param_2) { case 0: *param_3 = *(int8 *)(param_1 + 0x10); *local_c0 = (ulong)*(uint *)(param_1 + 0x18); return 0; case 1: *local_c8 = *(int8 *)(param_1 + 0x38); return 0; case 2: uVar1 = *(int4 *)(param_1 + 0x30); break; case 3: uVar1 = *(int4 *)(param_1 + 0x40); break; default: goto LAB_00128ce8; } *(int4 *)local_c8 = uVar1; return 0; } LAB_00128ce8: return 1; }
50,461
d2b
eloqsql/strings/dtoa.c
static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc) { Bigint *b; int de, k; ULong *x, y, z; int i; #define d0 word0(d) #define d1 word1(d) b= Balloc(1, alloc); x= b->p.x; z= d0 & Frac_mask; d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ if ((de= (int)(d0 >> Exp_shift))) z|= Exp_msk1; if ((y= d1)) { if ((k= lo0bits(&y))) { x[0]= y | z << (32 - k); z>>= k; } else x[0]= y; i= b->wds= (x[1]= z) ? 2 : 1; } else { k= lo0bits(&z); x[0]= z; i= b->wds= 1; k+= 32; } if (de) { *e= de - Bias - (P-1) + k; *bits= P - k; } else { *e= de - Bias - (P-1) + 1 + k; *bits= 32*i - hi0bits(x[i-1]); } return b; #undef d0 #undef d1 }
O3
c
d2b: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x40(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %r12 movl $0x1, %edi movq %rcx, %rsi callq 0x58aa4 movq %rax, %r14 movq (%rax), %r13 movl 0x4(%r12), %ebx movl %ebx, %r15d andl $0xfffff, %r15d # imm = 0xFFFFF movl %r15d, -0x2c(%rbp) andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movl %ebx, 0x4(%r12) cmpl $0x100000, %ebx # imm = 0x100000 jb 0x58b78 orl $0x100000, %r15d # imm = 0x100000 movl %r15d, -0x2c(%rbp) movl (%r12), %eax movl %eax, -0x30(%rbp) testl %eax, %eax je 0x58bc2 leaq -0x30(%rbp), %r12 movq %r12, %rdi callq 0x5917d movl %eax, %ecx negb %cl movl %r15d, %edx shll %cl, %edx movl %eax, %ecx shrl %cl, %r15d testl %eax, %eax cmovel %eax, %edx orl (%r12), %edx movl %edx, (%r13) movl %r15d, 0x4(%r13) cmpl $0x1, %r15d movl $0x2, %r15d sbbl $0x0, %r15d movl %r15d, 0x14(%r14) jmp 0x58be7 leaq -0x2c(%rbp), %r12 movq %r12, %rdi callq 0x5917d movl (%r12), %ecx movl %ecx, (%r13) movl $0x1, 0x14(%r14) addl $0x20, %eax movl $0x1, %r15d cmpl $0x100000, %ebx # imm = 0x100000 jae 0x58c10 addl $0xfffffbce, %eax # imm = 0xFFFFFBCE movq -0x38(%rbp), %rcx movl %eax, (%rcx) movl %r15d, %eax shll $0x5, %r15d movl -0x4(%r13,%rax,4), %edi callq 0x5920e subl %eax, %r15d jmp 0x58c2b shrl $0x14, %ebx leal (%rbx,%rax), %ecx addl $0xfffffbcd, %ecx # imm = 0xFFFFFBCD movq -0x38(%rbp), %rdx movl %ecx, (%rdx) movl $0x35, %r15d subl %eax, %r15d movq -0x40(%rbp), %rax movl %r15d, (%rax) movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
d2b: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rdx mov [rbp+var_38], rsi mov r12, rdi mov edi, 1 mov rsi, rcx call Balloc mov r14, rax mov r13, [rax] mov ebx, [r12+4] mov r15d, ebx and r15d, 0FFFFFh mov [rbp+var_2C], r15d and ebx, 7FFFFFFFh mov [r12+4], ebx cmp ebx, offset unk_100000 jb short loc_58B78 or r15d, 100000h mov [rbp+var_2C], r15d loc_58B78: mov eax, [r12] mov [rbp+var_30], eax test eax, eax jz short loc_58BC2 lea r12, [rbp+var_30] mov rdi, r12 call lo0bits mov ecx, eax neg cl mov edx, r15d shl edx, cl mov ecx, eax shr r15d, cl test eax, eax cmovz edx, eax or edx, [r12] mov [r13+0], edx mov [r13+4], r15d cmp r15d, 1 mov r15d, 2 sbb r15d, 0 mov [r14+14h], r15d jmp short loc_58BE7 loc_58BC2: lea r12, [rbp+var_2C] mov rdi, r12 call lo0bits mov ecx, [r12] mov [r13+0], ecx mov dword ptr [r14+14h], 1 add eax, 20h ; ' ' mov r15d, 1 loc_58BE7: cmp ebx, offset unk_100000 jnb short loc_58C10 add eax, 0FFFFFBCEh mov rcx, [rbp+var_38] mov [rcx], eax mov eax, r15d shl r15d, 5 mov edi, [r13+rax*4-4] call hi0bits sub r15d, eax jmp short loc_58C2B loc_58C10: shr ebx, 14h lea ecx, [rbx+rax] add ecx, 0FFFFFBCDh mov rdx, [rbp+var_38] mov [rdx], ecx mov r15d, 35h ; '5' sub r15d, eax loc_58C2B: mov rax, [rbp+var_40] mov [rax], r15d mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long d2b(int *a1, _DWORD *a2, _DWORD *a3, long long a4) { long long v4; // r14 int *v5; // r13 int v6; // ebx unsigned int v7; // r15d unsigned int v8; // ebx int v9; // eax unsigned int v10; // edx unsigned int v11; // r15d unsigned int v12; // r15d int v13; // eax int v14; // r15d int v17; // [rsp+10h] [rbp-30h] BYREF int v18[11]; // [rsp+14h] [rbp-2Ch] BYREF v4 = Balloc(1, a4); v5 = *(int **)v4; v6 = a1[1]; v7 = v6 & 0xFFFFF; v18[0] = v6 & 0xFFFFF; v8 = v6 & 0x7FFFFFFF; a1[1] = v8; if ( v8 >= (unsigned int)&unk_100000 ) { v7 |= 0x100000u; v18[0] = v7; } v17 = *a1; if ( v17 ) { v9 = lo0bits(&v17); v10 = v7 << -(char)v9; v11 = v7 >> v9; if ( !v9 ) v10 = 0; *v5 = v17 | v10; v5[1] = v11; v12 = 2 - (v11 == 0); *(_DWORD *)(v4 + 20) = v12; } else { v13 = lo0bits(v18); *v5 = v18[0]; *(_DWORD *)(v4 + 20) = 1; v9 = v13 + 32; v12 = 1; } if ( v8 >= (unsigned int)&unk_100000 ) { *a2 = (v8 >> 20) + v9 - 1075; v14 = 53 - v9; } else { *a2 = v9 - 1074; v14 = 32 * v12 - hi0bits((unsigned int)v5[v12 - 1]); } *a3 = v14; return v4; }
d2b: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x38],RSI MOV R12,RDI MOV EDI,0x1 MOV RSI,RCX CALL 0x00158aa4 MOV R14,RAX MOV R13,qword ptr [RAX] MOV EBX,dword ptr [R12 + 0x4] MOV R15D,EBX AND R15D,0xfffff MOV dword ptr [RBP + -0x2c],R15D AND EBX,0x7fffffff MOV dword ptr [R12 + 0x4],EBX CMP EBX,0x100000 JC 0x00158b78 OR R15D,0x100000 MOV dword ptr [RBP + -0x2c],R15D LAB_00158b78: MOV EAX,dword ptr [R12] MOV dword ptr [RBP + -0x30],EAX TEST EAX,EAX JZ 0x00158bc2 LEA R12,[RBP + -0x30] MOV RDI,R12 CALL 0x0015917d MOV ECX,EAX NEG CL MOV EDX,R15D SHL EDX,CL MOV ECX,EAX SHR R15D,CL TEST EAX,EAX CMOVZ EDX,EAX OR EDX,dword ptr [R12] MOV dword ptr [R13],EDX MOV dword ptr [R13 + 0x4],R15D CMP R15D,0x1 MOV R15D,0x2 SBB R15D,0x0 MOV dword ptr [R14 + 0x14],R15D JMP 0x00158be7 LAB_00158bc2: LEA R12,[RBP + -0x2c] MOV RDI,R12 CALL 0x0015917d MOV ECX,dword ptr [R12] MOV dword ptr [R13],ECX MOV dword ptr [R14 + 0x14],0x1 ADD EAX,0x20 MOV R15D,0x1 LAB_00158be7: CMP EBX,0x100000 JNC 0x00158c10 ADD EAX,0xfffffbce MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX],EAX MOV EAX,R15D SHL R15D,0x5 MOV EDI,dword ptr [R13 + RAX*0x4 + -0x4] CALL 0x0015920e SUB R15D,EAX JMP 0x00158c2b LAB_00158c10: SHR EBX,0x14 LEA ECX,[RBX + RAX*0x1] ADD ECX,0xfffffbcd MOV RDX,qword ptr [RBP + -0x38] MOV dword ptr [RDX],ECX MOV R15D,0x35 SUB R15D,EAX LAB_00158c2b: MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX],R15D MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4) { uint *puVar1; int iVar2; long *plVar3; uint uVar4; uint uVar5; uint uVar6; uint local_38; uint local_34; plVar3 = (long *)Balloc(1,param_4); puVar1 = (uint *)*plVar3; uVar6 = param_1[1] & 0xfffff; uVar5 = param_1[1] & 0x7fffffff; param_1[1] = uVar5; if (0xfffff < uVar5) { uVar6 = uVar6 | 0x100000; } local_38 = *param_1; local_34 = uVar6; if (local_38 == 0) { iVar2 = lo0bits(&local_34); *puVar1 = local_34; *(int4 *)((long)plVar3 + 0x14) = 1; iVar2 = iVar2 + 0x20; uVar6 = 1; } else { iVar2 = lo0bits(&local_38); uVar4 = uVar6 << (-(byte)iVar2 & 0x1f); uVar6 = uVar6 >> ((byte)iVar2 & 0x1f); if (iVar2 == 0) { uVar4 = 0; } *puVar1 = uVar4 | local_38; puVar1[1] = uVar6; uVar6 = 2 - (uVar6 == 0); *(uint *)((long)plVar3 + 0x14) = uVar6; } if (uVar5 < 0x100000) { *param_2 = iVar2 + -0x432; iVar2 = hi0bits(puVar1[(ulong)uVar6 - 1]); iVar2 = uVar6 * 0x20 - iVar2; } else { *param_2 = (uVar5 >> 0x14) + iVar2 + -0x433; iVar2 = 0x35 - iVar2; } *param_3 = iVar2; return plVar3; }
50,462
ma_kpointer
eloqsql/storage/maria/ma_search.c
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos) { pos/=maria_block_size; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O3
c
ma_kpointer: movq %rdx, %rax leaq 0x316dd5(%rip), %rcx # 0x384060 xorl %edx, %edx divq (%rcx) movq (%rdi), %rcx movl 0x3e4(%rcx), %ecx decl %ecx cmpl $0x6, %ecx ja 0x6d32f leaq 0x741e1(%rip), %rdx # 0xe148c movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movb %al, 0x1(%rsi) shrq $0x8, %rax jmp 0x6d32c movq %rax, %rcx shrq $0x20, %rcx bswapl %eax movl %eax, 0x1(%rsi) movq %rcx, %rax jmp 0x6d32c movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x1(%rsi) shrq $0x10, %rax jmp 0x6d32c movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x2(%rsi) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x1(%rsi) shrq $0x18, %rax jmp 0x6d32c movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x2(%rsi) movb %cl, 0x1(%rsi) shrq $0x28, %rax jmp 0x6d32c movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x3(%rsi) movb %cl, 0x2(%rsi) movq %rax, %rcx shrq $0x28, %rcx movb %cl, 0x1(%rsi) shrq $0x30, %rax movb %al, (%rsi) retq pushq %rbp movq %rsp, %rbp callq 0x29600
_ma_kpointer: mov rax, rdx lea rcx, maria_block_size xor edx, edx div qword ptr [rcx] mov rcx, [rdi] mov ecx, [rcx+3E4h] dec ecx; switch 7 cases cmp ecx, 6 ja def_6D2B2; jumptable 000000000006D2B2 default case lea rdx, jpt_6D2B2 movsxd rcx, ds:(jpt_6D2B2 - 0E148Ch)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_6D2B4: mov [rsi+1], al; jumptable 000000000006D2B2 case 2 shr rax, 8 jmp short loc_6D32C; jumptable 000000000006D2B2 case 1 loc_6D2BD: mov rcx, rax; jumptable 000000000006D2B2 case 5 shr rcx, 20h bswap eax mov [rsi+1], eax mov rax, rcx jmp short loc_6D32C; jumptable 000000000006D2B2 case 1 loc_6D2CE: mov ecx, eax; jumptable 000000000006D2B2 case 3 rol cx, 8 mov [rsi+1], cx shr rax, 10h jmp short loc_6D32C; jumptable 000000000006D2B2 case 1 loc_6D2DE: mov ecx, eax; jumptable 000000000006D2B2 case 4 rol cx, 8 mov [rsi+2], cx mov ecx, eax shr ecx, 10h mov [rsi+1], cl shr rax, 18h jmp short loc_6D32C; jumptable 000000000006D2B2 case 1 loc_6D2F6: mov rcx, rax; jumptable 000000000006D2B2 case 6 shr rcx, 20h mov edx, eax bswap edx mov [rsi+2], edx mov [rsi+1], cl shr rax, 28h jmp short loc_6D32C; jumptable 000000000006D2B2 case 1 loc_6D30D: mov rcx, rax; jumptable 000000000006D2B2 case 7 shr rcx, 20h mov edx, eax bswap edx mov [rsi+3], edx mov [rsi+2], cl mov rcx, rax shr rcx, 28h mov [rsi+1], cl shr rax, 30h loc_6D32C: mov [rsi], al; jumptable 000000000006D2B2 case 1 retn def_6D2B2: push rbp; jumptable 000000000006D2B2 default case mov rbp, rsp call _abort
unsigned long long ma_kpointer(long long a1, long long a2, unsigned long long a3) { unsigned long long result; // rax unsigned long long v4; // rdx result = a3 / *(_QWORD *)&maria_block_size; v4 = a3 % *(_QWORD *)&maria_block_size; switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) ) { case 1: break; case 2: *(_BYTE *)(a2 + 1) = result; result >>= 8; break; case 3: *(_WORD *)(a2 + 1) = __ROL2__(result, 8); result >>= 16; break; case 4: *(_WORD *)(a2 + 2) = __ROL2__(result, 8); *(_BYTE *)(a2 + 1) = BYTE2(result); result >>= 24; break; case 5: *(_DWORD *)(a2 + 1) = _byteswap_ulong(result); result >>= 32; break; case 6: *(_DWORD *)(a2 + 2) = _byteswap_ulong(result); *(_BYTE *)(a2 + 1) = BYTE4(result); result >>= 40; break; case 7: *(_DWORD *)(a2 + 3) = _byteswap_ulong(result); *(_BYTE *)(a2 + 2) = BYTE4(result); *(_BYTE *)(a2 + 1) = BYTE5(result); result >>= 48; break; default: abort(a1, a2, v4); } *(_BYTE *)a2 = result; return result; }
_ma_kpointer: MOV RAX,RDX LEA RCX,[0x484060] XOR EDX,EDX DIV qword ptr [RCX] MOV RCX,qword ptr [RDI] MOV ECX,dword ptr [RCX + 0x3e4] DEC ECX CMP ECX,0x6 JA 0x0016d32f LEA RDX,[0x1e148c] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOV byte ptr [RSI + 0x1],AL SHR RAX,0x8 JMP 0x0016d32c caseD_5: MOV RCX,RAX SHR RCX,0x20 BSWAP EAX MOV dword ptr [RSI + 0x1],EAX MOV RAX,RCX JMP 0x0016d32c caseD_3: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x1],CX SHR RAX,0x10 JMP 0x0016d32c caseD_4: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x2],CX MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x18 JMP 0x0016d32c caseD_6: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x2],EDX MOV byte ptr [RSI + 0x1],CL SHR RAX,0x28 JMP 0x0016d32c caseD_7: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x3],EDX MOV byte ptr [RSI + 0x2],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x30 caseD_1: MOV byte ptr [RSI],AL RET default: PUSH RBP MOV RBP,RSP CALL 0x00129600
void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3) { int1 auVar1 [16]; int1 auVar2 [16]; ushort uVar3; uint uVar4; ulong uVar5; auVar1._8_8_ = 0; auVar1._0_8_ = maria_block_size; auVar2._8_8_ = 0; auVar2._0_8_ = param_3; auVar2 = auVar2 / auVar1; uVar5 = auVar2._0_8_; uVar4 = auVar2._0_4_; uVar3 = auVar2._0_2_; switch(*(int4 *)(*param_1 + 0x3e4)) { case 1: break; case 2: param_2[1] = auVar2[0]; uVar5 = uVar5 >> 8; break; case 3: *(ushort *)(param_2 + 1) = uVar3 << 8 | uVar3 >> 8; uVar5 = uVar5 >> 0x10; break; case 4: *(ushort *)(param_2 + 2) = uVar3 << 8 | uVar3 >> 8; param_2[1] = auVar2[2]; uVar5 = uVar5 >> 0x18; break; case 5: uVar5 = uVar5 >> 0x20; *(uint *)(param_2 + 1) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; break; case 6: *(uint *)(param_2 + 2) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[1] = auVar2[4]; uVar5 = uVar5 >> 0x28; break; case 7: *(uint *)(param_2 + 3) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[2] = auVar2[4]; param_2[1] = auVar2[5]; uVar5 = uVar5 >> 0x30; break; default: /* WARNING: Subroutine does not return */ abort(); } *param_2 = (char)uVar5; return; }
50,463
my_parse_charset_xml
eloqsql/strings/ctype.c
my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len) { MY_XML_PARSER p; struct my_cs_file_info info; my_bool rc; my_charset_file_init(&info); my_xml_parser_create(&p); my_xml_set_enter_handler(&p,cs_enter); my_xml_set_value_handler(&p,cs_value); my_xml_set_leave_handler(&p,cs_leave); info.loader= loader; my_xml_set_user_data(&p, (void *) &info); rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE; my_xml_parser_free(&p); my_charset_file_free(&info); if (rc != MY_XML_OK) { const char *errstr= my_xml_error_string(&p); if (sizeof(loader->error) > 32 + strlen(errstr)) { /* We cannot use my_snprintf() here. See previous comment. */ sprintf(loader->error, "at line %d pos %d: %s", my_xml_error_lineno(&p)+1, (int) my_xml_error_pos(&p), my_xml_error_string(&p)); } } return rc; }
O3
c
my_parse_charset_xml: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x928, %rsp # imm = 0x928 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x260(%rbp), %r15 movl $0xc8, %edx movq %r15, %rdi xorl %esi, %esi callq 0x292c0 xorps %xmm0, %xmm0 movups %xmm0, -0x58(%r15) movups %xmm0, -0x4f(%r15) leaq -0x190(%rbp), %r13 movq %r13, %rdi callq 0xd7e68 leaq 0x10e(%rip), %rsi # 0xd0d49 movq %r13, %rdi callq 0xd7edd leaq 0x1ec(%rip), %rsi # 0xd0e36 movq %r13, %rdi callq 0xd7ed0 leaq 0x9e5(%rip), %rsi # 0xd163e movq %r13, %rdi callq 0xd7eea movq %rbx, -0x948(%rbp) movq %rbx, 0xc8(%r15) leaq -0x940(%rbp), %rbx movq %r13, %rdi movq %rbx, %rsi callq 0xd7ef7 movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq 0xd73c8 movl %eax, %r14d movq %r13, %rdi callq 0xd7ea4 movq -0x58(%r15), %rdi movq 0x7a8(%rbx), %rax callq *0x98(%rax) testl %r14d, %r14d je 0xd0d1d leaq -0x190(%rbp), %rdi callq 0xd7f04 movq %rax, %rdi callq 0x29350 addq $0x20, %rax cmpq $0x7f, %rax ja 0xd0d1d leaq -0x190(%rbp), %rbx movq %rbx, %rdi callq 0xd7f41 leal 0x1(%rax), %r15d movq %rbx, %rdi callq 0xd7f0e movq %rax, %r12 movq %rbx, %rdi callq 0xd7f04 movq %rax, (%rsp) leaq 0xe3fa(%rip), %rcx # 0xdf0f9 movl $0x80, %edx movq -0x948(%rbp), %rdi movl $0x1, %esi movl %r15d, %r8d movl %r12d, %r9d xorl %eax, %eax callq 0x29970 testl %r14d, %r14d setne %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0xd0d44 addq $0x928, %rsp # imm = 0x928 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_parse_charset_xml: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 928h mov r14, rdx mov r12, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_260] mov edx, 0C8h mov rdi, r15 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [r15-58h], xmm0 movups xmmword ptr [r15-4Fh], xmm0 lea r13, [rbp+var_190] mov rdi, r13 call my_xml_parser_create lea rsi, cs_enter mov rdi, r13 call my_xml_set_enter_handler lea rsi, cs_value mov rdi, r13 call my_xml_set_value_handler lea rsi, cs_leave mov rdi, r13 call my_xml_set_leave_handler mov [rbp+var_948], rbx mov [r15+0C8h], rbx lea rbx, [rbp+var_940] mov rdi, r13 mov rsi, rbx call my_xml_set_user_data mov rdi, r13 mov rsi, r12 mov rdx, r14 call my_xml_parse mov r14d, eax mov rdi, r13 call my_xml_parser_free mov rdi, [r15-58h] mov rax, [rbx+7A8h] call qword ptr [rax+98h] test r14d, r14d jz short loc_D0D1D lea rdi, [rbp+var_190] call my_xml_error_string mov rdi, rax call _strlen add rax, 20h ; ' ' cmp rax, 7Fh ja short loc_D0D1D lea rbx, [rbp+var_190] mov rdi, rbx call my_xml_error_lineno lea r15d, [rax+1] mov rdi, rbx call my_xml_error_pos mov r12, rax mov rdi, rbx call my_xml_error_string mov [rsp+950h+var_950], rax lea rcx, aAtLineDPosDS; "at line %d pos %d: %s" mov edx, 80h mov rdi, [rbp+var_948] mov esi, 1 mov r8d, r15d mov r9d, r12d xor eax, eax call ___sprintf_chk loc_D0D1D: test r14d, r14d setnz al mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_D0D44 add rsp, 928h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D0D44: call ___stack_chk_fail
bool my_parse_charset_xml(long long a1, long long a2, long long a3) { int v4; // r14d long long v5; // rax int v6; // r15d int v7; // r12d const char *v8; // rax _QWORD v10[220]; // [rsp+10h] [rbp-940h] BYREF _BYTE v11[200]; // [rsp+6F0h] [rbp-260h] BYREF long long v12; // [rsp+7B8h] [rbp-198h] _BYTE v13[352]; // [rsp+7C0h] [rbp-190h] BYREF unsigned long long v14; // [rsp+920h] [rbp-30h] v14 = __readfsqword(0x28u); memset(v11, 0LL, sizeof(v11)); memset(&v10[209], 0, 25); my_xml_parser_create(v13); my_xml_set_enter_handler(v13, cs_enter); my_xml_set_value_handler(v13, cs_value); my_xml_set_leave_handler(v13, cs_leave); v12 = a1; my_xml_set_user_data(v13, v10); v4 = my_xml_parse(v13, a2, a3); my_xml_parser_free(v13); (*(void ( **)(_QWORD))(v12 + 152))(v10[209]); if ( v4 ) { v5 = my_xml_error_string(v13); if ( (unsigned long long)(strlen(v5) + 32) <= 0x7F ) { v6 = my_xml_error_lineno(v13) + 1; v7 = my_xml_error_pos(v13); v8 = (const char *)my_xml_error_string(v13); __sprintf_chk(a1, 1LL, 128LL, "at line %d pos %d: %s", v6, v7, v8); } } return v4 != 0; }
my_parse_charset_xml: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x928 MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x260] MOV EDX,0xc8 MOV RDI,R15 XOR ESI,ESI CALL 0x001292c0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + -0x58],XMM0 MOVUPS xmmword ptr [R15 + -0x4f],XMM0 LEA R13,[RBP + -0x190] MOV RDI,R13 CALL 0x001d7e68 LEA RSI,[0x1d0d49] MOV RDI,R13 CALL 0x001d7edd LEA RSI,[0x1d0e36] MOV RDI,R13 CALL 0x001d7ed0 LEA RSI,[0x1d163e] MOV RDI,R13 CALL 0x001d7eea MOV qword ptr [RBP + -0x948],RBX MOV qword ptr [R15 + 0xc8],RBX LEA RBX,[RBP + -0x940] MOV RDI,R13 MOV RSI,RBX CALL 0x001d7ef7 MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL 0x001d73c8 MOV R14D,EAX MOV RDI,R13 CALL 0x001d7ea4 MOV RDI,qword ptr [R15 + -0x58] MOV RAX,qword ptr [RBX + 0x7a8] CALL qword ptr [RAX + 0x98] TEST R14D,R14D JZ 0x001d0d1d LEA RDI,[RBP + -0x190] CALL 0x001d7f04 MOV RDI,RAX CALL 0x00129350 ADD RAX,0x20 CMP RAX,0x7f JA 0x001d0d1d LEA RBX,[RBP + -0x190] MOV RDI,RBX CALL 0x001d7f41 LEA R15D,[RAX + 0x1] MOV RDI,RBX CALL 0x001d7f0e MOV R12,RAX MOV RDI,RBX CALL 0x001d7f04 MOV qword ptr [RSP],RAX LEA RCX,[0x1df0f9] MOV EDX,0x80 MOV RDI,qword ptr [RBP + -0x948] MOV ESI,0x1 MOV R8D,R15D MOV R9D,R12D XOR EAX,EAX CALL 0x00129970 LAB_001d0d1d: TEST R14D,R14D SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001d0d44 ADD RSP,0x928 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d0d44: CALL 0x00129270
bool my_parse_charset_xml(long param_1,int8 param_2,int8 param_3) { int iVar1; int iVar2; int4 uVar3; char *__s; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_948 [1672]; int8 local_2c0; int1 uStack_2b8; int7 uStack_2b7; int1 uStack_2b0; int8 uStack_2af; int1 local_268 [200]; long local_1a0; int1 local_198 [352]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); memset(local_268,0,200); local_2c0 = 0; uStack_2b8 = 0; uStack_2b7 = 0; uStack_2b0 = 0; uStack_2af = 0; my_xml_parser_create(local_198); my_xml_set_enter_handler(local_198,cs_enter); my_xml_set_value_handler(local_198,cs_value); my_xml_set_leave_handler(local_198,cs_leave); local_1a0 = param_1; my_xml_set_user_data(local_198,local_948); iVar1 = my_xml_parse(local_198,param_2,param_3); my_xml_parser_free(local_198); (**(code **)(local_1a0 + 0x98))(local_2c0); if (iVar1 != 0) { __s = (char *)my_xml_error_string(local_198); sVar4 = strlen(__s); if (sVar4 + 0x20 < 0x80) { iVar2 = my_xml_error_lineno(local_198); uVar3 = my_xml_error_pos(local_198); uVar5 = my_xml_error_string(local_198); __sprintf_chk(param_1,1,0x80,"at line %d pos %d: %s",iVar2 + 1,uVar3,uVar5); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,464
path_to_nibbles
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static nibbles_t path_to_nibbles(bytes_t path, bool include_prefix) { int odd = include_prefix ? ((path.data[0] & 0x10) >> 4) : 0; int nibbles_len = path.len * 2 - (include_prefix ? (odd ? 1 : 2) : 0); uint8_t* nibbles = safe_calloc(nibbles_len, 1); for (int i = 0; i < nibbles_len; i++) nibbles[i] = path.data[(i + (include_prefix << 1) - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf; return bytes(nibbles, nibbles_len); }
O0
c
path_to_nibbles: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %dl, %al movl %edi, -0x20(%rbp) movq %rsi, -0x18(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) testb $0x1, -0x21(%rbp) je 0x1432e movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x10, %eax sarl $0x4, %eax movl %eax, -0x40(%rbp) jmp 0x14335 xorl %eax, %eax movl %eax, -0x40(%rbp) jmp 0x14335 movl -0x40(%rbp), %eax movl %eax, -0x28(%rbp) movl -0x20(%rbp), %eax shll %eax movl %eax, -0x44(%rbp) testb $0x1, -0x21(%rbp) je 0x14361 movl -0x28(%rbp), %edx movl $0x2, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x48(%rbp) jmp 0x14368 xorl %eax, %eax movl %eax, -0x48(%rbp) jmp 0x14368 movl -0x44(%rbp), %eax movl -0x48(%rbp), %ecx subl %ecx, %eax movl %eax, -0x2c(%rbp) movslq -0x2c(%rbp), %rdi movl $0x1, %esi callq 0x18620 movq %rax, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movl -0x3c(%rbp), %eax cmpl -0x2c(%rbp), %eax jge 0x143f4 movq -0x18(%rbp), %rax movl -0x3c(%rbp), %ecx movb -0x21(%rbp), %dl andb $0x1, %dl movzbl %dl, %edx shll %edx addl %edx, %ecx subl -0x28(%rbp), %ecx sarl %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x4c(%rbp) movl -0x3c(%rbp), %eax addl -0x28(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl -0x4c(%rbp), %eax movl %edx, %esi movl $0x4, %ecx xorl %edx, %edx cmpl $0x0, %esi cmovnel %edx, %ecx sarl %cl, %eax andl $0xf, %eax movb %al, %dl movq -0x38(%rbp), %rax movslq -0x3c(%rbp), %rcx movb %dl, (%rax,%rcx) movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x1438c movl -0x2c(%rbp), %eax movl %eax, -0x10(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x50, %rsp popq %rbp retq nop
path_to_nibbles: push rbp mov rbp, rsp sub rsp, 50h mov al, dl mov [rbp+var_20], edi mov [rbp+var_18], rsi and al, 1 mov [rbp+var_21], al test [rbp+var_21], 1 jz short loc_1432E mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 10h sar eax, 4 mov [rbp+var_40], eax jmp short loc_14335 loc_1432E: xor eax, eax mov [rbp+var_40], eax jmp short $+2 loc_14335: mov eax, [rbp+var_40] mov [rbp+var_28], eax mov eax, [rbp+var_20] shl eax, 1 mov [rbp+var_44], eax test [rbp+var_21], 1 jz short loc_14361 mov edx, [rbp+var_28] mov eax, 2 mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_48], eax jmp short loc_14368 loc_14361: xor eax, eax mov [rbp+var_48], eax jmp short $+2 loc_14368: mov eax, [rbp+var_44] mov ecx, [rbp+var_48] sub eax, ecx mov [rbp+var_2C], eax movsxd rdi, [rbp+var_2C] mov esi, 1 call safe_calloc mov [rbp+var_38], rax mov [rbp+var_3C], 0 loc_1438C: mov eax, [rbp+var_3C] cmp eax, [rbp+var_2C] jge short loc_143F4 mov rax, [rbp+var_18] mov ecx, [rbp+var_3C] mov dl, [rbp+var_21] and dl, 1 movzx edx, dl shl edx, 1 add ecx, edx sub ecx, [rbp+var_28] sar ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] mov [rbp+var_4C], eax mov eax, [rbp+var_3C] add eax, [rbp+var_28] mov ecx, 2 cdq idiv ecx mov eax, [rbp+var_4C] mov esi, edx mov ecx, 4 xor edx, edx cmp esi, 0 cmovnz ecx, edx sar eax, cl and eax, 0Fh mov dl, al mov rax, [rbp+var_38] movsxd rcx, [rbp+var_3C] mov [rax+rcx], dl mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp short loc_1438C loc_143F4: mov eax, [rbp+var_2C] mov [rbp+var_10], eax mov rax, [rbp+var_38] mov [rbp+var_8], rax mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 50h pop rbp retn
long long path_to_nibbles(int a1, _BYTE *a2, char a3) { int v3; // eax char v4; // cl int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] int v8; // [rsp+10h] [rbp-40h] int i; // [rsp+14h] [rbp-3Ch] long long v10; // [rsp+18h] [rbp-38h] int v11; // [rsp+24h] [rbp-2Ch] char v12; // [rsp+2Fh] [rbp-21h] v12 = a3 & 1; if ( (a3 & 1) != 0 ) v8 = (*a2 & 0x10) >> 4; else v8 = 0; v7 = 2 * a1; if ( (a3 & 1) != 0 ) { v3 = 2; if ( v8 ) v3 = 1; v6 = v3; } else { v6 = 0; } v11 = v7 - v6; v10 = safe_calloc(v7 - v6, 1LL); for ( i = 0; i < v11; ++i ) { v4 = 4; if ( (v8 + i) % 2 ) v4 = 0; *(_BYTE *)(v10 + i) = ((int)(unsigned __int8)a2[(2 * (v12 & 1) + i - v8) >> 1] >> v4) & 0xF; } return (unsigned int)v11; }
path_to_nibbles: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AL,DL MOV dword ptr [RBP + -0x20],EDI MOV qword ptr [RBP + -0x18],RSI AND AL,0x1 MOV byte ptr [RBP + -0x21],AL TEST byte ptr [RBP + -0x21],0x1 JZ 0x0011432e MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x10 SAR EAX,0x4 MOV dword ptr [RBP + -0x40],EAX JMP 0x00114335 LAB_0011432e: XOR EAX,EAX MOV dword ptr [RBP + -0x40],EAX JMP 0x00114335 LAB_00114335: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x20] SHL EAX,0x1 MOV dword ptr [RBP + -0x44],EAX TEST byte ptr [RBP + -0x21],0x1 JZ 0x00114361 MOV EDX,dword ptr [RBP + -0x28] MOV EAX,0x2 MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x48],EAX JMP 0x00114368 LAB_00114361: XOR EAX,EAX MOV dword ptr [RBP + -0x48],EAX JMP 0x00114368 LAB_00114368: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,dword ptr [RBP + -0x48] SUB EAX,ECX MOV dword ptr [RBP + -0x2c],EAX MOVSXD RDI,dword ptr [RBP + -0x2c] MOV ESI,0x1 CALL 0x00118620 MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x0 LAB_0011438c: MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,dword ptr [RBP + -0x2c] JGE 0x001143f4 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x3c] MOV DL,byte ptr [RBP + -0x21] AND DL,0x1 MOVZX EDX,DL SHL EDX,0x1 ADD ECX,EDX SUB ECX,dword ptr [RBP + -0x28] SAR ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x28] MOV ECX,0x2 CDQ IDIV ECX MOV EAX,dword ptr [RBP + -0x4c] MOV ESI,EDX MOV ECX,0x4 XOR EDX,EDX CMP ESI,0x0 CMOVNZ ECX,EDX SAR EAX,CL AND EAX,0xf MOV DL,AL MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,dword ptr [RBP + -0x3c] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0011438c LAB_001143f4: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x10],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
int1 [16] path_to_nibbles(int param_1,byte *param_2,byte param_3) { long lVar1; sbyte sVar2; int1 auVar3 [16]; int local_50; int local_48; int local_44; param_3 = param_3 & 1; if (param_3 == 0) { local_48 = 0; } else { local_48 = (int)(*param_2 & 0x10) >> 4; } if (param_3 == 0) { local_50 = 0; } else { local_50 = 2; if (local_48 != 0) { local_50 = 1; } } auVar3._0_4_ = param_1 * 2 - local_50; lVar1 = safe_calloc((long)(int)auVar3._0_4_,1); for (local_44 = 0; local_44 < (int)auVar3._0_4_; local_44 = local_44 + 1) { sVar2 = 4; if ((local_44 + local_48) % 2 != 0) { sVar2 = 0; } *(byte *)(lVar1 + local_44) = (byte)((int)(uint)param_2[(int)((local_44 + (uint)param_3 * 2) - local_48) >> 1] >> sVar2) & 0xf; } auVar3._4_4_ = 0; auVar3._8_8_ = lVar1; return auVar3; }
50,465
path_to_nibbles
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static nibbles_t path_to_nibbles(bytes_t path, bool include_prefix) { int odd = include_prefix ? ((path.data[0] & 0x10) >> 4) : 0; int nibbles_len = path.len * 2 - (include_prefix ? (odd ? 1 : 2) : 0); uint8_t* nibbles = safe_calloc(nibbles_len, 1); for (int i = 0; i < nibbles_len; i++) nibbles[i] = path.data[(i + (include_prefix << 1) - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf; return bytes(nibbles, nibbles_len); }
O1
c
path_to_nibbles: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d movq %rsi, %rbx xorl %eax, %eax movl $0x0, %r12d testl %edx, %edx je 0x1043e movzbl (%rbx), %r12d shrl $0x4, %r12d andl $0x1, %r12d cmpl $0x1, %r12d movl $0xffffffff, %ecx # imm = 0xFFFFFFFF sbbl $0x0, %ecx testb %r14b, %r14b cmovnel %ecx, %eax leal (%rax,%rdi,2), %ebp movslq %ebp, %r15 movl $0x1, %esi movq %r15, %rdi callq 0x1285b movq %rax, %rdx testl %r15d, %r15d jle 0x104b1 movl %ebp, %eax leal (,%r12,4), %esi negl %r12d movslq %r12d, %rcx movzbl %r14b, %edi leaq (%rcx,%rdi,2), %rdi xorl %r8d, %r8d leal (%rdi,%r8), %ecx sarl %ecx movslq %ecx, %rcx movzbl (%rbx,%rcx), %r9d movl %esi, %ecx notb %cl andb $0x4, %cl shrl %cl, %r9d andb $0xf, %r9b movb %r9b, (%rdx,%r8) incq %r8 addl $0x4, %esi cmpq %r8, %rax jne 0x10486 movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
path_to_nibbles: push rbp push r15 push r14 push r12 push rbx mov r14d, edx mov rbx, rsi xor eax, eax mov r12d, 0 test edx, edx jz short loc_1043E movzx r12d, byte ptr [rbx] shr r12d, 4 and r12d, 1 loc_1043E: cmp r12d, 1 mov ecx, 0FFFFFFFFh sbb ecx, 0 test r14b, r14b cmovnz eax, ecx lea ebp, [rax+rdi*2] movsxd r15, ebp mov esi, 1 mov rdi, r15 call safe_calloc mov rdx, rax test r15d, r15d jle short loc_104B1 mov eax, ebp lea esi, ds:0[r12*4] neg r12d movsxd rcx, r12d movzx edi, r14b lea rdi, [rcx+rdi*2] xor r8d, r8d loc_10486: lea ecx, [rdi+r8] sar ecx, 1 movsxd rcx, ecx movzx r9d, byte ptr [rbx+rcx] mov ecx, esi not cl and cl, 4 shr r9d, cl and r9b, 0Fh mov [rdx+r8], r9b inc r8 add esi, 4 cmp rax, r8 jnz short loc_10486 loc_104B1: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long path_to_nibbles(int a1, unsigned __int8 *a2, int a3) { unsigned __int8 v3; // r14 int v5; // eax unsigned int v6; // r12d int v7; // ebp long long v8; // rdx int v9; // esi long long i; // r8 v3 = a3; v5 = 0; v6 = 0; if ( a3 ) v6 = (*a2 >> 4) & 1; if ( (_BYTE)a3 ) v5 = ((v6 | 0xFFFFFFFF00000000LL) - 1) >> 32; v7 = v5 + 2 * a1; v8 = safe_calloc(v7, 1LL); if ( v7 > 0 ) { v9 = 4 * v6; for ( i = 0LL; i != v7; ++i ) { *(_BYTE *)(v8 + i) = (a2[(int)(2 * v3 - v6 + i) >> 1] >> (~(_BYTE)v9 & 4)) & 0xF; v9 += 4; } } return (unsigned int)v7; }
path_to_nibbles: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX MOV RBX,RSI XOR EAX,EAX MOV R12D,0x0 TEST EDX,EDX JZ 0x0011043e MOVZX R12D,byte ptr [RBX] SHR R12D,0x4 AND R12D,0x1 LAB_0011043e: CMP R12D,0x1 MOV ECX,0xffffffff SBB ECX,0x0 TEST R14B,R14B CMOVNZ EAX,ECX LEA EBP,[RAX + RDI*0x2] MOVSXD R15,EBP MOV ESI,0x1 MOV RDI,R15 CALL 0x0011285b MOV RDX,RAX TEST R15D,R15D JLE 0x001104b1 MOV EAX,EBP LEA ESI,[R12*0x4] NEG R12D MOVSXD RCX,R12D MOVZX EDI,R14B LEA RDI,[RCX + RDI*0x2] XOR R8D,R8D LAB_00110486: LEA ECX,[RDI + R8*0x1] SAR ECX,0x1 MOVSXD RCX,ECX MOVZX R9D,byte ptr [RBX + RCX*0x1] MOV ECX,ESI NOT CL AND CL,0x4 SHR R9D,CL AND R9B,0xf MOV byte ptr [RDX + R8*0x1],R9B INC R8 ADD ESI,0x4 CMP RAX,R8 JNZ 0x00110486 LAB_001104b1: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
uint path_to_nibbles(int param_1,byte *param_2,uint param_3) { long lVar1; uint uVar2; int iVar3; ulong uVar4; uint uVar5; uVar5 = 0; if (param_3 != 0) { uVar5 = *param_2 >> 4 & 1; } iVar3 = 0; if ((char)param_3 != '\0') { iVar3 = -1 - (uint)(uVar5 == 0); } uVar2 = iVar3 + param_1 * 2; lVar1 = safe_calloc((long)(int)uVar2,1); if (0 < (int)uVar2) { iVar3 = uVar5 * 4; uVar4 = 0; do { *(byte *)(lVar1 + uVar4) = param_2[(int)(((param_3 & 0xff) * 2 - uVar5) + (int)uVar4) >> 1] >> (~(byte)iVar3 & 4) & 0xf; uVar4 = uVar4 + 1; iVar3 = iVar3 + 4; } while (uVar2 != uVar4); } return uVar2; }
50,466
path_to_nibbles
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static nibbles_t path_to_nibbles(bytes_t path, bool include_prefix) { int odd = include_prefix ? ((path.data[0] & 0x10) >> 4) : 0; int nibbles_len = path.len * 2 - (include_prefix ? (odd ? 1 : 2) : 0); uint8_t* nibbles = safe_calloc(nibbles_len, 1); for (int i = 0; i < nibbles_len; i++) nibbles[i] = path.data[(i + (include_prefix << 1) - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf; return bytes(nibbles, nibbles_len); }
O2
c
path_to_nibbles: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx xorl %r15d, %r15d movl $0x0, %r13d movl $0x0, %eax movl $0x0, %r12d testl %edx, %edx je 0xf766 movb (%rbx), %al shrb $0x4, %al andb $0x1, %al movzbl %al, %r12d cmpb $0x1, %r12b pushq $-0x1 popq %rax sbbl $0x0, %eax pushq $0x2 popq %r13 leal (%rax,%rdi,2), %ebp movslq %ebp, %r14 pushq $0x1 popq %rsi movq %r14, %rdi callq 0x1189d movq %rax, %rdx testl %r14d, %r14d movl $0x0, %eax cmovgl %ebp, %eax subl %r12d, %r13d shll $0x2, %r12d cmpq %r15, %rax je 0xf7b9 leal (%r15,%r13), %ecx sarl %ecx movslq %ecx, %rcx movzbl (%rbx,%rcx), %esi movl %r12d, %ecx notb %cl andb $0x4, %cl shrl %cl, %esi andb $0xf, %sil movb %sil, (%rdx,%r15) incq %r15 addl $0x4, %r12d jmp 0xf78c movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
path_to_nibbles: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi xor r15d, r15d mov r13d, 0 mov eax, 0 mov r12d, 0 test edx, edx jz short loc_F766 mov al, [rbx] shr al, 4 and al, 1 movzx r12d, al cmp r12b, 1 push 0FFFFFFFFFFFFFFFFh pop rax sbb eax, 0 push 2 pop r13 loc_F766: lea ebp, [rax+rdi*2] movsxd r14, ebp push 1 pop rsi mov rdi, r14 call safe_calloc mov rdx, rax test r14d, r14d mov eax, 0 cmovg eax, ebp sub r13d, r12d shl r12d, 2 loc_F78C: cmp rax, r15 jz short loc_F7B9 lea ecx, [r15+r13] sar ecx, 1 movsxd rcx, ecx movzx esi, byte ptr [rbx+rcx] mov ecx, r12d not cl and cl, 4 shr esi, cl and sil, 0Fh mov [rdx+r15], sil inc r15 add r12d, 4 jmp short loc_F78C loc_F7B9: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long path_to_nibbles(int a1, _BYTE *a2, int a3) { long long v3; // r15 int v4; // r13d int v5; // eax BOOL v6; // r12d int v7; // ebp long long v8; // rdx long long v9; // rax int v10; // r13d int v11; // r12d v3 = 0LL; v4 = 0; v5 = 0; v6 = 0; if ( a3 ) { v6 = (*a2 & 0x10) != 0; v5 = -1 - ((*a2 & 0x10) == 0); v4 = 2; } v7 = v5 + 2 * a1; v8 = safe_calloc(v7, 1LL); v9 = 0LL; if ( v7 > 0 ) v9 = (unsigned int)v7; v10 = v4 - v6; v11 = 4 * v6; while ( v9 != v3 ) { *(_BYTE *)(v8 + v3) = ((unsigned __int8)a2[((int)v3 + v10) >> 1] >> (~(_BYTE)v11 & 4)) & 0xF; ++v3; v11 += 4; } return (unsigned int)v7; }
path_to_nibbles: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI XOR R15D,R15D MOV R13D,0x0 MOV EAX,0x0 MOV R12D,0x0 TEST EDX,EDX JZ 0x0010f766 MOV AL,byte ptr [RBX] SHR AL,0x4 AND AL,0x1 MOVZX R12D,AL CMP R12B,0x1 PUSH -0x1 POP RAX SBB EAX,0x0 PUSH 0x2 POP R13 LAB_0010f766: LEA EBP,[RAX + RDI*0x2] MOVSXD R14,EBP PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0011189d MOV RDX,RAX TEST R14D,R14D MOV EAX,0x0 CMOVG EAX,EBP SUB R13D,R12D SHL R12D,0x2 LAB_0010f78c: CMP RAX,R15 JZ 0x0010f7b9 LEA ECX,[R15 + R13*0x1] SAR ECX,0x1 MOVSXD RCX,ECX MOVZX ESI,byte ptr [RBX + RCX*0x1] MOV ECX,R12D NOT CL AND CL,0x4 SHR ESI,CL AND SIL,0xf MOV byte ptr [RDX + R15*0x1],SIL INC R15 ADD R12D,0x4 JMP 0x0010f78c LAB_0010f7b9: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint path_to_nibbles(int param_1,byte *param_2,int param_3) { uint uVar1; byte bVar2; int iVar3; long lVar4; ulong uVar5; uint uVar6; int iVar7; ulong uVar8; uVar8 = 0; iVar7 = 0; iVar3 = 0; uVar6 = 0; if (param_3 != 0) { bVar2 = *param_2 >> 4 & 1; uVar6 = (uint)bVar2; iVar3 = -1 - (uint)(bVar2 == 0); iVar7 = 2; } uVar1 = iVar3 + param_1 * 2; lVar4 = safe_calloc((long)(int)uVar1,1); uVar5 = 0; if (0 < (int)uVar1) { uVar5 = (ulong)uVar1; } iVar3 = uVar6 << 2; for (; uVar5 != uVar8; uVar8 = uVar8 + 1) { *(byte *)(lVar4 + uVar8) = param_2[(int)((int)uVar8 + (iVar7 - uVar6)) >> 1] >> (~(byte)iVar3 & 4) & 0xf; iVar3 = iVar3 + 4; } return uVar1; }
50,467
ftxui::Utf8ToWordBreakProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp
std::vector<WordBreakProperty> Utf8ToWordBreakProperty( const std::string& input) { std::vector<WordBreakProperty> out; out.reserve(input.size()); size_t start = 0; size_t end = 0; while (start < input.size()) { uint32_t codepoint = 0; if (!EatCodePoint(input, start, &end, &codepoint)) { start = end; continue; } start = end; // Ignore control characters. if (IsControl(codepoint)) { continue; } // Ignore combining characters. if (IsCombining(codepoint)) { continue; } WordBreakPropertyInterval interval = {0, 0, WBP::ALetter}; std::ignore = Bisearch(codepoint, g_word_break_intervals, &interval); out.push_back(interval.property); } return out; }
O3
cpp
ftxui::Utf8ToWordBreakProperty(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 $0x28, %rsp movq %rsi, %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rsi), %rsi movq %rdi, 0x8(%rsp) callq 0x3b366 movq $0x0, 0x20(%rsp) movq 0x8(%r14), %rbx testq %rbx, %rbx je 0x3afbe xorl %r15d, %r15d leaq 0x20(%rsp), %r12 leaq 0x4(%rsp), %r13 movl $0x0, 0x4(%rsp) movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movq %r13, %rcx callq 0x3a5b4 movq 0x20(%rsp), %r15 testb %al, %al je 0x3afb5 movl 0x4(%rsp), %ebp testl %ebp, %ebp je 0x3afb5 cmpl $0x1f, %ebp ja 0x3af59 cmpl $0xa, %ebp je 0x3af61 jmp 0x3afb5 leal -0x7f(%rbp), %eax cmpl $0x21, %eax jb 0x3afb5 movl %ebp, %edi callq 0x3a6d0 testb %al, %al jne 0x3afb5 movl $0x0, 0x18(%rsp) movq $0x0, 0x10(%rsp) movl %ebp, %edi leaq 0x10(%rsp), %rsi callq 0x3a7c4 movq 0x8(%rsp), %rdi movq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi je 0x3afa7 movb 0x18(%rsp), %al movb %al, (%rsi) incq %rsi movq %rsi, 0x8(%rdi) jmp 0x3afb5 leaq 0x18(%rsp), %rdx callq 0x3b3f8 movq 0x8(%r14), %rbx cmpq %rbx, %r15 jb 0x3af23 movq 0x8(%rsp), %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3afd4 movq %rax, %r14 movq 0x8(%rsp), %rax movq (%rax), %rdi testq %rdi, %rdi je 0x3aff5 movq 0x8(%rsp), %rax movq 0x10(%rax), %rsi subq %rdi, %rsi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui23Utf8ToWordBreakPropertyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rsi+8] mov [rsp+58h+var_54+4], rdi call _ZNSt6vectorIN5ftxui17WordBreakPropertyESaIS1_EE7reserveEm; std::vector<ftxui::WordBreakProperty>::reserve(ulong) mov [rsp+58h+var_38], 0 mov rbx, [r14+8] test rbx, rbx jz loc_3AFBE xor r15d, r15d lea r12, [rsp+58h+var_38] lea r13, [rsp+58h+var_54] loc_3AF23: mov dword ptr [rsp+58h+var_54], 0 mov rdi, r14 mov rsi, r15; unsigned int mov rdx, r12 mov rcx, r13 call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *) mov r15, [rsp+58h+var_38] test al, al jz short loc_3AFB5 mov ebp, dword ptr [rsp+58h+var_54] test ebp, ebp jz short loc_3AFB5 cmp ebp, 1Fh ja short loc_3AF59 cmp ebp, 0Ah jz short loc_3AF61 jmp short loc_3AFB5 loc_3AF59: lea eax, [rbp-7Fh] cmp eax, 21h ; '!' jb short loc_3AFB5 loc_3AF61: mov edi, ebp; this call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint) test al, al jnz short loc_3AFB5 mov [rsp+58h+var_40], 0 mov [rsp+58h+var_48], 0 mov edi, ebp lea rsi, [rsp+58h+var_48] call _ZN12_GLOBAL__N_18BisearchINS_25WordBreakPropertyIntervalELm993EEEbjRKSt5arrayIT_XT0_EEPS3_; `anonymous namespace'::Bisearch<`anonymous namespace'::WordBreakPropertyInterval,993ul>(uint,std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul> const&,`anonymous namespace'::WordBreakPropertyInterval*) mov rdi, [rsp+58h+var_54+4] mov rsi, [rdi+8] cmp rsi, [rdi+10h] jz short loc_3AFA7 mov al, byte ptr [rsp+58h+var_40] mov [rsi], al inc rsi mov [rdi+8], rsi jmp short loc_3AFB5 loc_3AFA7: lea rdx, [rsp+58h+var_40] call _ZNSt6vectorIN5ftxui17WordBreakPropertyESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<ftxui::WordBreakProperty>::_M_realloc_insert<ftxui::WordBreakProperty const&>(__gnu_cxx::__normal_iterator<ftxui::WordBreakProperty*,std::vector<ftxui::WordBreakProperty>>,ftxui::WordBreakProperty const&) mov rbx, [r14+8] loc_3AFB5: cmp r15, rbx jb loc_3AF23 loc_3AFBE: mov rax, [rsp+58h+var_54+4] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_3AFD4: mov r14, rax mov rax, [rsp+arg_0] mov rdi, [rax]; void * test rdi, rdi jz short loc_3AFF5 mov rax, [rsp+arg_0] mov rsi, [rax+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AFF5: mov rdi, r14 call __Unwind_Resume
long long ftxui::Utf8ToWordBreakProperty(long long a1, long long *a2) { long long v3; // rsi unsigned long long v4; // rbx unsigned long long v5; // r15 char v6; // al unsigned int v7; // ebp long long v8; // rdi _BYTE *v9; // rsi int v11[3]; // [rsp+4h] [rbp-54h] BYREF long long v12; // [rsp+10h] [rbp-48h] BYREF int v13; // [rsp+18h] [rbp-40h] BYREF unsigned long long v14[7]; // [rsp+20h] [rbp-38h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v3 = a2[1]; *(_QWORD *)&v11[1] = a1; std::vector<ftxui::WordBreakProperty>::reserve(a1, v3); v14[0] = 0LL; v4 = a2[1]; if ( v4 ) { v5 = 0LL; do { v11[0] = 0; v6 = ftxui::EatCodePoint(a2, v5, v14, v11); v5 = v14[0]; if ( v6 ) { v7 = v11[0]; if ( v11[0] ) { if ( v11[0] > 0x1Fu ) { if ( (unsigned int)(v11[0] - 127) >= 0x21 ) { LABEL_9: if ( !ftxui::IsCombining((ftxui *)(unsigned int)v11[0]) ) { v13 = 0; v12 = 0LL; `anonymous namespace'::Bisearch<`anonymous namespace'::WordBreakPropertyInterval,993ul>( v7, (long long)&v12); v8 = *(_QWORD *)&v11[1]; v9 = *(_BYTE **)(*(_QWORD *)&v11[1] + 8LL); if ( v9 == *(_BYTE **)(*(_QWORD *)&v11[1] + 16LL) ) { std::vector<ftxui::WordBreakProperty>::_M_realloc_insert<ftxui::WordBreakProperty const&>( *(_QWORD *)&v11[1], v9, &v13); v4 = a2[1]; } else { *v9 = v13; *(_QWORD *)(v8 + 8) = v9 + 1; } } } } else if ( v11[0] == 10 ) { goto LABEL_9; } } } } while ( v5 < v4 ); } return *(_QWORD *)&v11[1]; }
Utf8ToWordBreakProperty: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] LAB_0013aef6: MOV qword ptr [RSP + 0x8],RDI CALL 0x0013b366 MOV qword ptr [RSP + 0x20],0x0 MOV RBX,qword ptr [R14 + 0x8] TEST RBX,RBX JZ 0x0013afbe XOR R15D,R15D LEA R12,[RSP + 0x20] LEA R13,[RSP + 0x4] LAB_0013af23: MOV dword ptr [RSP + 0x4],0x0 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV RCX,R13 CALL 0x0013a5b4 MOV R15,qword ptr [RSP + 0x20] TEST AL,AL JZ 0x0013afb5 MOV EBP,dword ptr [RSP + 0x4] TEST EBP,EBP JZ 0x0013afb5 CMP EBP,0x1f JA 0x0013af59 CMP EBP,0xa JZ 0x0013af61 JMP 0x0013afb5 LAB_0013af59: LEA EAX,[RBP + -0x7f] CMP EAX,0x21 JC 0x0013afb5 LAB_0013af61: MOV EDI,EBP CALL 0x0013a6d0 TEST AL,AL JNZ 0x0013afb5 MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDI,EBP LEA RSI,[RSP + 0x10] CALL 0x0013a7c4 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x0013afa7 MOV AL,byte ptr [RSP + 0x18] MOV byte ptr [RSI],AL INC RSI MOV qword ptr [RDI + 0x8],RSI JMP 0x0013afb5 LAB_0013afa7: LEA RDX,[RSP + 0x18] CALL 0x0013b3f8 LAB_0013afb1: MOV RBX,qword ptr [R14 + 0x8] LAB_0013afb5: CMP R15,RBX JC 0x0013af23 LAB_0013afbe: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::Utf8ToWordBreakProperty(std::__cxx11::string const&) */ ftxui * __thiscall ftxui::Utf8ToWordBreakProperty(ftxui *this,string *param_1) { int1 *puVar1; uint uVar2; char cVar3; WordBreakPropertyInterval *extraout_RDX; ulong uVar4; ulong uVar5; uint local_54; ftxui *local_50; int8 local_48; int4 local_40 [2]; ulong local_38; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; local_50 = this; /* try { // try from 0013aef6 to 0013aeff has its CatchHandler @ 0013afd4 */ std::vector<ftxui::WordBreakProperty,std::allocator<ftxui::WordBreakProperty>>::reserve ((vector<ftxui::WordBreakProperty,std::allocator<ftxui::WordBreakProperty>> *)this, *(ulong *)(param_1 + 8)); local_38 = 0; uVar4 = *(ulong *)(param_1 + 8); if (uVar4 != 0) { uVar5 = 0; do { local_54 = 0; cVar3 = EatCodePoint(param_1,uVar5,&local_38,&local_54); uVar5 = local_38; uVar2 = local_54; if ((cVar3 != '\0') && (local_54 != 0)) { if (local_54 < 0x20) { if (local_54 == 10) { LAB_0013af61: cVar3 = IsCombining(local_54); if (cVar3 == '\0') { local_40[0] = 0; local_48 = 0; ::(anonymous_namespace):: Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul> (uVar2,(array *)&local_48,extraout_RDX); puVar1 = *(int1 **)(local_50 + 8); if (puVar1 == *(int1 **)(local_50 + 0x10)) { /* try { // try from 0013afa7 to 0013afb0 has its CatchHandler @ 0013afd2 */ std::vector<ftxui::WordBreakProperty,std::allocator<ftxui::WordBreakProperty>>:: _M_realloc_insert<ftxui::WordBreakProperty_const&> ((vector<ftxui::WordBreakProperty,std::allocator<ftxui::WordBreakProperty>> *)local_50,puVar1,local_40); uVar4 = *(ulong *)(param_1 + 8); } else { *puVar1 = (int1)local_40[0]; *(int1 **)(local_50 + 8) = puVar1 + 1; } } } } else if (0x20 < local_54 - 0x7f) goto LAB_0013af61; } } while (uVar5 < uVar4); } return local_50; }
50,468
my_b_cache_read
eloqsql/mysys/mf_iocache.c
int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count) { size_t length= 0, diff_length, left_length= 0, max_length; my_off_t pos_in_file; DBUG_ENTER("_my_b_cache_read"); /* pos_in_file always point on where info->buffer was read */ pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer); /* Whenever a function which operates on IO_CACHE flushes/writes some part of the IO_CACHE to disk it will set the property "seek_not_done" to indicate this to other functions operating on the IO_CACHE. */ if (info->seek_not_done) { if ((mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0)) != MY_FILEPOS_ERROR)) { /* No error, reset seek_not_done flag. */ info->seek_not_done= 0; if (info->next_file_user) { IO_CACHE *c; for (c= info->next_file_user; c!= info; c= c->next_file_user) { c->seek_not_done= 1; } } } else { /* If the seek failed and the error number is ESPIPE, it is because info->file is a pipe or socket or FIFO. We never should have tried to seek on that. See Bugs#25807 and #22828 for more info. */ DBUG_ASSERT(my_errno != ESPIPE); info->error= -1; DBUG_RETURN(1); } } /* Calculate, how much we are within a IO_SIZE block. Ideally this should be zero. */ diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); /* If more than a block plus the rest of the current block is wanted, we do read directly, without filling the buffer. */ if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length))) { /* Fill first intern buffer */ size_t read_length; if (info->end_of_file <= pos_in_file) { /* End of file. Return, what we did copy from the buffer. */ info->error= (int) left_length; info->seek_not_done=1; DBUG_RETURN(1); } /* Crop the wanted count to a multiple of IO_SIZE and subtract, what we did already read from a block. That way, the read will end aligned with a block. */ length= IO_ROUND_DN(Count) - diff_length; if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags)) != length) { /* If we didn't get, what we wanted, we either return -1 for a read error, or (it's end of file), how much we got in total. */ info->error= (read_length == (size_t) -1 ? -1 : (int) (read_length+left_length)); info->seek_not_done=1; DBUG_RETURN(1); } Count-=length; Buffer+=length; pos_in_file+=length; left_length+=length; diff_length=0; } /* At this point, we want less than one and a partial block. We will read a full cache, minus the number of bytes, we are within a block already. So we will reach new alignment. */ max_length= info->read_length-diff_length; /* We will not read past end of file. */ if (info->type != READ_FIFO && max_length > (info->end_of_file - pos_in_file)) max_length= (size_t) (info->end_of_file - pos_in_file); /* If there is nothing left to read, we either are done, or we failed to fulfill the request. Otherwise, we read max_length into the cache. */ if (!max_length) { if (Count) { /* We couldn't fulfil the request. Return, how much we got. */ info->error= (int) left_length; DBUG_RETURN(1); } else { info->error= 0; if (length == 0) /* nothing was read */ DBUG_RETURN(0); /* EOF */ length= 0; /* non-zero size read was done */ } } else { if (info->next_file_user) { IO_CACHE *c; for (c= info->next_file_user; c!= info; c= c->next_file_user) { c->seek_not_done= 1; } } if ((length= mysql_file_read(info->file,info->buffer, max_length, info->myflags)) < Count || length == (size_t) -1) { /* We got an read error, or less than requested (end of file). If not a read error, copy, what we got. */ if (length != (size_t) -1) memcpy(Buffer, info->buffer, length); info->pos_in_file= pos_in_file; /* For a read error, return -1, otherwise, what we got in total. */ info->error= length == (size_t) -1 ? -1 : (int) (length+left_length); info->read_pos=info->read_end=info->buffer; info->seek_not_done=1; DBUG_RETURN(1); } } /* Count is the remaining number of bytes requested. length is the amount of data in the cache. Read Count bytes from the cache. */ info->read_pos=info->buffer+Count; info->read_end=info->buffer+length; info->pos_in_file=pos_in_file; if (Count) memcpy(Buffer, info->buffer, Count); DBUG_RETURN(0); }
O3
c
my_b_cache_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq 0x18(%rdi), %r14 subq 0x20(%rdi), %r14 addq (%rdi), %r14 cmpl $0x0, 0xe0(%rdi) je 0x2c4f9 movl 0xd4(%rbx), %r15d leaq 0x2ce700(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0xa0(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2c743 movl %r15d, %edi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x30e38 cmpq $-0x1, %rax je 0x2c6a9 movl $0x0, 0xe0(%rbx) movq 0xd8(%rbx), %rax testq %rax, %rax sete %cl cmpq %rbx, %rax sete %dl orb %cl, %dl jne 0x2c4f9 movl $0x1, 0xe0(%rax) movq 0xd8(%rax), %rax cmpq %rbx, %rax jne 0x2c4e3 movl %r14d, %eax andl $0xfff, %eax # imm = 0xFFF movl $0x2000, %ecx # imm = 0x2000 subq %rax, %rcx cmpq %r13, %rcx jbe 0x2c626 xorl %ecx, %ecx movq 0xf0(%rbx), %r15 subq %rax, %r15 cmpl $0x4, 0xb0(%rbx) je 0x2c535 movq 0x8(%rbx), %rax subq %r14, %rax cmpq %rax, %r15 cmovaeq %rax, %r15 testq %r15, %r15 je 0x2c6c2 movq %rcx, -0x48(%rbp) movq %r13, -0x38(%rbp) movq %r12, -0x40(%rbp) movq 0xd8(%rbx), %rax testq %rax, %rax sete %cl cmpq %rbx, %rax sete %dl orb %cl, %dl jne 0x2c577 movl $0x1, 0xe0(%rax) movq 0xd8(%rax), %rax cmpq %rbx, %rax jne 0x2c561 movl 0xd4(%rbx), %r13d movq 0x20(%rbx), %r12 movq 0xf8(%rbx), %rax movq %rax, -0x30(%rbp) leaq 0x2ce5f4(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0xa0(%rbp), %rdi movl %r13d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2c76f movl %r13d, %edi movq %r12, %rsi movq %r15, %rdx movq -0x30(%rbp), %rcx callq 0x30c38 movq %rax, %r12 movq -0x38(%rbp), %rdx cmpq %rdx, %r12 setae %al cmpq $-0x1, %r12 setne %cl testb %cl, %al jne 0x2c6cf cmpq $-0x1, %r12 je 0x2c5f9 movq 0x20(%rbx), %rsi movq -0x40(%rbp), %rdi movq %r12, %rdx callq 0x24290 movq -0x48(%rbp), %rcx addl %r12d, %ecx cmpq $-0x1, %r12 movq %r14, (%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovnel %ecx, %eax movl %eax, 0xe4(%rbx) movq 0x20(%rbx), %rax movq %rax, 0x18(%rbx) movq %rax, 0x10(%rbx) jmp 0x2c6fe cmpq %r14, 0x8(%rbx) jbe 0x2c6b5 movq %r13, -0x38(%rbp) movl %r13d, %r15d andl $0xfffff000, %r15d # imm = 0xFFFFF000 subq %rax, %r15 movl 0xd4(%rbx), %r13d movq 0xf8(%rbx), %rax movq %rax, -0x30(%rbp) leaq 0x2ce52e(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq -0xa0(%rbp), %rdi movl %r13d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2c7e2 movl %r13d, %edi movq %r12, %rsi movq %r15, %rdx movq -0x30(%rbp), %rcx callq 0x30c38 cmpq %r15, %rax movq -0x38(%rbp), %r13 jne 0x2c6f8 movq %r15, %rcx subq %r15, %r13 addq %r15, %r12 addq %r15, %r14 xorl %eax, %eax jmp 0x2c514 movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF jmp 0x2c708 movq $0x1, 0xe0(%rbx) jmp 0x2c708 testq %r13, %r13 je 0x2c720 movl %ecx, 0xe4(%rbx) jmp 0x2c708 movq 0x20(%rbx), %rsi leaq (%rsi,%rdx), %rax movq %rax, 0x10(%rbx) addq %rsi, %r12 movq %r12, 0x18(%rbx) movq %r14, (%rbx) xorl %r15d, %r15d testq %rdx, %rdx je 0x2c70e movq -0x40(%rbp), %rdi callq 0x24290 jmp 0x2c70e movl %eax, 0xe4(%rbx) movl $0x1, 0xe0(%rbx) movl $0x1, %r15d movl %r15d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x0, 0xe4(%rbx) xorl %r15d, %r15d testq %rcx, %rcx je 0x2c70e movq 0x20(%rbx), %rax movq %rax, 0x10(%rbx) movq %rax, 0x18(%rbx) movq %r14, (%rbx) jmp 0x2c70e movq %r13, -0x38(%rbp) movq %r12, %r13 leaq -0x58(%rbp), %r12 movq %rax, %rdi movl %r15d, %esi movq %r14, %rdx movq %r12, %rcx callq 0x24c32 movq (%r12), %rax movq %r13, %r12 movq -0x38(%rbp), %r13 jmp 0x2c4b8 movq %rax, %rcx leaq 0x2ce40f(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq 0x37ee3(%rip), %rdx # 0x64666 movq %rcx, -0x50(%rbp) movq %rcx, %rdi movq %r15, %rsi movl $0x2eb, %ecx # imm = 0x2EB callq *0x210(%rax) movl %r13d, %edi movq %r12, %rsi movq %r15, %rdx movq -0x30(%rbp), %r13 movq %r13, %rcx callq 0x30c38 movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %r15 cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r13b cmovneq %r15, %rsi leaq 0x2ce3b8(%rip), %rax # 0x2fab88 movq (%rax), %rax movq -0x50(%rbp), %rdi callq *0x218(%rax) jmp 0x2c5ca movq %rax, %rcx leaq 0x2ce39c(%rip), %rax # 0x2fab88 movq (%rax), %rax leaq 0x37e70(%rip), %rdx # 0x64666 movq %rcx, -0x48(%rbp) movq %rcx, %rdi movq %r15, %rsi movl $0x2ab, %ecx # imm = 0x2AB callq *0x210(%rax) movl %r13d, %edi movq %r12, -0x40(%rbp) movq %r12, %rsi movq %r15, %rdx movq -0x30(%rbp), %r12 movq %r12, %rcx callq 0x30c38 movq %rax, %r13 xorl %esi, %esi testq %rax, %rax movl $0x0, %eax cmoveq %r15, %rax cmpq $-0x1, %r13 cmovneq %r13, %rsi testb $0x6, %r12b cmovneq %rax, %rsi leaq 0x2ce33c(%rip), %rax # 0x2fab88 movq (%rax), %rax movq -0x48(%rbp), %rdi movq -0x40(%rbp), %r12 callq *0x218(%rax) movq %r13, %rax jmp 0x2c68d
_my_b_cache_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r13, rdx mov r12, rsi mov rbx, rdi mov r14, [rdi+18h] sub r14, [rdi+20h] add r14, [rdi] cmp dword ptr [rdi+0E0h], 0 jz short loc_2C4F9 mov r15d, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A0] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_2C743 mov edi, r15d mov rsi, r14 xor edx, edx xor ecx, ecx call my_seek loc_2C4B8: cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_2C6A9 mov dword ptr [rbx+0E0h], 0 mov rax, [rbx+0D8h] test rax, rax setz cl cmp rax, rbx setz dl or dl, cl jnz short loc_2C4F9 loc_2C4E3: mov dword ptr [rax+0E0h], 1 mov rax, [rax+0D8h] cmp rax, rbx jnz short loc_2C4E3 loc_2C4F9: mov eax, r14d and eax, 0FFFh mov ecx, 2000h sub rcx, rax cmp rcx, r13 jbe loc_2C626 xor ecx, ecx loc_2C514: mov r15, [rbx+0F0h] sub r15, rax cmp dword ptr [rbx+0B0h], 4 jz short loc_2C535 mov rax, [rbx+8] sub rax, r14 cmp r15, rax cmovnb r15, rax loc_2C535: test r15, r15 jz loc_2C6C2 mov [rbp+var_48], rcx mov [rbp+var_38], r13 mov [rbp+var_40], r12 mov rax, [rbx+0D8h] test rax, rax setz cl cmp rax, rbx setz dl or dl, cl jnz short loc_2C577 loc_2C561: mov dword ptr [rax+0E0h], 1 mov rax, [rax+0D8h] cmp rax, rbx jnz short loc_2C561 loc_2C577: mov r13d, [rbx+0D4h] mov r12, [rbx+20h] mov rax, [rbx+0F8h] mov [rbp+var_30], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A0] mov esi, r13d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_2C76F mov edi, r13d mov rsi, r12 mov rdx, r15 mov rcx, [rbp+var_30] call my_read mov r12, rax loc_2C5CA: mov rdx, [rbp+var_38] cmp r12, rdx setnb al cmp r12, 0FFFFFFFFFFFFFFFFh setnz cl test al, cl jnz loc_2C6CF cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_2C5F9 mov rsi, [rbx+20h] mov rdi, [rbp+var_40] mov rdx, r12 call _memcpy loc_2C5F9: mov rcx, [rbp+var_48] add ecx, r12d cmp r12, 0FFFFFFFFFFFFFFFFh mov [rbx], r14 mov eax, 0FFFFFFFFh cmovnz eax, ecx mov [rbx+0E4h], eax mov rax, [rbx+20h] mov [rbx+18h], rax mov [rbx+10h], rax jmp loc_2C6FE loc_2C626: cmp [rbx+8], r14 jbe loc_2C6B5 mov [rbp+var_38], r13 mov r15d, r13d and r15d, 0FFFFF000h sub r15, rax mov r13d, [rbx+0D4h] mov rax, [rbx+0F8h] mov [rbp+var_30], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A0] mov esi, r13d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_2C7E2 mov edi, r13d mov rsi, r12 mov rdx, r15 mov rcx, [rbp+var_30] call my_read loc_2C68D: cmp rax, r15 mov r13, [rbp+var_38] jnz short loc_2C6F8 mov rcx, r15 sub r13, r15 add r12, r15 add r14, r15 xor eax, eax jmp loc_2C514 loc_2C6A9: mov dword ptr [rbx+0E4h], 0FFFFFFFFh jmp short loc_2C708 loc_2C6B5: mov qword ptr [rbx+0E0h], 1 jmp short loc_2C708 loc_2C6C2: test r13, r13 jz short loc_2C720 mov [rbx+0E4h], ecx jmp short loc_2C708 loc_2C6CF: mov rsi, [rbx+20h] lea rax, [rsi+rdx] mov [rbx+10h], rax add r12, rsi mov [rbx+18h], r12 mov [rbx], r14 xor r15d, r15d test rdx, rdx jz short loc_2C70E mov rdi, [rbp+var_40] call _memcpy jmp short loc_2C70E loc_2C6F8: mov [rbx+0E4h], eax loc_2C6FE: mov dword ptr [rbx+0E0h], 1 loc_2C708: mov r15d, 1 loc_2C70E: mov eax, r15d add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2C720: mov dword ptr [rbx+0E4h], 0 xor r15d, r15d test rcx, rcx jz short loc_2C70E mov rax, [rbx+20h] mov [rbx+10h], rax mov [rbx+18h], rax mov [rbx], r14 jmp short loc_2C70E loc_2C743: mov [rbp+var_38], r13 mov r13, r12 lea r12, [rbp+var_58] mov rdi, rax mov esi, r15d mov rdx, r14 mov rcx, r12 call _my_b_cache_read_cold_1 mov rax, [r12] mov r12, r13 mov r13, [rbp+var_38] jmp loc_2C4B8 loc_2C76F: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_50], rcx mov rdi, rcx mov rsi, r15 mov ecx, 2EBh call qword ptr [rax+210h] mov edi, r13d mov rsi, r12 mov rdx, r15 mov r13, [rbp+var_30] mov rcx, r13 call my_read mov r12, rax xor esi, esi test rax, rax cmovnz r15, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r13b, 6 cmovnz rsi, r15 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_50] call qword ptr [rax+218h] jmp loc_2C5CA loc_2C7E2: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_48], rcx mov rdi, rcx mov rsi, r15 mov ecx, 2ABh call qword ptr [rax+210h] mov edi, r13d mov [rbp+var_40], r12 mov rsi, r12 mov rdx, r15 mov r12, [rbp+var_30] mov rcx, r12 call my_read mov r13, rax xor esi, esi test rax, rax mov eax, 0 cmovz rax, r15 cmp r13, 0FFFFFFFFFFFFFFFFh cmovnz rsi, r13 test r12b, 6 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_48] mov r12, [rbp+var_40] call qword ptr [rax+218h] mov rax, r13 jmp loc_2C68D
long long my_b_cache_read(long long a1, long long a2, unsigned long long a3) { long long v4; // r12 unsigned long long v5; // r14 unsigned int v6; // r15d long long v7; // rax long long v8; // rax long long v9; // rax unsigned long long v10; // rax long long v11; // rcx unsigned long long v12; // r15 long long v13; // rax unsigned int v14; // r13d long long v15; // r12 long long v16; // rax unsigned long long v17; // r12 unsigned long long v18; // rdx int v19; // ecx int v20; // eax long long v21; // rax unsigned long long v22; // r15 unsigned int v23; // r13d long long v24; // rax long long v25; // rax long long v26; // rsi unsigned int v27; // r15d long long v29; // rax char v30; // r12 long long v31; // r13 long long v32; // rsi long long v33; // rax _BYTE v34[72]; // [rsp+0h] [rbp-A0h] BYREF long long v35; // [rsp+48h] [rbp-58h] BYREF long long v36; // [rsp+50h] [rbp-50h] long long v37; // [rsp+58h] [rbp-48h] long long v38; // [rsp+60h] [rbp-40h] unsigned long long v39; // [rsp+68h] [rbp-38h] long long v40; // [rsp+70h] [rbp-30h] v4 = a2; v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32); if ( *(_DWORD *)(a1 + 224) ) { v6 = *(_DWORD *)(a1 + 212); v7 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v6, 8LL); if ( v7 ) { v39 = a3; my_b_cache_read_cold_1(v7, v6, v5, &v35); v8 = v35; a3 = v39; } else { v8 = my_seek(v6, v5, 0LL, 0LL); } if ( v8 == -1 ) { *(_DWORD *)(a1 + 228) = -1; return 1; } *(_DWORD *)(a1 + 224) = 0; v9 = *(_QWORD *)(a1 + 216); if ( v9 != 0 && v9 != a1 ) { do { *(_DWORD *)(v9 + 224) = 1; v9 = *(_QWORD *)(v9 + 216); } while ( v9 != a1 ); } } v10 = v5 & 0xFFF; if ( 0x2000 - v10 <= a3 ) { if ( *(_QWORD *)(a1 + 8) <= v5 ) { *(_QWORD *)(a1 + 224) = 1LL; return 1; } v39 = a3; v22 = ((unsigned int)a3 & 0xFFFFF000) - v10; v23 = *(_DWORD *)(a1 + 212); v40 = *(_QWORD *)(a1 + 248); v24 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v23, 6LL); if ( v24 ) { v37 = v24; (*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))( v24, v22, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 683LL); v38 = a2; v30 = v40; v31 = my_read(v23, a2, v22, v40); v32 = 0LL; v33 = 0LL; if ( !v31 ) v33 = v22; if ( v31 != -1 ) v32 = v31; if ( (v30 & 6) != 0 ) v32 = v33; v4 = v38; (*((void ( **)(long long, long long))PSI_server + 67))(v37, v32); v25 = v31; } else { v25 = my_read(v23, a2, v22, v40); } if ( v25 != v22 ) { *(_DWORD *)(a1 + 228) = v25; LABEL_35: *(_DWORD *)(a1 + 224) = 1; return 1; } v11 = v22; a3 = v39 - v22; v4 += v22; v5 += v22; v10 = 0LL; } else { v11 = 0LL; } v12 = *(_QWORD *)(a1 + 240) - v10; if ( *(_DWORD *)(a1 + 176) != 4 && v12 >= *(_QWORD *)(a1 + 8) - v5 ) v12 = *(_QWORD *)(a1 + 8) - v5; if ( !v12 ) { if ( !a3 ) { *(_DWORD *)(a1 + 228) = 0; v27 = 0; if ( v11 ) { v29 = *(_QWORD *)(a1 + 32); *(_QWORD *)(a1 + 16) = v29; *(_QWORD *)(a1 + 24) = v29; *(_QWORD *)a1 = v5; } return v27; } *(_DWORD *)(a1 + 228) = v11; return 1; } v37 = v11; v39 = a3; v38 = v4; v13 = *(_QWORD *)(a1 + 216); if ( v13 != 0 && v13 != a1 ) { do { *(_DWORD *)(v13 + 224) = 1; v13 = *(_QWORD *)(v13 + 216); } while ( v13 != a1 ); } v14 = *(_DWORD *)(a1 + 212); v15 = *(_QWORD *)(a1 + 32); v40 = *(_QWORD *)(a1 + 248); v16 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v14, 6LL); if ( v16 ) { v36 = v16; (*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))( v16, v12, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 747LL); v17 = my_read(v14, v15, v12, v40); (*((void ( **)(long long))PSI_server + 67))(v36); } else { v17 = my_read(v14, v15, v12, v40); } v18 = v39; if ( v17 == -1LL || v17 < v39 ) { if ( v17 != -1LL ) memcpy(v38, *(_QWORD *)(a1 + 32)); v19 = v17 + v37; *(_QWORD *)a1 = v5; v20 = -1; if ( v17 != -1LL ) v20 = v19; *(_DWORD *)(a1 + 228) = v20; v21 = *(_QWORD *)(a1 + 32); *(_QWORD *)(a1 + 24) = v21; *(_QWORD *)(a1 + 16) = v21; goto LABEL_35; } v26 = *(_QWORD *)(a1 + 32); *(_QWORD *)(a1 + 16) = v26 + v39; *(_QWORD *)(a1 + 24) = v26 + v17; *(_QWORD *)a1 = v5; v27 = 0; if ( v18 ) memcpy(v38, v26); return v27; }
_my_b_cache_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] SUB R14,qword ptr [RDI + 0x20] ADD R14,qword ptr [RDI] CMP dword ptr [RDI + 0xe0],0x0 JZ 0x0012c4f9 MOV R15D,dword ptr [RBX + 0xd4] LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa0] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012c743 MOV EDI,R15D MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x00130e38 LAB_0012c4b8: CMP RAX,-0x1 JZ 0x0012c6a9 MOV dword ptr [RBX + 0xe0],0x0 MOV RAX,qword ptr [RBX + 0xd8] TEST RAX,RAX SETZ CL CMP RAX,RBX SETZ DL OR DL,CL JNZ 0x0012c4f9 LAB_0012c4e3: MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RAX + 0xd8] CMP RAX,RBX JNZ 0x0012c4e3 LAB_0012c4f9: MOV EAX,R14D AND EAX,0xfff MOV ECX,0x2000 SUB RCX,RAX CMP RCX,R13 JBE 0x0012c626 XOR ECX,ECX LAB_0012c514: MOV R15,qword ptr [RBX + 0xf0] SUB R15,RAX CMP dword ptr [RBX + 0xb0],0x4 JZ 0x0012c535 MOV RAX,qword ptr [RBX + 0x8] SUB RAX,R14 CMP R15,RAX CMOVNC R15,RAX LAB_0012c535: TEST R15,R15 JZ 0x0012c6c2 MOV qword ptr [RBP + -0x48],RCX MOV qword ptr [RBP + -0x38],R13 MOV qword ptr [RBP + -0x40],R12 MOV RAX,qword ptr [RBX + 0xd8] TEST RAX,RAX SETZ CL CMP RAX,RBX SETZ DL OR DL,CL JNZ 0x0012c577 LAB_0012c561: MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RAX + 0xd8] CMP RAX,RBX JNZ 0x0012c561 LAB_0012c577: MOV R13D,dword ptr [RBX + 0xd4] MOV R12,qword ptr [RBX + 0x20] MOV RAX,qword ptr [RBX + 0xf8] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa0] MOV ESI,R13D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012c76f MOV EDI,R13D MOV RSI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x30] CALL 0x00130c38 MOV R12,RAX LAB_0012c5ca: MOV RDX,qword ptr [RBP + -0x38] CMP R12,RDX SETNC AL CMP R12,-0x1 SETNZ CL TEST AL,CL JNZ 0x0012c6cf CMP R12,-0x1 JZ 0x0012c5f9 MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,R12 CALL 0x00124290 LAB_0012c5f9: MOV RCX,qword ptr [RBP + -0x48] ADD ECX,R12D CMP R12,-0x1 MOV qword ptr [RBX],R14 MOV EAX,0xffffffff CMOVNZ EAX,ECX MOV dword ptr [RBX + 0xe4],EAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX + 0x10],RAX JMP 0x0012c6fe LAB_0012c626: CMP qword ptr [RBX + 0x8],R14 JBE 0x0012c6b5 MOV qword ptr [RBP + -0x38],R13 MOV R15D,R13D AND R15D,0xfffff000 SUB R15,RAX MOV R13D,dword ptr [RBX + 0xd4] MOV RAX,qword ptr [RBX + 0xf8] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa0] MOV ESI,R13D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012c7e2 MOV EDI,R13D MOV RSI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x30] CALL 0x00130c38 LAB_0012c68d: CMP RAX,R15 MOV R13,qword ptr [RBP + -0x38] JNZ 0x0012c6f8 MOV RCX,R15 SUB R13,R15 ADD R12,R15 ADD R14,R15 XOR EAX,EAX JMP 0x0012c514 LAB_0012c6a9: MOV dword ptr [RBX + 0xe4],0xffffffff JMP 0x0012c708 LAB_0012c6b5: MOV qword ptr [RBX + 0xe0],0x1 JMP 0x0012c708 LAB_0012c6c2: TEST R13,R13 JZ 0x0012c720 MOV dword ptr [RBX + 0xe4],ECX JMP 0x0012c708 LAB_0012c6cf: MOV RSI,qword ptr [RBX + 0x20] LEA RAX,[RSI + RDX*0x1] MOV qword ptr [RBX + 0x10],RAX ADD R12,RSI MOV qword ptr [RBX + 0x18],R12 MOV qword ptr [RBX],R14 XOR R15D,R15D TEST RDX,RDX JZ 0x0012c70e MOV RDI,qword ptr [RBP + -0x40] CALL 0x00124290 JMP 0x0012c70e LAB_0012c6f8: MOV dword ptr [RBX + 0xe4],EAX LAB_0012c6fe: MOV dword ptr [RBX + 0xe0],0x1 LAB_0012c708: MOV R15D,0x1 LAB_0012c70e: MOV EAX,R15D ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012c720: MOV dword ptr [RBX + 0xe4],0x0 XOR R15D,R15D TEST RCX,RCX JZ 0x0012c70e MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX],R14 JMP 0x0012c70e LAB_0012c743: MOV qword ptr [RBP + -0x38],R13 MOV R13,R12 LEA R12,[RBP + -0x58] MOV RDI,RAX MOV ESI,R15D MOV RDX,R14 MOV RCX,R12 CALL 0x00124c32 MOV RAX,qword ptr [R12] MOV R12,R13 MOV R13,qword ptr [RBP + -0x38] JMP 0x0012c4b8 LAB_0012c76f: MOV RCX,RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDX,[0x164666] MOV qword ptr [RBP + -0x50],RCX MOV RDI,RCX MOV RSI,R15 MOV ECX,0x2eb CALL qword ptr [RAX + 0x210] MOV EDI,R13D MOV RSI,R12 MOV RDX,R15 MOV R13,qword ptr [RBP + -0x30] MOV RCX,R13 CALL 0x00130c38 MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ R15,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R13B,0x6 CMOVNZ RSI,R15 LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x50] CALL qword ptr [RAX + 0x218] JMP 0x0012c5ca LAB_0012c7e2: MOV RCX,RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] LEA RDX,[0x164666] MOV qword ptr [RBP + -0x48],RCX MOV RDI,RCX MOV RSI,R15 MOV ECX,0x2ab CALL qword ptr [RAX + 0x210] MOV EDI,R13D MOV qword ptr [RBP + -0x40],R12 MOV RSI,R12 MOV RDX,R15 MOV R12,qword ptr [RBP + -0x30] MOV RCX,R12 CALL 0x00130c38 MOV R13,RAX XOR ESI,ESI TEST RAX,RAX MOV EAX,0x0 CMOVZ RAX,R15 CMP R13,-0x1 CMOVNZ RSI,R13 TEST R12B,0x6 CMOVNZ RSI,RAX LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] MOV R12,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] MOV RAX,R13 JMP 0x0012c68d
int8 _my_b_cache_read(ulong *param_1,void *param_2,ulong param_3) { int4 uVar1; void *__src; ulong uVar2; int iVar3; long lVar4; ulong *puVar5; ulong uVar6; long lVar7; long lVar8; ulong uVar9; long lVar10; ulong uVar11; ulong uVar12; int1 local_a8 [72]; long local_60; long local_58; long local_50; void *local_48; ulong local_40; ulong local_38; uVar11 = (param_1[3] - param_1[4]) + *param_1; if ((int)param_1[0x1c] != 0) { uVar1 = *(int4 *)((long)param_1 + 0xd4); lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,8); if (lVar4 == 0) { local_60 = my_seek(uVar1,uVar11,0,0); } else { local_40 = param_3; _my_b_cache_read_cold_1(lVar4,uVar1,uVar11,&local_60); param_3 = local_40; } if (local_60 == -1) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return 1; } *(int4 *)(param_1 + 0x1c) = 0; puVar5 = (ulong *)param_1[0x1b]; if (puVar5 != param_1 && puVar5 != (ulong *)0x0) { do { *(int4 *)(puVar5 + 0x1c) = 1; puVar5 = (ulong *)puVar5[0x1b]; } while (puVar5 != param_1); } } uVar12 = (ulong)((uint)uVar11 & 0xfff); if (param_3 < 0x2000 - uVar12) { lVar4 = 0; } else { if (param_1[1] <= uVar11) { param_1[0x1c] = 1; return 1; } lVar4 = ((uint)param_3 & 0xfffff000) - uVar12; uVar1 = *(int4 *)((long)param_1 + 0xd4); local_38 = param_1[0x1f]; local_40 = param_3; local_50 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6); if (local_50 == 0) { lVar7 = my_read(uVar1,param_2,lVar4,local_38); } else { (**(code **)(PSI_server + 0x210)) (local_50,lVar4,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2ab) ; uVar12 = local_38; local_48 = param_2; lVar7 = my_read(uVar1,param_2,lVar4,local_38); param_2 = local_48; lVar8 = 0; if (lVar7 == 0) { lVar8 = lVar4; } lVar10 = 0; if (lVar7 != -1) { lVar10 = lVar7; } if ((uVar12 & 6) != 0) { lVar10 = lVar8; } (**(code **)(PSI_server + 0x218))(local_50,lVar10); } if (lVar7 != lVar4) { *(int *)((long)param_1 + 0xe4) = (int)lVar7; goto LAB_0012c6fe; } param_3 = local_40 - lVar4; param_2 = (void *)((long)param_2 + lVar4); uVar11 = uVar11 + lVar4; uVar12 = 0; } uVar12 = param_1[0x1e] - uVar12; if (((int)param_1[0x16] != 4) && (param_1[1] - uVar11 <= uVar12)) { uVar12 = param_1[1] - uVar11; } if (uVar12 == 0) { if (param_3 != 0) { *(int *)((long)param_1 + 0xe4) = (int)lVar4; return 1; } *(int4 *)((long)param_1 + 0xe4) = 0; if (lVar4 != 0) { param_1[2] = param_1[4]; param_1[3] = param_1[4]; *param_1 = uVar11; return 0; } return 0; } puVar5 = (ulong *)param_1[0x1b]; if (puVar5 != param_1 && puVar5 != (ulong *)0x0) { do { *(int4 *)(puVar5 + 0x1c) = 1; puVar5 = (ulong *)puVar5[0x1b]; } while (puVar5 != param_1); } uVar1 = *(int4 *)((long)param_1 + 0xd4); uVar6 = param_1[4]; local_38 = param_1[0x1f]; local_50 = lVar4; local_48 = param_2; local_40 = param_3; lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6); if (lVar4 == 0) { uVar6 = my_read(uVar1,uVar6,uVar12,local_38); } else { local_58 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar12,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2eb); uVar2 = local_38; uVar6 = my_read(uVar1,uVar6,uVar12,local_38); if (uVar6 != 0) { uVar12 = 0; } uVar9 = 0; if (uVar6 != 0xffffffffffffffff) { uVar9 = uVar6; } if ((uVar2 & 6) != 0) { uVar9 = uVar12; } (**(code **)(PSI_server + 0x218))(local_58,uVar9); } if (local_40 <= uVar6 && uVar6 != 0xffffffffffffffff) { __src = (void *)param_1[4]; param_1[2] = (long)__src + local_40; param_1[3] = uVar6 + (long)__src; *param_1 = uVar11; if (local_40 != 0) { memcpy(local_48,__src,local_40); return 0; } return 0; } if (uVar6 != 0xffffffffffffffff) { memcpy(local_48,(void *)param_1[4],uVar6); } *param_1 = uVar11; iVar3 = -1; if (uVar6 != 0xffffffffffffffff) { iVar3 = (int)local_50 + (int)uVar6; } *(int *)((long)param_1 + 0xe4) = iVar3; param_1[3] = param_1[4]; param_1[2] = param_1[4]; LAB_0012c6fe: *(int4 *)(param_1 + 0x1c) = 1; return 1; }
50,469
std::unique_ptr<juce::Slider, std::default_delete<juce::Slider>> sapphire_plugins::shared::makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor>(sapphire_plugins::tube_unit::TubeUnitEditor*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, float)
sapphire-plugins/src/shared/editor_interactions.h
std::unique_ptr<juce::Slider> makeLargeKnob(Editor *editor, const std::string &prefix, const std::string pos, float extraDx = 0.f) // see #33 { auto r = Sapphire::FindComponent(prefix, pos); auto cx = r.cx; auto cy = r.cy; float dx = 1.5 - extraDx; float dy = 0.5; auto kn = std::make_unique<juce::Slider>(); kn->setSliderStyle(juce::Slider::RotaryHorizontalVerticalDrag); kn->setTextBoxStyle(juce::Slider::NoTextBox, true, 0, 0); kn->setPopupMenuEnabled(true); kn->setSize(11, 11); kn->setRange(0, 1); kn->setValue(0.5); kn->setMouseDragSensitivity(40); kn->setVelocityModeParameters(100, 0); kn->setDoubleClickReturnValue(true, 0.5); kn->setLookAndFeel(editor->lnf.get()); editor->background->addAndMakeVisible(*kn); set_control_position(*kn, cx, cy, dx, dy); return kn; }
O3
c
std::unique_ptr<juce::Slider, std::default_delete<juce::Slider>> sapphire_plugins::shared::makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor>(sapphire_plugins::tube_unit::TubeUnitEditor*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, float): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movss %xmm0, 0x10(%rsp) movq %rsi, %r15 movq %rdi, %rbx movq %rdx, %rdi movq %rcx, %rsi callq 0x373480 movaps %xmm0, (%rsp) movl $0x1a8, %edi # imm = 0x1A8 callq 0x863c0 movq %rax, %r14 movq %rax, %rdi callq 0x16ed2a movq %r14, (%rbx) movq %r14, %rdi movl $0x7, %esi callq 0x169566 movq %r14, %rdi xorl %esi, %esi movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x16f5a6 movq %r14, %rdi movl $0x1, %esi callq 0x16fbaa movq %r14, %rdi movl $0xb, %esi movl $0xb, %edx callq 0x1189be movsd 0x2af045(%rip), %xmm1 # 0x3a33a8 xorps %xmm0, %xmm0 xorps %xmm2, %xmm2 movq %r14, %rdi callq 0x169542 movsd 0x2af057(%rip), %xmm0 # 0x3a33d0 movq %r14, %rdi movl $0x3, %esi callq 0x16977e movq %r14, %rdi movl $0x28, %esi callq 0x16f574 movsd 0x2b3145(%rip), %xmm0 # 0x3a74e0 xorps %xmm1, %xmm1 movq %r14, %rdi xorl %esi, %esi movl $0x1, %edx movl $0x6, %ecx callq 0x16f4d8 leaq 0x2c(%rsp), %r12 movq %r12, %rdi movl $0x4, %esi callq 0x1338be movl (%r12), %edx movsd 0x2af000(%rip), %xmm0 # 0x3a33d0 movq %r14, %rdi movl $0x1, %esi callq 0x16f808 movq 0x12b8(%r15), %rsi movq %r14, %rdi callq 0x120090 movq 0x1268(%r15), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF callq 0x11eb20 movaps (%rsp), %xmm0 movshdup %xmm0, %xmm1 # xmm1 = xmm0[1,1,3,3] movss 0x2b30b8(%rip), %xmm2 # 0x3a74c8 subss 0x10(%rsp), %xmm2 addss %xmm0, %xmm2 addss 0x2aef46(%rip), %xmm1 # 0x3a3368 movss %xmm2, (%rsp) cvttss2si %xmm2, %r12d movaps %xmm1, 0x10(%rsp) cvttss2si %xmm1, %r15d movq %r15, %rax shlq $0x20, %rax leaq (%r12,%rax), %rsi movq %r14, %rdi callq 0x11e148 xorps %xmm1, %xmm1 cvtsi2ss %r12d, %xmm1 movss (%rsp), %xmm0 subss %xmm1, %xmm0 xorps %xmm2, %xmm2 cvtsi2ss %r15d, %xmm2 movaps 0x10(%rsp), %xmm1 subss %xmm2, %xmm1 leaq 0x30(%rsp), %r15 movq %r15, %rdi callq 0x208e78 movq %r14, %rdi movq %r15, %rsi callq 0x11e608 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r15 movl $0x1a8, %esi # imm = 0x1A8 movq %r14, %rdi callq 0x86290 jmp 0xf44b7 movq %rax, %r15 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) movq $0x0, (%rbx) movq %r15, %rdi callq 0x871f0
_ZN16sapphire_plugins6shared13makeLargeKnobINS_9tube_unit14TubeUnitEditorEEESt10unique_ptrIN4juce6SliderESt14default_deleteIS6_EEPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_f: push r15 push r14 push r12 push rbx sub rsp, 48h movss dword ptr [rsp+68h+var_58], xmm0 mov r15, rsi mov rbx, rdi mov rdi, rdx mov rsi, rcx call _ZN8Sapphire13FindComponentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; Sapphire::FindComponent(std::string const&,std::string const&) movaps [rsp+68h+var_68], xmm0 mov edi, 1A8h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rdi, rax; this call _ZN4juce6SliderC2Ev; juce::Slider::Slider(void) mov [rbx], r14 mov rdi, r14 mov esi, 7 call _ZN4juce6Slider14setSliderStyleENS0_11SliderStyleE; juce::Slider::setSliderStyle(juce::Slider::SliderStyle) mov rdi, r14 xor esi, esi mov edx, 1 xor ecx, ecx xor r8d, r8d call _ZN4juce6Slider15setTextBoxStyleENS0_20TextEntryBoxPositionEbii; juce::Slider::setTextBoxStyle(juce::Slider::TextEntryBoxPosition,bool,int,int) mov rdi, r14; this mov esi, 1; bool call _ZN4juce6Slider19setPopupMenuEnabledEb; juce::Slider::setPopupMenuEnabled(bool) mov rdi, r14; this mov esi, 0Bh; int mov edx, 0Bh; int call _ZN4juce9Component7setSizeEii; juce::Component::setSize(int,int) movsd xmm1, cs:dbl_3A33A8; double xorps xmm0, xmm0; double xorps xmm2, xmm2; double mov rdi, r14; this call _ZN4juce6Slider8setRangeEddd; juce::Slider::setRange(double,double,double) movsd xmm0, cs:qword_3A33D0 mov rdi, r14 mov esi, 3 call _ZN4juce6Slider8setValueEdNS_16NotificationTypeE; juce::Slider::setValue(double,juce::NotificationType) mov rdi, r14; this mov esi, 28h ; '('; int call _ZN4juce6Slider23setMouseDragSensitivityEi; juce::Slider::setMouseDragSensitivity(int) movsd xmm0, cs:dbl_3A74E0 xorps xmm1, xmm1 mov rdi, r14 xor esi, esi mov edx, 1 mov ecx, 6 call _ZN4juce6Slider25setVelocityModeParametersEdidbNS_12ModifierKeys5FlagsE; juce::Slider::setVelocityModeParameters(double,int,double,bool,juce::ModifierKeys::Flags) lea r12, [rsp+68h+var_3C] mov rdi, r12; this mov esi, 4; int call _ZN4juce12ModifierKeysC2Ei; juce::ModifierKeys::ModifierKeys(int) mov edx, [r12] movsd xmm0, cs:qword_3A33D0 mov rdi, r14 mov esi, 1 call _ZN4juce6Slider25setDoubleClickReturnValueEbdNS_12ModifierKeysE; juce::Slider::setDoubleClickReturnValue(bool,double,juce::ModifierKeys) mov rsi, [r15+12B8h]; juce::LookAndFeel * mov rdi, r14; this call _ZN4juce9Component14setLookAndFeelEPNS_11LookAndFeelE; juce::Component::setLookAndFeel(juce::LookAndFeel *) mov rdi, [r15+1268h]; this mov rsi, r14; juce::Component * mov edx, 0FFFFFFFFh; int call _ZN4juce9Component17addAndMakeVisibleERS0_i; juce::Component::addAndMakeVisible(juce::Component&,int) movaps xmm0, [rsp+68h+var_68] movshdup xmm1, xmm0 movss xmm2, cs:flt_3A74C8 subss xmm2, dword ptr [rsp+68h+var_58] addss xmm2, xmm0 addss xmm1, cs:flt_3A3368 movss dword ptr [rsp+68h+var_68], xmm2 cvttss2si r12d, xmm2 movaps [rsp+68h+var_58], xmm1 cvttss2si r15d, xmm1 mov rax, r15 shl rax, 20h lea rsi, [r12+rax] mov rdi, r14; this call _ZN4juce9Component17setCentrePositionENS_5PointIiEE; juce::Component::setCentrePosition(juce::Point<int>) xorps xmm1, xmm1 cvtsi2ss xmm1, r12d movss xmm0, dword ptr [rsp+68h+var_68] subss xmm0, xmm1; float xorps xmm2, xmm2 cvtsi2ss xmm2, r15d movaps xmm1, [rsp+68h+var_58] subss xmm1, xmm2; float lea r15, [rsp+68h+var_38] mov rdi, r15; this call _ZN4juce15AffineTransform11translationEff; juce::AffineTransform::translation(float,float) mov rdi, r14; this mov rsi, r15; juce::AffineTransform * call _ZN4juce9Component12setTransformERKNS_15AffineTransformE; juce::Component::setTransform(juce::AffineTransform const&) mov rax, rbx add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov r15, rax mov esi, 1A8h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F44B7 mov r15, rax mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] mov qword ptr [rbx], 0 loc_F44B7: mov rdi, r15 call __Unwind_Resume
juce::Slider ** sapphire_plugins::shared::makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor>( juce::Slider **a1, long long a2, long long a3, long long a4, __m128 a5) { juce::Slider *v5; // r14 float v6; // xmm1_4 float v8; // [rsp+10h] [rbp-58h] unsigned int v9; // [rsp+2Ch] [rbp-3Ch] BYREF _BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF v8 = a5.m128_f32[0]; *(double *)a5.m128_u64 = Sapphire::FindComponent(a3, a4); v5 = (juce::Slider *)operator new(0x1A8uLL); juce::Slider::Slider(v5); *a1 = v5; juce::Slider::setSliderStyle(v5, 7LL); juce::Slider::setTextBoxStyle(v5, 0LL, 1LL, 0LL, 0LL); juce::Slider::setPopupMenuEnabled(v5, 1); juce::Component::setSize(v5, 11, 11); juce::Slider::setRange(v5, 0.0, 1.0, 0.0); juce::Slider::setValue(v5, 3LL, 0.5); juce::Slider::setMouseDragSensitivity(v5, 40); juce::Slider::setVelocityModeParameters(v5, 0LL, 1LL, 6LL, 100.0, 0.0); juce::ModifierKeys::ModifierKeys((juce::ModifierKeys *)&v9, 4); juce::Slider::setDoubleClickReturnValue(v5, 1LL, v9, 0.5); juce::Component::setLookAndFeel(v5, *(juce::LookAndFeel **)(a2 + 4792)); juce::Component::addAndMakeVisible(*(juce::Component **)(a2 + 4712), v5, -1); v6 = _mm_movehdup_ps(a5).m128_f32[0] + 0.5; juce::Component::setCentrePosition(v5); juce::AffineTransform::translation( (juce::AffineTransform *)v10, (float)((float)(1.5 - v8) + a5.m128_f32[0]) - (float)(int)(float)((float)(1.5 - v8) + a5.m128_f32[0]), v6 - (float)(int)v6); juce::Component::setTransform(v5, (const juce::AffineTransform *)v10); return a1; }
makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOVSS dword ptr [RSP + 0x10],XMM0 MOV R15,RSI MOV RBX,RDI MOV RDI,RDX MOV RSI,RCX CALL 0x00473480 MOVAPS xmmword ptr [RSP],XMM0 MOV EDI,0x1a8 CALL 0x001863c0 MOV R14,RAX LAB_001f4310: MOV RDI,RAX CALL 0x0026ed2a MOV qword ptr [RBX],R14 LAB_001f431b: MOV RDI,R14 MOV ESI,0x7 CALL 0x00269566 MOV RDI,R14 XOR ESI,ESI MOV EDX,0x1 XOR ECX,ECX XOR R8D,R8D CALL 0x0026f5a6 MOV RDI,R14 MOV ESI,0x1 CALL 0x0026fbaa MOV RDI,R14 MOV ESI,0xb MOV EDX,0xb CALL 0x002189be MOVSD XMM1,qword ptr [0x004a33a8] XORPS XMM0,XMM0 XORPS XMM2,XMM2 MOV RDI,R14 CALL 0x00269542 MOVSD XMM0,qword ptr [0x004a33d0] MOV RDI,R14 MOV ESI,0x3 CALL 0x0026977e MOV RDI,R14 MOV ESI,0x28 CALL 0x0026f574 MOVSD XMM0,qword ptr [0x004a74e0] XORPS XMM1,XMM1 MOV RDI,R14 XOR ESI,ESI MOV EDX,0x1 MOV ECX,0x6 CALL 0x0026f4d8 LEA R12,[RSP + 0x2c] MOV RDI,R12 MOV ESI,0x4 CALL 0x002338be MOV EDX,dword ptr [R12] MOVSD XMM0,qword ptr [0x004a33d0] MOV RDI,R14 MOV ESI,0x1 CALL 0x0026f808 MOV RSI,qword ptr [R15 + 0x12b8] MOV RDI,R14 CALL 0x00220090 MOV RDI,qword ptr [R15 + 0x1268] MOV RSI,R14 MOV EDX,0xffffffff CALL 0x0021eb20 MOVAPS XMM0,xmmword ptr [RSP] MOVSHDUP XMM1,XMM0 MOVSS XMM2,dword ptr [0x004a74c8] SUBSS XMM2,dword ptr [RSP + 0x10] ADDSS XMM2,XMM0 ADDSS XMM1,dword ptr [0x004a3368] MOVSS dword ptr [RSP],XMM2 CVTTSS2SI R12D,XMM2 MOVAPS xmmword ptr [RSP + 0x10],XMM1 CVTTSS2SI R15D,XMM1 MOV RAX,R15 SHL RAX,0x20 LEA RSI,[R12 + RAX*0x1] MOV RDI,R14 CALL 0x0021e148 XORPS XMM1,XMM1 CVTSI2SS XMM1,R12D MOVSS XMM0,dword ptr [RSP] SUBSS XMM0,XMM1 XORPS XMM2,XMM2 CVTSI2SS XMM2,R15D MOVAPS XMM1,xmmword ptr [RSP + 0x10] SUBSS XMM1,XMM2 LEA R15,[RSP + 0x30] MOV RDI,R15 CALL 0x00308e78 MOV RDI,R14 MOV RSI,R15 CALL 0x0021e608 LAB_001f4483: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* std::unique_ptr<juce::Slider, std::default_delete<juce::Slider> > sapphire_plugins::shared::makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor>(sapphire_plugins::tube_unit::TubeUnitEditor*, std::__cxx11::string const&, std::__cxx11::string, float) */ int8 * sapphire_plugins::shared::makeLargeKnob<sapphire_plugins::tube_unit::TubeUnitEditor> (float param_1_00,int8 *param_1,long param_2,string *param_4,string *param_5, int8 param_6,int8 param_7) { Slider *this; int iVar1; uint uVar2; int8 uVar3; int4 extraout_XMM0_Dc; float fVar4; float fVar5; int4 uVar6; int4 local_3c; AffineTransform local_38 [24]; uVar3 = Sapphire::FindComponent(param_4,param_5); fVar5 = (float)uVar3; uVar6 = extraout_XMM0_Dc; this = (Slider *)operator_new(0x1a8); /* try { // try from 001f4310 to 001f4317 has its CatchHandler @ 001f4492 */ juce::Slider::Slider(this); *param_1 = this; /* try { // try from 001f431b to 001f4482 has its CatchHandler @ 001f44a4 */ juce::Slider::setSliderStyle(this,7); juce::Slider::setTextBoxStyle(this,0,1,0,0,param_7,fVar5,uVar6); juce::Slider::setPopupMenuEnabled(this,true); juce::Component::setSize((Component *)this,0xb,0xb); juce::Slider::setRange(this,0.0,DAT_004a33a8,0.0); juce::Slider::setValue((int)DAT_004a33d0,this,3); juce::Slider::setMouseDragSensitivity(this,0x28); juce::Slider::setVelocityModeParameters((Slider *)DAT_004a74e0,0,this,0,1,6); juce::ModifierKeys::ModifierKeys((ModifierKeys *)&local_3c,4); juce::Slider::setDoubleClickReturnValue((Slider *)DAT_004a33d0,this,1,local_3c); juce::Component::setLookAndFeel((Component *)this,*(LookAndFeel **)(param_2 + 0x12b8)); juce::Component::addAndMakeVisible(*(Component **)(param_2 + 0x1268),(Component *)this,-1); fVar5 = (DAT_004a74c8 - param_1_00) + fVar5; fVar4 = (float)((ulong)uVar3 >> 0x20) + DAT_004a3368; iVar1 = (int)fVar5; uVar2 = (uint)fVar4; juce::Component::setCentrePosition ((Component *)this, CONCAT44((int)((ulong)&local_3c >> 0x20),iVar1) + ((ulong)uVar2 << 0x20)); juce::AffineTransform::translation(local_38,fVar5 - (float)iVar1,fVar4 - (float)(int)uVar2); juce::Component::setTransform((Component *)this,local_38); return param_1; }
50,470
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>::at<char const (&) [11], 0>(char const (&) [11])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& 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>::at<char const (&) [11], 0>(char const (&) [11]): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xbc970 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x16e708 jmp 0x16e7e4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x5b6d0 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xc3740 movq %rax, 0x90(%rsp) leaq 0xae6ef(%rip), %rsi # 0x21ce27 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x176c40 jmp 0x16e74f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xc34e0 jmp 0x16e76d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x13f607(%rip), %rsi # 0x2add88 leaq -0xaaf98(%rip), %rdx # 0xc37f0 callq 0x5bb60 jmp 0x16e975 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16e7c9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x5c608 testb $0x1, 0x83(%rsp) jne 0x16e7d5 jmp 0x16e7df movq 0x18(%rsp), %rdi callq 0x5bff0 jmp 0x16e968 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x178c30 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xc2170 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xc3110 testb $0x1, %al jne 0x16e82d jmp 0x16e93e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x5b6d0 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5c150 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x651c0 jmp 0x16e872 leaq 0xae5de(%rip), %rsi # 0x21ce57 leaq 0xae5dd(%rip), %rcx # 0x21ce5d leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x177e60 jmp 0x16e891 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0xbc4c0 jmp 0x16e8ab movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x13f44d(%rip), %rsi # 0x2add08 leaq -0xb2df2(%rip), %rdx # 0xbbad0 callq 0x5bb60 jmp 0x16e975 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16e920 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x16e916 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x5c608 leaq 0x30(%rsp), %rdi callq 0x5c608 leaq 0x2f(%rsp), %rdi callq 0x5c5e0 testb $0x1, 0x2e(%rsp) jne 0x16e933 jmp 0x16e93c movq (%rsp), %rdi callq 0x5bff0 jmp 0x16e968 leaq 0x78(%rsp), %rdi callq 0xc3310 movq 0x20(%rsp), %rdi movq %rax, %rsi addq $0x20, %rsi movq $-0x1, %rdx callq 0x176b20 addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x5bc20 nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_16E708 jmp loc_16E7E4 loc_16E708: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_16E74F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_16E76D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_16E975 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16E7C9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16E7C9: test [rsp+arg_7B], 1 jnz short loc_16E7D5 jmp short loc_16E7DF loc_16E7D5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_16E7DF: jmp loc_16E968 loc_16E7E4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_16E82D jmp loc_16E93E loc_16E82D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_16E872: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_16E891: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_16E8AB: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_16E975 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16E920 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_16E916 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16E916: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16E920: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_16E933 jmp short loc_16E93C loc_16E933: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_16E93C: jmp short loc_16E968 loc_16E93E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+0C8h+var_A8] mov rsi, rax add rsi, 20h ; ' ' mov rdx, 0FFFFFFFFFFFFFFFFh call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; 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_parent(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>&,ulong) add rsp, 0C8h retn loc_16E968: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_16E975: nop word ptr [rax+rax+00000000h] nop
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d long long v7; // rax int v9; // [rsp+0h] [rbp-C8h] void *v10; // [rsp+0h] [rbp-C8h] nlohmann::json_abi_v3_11_3::detail::out_of_range *v11; // [rsp+0h] [rbp-C8h] void *v12; // [rsp+8h] [rbp-C0h] long long v13; // [rsp+8h] [rbp-C0h] int v14; // [rsp+10h] [rbp-B8h] int v15; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] nlohmann::json_abi_v3_11_3::detail::type_error *v17; // [rsp+18h] [rbp-B0h] long long v18; // [rsp+20h] [rbp-A8h] char v19; // [rsp+2Fh] [rbp-99h] BYREF _BYTE v20[32]; // [rsp+30h] [rbp-98h] BYREF int v21[8]; // [rsp+50h] [rbp-78h] BYREF char v22[8]; // [rsp+70h] [rbp-58h] BYREF int v23[2]; // [rsp+78h] [rbp-50h] BYREF char v24; // [rsp+83h] [rbp-45h] char v25[8]; // [rsp+90h] [rbp-38h] BYREF int v26[8]; // [rsp+98h] [rbp-30h] BYREF int v27[2]; // [rsp+B8h] [rbp-10h] long long v28; // [rsp+C0h] [rbp-8h] v28 = a1; *(_QWORD *)v27 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)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>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v26, (int)"cannot use at() with ", (int)v25, v2, v3, v4, v9, v12, v14, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v17, 304, (long long)v26, a1); v24 = 0; __cxa_throw( v17, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v23 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v27); *(_QWORD *)v22 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v23, (long long)v22) ) { v10 = __cxa_allocate_exception(0x20uLL); v13 = *(_QWORD *)v27; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v20, v13, (long long)&v19); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v21, (int)"key '", (int)v20, (int)"' not found", v5, v6, v10, v13, (int)&v19, v15, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v11, 403, (long long)v21, v18); __cxa_throw( v11, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v23); return 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_parent( a1, v7 + 32, -1LL); }
50,471
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>::at<char const (&) [11], 0>(char const (&) [11])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
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>& 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>::at<char const (&) [11], 0>(char const (&) [11]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xaac90 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xaac75 movq %rbx, %rdi movq %r15, %rsi callq 0x1b230 testl %eax, %eax je 0xaac72 addq $0x30, %rbx jmp 0xaac53 movq %rbx, %rax movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xaacec addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %rbx movq %r14, %rdi callq 0x633e2 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x4c794(%rip), %rsi # 0xf7448 movq %rsp, %rdi callq 0xb020f movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x6318a xorl %ebp, %ebp leaq 0x8622d(%rip), %rsi # 0x130f08 leaq -0x4b7be(%rip), %rdx # 0x5f524 movq %rbx, %rdi callq 0x1bfb0 jmp 0xaad65 movl $0x20, %edi callq 0x1b460 movq %rax, %rbx leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b400 leaq (%rax,%r15), %rdx leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x24db0 leaq 0x4c755(%rip), %rsi # 0xf7478 leaq 0x4c754(%rip), %rcx # 0xf747e movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xb0818 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x616fc xorl %ebp, %ebp leaq 0x86132(%rip), %rsi # 0x130e88 leaq -0x4b839(%rip), %rdx # 0x5f524 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaad8b movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xaad8b movq %rax, %r14 movb $0x1, %bpl movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xaadc4 movq 0x30(%rsp), %rsi jmp 0xaadb4 jmp 0xaadbe movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaadc4 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xaadc4 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xaadd1 movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1c030 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_AAC90 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] loc_AAC53: mov rax, [r12+8] cmp rbx, rax jz short loc_AAC75 mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_AAC72 add rbx, 30h ; '0' jmp short loc_AAC53 loc_AAC72: mov rax, rbx loc_AAC75: mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_AACEC add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_AAC90: 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+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 130h; 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 jmp short loc_AAD65 loc_AACEC: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_38] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] lea rdi, [rsp+68h+var_48] mov rsi, r15 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 rsi, aKey; "key '" lea rcx, aNotFound; "' not found" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_AAD65: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AAD8B mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AAD8B mov r14, rax mov bpl, 1 loc_AAD8B: mov rdi, [rsp+68h+var_48] cmp rdi, r12 jz short loc_AADC4 mov rsi, [rsp+68h+var_38] jmp short loc_AADB4 jmp short loc_AADBE mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AADC4 mov rsi, [rsp+68h+var_58] loc_AADB4: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AADC4 loc_AADBE: mov r14, rax mov bpl, 1 loc_AADC4: test bpl, bpl jz short loc_AADD1 mov rdi, rbx; void * call ___cxa_free_exception loc_AADD1: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long i; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax _QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF long long v11; // [rsp+30h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = 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(&)[22],char const*>(v9, "cannot use at() 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, 304, v9); __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); } v2 = *(long long **)(a1 + 8); for ( i = *v2; ; i += 48LL ) { v4 = v2[1]; if ( i == v4 ) break; if ( !(unsigned int)std::string::compare(i, a2) ) { v4 = i; break; } } if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = &v11; v8 = strlen(a2); std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v9, "key '", v10, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001aac90 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] LAB_001aac53: MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001aac75 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b230 TEST EAX,EAX JZ 0x001aac72 ADD RBX,0x30 JMP 0x001aac53 LAB_001aac72: MOV RAX,RBX LAB_001aac75: MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001aacec ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001aac90: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX MOV RDI,R14 CALL 0x001633e2 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001aacad: LEA RSI,[0x1f7448] MOV RDI,RSP CALL 0x001b020f MOV BPL,0x1 LAB_001aacbf: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0016318a XOR EBP,EBP LEA RSI,[0x230f08] LEA RDX,[0x15f524] MOV RDI,RBX CALL 0x0011bfb0 LAB_001aacec: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b400 LEA RDX,[RAX + R15*0x1] LAB_001aad0f: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00124db0 LAB_001aad1c: LEA RSI,[0x1f7478] LEA RCX,[0x1f747e] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001b0818 MOV BPL,0x1 LAB_001aad3a: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001616fc XOR EBP,EBP LEA RSI,[0x230e88] LEA RDX,[0x15f524] MOV RDI,RBX CALL 0x0011bfb0
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { int8 *puVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; detail adStack_68 [32]; char *local_48 [2]; char local_38 [16]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = (char *)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> ::type_name(param_1); /* try { // try from 001aacad to 001aacbb has its CatchHandler @ 001aadbe */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001aacbf to 001aace9 has its CatchHandler @ 001aad9e */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } puVar1 = *(int8 **)(param_1 + 8); pcVar6 = (char *)*puVar1; while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 && (iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) { pcVar6 = pcVar6 + 0x30; } if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = local_38; sVar5 = strlen(param_2); /* try { // try from 001aad0f to 001aad1b has its CatchHandler @ 001aad9c */ std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5); /* try { // try from 001aad1c to 001aad36 has its CatchHandler @ 001aad85 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (adStack_68,"key \'",(string *)local_48,"\' not found"); /* try { // try from 001aad3a to 001aad64 has its CatchHandler @ 001aad65 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
50,472
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>::at<char const (&) [11], 0>(char const (&) [11])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
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>& 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>::at<char const (&) [11], 0>(char const (&) [11]): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x7f709 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x830ac movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x7f767 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x24480 movq %rax, %rbx movq %r14, %rdi callq 0x479ee leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x39cfd(%rip), %rsi # 0xb9428 leaq 0x8(%rsp), %rdi callq 0x82089 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x478a2 xorl %ebp, %ebp leaq 0x817f2(%rip), %rsi # 0x100f48 leaq -0x3b1df(%rip), %rdx # 0x4457e movq %rbx, %rdi callq 0x24fa0 jmp 0x7f7d1 pushq $0x20 popq %rdi callq 0x24480 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x28f3a leaq 0x39ccd(%rip), %rsi # 0xb9458 leaq 0x39ccc(%rip), %rcx # 0xb945e leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x82693 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x4614e xorl %ebp, %ebp leaq 0x81706(%rip), %rsi # 0x100ec8 leaq -0x3b24b(%rip), %rdx # 0x4457e movq %rbx, %rdi callq 0x24fa0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25288 jmp 0x7f7e6 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x7f7f7 jmp 0x7f803 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25288 testb %bpl, %bpl jne 0x7f806 jmp 0x7f80e movq %rax, %r14 movq %rbx, %rdi callq 0x246c0 movq %r14, %rdi callq 0x25020
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_7F709 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_7F767 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_7F709: push 20h ; ' ' pop rdi; 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+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; 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 jmp short loc_7F7D1 loc_7F767: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7F7D1: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7F7E6 mov r14, rax mov bpl, 1 loc_7F7E6: lea rdi, [rsp+68h+var_40] jmp short loc_7F7F7 jmp short loc_7F803 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_7F7F7: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7F806 jmp short loc_7F80E loc_7F803: mov r14, rax loc_7F806: mov rdi, rbx; void * call ___cxa_free_exception loc_7F80E: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = 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(&)[22],char const*>(v6, "cannot use at() 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, 304, (long long)v6); __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); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v6, "key '", v7, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 403, (long long)v6, a1); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0017f709 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x001830ac MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0017f767 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0017f709: PUSH 0x20 POP RDI CALL 0x00124480 MOV RBX,RAX MOV RDI,R14 CALL 0x001479ee LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0017f724: LEA RSI,[0x1b9428] LEA RDI,[RSP + 0x8] CALL 0x00182089 MOV BPL,0x1 LAB_0017f738: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x001478a2 XOR EBP,EBP LEA RSI,[0x200f48] LEA RDX,[0x14457e] MOV RDI,RBX CALL 0x00124fa0 LAB_0017f767: PUSH 0x20 POP RDI CALL 0x00124480 MOV RBX,RAX LAB_0017f772: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x00128f3a LAB_0017f784: LEA RSI,[0x1b9458] LEA RCX,[0x1b945e] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00182693 MOV BPL,0x1 LAB_0017f7a4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0014614e XOR EBP,EBP LEA RSI,[0x200ec8] LEA RDX,[0x14457e] MOV RDI,RBX CALL 0x00124fa0
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)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> ::type_name(param_1); /* try { // try from 0017f724 to 0017f734 has its CatchHandler @ 0017f803 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0017f738 to 0017f764 has its CatchHandler @ 0017f7ef */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0017f772 to 0017f783 has its CatchHandler @ 0017f7ed */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0017f784 to 0017f7a0 has its CatchHandler @ 0017f7e0 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0017f7a4 to 0017f7d0 has its CatchHandler @ 0017f7d1 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
50,473
find_private_class_field_all
bluesky950520[P]quickjs/quickjs.c
static int find_private_class_field_all(JSContext *ctx, JSFunctionDef *fd, JSAtom name, int scope_level) { int idx; idx = fd->scopes[scope_level].first; while (idx >= 0) { if (fd->vars[idx].var_name == name) return idx; idx = fd->vars[idx].scope_next; } return -1; }
O0
c
find_private_class_field_all: movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movl %edx, -0x1c(%rsp) movl %ecx, -0x20(%rsp) movq -0x18(%rsp), %rax movq 0xf8(%rax), %rax movslq -0x20(%rsp), %rcx movl 0x4(%rax,%rcx,8), %eax movl %eax, -0x24(%rsp) cmpl $0x0, -0x24(%rsp) jl 0xc2a7d movq -0x18(%rsp), %rax movq 0x90(%rax), %rax movslq -0x24(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax cmpl -0x1c(%rsp), %eax jne 0xc2a5c movl -0x24(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0xc2a85 movq -0x18(%rsp), %rax movq 0x90(%rax), %rax movslq -0x24(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x8(%rax), %eax movl %eax, -0x24(%rsp) jmp 0xc2a2b movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF movl -0x4(%rsp), %eax retq nopw (%rax,%rax)
find_private_class_field_all: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_1C], edx mov [rsp+var_20], ecx mov rax, [rsp+var_18] mov rax, [rax+0F8h] movsxd rcx, [rsp+var_20] mov eax, [rax+rcx*8+4] mov [rsp+var_24], eax loc_C2A2B: cmp [rsp+var_24], 0 jl short loc_C2A7D mov rax, [rsp+var_18] mov rax, [rax+90h] movsxd rcx, [rsp+var_24] shl rcx, 4 add rax, rcx mov eax, [rax] cmp eax, [rsp+var_1C] jnz short loc_C2A5C mov eax, [rsp+var_24] mov [rsp+var_4], eax jmp short loc_C2A85 loc_C2A5C: mov rax, [rsp+var_18] mov rax, [rax+90h] movsxd rcx, [rsp+var_24] shl rcx, 4 add rax, rcx mov eax, [rax+8] mov [rsp+var_24], eax jmp short loc_C2A2B loc_C2A7D: mov [rsp+var_4], 0FFFFFFFFh loc_C2A85: mov eax, [rsp+var_4] retn
long long find_private_class_field_all(long long a1, long long a2, int a3, int a4) { int i; // [rsp+0h] [rbp-24h] for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 248) + 8LL * a4 + 4); i >= 0; i = *(_DWORD *)(16LL * i + *(_QWORD *)(a2 + 144) + 8) ) { if ( *(_DWORD *)(16LL * i + *(_QWORD *)(a2 + 144)) == a3 ) return (unsigned int)i; } return (unsigned int)-1; }
find_private_class_field_all: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV dword ptr [RSP + -0x1c],EDX MOV dword ptr [RSP + -0x20],ECX MOV RAX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4] MOV dword ptr [RSP + -0x24],EAX LAB_001c2a2b: CMP dword ptr [RSP + -0x24],0x0 JL 0x001c2a7d MOV RAX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RSP + -0x1c] JNZ 0x001c2a5c MOV EAX,dword ptr [RSP + -0x24] MOV dword ptr [RSP + -0x4],EAX JMP 0x001c2a85 LAB_001c2a5c: MOV RAX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + -0x24],EAX JMP 0x001c2a2b LAB_001c2a7d: MOV dword ptr [RSP + -0x4],0xffffffff LAB_001c2a85: MOV EAX,dword ptr [RSP + -0x4] RET
int find_private_class_field_all(int8 param_1,long param_2,int param_3,int param_4) { int local_24; local_24 = *(int *)(*(long *)(param_2 + 0xf8) + 4 + (long)param_4 * 8); while( true ) { if (local_24 < 0) { return -1; } if (*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10) == param_3) break; local_24 = *(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10 + 8); } return local_24; }
50,474
mi_log
eloqsql/storage/myisam/mi_log.c
int mi_log(int activate_log) { int error=0; char buff[FN_REFLEN]; DBUG_ENTER("mi_log"); log_type=activate_log; if (activate_log) { if (!myisam_pid) myisam_pid=(ulong) getpid(); if (myisam_log_file < 0) { if ((myisam_log_file= mysql_file_create(mi_key_file_log, fn_format(buff, myisam_log_filename, "", ".log", 4), 0, (O_RDWR | O_BINARY | O_APPEND), MYF(0))) < 0) DBUG_RETURN(my_errno); } } else if (myisam_log_file >= 0) { error= mysql_file_close(myisam_log_file, MYF(0)) ? my_errno : 0 ; myisam_log_file= -1; } DBUG_RETURN(error); }
O0
c
mi_log: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x218(%rbp) movl $0x0, -0x21c(%rbp) movl -0x218(%rbp), %eax movl %eax, 0xbc8e44(%rip) # 0xc7a608 cmpl $0x0, -0x218(%rbp) je 0xb1882 cmpq $0x0, 0xbc8e27(%rip) # 0xc7a600 jne 0xb17e9 callq 0x2a8b0 cltq movq %rax, 0xbc8e17(%rip) # 0xc7a600 leaq 0x20d9c0(%rip), %rax # 0x2bf1b0 cmpl $0x0, (%rax) jge 0xb1880 leaq 0xbc8de0(%rip), %rax # 0xc7a5e0 movl (%rax), %eax movl %eax, -0x220(%rbp) leaq -0x210(%rbp), %rdi leaq 0x20d992(%rip), %rax # 0x2bf1a8 movq (%rax), %rsi leaq 0xa648d(%rip), %rdx # 0x157cad leaq 0xa1f3f(%rip), %rcx # 0x153766 movl $0x4, %r8d callq 0xdf7c0 movl -0x220(%rbp), %edi movq %rax, %rcx leaq 0xa22f7(%rip), %rsi # 0x153b39 movl $0x35, %edx xorl %r8d, %r8d movl $0x402, %r9d # imm = 0x402 xorl %eax, %eax movq $0x0, (%rsp) callq 0xb1930 leaq 0x20d94a(%rip), %rcx # 0x2bf1b0 movl %eax, (%rcx) cmpl $0x0, %eax jge 0xb187e jmp 0xb186f callq 0xf60c0 movl (%rax), %eax movl %eax, -0x214(%rbp) jmp 0xb18f3 jmp 0xb1880 jmp 0xb18e5 leaq 0x20d927(%rip), %rax # 0x2bf1b0 cmpl $0x0, (%rax) jl 0xb18e3 leaq 0x20d91b(%rip), %rax # 0x2bf1b0 movl (%rax), %edx leaq 0xa229b(%rip), %rdi # 0x153b39 movl $0x3b, %esi xorl %eax, %eax movl %eax, %ecx callq 0xb1a20 cmpl $0x0, %eax je 0xb18c0 callq 0xf60c0 movl (%rax), %eax movl %eax, -0x224(%rbp) jmp 0xb18ca xorl %eax, %eax movl %eax, -0x224(%rbp) jmp 0xb18ca movl -0x224(%rbp), %eax movl %eax, -0x21c(%rbp) leaq 0x20d8d3(%rip), %rax # 0x2bf1b0 movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF jmp 0xb18e5 jmp 0xb18e7 movl -0x21c(%rbp), %eax movl %eax, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x228(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb1920 movl -0x228(%rbp), %eax addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
mi_log: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], edi mov [rbp+var_21C], 0 mov eax, [rbp+var_218] mov cs:log_type, eax cmp [rbp+var_218], 0 jz loc_B1882 cmp cs:myisam_pid, 0 jnz short loc_B17E9 call _getpid cdqe mov cs:myisam_pid, rax loc_B17E9: lea rax, myisam_log_file cmp dword ptr [rax], 0 jge loc_B1880 lea rax, mi_key_file_log mov eax, [rax] mov [rbp+var_220], eax lea rdi, [rbp+var_210] lea rax, myisam_log_filename mov rsi, [rax] lea rdx, asc_157CA9+4; "" lea rcx, aMyisamLog+6; ".log" mov r8d, 4 call fn_format mov edi, [rbp+var_220] mov rcx, rax lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 35h ; '5' xor r8d, r8d mov r9d, 402h xor eax, eax mov [rsp+230h+var_230], 0 call inline_mysql_file_create_1 lea rcx, myisam_log_file mov [rcx], eax cmp eax, 0 jge short loc_B187E jmp short $+2 loc_B186F: call _my_thread_var mov eax, [rax] mov [rbp+var_214], eax jmp short loc_B18F3 loc_B187E: jmp short $+2 loc_B1880: jmp short loc_B18E5 loc_B1882: lea rax, myisam_log_file cmp dword ptr [rax], 0 jl short loc_B18E3 lea rax, myisam_log_file mov edx, [rax] lea rdi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3Bh ; ';' xor eax, eax mov ecx, eax call inline_mysql_file_close_5 cmp eax, 0 jz short loc_B18C0 call _my_thread_var mov eax, [rax] mov [rbp+var_224], eax jmp short loc_B18CA loc_B18C0: xor eax, eax mov [rbp+var_224], eax jmp short $+2 loc_B18CA: mov eax, [rbp+var_224] mov [rbp+var_21C], eax lea rax, myisam_log_file mov dword ptr [rax], 0FFFFFFFFh loc_B18E3: jmp short $+2 loc_B18E5: jmp short $+2 loc_B18E7: mov eax, [rbp+var_21C] mov [rbp+var_214], eax loc_B18F3: mov eax, [rbp+var_214] mov [rbp+var_228], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B1920 mov eax, [rbp+var_228] add rsp, 230h pop rbp retn loc_B1920: call ___stack_chk_fail
long long mi_log(int a1) { int v1; // eax unsigned int v3; // [rsp+Ch] [rbp-224h] unsigned int v4; // [rsp+10h] [rbp-220h] unsigned int v5; // [rsp+14h] [rbp-21Ch] _BYTE v7[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v8; // [rsp+228h] [rbp-8h] v8 = __readfsqword(0x28u); v5 = 0; log_type = a1; if ( !a1 ) { if ( (myisam_log_file & 0x80000000) == 0 ) { if ( (unsigned int)inline_mysql_file_close_5( "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", 59LL, myisam_log_file, 0LL) ) v3 = *(_DWORD *)my_thread_var( "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", (_BYTE *)&word_3A + 1); else v3 = 0; v5 = v3; myisam_log_file = -1; } return v5; } if ( !myisam_pid ) myisam_pid = (int)getpid(); if ( (myisam_log_file & 0x80000000) == 0 ) return v5; v4 = mi_key_file_log; v1 = fn_format(v7, myisam_log_filename, "", ".log", 4LL); myisam_log_file = inline_mysql_file_create_1( v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", 53, v1, 0, 1026, 0LL); if ( (myisam_log_file & 0x80000000) == 0 ) return v5; return *(unsigned int *)my_thread_var(v4, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c"); }
mi_log: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x218],EDI MOV dword ptr [RBP + -0x21c],0x0 MOV EAX,dword ptr [RBP + -0x218] MOV dword ptr [0x00d7a608],EAX CMP dword ptr [RBP + -0x218],0x0 JZ 0x001b1882 CMP qword ptr [0x00d7a600],0x0 JNZ 0x001b17e9 CALL 0x0012a8b0 CDQE MOV qword ptr [0x00d7a600],RAX LAB_001b17e9: LEA RAX,[0x3bf1b0] CMP dword ptr [RAX],0x0 JGE 0x001b1880 LEA RAX,[0xd7a5e0] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x220],EAX LEA RDI,[RBP + -0x210] LEA RAX,[0x3bf1a8] MOV RSI,qword ptr [RAX] LEA RDX,[0x257cad] LEA RCX,[0x253766] MOV R8D,0x4 CALL 0x001df7c0 MOV EDI,dword ptr [RBP + -0x220] MOV RCX,RAX LEA RSI,[0x253b39] MOV EDX,0x35 XOR R8D,R8D MOV R9D,0x402 XOR EAX,EAX MOV qword ptr [RSP],0x0 CALL 0x001b1930 LEA RCX,[0x3bf1b0] MOV dword ptr [RCX],EAX CMP EAX,0x0 JGE 0x001b187e JMP 0x001b186f LAB_001b186f: CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x214],EAX JMP 0x001b18f3 LAB_001b187e: JMP 0x001b1880 LAB_001b1880: JMP 0x001b18e5 LAB_001b1882: LEA RAX,[0x3bf1b0] CMP dword ptr [RAX],0x0 JL 0x001b18e3 LEA RAX,[0x3bf1b0] MOV EDX,dword ptr [RAX] LEA RDI,[0x253b39] MOV ESI,0x3b XOR EAX,EAX MOV ECX,EAX CALL 0x001b1a20 CMP EAX,0x0 JZ 0x001b18c0 CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x224],EAX JMP 0x001b18ca LAB_001b18c0: XOR EAX,EAX MOV dword ptr [RBP + -0x224],EAX JMP 0x001b18ca LAB_001b18ca: MOV EAX,dword ptr [RBP + -0x224] MOV dword ptr [RBP + -0x21c],EAX LEA RAX,[0x3bf1b0] MOV dword ptr [RAX],0xffffffff LAB_001b18e3: JMP 0x001b18e5 LAB_001b18e5: JMP 0x001b18e7 LAB_001b18e7: MOV EAX,dword ptr [RBP + -0x21c] MOV dword ptr [RBP + -0x214],EAX LAB_001b18f3: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x228],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b1920 MOV EAX,dword ptr [RBP + -0x228] ADD RSP,0x230 POP RBP RET LAB_001b1920: CALL 0x0012a270
int4 mi_log(int param_1) { int4 uVar1; __pid_t _Var2; int iVar3; int8 uVar4; int4 *puVar5; long in_FS_OFFSET; int4 local_22c; int4 local_224; int4 local_21c; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_224 = 0; log_type = param_1; if (param_1 == 0) { if (-1 < myisam_log_file) { iVar3 = inline_mysql_file_close ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x3b, myisam_log_file,0); if (iVar3 == 0) { local_22c = 0; } else { puVar5 = (int4 *)_my_thread_var(); local_22c = *puVar5; } local_224 = local_22c; myisam_log_file = -1; } } else { if (myisam_pid == 0) { _Var2 = getpid(); myisam_pid = (long)_Var2; } uVar1 = mi_key_file_log; if (myisam_log_file < 0) { uVar4 = fn_format(local_218,myisam_log_filename,&DAT_00257cad,".log",4); myisam_log_file = inline_mysql_file_create (uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x35, uVar4,0,0x402,0); if (myisam_log_file < 0) { puVar5 = (int4 *)_my_thread_var(); local_21c = *puVar5; goto LAB_001b18f3; } } } local_21c = local_224; LAB_001b18f3: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_21c; }
50,475
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::object(); for (const auto& [key, value] : elements) { if (!key) throw std::runtime_error("Dict key is null"); if (!value) throw std::runtime_error("Dict value is null"); result.set(key->evaluate(context), value->evaluate(context)); } return result; }
O3
cpp
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rsp), %r12 movl $0x30, %edi callq 0x1c160 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x621be(%rip), %rcx # 0xfe470 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, (%r12) movq %rcx, -0x8(%r12) leaq 0x8(%rsp), %rsi movq %rbx, (%rsp) movq %rbx, %rdi callq 0x781b6 movq %r12, %rdi callq 0x34564 movq 0x20(%r15), %rbx movq 0x28(%r15), %r15 cmpq %r15, %rbx je 0x9c438 leaq 0x68(%rsp), %rbp leaq 0x18(%rsp), %r13 movq (%rbx), %rsi testq %rsi, %rsi je 0x9c44e cmpq $0x0, 0x10(%rbx) je 0x9c46c movq %rbp, %rdi movq %r14, %rdx callq 0x96f0a movq 0x10(%rbx), %rsi movq %r13, %rdi movq %r14, %rdx callq 0x96f0a movq (%rsp), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x77bc4 leaq 0x58(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x732fc movq %r12, %rdi callq 0x300e0 leaq 0x50(%rsp), %rdi callq 0x34564 leaq 0x40(%rsp), %rdi callq 0x34564 leaq 0x30(%rsp), %rdi callq 0x34564 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9c3b4 movq 0x63c01(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0x9c39f movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9c3a9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9c3b4 movq (%rdi), %rax callq *0x18(%rax) leaq 0xa8(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x732fc movq %r12, %rdi callq 0x300e0 leaq 0xa0(%rsp), %rdi callq 0x34564 leaq 0x90(%rsp), %rdi callq 0x34564 leaq 0x80(%rsp), %rdi callq 0x34564 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x9c42b movq 0x63b8a(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0x9c416 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9c420 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9c42b movq (%rdi), %rax callq *0x18(%rax) addq $0x20, %rbx cmpq %r15, %rbx jne 0x9c309 movq (%rsp), %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1c460 movq %rax, %r15 leaq 0x31eef(%rip), %rsi # 0xce351 movq %rax, %rdi callq 0x1c280 jmp 0x9c488 movl $0x10, %edi callq 0x1c460 movq %rax, %r15 leaq 0x31ee2(%rip), %rsi # 0xce362 movq %rax, %rdi callq 0x1c280 movq 0x63b29(%rip), %rsi # 0xfffb8 movq 0x63ae2(%rip), %rdx # 0xfff78 movq %r15, %rdi callq 0x1c7b0 jmp 0x9c4a0 movq %rax, %r14 movq %r15, %rdi callq 0x1caa0 jmp 0x9c4d0 jmp 0x9c4cd movq %rax, %r14 jmp 0x9c4c1 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x6cc36 leaq 0x68(%rsp), %rdi callq 0x6cc36 jmp 0x9c4d0 movq %rax, %r14 movq (%rsp), %rdi callq 0x6cc36 movq %r14, %rdi callq 0x1c7d0 nop
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsp+0E8h+var_D8] mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [r12], rax mov [r12-8], rcx lea rsi, [rsp+0E8h+var_E0] mov [rsp+0E8h+var_E8], rbx mov rdi, rbx call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rbx, [r15+20h] mov r15, [r15+28h] cmp rbx, r15 jz loc_9C438 lea rbp, [rsp+0E8h+var_80] lea r13, [rsp+0E8h+var_D0] loc_9C309: mov rsi, [rbx] test rsi, rsi jz loc_9C44E cmp qword ptr [rbx+10h], 0 jz loc_9C46C mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rsi, [rbx+10h] mov rdi, r13 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+0E8h+var_E8]; this mov rsi, rbp; minja::Value * mov rdx, r13; minja::Value * call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&) lea r12, [rsp+0E8h+var_90] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+0E8h+var_98] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_A8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_B8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+0E8h+var_C8] test rdi, rdi jz short loc_9C3B4 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_9C39F mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9C3A9 loc_9C39F: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9C3A9: cmp eax, 1 jnz short loc_9C3B4 mov rax, [rdi] call qword ptr [rax+18h] loc_9C3B4: lea r12, [rsp+0E8h+var_40] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+0E8h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+0E8h+var_78] test rdi, rdi jz short loc_9C42B mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_9C416 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9C420 loc_9C416: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9C420: cmp eax, 1 jnz short loc_9C42B mov rax, [rdi] call qword ptr [rax+18h] loc_9C42B: add rbx, 20h ; ' ' cmp rbx, r15 jnz loc_9C309 loc_9C438: mov rax, [rsp+0E8h+var_E8] add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9C44E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictKeyIsNull; "Dict key is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_9C488 loc_9C46C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictValueIsNul; "Dict value is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_9C488: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short $+2 loc_9C4A0: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_9C4D0 jmp short loc_9C4CD mov r14, rax jmp short loc_9C4C1 mov r14, rax lea rdi, [rsp+0E8h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9C4C1: lea rdi, [rsp+0E8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_9C4D0 loc_9C4CD: mov r14, rax loc_9C4D0: mov rdi, [rsp+0E8h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r14 call __Unwind_Resume
minja::Value * minja::DictExpr::do_evaluate(minja::Value *a1, long long a2) { long long v2; // rax void (****v3)(void); // rbx void (****v4)(void); // r15 long long v5; // rdi signed __int32 v6; // eax long long v7; // rdi signed __int32 v8; // eax std::runtime_error *exception; // r15 long long v12; // [rsp+8h] [rbp-E0h] BYREF volatile signed __int32 *v13; // [rsp+10h] [rbp-D8h] BYREF _BYTE v14[8]; // [rsp+18h] [rbp-D0h] BYREF long long v15; // [rsp+20h] [rbp-C8h] volatile signed __int32 *v16; // [rsp+30h] [rbp-B8h] BYREF volatile signed __int32 *v17; // [rsp+40h] [rbp-A8h] BYREF volatile signed __int32 *v18; // [rsp+50h] [rbp-98h] BYREF char v19[16]; // [rsp+58h] [rbp-90h] BYREF _BYTE v20[8]; // [rsp+68h] [rbp-80h] BYREF long long v21; // [rsp+70h] [rbp-78h] volatile signed __int32 *v22; // [rsp+80h] [rbp-68h] BYREF volatile signed __int32 *v23; // [rsp+90h] [rbp-58h] BYREF volatile signed __int32 *v24; // [rsp+A0h] [rbp-48h] BYREF char v25[64]; // [rsp+A8h] [rbp-40h] BYREF v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; v13 = (volatile signed __int32 *)v2; v12 = v2 + 16; minja::Value::Value((long long)a1, &v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); v3 = *(void (*****)(void))(a2 + 32); v4 = *(void (*****)(void))(a2 + 40); if ( v3 != v4 ) { while ( *v3 ) { if ( !v3[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict value is null"); LABEL_20: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v20, *v3); minja::Expression::evaluate((long long)v14, v3[2]); minja::Value::set(a1, (const minja::Value *)v20, (const minja::Value *)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>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16); v5 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v22); v7 = v21; if ( v21 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v21 + 12); *(_DWORD *)(v21 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } v3 += 4; if ( v3 == v4 ) return a1; } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict key is null"); goto LABEL_20; } return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSP + 0x10] MOV EDI,0x30 CALL 0x0011c160 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1fe470] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [R12],RAX MOV qword ptr [R12 + -0x8],RCX LEA RSI,[RSP + 0x8] MOV qword ptr [RSP],RBX MOV RDI,RBX CALL 0x001781b6 MOV RDI,R12 CALL 0x00134564 MOV RBX,qword ptr [R15 + 0x20] MOV R15,qword ptr [R15 + 0x28] CMP RBX,R15 JZ 0x0019c438 LEA RBP,[RSP + 0x68] LEA R13,[RSP + 0x18] LAB_0019c309: MOV RSI,qword ptr [RBX] TEST RSI,RSI JZ 0x0019c44e CMP qword ptr [RBX + 0x10],0x0 JZ 0x0019c46c LAB_0019c320: MOV RDI,RBP MOV RDX,R14 CALL 0x00196f0a MOV RSI,qword ptr [RBX + 0x10] LAB_0019c32f: MOV RDI,R13 MOV RDX,R14 CALL 0x00196f0a LAB_0019c33a: MOV RDI,qword ptr [RSP] MOV RSI,RBP MOV RDX,R13 CALL 0x00177bc4 LAB_0019c349: LEA R12,[RSP + 0x58] MOV RDI,R12 XOR ESI,ESI CALL 0x001732fc MOV RDI,R12 CALL 0x001300e0 LEA RDI,[RSP + 0x50] CALL 0x00134564 LEA RDI,[RSP + 0x40] CALL 0x00134564 LEA RDI,[RSP + 0x30] CALL 0x00134564 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019c3b4 MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x0019c39f MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019c3a9 LAB_0019c39f: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019c3a9: CMP EAX,0x1 JNZ 0x0019c3b4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019c3b4: LEA R12,[RSP + 0xa8] MOV RDI,R12 XOR ESI,ESI CALL 0x001732fc MOV RDI,R12 CALL 0x001300e0 LEA RDI,[RSP + 0xa0] CALL 0x00134564 LEA RDI,[RSP + 0x90] CALL 0x00134564 LEA RDI,[RSP + 0x80] CALL 0x00134564 MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x0019c42b MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x0019c416 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019c420 LAB_0019c416: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019c420: CMP EAX,0x1 JNZ 0x0019c42b MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019c42b: ADD RBX,0x20 CMP RBX,R15 JNZ 0x0019c309 LAB_0019c438: MOV RAX,qword ptr [RSP] ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019c44e: MOV EDI,0x10 CALL 0x0011c460 MOV R15,RAX LAB_0019c45b: LEA RSI,[0x1ce351] MOV RDI,RAX CALL 0x0011c280 LAB_0019c46a: JMP 0x0019c488 LAB_0019c46c: MOV EDI,0x10 CALL 0x0011c460 MOV R15,RAX LAB_0019c479: LEA RSI,[0x1ce362] MOV RDI,RAX CALL 0x0011c280 LAB_0019c488: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff78] MOV RDI,R15 CALL 0x0011c7b0
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1) { int *piVar1; int8 *puVar2; int iVar3; runtime_error *this_00; int8 *puVar4; int8 *local_e0; int8 *local_d8; Expression local_d0 [8]; long *local_c8; __shared_count<(__gnu_cxx::_Lock_policy)2> local_b8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_98 [8]; data local_90 [16]; Expression local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; local_d8 = (int8 *)operator_new(0x30); local_d8[1] = 0x100000001; *local_d8 = &PTR___Sp_counted_base_001fe480; local_e0 = local_d8 + 2; local_d8[2] = 0; local_d8[3] = 0; local_d8[4] = 0; Value::Value((Value *)this,(shared_ptr *)&local_e0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_d8); puVar4 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar4 != puVar2) { do { if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019c45b to 0019c469 has its CatchHandler @ 0019c4a0 */ std::runtime_error::runtime_error(this_00,"Dict key is null"); LAB_0019c488: /* try { // try from 0019c488 to 0019c49d has its CatchHandler @ 0019c4cd */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78); } if (puVar4[2] == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019c479 to 0019c487 has its CatchHandler @ 0019c49e */ std::runtime_error::runtime_error(this_00,"Dict value is null"); goto LAB_0019c488; } /* try { // try from 0019c320 to 0019c32a has its CatchHandler @ 0019c4ad */ Expression::evaluate(local_80,(shared_ptr *)*puVar4); /* try { // try from 0019c32f to 0019c339 has its CatchHandler @ 0019c4af */ Expression::evaluate(local_d0,(shared_ptr *)puVar4[2]); /* try { // try from 0019c33a to 0019c348 has its CatchHandler @ 0019c4b4 */ Value::set((Value *)this,(Value *)local_80,(Value *)local_d0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_98); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b8); if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_c8 + 0x18))(); } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } puVar4 = puVar4 + 4; } while (puVar4 != puVar2); } return this; }
50,476
ma_bitmap_free_full_pages
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_free_full_pages(MARIA_HA *info, const uchar *extents, uint count) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; my_bool res; DBUG_ENTER("_ma_bitmap_free_full_pages"); for (; count--; extents+= ROW_EXTENT_SIZE) { pgcache_page_no_t page= uint5korr(extents); uint page_count= (uint2korr(extents + ROW_EXTENT_PAGE_SIZE) & ~START_EXTENT_BIT); if (!(page_count & TAIL_BIT)) { if (page == 0 && page_count == 0) continue; /* Not used extent */ if (pagecache_delete_pages(info->s->pagecache, &info->dfile, page, page_count, PAGECACHE_LOCK_WRITE, 1)) DBUG_RETURN(1); mysql_mutex_lock(&bitmap->bitmap_lock); res= _ma_bitmap_reset_full_page_bits(info, bitmap, page, page_count); mysql_mutex_unlock(&bitmap->bitmap_lock); if (res) DBUG_RETURN(1); } } DBUG_RETURN(0); }
O0
c
ma_bitmap_free_full_pages: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x1c(%rbp) cmpl $0x0, %eax je 0x43ffb movq -0x18(%rbp), %rdi callq 0x44010 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movzwl 0x5(%rax), %eax andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x43fe8 cmpq $0x0, -0x38(%rbp) jne 0x43f58 cmpl $0x0, -0x3c(%rbp) jne 0x43f58 jmp 0x43fea movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx movl $0x4, %r8d movl $0x1, %r9d callq 0x2eff0 cmpb $0x0, %al je 0x43f95 jmp 0x43f8f movb $0x1, -0x1(%rbp) jmp 0x44001 movq -0x28(%rbp), %rdi addq $0x88, %rdi leaq 0x10d6e5(%rip), %rsi # 0x15168c movl $0xb31, %edx # imm = 0xB31 callq 0x41c50 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx callq 0x43450 movb %al, -0x29(%rbp) movq -0x28(%rbp), %rdi addq $0x88, %rdi callq 0x41f00 cmpb $0x0, -0x29(%rbp) je 0x43fe6 jmp 0x43fe0 movb $0x1, -0x1(%rbp) jmp 0x44001 jmp 0x43fe8 jmp 0x43fea movq -0x18(%rbp), %rax addq $0x7, %rax movq %rax, -0x18(%rbp) jmp 0x43f04 jmp 0x43ffd movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_bitmap_free_full_pages: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_28], rax loc_43F04: mov eax, [rbp+var_1C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_1C], ecx cmp eax, 0 jz loc_43FFB mov rdi, [rbp+var_18] call uint5korr mov [rbp+var_38], rax mov rax, [rbp+var_18] movzx eax, word ptr [rax+5] and eax, 0FFFFBFFFh mov [rbp+var_3C], eax mov eax, [rbp+var_3C] and eax, 8000h cmp eax, 0 jnz loc_43FE8 cmp [rbp+var_38], 0 jnz short loc_43F58 cmp [rbp+var_3C], 0 jnz short loc_43F58 jmp loc_43FEA loc_43F58: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] mov r8d, 4 mov r9d, 1 call pagecache_delete_pages cmp al, 0 jz short loc_43F95 jmp short $+2 loc_43F8F: mov [rbp+var_1], 1 jmp short loc_44001 loc_43F95: mov rdi, [rbp+var_28] add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B31h call inline_mysql_mutex_lock_4 mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] call _ma_bitmap_reset_full_page_bits mov [rbp+var_29], al mov rdi, [rbp+var_28] add rdi, 88h call inline_mysql_mutex_unlock_4 cmp [rbp+var_29], 0 jz short loc_43FE6 jmp short $+2 loc_43FE0: mov [rbp+var_1], 1 jmp short loc_44001 loc_43FE6: jmp short $+2 loc_43FE8: jmp short $+2 loc_43FEA: mov rax, [rbp+var_18] add rax, 7 mov [rbp+var_18], rax jmp loc_43F04 loc_43FFB: jmp short $+2 loc_43FFD: mov [rbp+var_1], 0 loc_44001: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_bitmap_free_full_pages(long long *a1, long long a2, int a3) { int v5; // [rsp+4h] [rbp-3Ch] long long v6; // [rsp+8h] [rbp-38h] char v7; // [rsp+17h] [rbp-29h] long long v8; // [rsp+18h] [rbp-28h] v8 = *a1 + 2576; while ( a3-- ) { v6 = uint5korr(a2); v5 = *(_WORD *)(a2 + 5) & 0xBFFF; if ( (*(_WORD *)(a2 + 5) & 0x8000) == 0 && (v6 || (*(_WORD *)(a2 + 5) & 0xBFFF) != 0) ) { if ( pagecache_delete_pages(*(_QWORD **)(*a1 + 1536), (long long)(a1 + 142), v6, v5, 4u, 1) ) return 1; inline_mysql_mutex_lock_4( v8 + 136, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xB31u); v7 = ma_bitmap_reset_full_page_bits(a1, v8, v6, v5); inline_mysql_mutex_unlock_4(v8 + 136); if ( v7 ) return 1; } a2 += 7LL; } return 0; }
_ma_bitmap_free_full_pages: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX LAB_00143f04: MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x1c],ECX CMP EAX,0x0 JZ 0x00143ffb MOV RDI,qword ptr [RBP + -0x18] CALL 0x00144010 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x5] AND EAX,0xffffbfff MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x00143fe8 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00143f58 CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x00143f58 JMP 0x00143fea LAB_00143f58: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] MOV R8D,0x4 MOV R9D,0x1 CALL 0x0012eff0 CMP AL,0x0 JZ 0x00143f95 JMP 0x00143f8f LAB_00143f8f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00144001 LAB_00143f95: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 LEA RSI,[0x25168c] MOV EDX,0xb31 CALL 0x00141c50 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] CALL 0x00143450 MOV byte ptr [RBP + -0x29],AL MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 CALL 0x00141f00 CMP byte ptr [RBP + -0x29],0x0 JZ 0x00143fe6 JMP 0x00143fe0 LAB_00143fe0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00144001 LAB_00143fe6: JMP 0x00143fe8 LAB_00143fe8: JMP 0x00143fea LAB_00143fea: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x7 MOV qword ptr [RBP + -0x18],RAX JMP 0x00143f04 LAB_00143ffb: JMP 0x00143ffd LAB_00143ffd: MOV byte ptr [RBP + -0x1],0x0 LAB_00144001: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_bitmap_free_full_pages(long *param_1,long param_2,int param_3) { ushort uVar1; long lVar2; char cVar3; long lVar4; int local_24; long local_20; lVar2 = *param_1; local_24 = param_3; local_20 = param_2; do { if (local_24 == 0) { return 0; } lVar4 = uint5korr(local_20); uVar1 = *(ushort *)(local_20 + 5); if (((uVar1 & 0x8000) == 0) && ((lVar4 != 0 || ((uVar1 & 0xbfff) != 0)))) { cVar3 = pagecache_delete_pages (*(int8 *)(*param_1 + 0x600),param_1 + 0x8e,lVar4,uVar1 & 0xbfff,4,1); if (cVar3 != '\0') { return 1; } inline_mysql_mutex_lock (lVar2 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xb31); cVar3 = _ma_bitmap_reset_full_page_bits(param_1,lVar2 + 0xa10,lVar4,uVar1 & 0xbfff); inline_mysql_mutex_unlock(lVar2 + 0xa98); if (cVar3 != '\0') { return 1; } } local_20 = local_20 + 7; local_24 = local_24 + -1; } while( true ); }
50,477
main
ngxson[P]ggml-easy/demo/safetensors.cpp
int main() { ggml_easy::ctx_params params; params.use_gpu = false; params.log_level = GGML_LOG_LEVEL_DEBUG; ggml_easy::ctx ctx0(params); ctx0.load_safetensors("mimi.safetensors", { {".acoustic_residual_vector_quantizer", ".acoustic_rvq"}, {".semantic_residual_vector_quantizer", ".semantic_rvq"}, }); ggml_easy::ctx ctx1(params); ctx1.load_gguf("mimi.gguf"); GGML_ASSERT(ctx0.tensors.size() == ctx1.tensors.size()); GGML_ASSERT(ggml_backend_buft_is_host(ctx0.backend_buft[0])); GGML_ASSERT(ggml_backend_buft_is_host(ctx1.backend_buft[0])); // compare the tensors for (auto & t : ctx0.tensors) { auto tensor0 = t.second; auto tensor1 = ctx1.get_weight(t.first.c_str()); GGML_ASSERT(ggml_are_same_shape(tensor0, tensor1)); GGML_ASSERT(tensor0->type == GGML_TYPE_F32); GGML_ASSERT(tensor1->type == GGML_TYPE_F32); float diff = 0.0; for (size_t i = 0; i < ggml_nelements(tensor0); ++i) { float v0 = ggml_get_f32_1d(tensor0, i); float v1 = ggml_get_f32_1d(tensor1, i); diff += std::abs(v0 - v1); } printf("%-60s: diff = %f\n", t.first.c_str(), diff); GGML_ASSERT(diff < 1e-6); } printf("\nOK: All tensors are equal\n"); return 0; }
O3
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x258, %rsp # imm = 0x258 movabsq $0x100002000, %rax # imm = 0x100002000 leaq 0x24(%rsp), %rsi movq %rax, 0x4(%rsi) movb $0x0, (%rsi) leaq 0x168(%rsp), %rdi callq 0x4fe6 leaq 0x37c9(%rip), %rsi # 0x820f leaq 0x37e6(%rip), %rdx # 0x8233 leaq 0x78(%rsp), %rdi callq 0x58ec leaq 0xb8(%rsp), %rdi leaq 0x37db(%rip), %rsi # 0x8241 leaq 0x37f8(%rip), %rdx # 0x8265 callq 0x58ec leaq 0x48(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0xf(%rsp), %rcx leaq 0xe(%rsp), %r8 movl $0x2, %edx callq 0x59a0 leaq 0x3767(%rip), %rsi # 0x81fe leaq 0x168(%rsp), %rdi leaq 0x48(%rsp), %rdx callq 0x52aa leaq 0x48(%rsp), %rdi callq 0x78aa movq $-0x80, %rbx leaq 0xe8(%rsp), %r14 movq -0x10(%r14), %rdi cmpq %rdi, %r14 je 0x4ad6 movq (%r14), %rsi incq %rsi callq 0x3300 movq -0x30(%r14), %rdi leaq -0x20(%r14), %rax cmpq %rdi, %rax je 0x4aee movq (%rax), %rsi incq %rsi callq 0x3300 addq $-0x40, %r14 addq $0x40, %rbx jne 0x4ac2 leaq 0x78(%rsp), %rdi leaq 0x24(%rsp), %rsi callq 0x4fe6 leaq 0x3765(%rip), %rsi # 0x8273 leaq 0x78(%rsp), %rdi callq 0x5a22 movq 0x188(%rsp), %rax cmpq 0x98(%rsp), %rax jne 0x4cf2 movq 0x1f0(%rsp), %rax movq (%rax), %rdi callq 0x3340 testb %al, %al je 0x4d00 movq 0x100(%rsp), %rax movq (%rax), %rdi callq 0x3340 testb %al, %al je 0x4d0e movq 0x180(%rsp), %rbx testq %rbx, %rbx je 0x4c5a leaq 0x78(%rsp), %r14 leaq 0x37dd(%rip), %rax # 0x8358 movq %rax, 0x18(%rsp) leaq 0x3835(%rip), %r15 # 0x83bc movq 0x8(%rbx), %rsi movq 0x28(%rbx), %r12 movq %r14, %rdi xorl %eax, %eax callq 0x5d5e movq %rax, %r13 movq %r12, %rdi movq %rax, %rsi callq 0x34d0 testb %al, %al je 0x4cb2 cmpl $0x0, (%r12) jne 0x4c9f cmpl $0x0, (%r13) jne 0x4c91 xorpd %xmm0, %xmm0 movss %xmm0, 0x10(%rsp) xorl %ebp, %ebp movq %r12, %rdi callq 0x3310 cmpq %rax, %rbp jae 0x4c1d movq %r12, %rdi movl %ebp, %esi callq 0x3290 movapd %xmm0, 0x30(%rsp) movq %r13, %rdi movl %ebp, %esi callq 0x3290 movaps 0x30(%rsp), %xmm1 subss %xmm0, %xmm1 andps 0x3418(%rip), %xmm1 # 0x8020 movss 0x10(%rsp), %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0x10(%rsp) incq %rbp jmp 0x4bd1 movq 0x8(%rbx), %rsi xorps %xmm0, %xmm0 cvtss2sd 0x10(%rsp), %xmm0 movsd %xmm0, 0x10(%rsp) movq %r15, %rdi movb $0x1, %al callq 0x3060 movsd 0x33ee(%rip), %xmm0 # 0x8030 ucomisd 0x10(%rsp), %xmm0 jbe 0x4cd1 movq (%rbx), %rbx testq %rbx, %rbx jne 0x4b87 leaq 0x39ac(%rip), %rdi # 0x860d callq 0x3480 leaq 0x78(%rsp), %rdi callq 0x5f4e leaq 0x168(%rsp), %rdi callq 0x5f4e xorl %eax, %eax addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x32, %esi leaq 0x3700(%rip), %rax # 0x839d jmp 0x4cab movl $0x31, %esi leaq 0x36d3(%rip), %rax # 0x837e movq %rax, 0x18(%rsp) jmp 0x4cb7 movl $0x30, %esi leaq 0x35bf(%rip), %rdi # 0x827d leaq 0x33ba(%rip), %rdx # 0x807f movq 0x18(%rsp), %rcx xorl %eax, %eax callq 0x34e0 leaq 0x35a5(%rip), %rdi # 0x827d leaq 0x33a0(%rip), %rdx # 0x807f leaq 0x36e8(%rip), %rcx # 0x83ce movl $0x3c, %esi xorl %eax, %eax callq 0x34e0 leaq 0x35d4(%rip), %rcx # 0x82cd movl $0x26, %esi jmp 0x4d1a leaq 0x35f1(%rip), %rcx # 0x82f8 movl $0x28, %esi jmp 0x4d1a leaq 0x3613(%rip), %rcx # 0x8328 movl $0x29, %esi leaq 0x355c(%rip), %rdi # 0x827d leaq 0x3357(%rip), %rdx # 0x807f xorl %eax, %eax callq 0x34e0 jmp 0x4d71 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x78aa jmp 0x4d43 movq %rax, %rbx movl $0x40, %r14d leaq (%rsp,%r14), %rdi addq $0x78, %rdi callq 0x596a addq $-0x40, %r14 cmpq $-0x40, %r14 jne 0x4d49 jmp 0x4d8f movq %rax, %rbx leaq 0x78(%rsp), %rdi callq 0x596a jmp 0x4d8f movq %rax, %rbx jmp 0x4d8f jmp 0x4d82 jmp 0x4d82 jmp 0x4d82 jmp 0x4d82 jmp 0x4d82 jmp 0x4d82 movq %rax, %rbx leaq 0x78(%rsp), %rdi callq 0x5f4e leaq 0x168(%rsp), %rdi callq 0x5f4e movq %rbx, %rdi callq 0x3540
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 258h mov rax, 100002000h lea rsi, [rsp+288h+var_264] mov [rsi+4], rax mov byte ptr [rsi], 0 lea rdi, [rsp+288h+var_120] call _ZN9ggml_easy3ctxC2ERKNS_10ctx_paramsE; ggml_easy::ctx::ctx(ggml_easy::ctx_params const&) lea rsi, aAcousticResidu; ".acoustic_residual_vector_quantizer" lea rdx, aAcousticRvq; ".acoustic_rvq" lea rdi, [rsp+288h+var_210] call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_ lea rdi, [rsp+288h+var_1D0] lea rsi, aSemanticResidu; ".semantic_residual_vector_quantizer" lea rdx, aSemanticRvq; ".semantic_rvq" call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_ lea rdi, [rsp+288h+var_240] lea rsi, [rsp+288h+var_210] lea rcx, [rsp+288h+var_279] lea r8, [rsp+288h+var_27A] mov edx, 2 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEC2ESt16initializer_listISA_ERKS7_RKSB_; std::map<std::string,std::string>::map(std::initializer_list<std::pair<std::string const,std::string>>,std::less<std::string> const&,std::allocator<std::pair<std::string const,std::string>> const&) lea rsi, aMimiSafetensor; "mimi.safetensors" lea rdi, [rsp+288h+var_120] lea rdx, [rsp+288h+var_240] call _ZN9ggml_easy3ctx16load_safetensorsEPKcSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEE; ggml_easy::ctx::load_safetensors(char const*,std::map<std::string,std::string>) lea rdi, [rsp+288h+var_240] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rbx, 0FFFFFFFFFFFFFF80h lea r14, [rsp+288h+var_1A0] loc_4AC2: mov rdi, [r14-10h]; void * cmp r14, rdi jz short loc_4AD6 mov rsi, [r14] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AD6: mov rdi, [r14-30h]; void * lea rax, [r14-20h] cmp rax, rdi jz short loc_4AEE mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AEE: add r14, 0FFFFFFFFFFFFFFC0h add rbx, 40h ; '@' jnz short loc_4AC2 lea rdi, [rsp+288h+var_210] lea rsi, [rsp+288h+var_264] call _ZN9ggml_easy3ctxC2ERKNS_10ctx_paramsE; ggml_easy::ctx::ctx(ggml_easy::ctx_params const&) lea rsi, aMimiGguf; "mimi.gguf" lea rdi, [rsp+288h+var_210]; this call _ZN9ggml_easy3ctx9load_ggufEPKc; ggml_easy::ctx::load_gguf(char const*) mov rax, [rsp+288h+var_100] cmp rax, [rsp+288h+var_1F0] jnz loc_4CF2 mov rax, [rsp+288h+var_98] mov rdi, [rax] call _ggml_backend_buft_is_host test al, al jz loc_4D00 mov rax, [rsp+288h+var_188] mov rdi, [rax] call _ggml_backend_buft_is_host test al, al jz loc_4D0E mov rbx, [rsp+288h+var_108] test rbx, rbx jz loc_4C5A lea r14, [rsp+288h+var_210] lea rax, aGgmlAreSameSha_0; "ggml_are_same_shape(tensor0, tensor1)" mov [rsp+288h+var_270], rax lea r15, a60sDiffF; "%-60s: diff = %f\n" loc_4B87: mov rsi, [rbx+8]; char * mov r12, [rbx+28h] mov rdi, r14; this xor eax, eax call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...) mov r13, rax mov rdi, r12 mov rsi, rax call _ggml_are_same_shape test al, al jz loc_4CB2 cmp dword ptr [r12], 0 jnz loc_4C9F cmp dword ptr [r13+0], 0 jnz loc_4C91 xorpd xmm0, xmm0 movss dword ptr [rsp+288h+var_278], xmm0 xor ebp, ebp loc_4BD1: mov rdi, r12 call _ggml_nelements cmp rbp, rax jnb short loc_4C1D mov rdi, r12 mov esi, ebp call _ggml_get_f32_1d movapd [rsp+288h+var_258], xmm0 mov rdi, r13 mov esi, ebp call _ggml_get_f32_1d movaps xmm1, [rsp+288h+var_258] subss xmm1, xmm0 andps xmm1, cs:xmmword_8020 movss xmm0, dword ptr [rsp+288h+var_278] addss xmm0, xmm1 movss dword ptr [rsp+288h+var_278], xmm0 inc rbp jmp short loc_4BD1 loc_4C1D: mov rsi, [rbx+8] xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rsp+288h+var_278] movsd [rsp+288h+var_278], xmm0 mov rdi, r15 mov al, 1 call _printf movsd xmm0, cs:qword_8030 ucomisd xmm0, [rsp+288h+var_278] jbe loc_4CD1 mov rbx, [rbx] test rbx, rbx jnz loc_4B87 loc_4C5A: lea rdi, aOkAllTensorsAr; "\nOK: All tensors are equal" call _puts lea rdi, [rsp+288h+var_210]; this call _ZN9ggml_easy3ctxD2Ev; ggml_easy::ctx::~ctx() lea rdi, [rsp+288h+var_120]; this call _ZN9ggml_easy3ctxD2Ev; ggml_easy::ctx::~ctx() xor eax, eax add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4C91: mov esi, 32h ; '2' lea rax, aTensor1TypeGgm; "tensor1->type == GGML_TYPE_F32" jmp short loc_4CAB loc_4C9F: mov esi, 31h ; '1' lea rax, aTensor0TypeGgm; "tensor0->type == GGML_TYPE_F32" loc_4CAB: mov [rsp+288h+var_270], rax jmp short loc_4CB7 loc_4CB2: mov esi, 30h ; '0' loc_4CB7: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" mov rcx, [rsp+288h+var_270] xor eax, eax call _ggml_abort loc_4CD1: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDiff1e6; "diff < 1e-6" mov esi, 3Ch ; '<' xor eax, eax call _ggml_abort loc_4CF2: lea rcx, aCtx0TensorsSiz; "ctx0.tensors.size() == ctx1.tensors.siz"... mov esi, 26h ; '&' jmp short loc_4D1A loc_4D00: lea rcx, aGgmlBackendBuf_2; "ggml_backend_buft_is_host(ctx0.backend_"... mov esi, 28h ; '(' jmp short loc_4D1A loc_4D0E: lea rcx, aGgmlBackendBuf_3; "ggml_backend_buft_is_host(ctx1.backend_"... mov esi, 29h ; ')' loc_4D1A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort jmp short loc_4D71 mov rbx, rax lea rdi, [rsp+288h+var_240] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() jmp short loc_4D43 mov rbx, rax loc_4D43: mov r14d, 40h ; '@' loc_4D49: lea rdi, [rsp+r14+288h+var_288] add rdi, 78h ; 'x' call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string const,std::string>::~pair() add r14, 0FFFFFFFFFFFFFFC0h cmp r14, 0FFFFFFFFFFFFFFC0h jnz short loc_4D49 jmp short loc_4D8F mov rbx, rax lea rdi, [rsp+288h+var_210] call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string const,std::string>::~pair() jmp short loc_4D8F loc_4D71: mov rbx, rax jmp short loc_4D8F jmp short loc_4D82 jmp short loc_4D82 jmp short loc_4D82 jmp short loc_4D82 jmp short loc_4D82 jmp short $+2 loc_4D82: mov rbx, rax lea rdi, [rsp+288h+var_210]; this call _ZN9ggml_easy3ctxD2Ev; ggml_easy::ctx::~ctx() loc_4D8F: lea rdi, [rsp+288h+var_120]; this call _ZN9ggml_easy3ctxD2Ev; ggml_easy::ctx::~ctx() mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { int v3; // edx long long v4; // rbx char *v5; // r14 char *v6; // rdi char *v7; // rdi long long **v8; // rbx long long *v9; // r12 _DWORD *weight; // r13 __int128 v11; // xmm0 unsigned long long i; // rbp double f32_1d; // xmm0_8 float v14; // xmm1_4 long long *v15; // rsi long long v17; // rsi const char *v18; // rax const char *v19; // rcx long long v20; // rsi long long v21; // rbx char v22; // [rsp+Eh] [rbp-27Ah] BYREF char v23; // [rsp+Fh] [rbp-279h] BYREF double v24; // [rsp+10h] [rbp-278h] const char *v25; // [rsp+18h] [rbp-270h] _BYTE v26[4]; // [rsp+24h] [rbp-264h] BYREF long long v27; // [rsp+28h] [rbp-260h] float v28[6]; // [rsp+30h] [rbp-258h] _BYTE v29[48]; // [rsp+48h] [rbp-240h] BYREF _BYTE v30[32]; // [rsp+78h] [rbp-210h] BYREF long long v31; // [rsp+98h] [rbp-1F0h] _BYTE v32[48]; // [rsp+B8h] [rbp-1D0h] BYREF char v33; // [rsp+E8h] [rbp-1A0h] BYREF _QWORD *v34; // [rsp+100h] [rbp-188h] _BYTE v35[24]; // [rsp+168h] [rbp-120h] BYREF long long **v36; // [rsp+180h] [rbp-108h] long long v37; // [rsp+188h] [rbp-100h] _QWORD *v38; // [rsp+1F0h] [rbp-98h] v27 = 0x100002000LL; v26[0] = 0; ggml_easy::ctx::ctx((unsigned int)v35, (unsigned int)v26, (_DWORD)envp); ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_( v30, ".acoustic_residual_vector_quantizer", ".acoustic_rvq"); ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_( v32, ".semantic_residual_vector_quantizer", ".semantic_rvq"); std::map<std::string,std::string>::map(v29, v30, 2LL, &v23, &v22); ggml_easy::ctx::load_safetensors(v35, "mimi.safetensors", v29); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v29); v4 = -128LL; v5 = &v33; do { v6 = (char *)*((_QWORD *)v5 - 2); if ( v5 != v6 ) operator delete(v6, *(_QWORD *)v5 + 1LL); v7 = (char *)*((_QWORD *)v5 - 6); if ( v5 - 32 != v7 ) operator delete(v7, *((_QWORD *)v5 - 4) + 1LL); v5 -= 64; v4 += 64LL; } while ( v4 ); ggml_easy::ctx::ctx((unsigned int)v30, (unsigned int)v26, v3); ggml_easy::ctx::load_gguf((ggml_easy::ctx *)v30, "mimi.gguf"); if ( v37 != v31 ) { LABEL_27: v19 = "ctx0.tensors.size() == ctx1.tensors.size()"; v20 = 38LL; goto LABEL_30; } if ( !(unsigned __int8)ggml_backend_buft_is_host(*v38) ) { v19 = "ggml_backend_buft_is_host(ctx0.backend_buft[0])"; v20 = 40LL; goto LABEL_30; } if ( !(unsigned __int8)ggml_backend_buft_is_host(*v34) ) { v19 = "ggml_backend_buft_is_host(ctx1.backend_buft[0])"; v20 = 41LL; LABEL_30: v21 = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp", v20, "GGML_ASSERT(%s) failed", v19); ggml_easy::ctx::~ctx((ggml_easy::ctx *)v35); _Unwind_Resume(v21); } v8 = v36; if ( v36 ) { v25 = "ggml_are_same_shape(tensor0, tensor1)"; while ( 1 ) { v9 = v8[5]; weight = (_DWORD *)ggml_easy::ctx::get_weight((ggml_easy::ctx *)v30, (const char *)v8[1]); if ( !(unsigned __int8)ggml_are_same_shape(v9, weight) ) { v17 = 48LL; goto LABEL_25; } if ( *(_DWORD *)v9 ) break; if ( *weight ) { v17 = 50LL; v18 = "tensor1->type == GGML_TYPE_F32"; goto LABEL_23; } v11 = 0LL; LODWORD(v24) = 0; for ( i = 0LL; i < ggml_nelements(v9); ++i ) { *(double *)&v11 = ggml_get_f32_1d(v9, (unsigned int)i); *(_OWORD *)v28 = v11; f32_1d = ggml_get_f32_1d(weight, (unsigned int)i); v14 = v28[0] - *(float *)&f32_1d; v11 = LODWORD(v24); *(float *)&v24 = *(float *)&v24 + fabs(v14); } v15 = v8[1]; v24 = *(float *)&v24; printf("%-60s: diff = %f\n", v15); if ( v24 >= 0.000001 ) goto LABEL_26; v8 = (long long **)*v8; if ( !v8 ) goto LABEL_20; } v17 = 49LL; v18 = "tensor0->type == GGML_TYPE_F32"; LABEL_23: v25 = v18; LABEL_25: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp", v17, "GGML_ASSERT(%s) failed", v25); LABEL_26: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp", 60LL, "GGML_ASSERT(%s) failed", "diff < 1e-6"); goto LABEL_27; } LABEL_20: puts("\nOK: All tensors are equal"); ggml_easy::ctx::~ctx((ggml_easy::ctx *)v30); ggml_easy::ctx::~ctx((ggml_easy::ctx *)v35); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x258 MOV RAX,0x100002000 LEA RSI,[RSP + 0x24] MOV qword ptr [RSI + 0x4],RAX MOV byte ptr [RSI],0x0 LEA RDI,[RSP + 0x168] CALL 0x00104fe6 LAB_00104a3f: LEA RSI,[0x10820f] LEA RDX,[0x108233] LEA RDI,[RSP + 0x78] CALL 0x001058ec LEA RDI,[RSP + 0xb8] LAB_00104a5f: LEA RSI,[0x108241] LEA RDX,[0x108265] CALL 0x001058ec LAB_00104a72: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x78] LEA RCX,[RSP + 0xf] LEA R8,[RSP + 0xe] MOV EDX,0x2 CALL 0x001059a0 LAB_00104a90: LEA RSI,[0x1081fe] LEA RDI,[RSP + 0x168] LEA RDX,[RSP + 0x48] CALL 0x001052aa LEA RDI,[RSP + 0x48] CALL 0x001078aa MOV RBX,-0x80 LEA R14,[RSP + 0xe8] LAB_00104ac2: MOV RDI,qword ptr [R14 + -0x10] CMP R14,RDI JZ 0x00104ad6 MOV RSI,qword ptr [R14] INC RSI CALL 0x00103300 LAB_00104ad6: MOV RDI,qword ptr [R14 + -0x30] LEA RAX,[R14 + -0x20] CMP RAX,RDI JZ 0x00104aee MOV RSI,qword ptr [RAX] INC RSI CALL 0x00103300 LAB_00104aee: ADD R14,-0x40 ADD RBX,0x40 JNZ 0x00104ac2 LAB_00104af8: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x24] CALL 0x00104fe6 LAB_00104b07: LEA RSI,[0x108273] LEA RDI,[RSP + 0x78] CALL 0x00105a22 MOV RAX,qword ptr [RSP + 0x188] CMP RAX,qword ptr [RSP + 0x98] JNZ 0x00104cf2 MOV RAX,qword ptr [RSP + 0x1f0] MOV RDI,qword ptr [RAX] CALL 0x00103340 TEST AL,AL JZ 0x00104d00 MOV RAX,qword ptr [RSP + 0x100] MOV RDI,qword ptr [RAX] CALL 0x00103340 TEST AL,AL JZ 0x00104d0e MOV RBX,qword ptr [RSP + 0x180] TEST RBX,RBX JZ 0x00104c5a LEA R14,[RSP + 0x78] LEA RAX,[0x108358] MOV qword ptr [RSP + 0x18],RAX LEA R15,[0x1083bc] LAB_00104b87: MOV RSI,qword ptr [RBX + 0x8] MOV R12,qword ptr [RBX + 0x28] LAB_00104b8f: MOV RDI,R14 XOR EAX,EAX CALL 0x00105d5e MOV R13,RAX MOV RDI,R12 MOV RSI,RAX CALL 0x001034d0 TEST AL,AL JZ 0x00104cb2 CMP dword ptr [R12],0x0 JNZ 0x00104c9f CMP dword ptr [R13],0x0 JNZ 0x00104c91 XORPD XMM0,XMM0 MOVSS dword ptr [RSP + 0x10],XMM0 XOR EBP,EBP LAB_00104bd1: MOV RDI,R12 CALL 0x00103310 CMP RBP,RAX JNC 0x00104c1d LAB_00104bde: MOV RDI,R12 MOV ESI,EBP CALL 0x00103290 MOVAPD xmmword ptr [RSP + 0x30],XMM0 LAB_00104bee: MOV RDI,R13 MOV ESI,EBP CALL 0x00103290 MOVAPS XMM1,xmmword ptr [RSP + 0x30] SUBSS XMM1,XMM0 ANDPS XMM1,xmmword ptr [0x00108020] MOVSS XMM0,dword ptr [RSP + 0x10] ADDSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x10],XMM0 INC RBP JMP 0x00104bd1 LAB_00104c1d: MOV RSI,qword ptr [RBX + 0x8] XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RSP + 0x10] MOVSD qword ptr [RSP + 0x10],XMM0 MOV RDI,R15 MOV AL,0x1 CALL 0x00103060 MOVSD XMM0,qword ptr [0x00108030] UCOMISD XMM0,qword ptr [RSP + 0x10] JBE 0x00104cd1 MOV RBX,qword ptr [RBX] TEST RBX,RBX JNZ 0x00104b87 LAB_00104c5a: LEA RDI,[0x10860d] CALL 0x00103480 LEA RDI,[RSP + 0x78] CALL 0x00105f4e LEA RDI,[RSP + 0x168] CALL 0x00105f4e XOR EAX,EAX ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00104c91: MOV ESI,0x32 LEA RAX,[0x10839d] JMP 0x00104cab LAB_00104c9f: MOV ESI,0x31 LEA RAX,[0x10837e] LAB_00104cab: MOV qword ptr [RSP + 0x18],RAX JMP 0x00104cb7 LAB_00104cb2: MOV ESI,0x30 LAB_00104cb7: LEA RDI,[0x10827d] LEA RDX,[0x10807f] MOV RCX,qword ptr [RSP + 0x18] XOR EAX,EAX CALL 0x001034e0 LAB_00104cd1: LEA RDI,[0x10827d] LEA RDX,[0x10807f] LEA RCX,[0x1083ce] MOV ESI,0x3c XOR EAX,EAX CALL 0x001034e0 LAB_00104cf2: LEA RCX,[0x1082cd] MOV ESI,0x26 JMP 0x00104d1a LAB_00104d00: LEA RCX,[0x1082f8] MOV ESI,0x28 JMP 0x00104d1a LAB_00104d0e: LEA RCX,[0x108328] MOV ESI,0x29 LAB_00104d1a: LEA RDI,[0x10827d] LEA RDX,[0x10807f] XOR EAX,EAX CALL 0x001034e0 LAB_00104d2f: JMP 0x00104d71 LAB_00104d71: MOV RBX,RAX JMP 0x00104d8f LAB_00104d8f: LEA RDI,[RSP + 0x168] CALL 0x00105f4e MOV RDI,RBX CALL 0x00103540
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 main(void) { int *piVar1; char cVar2; int *piVar3; ulong uVar4; char *pcVar5; long lVar6; long *plVar7; ulong uVar8; float fVar9; int8 uVar10; int1 local_27a; int1 local_279; double local_278; char *local_270; ctx_params local_264 [4]; int8 local_260; int8 local_258; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_240 [48]; ctx local_210 [32]; long local_1f0; int1 local_1d0 [48]; long local_1a0 [3]; int8 *local_188; ctx local_120 [24]; long *local_108; long local_100; int8 *local_98; local_260 = 0x100002000; local_264[0] = (ctx_params)0x0; ggml_easy::ctx::ctx(local_120,local_264); /* try { // try from 00104a3f to 00104a56 has its CatchHandler @ 00104d71 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_ (local_210,".acoustic_residual_vector_quantizer",".acoustic_rvq"); /* try { // try from 00104a5f to 00104a71 has its CatchHandler @ 00104d62 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA36_KcRA14_S9_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_ (local_1d0,".semantic_residual_vector_quantizer",".semantic_rvq"); /* try { // try from 00104a72 to 00104a8f has its CatchHandler @ 00104d40 */ std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::map(local_240,local_210,2,&local_279,&local_27a); /* try { // try from 00104a90 to 00104aa8 has its CatchHandler @ 00104d31 */ ggml_easy::ctx::load_safetensors(local_120,"mimi.safetensors",local_240); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_240); lVar6 = -0x80; plVar7 = local_1a0; do { if (plVar7 != (long *)plVar7[-2]) { operator_delete((long *)plVar7[-2],*plVar7 + 1); } if (plVar7 + -4 != (long *)plVar7[-6]) { operator_delete((long *)plVar7[-6],plVar7[-4] + 1); } plVar7 = plVar7 + -8; lVar6 = lVar6 + 0x40; } while (lVar6 != 0); /* try { // try from 00104af8 to 00104b06 has its CatchHandler @ 00104d2f */ ggml_easy::ctx::ctx(local_210,local_264); /* try { // try from 00104b07 to 00104b55 has its CatchHandler @ 00104d76 */ ggml_easy::ctx::load_gguf(local_210,"mimi.gguf"); if (local_100 == local_1f0) { cVar2 = ggml_backend_buft_is_host(*local_98); if (cVar2 == '\0') { pcVar5 = "ggml_backend_buft_is_host(ctx0.backend_buft[0])"; uVar10 = 0x28; } else { cVar2 = ggml_backend_buft_is_host(*local_188); if (cVar2 != '\0') { if (local_108 != (long *)0x0) { local_270 = "ggml_are_same_shape(tensor0, tensor1)"; plVar7 = local_108; do { piVar1 = (int *)plVar7[5]; /* try { // try from 00104b8f to 00104ba6 has its CatchHandler @ 00104d7a */ piVar3 = (int *)ggml_easy::ctx::get_weight((char *)local_210,plVar7[1]); cVar2 = ggml_are_same_shape(piVar1,piVar3); if (cVar2 == '\0') { uVar10 = 0x30; LAB_00104cb7: /* try { // try from 00104cb7 to 00104cd0 has its CatchHandler @ 00104d7c */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp" ,uVar10,"GGML_ASSERT(%s) failed",local_270); LAB_00104cd1: /* try { // try from 00104cd1 to 00104cf1 has its CatchHandler @ 00104d78 */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp" ,0x3c,"GGML_ASSERT(%s) failed","diff < 1e-6"); goto LAB_00104cf2; } if (*piVar1 != 0) { uVar10 = 0x31; local_270 = "tensor0->type == GGML_TYPE_F32"; goto LAB_00104cb7; } if (*piVar3 != 0) { uVar10 = 0x32; local_270 = "tensor1->type == GGML_TYPE_F32"; goto LAB_00104cb7; } local_278 = (double)((ulong)local_278 & 0xffffffff00000000); uVar8 = 0; while( true ) { /* try { // try from 00104bd1 to 00104bd8 has its CatchHandler @ 00104d82 */ uVar4 = ggml_nelements(piVar1); if (uVar4 <= uVar8) break; /* try { // try from 00104bde to 00104bed has its CatchHandler @ 00104d7e */ uVar10 = ggml_get_f32_1d(piVar1,uVar8 & 0xffffffff); /* try { // try from 00104bee to 00104bf7 has its CatchHandler @ 00104d80 */ local_258 = uVar10; fVar9 = (float)ggml_get_f32_1d(piVar3,uVar8 & 0xffffffff); local_278 = (double)CONCAT44(local_278._4_4_, local_278._0_4_ + (float)((uint)((float)local_258 - fVar9) & _DAT_00108020) ); uVar8 = uVar8 + 1; } local_278 = (double)local_278._0_4_; printf("%-60s: diff = %f\n",plVar7[1]); if (_DAT_00108030 <= local_278) goto LAB_00104cd1; plVar7 = (long *)*plVar7; } while (plVar7 != (long *)0x0); } puts("\nOK: All tensors are equal"); ggml_easy::ctx::~ctx(local_210); ggml_easy::ctx::~ctx(local_120); return 0; } pcVar5 = "ggml_backend_buft_is_host(ctx1.backend_buft[0])"; uVar10 = 0x29; } } else { LAB_00104cf2: pcVar5 = "ctx0.tensors.size() == ctx1.tensors.size()"; uVar10 = 0x26; } /* try { // try from 00104d1a to 00104d2e has its CatchHandler @ 00104d76 */ uVar10 = ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/safetensors.cpp" ,uVar10,"GGML_ASSERT(%s) failed",pcVar5); /* catch() { ... } // from try @ 00104af8 with catch @ 00104d2f */ /* catch() { ... } // from try @ 00104a3f with catch @ 00104d71 */ ggml_easy::ctx::~ctx(local_120); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar10); }
50,478
inline_mysql_rwlock_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_init( #ifdef HAVE_PSI_RWLOCK_INTERFACE PSI_rwlock_key key, #endif mysql_rwlock_t *that) { #ifdef HAVE_PSI_RWLOCK_INTERFACE that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_rwlock); #else that->m_psi= NULL; #endif /* pthread_rwlockattr_t is not used in MySQL. */ return my_rwlock_init(&that->m_rwlock, NULL); }
O0
c
inline_mysql_rwlock_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) leaq 0x208a72(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x50(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) movq -0x10(%rbp), %rdi callq 0xfb930 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_init_1: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov [rbp+var_10], rsi lea rax, PSI_server mov rax, [rax] mov rax, [rax+50h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+90h], rcx mov rdi, [rbp+var_10] call my_rw_init add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_init_1(unsigned int a1, long long a2) { *(_QWORD *)(a2 + 144) = ((long long ( *)(_QWORD, long long))PSI_server[10])(a1, a2); return my_rw_init(a2); }
inline_mysql_rwlock_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x50] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001fb930 ADD RSP,0x10 POP RBP RET
void inline_mysql_rwlock_init(int4 param_1,long param_2) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x50))(param_1,param_2); *(int8 *)(param_2 + 0x90) = uVar1; my_rw_init(param_2); return; }
50,479
lunasvg::SVGImageElement::render(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGImageElement::render(SVGRenderState& state) const { if(m_image.isNull() || isDisplayNone() || isVisibilityHidden()) return; Rect dstRect(fillBoundingBox()); Rect srcRect(0, 0, m_image.width(), m_image.height()); if(dstRect.isEmpty() || srcRect.isEmpty()) return; m_preserveAspectRatio.transformRect(dstRect, srcRect); SVGBlendInfo blendInfo(this); SVGRenderState newState(this, state, localTransform()); newState.beginGroup(blendInfo); newState->drawImage(m_image, dstRect, srcRect, newState.currentTransform()); newState.endGroup(blendInfo); }
O0
cpp
lunasvg::SVGImageElement::render(lunasvg::SVGRenderState&) const: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xb8(%rbp) addq $0x110, %rdi # imm = 0x110 callq 0xbec0 testb $0x1, %al jne 0x1bd40 movq -0xb8(%rbp), %rdi callq 0x20470 testb $0x1, %al jne 0x1bd40 movq -0xb8(%rbp), %rdi callq 0x21420 testb $0x1, %al jne 0x1bd40 jmp 0x1bd45 jmp 0x1bedd movq -0xb8(%rbp), %rdi callq 0x1bc10 movq -0xb8(%rbp), %rdi movlpd %xmm0, -0x20(%rbp) movlpd %xmm1, -0x18(%rbp) addq $0x110, %rdi # imm = 0x110 callq 0xc7b0 movq -0xb8(%rbp), %rdi cvtsi2ss %eax, %xmm0 movss %xmm0, -0xbc(%rbp) addq $0x110, %rdi # imm = 0x110 callq 0xc7f0 movss -0xbc(%rbp), %xmm2 cvtsi2ss %eax, %xmm3 leaq -0x30(%rbp), %rdi xorps %xmm1, %xmm1 movaps %xmm1, %xmm0 callq 0x14ee0 leaq -0x20(%rbp), %rdi callq 0xe850 testb $0x1, %al jne 0x1bdc4 leaq -0x30(%rbp), %rdi callq 0xe850 testb $0x1, %al jne 0x1bdc4 jmp 0x1bdc9 jmp 0x1bedd movq -0xb8(%rbp), %rdi addq $0xf8, %rdi leaq -0x20(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x4ab30 movq -0xb8(%rbp), %rsi leaq -0x48(%rbp), %rdi movq %rdi, -0xc8(%rbp) callq 0x4c890 movq -0xb8(%rbp), %rsi movq -0x10(%rbp), %rax movq %rax, -0xe0(%rbp) leaq -0xa0(%rbp), %rdi movq %rdi, -0xd8(%rbp) callq 0x20db0 movq -0xb8(%rbp), %rsi movq -0xe0(%rbp), %rdx movq -0xd8(%rbp), %rcx leaq -0x88(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0x20e00 movq -0xd0(%rbp), %rdi movq -0xc8(%rbp), %rsi callq 0x4c9d0 jmp 0x1be5d leaq -0x88(%rbp), %rdi callq 0x20750 movq %rax, -0xe8(%rbp) jmp 0x1be72 movq -0xb8(%rbp), %rax addq $0x110, %rax # imm = 0x110 movq %rax, -0xf8(%rbp) leaq -0x88(%rbp), %rdi callq 0x20eb0 movq %rax, -0xf0(%rbp) jmp 0x1be9b movq -0xf0(%rbp), %r8 movq -0xf8(%rbp), %rsi movq -0xe8(%rbp), %rdi leaq -0x20(%rbp), %rdx leaq -0x30(%rbp), %rcx callq 0x13fb0 jmp 0x1bebf leaq -0x88(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0x4cae0 jmp 0x1bed1 leaq -0x88(%rbp), %rdi callq 0xe810 addq $0x100, %rsp # imm = 0x100 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0xa8(%rbp) movl %eax, -0xac(%rbp) leaq -0x88(%rbp), %rdi callq 0xe810 movq -0xa8(%rbp), %rdi callq 0xb6c0
_ZNK7lunasvg15SVGImageElement6renderERNS_14SVGRenderStateE: push rbp mov rbp, rsp sub rsp, 100h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_B8], rdi add rdi, 110h; this call _ZNK7lunasvg6Bitmap6isNullEv; lunasvg::Bitmap::isNull(void) test al, 1 jnz short loc_1BD40 mov rdi, [rbp+var_B8]; this call _ZNK7lunasvg10SVGElement13isDisplayNoneEv; lunasvg::SVGElement::isDisplayNone(void) test al, 1 jnz short loc_1BD40 mov rdi, [rbp+var_B8]; this call _ZNK7lunasvg10SVGElement18isVisibilityHiddenEv; lunasvg::SVGElement::isVisibilityHidden(void) test al, 1 jnz short loc_1BD40 jmp short loc_1BD45 loc_1BD40: jmp loc_1BEDD loc_1BD45: mov rdi, [rbp+var_B8]; this call _ZNK7lunasvg15SVGImageElement15fillBoundingBoxEv; lunasvg::SVGImageElement::fillBoundingBox(void) mov rdi, [rbp+var_B8] movlpd [rbp+var_20], xmm0 movlpd [rbp+var_18], xmm1 add rdi, 110h; this call _ZNK7lunasvg6Bitmap5widthEv; lunasvg::Bitmap::width(void) mov rdi, [rbp+var_B8] cvtsi2ss xmm0, eax movss [rbp+var_BC], xmm0 add rdi, 110h; this call _ZNK7lunasvg6Bitmap6heightEv; lunasvg::Bitmap::height(void) movss xmm2, [rbp+var_BC]; float cvtsi2ss xmm3, eax; float lea rdi, [rbp+var_30]; this xorps xmm1, xmm1; float movaps xmm0, xmm1; float call _ZN7lunasvg4RectC2Effff; lunasvg::Rect::Rect(float,float,float,float) lea rdi, [rbp+var_20]; this call _ZNK7lunasvg4Rect7isEmptyEv; lunasvg::Rect::isEmpty(void) test al, 1 jnz short loc_1BDC4 lea rdi, [rbp+var_30]; this call _ZNK7lunasvg4Rect7isEmptyEv; lunasvg::Rect::isEmpty(void) test al, 1 jnz short loc_1BDC4 jmp short loc_1BDC9 loc_1BDC4: jmp loc_1BEDD loc_1BDC9: mov rdi, [rbp+var_B8] add rdi, 0F8h; this lea rsi, [rbp+var_20]; lunasvg::Rect * lea rdx, [rbp+var_30]; lunasvg::Rect * call _ZNK7lunasvg22SVGPreserveAspectRatio13transformRectERNS_4RectES2_; lunasvg::SVGPreserveAspectRatio::transformRect(lunasvg::Rect &,lunasvg::Rect &) mov rsi, [rbp+var_B8]; lunasvg::SVGElement * lea rdi, [rbp+var_48]; this mov [rbp+var_C8], rdi call _ZN7lunasvg12SVGBlendInfoC2EPKNS_10SVGElementE; lunasvg::SVGBlendInfo::SVGBlendInfo(lunasvg::SVGElement const*) mov rsi, [rbp+var_B8] mov rax, [rbp+var_10] mov [rbp+var_E0], rax lea rdi, [rbp+var_A0]; this mov [rbp+var_D8], rdi call _ZNK7lunasvg18SVGGraphicsElement14localTransformEv; lunasvg::SVGGraphicsElement::localTransform(void) mov rsi, [rbp+var_B8]; lunasvg::SVGElement * mov rdx, [rbp+var_E0]; lunasvg::SVGRenderState * mov rcx, [rbp+var_D8]; lunasvg::Transform * lea rdi, [rbp+var_88]; this mov [rbp+var_D0], rdi call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementERKS0_RKNS_9TransformE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const&,lunasvg::Transform const&) mov rdi, [rbp+var_D0]; this mov rsi, [rbp+var_C8]; lunasvg::SVGBlendInfo * call _ZN7lunasvg14SVGRenderState10beginGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::beginGroup(lunasvg::SVGBlendInfo const&) jmp short $+2 loc_1BE5D: lea rdi, [rbp+var_88] call _ZNK7lunasvg14SVGRenderStateptEv; lunasvg::SVGRenderState::operator->(void) mov [rbp+var_E8], rax jmp short $+2 loc_1BE72: mov rax, [rbp+var_B8] add rax, 110h mov [rbp+var_F8], rax lea rdi, [rbp+var_88]; this call _ZNK7lunasvg14SVGRenderState16currentTransformEv; lunasvg::SVGRenderState::currentTransform(void) mov [rbp+var_F0], rax jmp short $+2 loc_1BE9B: mov r8, [rbp+var_F0]; lunasvg::Transform * mov rsi, [rbp+var_F8]; lunasvg::Bitmap * mov rdi, [rbp+var_E8]; this lea rdx, [rbp+var_20]; lunasvg::Rect * lea rcx, [rbp+var_30]; lunasvg::Rect * call _ZN7lunasvg6Canvas9drawImageERKNS_6BitmapERKNS_4RectES6_RKNS_9TransformE; lunasvg::Canvas::drawImage(lunasvg::Bitmap const&,lunasvg::Rect const&,lunasvg::Rect const&,lunasvg::Transform const&) jmp short $+2 loc_1BEBF: lea rdi, [rbp+var_88]; this lea rsi, [rbp+var_48]; lunasvg::SVGBlendInfo * call _ZN7lunasvg14SVGRenderState8endGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::endGroup(lunasvg::SVGBlendInfo const&) jmp short $+2 loc_1BED1: lea rdi, [rbp+var_88]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() loc_1BEDD: add rsp, 100h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_A8], rcx mov [rbp+var_AC], eax lea rdi, [rbp+var_88]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() mov rdi, [rbp+var_A8] call __Unwind_Resume
void lunasvg::SVGImageElement::render( lunasvg::SVGImageElement *this, lunasvg::SVGRenderState *a2, float a3, double a4) { int v4; // eax lunasvg::Transform *v5; // [rsp+10h] [rbp-F0h] lunasvg::Canvas *v6; // [rsp+18h] [rbp-E8h] lunasvg::SVGRenderState *v7; // [rsp+20h] [rbp-E0h] float v8; // [rsp+44h] [rbp-BCh] _BYTE v9[24]; // [rsp+60h] [rbp-A0h] BYREF _BYTE v10[64]; // [rsp+78h] [rbp-88h] BYREF _BYTE v11[24]; // [rsp+B8h] [rbp-48h] BYREF _BYTE v12[16]; // [rsp+D0h] [rbp-30h] BYREF _QWORD v13[2]; // [rsp+E0h] [rbp-20h] BYREF lunasvg::SVGRenderState *v14; // [rsp+F0h] [rbp-10h] lunasvg::SVGImageElement *v15; // [rsp+F8h] [rbp-8h] v15 = this; v14 = a2; if ( !lunasvg::Bitmap::isNull((lunasvg::SVGImageElement *)((char *)this + 272)) && (lunasvg::SVGElement::isDisplayNone(this) & 1) == 0 && (lunasvg::SVGElement::isVisibilityHidden(this) & 1) == 0 ) { v13[0] = lunasvg::SVGImageElement::fillBoundingBox(this, a3); *(double *)&v13[1] = a4; v8 = (float)(int)lunasvg::Bitmap::width((lunasvg::SVGImageElement *)((char *)this + 272)); v4 = lunasvg::Bitmap::height((lunasvg::SVGImageElement *)((char *)this + 272)); lunasvg::Rect::Rect((lunasvg::Rect *)v12, 0.0, 0.0, v8, (float)v4); if ( !lunasvg::Rect::isEmpty((lunasvg::Rect *)v13) && !lunasvg::Rect::isEmpty((lunasvg::Rect *)v12) ) { lunasvg::SVGPreserveAspectRatio::transformRect( (lunasvg::SVGImageElement *)((char *)this + 248), (lunasvg::Rect *)v13, (lunasvg::Rect *)v12); lunasvg::SVGBlendInfo::SVGBlendInfo((lunasvg::SVGBlendInfo *)v11, this); v7 = v14; lunasvg::SVGGraphicsElement::localTransform((lunasvg::SVGGraphicsElement *)v9); lunasvg::SVGRenderState::SVGRenderState((lunasvg::SVGRenderState *)v10, this, v7, (const lunasvg::Transform *)v9); lunasvg::SVGRenderState::beginGroup((lunasvg::SVGRenderState *)v10, (const lunasvg::SVGBlendInfo *)v11); v6 = (lunasvg::Canvas *)lunasvg::SVGRenderState::operator->(v10); v5 = (lunasvg::Transform *)lunasvg::SVGRenderState::currentTransform((lunasvg::SVGRenderState *)v10); lunasvg::Canvas::drawImage( v6, (lunasvg::SVGImageElement *)((char *)this + 272), (const lunasvg::Rect *)v13, (const lunasvg::Rect *)v12, v5); lunasvg::SVGRenderState::endGroup((lunasvg::SVGRenderState *)v10, (const lunasvg::SVGBlendInfo *)v11); lunasvg::SVGRenderState::~SVGRenderState((lunasvg::SVGRenderState *)v10); } } }
render: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xb8],RDI ADD RDI,0x110 CALL 0x0010bec0 TEST AL,0x1 JNZ 0x0011bd40 MOV RDI,qword ptr [RBP + -0xb8] CALL 0x00120470 TEST AL,0x1 JNZ 0x0011bd40 MOV RDI,qword ptr [RBP + -0xb8] CALL 0x00121420 TEST AL,0x1 JNZ 0x0011bd40 JMP 0x0011bd45 LAB_0011bd40: JMP 0x0011bedd LAB_0011bd45: MOV RDI,qword ptr [RBP + -0xb8] CALL 0x0011bc10 MOV RDI,qword ptr [RBP + -0xb8] MOVLPD qword ptr [RBP + -0x20],XMM0 MOVLPD qword ptr [RBP + -0x18],XMM1 ADD RDI,0x110 CALL 0x0010c7b0 MOV RDI,qword ptr [RBP + -0xb8] CVTSI2SS XMM0,EAX MOVSS dword ptr [RBP + -0xbc],XMM0 ADD RDI,0x110 CALL 0x0010c7f0 MOVSS XMM2,dword ptr [RBP + -0xbc] CVTSI2SS XMM3,EAX LEA RDI,[RBP + -0x30] XORPS XMM1,XMM1 MOVAPS XMM0,XMM1 CALL 0x00114ee0 LEA RDI,[RBP + -0x20] CALL 0x0010e850 TEST AL,0x1 JNZ 0x0011bdc4 LEA RDI,[RBP + -0x30] CALL 0x0010e850 TEST AL,0x1 JNZ 0x0011bdc4 JMP 0x0011bdc9 LAB_0011bdc4: JMP 0x0011bedd LAB_0011bdc9: MOV RDI,qword ptr [RBP + -0xb8] ADD RDI,0xf8 LEA RSI,[RBP + -0x20] LEA RDX,[RBP + -0x30] CALL 0x0014ab30 MOV RSI,qword ptr [RBP + -0xb8] LEA RDI,[RBP + -0x48] MOV qword ptr [RBP + -0xc8],RDI CALL 0x0014c890 MOV RSI,qword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xe0],RAX LEA RDI,[RBP + -0xa0] MOV qword ptr [RBP + -0xd8],RDI CALL 0x00120db0 MOV RSI,qword ptr [RBP + -0xb8] MOV RDX,qword ptr [RBP + -0xe0] MOV RCX,qword ptr [RBP + -0xd8] LEA RDI,[RBP + -0x88] MOV qword ptr [RBP + -0xd0],RDI CALL 0x00120e00 MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0xc8] LAB_0011be56: CALL 0x0014c9d0 JMP 0x0011be5d LAB_0011be5d: LEA RDI,[RBP + -0x88] CALL 0x00120750 MOV qword ptr [RBP + -0xe8],RAX JMP 0x0011be72 LAB_0011be72: MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x110 MOV qword ptr [RBP + -0xf8],RAX LEA RDI,[RBP + -0x88] CALL 0x00120eb0 MOV qword ptr [RBP + -0xf0],RAX JMP 0x0011be9b LAB_0011be9b: MOV R8,qword ptr [RBP + -0xf0] MOV RSI,qword ptr [RBP + -0xf8] MOV RDI,qword ptr [RBP + -0xe8] LEA RDX,[RBP + -0x20] LEA RCX,[RBP + -0x30] CALL 0x00113fb0 JMP 0x0011bebf LAB_0011bebf: LEA RDI,[RBP + -0x88] LEA RSI,[RBP + -0x48] CALL 0x0014cae0 LAB_0011becf: JMP 0x0011bed1 LAB_0011bed1: LEA RDI,[RBP + -0x88] CALL 0x0010e810 LAB_0011bedd: ADD RSP,0x100 POP RBP RET
/* lunasvg::SVGImageElement::render(lunasvg::SVGRenderState&) const */ void __thiscall lunasvg::SVGImageElement::render(SVGImageElement *this,SVGRenderState *param_1) { SVGRenderState *pSVar1; int iVar2; int iVar3; ulong uVar4; Canvas *this_00; Transform *pTVar5; Transform local_a8 [24]; SVGRenderState local_90 [64]; SVGBlendInfo local_50 [24]; Rect local_38 [16]; int8 local_28 [2]; SVGRenderState *local_18; SVGImageElement *local_10; local_18 = param_1; local_10 = this; uVar4 = Bitmap::isNull((Bitmap *)(this + 0x110)); if ((((uVar4 & 1) == 0) && (uVar4 = SVGElement::isDisplayNone((SVGElement *)this), (uVar4 & 1) == 0)) && (uVar4 = SVGElement::isVisibilityHidden((SVGElement *)this), (uVar4 & 1) == 0)) { local_28[0] = fillBoundingBox(this); iVar2 = Bitmap::width((Bitmap *)(this + 0x110)); iVar3 = Bitmap::height((Bitmap *)(this + 0x110)); Rect::Rect(local_38,0.0,0.0,(float)iVar2,(float)iVar3); uVar4 = Rect::isEmpty((Rect *)local_28); if (((uVar4 & 1) == 0) && (uVar4 = Rect::isEmpty(local_38), (uVar4 & 1) == 0)) { SVGPreserveAspectRatio::transformRect ((SVGPreserveAspectRatio *)(this + 0xf8),(Rect *)local_28,local_38); SVGBlendInfo::SVGBlendInfo(local_50,(SVGElement *)this); pSVar1 = local_18; SVGGraphicsElement::localTransform(); SVGRenderState::SVGRenderState(local_90,(SVGElement *)this,pSVar1,local_a8); /* try { // try from 0011be56 to 0011bece has its CatchHandler @ 0011bee6 */ SVGRenderState::beginGroup((SVGBlendInfo *)local_90); this_00 = (Canvas *)SVGRenderState::operator->(local_90); pTVar5 = (Transform *)SVGRenderState::currentTransform(local_90); Canvas::drawImage(this_00,(Bitmap *)(this + 0x110),(Rect *)local_28,local_38,pTVar5); SVGRenderState::endGroup(local_90,local_50); SVGRenderState::~SVGRenderState(local_90); } } return; }
50,480
bitmap_is_set_all
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_set_all(const MY_BITMAP *map) { my_bitmap_map *data_ptr= map->bitmap; my_bitmap_map *end= map->last_word_ptr; for (; data_ptr < end; data_ptr++) if (*data_ptr != 0xFFFFFFFF) return FALSE; return (*data_ptr | map->last_word_mask) == 0xFFFFFFFF; }
O3
c
bitmap_is_set_all: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax jae 0x9d439 cmpl $-0x1, (%rax) jne 0x9d446 addq $0x4, %rax jmp 0x9d429 movl 0x18(%rdi), %ecx orl (%rax), %ecx cmpl $-0x1, %ecx sete %al jmp 0x9d448 xorl %eax, %eax popq %rbp retq
bitmap_is_set_all: push rbp mov rbp, rsp mov rax, [rdi] mov rcx, [rdi+8] loc_9D429: cmp rax, rcx jnb short loc_9D439 cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_9D446 add rax, 4 jmp short loc_9D429 loc_9D439: mov ecx, [rdi+18h] or ecx, [rax] cmp ecx, 0FFFFFFFFh setz al jmp short loc_9D448 loc_9D446: xor eax, eax loc_9D448: pop rbp retn
bool bitmap_is_set_all(long long a1) { _DWORD *i; // rax for ( i = *(_DWORD **)a1; ; ++i ) { if ( (unsigned long long)i >= *(_QWORD *)(a1 + 8) ) return (*i | *(_DWORD *)(a1 + 24)) == -1; if ( *i != -1 ) break; } return 0; }
bitmap_is_set_all: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] LAB_0019d429: CMP RAX,RCX JNC 0x0019d439 CMP dword ptr [RAX],-0x1 JNZ 0x0019d446 ADD RAX,0x4 JMP 0x0019d429 LAB_0019d439: MOV ECX,dword ptr [RDI + 0x18] OR ECX,dword ptr [RAX] CMP ECX,-0x1 SETZ AL JMP 0x0019d448 LAB_0019d446: XOR EAX,EAX LAB_0019d448: POP RBP RET
int8 bitmap_is_set_all(int8 *param_1) { uint *puVar1; puVar1 = (uint *)*param_1; while( true ) { if ((uint *)param_1[1] <= puVar1) { return CONCAT71((int7)((ulong)puVar1 >> 8),(*(uint *)(param_1 + 3) | *puVar1) == 0xffffffff); } if (*puVar1 != 0xffffffff) break; puVar1 = puVar1 + 1; } return 0; }
50,481
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint()
llama.cpp/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x898c6 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x21cb6 movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0x934b3(%rip), %rdi # 0x11cd80 leaq 0x8b8d7(%rip), %rdx # 0x1151ab leaq 0x941ae(%rip), %rcx # 0x11da89 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x20ed0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_898C6 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_898C6: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( a1, &a1[1].m128i_u32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
get_codepoint: PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x001898c6 LEA RSI,[RDI + 0x14] LEA RBX,[RSP + 0xc] MOV RDX,RBX CALL 0x00121cb6 MOV EAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET LAB_001898c6: LEA RDI,[0x21cd80] LEA RDX,[0x2151ab] LEA RCX,[0x21da89] MOV ESI,0x1d79 XOR EAX,EAX CALL 0x00120ed0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_codepoint() */ int4 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int4 local_c; if (*(int *)(this + 0x14) == 0x75) { get_codepoint(); return local_c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); }
50,482
add_directory
eloqsql/mysys/my_default.c
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) { char buf[FN_REFLEN]; size_t len; char *p; my_bool err __attribute__((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) return 1; /* Failure */ /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); DBUG_ASSERT(err == FALSE); return 0; }
O0
c
add_directory: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movq %rdx, -0x230(%rbp) leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0x352b0 movq %rax, -0x238(%rbp) movq -0x220(%rbp), %rdi leaq -0x210(%rbp), %rsi movq -0x238(%rbp), %rdx callq 0x36400 movq %rax, -0x240(%rbp) cmpq $0x0, %rax jne 0x32ada movl $0x1, -0x214(%rbp) jmp 0x32b04 movq -0x240(%rbp), %rdi movq -0x230(%rbp), %rsi movl $0x8, %edx callq 0x357d0 movb %al, -0x241(%rbp) jmp 0x32afa movl $0x0, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x248(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x32b31 movl -0x248(%rbp), %eax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax)
add_directory: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_230], rdx lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call normalize_dirname mov [rbp+var_238], rax mov rdi, [rbp+var_220] lea rsi, [rbp+var_210] mov rdx, [rbp+var_238] call strmake_root mov [rbp+var_240], rax cmp rax, 0 jnz short loc_32ADA mov [rbp+var_214], 1 jmp short loc_32B04 loc_32ADA: mov rdi, [rbp+var_240] mov rsi, [rbp+var_230] mov edx, 8 call array_append_string_unique mov [rbp+var_241], al jmp short $+2 loc_32AFA: mov [rbp+var_214], 0 loc_32B04: mov eax, [rbp+var_214] mov [rbp+var_248], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_32B31 mov eax, [rbp+var_248] add rsp, 250h pop rbp retn loc_32B31: call ___stack_chk_fail
long long add_directory(long long a1, long long a2, long long a3) { long long v4; // [rsp+10h] [rbp-240h] long long v5; // [rsp+18h] [rbp-238h] _BYTE v8[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v9; // [rsp+248h] [rbp-8h] v9 = __readfsqword(0x28u); v5 = normalize_dirname(v8, a2); v4 = strmake_root(a1, v8, v5); if ( v4 ) { array_append_string_unique(v4, a3, 8LL); return 0; } else { return 1; } }
add_directory: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV qword ptr [RBP + -0x230],RDX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x001352b0 MOV qword ptr [RBP + -0x238],RAX MOV RDI,qword ptr [RBP + -0x220] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00136400 MOV qword ptr [RBP + -0x240],RAX CMP RAX,0x0 JNZ 0x00132ada MOV dword ptr [RBP + -0x214],0x1 JMP 0x00132b04 LAB_00132ada: MOV RDI,qword ptr [RBP + -0x240] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x8 CALL 0x001357d0 MOV byte ptr [RBP + -0x241],AL JMP 0x00132afa LAB_00132afa: MOV dword ptr [RBP + -0x214],0x0 LAB_00132b04: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x248],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00132b31 MOV EAX,dword ptr [RBP + -0x248] ADD RSP,0x250 POP RBP RET LAB_00132b31: CALL 0x00124300
bool add_directory(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = normalize_dirname(local_218,param_2); lVar2 = strmake_root(param_1,local_218,uVar1); if (lVar2 != 0) { array_append_string_unique(lVar2,param_3,8); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar2 == 0; }
50,483
ma_pvio_tls_check_fp
eloqsql/libmariadb/libmariadb/ma_tls.c
my_bool ma_pvio_tls_check_fp(MARIADB_TLS *ctls, const char *fp, const char *fp_list) { unsigned int cert_fp_len= 64; char *cert_fp= NULL; my_bool rc=1; MYSQL *mysql= ctls->pvio->mysql; cert_fp= (char *)malloc(cert_fp_len); if ((cert_fp_len= ma_tls_get_finger_print(ctls, cert_fp, cert_fp_len)) < 1) goto end; if (fp) rc= ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, fp, (unsigned int)strlen(fp)); else if (fp_list) { MA_FILE *fp; char buff[255]; if (!(fp = ma_open(fp_list, "r", mysql))) goto end; while (ma_gets(buff, sizeof(buff)-1, fp)) { /* remove trailing new line character */ char *pos= strchr(buff, '\r'); if (!pos) pos= strchr(buff, '\n'); if (pos) *pos= '\0'; if (!ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, buff, (unsigned int)strlen(buff))) { /* finger print is valid: close file and exit */ ma_close(fp); rc= 0; goto end; } } /* No finger print matched - close file and return error */ ma_close(fp); } end: if (cert_fp) free(cert_fp); if (rc) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Fingerprint verification of server certificate failed"); } return rc; }
O3
c
ma_pvio_tls_check_fp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rdi), %rax movq 0x40(%rax), %rax movq %rax, -0x138(%rbp) movl $0x40, %edi callq 0x13620 movq %rax, %r14 movq %r15, %rdi movq %rax, %rsi movl $0x40, %edx callq 0x2d1ab movb $0x1, %r13b testl %eax, %eax je 0x223d4 movl %eax, %r15d testq %r12, %r12 je 0x22440 movq %r12, %rdi callq 0x131c0 movq %r14, %rdi movl %r15d, %esi movq %r12, %rdx movl %eax, %ecx callq 0x224e4 movl %eax, %r13d testq %r14, %r14 je 0x223e1 movq %r14, %rdi callq 0x13580 testb %r13b, %r13b je 0x22418 leaq 0x2dc13(%rip), %rax # 0x50000 movq (%rax), %rdx leaq 0x2dc19(%rip), %rax # 0x50010 movq 0xd0(%rax), %rcx leaq 0x18fda(%rip), %r8 # 0x3b3df movq -0x138(%rbp), %rdi movl $0x7ea, %esi # imm = 0x7EA xorl %eax, %eax callq 0x1a0a1 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x224df movl %r13d, %eax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %rbx, %rbx je 0x223d4 leaq 0x18696(%rip), %rsi # 0x3aae2 movq %rbx, %rdi movq -0x138(%rbp), %rdx callq 0x2c450 testq %rax, %rax je 0x224c7 movq %rax, %r12 leaq -0x130(%rbp), %r13 movl $0xfe, %esi movq %r13, %rdi movq %r12, %rdx callq 0x2c627 testq %rax, %rax je 0x224cf movq %r13, %rdi movl $0xd, %esi callq 0x13180 testq %rax, %rax jne 0x224a3 movq %r13, %rdi movl $0xa, %esi callq 0x13180 testq %rax, %rax je 0x224a6 movb $0x0, (%rax) movq %r13, %rdi callq 0x131c0 movq %r14, %rdi movl %r15d, %esi movq %r13, %rdx movl %eax, %ecx callq 0x224e4 testb %al, %al jne 0x2246a xorl %r13d, %r13d jmp 0x224d2 movb $0x1, %r13b jmp 0x223d4 movb $0x1, %r13b movq %r12, %rdi callq 0x2c55c jmp 0x223d4 callq 0x13510
ma_pvio_tls_check_fp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, rdx mov r12, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+8] mov rax, [rax+40h] mov [rbp+var_138], rax mov edi, 40h ; '@' call _malloc mov r14, rax mov rdi, r15 mov rsi, rax mov edx, 40h ; '@' call ma_tls_get_finger_print mov r13b, 1 test eax, eax jz short loc_223D4 mov r15d, eax test r12, r12 jz loc_22440 mov rdi, r12 call _strlen mov rdi, r14 mov esi, r15d mov rdx, r12 mov ecx, eax call ma_pvio_tls_compare_fp mov r13d, eax loc_223D4: test r14, r14 jz short loc_223E1 mov rdi, r14 call _free loc_223E1: test r13b, r13b jz short loc_22418 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] lea r8, aFingerprintVer; "Fingerprint verification of server cert"... mov rdi, [rbp+var_138] mov esi, 7EAh xor eax, eax call my_set_error loc_22418: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_224DF mov eax, r13d add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_22440: test rbx, rbx jz short loc_223D4 lea rsi, aSetCharacterSe+5Bh; "r" mov rdi, rbx mov rdx, [rbp+var_138] call ma_open test rax, rax jz short loc_224C7 mov r12, rax lea r13, [rbp+var_130] loc_2246A: mov esi, 0FEh mov rdi, r13 mov rdx, r12 call ma_gets test rax, rax jz short loc_224CF mov rdi, r13 mov esi, 0Dh call _strchr test rax, rax jnz short loc_224A3 mov rdi, r13 mov esi, 0Ah call _strchr test rax, rax jz short loc_224A6 loc_224A3: mov byte ptr [rax], 0 loc_224A6: mov rdi, r13 call _strlen mov rdi, r14 mov esi, r15d mov rdx, r13 mov ecx, eax call ma_pvio_tls_compare_fp test al, al jnz short loc_2246A xor r13d, r13d jmp short loc_224D2 loc_224C7: mov r13b, 1 jmp loc_223D4 loc_224CF: mov r13b, 1 loc_224D2: mov rdi, r12 call ma_close jmp loc_223D4 loc_224DF: call ___stack_chk_fail
long long ma_pvio_tls_check_fp(long long a1, long long a2, long long a3) { _BYTE *v3; // r13 long long v5; // r14 unsigned int finger_print; // eax unsigned int v7; // r15d unsigned int v8; // eax long long v10; // rax long long v11; // r12 _BYTE *v12; // rax unsigned int v13; // eax long long v14; // [rsp+8h] [rbp-138h] _BYTE v15[256]; // [rsp+10h] [rbp-130h] BYREF unsigned long long v16; // [rsp+110h] [rbp-30h] v16 = __readfsqword(0x28u); v14 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 64LL); v5 = malloc(64LL); finger_print = ma_tls_get_finger_print(a1, v5, 64LL); LOBYTE(v3) = 1; if ( finger_print ) { v7 = finger_print; if ( a2 ) { v8 = strlen(a2); LODWORD(v3) = ma_pvio_tls_compare_fp(v5, v7, a2, v8); } else if ( a3 ) { v10 = ma_open(a3, "r", v14); if ( v10 ) { v11 = v10; v3 = v15; while ( ma_gets(v15, 254LL, v11) ) { v12 = (_BYTE *)strchr(v15, 13LL); if ( v12 || (v12 = (_BYTE *)strchr(v15, 10LL)) != 0LL ) *v12 = 0; v13 = strlen(v15); if ( !(unsigned __int8)ma_pvio_tls_compare_fp(v5, v7, v15, v13) ) { LODWORD(v3) = 0; goto LABEL_20; } } LOBYTE(v3) = 1; LABEL_20: ma_close(v11); } else { LOBYTE(v3) = 1; } } } if ( v5 ) free(v5); if ( (_BYTE)v3 ) my_set_error( v14, 2026, (long long)SQLSTATE_UNKNOWN, client_errors[26], "Fingerprint verification of server certificate failed"); return (unsigned int)v3; }
ma_pvio_tls_check_fp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x138],RAX MOV EDI,0x40 CALL 0x00113620 MOV R14,RAX MOV RDI,R15 MOV RSI,RAX MOV EDX,0x40 CALL 0x0012d1ab MOV R13B,0x1 TEST EAX,EAX JZ 0x001223d4 MOV R15D,EAX TEST R12,R12 JZ 0x00122440 MOV RDI,R12 CALL 0x001131c0 MOV RDI,R14 MOV ESI,R15D MOV RDX,R12 MOV ECX,EAX CALL 0x001224e4 MOV R13D,EAX LAB_001223d4: TEST R14,R14 JZ 0x001223e1 MOV RDI,R14 CALL 0x00113580 LAB_001223e1: TEST R13B,R13B JZ 0x00122418 LEA RAX,[0x150000] MOV RDX,qword ptr [RAX] LEA RAX,[0x150010] MOV RCX,qword ptr [RAX + 0xd0] LEA R8,[0x13b3df] MOV RDI,qword ptr [RBP + -0x138] MOV ESI,0x7ea XOR EAX,EAX CALL 0x0011a0a1 LAB_00122418: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001224df MOV EAX,R13D ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00122440: TEST RBX,RBX JZ 0x001223d4 LEA RSI,[0x13aae2] MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x138] CALL 0x0012c450 TEST RAX,RAX JZ 0x001224c7 MOV R12,RAX LEA R13,[RBP + -0x130] LAB_0012246a: MOV ESI,0xfe MOV RDI,R13 MOV RDX,R12 CALL 0x0012c627 TEST RAX,RAX JZ 0x001224cf MOV RDI,R13 MOV ESI,0xd CALL 0x00113180 TEST RAX,RAX JNZ 0x001224a3 MOV RDI,R13 MOV ESI,0xa CALL 0x00113180 TEST RAX,RAX JZ 0x001224a6 LAB_001224a3: MOV byte ptr [RAX],0x0 LAB_001224a6: MOV RDI,R13 CALL 0x001131c0 MOV RDI,R14 MOV ESI,R15D MOV RDX,R13 MOV ECX,EAX CALL 0x001224e4 TEST AL,AL JNZ 0x0012246a XOR R13D,R13D JMP 0x001224d2 LAB_001224c7: MOV R13B,0x1 JMP 0x001223d4 LAB_001224cf: MOV R13B,0x1 LAB_001224d2: MOV RDI,R12 CALL 0x0012c55c JMP 0x001223d4 LAB_001224df: CALL 0x00113510
int4 ma_pvio_tls_check_fp(long param_1,char *param_2,long param_3) { int8 uVar1; char cVar2; int iVar3; int4 uVar4; void *__ptr; size_t sVar5; long lVar6; long lVar7; char *pcVar8; int8 unaff_R13; int7 uVar9; long in_FS_OFFSET; char local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = *(int8 *)(*(long *)(param_1 + 8) + 0x40); __ptr = malloc(0x40); iVar3 = ma_tls_get_finger_print(param_1,__ptr,0x40); uVar9 = (int7)((ulong)unaff_R13 >> 8); uVar4 = (int4)CONCAT71(uVar9,1); if (iVar3 != 0) { if (param_2 == (char *)0x0) { if (param_3 != 0) { lVar6 = ma_open(param_3,"r",uVar1); if (lVar6 == 0) { uVar4 = (int4)CONCAT71(uVar9,1); } else { do { lVar7 = ma_gets(local_138,0xfe,lVar6); if (lVar7 == 0) { uVar4 = (int4)CONCAT71((int7)((ulong)local_138 >> 8),1); goto LAB_001224d2; } pcVar8 = strchr(local_138,0xd); if (pcVar8 == (char *)0x0) { pcVar8 = strchr(local_138,10); if (pcVar8 != (char *)0x0) goto LAB_001224a3; } else { LAB_001224a3: *pcVar8 = '\0'; } sVar5 = strlen(local_138); cVar2 = ma_pvio_tls_compare_fp(__ptr,iVar3,local_138,sVar5 & 0xffffffff); } while (cVar2 != '\0'); uVar4 = 0; LAB_001224d2: ma_close(lVar6); } } } else { sVar5 = strlen(param_2); uVar4 = ma_pvio_tls_compare_fp(__ptr,iVar3,param_2,sVar5 & 0xffffffff); } } if (__ptr != (void *)0x0) { free(__ptr); } if ((char)uVar4 != '\0') { my_set_error(uVar1,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_001500e0, "Fingerprint verification of server certificate failed"); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,484
ma_read_cache
eloqsql/storage/maria/ma_cache.c
my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, uint flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_ma_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (unlikely(pos >= info->end_of_file) && (flag & READING_HEADER)) DBUG_RETURN(-1); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(uint) (info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file,buff,read_length,pos,MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+(uint) offset; in_buff_length= MY_MIN(length,(size_t) (info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length=mysql_file_pread(info->file,buff,length,pos,MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { if ((flag & READING_HEADER) && read_length + in_buff_length == 0) DBUG_RETURN(-1); /* End of file */ DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d of %d bytes)", my_errno, (int) read_length, (int) length)); if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT) { if (!handler->in_check_table) _ma_set_fatal_error(handler, HA_ERR_FILE_TOO_SHORT); if (!my_errno) my_errno= HA_ERR_WRONG_IN_RECORD; } DBUG_RETURN(1); } bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O0
c
ma_read_cache: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) jmp 0x72c82 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx cmpq 0x8(%rcx), %rax setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x72cbf movl -0x34(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x72cbf jmp 0x72cb6 movb $-0x1, -0x1(%rbp) jmp 0x7302b movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jae 0x72d83 movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx subq -0x28(%rbp), %rcx cmpq %rcx, %rax jbe 0x72cfd movq -0x18(%rbp), %rax movq (%rax), %rax subq -0x28(%rbp), %rax movl %eax, %eax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movl $0x1, 0xe0(%rax) movq -0x18(%rbp), %rax movl 0xd4(%rax), %edx movq -0x20(%rbp), %rcx movq -0x40(%rbp), %r8 movq -0x28(%rbp), %r9 leaq 0xdfce2(%rip), %rdi # 0x152a0a movl $0x38, %esi movq $0x4, (%rsp) callq 0x73040 cmpq $0x0, %rax je 0x72d4b jmp 0x72d42 movb $0x1, -0x1(%rbp) jmp 0x7302b movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x72d6b jmp 0x72d62 movb $0x0, -0x1(%rbp) jmp 0x7302b movq -0x40(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x40(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jb 0x72e69 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx subq (%rcx), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x18(%rbp), %rdx movq 0x28(%rdx), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0x72e69 movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq -0x50(%rbp), %rcx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x58(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0x72df6 movq -0x30(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x72e09 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq -0x58(%rbp), %rcx subq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi movq -0x50(%rbp), %rax movl %eax, %eax addq %rax, %rsi movq -0x48(%rbp), %rdx callq 0x2a090 movq -0x48(%rbp), %rcx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x72e4f jmp 0x72e46 movb $0x0, -0x1(%rbp) jmp 0x7302b movq -0x48(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x48(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x72e71 movq $0x0, -0x48(%rbp) movl -0x34(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x72f1d movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq -0x18(%rbp), %rdx movq 0x18(%rdx), %rdx movq -0x18(%rbp), %rsi movq 0x28(%rsi), %rsi subq %rsi, %rdx movl %edx, %edx addq %rdx, %rcx cmpq %rcx, %rax je 0x72edb movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax movq 0x28(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rax movl $0x1, 0xe0(%rax) jmp 0x72eeb movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0xe0e40 cmpl $0x0, %eax jne 0x72f0c jmp 0x72f03 movb $0x0, -0x1(%rbp) jmp 0x7302b movq -0x18(%rbp), %rax movslq 0xe4(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x72f73 movq -0x18(%rbp), %rax movl $0x1, 0xe0(%rax) movq -0x18(%rbp), %rax movl 0xd4(%rax), %edx movq -0x20(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x28(%rbp), %r9 leaq 0xdfac2(%rip), %rdi # 0x152a0a movl $0x5f, %esi xorl %eax, %eax movq $0x0, (%rsp) callq 0x73040 movq %rax, -0x40(%rbp) cmpq -0x30(%rbp), %rax jne 0x72f71 jmp 0x72f68 movb $0x0, -0x1(%rbp) jmp 0x7302b jmp 0x72f73 movl -0x34(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x72f95 movq -0x40(%rbp), %rax cmpl $-0x1, %eax je 0x72f95 movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax cmpq $0x3, %rax jae 0x7300b movl -0x34(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x72fb6 movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax cmpq $0x0, %rax jne 0x72fb6 jmp 0x72fb0 movb $-0x1, -0x1(%rbp) jmp 0x7302b jmp 0x72fb8 jmp 0x72fba callq 0xf60c0 cmpl $0x0, (%rax) je 0x72fd1 callq 0xf60c0 cmpl $0xaf, (%rax) jne 0x73003 movq -0x10(%rbp), %rax cmpb $0x0, 0x683(%rax) jne 0x72fec movq -0x10(%rbp), %rdi movl $0xaf, %esi callq 0x338b0 callq 0xf60c0 cmpl $0x0, (%rax) jne 0x73001 callq 0xf60c0 movl $0x7f, (%rax) jmp 0x73003 jmp 0x73005 movb $0x1, -0x1(%rbp) jmp 0x7302b movq -0x20(%rbp), %rdi addq -0x40(%rbp), %rdi movl $0x14, %edx subq -0x48(%rbp), %rdx subq -0x40(%rbp), %rdx xorl %esi, %esi callq 0x2a2c0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_read_cache: push rbp mov rbp, rsp sub rsp, 70h 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 [rbp+var_34], r9d jmp short $+2 loc_72C82: mov rax, [rbp+var_28] mov rcx, [rbp+var_18] cmp rax, [rcx+8] setnb al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_72CBF mov eax, [rbp+var_34] and eax, 2 cmp eax, 0 jz short loc_72CBF jmp short $+2 loc_72CB6: mov [rbp+var_1], 0FFh jmp loc_7302B loc_72CBF: mov rax, [rbp+var_28] mov rcx, [rbp+var_18] cmp rax, [rcx] jnb loc_72D83 mov rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_18] mov rcx, [rcx] sub rcx, [rbp+var_28] cmp rax, rcx jbe short loc_72CFD mov rax, [rbp+var_18] mov rax, [rax] sub rax, [rbp+var_28] mov eax, eax mov [rbp+var_40], rax loc_72CFD: mov rax, [rbp+var_18] mov dword ptr [rax+0E0h], 1 mov rax, [rbp+var_18] mov edx, [rax+0D4h] mov rcx, [rbp+var_20] mov r8, [rbp+var_40] mov r9, [rbp+var_28] lea rdi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 38h ; '8' mov [rsp+70h+var_70], 4 call inline_mysql_file_pread_5 cmp rax, 0 jz short loc_72D4B jmp short $+2 loc_72D42: mov [rbp+var_1], 1 jmp loc_7302B loc_72D4B: mov rcx, [rbp+var_40] mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax cmp rax, 0 jnz short loc_72D6B jmp short $+2 loc_72D62: mov [rbp+var_1], 0 jmp loc_7302B loc_72D6B: mov rax, [rbp+var_40] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rax, [rbp+var_40] add rax, [rbp+var_20] mov [rbp+var_20], rax loc_72D83: mov rax, [rbp+var_28] mov rcx, [rbp+var_18] cmp rax, [rcx] jb loc_72E69 mov rax, [rbp+var_28] mov rcx, [rbp+var_18] sub rax, [rcx] mov [rbp+var_50], rax mov rcx, [rbp+var_18] mov rcx, [rcx+18h] mov rdx, [rbp+var_18] mov rdx, [rdx+28h] sub rcx, rdx cmp rax, rcx jnb loc_72E69 mov rax, [rbp+var_18] mov rax, [rax+28h] mov rcx, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_18] mov rcx, [rcx+18h] mov rdx, [rbp+var_58] sub rcx, rdx cmp rax, rcx jnb short loc_72DF6 mov rax, [rbp+var_30] mov [rbp+var_60], rax jmp short loc_72E09 loc_72DF6: mov rax, [rbp+var_18] mov rax, [rax+18h] mov rcx, [rbp+var_58] sub rax, rcx mov [rbp+var_60], rax loc_72E09: mov rax, [rbp+var_60] mov [rbp+var_48], rax mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rsi, [rax+28h] mov rax, [rbp+var_50] mov eax, eax add rsi, rax mov rdx, [rbp+var_48] call _memcpy mov rcx, [rbp+var_48] mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax cmp rax, 0 jnz short loc_72E4F jmp short $+2 loc_72E46: mov [rbp+var_1], 0 jmp loc_7302B loc_72E4F: mov rax, [rbp+var_48] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rax, [rbp+var_48] add rax, [rbp+var_20] mov [rbp+var_20], rax jmp short loc_72E71 loc_72E69: mov [rbp+var_48], 0 loc_72E71: mov eax, [rbp+var_34] and eax, 1 cmp eax, 0 jz loc_72F1D mov rax, [rbp+var_28] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rdx, [rbp+var_18] mov rdx, [rdx+18h] mov rsi, [rbp+var_18] mov rsi, [rsi+28h] sub rdx, rsi mov edx, edx add rcx, rdx cmp rax, rcx jz short loc_72EDB mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_18] mov rcx, [rax+28h] mov rax, [rbp+var_18] mov [rax+18h], rcx mov rax, [rbp+var_18] mov [rax+10h], rcx mov rax, [rbp+var_18] mov dword ptr [rax+0E0h], 1 jmp short loc_72EEB loc_72EDB: mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_18] mov [rax+10h], rcx loc_72EEB: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_30] call _my_b_read cmp eax, 0 jnz short loc_72F0C jmp short $+2 loc_72F03: mov [rbp+var_1], 0 jmp loc_7302B loc_72F0C: mov rax, [rbp+var_18] movsxd rax, dword ptr [rax+0E4h] mov [rbp+var_40], rax jmp short loc_72F73 loc_72F1D: mov rax, [rbp+var_18] mov dword ptr [rax+0E0h], 1 mov rax, [rbp+var_18] mov edx, [rax+0D4h] mov rcx, [rbp+var_20] mov r8, [rbp+var_30] mov r9, [rbp+var_28] lea rdi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 5Fh ; '_' xor eax, eax mov [rsp+70h+var_70], 0 call inline_mysql_file_pread_5 mov [rbp+var_40], rax cmp rax, [rbp+var_30] jnz short loc_72F71 jmp short $+2 loc_72F68: mov [rbp+var_1], 0 jmp loc_7302B loc_72F71: jmp short $+2 loc_72F73: mov eax, [rbp+var_34] and eax, 2 cmp eax, 0 jz short loc_72F95 mov rax, [rbp+var_40] cmp eax, 0FFFFFFFFh jz short loc_72F95 mov rax, [rbp+var_40] add rax, [rbp+var_48] cmp rax, 3 jnb short loc_7300B loc_72F95: mov eax, [rbp+var_34] and eax, 2 cmp eax, 0 jz short loc_72FB6 mov rax, [rbp+var_40] add rax, [rbp+var_48] cmp rax, 0 jnz short loc_72FB6 jmp short $+2 loc_72FB0: mov [rbp+var_1], 0FFh jmp short loc_7302B loc_72FB6: jmp short $+2 loc_72FB8: jmp short $+2 loc_72FBA: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_72FD1 call _my_thread_var cmp dword ptr [rax], 0AFh jnz short loc_73003 loc_72FD1: mov rax, [rbp+var_10] cmp byte ptr [rax+683h], 0 jnz short loc_72FEC mov rdi, [rbp+var_10] mov esi, 0AFh call _ma_set_fatal_error loc_72FEC: call _my_thread_var cmp dword ptr [rax], 0 jnz short loc_73001 call _my_thread_var mov dword ptr [rax], 7Fh loc_73001: jmp short $+2 loc_73003: jmp short $+2 loc_73005: mov [rbp+var_1], 1 jmp short loc_7302B loc_7300B: mov rdi, [rbp+var_20] add rdi, [rbp+var_40] mov edx, 14h sub rdx, [rbp+var_48] sub rdx, [rbp+var_40] xor esi, esi call _memset mov [rbp+var_1], 0 loc_7302B: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
char ma_read_cache( long long a1, long long a2, const char *a3, unsigned long long a4, unsigned long long a5, char a6) { long long v6; // rcx const char *v7; // rdi const char *v8; // rsi long long v9; // rdx long long v10; // rcx long long v11; // r8 int v12; // r9d unsigned long long v14; // [rsp+10h] [rbp-60h] long long v15; // [rsp+18h] [rbp-58h] unsigned long long v16; // [rsp+20h] [rbp-50h] unsigned long long v17; // [rsp+28h] [rbp-48h] unsigned long long v18; // [rsp+30h] [rbp-40h] long long v19; // [rsp+30h] [rbp-40h] unsigned long long v21; // [rsp+40h] [rbp-30h] unsigned long long v22; // [rsp+48h] [rbp-28h] const char *v23; // [rsp+50h] [rbp-20h] v23 = a3; v22 = a4; v21 = a5; if ( a4 >= *(_QWORD *)(a2 + 8) && (a6 & 2) != 0 ) return -1; if ( a4 < *(_QWORD *)a2 ) { v18 = a5; if ( a5 > *(_QWORD *)a2 - a4 ) v18 = (unsigned int)(*(_DWORD *)a2 - a4); *(_DWORD *)(a2 + 224) = 1; if ( inline_mysql_file_pread_5( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 56, *(_DWORD *)(a2 + 212), (_DWORD)a3, v18, a4, 4LL) ) { return 1; } v21 -= v18; if ( !v21 ) return 0; v22 += v18; v23 += v18; } if ( v22 < *(_QWORD *)a2 || (v16 = v22 - *(_QWORD *)a2, v16 >= *(_QWORD *)(a2 + 24) - *(_QWORD *)(a2 + 40)) ) { v17 = 0LL; } else { v15 = (unsigned int)v16 + *(_QWORD *)(a2 + 40); if ( v21 >= *(_QWORD *)(a2 + 24) - v15 ) v14 = *(_QWORD *)(a2 + 24) - v15; else v14 = v21; v17 = v14; memcpy(v23, (unsigned int)v16 + *(_QWORD *)(a2 + 40), v14); v21 -= v14; if ( !v21 ) return 0; v22 += v14; v23 += v14; } if ( (a6 & 1) != 0 ) { if ( v22 == (unsigned int)*(_QWORD *)(a2 + 24) - (unsigned int)*(_QWORD *)(a2 + 40) + *(_QWORD *)a2 ) { *(_QWORD *)(a2 + 16) = *(_QWORD *)(a2 + 24); } else { *(_QWORD *)a2 = v22; v6 = *(_QWORD *)(a2 + 40); *(_QWORD *)(a2 + 24) = v6; *(_QWORD *)(a2 + 16) = v6; *(_DWORD *)(a2 + 224) = 1; } v7 = (const char *)a2; v8 = v23; if ( !(unsigned int)my_b_read(a2, v23, v21) ) return 0; v19 = *(int *)(a2 + 228); } else { *(_DWORD *)(a2 + 224) = 1; v7 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c"; v8 = (_BYTE *)(&qword_58 + 7); v19 = inline_mysql_file_pread_5( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 95, *(_DWORD *)(a2 + 212), (_DWORD)v23, v21, v22, 0LL); if ( v19 == v21 ) return 0; } if ( (a6 & 2) != 0 && (_DWORD)v19 != -1 && v17 + v19 >= 3 ) { memset(&v23[v19], 0LL, 20 - v17 - v19); return 0; } else if ( (a6 & 2) == 0 || v17 + v19 ) { if ( !*(_DWORD *)my_thread_var(v7, v8) || *(_DWORD *)my_thread_var(v7, v8) == 175 ) { if ( !*(_BYTE *)(a1 + 1667) ) { v7 = (const char *)a1; v8 = (_BYTE *)(&qword_A8 + 7); ma_set_fatal_error((_DWORD *)a1, 175, v9, v10, v11, v12); } if ( !*(_DWORD *)my_thread_var(v7, v8) ) *(_DWORD *)my_thread_var(v7, v8) = 127; } return 1; } else { return -1; } }
_ma_read_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 dword ptr [RBP + -0x34],R9D JMP 0x00172c82 LAB_00172c82: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x8] SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00172cbf MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x2 CMP EAX,0x0 JZ 0x00172cbf JMP 0x00172cb6 LAB_00172cb6: MOV byte ptr [RBP + -0x1],0xff JMP 0x0017302b LAB_00172cbf: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JNC 0x00172d83 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] SUB RCX,qword ptr [RBP + -0x28] CMP RAX,RCX JBE 0x00172cfd MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x28] MOV EAX,EAX MOV qword ptr [RBP + -0x40],RAX LAB_00172cfd: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x40] MOV R9,qword ptr [RBP + -0x28] LEA RDI,[0x252a0a] MOV ESI,0x38 MOV qword ptr [RSP],0x4 CALL 0x00173040 CMP RAX,0x0 JZ 0x00172d4b JMP 0x00172d42 LAB_00172d42: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017302b LAB_00172d4b: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x00172d6b JMP 0x00172d62 LAB_00172d62: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017302b LAB_00172d6b: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX LAB_00172d83: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JC 0x00172e69 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX + 0x28] SUB RCX,RDX CMP RAX,RCX JNC 0x00172e69 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x58] SUB RCX,RDX CMP RAX,RCX JNC 0x00172df6 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x60],RAX JMP 0x00172e09 LAB_00172df6: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x58] SUB RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_00172e09: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x50] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x48] CALL 0x0012a090 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x00172e4f JMP 0x00172e46 LAB_00172e46: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017302b LAB_00172e4f: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX JMP 0x00172e71 LAB_00172e69: MOV qword ptr [RBP + -0x48],0x0 LAB_00172e71: MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x1 CMP EAX,0x0 JZ 0x00172f1d MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX + 0x18] MOV RSI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RSI + 0x28] SUB RDX,RSI MOV EDX,EDX ADD RCX,RDX CMP RAX,RCX JZ 0x00172edb MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xe0],0x1 JMP 0x00172eeb LAB_00172edb: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX LAB_00172eeb: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001e0e40 CMP EAX,0x0 JNZ 0x00172f0c JMP 0x00172f03 LAB_00172f03: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017302b LAB_00172f0c: MOV RAX,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RAX + 0xe4] MOV qword ptr [RBP + -0x40],RAX JMP 0x00172f73 LAB_00172f1d: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x28] LEA RDI,[0x252a0a] MOV ESI,0x5f XOR EAX,EAX MOV qword ptr [RSP],0x0 CALL 0x00173040 MOV qword ptr [RBP + -0x40],RAX CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00172f71 JMP 0x00172f68 LAB_00172f68: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017302b LAB_00172f71: JMP 0x00172f73 LAB_00172f73: MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x2 CMP EAX,0x0 JZ 0x00172f95 MOV RAX,qword ptr [RBP + -0x40] CMP EAX,-0x1 JZ 0x00172f95 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] CMP RAX,0x3 JNC 0x0017300b LAB_00172f95: MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x2 CMP EAX,0x0 JZ 0x00172fb6 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] CMP RAX,0x0 JNZ 0x00172fb6 JMP 0x00172fb0 LAB_00172fb0: MOV byte ptr [RBP + -0x1],0xff JMP 0x0017302b LAB_00172fb6: JMP 0x00172fb8 LAB_00172fb8: JMP 0x00172fba LAB_00172fba: CALL 0x001f60c0 CMP dword ptr [RAX],0x0 JZ 0x00172fd1 CALL 0x001f60c0 CMP dword ptr [RAX],0xaf JNZ 0x00173003 LAB_00172fd1: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x683],0x0 JNZ 0x00172fec MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xaf CALL 0x001338b0 LAB_00172fec: CALL 0x001f60c0 CMP dword ptr [RAX],0x0 JNZ 0x00173001 CALL 0x001f60c0 MOV dword ptr [RAX],0x7f LAB_00173001: JMP 0x00173003 LAB_00173003: JMP 0x00173005 LAB_00173005: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017302b LAB_0017300b: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,qword ptr [RBP + -0x40] MOV EDX,0x14 SUB RDX,qword ptr [RBP + -0x48] SUB RDX,qword ptr [RBP + -0x40] XOR ESI,ESI CALL 0x0012a2c0 MOV byte ptr [RBP + -0x1],0x0 LAB_0017302b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int1 _ma_read_cache(long param_1,ulong *param_2,void *param_3,ulong param_4,ulong param_5,uint param_6) { int iVar1; long lVar2; ulong uVar3; int *piVar4; int4 *puVar5; size_t local_68; size_t local_50; ulong local_48; ulong local_38; ulong local_30; void *local_28; int1 local_9; if ((param_2[1] <= param_4) && ((param_6 & 2) != 0)) { return 0xff; } local_38 = param_5; local_30 = param_4; local_28 = param_3; if (param_4 < *param_2) { local_48 = param_5; if (*param_2 - param_4 < param_5) { local_48 = (ulong)(uint)((int)*param_2 - (int)param_4); } *(int4 *)(param_2 + 0x1c) = 1; lVar2 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",0x38, *(int4 *)((long)param_2 + 0xd4),param_3,local_48,param_4,4); if (lVar2 != 0) { return 1; } local_38 = param_5 - local_48; if (local_38 == 0) { return 0; } local_30 = local_48 + param_4; local_28 = (void *)(local_48 + (long)param_3); } if ((local_30 < *param_2) || (uVar3 = local_30 - *param_2, param_2[3] - param_2[5] <= uVar3)) { local_50 = 0; } else { lVar2 = param_2[5] + (uVar3 & 0xffffffff); if (local_38 < param_2[3] - lVar2) { local_68 = local_38; } else { local_68 = param_2[3] - lVar2; } local_50 = local_68; memcpy(local_28,(void *)(param_2[5] + (uVar3 & 0xffffffff)),local_68); local_38 = local_38 - local_68; if (local_38 == 0) { return 0; } local_30 = local_68 + local_30; local_28 = (void *)(local_68 + (long)local_28); } if ((param_6 & 1) == 0) { *(int4 *)(param_2 + 0x1c) = 1; local_48 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c",0x5f, *(int4 *)((long)param_2 + 0xd4),local_28,local_38,local_30,0); if (local_48 == local_38) { return 0; } } else { if (local_30 == *param_2 + (ulong)(uint)((int)param_2[3] - (int)param_2[5])) { param_2[2] = param_2[3]; } else { *param_2 = local_30; param_2[3] = param_2[5]; param_2[2] = param_2[5]; *(int4 *)(param_2 + 0x1c) = 1; } iVar1 = _my_b_read(param_2,local_28,local_38); if (iVar1 == 0) { return 0; } local_48 = (ulong)*(int *)((long)param_2 + 0xe4); } if ((((param_6 & 2) == 0) || ((int)local_48 == -1)) || (local_48 + local_50 < 3)) { if (((param_6 & 2) == 0) || (local_48 + local_50 != 0)) { piVar4 = (int *)_my_thread_var(); if ((*piVar4 == 0) || (piVar4 = (int *)_my_thread_var(), *piVar4 == 0xaf)) { if (*(char *)(param_1 + 0x683) == '\0') { _ma_set_fatal_error(param_1,0xaf); } piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7f; } } local_9 = 1; } else { local_9 = 0xff; } } else { memset((void *)((long)local_28 + local_48),0,(0x14 - local_50) - local_48); local_9 = 0; } return local_9; }
50,485
translog_read_next_record_header
eloqsql/storage/maria/ma_loghandler.c
int translog_read_next_record_header(TRANSLOG_SCANNER_DATA *scanner, TRANSLOG_HEADER_BUFFER *buff) { translog_size_t res; DBUG_ENTER("translog_read_next_record_header"); buff->groups_no= 0; /* to be sure that we will free it right */ DBUG_PRINT("enter", ("scanner: %p", scanner)); DBUG_PRINT("info", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " " "Lst: " LSN_FMT " Offset: %u(%x) fixed: %d", LSN_IN_PARTS(scanner->page_addr), LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->last_file_page), (uint) scanner->page_offset, (uint) scanner->page_offset, scanner->fixed_horizon)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); do { if (translog_get_next_chunk(scanner)) DBUG_RETURN(RECHEADER_READ_ERROR); if (scanner->page == END_OF_LOG) { DBUG_PRINT("info", ("End of file from the scanner")); /* Last record was read */ buff->lsn= LSN_IMPOSSIBLE; DBUG_RETURN(RECHEADER_READ_EOF); } DBUG_PRINT("info", ("Page: " LSN_FMT " offset: %lu byte: %x", LSN_IN_PARTS(scanner->page_addr), (ulong) scanner->page_offset, (uint) scanner->page[scanner->page_offset])); } while (!translog_is_LSN_chunk(scanner->page[scanner->page_offset]) && scanner->page[scanner->page_offset] != TRANSLOG_FILLER); if (scanner->page[scanner->page_offset] == TRANSLOG_FILLER) { DBUG_PRINT("info", ("End of file")); /* Last record was read */ buff->lsn= LSN_IMPOSSIBLE; /* Return 'end of log' marker */ res= RECHEADER_READ_EOF; } else res= translog_read_record_header_scan(scanner, buff, 0); DBUG_RETURN(res); }
O0
c
translog_read_next_record_header: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x0, 0x418(%rax) jmp 0x56d10 jmp 0x56d12 jmp 0x56d14 jmp 0x56d16 jmp 0x56d18 jmp 0x56d1a movq -0x10(%rbp), %rdi callq 0x541e0 cmpb $0x0, %al je 0x56d35 jmp 0x56d29 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x56e15 movq -0x10(%rbp), %rax leaq 0xc24840(%rip), %rcx # 0xc7b580 cmpq %rcx, 0x2018(%rax) jne 0x56d64 jmp 0x56d4b jmp 0x56d4d movq -0x18(%rbp), %rax movq $0x0, (%rax) movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x56e15 jmp 0x56d66 jmp 0x56d68 jmp 0x56d6a movq -0x10(%rbp), %rax movq 0x2018(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2028(%rcx), %ecx movzbl (%rax,%rcx), %edi callq 0x54180 movb %al, %cl xorl %eax, %eax cmpb $0x0, %cl movb %al, -0x1d(%rbp) jne 0x56db8 movq -0x10(%rbp), %rax movq 0x2018(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2028(%rcx), %ecx movzbl (%rax,%rcx), %eax cmpl $0xff, %eax setne %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al testb $0x1, %al jne 0x56d1a movq -0x10(%rbp), %rax movq 0x2018(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2028(%rcx), %ecx movzbl (%rax,%rcx), %eax cmpl $0xff, %eax jne 0x56dfb jmp 0x56de5 jmp 0x56de7 movq -0x18(%rbp), %rax movq $0x0, (%rax) movl $0xfffffffe, -0x1c(%rbp) # imm = 0xFFFFFFFE jmp 0x56e0d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x56c30 movl %eax, -0x1c(%rbp) jmp 0x56e0f movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
translog_read_next_record_header: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov dword ptr [rax+418h], 0 jmp short $+2 loc_56D10: jmp short $+2 loc_56D12: jmp short $+2 loc_56D14: jmp short $+2 loc_56D16: jmp short $+2 loc_56D18: jmp short $+2 loc_56D1A: mov rdi, [rbp+var_10] call translog_get_next_chunk cmp al, 0 jz short loc_56D35 jmp short $+2 loc_56D29: mov [rbp+var_4], 0FFFFFFFFh jmp loc_56E15 loc_56D35: mov rax, [rbp+var_10] lea rcx, end_of_log cmp [rax+2018h], rcx jnz short loc_56D64 jmp short $+2 loc_56D4B: jmp short $+2 loc_56D4D: mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov [rbp+var_4], 0FFFFFFFEh jmp loc_56E15 loc_56D64: jmp short $+2 loc_56D66: jmp short $+2 loc_56D68: jmp short $+2 loc_56D6A: mov rax, [rbp+var_10] mov rax, [rax+2018h] mov rcx, [rbp+var_10] mov ecx, [rcx+2028h] movzx edi, byte ptr [rax+rcx] call translog_is_LSN_chunk mov cl, al xor eax, eax cmp cl, 0 mov [rbp+var_1D], al jnz short loc_56DB8 mov rax, [rbp+var_10] mov rax, [rax+2018h] mov rcx, [rbp+var_10] mov ecx, [rcx+2028h] movzx eax, byte ptr [rax+rcx] cmp eax, 0FFh setnz al mov [rbp+var_1D], al loc_56DB8: mov al, [rbp+var_1D] test al, 1 jnz loc_56D1A mov rax, [rbp+var_10] mov rax, [rax+2018h] mov rcx, [rbp+var_10] mov ecx, [rcx+2028h] movzx eax, byte ptr [rax+rcx] cmp eax, 0FFh jnz short loc_56DFB jmp short $+2 loc_56DE5: jmp short $+2 loc_56DE7: mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov [rbp+var_1C], 0FFFFFFFEh jmp short loc_56E0D loc_56DFB: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor edx, edx call translog_read_record_header_scan mov [rbp+var_1C], eax loc_56E0D: jmp short $+2 loc_56E0F: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_56E15: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long translog_read_next_record_header(long long a1, long long a2) { bool v3; // [rsp+3h] [rbp-1Dh] *(_DWORD *)(a2 + 1048) = 0; do { if ( translog_get_next_chunk(a1) ) return (unsigned int)-1; if ( *(_UNKNOWN **)(a1 + 8216) == &end_of_log ) { *(_QWORD *)a2 = 0LL; return (unsigned int)-2; } v3 = 0; if ( !(unsigned __int8)translog_is_LSN_chunk(*(_BYTE *)(*(_QWORD *)(a1 + 8216) + *(unsigned int *)(a1 + 8232))) ) v3 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8216) + *(unsigned int *)(a1 + 8232)) != 255; } while ( v3 ); if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 8216) + *(unsigned int *)(a1 + 8232)) == 255 ) { *(_QWORD *)a2 = 0LL; return (unsigned int)-2; } else { return (unsigned int)translog_read_record_header_scan(a1, a2, 0); } }
translog_read_next_record_header: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x418],0x0 JMP 0x00156d10 LAB_00156d10: JMP 0x00156d12 LAB_00156d12: JMP 0x00156d14 LAB_00156d14: JMP 0x00156d16 LAB_00156d16: JMP 0x00156d18 LAB_00156d18: JMP 0x00156d1a LAB_00156d1a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001541e0 CMP AL,0x0 JZ 0x00156d35 JMP 0x00156d29 LAB_00156d29: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00156e15 LAB_00156d35: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0xd7b580] CMP qword ptr [RAX + 0x2018],RCX JNZ 0x00156d64 JMP 0x00156d4b LAB_00156d4b: JMP 0x00156d4d LAB_00156d4d: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00156e15 LAB_00156d64: JMP 0x00156d66 LAB_00156d66: JMP 0x00156d68 LAB_00156d68: JMP 0x00156d6a LAB_00156d6a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2018] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2028] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x00154180 MOV CL,AL XOR EAX,EAX CMP CL,0x0 MOV byte ptr [RBP + -0x1d],AL JNZ 0x00156db8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2018] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2028] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xff SETNZ AL MOV byte ptr [RBP + -0x1d],AL LAB_00156db8: MOV AL,byte ptr [RBP + -0x1d] TEST AL,0x1 JNZ 0x00156d1a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2018] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2028] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xff JNZ 0x00156dfb JMP 0x00156de5 LAB_00156de5: JMP 0x00156de7 LAB_00156de7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x1c],0xfffffffe JMP 0x00156e0d LAB_00156dfb: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x00156c30 MOV dword ptr [RBP + -0x1c],EAX LAB_00156e0d: JMP 0x00156e0f LAB_00156e0f: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_00156e15: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 translog_read_next_record_header(long param_1,int8 *param_2) { char cVar1; bool bVar2; int4 local_24; *(int4 *)(param_2 + 0x83) = 0; while( true ) { cVar1 = translog_get_next_chunk(param_1); if (cVar1 != '\0') { return 0xffffffff; } if (*(int1 **)(param_1 + 0x2018) == &end_of_log) break; cVar1 = translog_is_LSN_chunk (*(int1 *) (*(long *)(param_1 + 0x2018) + (ulong)*(uint *)(param_1 + 0x2028))); bVar2 = false; if (cVar1 == '\0') { bVar2 = *(char *)(*(long *)(param_1 + 0x2018) + (ulong)*(uint *)(param_1 + 0x2028)) != -1; } if (!bVar2) { if (*(char *)(*(long *)(param_1 + 0x2018) + (ulong)*(uint *)(param_1 + 0x2028)) == -1) { *param_2 = 0; local_24 = 0xfffffffe; } else { local_24 = translog_read_record_header_scan(param_1,param_2,0); } return local_24; } } *param_2 = 0; return 0xfffffffe; }
50,486
translog_read_next_record_header
eloqsql/storage/maria/ma_loghandler.c
int translog_read_next_record_header(TRANSLOG_SCANNER_DATA *scanner, TRANSLOG_HEADER_BUFFER *buff) { translog_size_t res; DBUG_ENTER("translog_read_next_record_header"); buff->groups_no= 0; /* to be sure that we will free it right */ DBUG_PRINT("enter", ("scanner: %p", scanner)); DBUG_PRINT("info", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " " "Lst: " LSN_FMT " Offset: %u(%x) fixed: %d", LSN_IN_PARTS(scanner->page_addr), LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->last_file_page), (uint) scanner->page_offset, (uint) scanner->page_offset, scanner->fixed_horizon)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); do { if (translog_get_next_chunk(scanner)) DBUG_RETURN(RECHEADER_READ_ERROR); if (scanner->page == END_OF_LOG) { DBUG_PRINT("info", ("End of file from the scanner")); /* Last record was read */ buff->lsn= LSN_IMPOSSIBLE; DBUG_RETURN(RECHEADER_READ_EOF); } DBUG_PRINT("info", ("Page: " LSN_FMT " offset: %lu byte: %x", LSN_IN_PARTS(scanner->page_addr), (ulong) scanner->page_offset, (uint) scanner->page[scanner->page_offset])); } while (!translog_is_LSN_chunk(scanner->page[scanner->page_offset]) && scanner->page[scanner->page_offset] != TRANSLOG_FILLER); if (scanner->page[scanner->page_offset] == TRANSLOG_FILLER) { DBUG_PRINT("info", ("End of file")); /* Last record was read */ buff->lsn= LSN_IMPOSSIBLE; /* Return 'end of log' marker */ res= RECHEADER_READ_EOF; } else res= translog_read_record_header_scan(scanner, buff, 0); DBUG_RETURN(res); }
O3
c
translog_read_next_record_header: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl $0x0, 0x418(%rsi) leaq 0xbb444b(%rip), %r15 # 0xc01990 movq %r14, %rdi callq 0x4bc56 testb %al, %al jne 0x4d5eb movq 0x2018(%r14), %rax cmpq %r15, %rax je 0x4d5dd movl 0x2028(%r14), %ecx movzbl (%rax,%rcx), %eax movl %eax, %ecx andl $-0x40, %ecx cmpl $0x40, %ecx je 0x4d592 testl %ecx, %ecx sete %cl movl %eax, %edx notl %edx testb $0x3f, %dl setne %dl testb %dl, %cl jne 0x4d592 cmpl $0xff, %eax jne 0x4d545 jmp 0x4d5dd cmpl $0xff, %eax je 0x4d5dd movl $0x0, 0x418(%rbx) movq 0x2000(%r14), %rax movq %rax, (%rbx) movl 0x2028(%r14), %ecx addq %rax, %rcx movq %rcx, (%rbx) movq 0x2018(%r14), %rdi movzwl 0x2028(%r14), %esi movq %rbx, %rdx xorl %ecx, %ecx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x4cf94 movq $0x0, (%rbx) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE jmp 0x4d5f0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
translog_read_next_record_header: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov dword ptr [rsi+418h], 0 lea r15, end_of_log loc_4D545: mov rdi, r14 call translog_get_next_chunk test al, al jnz loc_4D5EB mov rax, [r14+2018h] cmp rax, r15 jz short loc_4D5DD mov ecx, [r14+2028h] movzx eax, byte ptr [rax+rcx] mov ecx, eax and ecx, 0FFFFFFC0h cmp ecx, 40h ; '@' jz short loc_4D592 test ecx, ecx setz cl mov edx, eax not edx test dl, 3Fh setnz dl test cl, dl jnz short loc_4D592 cmp eax, 0FFh jnz short loc_4D545 jmp short loc_4D5DD loc_4D592: cmp eax, 0FFh jz short loc_4D5DD mov dword ptr [rbx+418h], 0 mov rax, [r14+2000h] mov [rbx], rax mov ecx, [r14+2028h] add rcx, rax mov [rbx], rcx mov rdi, [r14+2018h] movzx esi, word ptr [r14+2028h] mov rdx, rbx xor ecx, ecx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp translog_read_record_header_from_buffer loc_4D5DD: mov qword ptr [rbx], 0 mov eax, 0FFFFFFFEh jmp short loc_4D5F0 loc_4D5EB: mov eax, 0FFFFFFFFh loc_4D5F0: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long translog_read_next_record_header(long long a1, long long a2) { unsigned __int8 *v2; // rax int v3; // eax long long v4; // rax *(_DWORD *)(a2 + 1048) = 0; while ( !translog_get_next_chunk(a1) ) { v2 = *(unsigned __int8 **)(a1 + 8216); if ( v2 == (unsigned __int8 *)&end_of_log ) goto LABEL_10; v3 = v2[*(unsigned int *)(a1 + 8232)]; if ( (v3 & 0xFFFFFFC0) == 0x40 || (~(_BYTE)v3 & 0x3F) != 0 && (v3 & 0xFFFFFFC0) == 0 ) { if ( v3 != 255 ) { *(_DWORD *)(a2 + 1048) = 0; v4 = *(_QWORD *)(a1 + 0x2000); *(_QWORD *)a2 = v4; *(_QWORD *)a2 = v4 + *(unsigned int *)(a1 + 8232); return translog_read_record_header_from_buffer( *(_QWORD *)(a1 + 8216), *(unsigned __int16 *)(a1 + 8232), a2, 0LL); } LABEL_10: *(_QWORD *)a2 = 0LL; return 4294967294LL; } if ( v3 == 255 ) goto LABEL_10; } return 0xFFFFFFFFLL; }
translog_read_next_record_header: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV dword ptr [RSI + 0x418],0x0 LEA R15,[0xd01990] LAB_0014d545: MOV RDI,R14 CALL 0x0014bc56 TEST AL,AL JNZ 0x0014d5eb MOV RAX,qword ptr [R14 + 0x2018] CMP RAX,R15 JZ 0x0014d5dd MOV ECX,dword ptr [R14 + 0x2028] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV ECX,EAX AND ECX,0xffffffc0 CMP ECX,0x40 JZ 0x0014d592 TEST ECX,ECX SETZ CL MOV EDX,EAX NOT EDX TEST DL,0x3f SETNZ DL TEST CL,DL JNZ 0x0014d592 CMP EAX,0xff JNZ 0x0014d545 JMP 0x0014d5dd LAB_0014d592: CMP EAX,0xff JZ 0x0014d5dd MOV dword ptr [RBX + 0x418],0x0 MOV RAX,qword ptr [R14 + 0x2000] MOV qword ptr [RBX],RAX MOV ECX,dword ptr [R14 + 0x2028] ADD RCX,RAX MOV qword ptr [RBX],RCX MOV RDI,qword ptr [R14 + 0x2018] MOVZX ESI,word ptr [R14 + 0x2028] MOV RDX,RBX XOR ECX,ECX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0014cf94 LAB_0014d5dd: MOV qword ptr [RBX],0x0 MOV EAX,0xfffffffe JMP 0x0014d5f0 LAB_0014d5eb: MOV EAX,0xffffffff LAB_0014d5f0: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 translog_read_next_record_header(long param_1,long *param_2) { byte bVar1; long lVar2; char cVar3; int8 uVar4; *(int4 *)(param_2 + 0x83) = 0; while( true ) { cVar3 = translog_get_next_chunk(param_1); if (cVar3 != '\0') { return 0xffffffff; } if (*(int1 **)(param_1 + 0x2018) == &end_of_log) goto LAB_0014d5dd; bVar1 = (*(int1 **)(param_1 + 0x2018))[*(uint *)(param_1 + 0x2028)]; if (((bVar1 & 0xc0) == 0x40) || ((bVar1 & 0xc0) == 0 && (~bVar1 & 0x3f) != 0)) break; if (bVar1 == 0xff) { LAB_0014d5dd: *param_2 = 0; return 0xfffffffe; } } if (bVar1 != 0xff) { *(int4 *)(param_2 + 0x83) = 0; lVar2 = *(long *)(param_1 + 0x2000); *param_2 = lVar2; *param_2 = (ulong)*(uint *)(param_1 + 0x2028) + lVar2; uVar4 = translog_read_record_header_from_buffer (*(int8 *)(param_1 + 0x2018),*(int2 *)(param_1 + 0x2028),param_2,0 ); return uVar4; } goto LAB_0014d5dd; }
50,487
my_scan_8bit
eloqsql/strings/ctype-simple.c
size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) { const char *str0= str; switch (sq) { case MY_SEQ_INTTAIL: if (*str == '.') { for(str++ ; str != end && *str == '0' ; str++); return (size_t) (str - str0); } return 0; case MY_SEQ_SPACES: for ( ; str < end ; str++) { if (!my_isspace(cs,*str)) break; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: for ( ; str < end ; str++) { if (my_isspace(cs, *str)) break; } return (size_t) (str - str0); default: return 0; } }
O3
c
my_scan_8bit: pushq %rbp movq %rsp, %rbp movq %rdx, %rax cmpl $0x1, %ecx je 0xb5e52 cmpl $0x2, %ecx je 0xb5e26 cmpl $0x3, %ecx jne 0xb5e77 movq %rsi, %rcx cmpq %rax, %rsi jae 0xb5e4a movq 0x40(%rdi), %rdx movq %rsi, %rcx movzbl (%rcx), %edi testb $0x8, 0x1(%rdx,%rdi) jne 0xb5e4a incq %rcx cmpq %rax, %rcx jne 0xb5e12 jmp 0xb5e47 movq %rsi, %rcx cmpq %rax, %rsi jae 0xb5e4a movq 0x40(%rdi), %rdx movq %rsi, %rcx movzbl (%rcx), %edi testb $0x8, 0x1(%rdx,%rdi) je 0xb5e4a incq %rcx cmpq %rax, %rcx jne 0xb5e35 movq %rax, %rcx subq %rsi, %rcx movq %rcx, %rax jmp 0xb5e79 cmpb $0x2e, (%rsi) jne 0xb5e77 leaq 0x1(%rsi), %rcx cmpq %rax, %rcx je 0xb5e72 leaq 0x1(%rcx), %rdx cmpb $0x30, (%rcx) movq %rdx, %rcx je 0xb5e5b decq %rdx movq %rdx, %rax subq %rsi, %rax jmp 0xb5e79 xorl %eax, %eax popq %rbp retq
my_scan_8bit: push rbp mov rbp, rsp mov rax, rdx cmp ecx, 1 jz short loc_B5E52 cmp ecx, 2 jz short loc_B5E26 cmp ecx, 3 jnz short loc_B5E77 mov rcx, rsi cmp rsi, rax jnb short loc_B5E4A mov rdx, [rdi+40h] mov rcx, rsi loc_B5E12: movzx edi, byte ptr [rcx] test byte ptr [rdx+rdi+1], 8 jnz short loc_B5E4A inc rcx cmp rcx, rax jnz short loc_B5E12 jmp short loc_B5E47 loc_B5E26: mov rcx, rsi cmp rsi, rax jnb short loc_B5E4A mov rdx, [rdi+40h] mov rcx, rsi loc_B5E35: movzx edi, byte ptr [rcx] test byte ptr [rdx+rdi+1], 8 jz short loc_B5E4A inc rcx cmp rcx, rax jnz short loc_B5E35 loc_B5E47: mov rcx, rax loc_B5E4A: sub rcx, rsi mov rax, rcx jmp short loc_B5E79 loc_B5E52: cmp byte ptr [rsi], 2Eh ; '.' jnz short loc_B5E77 lea rcx, [rsi+1] loc_B5E5B: cmp rcx, rax jz short loc_B5E72 lea rdx, [rcx+1] cmp byte ptr [rcx], 30h ; '0' mov rcx, rdx jz short loc_B5E5B dec rdx mov rax, rdx loc_B5E72: sub rax, rsi jmp short loc_B5E79 loc_B5E77: xor eax, eax loc_B5E79: pop rbp retn
long long my_scan_8bit(long long a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4) { unsigned __int8 *v4; // rax unsigned __int8 *v5; // rcx unsigned __int8 *v7; // rcx _BYTE *v8; // rdx v4 = a3; if ( a4 != 1 ) { if ( a4 == 2 ) { v5 = a2; if ( a2 < a3 ) { v5 = a2; while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) != 0 ) { if ( ++v5 == a3 ) { LABEL_13: v5 = a3; return v5 - a2; } } } return v5 - a2; } if ( a4 == 3 ) { v5 = a2; if ( a2 < a3 ) { v5 = a2; while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) == 0 ) { if ( ++v5 == a3 ) goto LABEL_13; } } return v5 - a2; } return 0LL; } if ( *a2 != 46 ) return 0LL; v7 = a2 + 1; while ( v7 != v4 ) { v8 = v7 + 1; if ( *v7++ != 48 ) { v4 = v8 - 1; return v4 - a2; } } return v4 - a2; }
my_scan_8bit: PUSH RBP MOV RBP,RSP MOV RAX,RDX CMP ECX,0x1 JZ 0x001b5e52 CMP ECX,0x2 JZ 0x001b5e26 CMP ECX,0x3 JNZ 0x001b5e77 MOV RCX,RSI CMP RSI,RAX JNC 0x001b5e4a MOV RDX,qword ptr [RDI + 0x40] MOV RCX,RSI LAB_001b5e12: MOVZX EDI,byte ptr [RCX] TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8 JNZ 0x001b5e4a INC RCX CMP RCX,RAX JNZ 0x001b5e12 JMP 0x001b5e47 LAB_001b5e26: MOV RCX,RSI CMP RSI,RAX JNC 0x001b5e4a MOV RDX,qword ptr [RDI + 0x40] MOV RCX,RSI LAB_001b5e35: MOVZX EDI,byte ptr [RCX] TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8 JZ 0x001b5e4a INC RCX CMP RCX,RAX JNZ 0x001b5e35 LAB_001b5e47: MOV RCX,RAX LAB_001b5e4a: SUB RCX,RSI MOV RAX,RCX JMP 0x001b5e79 LAB_001b5e52: CMP byte ptr [RSI],0x2e JNZ 0x001b5e77 LEA RCX,[RSI + 0x1] LAB_001b5e5b: CMP RCX,RAX JZ 0x001b5e72 LEA RDX,[RCX + 0x1] CMP byte ptr [RCX],0x30 MOV RCX,RDX JZ 0x001b5e5b DEC RDX MOV RAX,RDX LAB_001b5e72: SUB RAX,RSI JMP 0x001b5e79 LAB_001b5e77: XOR EAX,EAX LAB_001b5e79: POP RBP RET
long my_scan_8bit(long param_1,byte *param_2,byte *param_3,int param_4) { byte bVar1; byte *pbVar2; long lVar3; byte *pbVar4; if (param_4 == 1) { if (*param_2 == 0x2e) { pbVar4 = param_2 + 1; do { pbVar2 = param_3; if (pbVar4 == param_3) break; bVar1 = *pbVar4; pbVar2 = pbVar4; pbVar4 = pbVar4 + 1; } while (bVar1 == 0x30); return (long)pbVar2 - (long)param_2; } LAB_001b5e77: lVar3 = 0; } else { pbVar4 = param_2; if (param_4 == 2) { if (param_2 < param_3) { pbVar2 = param_2; do { pbVar4 = pbVar2; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) == 0) break; pbVar2 = pbVar2 + 1; pbVar4 = param_3; } while (pbVar2 != param_3); } } else { if (param_4 != 3) goto LAB_001b5e77; if (param_2 < param_3) { pbVar2 = param_2; do { pbVar4 = pbVar2; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) != 0) break; pbVar2 = pbVar2 + 1; pbVar4 = param_3; } while (pbVar2 != param_3); } } lVar3 = (long)pbVar4 - (long)param_2; } return lVar3; }
50,488
handle_segfault
xtate/src/pixie/pixie-backtrace.c
static void handle_segfault(int sig) { void *func[BACKTRACE_SIZE]; char **symb = NULL; int size; printf("===================================================================" "===\n"); printf(" Segmentation fault: please post this backtrace to:\n"); printf(" " XTATE_ISSUES_URL "\n"); printf("===================================================================" "===\n"); size = backtrace(func, BACKTRACE_SIZE); symb = backtrace_symbols(func, size); while (size > 0) { const char *symbol = symb[size - 1]; char foo[1024]; printf("%d: [%s]\n", size, symbol); if (strstr(symbol, "[0x")) { char *p = strstr(symbol, "[0x") + 1; char *pp = strchr(p, ']'); snprintf(foo, sizeof(foo), "addr2line -p -i -f -e %s %.*s", global_self, (unsigned)(pp - p), p); if (system(foo) == -1) printf("(addr2line missing)\n"); } size--; } xcmd_try_reboot(); exit(1); return; }
O3
c
handle_segfault: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc08, %rsp # imm = 0xC08 leaq 0x5a922(%rip), %rbx # 0x80b28 movq %rbx, %rdi callq 0x15ba0 leaq 0x3e0de(%rip), %rdi # 0x642f3 callq 0x15ba0 leaq 0x3e106(%rip), %rdi # 0x64327 callq 0x15ba0 movq %rbx, %rdi callq 0x15ba0 leaq 0x400(%rsp), %rbx movq %rbx, %rdi movl $0x100, %esi # imm = 0x100 callq 0x15dd0 movl %eax, %ebp movq %rbx, %rdi movl %eax, %esi callq 0x15480 testl %ebp, %ebp jle 0x262f5 movq %rax, %rbx movl %ebp, %r14d leaq 0x3e063(%rip), %r15 # 0x642c7 leaq 0x3e066(%rip), %r12 # 0x642d1 movq %rsp, %r13 movq -0x8(%rbx,%r14,8), %rbp movq %r15, %rdi movl %r14d, %esi movq %rbp, %rdx xorl %eax, %eax callq 0x150b0 movq %rbp, %rdi movq %r12, %rsi callq 0x15510 testq %rax, %rax je 0x262e4 movq %rax, %rbp incq %rbp movq %rbp, %rdi movl $0x5d, %esi callq 0x15590 subl %ebp, %eax movl $0x400, %esi # imm = 0x400 movq %r13, %rdi leaq 0x3e01e(%rip), %rdx # 0x642d5 leaq 0x17d0c2(%rip), %rcx # 0x1a3380 movl %eax, %r8d movq %rbp, %r9 xorl %eax, %eax callq 0x15560 movq %r13, %rdi callq 0x15e30 cmpl $-0x1, %eax jne 0x262e4 leaq 0x3e072(%rip), %rdi # 0x64351 callq 0x15ba0 leaq -0x1(%r14), %rax cmpq $0x1, %r14 movq %rax, %r14 jg 0x2626e xorl %eax, %eax callq 0x571f6 movl $0x1, %edi callq 0x156f0 nop
handle_segfault: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C08h lea rbx, asc_80B1E+0Ah; "======================================="... mov rdi, rbx call _puts lea rdi, aSegmentationFa; " Segmentation fault: please post this b"... call _puts lea rdi, aHttpsGithubCom_0; " https://github.com/babycoff/xtate/issu"... call _puts mov rdi, rbx call _puts lea rbx, [rsp+0C38h+var_838] mov rdi, rbx mov esi, 100h call _backtrace mov ebp, eax mov rdi, rbx mov esi, eax call _backtrace_symbols test ebp, ebp jle loc_262F5 mov rbx, rax mov r14d, ebp lea r15, aDS_0; "%d: [%s]\n" lea r12, a0x; "[0x" mov r13, rsp loc_2626E: mov rbp, [rbx+r14*8-8] mov rdi, r15 mov esi, r14d mov rdx, rbp xor eax, eax call _printf mov rdi, rbp mov rsi, r12 call _strstr test rax, rax jz short loc_262E4 mov rbp, rax inc rbp mov rdi, rbp mov esi, 5Dh ; ']' call _strchr sub eax, ebp mov esi, 400h mov rdi, r13 lea rdx, aAddr2linePIFES; "addr2line -p -i -f -e %s %.*s" lea rcx, global_self mov r8d, eax mov r9, rbp xor eax, eax call _snprintf mov rdi, r13 call _system cmp eax, 0FFFFFFFFh jnz short loc_262E4 lea rdi, aAddr2lineMissi; "(addr2line missing)" call _puts loc_262E4: lea rax, [r14-1] cmp r14, 1 mov r14, rax jg loc_2626E loc_262F5: xor eax, eax call xcmd_try_reboot mov edi, 1 call _exit
void __noreturn handle_segfault() { long long v0; // rbp long long v1; // rax long long v2; // rbx long long v3; // r14 const char *v4; // rbp long long v5; // rdx long long v6; // rcx long long v7; // rax const char *v8; // rbp int v9; // eax _BYTE v11[1024]; // [rsp+0h] [rbp-C38h] BYREF _BYTE v12[2104]; // [rsp+400h] [rbp-838h] BYREF puts("======================================================================"); puts(" Segmentation fault: please post this backtrace to:"); puts(" https://github.com/babycoff/xtate/issues"); puts("======================================================================"); v0 = (unsigned int)backtrace(v12, 256LL); v1 = backtrace_symbols(v12, v0); if ( (int)v0 > 0 ) { v2 = v1; v3 = (unsigned int)v0; do { v4 = *(const char **)(v2 + 8 * v3 - 8); printf("%d: [%s]\n", v3, v4); v7 = strstr(v4, "[0x", v5, v6); if ( v7 ) { v8 = (const char *)(v7 + 1); v9 = strchr((const char *)(v7 + 1), 93LL); snprintf(v11, 1024LL, "addr2line -p -i -f -e %s %.*s", global_self, v9 - (_DWORD)v8, v8); if ( (unsigned int)system(v11) == -1 ) puts("(addr2line missing)"); } } while ( v3-- > 1 ); } xcmd_try_reboot(); exit(1LL); }
handle_segfault: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc08 LEA RBX,[0x180b28] MOV RDI,RBX CALL 0x00115ba0 LEA RDI,[0x1642f3] CALL 0x00115ba0 LEA RDI,[0x164327] CALL 0x00115ba0 MOV RDI,RBX CALL 0x00115ba0 LEA RBX,[RSP + 0x400] MOV RDI,RBX MOV ESI,0x100 CALL 0x00115dd0 MOV EBP,EAX MOV RDI,RBX MOV ESI,EAX CALL 0x00115480 TEST EBP,EBP JLE 0x001262f5 MOV RBX,RAX MOV R14D,EBP LEA R15,[0x1642c7] LEA R12,[0x1642d1] MOV R13,RSP LAB_0012626e: MOV RBP,qword ptr [RBX + R14*0x8 + -0x8] MOV RDI,R15 MOV ESI,R14D MOV RDX,RBP XOR EAX,EAX CALL 0x001150b0 MOV RDI,RBP MOV RSI,R12 CALL 0x00115510 TEST RAX,RAX JZ 0x001262e4 MOV RBP,RAX INC RBP MOV RDI,RBP MOV ESI,0x5d CALL 0x00115590 SUB EAX,EBP MOV ESI,0x400 MOV RDI,R13 LEA RDX,[0x1642d5] LEA RCX,[0x2a3380] MOV R8D,EAX MOV R9,RBP XOR EAX,EAX CALL 0x00115560 MOV RDI,R13 CALL 0x00115e30 CMP EAX,-0x1 JNZ 0x001262e4 LEA RDI,[0x164351] CALL 0x00115ba0 LAB_001262e4: LEA RAX,[R14 + -0x1] CMP R14,0x1 MOV R14,RAX JG 0x0012626e LAB_001262f5: XOR EAX,EAX CALL 0x001571f6 MOV EDI,0x1 CALL 0x001156f0
void handle_segfault(void) { bool bVar1; uint uVar2; int iVar3; long lVar4; char *pcVar5; char *pcVar6; ulong uVar7; char acStack_c38 [1024]; int1 local_838 [2056]; puts("======================================================================"); puts(" Segmentation fault: please post this backtrace to:"); puts(" https://github.com/babycoff/xtate/issues"); puts("======================================================================"); uVar2 = backtrace(local_838,0x100); lVar4 = backtrace_symbols(local_838,uVar2); if (0 < (int)uVar2) { uVar7 = (ulong)uVar2; do { pcVar5 = *(char **)(lVar4 + -8 + uVar7 * 8); printf("%d: [%s]\n",uVar7 & 0xffffffff,pcVar5); pcVar5 = strstr(pcVar5,"[0x"); if (pcVar5 != (char *)0x0) { pcVar5 = pcVar5 + 1; pcVar6 = strchr(pcVar5,0x5d); snprintf(acStack_c38,0x400,"addr2line -p -i -f -e %s %.*s",global_self, (ulong)(uint)((int)pcVar6 - (int)pcVar5),pcVar5); iVar3 = system(acStack_c38); if (iVar3 == -1) { puts("(addr2line missing)"); } } bVar1 = 1 < (long)uVar7; uVar7 = uVar7 - 1; } while (bVar1); } xcmd_try_reboot(); /* WARNING: Subroutine does not return */ exit(1); }
50,489
unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value() &&
aimrt_mujoco_sim/_deps/libunifex-src/include/unifex/sequence.hpp
void set_value() && noexcept { // Take a copy of op_ before destroying predOp_ as this may end up // destroying *this. using successor_receiver_t = successor_receiver<Predecessor, Successor, Receiver>; auto* op = op_; op->status_ = operation_type::status::empty; unifex::deactivate_union_member(op->predOp_); if constexpr (is_nothrow_connectable_v<Successor, successor_receiver_t>) { unifex::activate_union_member_with(op->succOp_, [&]() noexcept { return unifex::connect( static_cast<Successor&&>(op->successor_), successor_receiver_t{op}); }); op->status_ = operation_type::status::successor_operation_constructed; unifex::start(op->succOp_.get()); } else { UNIFEX_TRY { unifex::activate_union_member_with(op->succOp_, [&] { return unifex::connect( static_cast<Successor&&>(op->successor_), successor_receiver_t{op}); }); op->status_ = operation_type::status::successor_operation_constructed; unifex::start(op->succOp_.get()); } UNIFEX_CATCH (...) { unifex::set_error( static_cast<Receiver&&>(op->receiver_), std::current_exception()); } }
O0
cpp
unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value() &&: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rax movq (%rax), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movl $0x0, 0x20(%rax) movq 0x38(%rsp), %rdi addq $0x28, %rdi callq 0xf4b90 movq 0x38(%rsp), %rdi addq $0x28, %rdi leaq 0x38(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0x30(%rsp), %rsi callq 0xf4bb0 jmp 0xf4aef movq 0x38(%rsp), %rax movl $0x2, 0x20(%rax) movq 0x38(%rsp), %rdi addq $0x28, %rdi callq 0xf4c80 movq %rax, %rsi leaq 0x2eac21(%rip), %rdi # 0x3df734 callq 0xf4c60 jmp 0xf4b78 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) movq 0x28(%rsp), %rdi callq 0x8b640 movq 0x38(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) leaq 0x18(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x8e270 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x2eabda(%rip), %rdi # 0x3df73a callq 0xf4c90 movq 0x10(%rsp), %rdi callq 0x8d3f0 callq 0x92480 jmp 0xf4b76 jmp 0xf4b78 addq $0x48, %rsp retq movq %rax, %rdi callq 0x9cf00 nopw %cs:(%rax,%rax) nop
_ZNO6unifex4_seq21_predecessor_receiverIONS_5_then7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS3_INS_5_amre7_senderEZNS9_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4type9set_valueEv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rax, [rsp+48h+var_8] mov rax, [rax] mov [rsp+48h+var_10], rax mov rax, [rsp+48h+var_10] mov dword ptr [rax+20h], 0 mov rdi, [rsp+48h+var_10] add rdi, 28h ; '(' call _ZN6unifex23deactivate_union_memberINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS3_7_senderINS1_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS_5_amre7_senderEZNSC_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESD_E4typeEJEE4typeEEEvRNS_15manual_lifetimeIT_EE mov rdi, [rsp+48h+var_10] add rdi, 28h ; '(' lea rax, [rsp+48h+var_10] mov [rsp+48h+var_18], rax lea rsi, [rsp+48h+var_18] call _ZN6unifex26activate_union_member_withINS_5_amre10_operationINS_5_then9_receiverINS_4_seq19_successor_receiverIONS3_7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS1_7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESJ_E4typeEE4typeEZNOS5_21_predecessor_receiverISH_SL_SR_E4type9set_valueEvEUlvE_EERT_RNS_15manual_lifetimeIS12_EEOT0_ jmp short $+2 loc_F4AEF: mov rax, [rsp+48h+var_10] mov dword ptr [rax+20h], 2 mov rdi, [rsp+48h+var_10] add rdi, 28h ; '(' call _ZNR6unifex15manual_lifetimeINS_5_amre10_operationINS_5_then9_receiverINS_4_seq19_successor_receiverIONS3_7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS1_7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESJ_E4typeEE4typeEE3getEv; unifex::manual_lifetime<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_amre::_sender>::type>::type>::get(void) mov rsi, rax lea rdi, _ZN6unifex10_start_cpo5startE; unifex::_start_cpo::start call _ZNK6unifex10_start_cpo3_fnclINS_5_amre10_operationINS_5_then9_receiverINS_4_seq19_successor_receiverIONS5_7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS9_INS3_7_senderEZNSF_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESL_E4typeEE4typeEQnt13tag_invocableIS1_RT_EEEDTcldtfp_5startEES11_ jmp short loc_F4B78 mov rcx, rax mov eax, edx mov [rsp+48h+var_20], rcx mov [rsp+48h+var_24], eax mov rdi, [rsp+48h+var_20]; void * call ___cxa_begin_catch mov rax, [rsp+48h+var_10] add rax, 10h mov [rsp+48h+var_40], rax lea rdi, [rsp+48h+var_30] mov [rsp+48h+var_38], rdi call __ZSt17current_exceptionv; std::current_exception(void) mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] lea rdi, _ZN6unifex8_rec_cpo9set_errorE; unifex::_rec_cpo::set_error call _ZNK6unifex8_rec_cpo13_set_error_fnclINS_10_sync_wait9_receiverINS_5_unit4unitEE4typeENSt15__exception_ptr13exception_ptrEQnt13tag_invocableIS1_T_T0_EEENS_3_ifIX13tag_invocableIS1_SB_SC_EEE5applyINS_12meta_quote1_INS_11_tag_invoke19tag_invoke_result_tEE10bind_frontIJS1_EEENS_11meta_quote2INS1_25set_error_member_result_tEEEE5applyISB_SC_EEOSB_OSC_ mov rdi, [rsp+48h+var_38]; this call __ZNSt15__exception_ptr13exception_ptrD2Ev; std::__exception_ptr::exception_ptr::~exception_ptr() call ___cxa_end_catch jmp short $+2 loc_F4B76: jmp short $+2 loc_F4B78: add rsp, 48h retn mov rdi, rax call __clang_call_terminate
long long unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value( _QWORD *a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // rax _QWORD *v7; // [rsp+30h] [rbp-18h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-10h] BYREF v8[1] = a1; v8[0] = *a1; *(_DWORD *)(v8[0] + 32LL) = 0; unifex::deactivate_union_member<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type>(v8[0] + 40LL); v7 = v8; unifex::activate_union_member_with<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_amre::_sender>::type>::type,unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value(void)::{lambda(void)#1}>( LODWORD(v8[0]) + 40, (unsigned int)&v7, v1, v2, v3, v4); *(_DWORD *)(v8[0] + 32LL) = 2; v5 = unifex::manual_lifetime<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_amre::_sender>::type>::type>::get(v8[0] + 40LL); return ZNK6unifex10_start_cpo3_fnclINS_5_amre10_operationINS_5_then9_receiverINS_4_seq19_successor_receiverIONS5_7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS9_INS3_7_senderEZNSF_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESL_E4typeEE4typeEQnt13tag_invocableIS1_RT_EEEDTcldtfp_5startEES11_( &unifex::_start_cpo::start, v5); }
set_value: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x28 CALL 0x001f4b90 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x28 LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x30],RAX LAB_001f4ae3: LEA RSI,[RSP + 0x30] CALL 0x001f4bb0 LAB_001f4aed: JMP 0x001f4aef LAB_001f4aef: MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],0x2 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x28 CALL 0x001f4c80 MOV RSI,RAX LEA RDI,[0x4df734] CALL 0x001f4c60 JMP 0x001f4b78 LAB_001f4b78: ADD RSP,0x48 RET
/* unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value() && */ void __thiscall unifex::_seq:: _predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type> ::type::set_value(type *this) { int8 uVar1; long *local_18; long local_10; type *local_8; local_10 = *(long *)this; *(int4 *)(local_10 + 0x20) = 0; local_8 = this; deactivate_union_member<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type>::type> ((manual_lifetime *)(local_10 + 0x28)); local_18 = &local_10; /* try { // try from 001f4ae3 to 001f4aec has its CatchHandler @ 001f4b1a */ activate_union_member_with<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type>::type,unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::set_value()&&::_lambda()_1_> ((manual_lifetime *)(local_10 + 0x28),(_lambda___1_ *)&local_18); *(int4 *)(local_10 + 0x20) = 2; uVar1 = manual_lifetime<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type>::type> ::get((manual_lifetime<unifex::_amre::_operation<unifex::_then::_receiver<unifex::_seq::_successor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type>::type> *)(local_10 + 0x28)); _ZNK6unifex10_start_cpo3_fnclINS_5_amre10_operationINS_5_then9_receiverINS_4_seq19_successor_receiverIONS5_7_senderINS_5_just7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS9_INS3_7_senderEZNSF_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESL_E4typeEE4typeEQnt13tag_invocableIS1_RT_EEEDTcldtfp_5startEES11_ (&_start_cpo::start,uVar1); return; }
50,490
google::protobuf::compiler::python::Generator::PrintEnum(google::protobuf::EnumDescriptor const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { std::map<std::string, std::string> m; std::string module_level_descriptor_name = ModuleLevelDescriptorName(enum_descriptor); m["descriptor_name"] = module_level_descriptor_name; m["name"] = enum_descriptor.name(); m["full_name"] = enum_descriptor.full_name(); m["file"] = kDescriptorKey; const char enum_descriptor_template[] = "$descriptor_name$ = _descriptor.EnumDescriptor(\n" " name='$name$',\n" " full_name='$full_name$',\n" " filename=None,\n" " file=$file$,\n" " create_key=_descriptor._internal_create_key,\n" " values=[\n"; std::string options_string; enum_descriptor.options().SerializeToString(&options_string); printer_->Print(m, enum_descriptor_template); printer_->Indent(); printer_->Indent(); if (pure_python_workable_) { for (int i = 0; i < enum_descriptor.value_count(); ++i) { PrintEnumValueDescriptor(*enum_descriptor.value(i)); printer_->Print(",\n"); } } printer_->Outdent(); printer_->Print("],\n"); printer_->Print("containing_type=None,\n"); printer_->Print("serialized_options=$options_value$,\n", "options_value", OptionsValue(options_string)); EnumDescriptorProto edp; printer_->Outdent(); printer_->Print(")\n"); if (pure_python_workable_) { printer_->Print("_sym_db.RegisterEnumDescriptor($name$)\n", "name", module_level_descriptor_name); } printer_->Print("\n"); }
O3
cpp
google::protobuf::compiler::python::Generator::PrintEnum(google::protobuf::EnumDescriptor const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x198, %rsp # imm = 0x198 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) leaq 0x50(%rsp), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x6c79a leaq 0x80(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x141116(%rip), %rsi # 0x1a8372 leaq 0x14111e(%rip), %rdx # 0x1a8381 leaq 0x70(%rsp), %rdi callq 0x250b2 movq %rsp, %rdi leaq 0x70(%rsp), %rsi callq 0x2e310 leaq 0x50(%rsp), %rsi movq %rax, %rdi callq 0x1f260 movq 0x70(%rsp), %rdi cmpq %r12, %rdi je 0x67296 callq 0x1f4a0 movq 0x8(%r14), %r15 leaq 0x70(%rsp), %rdi movq %r12, (%rdi) leaq 0x135a72(%rip), %rsi # 0x19cd1b leaq 0x135a6f(%rip), %rdx # 0x19cd1f callq 0x250b2 movq %rsp, %rdi leaq 0x70(%rsp), %rsi callq 0x2e310 movq %rax, %rdi movq %r15, %rsi callq 0x1f260 movq 0x70(%rsp), %rdi cmpq %r12, %rdi je 0x672dc callq 0x1f4a0 movq 0x8(%r14), %r15 leaq 0x70(%rsp), %rdi movq %r12, (%rdi) leaq 0x1499d8(%rip), %rsi # 0x1b0cc7 leaq 0x1499da(%rip), %rdx # 0x1b0cd0 callq 0x250b2 movq %rsp, %rdi leaq 0x70(%rsp), %rsi callq 0x2e310 addq $0x20, %r15 movq %rax, %rdi movq %r15, %rsi callq 0x1f260 movq 0x70(%rsp), %rdi cmpq %r12, %rdi je 0x67326 callq 0x1f4a0 leaq 0x70(%rsp), %rdi movq %r12, (%rdi) leaq 0x13b166(%rip), %rsi # 0x1a249b leaq 0x13b163(%rip), %rdx # 0x1a249f callq 0x250b2 movq %rsp, %rdi leaq 0x70(%rsp), %rsi callq 0x2e310 movq 0x8(%rax), %rdx leaq 0x1405ff(%rip), %rcx # 0x1a7958 movl $0xa, %r8d movq %rax, %rdi xorl %esi, %esi callq 0x1f760 movq 0x70(%rsp), %rdi cmpq %r12, %rdi je 0x67378 callq 0x1f4a0 leaq 0x1417b1(%rip), %rsi # 0x1a8b30 leaq 0x70(%rsp), %rdi movl $0xb7, %edx callq 0x1f400 leaq 0x40(%rsp), %r12 movq %r12, -0x10(%r12) movq $0x0, -0x8(%r12) movb $0x0, (%r12) movq 0x20(%r14), %rdi leaq 0x30(%rsp), %rsi callq 0xfdce0 movq 0x58(%rbx), %rdi movq %rsp, %rsi leaq 0x70(%rsp), %rdx callq 0x16cd32 movq 0x58(%rbx), %rdi callq 0x16d126 movq 0x58(%rbx), %rdi callq 0x16d126 cmpb $0x1, 0x60(%rbx) jne 0x6741b cmpl $0x0, 0x4(%r14) jle 0x6741b xorl %r13d, %r13d leaq 0x138d81(%rip), %r15 # 0x1a016f xorl %ebp, %ebp movq 0x28(%r14), %rsi addq %r13, %rsi movq %rbx, %rdi callq 0x675be movq 0x58(%rbx), %rdi movq %r15, %rsi callq 0x2e40a incq %rbp movslq 0x4(%r14), %rax addq $0x20, %r13 cmpq %rax, %rbp jl 0x673f0 movq 0x58(%rbx), %rdi callq 0x16d136 movq 0x58(%rbx), %rdi leaq 0x1408cf(%rip), %rsi # 0x1a7cfe callq 0x2e40a movq 0x58(%rbx), %rdi leaq 0x1408c3(%rip), %rsi # 0x1a7d02 callq 0x2e40a movq 0x58(%rbx), %r14 leaq 0x128(%rsp), %rdi leaq 0x30(%rsp), %rdx movq %rbx, %rsi callq 0x67032 leaq 0x1408b5(%rip), %rsi # 0x1a7d19 leaq 0x1408d3(%rip), %rdx # 0x1a7d3e leaq 0x128(%rsp), %rcx movq %r14, %rdi callq 0x6c9b2 leaq 0x138(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x67491 callq 0x1f4a0 leaq 0x128(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x14af78 movq 0x58(%rbx), %rdi callq 0x16d136 movq 0x58(%rbx), %rdi leaq 0x16dff4(%rip), %rsi # 0x1d54aa callq 0x2e40a cmpb $0x1, 0x60(%rbx) jne 0x674dd movq 0x58(%rbx), %rdi leaq 0x140880(%rip), %rsi # 0x1a7d4c leaq 0x135848(%rip), %rdx # 0x19cd1b leaq 0x50(%rsp), %rcx callq 0x5fcda movq 0x58(%rbx), %rdi leaq 0x14be95(%rip), %rsi # 0x1b337d callq 0x2e40a leaq 0x128(%rsp), %rdi callq 0x14b148 movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x67509 callq 0x1f4a0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6751c callq 0x1f4a0 movq %rsp, %rdi callq 0x2e5e0 addq $0x198, %rsp # imm = 0x198 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x67589 movq %rax, %rbx leaq 0x138(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6758c callq 0x1f4a0 jmp 0x6758c jmp 0x67589 jmp 0x6755b jmp 0x6755b jmp 0x6755b movq %rax, %rbx jmp 0x6759b movq %rax, %rbx jmp 0x675ae jmp 0x6756b jmp 0x6756b jmp 0x6756b movq %rax, %rbx movq 0x70(%rsp), %rdi jmp 0x67591 movq %rax, %rbx leaq 0x128(%rsp), %rdi callq 0x14b148 jmp 0x6758c jmp 0x67589 movq %rax, %rbx movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x6759b callq 0x1f4a0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x675ae callq 0x1f4a0 movq %rsp, %rdi callq 0x2e5e0 movq %rbx, %rdi callq 0x1f860
_ZNK6google8protobuf8compiler6python9Generator9PrintEnumERKNS0_14EnumDescriptorE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 198h mov r14, rsi mov rbx, rdi lea rax, [rsp+1C8h+var_1C0] mov dword ptr [rax], 0 xor ecx, ecx; int mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx lea rdi, [rsp+1C8h+var_178]; int mov rsi, rbx; int mov rdx, r14; int call _ZNK6google8protobuf8compiler6python9Generator25ModuleLevelDescriptorNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const&) lea r12, [rsp+1C8h+var_148] mov [r12-10h], r12 lea rsi, aServiceDescrip+8; "descriptor_name" lea rdx, aServiceDescrip+17h; "" lea rdi, [rsp+1C8h+var_158] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp lea rsi, [rsp+1C8h+var_158] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+1C8h+var_178] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+1C8h+var_158]; void * cmp rdi, r12 jz short loc_67296 call __ZdlPv; operator delete(void *) loc_67296: mov r15, [r14+8] lea rdi, [rsp+1C8h+var_158] mov [rdi], r12 lea rsi, aAnnotationPrag+12h; "name" lea rdx, aAnnotationPrag+16h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp lea rsi, [rsp+1C8h+var_158] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+1C8h+var_158]; void * cmp rdi, r12 jz short loc_672DC call __ZdlPv; operator delete(void *) loc_672DC: mov r15, [r14+8] lea rdi, [rsp+1C8h+var_158] mov [rdi], r12 lea rsi, aNestedFullName+7; "full_name" lea rdx, aNestedFullName+10h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp lea rsi, [rsp+1C8h+var_158] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) add r15, 20h ; ' ' mov rdi, rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+1C8h+var_158]; void * cmp rdi, r12 jz short loc_67326 call __ZdlPv; operator delete(void *) loc_67326: lea rdi, [rsp+1C8h+var_158] mov [rdi], r12 lea rsi, aErrorFailedToO+2Fh; "file" lea rdx, aErrorFailedToO+33h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp lea rsi, [rsp+1C8h+var_158] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdx, [rax+8] lea rcx, _ZN6google8protobuf8compiler6python12_GLOBAL__N_114kDescriptorKeyE; "DESCRIPTOR" mov r8d, 0Ah mov rdi, rax xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rdi, [rsp+1C8h+var_158]; void * cmp rdi, r12 jz short loc_67378 call __ZdlPv; operator delete(void *) loc_67378: lea rsi, aDescriptorName_2; "$descriptor_name$ = _descriptor.EnumDes"... lea rdi, [rsp+1C8h+var_158] mov edx, 0B7h call _memcpy lea r12, [rsp+1C8h+var_188] mov [r12-10h], r12 mov qword ptr [r12-8], 0 mov byte ptr [r12], 0 mov rdi, [r14+20h] lea rsi, [rsp+1C8h+var_198] call _ZNK6google8protobuf11MessageLite17SerializeToStringEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::MessageLite::SerializeToString(std::string *) mov rdi, [rbx+58h]; this mov rsi, rsp lea rdx, [rsp+1C8h+var_158] call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rdi, [rbx+58h]; this call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void) mov rdi, [rbx+58h]; this call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void) cmp byte ptr [rbx+60h], 1 jnz short loc_6741B cmp dword ptr [r14+4], 0 jle short loc_6741B xor r13d, r13d lea r15, aBase64_0+0Ah; ",\n" xor ebp, ebp loc_673F0: mov rsi, [r14+28h] add rsi, r13; google::protobuf::EnumValueDescriptor * mov rdi, rbx; this call _ZNK6google8protobuf8compiler6python9Generator24PrintEnumValueDescriptorERKNS0_19EnumValueDescriptorE; google::protobuf::compiler::python::Generator::PrintEnumValueDescriptor(google::protobuf::EnumValueDescriptor const&) mov rdi, [rbx+58h] mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ inc rbp movsxd rax, dword ptr [r14+4] add r13, 20h ; ' ' cmp rbp, rax jl short loc_673F0 loc_6741B: mov rdi, [rbx+58h]; this call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void) mov rdi, [rbx+58h] lea rsi, asc_1A7CFE; "],\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ mov rdi, [rbx+58h] lea rsi, aContainingType; "containing_type=None,\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ mov r14, [rbx+58h] lea rdi, [rsp+1C8h+var_A0] lea rdx, [rsp+1C8h+var_198] mov rsi, rbx call _ZNK6google8protobuf8compiler6python9Generator12OptionsValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::OptionsValue(std::string const&) lea rsi, aSerializedOpti; "serialized_options=$options_value$,\n" lea rdx, aOptionsValue; "options_value" lea rcx, [rsp+1C8h+var_A0] mov rdi, r14 call _ZN6google8protobuf2io7Printer5PrintIJA14_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [14],std::string>(char const*,char [14],std::string const&) lea rax, [rsp+1C8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_67491 call __ZdlPv; operator delete(void *) loc_67491: lea rdi, [rsp+1C8h+var_A0] xor esi, esi xor edx, edx call _ZN6google8protobuf19EnumDescriptorProtoC2EPNS0_5ArenaEb; google::protobuf::EnumDescriptorProto::EnumDescriptorProto(google::protobuf::Arena *,bool) mov rdi, [rbx+58h]; this call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void) mov rdi, [rbx+58h] lea rsi, aKtDeprecationP+135h; ")\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ cmp byte ptr [rbx+60h], 1 jnz short loc_674DD mov rdi, [rbx+58h] lea rsi, aSymDbRegistere; "_sym_db.RegisterEnumDescriptor($name$)"... lea rdx, aAnnotationPrag+12h; "name" lea rcx, [rsp+1C8h+var_178] call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string>(char const*,char [5],std::string const&) loc_674DD: mov rdi, [rbx+58h] lea rsi, aConstProtoNsMe_0+0E5h; "\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ lea rdi, [rsp+1C8h+var_A0]; this call _ZN6google8protobuf19EnumDescriptorProtoD2Ev; google::protobuf::EnumDescriptorProto::~EnumDescriptorProto() mov rdi, [rsp+1C8h+var_198]; void * cmp rdi, r12 jz short loc_67509 call __ZdlPv; operator delete(void *) loc_67509: lea rax, [rsp+1C8h+var_168] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6751C call __ZdlPv; operator delete(void *) loc_6751C: mov rdi, rsp call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 198h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_67589 mov rbx, rax lea rax, [rsp+arg_130] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6758C call __ZdlPv; operator delete(void *) jmp short loc_6758C jmp short loc_67589 jmp short loc_6755B jmp short loc_6755B jmp short $+2 loc_6755B: mov rbx, rax jmp short loc_6759B mov rbx, rax jmp short loc_675AE jmp short loc_6756B jmp short loc_6756B jmp short $+2 loc_6756B: mov rbx, rax mov rdi, [rsp+arg_68] jmp short loc_67591 mov rbx, rax lea rdi, [rsp+arg_120]; this call _ZN6google8protobuf19EnumDescriptorProtoD2Ev; google::protobuf::EnumDescriptorProto::~EnumDescriptorProto() jmp short loc_6758C jmp short $+2 loc_67589: mov rbx, rax loc_6758C: mov rdi, [rsp+arg_28]; void * loc_67591: cmp rdi, r12 jz short loc_6759B call __ZdlPv; operator delete(void *) loc_6759B: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_675AE call __ZdlPv; operator delete(void *) loc_675AE: mov rdi, rsp call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
void google::protobuf::compiler::python::Generator::PrintEnum( google::protobuf::io::Printer **this, const google::protobuf::EnumDescriptor *a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax long long v7; // r15 long long v8; // rax long long v9; // r15 long long v10; // rax long long v11; // rax long long v12; // r13 long long v13; // rbp google::protobuf::io::Printer *v14; // r14 void *v15; // [rsp+0h] [rbp-1C8h] BYREF int v16; // [rsp+8h] [rbp-1C0h] BYREF char v17; // [rsp+10h] [rbp-1B8h] int v18; // [rsp+18h] [rbp-1B0h] int v19; // [rsp+20h] [rbp-1A8h] int v20; // [rsp+28h] [rbp-1A0h] void *v21; // [rsp+30h] [rbp-198h] BYREF long long v22; // [rsp+38h] [rbp-190h] int v23; // [rsp+40h] [rbp-188h] BYREF void *v24; // [rsp+48h] [rbp-180h] char *v25; // [rsp+50h] [rbp-178h] BYREF char v26; // [rsp+58h] [rbp-170h] char v27; // [rsp+60h] [rbp-168h] BYREF void *v28[2]; // [rsp+70h] [rbp-158h] BYREF _BYTE v29[168]; // [rsp+80h] [rbp-148h] BYREF void *v30[2]; // [rsp+128h] [rbp-A0h] BYREF char v31; // [rsp+138h] [rbp-90h] BYREF google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>( (int)&v25, (int)this, (int)a2, 0, a5, a6, (int)v15, 0, 0, &v16, (int)&v16, 0, (int)v21, v22, v23, (char)v24); v28[0] = v29; std::string::_M_construct<char const*>((long long)v28, "descriptor_name", (long long)""); v6 = std::map<std::string,std::string>::operator[]((long long)&v15, (long long)v28); std::string::_M_assign(v6, &v25); if ( v28[0] != v29 ) operator delete(v28[0]); v7 = *((_QWORD *)a2 + 1); v28[0] = v29; std::string::_M_construct<char const*>((long long)v28, "name", (long long)""); v8 = std::map<std::string,std::string>::operator[]((long long)&v15, (long long)v28); std::string::_M_assign(v8, v7); if ( v28[0] != v29 ) operator delete(v28[0]); v9 = *((_QWORD *)a2 + 1); v28[0] = v29; std::string::_M_construct<char const*>((long long)v28, "full_name", (long long)""); v10 = std::map<std::string,std::string>::operator[]((long long)&v15, (long long)v28); std::string::_M_assign(v10, v9 + 32); if ( v28[0] != v29 ) operator delete(v28[0]); v28[0] = v29; std::string::_M_construct<char const*>((long long)v28, "file", (long long)""); v11 = std::map<std::string,std::string>::operator[]((long long)&v15, (long long)v28); std::string::_M_replace(v11, 0LL, *(_QWORD *)(v11 + 8), "DESCRIPTOR", 10LL); if ( v28[0] != v29 ) operator delete(v28[0]); memcpy( v28, "$descriptor_name$ = _descriptor.EnumDescriptor(\n" " name='$name$',\n" " full_name='$full_name$',\n" " filename=None,\n" " file=$file$,\n" " create_key=_descriptor._internal_create_key,\n" " values=[\n", 183LL); v21 = &v23; v22 = 0LL; LOBYTE(v23) = 0; google::protobuf::MessageLite::SerializeToString(*((_QWORD *)a2 + 4), &v21); google::protobuf::io::Printer::Print(this[11], v15, v16, v17, v18, v19, v20, (int)v21, v22, v23, v24, (int)v25, v26); google::protobuf::io::Printer::Indent(this[11]); google::protobuf::io::Printer::Indent(this[11]); if ( *((_BYTE *)this + 96) == 1 && *((int *)a2 + 1) > 0 ) { v12 = 0LL; v13 = 0LL; do { google::protobuf::compiler::python::Generator::PrintEnumValueDescriptor( (google::protobuf::compiler::python::Generator *)this, (const google::protobuf::EnumValueDescriptor *)(v12 + *((_QWORD *)a2 + 5))); google::protobuf::io::Printer::Print<>(this[11], ",\n"); ++v13; v12 += 32LL; } while ( v13 < *((int *)a2 + 1) ); } google::protobuf::io::Printer::Outdent(this[11]); google::protobuf::io::Printer::Print<>(this[11], "],\n"); google::protobuf::io::Printer::Print<>(this[11], "containing_type=None,\n"); v14 = this[11]; google::protobuf::compiler::python::Generator::OptionsValue( (long long)v30, (google::protobuf::compiler::python::Generator *)this, (long long)&v21); google::protobuf::io::Printer::Print<char [14],std::string>( v14, "serialized_options=$options_value$,\n", "options_value", v30); if ( v30[0] != &v31 ) operator delete(v30[0]); google::protobuf::EnumDescriptorProto::EnumDescriptorProto((google::protobuf::EnumDescriptorProto *)v30, 0LL, 0); google::protobuf::io::Printer::Outdent(this[11]); google::protobuf::io::Printer::Print<>(this[11], ")\n"); if ( *((_BYTE *)this + 96) == 1 ) google::protobuf::io::Printer::Print<char [5],std::string>(this[11]); google::protobuf::io::Printer::Print<>(this[11], "\n"); google::protobuf::EnumDescriptorProto::~EnumDescriptorProto((google::protobuf::EnumDescriptorProto *)v30); if ( v21 != &v23 ) operator delete(v21); if ( v25 != &v27 ) operator delete(v25); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)&v15); }
PrintEnum: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x198 MOV R14,RSI MOV RBX,RDI LEA RAX,[RSP + 0x8] 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 LAB_00167238: LEA RDI,[RSP + 0x50] MOV RSI,RBX MOV RDX,R14 CALL 0x0016c79a LEA R12,[RSP + 0x80] MOV qword ptr [R12 + -0x10],R12 LAB_00167255: LEA RSI,[0x2a8372] LEA RDX,[0x2a8381] LEA RDI,[RSP + 0x70] CALL 0x001250b2 LAB_0016726d: MOV RDI,RSP LEA RSI,[RSP + 0x70] CALL 0x0012e310 LEA RSI,[RSP + 0x50] MOV RDI,RAX CALL 0x0011f260 MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R12 JZ 0x00167296 CALL 0x0011f4a0 LAB_00167296: MOV R15,qword ptr [R14 + 0x8] LEA RDI,[RSP + 0x70] MOV qword ptr [RDI],R12 LAB_001672a2: LEA RSI,[0x29cd1b] LEA RDX,[0x29cd1f] CALL 0x001250b2 LAB_001672b5: MOV RDI,RSP LEA RSI,[RSP + 0x70] CALL 0x0012e310 MOV RDI,RAX MOV RSI,R15 CALL 0x0011f260 MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R12 JZ 0x001672dc CALL 0x0011f4a0 LAB_001672dc: MOV R15,qword ptr [R14 + 0x8] LEA RDI,[RSP + 0x70] MOV qword ptr [RDI],R12 LAB_001672e8: LEA RSI,[0x2b0cc7] LEA RDX,[0x2b0cd0] CALL 0x001250b2 LAB_001672fb: MOV RDI,RSP LEA RSI,[RSP + 0x70] CALL 0x0012e310 ADD R15,0x20 MOV RDI,RAX MOV RSI,R15 CALL 0x0011f260 MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R12 JZ 0x00167326 CALL 0x0011f4a0 LAB_00167326: LEA RDI,[RSP + 0x70] MOV qword ptr [RDI],R12 LAB_0016732e: LEA RSI,[0x2a249b] LEA RDX,[0x2a249f] CALL 0x001250b2 LAB_00167341: MOV RDI,RSP LEA RSI,[RSP + 0x70] CALL 0x0012e310 MOV RDX,qword ptr [RAX + 0x8] LEA RCX,[0x2a7958] MOV R8D,0xa MOV RDI,RAX XOR ESI,ESI CALL 0x0011f760 LAB_00167369: MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R12 JZ 0x00167378 CALL 0x0011f4a0 LAB_00167378: LEA RSI,[0x2a8b30] LEA RDI,[RSP + 0x70] MOV EDX,0xb7 CALL 0x0011f400 LEA R12,[RSP + 0x40] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],0x0 MOV byte ptr [R12],0x0 MOV RDI,qword ptr [R14 + 0x20] LAB_001673aa: LEA RSI,[RSP + 0x30] CALL 0x001fdce0 MOV RDI,qword ptr [RBX + 0x58] MOV RSI,RSP LEA RDX,[RSP + 0x70] CALL 0x0026cd32 MOV RDI,qword ptr [RBX + 0x58] CALL 0x0026d126 MOV RDI,qword ptr [RBX + 0x58] CALL 0x0026d126 CMP byte ptr [RBX + 0x60],0x1 JNZ 0x0016741b CMP dword ptr [R14 + 0x4],0x0 JLE 0x0016741b XOR R13D,R13D LEA R15,[0x2a016f] XOR EBP,EBP LAB_001673f0: MOV RSI,qword ptr [R14 + 0x28] ADD RSI,R13 LAB_001673f7: MOV RDI,RBX CALL 0x001675be MOV RDI,qword ptr [RBX + 0x58] MOV RSI,R15 CALL 0x0012e40a INC RBP MOVSXD RAX,dword ptr [R14 + 0x4] ADD R13,0x20 CMP RBP,RAX JL 0x001673f0 LAB_0016741b: MOV RDI,qword ptr [RBX + 0x58] LAB_0016741f: CALL 0x0026d136 MOV RDI,qword ptr [RBX + 0x58] LEA RSI,[0x2a7cfe] CALL 0x0012e40a MOV RDI,qword ptr [RBX + 0x58] LEA RSI,[0x2a7d02] CALL 0x0012e40a MOV R14,qword ptr [RBX + 0x58] LAB_00167448: LEA RDI,[RSP + 0x128] LEA RDX,[RSP + 0x30] MOV RSI,RBX CALL 0x00167032 LAB_0016745d: LEA RSI,[0x2a7d19] LEA RDX,[0x2a7d3e] LEA RCX,[RSP + 0x128] MOV RDI,R14 CALL 0x0016c9b2 LEA RAX,[RSP + 0x138] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00167491 CALL 0x0011f4a0 LAB_00167491: LEA RDI,[RSP + 0x128] XOR ESI,ESI XOR EDX,EDX CALL 0x0024af78 MOV RDI,qword ptr [RBX + 0x58] LAB_001674a6: CALL 0x0026d136 MOV RDI,qword ptr [RBX + 0x58] LEA RSI,[0x2d54aa] CALL 0x0012e40a CMP byte ptr [RBX + 0x60],0x1 JNZ 0x001674dd MOV RDI,qword ptr [RBX + 0x58] LEA RSI,[0x2a7d4c] LEA RDX,[0x29cd1b] LEA RCX,[RSP + 0x50] CALL 0x0015fcda LAB_001674dd: MOV RDI,qword ptr [RBX + 0x58] LEA RSI,[0x2b337d] CALL 0x0012e40a LAB_001674ed: LEA RDI,[RSP + 0x128] CALL 0x0024b148 MOV RDI,qword ptr [RSP + 0x30] CMP RDI,R12 JZ 0x00167509 CALL 0x0011f4a0 LAB_00167509: LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016751c CALL 0x0011f4a0 LAB_0016751c: MOV RDI,RSP CALL 0x0012e5e0 ADD RSP,0x198 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::python::Generator::PrintEnum(google::protobuf::EnumDescriptor const&) const */ void __thiscall google::protobuf::compiler::python::Generator::PrintEnum(Generator *this,EnumDescriptor *param_1) { char *pcVar1; string *psVar2; ulong uVar3; long lVar4; long lVar5; map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> amStack_1c8 [8]; int4 local_1c0 [2]; int8 local_1b8; int4 *local_1b0; int4 *local_1a8; int8 local_1a0; int1 *local_198; int8 local_190; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int1 *local_158 [2]; int1 local_148 [168]; int1 *local_a0 [2]; int1 local_90 [96]; local_1b0 = local_1c0; local_1c0[0] = 0; local_1b8 = 0; local_1a0 = 0; /* try { // try from 00167238 to 00167247 has its CatchHandler @ 00167560 */ local_1a8 = local_1b0; ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>((EnumDescriptor *)local_178); /* try { // try from 00167255 to 0016726c has its CatchHandler @ 0016755b */ local_158[0] = local_148; std::__cxx11::string::_M_construct<char_const*>(local_158,"descriptor_name",""); /* try { // try from 0016726d to 00167286 has its CatchHandler @ 0016756b */ psVar2 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[](amStack_1c8,(string *)local_158); std::__cxx11::string::_M_assign(psVar2); if (local_158[0] != local_148) { operator_delete(local_158[0]); } local_158[0] = local_148; /* try { // try from 001672a2 to 001672b4 has its CatchHandler @ 00167559 */ std::__cxx11::string::_M_construct<char_const*>(local_158,"name",""); /* try { // try from 001672b5 to 001672cc has its CatchHandler @ 00167569 */ psVar2 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[](amStack_1c8,(string *)local_158); std::__cxx11::string::_M_assign(psVar2); if (local_158[0] != local_148) { operator_delete(local_158[0]); } local_158[0] = local_148; /* try { // try from 001672e8 to 001672fa has its CatchHandler @ 00167557 */ std::__cxx11::string::_M_construct<char_const*>(local_158,"full_name",""); /* try { // try from 001672fb to 00167316 has its CatchHandler @ 00167567 */ psVar2 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[](amStack_1c8,(string *)local_158); std::__cxx11::string::_M_assign(psVar2); if (local_158[0] != local_148) { operator_delete(local_158[0]); } local_158[0] = local_148; /* try { // try from 0016732e to 00167340 has its CatchHandler @ 00167555 */ std::__cxx11::string::_M_construct<char_const*>(local_158,"file",""); /* try { // try from 00167341 to 00167368 has its CatchHandler @ 00167565 */ uVar3 = std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[](amStack_1c8,(string *)local_158); std::__cxx11::string::_M_replace(uVar3,0,*(char **)(uVar3 + 8),0x2a7958); if (local_158[0] != local_148) { operator_delete(local_158[0]); } memcpy(local_158, "$descriptor_name$ = _descriptor.EnumDescriptor(\n name=\'$name$\',\n full_name=\'$full_name$\',\n filename=None,\n file=$file$,\n create_key=_descriptor._internal_create_key,\n values=[\n" ,0xb7); local_190 = 0; local_188[0] = 0; /* try { // try from 001673aa to 001673d6 has its CatchHandler @ 00167587 */ local_198 = local_188; MessageLite::SerializeToString(*(MessageLite **)(param_1 + 0x20),(string *)&local_198); io::Printer::Print(*(Printer **)(this + 0x58),(map *)amStack_1c8,(char *)local_158); io::Printer::Indent(*(Printer **)(this + 0x58)); io::Printer::Indent(*(Printer **)(this + 0x58)); if ((this[0x60] == (Generator)0x1) && (0 < *(int *)(param_1 + 4))) { lVar5 = 0; lVar4 = 0; do { /* try { // try from 001673f7 to 0016740a has its CatchHandler @ 00167589 */ PrintEnumValueDescriptor(this,(EnumValueDescriptor *)(*(long *)(param_1 + 0x28) + lVar5)); io::Printer::Print<>(*(Printer **)(this + 0x58),",\n"); lVar4 = lVar4 + 1; lVar5 = lVar5 + 0x20; } while (lVar4 < *(int *)(param_1 + 4)); } /* try { // try from 0016741f to 00167443 has its CatchHandler @ 00167587 */ io::Printer::Outdent(*(Printer **)(this + 0x58)); io::Printer::Print<>(*(Printer **)(this + 0x58),"],\n"); io::Printer::Print<>(*(Printer **)(this + 0x58),"containing_type=None,\n"); pcVar1 = *(char **)(this + 0x58); /* try { // try from 00167448 to 0016745c has its CatchHandler @ 00167553 */ OptionsValue((string *)local_a0); /* try { // try from 0016745d to 0016747a has its CatchHandler @ 00167538 */ io::Printer::Print<char[14],std::__cxx11::string> (pcVar1,"serialized_options=$options_value$,\n",(string *)"options_value"); if (local_a0[0] != local_90) { operator_delete(local_a0[0]); } /* try { // try from 00167491 to 001674a1 has its CatchHandler @ 00167536 */ EnumDescriptorProto::EnumDescriptorProto((EnumDescriptorProto *)local_a0,(Arena *)0x0,false); /* try { // try from 001674a6 to 001674ec has its CatchHandler @ 00167575 */ io::Printer::Outdent(*(Printer **)(this + 0x58)); io::Printer::Print<>(*(Printer **)(this + 0x58),")\n"); if (this[0x60] == (Generator)0x1) { io::Printer::Print<char[5],std::__cxx11::string> (*(char **)(this + 0x58),"_sym_db.RegisterEnumDescriptor($name$)\n",(string *)0x29cd1b ); } io::Printer::Print<>(*(Printer **)(this + 0x58),"\n"); EnumDescriptorProto::~EnumDescriptorProto((EnumDescriptorProto *)local_a0); if (local_198 != local_188) { operator_delete(local_198); } if (local_178[0] != local_168) { operator_delete(local_178[0]); } std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)amStack_1c8); return; }
50,491
my_atod
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
double my_atod(const char *number, const char *end, int *error) { double val= 0.0; char buffer[MAX_DBL_STR + 1]; int len= (int)(end - number); *error= errno= 0; if (len > MAX_DBL_STR) { *error= 1; len= MAX_DBL_STR; } memcpy(buffer, number, len); buffer[len]= '\0'; val= strtod(buffer, NULL); if (errno) *error= errno; return val; }
O3
c
my_atod: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) subq %rdi, %r15 callq 0x13060 movq %rax, %r14 movl $0x0, (%rax) xorl %eax, %eax cmpl $0x436, %r15d # imm = 0x436 setge %al movl %eax, (%rbx) movslq %r15d, %rax movl $0x435, %r15d # imm = 0x435 cmovlq %rax, %r15 leaq -0x470(%rbp), %r13 movl $0x436, %ecx # imm = 0x436 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x13770 movb $0x0, -0x470(%rbp,%r15) movq %r13, %rdi xorl %esi, %esi callq 0x13350 movl (%r14), %eax testl %eax, %eax je 0x25a86 movl %eax, (%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x25aa7 addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x13500
my_atod: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 448h mov rbx, rdx mov r15, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax sub r15, rdi call ___errno_location mov r14, rax mov dword ptr [rax], 0 xor eax, eax cmp r15d, 436h setnl al mov [rbx], eax movsxd rax, r15d mov r15d, 435h cmovl r15, rax lea r13, [rbp+var_470] mov ecx, 436h mov rdi, r13 mov rsi, r12 mov rdx, r15 call ___memcpy_chk mov [rbp+r15+var_470], 0 mov rdi, r13 xor esi, esi call _strtod mov eax, [r14] test eax, eax jz short loc_25A86 mov [rbx], eax loc_25A86: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_25AA7 add rsp, 448h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_25AA7: call ___stack_chk_fail
unsigned long long my_atod(long long a1, int a2, _DWORD *a3) { _DWORD *v4; // r14 long long v5; // r15 _BYTE v7[1088]; // [rsp+0h] [rbp-470h] BYREF unsigned long long v8; // [rsp+440h] [rbp-30h] v8 = __readfsqword(0x28u); v4 = (_DWORD *)__errno_location(a1); *v4 = 0; *a3 = a2 - (int)a1 >= 1078; v5 = 1077LL; if ( a2 - (int)a1 < 1078 ) v5 = a2 - (int)a1; __memcpy_chk(v7, a1, v5, 1078LL); v7[v5] = 0; strtod(v7, 0LL); if ( *v4 ) *a3 = *v4; return __readfsqword(0x28u); }
my_atod: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x448 MOV RBX,RDX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX SUB R15,RDI CALL 0x00113060 MOV R14,RAX MOV dword ptr [RAX],0x0 XOR EAX,EAX CMP R15D,0x436 SETGE AL MOV dword ptr [RBX],EAX MOVSXD RAX,R15D MOV R15D,0x435 CMOVL R15,RAX LEA R13,[RBP + -0x470] MOV ECX,0x436 MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL 0x00113770 MOV byte ptr [RBP + R15*0x1 + -0x470],0x0 MOV RDI,R13 XOR ESI,ESI CALL 0x00113350 MOV EAX,dword ptr [R14] TEST EAX,EAX JZ 0x00125a86 MOV dword ptr [RBX],EAX LAB_00125a86: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00125aa7 ADD RSP,0x448 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00125aa7: CALL 0x00113500
void my_atod(int8 param_1,int param_2,uint *param_3) { uint *puVar1; long lVar2; long in_FS_OFFSET; char local_478 [1088]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 - (int)param_1; puVar1 = (uint *)__errno_location(); *puVar1 = 0; *param_3 = (uint)(0x435 < param_2); lVar2 = 0x435; if (param_2 < 0x436) { lVar2 = (long)param_2; } __memcpy_chk(local_478,param_1,lVar2,0x436); local_478[lVar2] = '\0'; strtod(local_478,(char **)0x0); if (*puVar1 != 0) { *param_3 = *puVar1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,492
js_atomics_wait
bluesky950520[P]quickjs/quickjs.c
static JSValue js_atomics_wait(JSContext *ctx, JSValue this_obj, int argc, JSValue *argv) { int64_t v; int32_t v32; void *ptr; int64_t timeout; JSAtomicsWaiter waiter_s, *waiter; int ret, size_log2, res; double d; ptr = js_atomics_get_ptr(ctx, NULL, &size_log2, NULL, argv[0], argv[1], 2); if (!ptr) return JS_EXCEPTION; if (size_log2 == 3) { if (JS_ToBigInt64(ctx, &v, argv[2])) return JS_EXCEPTION; } else { if (JS_ToInt32(ctx, &v32, argv[2])) return JS_EXCEPTION; v = v32; } if (JS_ToFloat64(ctx, &d, argv[3])) return JS_EXCEPTION; if (isnan(d) || d >= 0x1p63) timeout = INT64_MAX; else if (d < 0) timeout = 0; else timeout = (int64_t)d; if (!ctx->rt->can_block) return JS_ThrowTypeError(ctx, "cannot block in this thread"); /* XXX: inefficient if large number of waiters, should hash on 'ptr' value */ js_mutex_lock(&js_atomics_mutex); if (size_log2 == 3) { res = *(int64_t *)ptr != v; } else { res = *(int32_t *)ptr != v; } if (res) { js_mutex_unlock(&js_atomics_mutex); return JS_AtomToString(ctx, JS_ATOM_not_equal); } waiter = &waiter_s; waiter->ptr = ptr; js_cond_init(&waiter->cond); waiter->linked = TRUE; list_add_tail(&waiter->link, &js_atomics_waiter_list); if (timeout == INT64_MAX) { js_cond_wait(&waiter->cond, &js_atomics_mutex); ret = 0; } else { ret = js_cond_timedwait(&waiter->cond, &js_atomics_mutex, timeout * 1e6 /* to ns */); } if (waiter->linked) list_del(&waiter->link); js_mutex_unlock(&js_atomics_mutex); js_cond_destroy(&waiter->cond); if (ret == -1) { return JS_AtomToString(ctx, JS_ATOM_timed_out); } else { return JS_AtomToString(ctx, JS_ATOM_ok); } }
O0
c
js_atomics_wait: subq $0xe8, %rsp movq %rsi, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) movq %rdi, 0xc0(%rsp) movl %ecx, 0xbc(%rsp) movq %r8, 0xb0(%rsp) movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rcx movq 0xb0(%rsp), %rax addq $0x10, %rax movq (%rcx), %r8 movq 0x8(%rcx), %r9 xorl %ecx, %ecx leaq 0x30(%rsp), %rdx movq %rcx, %rsi movq (%rax), %r10 movq %r10, (%rsp) movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) movl $0x2, 0x10(%rsp) callq 0xe3500 movq %rax, 0x98(%rsp) cmpq $0x0, 0x98(%rsp) jne 0xe2ef7 movl $0x0, 0xd8(%rsp) movq $0x6, 0xe0(%rsp) jmp 0xe3261 cmpl $0x3, 0x30(%rsp) jne 0xe2f46 movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rax movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx leaq 0xa8(%rsp), %rsi callq 0x3f1a0 cmpl $0x0, %eax je 0xe2f44 movl $0x0, 0xd8(%rsp) movq $0x6, 0xe0(%rsp) jmp 0xe3261 jmp 0xe2f9c movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rax movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx leaq 0xa4(%rsp), %rsi callq 0x3f210 cmpl $0x0, %eax je 0xe2f8c movl $0x0, 0xd8(%rsp) movq $0x6, 0xe0(%rsp) jmp 0xe3261 movslq 0xa4(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rax movq 0x30(%rax), %rdx movq 0x38(%rax), %rcx leaq 0x20(%rsp), %rsi callq 0x3e870 cmpl $0x0, %eax je 0xe2fdf movl $0x0, 0xd8(%rsp) movq $0x6, 0xe0(%rsp) jmp 0xe3261 movsd 0x20(%rsp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0xe3004 movsd 0x20(%rsp), %xmm0 movsd 0x30a52(%rip), %xmm1 # 0x113a50 ucomisd %xmm1, %xmm0 jb 0xe3018 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x90(%rsp) jmp 0xe3042 xorps %xmm0, %xmm0 ucomisd 0x20(%rsp), %xmm0 jbe 0xe3031 movq $0x0, 0x90(%rsp) jmp 0xe3040 cvttsd2si 0x20(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0xe3042 movq 0xc0(%rsp), %rax movq 0x18(%rax), %rax movl 0x180(%rax), %eax shll $0x18, %eax sarl $0x18, %eax cmpl $0x0, %eax jne 0xe308a movq 0xc0(%rsp), %rdi leaq 0x34703(%rip), %rsi # 0x117771 movb $0x0, %al callq 0x335f0 movq %rax, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) jmp 0xe3261 leaq 0x5abb7(%rip), %rdi # 0x13dc48 callq 0x27220 cmpl $0x3, 0x30(%rsp) jne 0xe30be movq 0x98(%rsp), %rax movq (%rax), %rax cmpq 0xa8(%rsp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, 0x2c(%rsp) jmp 0xe30dd movq 0x98(%rsp), %rax movslq (%rax), %rax cmpq 0xa8(%rsp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, 0x2c(%rsp) cmpl $0x0, 0x2c(%rsp) je 0xe3117 leaq 0x5ab5d(%rip), %rdi # 0x13dc48 callq 0x27240 movq 0xc0(%rsp), %rdi movl $0x8e, %esi callq 0x2f2f0 movq %rax, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) jmp 0xe3261 leaq 0x40(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x98(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x48(%rax) movq 0x38(%rsp), %rdi addq $0x18, %rdi callq 0x27260 movq 0x38(%rsp), %rax movl $0x1, 0x10(%rax) movq 0x38(%rsp), %rdi leaq 0x5a470(%rip), %rsi # 0x13d5c8 callq 0x29d40 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, 0x90(%rsp) jne 0xe3190 movq 0x38(%rsp), %rdi addq $0x18, %rdi leaq 0x5aac7(%rip), %rsi # 0x13dc48 callq 0x27330 movl $0x0, 0x34(%rsp) jmp 0xe31e5 movq 0x38(%rsp), %rdi addq $0x18, %rdi cvtsi2sdq 0x90(%rsp), %xmm0 movsd 0x308dd(%rip), %xmm1 # 0x113a88 mulsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rdx movq %rdx, %rcx sarq $0x3f, %rcx movsd 0x3088a(%rip), %xmm1 # 0x113a50 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rax andq %rcx, %rax orq %rax, %rdx leaq 0x5aa6c(%rip), %rsi # 0x13dc48 callq 0x27360 movl %eax, 0x34(%rsp) movq 0x38(%rsp), %rax cmpl $0x0, 0x10(%rax) je 0xe31fa movq 0x38(%rsp), %rdi callq 0x29f20 leaq 0x5aa47(%rip), %rdi # 0x13dc48 callq 0x27240 movq 0x38(%rsp), %rdi addq $0x18, %rdi callq 0x272d0 cmpl $-0x1, 0x34(%rsp) jne 0xe323f movq 0xc0(%rsp), %rdi movl $0x8f, %esi callq 0x2f2f0 movq %rax, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) jmp 0xe3261 movq 0xc0(%rsp), %rdi movl $0x90, %esi callq 0x2f2f0 movq %rax, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xd8(%rsp), %rax movq 0xe0(%rsp), %rdx addq $0xe8, %rsp retq nopl (%rax)
js_atomics_wait: sub rsp, 0E8h mov [rsp+0E8h+var_20], rsi mov [rsp+0E8h+var_18], rdx mov [rsp+0E8h+var_28], rdi mov [rsp+0E8h+var_2C], ecx mov [rsp+0E8h+var_38], r8 mov rdi, [rsp+0E8h+var_28] mov rcx, [rsp+0E8h+var_38] mov rax, [rsp+0E8h+var_38] add rax, 10h mov r8, [rcx] mov r9, [rcx+8] xor ecx, ecx lea rdx, [rsp+0E8h+var_B8] mov rsi, rcx mov r10, [rax] mov [rsp+0E8h+var_E8], r10 mov rax, [rax+8] mov [rsp+0E8h+var_E0], rax mov [rsp+0E8h+var_D8], 2 call js_atomics_get_ptr mov [rsp+0E8h+var_50], rax cmp [rsp+0E8h+var_50], 0 jnz short loc_E2EF7 mov dword ptr [rsp+0E8h+var_10], 0 mov [rsp+0E8h+var_8], 6 jmp loc_E3261 loc_E2EF7: cmp [rsp+0E8h+var_B8], 3 jnz short loc_E2F46 mov rdi, [rsp+0E8h+var_28] mov rax, [rsp+0E8h+var_38] mov rdx, [rax+20h] mov rcx, [rax+28h] lea rsi, [rsp+0E8h+var_40] call JS_ToBigInt64 cmp eax, 0 jz short loc_E2F44 mov dword ptr [rsp+0E8h+var_10], 0 mov [rsp+0E8h+var_8], 6 jmp loc_E3261 loc_E2F44: jmp short loc_E2F9C loc_E2F46: mov rdi, [rsp+0E8h+var_28] mov rax, [rsp+0E8h+var_38] mov rdx, [rax+20h] mov rcx, [rax+28h] lea rsi, [rsp+0E8h+var_44] call JS_ToInt32 cmp eax, 0 jz short loc_E2F8C mov dword ptr [rsp+0E8h+var_10], 0 mov [rsp+0E8h+var_8], 6 jmp loc_E3261 loc_E2F8C: movsxd rax, [rsp+0E8h+var_44] mov [rsp+0E8h+var_40], rax loc_E2F9C: mov rdi, [rsp+0E8h+var_28] mov rax, [rsp+0E8h+var_38] mov rdx, [rax+30h] mov rcx, [rax+38h] lea rsi, [rsp+0E8h+var_C8] call JS_ToFloat64 cmp eax, 0 jz short loc_E2FDF mov dword ptr [rsp+0E8h+var_10], 0 mov [rsp+0E8h+var_8], 6 jmp loc_E3261 loc_E2FDF: movsd xmm0, [rsp+0E8h+var_C8] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_E3004 movsd xmm0, [rsp+0E8h+var_C8] movsd xmm1, cs:qword_113A50 ucomisd xmm0, xmm1 jb short loc_E3018 loc_E3004: mov rax, 7FFFFFFFFFFFFFFFh mov [rsp+0E8h+var_58], rax jmp short loc_E3042 loc_E3018: xorps xmm0, xmm0 ucomisd xmm0, [rsp+0E8h+var_C8] jbe short loc_E3031 mov [rsp+0E8h+var_58], 0 jmp short loc_E3040 loc_E3031: cvttsd2si rax, [rsp+0E8h+var_C8] mov [rsp+0E8h+var_58], rax loc_E3040: jmp short $+2 loc_E3042: mov rax, [rsp+0E8h+var_28] mov rax, [rax+18h] mov eax, [rax+180h] shl eax, 18h sar eax, 18h cmp eax, 0 jnz short loc_E308A mov rdi, [rsp+0E8h+var_28] lea rsi, aCannotBlockInT; "cannot block in this thread" mov al, 0 call JS_ThrowTypeError mov [rsp+0E8h+var_10], rax mov [rsp+0E8h+var_8], rdx jmp loc_E3261 loc_E308A: lea rdi, js_atomics_mutex call js_mutex_lock cmp [rsp+0E8h+var_B8], 3 jnz short loc_E30BE mov rax, [rsp+0E8h+var_50] mov rax, [rax] cmp rax, [rsp+0E8h+var_40] setnz al and al, 1 movzx eax, al mov [rsp+0E8h+var_BC], eax jmp short loc_E30DD loc_E30BE: mov rax, [rsp+0E8h+var_50] movsxd rax, dword ptr [rax] cmp rax, [rsp+0E8h+var_40] setnz al and al, 1 movzx eax, al mov [rsp+0E8h+var_BC], eax loc_E30DD: cmp [rsp+0E8h+var_BC], 0 jz short loc_E3117 lea rdi, js_atomics_mutex call js_mutex_unlock mov rdi, [rsp+0E8h+var_28] mov esi, 8Eh call JS_AtomToString mov [rsp+0E8h+var_10], rax mov [rsp+0E8h+var_8], rdx jmp loc_E3261 loc_E3117: lea rax, [rsp+0E8h+var_A8] mov [rsp+0E8h+var_B0], rax mov rcx, [rsp+0E8h+var_50] mov rax, [rsp+0E8h+var_B0] mov [rax+48h], rcx mov rdi, [rsp+0E8h+var_B0] add rdi, 18h call js_cond_init mov rax, [rsp+0E8h+var_B0] mov dword ptr [rax+10h], 1 mov rdi, [rsp+0E8h+var_B0] lea rsi, js_atomics_waiter_list call list_add_tail_1 mov rax, 7FFFFFFFFFFFFFFFh cmp [rsp+0E8h+var_58], rax jnz short loc_E3190 mov rdi, [rsp+0E8h+var_B0] add rdi, 18h lea rsi, js_atomics_mutex call js_cond_wait mov [rsp+0E8h+var_B4], 0 jmp short loc_E31E5 loc_E3190: mov rdi, [rsp+0E8h+var_B0] add rdi, 18h cvtsi2sd xmm0, [rsp+0E8h+var_58] movsd xmm1, cs:qword_113A88 mulsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rdx, xmm1 mov rcx, rdx sar rcx, 3Fh movsd xmm1, cs:qword_113A50 subsd xmm0, xmm1 cvttsd2si rax, xmm0 and rax, rcx or rdx, rax lea rsi, js_atomics_mutex call js_cond_timedwait mov [rsp+0E8h+var_B4], eax loc_E31E5: mov rax, [rsp+0E8h+var_B0] cmp dword ptr [rax+10h], 0 jz short loc_E31FA mov rdi, [rsp+0E8h+var_B0] call list_del_1 loc_E31FA: lea rdi, js_atomics_mutex call js_mutex_unlock mov rdi, [rsp+0E8h+var_B0] add rdi, 18h call js_cond_destroy cmp [rsp+0E8h+var_B4], 0FFFFFFFFh jnz short loc_E323F mov rdi, [rsp+0E8h+var_28] mov esi, 8Fh call JS_AtomToString mov [rsp+0E8h+var_10], rax mov [rsp+0E8h+var_8], rdx jmp short loc_E3261 loc_E323F: mov rdi, [rsp+0E8h+var_28] mov esi, 90h call JS_AtomToString mov [rsp+0E8h+var_10], rax mov [rsp+0E8h+var_8], rdx loc_E3261: mov rax, [rsp+0E8h+var_10] mov rdx, [rsp+0E8h+var_8] add rsp, 0E8h retn
long long js_atomics_wait( long long a1, long long a2, long long a3, int a4, _QWORD *a5, double a6, double a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 __m128 v19; // xmm0 long long v20; // rdx long long v21; // rdx long long v22; // rdx char v24; // [rsp+0h] [rbp-E8h] double v25; // [rsp+20h] [rbp-C8h] BYREF BOOL v26; // [rsp+2Ch] [rbp-BCh] int v27; // [rsp+30h] [rbp-B8h] BYREF int v28; // [rsp+34h] [rbp-B4h] char *v29; // [rsp+38h] [rbp-B0h] char v30; // [rsp+40h] [rbp-A8h] BYREF _QWORD v31[7]; // [rsp+58h] [rbp-90h] BYREF long long v32; // [rsp+90h] [rbp-58h] _QWORD *ptr; // [rsp+98h] [rbp-50h] int v34; // [rsp+A4h] [rbp-44h] BYREF long long v35; // [rsp+A8h] [rbp-40h] BYREF _QWORD *v36; // [rsp+B0h] [rbp-38h] int v37; // [rsp+BCh] [rbp-2Ch] long long v38; // [rsp+C0h] [rbp-28h] long long v39; // [rsp+C8h] [rbp-20h] long long v40; // [rsp+D0h] [rbp-18h] long long v41; // [rsp+D8h] [rbp-10h] long long v42; // [rsp+E0h] [rbp-8h] v39 = a2; v40 = a3; v38 = a1; v37 = a4; v36 = a5; ptr = (_QWORD *)js_atomics_get_ptr(a1, 0, (unsigned int)&v27, 0, *a5, a5[1], a5[2], a5[3], 2); if ( ptr ) { if ( v27 == 3 ) { if ( (unsigned int)JS_ToBigInt64(v38, (long long)&v35, (_DWORD *)v36[4], v36[5]) ) { LODWORD(v41) = 0; v42 = 6LL; return v41; } } else { if ( (unsigned int)JS_ToInt32(v38, (long long)&v34, (_DWORD *)v36[4], v36[5]) ) { LODWORD(v41) = 0; v42 = 6LL; return v41; } v35 = v34; } if ( (unsigned int)JS_ToFloat64(v38, (long long)&v25, (_DWORD *)v36[6], v36[7]) ) { LODWORD(v41) = 0; v42 = 6LL; } else { v19 = (__m128)*(unsigned long long *)&v25; if ( v25 < 9.223372036854776e18 ) { v19 = 0LL; if ( v25 >= 0.0 ) v32 = (unsigned int)(int)v25; else v32 = 0LL; } else { v32 = 0x7FFFFFFFFFFFFFFFLL; } if ( (unsigned __int8)*(_DWORD *)(*(_QWORD *)(v38 + 24) + 384LL) ) { js_mutex_lock((long long)&js_atomics_mutex); if ( v27 == 3 ) v26 = *ptr != v35; else v26 = *(_DWORD *)ptr != v35; if ( v26 ) { js_mutex_unlock((long long)&js_atomics_mutex); v41 = JS_AtomToString(v38, 0x8Eu); v42 = v21; } else { v29 = &v30; v31[6] = ptr; js_cond_init((long long)v31); *((_DWORD *)v29 + 4) = 1; list_add_tail_1((long long)v29, &js_atomics_waiter_list); if ( v32 == 0x7FFFFFFFFFFFFFFFLL ) { js_cond_wait((long long)(v29 + 24), (long long)&js_atomics_mutex); v28 = 0; } else { v28 = js_cond_timedwait( (long long)(v29 + 24), (long long)&js_atomics_mutex, (unsigned int)(int)((double)(int)v32 * 1000000.0)); } if ( *((_DWORD *)v29 + 4) ) list_del_1(v29); js_mutex_unlock((long long)&js_atomics_mutex); js_cond_destroy((long long)(v29 + 24)); if ( v28 == -1 ) v41 = JS_AtomToString(v38, 0x8Fu); else v41 = JS_AtomToString(v38, 0x90u); v42 = v22; } } else { v41 = JS_ThrowTypeError( v38, (long long)"cannot block in this thread", v13, v14, v15, v16, v19, (__m128)0x43E0000000000000uLL, a8, a9, v17, v18, a12, a13, v24); v42 = v20; } } } else { LODWORD(v41) = 0; v42 = 6LL; } return v41; }
js_atomics_wait: SUB RSP,0xe8 MOV qword ptr [RSP + 0xc8],RSI MOV qword ptr [RSP + 0xd0],RDX MOV qword ptr [RSP + 0xc0],RDI MOV dword ptr [RSP + 0xbc],ECX MOV qword ptr [RSP + 0xb0],R8 MOV RDI,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xb0] ADD RAX,0x10 MOV R8,qword ptr [RCX] MOV R9,qword ptr [RCX + 0x8] XOR ECX,ECX LEA RDX,[RSP + 0x30] MOV RSI,RCX MOV R10,qword ptr [RAX] MOV qword ptr [RSP],R10 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x10],0x2 CALL 0x001e3500 MOV qword ptr [RSP + 0x98],RAX CMP qword ptr [RSP + 0x98],0x0 JNZ 0x001e2ef7 MOV dword ptr [RSP + 0xd8],0x0 MOV qword ptr [RSP + 0xe0],0x6 JMP 0x001e3261 LAB_001e2ef7: CMP dword ptr [RSP + 0x30],0x3 JNZ 0x001e2f46 MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0xa8] CALL 0x0013f1a0 CMP EAX,0x0 JZ 0x001e2f44 MOV dword ptr [RSP + 0xd8],0x0 MOV qword ptr [RSP + 0xe0],0x6 JMP 0x001e3261 LAB_001e2f44: JMP 0x001e2f9c LAB_001e2f46: MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0xa4] CALL 0x0013f210 CMP EAX,0x0 JZ 0x001e2f8c MOV dword ptr [RSP + 0xd8],0x0 MOV qword ptr [RSP + 0xe0],0x6 JMP 0x001e3261 LAB_001e2f8c: MOVSXD RAX,dword ptr [RSP + 0xa4] MOV qword ptr [RSP + 0xa8],RAX LAB_001e2f9c: MOV RDI,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RAX + 0x38] LEA RSI,[RSP + 0x20] CALL 0x0013e870 CMP EAX,0x0 JZ 0x001e2fdf MOV dword ptr [RSP + 0xd8],0x0 MOV qword ptr [RSP + 0xe0],0x6 JMP 0x001e3261 LAB_001e2fdf: MOVSD XMM0,qword ptr [RSP + 0x20] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x001e3004 MOVSD XMM0,qword ptr [RSP + 0x20] MOVSD XMM1,qword ptr [0x00213a50] UCOMISD XMM0,XMM1 JC 0x001e3018 LAB_001e3004: MOV RAX,0x7fffffffffffffff MOV qword ptr [RSP + 0x90],RAX JMP 0x001e3042 LAB_001e3018: XORPS XMM0,XMM0 UCOMISD XMM0,qword ptr [RSP + 0x20] JBE 0x001e3031 MOV qword ptr [RSP + 0x90],0x0 JMP 0x001e3040 LAB_001e3031: CVTTSD2SI RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x90],RAX LAB_001e3040: JMP 0x001e3042 LAB_001e3042: MOV RAX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RAX + 0x180] SHL EAX,0x18 SAR EAX,0x18 CMP EAX,0x0 JNZ 0x001e308a MOV RDI,qword ptr [RSP + 0xc0] LEA RSI,[0x217771] MOV AL,0x0 CALL 0x001335f0 MOV qword ptr [RSP + 0xd8],RAX MOV qword ptr [RSP + 0xe0],RDX JMP 0x001e3261 LAB_001e308a: LEA RDI,[0x23dc48] CALL 0x00127220 CMP dword ptr [RSP + 0x30],0x3 JNZ 0x001e30be MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RSP + 0xa8] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x2c],EAX JMP 0x001e30dd LAB_001e30be: MOV RAX,qword ptr [RSP + 0x98] MOVSXD RAX,dword ptr [RAX] CMP RAX,qword ptr [RSP + 0xa8] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x2c],EAX LAB_001e30dd: CMP dword ptr [RSP + 0x2c],0x0 JZ 0x001e3117 LEA RDI,[0x23dc48] CALL 0x00127240 MOV RDI,qword ptr [RSP + 0xc0] MOV ESI,0x8e CALL 0x0012f2f0 MOV qword ptr [RSP + 0xd8],RAX MOV qword ptr [RSP + 0xe0],RDX JMP 0x001e3261 LAB_001e3117: LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV RCX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 CALL 0x00127260 MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x10],0x1 MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[0x23d5c8] CALL 0x00129d40 MOV RAX,0x7fffffffffffffff CMP qword ptr [RSP + 0x90],RAX JNZ 0x001e3190 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 LEA RSI,[0x23dc48] CALL 0x00127330 MOV dword ptr [RSP + 0x34],0x0 JMP 0x001e31e5 LAB_001e3190: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 CVTSI2SD XMM0,qword ptr [RSP + 0x90] MOVSD XMM1,qword ptr [0x00213a88] MULSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RDX,XMM1 MOV RCX,RDX SAR RCX,0x3f MOVSD XMM1,qword ptr [0x00213a50] SUBSD XMM0,XMM1 CVTTSD2SI RAX,XMM0 AND RAX,RCX OR RDX,RAX LEA RSI,[0x23dc48] CALL 0x00127360 MOV dword ptr [RSP + 0x34],EAX LAB_001e31e5: MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX + 0x10],0x0 JZ 0x001e31fa MOV RDI,qword ptr [RSP + 0x38] CALL 0x00129f20 LAB_001e31fa: LEA RDI,[0x23dc48] CALL 0x00127240 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 CALL 0x001272d0 CMP dword ptr [RSP + 0x34],-0x1 JNZ 0x001e323f MOV RDI,qword ptr [RSP + 0xc0] MOV ESI,0x8f CALL 0x0012f2f0 MOV qword ptr [RSP + 0xd8],RAX MOV qword ptr [RSP + 0xe0],RDX JMP 0x001e3261 LAB_001e323f: MOV RDI,qword ptr [RSP + 0xc0] MOV ESI,0x90 CALL 0x0012f2f0 MOV qword ptr [RSP + 0xd8],RAX MOV qword ptr [RSP + 0xe0],RDX LAB_001e3261: MOV RAX,qword ptr [RSP + 0xd8] MOV RDX,qword ptr [RSP + 0xe0] ADD RSP,0xe8 RET
int1 [16] js_atomics_wait(long param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int iVar1; long lVar2; ulong uVar3; int1 auVar4 [16]; double local_c8; uint local_bc; int local_b8; int local_b4; int1 *local_b0; int1 local_a8 [24]; int1 auStack_90 [48]; long *local_60; long local_58; long *local_50; int local_44; long local_40; int8 *local_38; int4 local_2c; long local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_50 = (long *)js_atomics_get_ptr(param_1,0,&local_b8,0,*param_5,param_5[1],param_5[2], param_5[3],2); if (local_50 == (long *)0x0) { local_10 = 0; local_8 = 6; } else { if (local_b8 == 3) { iVar1 = JS_ToBigInt64(local_28,&local_40,local_38[4],local_38[5]); if (iVar1 != 0) { local_10 = 0; local_8 = 6; goto LAB_001e3261; } } else { iVar1 = JS_ToInt32(local_28,&local_44,local_38[4],local_38[5]); if (iVar1 != 0) { local_10 = 0; local_8 = 6; goto LAB_001e3261; } local_40 = (long)local_44; } iVar1 = JS_ToFloat64(local_28,&local_c8,local_38[6],local_38[7]); if (iVar1 == 0) { if (DAT_00213a50 <= local_c8) { local_58 = 0x7fffffffffffffff; } else if (0.0 <= local_c8) { local_58 = (long)local_c8; } else { local_58 = 0; } if ((char)*(int4 *)(*(long *)(local_28 + 0x18) + 0x180) == '\0') { auVar4 = JS_ThrowTypeError(local_28,"cannot block in this thread"); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } else { js_mutex_lock(js_atomics_mutex); if (local_b8 == 3) { lVar2 = *local_50; } else { lVar2 = (long)(int)*local_50; } local_bc = (uint)(lVar2 != local_40); if (local_bc == 0) { local_b0 = local_a8; local_60 = local_50; js_cond_init(auStack_90); *(int4 *)(local_b0 + 0x10) = 1; list_add_tail(local_b0,js_atomics_waiter_list); if (local_58 == 0x7fffffffffffffff) { js_cond_wait(local_b0 + 0x18,js_atomics_mutex); local_b4 = 0; } else { uVar3 = (ulong)((double)local_58 * DAT_00213a88); local_b4 = js_cond_timedwait(local_b0 + 0x18,js_atomics_mutex, uVar3 | (long)((double)local_58 * DAT_00213a88 - DAT_00213a50) & (long)uVar3 >> 0x3f); } if (*(int *)(local_b0 + 0x10) != 0) { list_del(local_b0); } js_mutex_unlock(js_atomics_mutex); js_cond_destroy(local_b0 + 0x18); if (local_b4 == -1) { auVar4 = JS_AtomToString(local_28,0x8f); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } else { auVar4 = JS_AtomToString(local_28,0x90); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } } else { js_mutex_unlock(js_atomics_mutex); auVar4 = JS_AtomToString(local_28,0x8e); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } } } else { local_10 = 0; local_8 = 6; } } LAB_001e3261: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
50,493
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O0
cpp
set_process_priority(ggml_sched_priority): subq $0x38, %rsp movl %edi, 0x30(%rsp) cmpl $0x0, 0x30(%rsp) jne 0xeed29 movb $0x1, 0x37(%rsp) jmp 0xeedf6 movl $0x0, 0x2c(%rsp) movl 0x30(%rsp), %eax movq %rax, 0x20(%rsp) subq $0x3, %rax ja 0xeed7b movq 0x20(%rsp), %rax leaq 0x129ce4(%rip), %rcx # 0x218a30 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x0, 0x2c(%rsp) jmp 0xeed7b movl $0xfffffffb, 0x2c(%rsp) # imm = 0xFFFFFFFB jmp 0xeed7b movl $0xfffffff6, 0x2c(%rsp) # imm = 0xFFFFFFF6 jmp 0xeed7b movl $0xffffffec, 0x2c(%rsp) # imm = 0xFFFFFFEC movl 0x2c(%rsp), %edx xorl %esi, %esi movl %esi, %edi callq 0x5d9c0 cmpl $0x0, %eax jne 0xeedf1 jmp 0xeed8f xorl %eax, %eax leaq 0x1c1870(%rip), %rcx # 0x2b0608 cmpl (%rcx), %eax jg 0xeede8 callq 0x1c1890 movq %rax, 0x8(%rsp) movl 0x30(%rsp), %eax movl %eax, 0x14(%rsp) callq 0x5e170 movl (%rax), %edi callq 0x5ddb0 movq %rax, 0x18(%rsp) callq 0x5e170 movq 0x8(%rsp), %rdi movl 0x14(%rsp), %ecx movq 0x18(%rsp), %r8 movl (%rax), %r9d movl $0x3, %esi leaq 0x12a539(%rip), %rdx # 0x21931a movb $0x0, %al callq 0x1c1980 jmp 0xeedea movb $0x0, 0x37(%rsp) jmp 0xeedf6 movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
_Z20set_process_priority19ggml_sched_priority: sub rsp, 38h mov [rsp+38h+var_8], edi cmp [rsp+38h+var_8], 0 jnz short loc_EED29 mov [rsp+38h+var_1], 1 jmp loc_EEDF6 loc_EED29: mov [rsp+38h+var_C], 0 mov eax, [rsp+38h+var_8] mov [rsp+38h+var_18], rax sub rax, 3; switch 4 cases ja short def_EED53; jumptable 00000000000EED53 default case mov rax, [rsp+38h+var_18] lea rcx, jpt_EED53 movsxd rax, ds:(jpt_EED53 - 218A30h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_EED55: mov [rsp+38h+var_C], 0; jumptable 00000000000EED53 case 0 jmp short def_EED53; jumptable 00000000000EED53 default case loc_EED5F: mov [rsp+38h+var_C], 0FFFFFFFBh; jumptable 00000000000EED53 case 1 jmp short def_EED53; jumptable 00000000000EED53 default case loc_EED69: mov [rsp+38h+var_C], 0FFFFFFF6h; jumptable 00000000000EED53 case 2 jmp short def_EED53; jumptable 00000000000EED53 default case loc_EED73: mov [rsp+38h+var_C], 0FFFFFFECh; jumptable 00000000000EED53 case 3 def_EED53: mov edx, [rsp+38h+var_C]; jumptable 00000000000EED53 default case xor esi, esi mov edi, esi call _setpriority cmp eax, 0 jnz short loc_EEDF1 jmp short $+2 loc_EED8F: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EEDE8 call _Z15common_log_mainv; common_log_main(void) mov [rsp+38h+var_30], rax mov eax, [rsp+38h+var_8] mov [rsp+38h+var_24], eax call ___errno_location mov edi, [rax] call _strerror mov [rsp+38h+var_20], rax call ___errno_location mov rdi, [rsp+38h+var_30] mov ecx, [rsp+38h+var_24] mov r8, [rsp+38h+var_20] mov r9d, [rax] mov esi, 3 lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EEDE8: jmp short $+2 loc_EEDEA: mov [rsp+38h+var_1], 0 jmp short loc_EEDF6 loc_EEDF1: mov [rsp+38h+var_1], 1 loc_EEDF6: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
char set_process_priority(int a1) { unsigned int *v1; // rax _DWORD *v2; // rax int v4; // [rsp+8h] [rbp-30h] int v5; // [rsp+18h] [rbp-20h] unsigned int v6; // [rsp+2Ch] [rbp-Ch] if ( !a1 ) return 1; v6 = 0; switch ( a1 ) { case 0: v6 = 0; break; case 1: v6 = -5; break; case 2: v6 = -10; break; case 3: v6 = -20; break; default: break; } if ( (unsigned int)setpriority(0LL, 0LL, v6) ) return 1; if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); v1 = (unsigned int *)__errno_location(); v5 = strerror(*v1); v2 = (_DWORD *)__errno_location(); common_log_add(v4, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v5, *v2); } return 0; }
set_process_priority: SUB RSP,0x38 MOV dword ptr [RSP + 0x30],EDI CMP dword ptr [RSP + 0x30],0x0 JNZ 0x001eed29 MOV byte ptr [RSP + 0x37],0x1 JMP 0x001eedf6 LAB_001eed29: MOV dword ptr [RSP + 0x2c],0x0 MOV EAX,dword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX SUB RAX,0x3 JA 0x001eed7b MOV RAX,qword ptr [RSP + 0x20] LEA RCX,[0x318a30] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV dword ptr [RSP + 0x2c],0xfffffffb JMP 0x001eed7b caseD_2: MOV dword ptr [RSP + 0x2c],0xfffffff6 JMP 0x001eed7b caseD_3: MOV dword ptr [RSP + 0x2c],0xffffffec default: MOV EDX,dword ptr [RSP + 0x2c] XOR ESI,ESI MOV EDI,ESI CALL 0x0015d9c0 CMP EAX,0x0 JNZ 0x001eedf1 JMP 0x001eed8f LAB_001eed8f: XOR EAX,EAX LEA RCX,[0x3b0608] CMP EAX,dword ptr [RCX] JG 0x001eede8 CALL 0x002c1890 MOV qword ptr [RSP + 0x8],RAX MOV EAX,dword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x14],EAX CALL 0x0015e170 MOV EDI,dword ptr [RAX] CALL 0x0015ddb0 MOV qword ptr [RSP + 0x18],RAX CALL 0x0015e170 MOV RDI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x14] MOV R8,qword ptr [RSP + 0x18] MOV R9D,dword ptr [RAX] MOV ESI,0x3 LEA RDX,[0x31931a] MOV AL,0x0 CALL 0x002c1980 LAB_001eede8: JMP 0x001eedea LAB_001eedea: MOV byte ptr [RSP + 0x37],0x0 JMP 0x001eedf6 LAB_001eedf1: MOV byte ptr [RSP + 0x37],0x1 LAB_001eedf6: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* set_process_priority(ggml_sched_priority) */ int1 set_process_priority(int param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int local_c; int1 local_1; if (param_1 == 0) { local_1 = 1; } else { local_c = 0; switch(param_1) { case 1: local_c = -5; break; case 2: local_c = -10; break; case 3: local_c = -0x14; } iVar1 = setpriority(PRIO_PROCESS,0,local_c); if (iVar1 == 0) { if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); piVar3 = __errno_location(); common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4, *piVar3); } local_1 = 0; } else { local_1 = 1; } } return local_1; }
50,494
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13])
llama.cpp/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb69fb movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb69e5 movq %rbx, %rdi movq %r15, %rsi callq 0x20f60 testl %eax, %eax je 0xb69da addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xb69bb jmp 0xb69dd movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xb6a59 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x8aa3c movq %rsp, %rdx movq %rax, (%rdx) leaq 0x64bbb(%rip), %rsi # 0x11b5d8 leaq 0x20(%rsp), %rdi callq 0x8000b movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8a864 xorl %ebp, %ebp leaq 0xaa5f8(%rip), %rsi # 0x161040 leaq -0x400f1(%rip), %rdx # 0x7695e movq %rbx, %rdi callq 0x20a50 jmp 0xb6ad2 movl $0x20, %edi callq 0x20650 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x20680 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x28ab0 leaq 0x64b60(%rip), %rsi # 0x11b5ee leaq 0x64b5f(%rip), %rcx # 0x11b5f4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x80093 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x88fc8 xorl %ebp, %ebp leaq 0xaa4fd(%rip), %rsi # 0x160fc0 leaq -0x4016c(%rip), %rdx # 0x7695e movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb6af0 movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb6b3b movq 0x10(%rsp), %rsi jmp 0xb6b33 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb6b45 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xb6b45 jmp 0xb6b42 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb6b3b movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xb6b45 jmp 0xb6b4d movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20af0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; void * push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B69FB mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_B69E5 loc_B69BB: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B69DA add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_B69BB jmp short loc_B69DD loc_B69DA: mov rax, rbx loc_B69DD: mov rcx, [r14+8] mov rbx, [rcx+8] loc_B69E5: cmp rax, rbx jz short loc_B6A59 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B69FB: 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) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; 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 jmp short loc_B6AD2 loc_B6A59: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 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 rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B6AD2: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B6AF0 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B6AF0: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_B6B3B mov rsi, [rsp+68h+var_58] jmp short loc_B6B33 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_B6B45 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B6B45 jmp short loc_B6B42 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B6B3B mov rsi, [rsp+68h+var_38] loc_B6B33: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B6B3B: test bpl, bpl jnz short loc_B6B45 jmp short loc_B6B4D loc_B6B42: mov r14, rax loc_B6B45: mov rdi, rbx; void * call ___cxa_free_exception loc_B6B4D: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = (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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v11, (long long)"cannot use at() with ", v9); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v11); __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); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v11, (long long)"key '", v9, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b69fb MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b69e5 LAB_001b69bb: MOV RDI,RBX MOV RSI,R15 CALL 0x00120f60 TEST EAX,EAX JZ 0x001b69da ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001b69bb JMP 0x001b69dd LAB_001b69da: MOV RAX,RBX LAB_001b69dd: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001b69e5: CMP RAX,RBX JZ 0x001b6a59 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b69fb: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0018aa3c MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001b6a16: LEA RSI,[0x21b5d8] LEA RDI,[RSP + 0x20] CALL 0x0018000b MOV BPL,0x1 LAB_001b6a2a: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018a864 XOR EBP,EBP LEA RSI,[0x261040] LEA RDX,[0x17695e] MOV RDI,RBX CALL 0x00120a50 LAB_001b6a59: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00120680 LEA RDX,[RAX + R15*0x1] LAB_001b6a7c: MOV RDI,RSP MOV RSI,R15 CALL 0x00128ab0 LAB_001b6a87: LEA RSI,[0x21b5ee] LEA RCX,[0x21b5f4] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00180093 MOV BPL,0x1 LAB_001b6aa5: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00188fc8 XOR EBP,EBP LEA RSI,[0x260fc0] LEA RDX,[0x17695e] MOV RDI,RBX CALL 0x00120a50
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)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> ::type_name(param_1); /* try { // try from 001b6a16 to 001b6a26 has its CatchHandler @ 001b6b42 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001b6a2a to 001b6a56 has its CatchHandler @ 001b6b1d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001b6a7c to 001b6a86 has its CatchHandler @ 001b6b1b */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001b6a87 to 001b6aa1 has its CatchHandler @ 001b6b00 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001b6aa5 to 001b6ad1 has its CatchHandler @ 001b6ad2 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
50,495
my_strxfrm_pad_desc_and_reverse_nopad
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); memset(frmend, 0x00, fill_length); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; memset(frmend, 0x00, fill_length); frmend= strend; } return frmend - str; }
O0
c
my_strxfrm_pad_desc_and_reverse_nopad: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) cmpl $0x0, -0x24(%rbp) je 0x79ba2 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x79ba2 movl -0x28(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x79ba2 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl -0x24(%rbp), %ecx movq -0x8(%rbp), %rdx imull 0x98(%rdx), %ecx cmpl %ecx, %eax jae 0x79b6b movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl %eax, -0x3c(%rbp) jmp 0x79b7c movl -0x24(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x98(%rcx), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x261c0 movl -0x2c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x28(%rbp), %edx movl 0x10(%rbp), %ecx callq 0x7cda0 movl -0x28(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x79bf2 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x79bf2 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rdx xorl %esi, %esi callq 0x261c0 movq -0x20(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strxfrm_pad_desc_and_reverse_nopad: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d cmp [rbp+var_24], 0 jz short loc_79BA2 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_79BA2 mov eax, [rbp+var_28] and eax, 40h cmp eax, 0 jz short loc_79BA2 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov ecx, [rbp+var_24] mov rdx, [rbp+var_8] imul ecx, [rdx+98h] cmp eax, ecx jnb short loc_79B6B mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov [rbp+var_3C], eax jmp short loc_79B7C loc_79B6B: mov eax, [rbp+var_24] mov rcx, [rbp+var_8] imul eax, [rcx+98h] mov [rbp+var_3C], eax loc_79B7C: mov eax, [rbp+var_3C] mov [rbp+var_2C], eax mov rdi, [rbp+var_18] mov eax, [rbp+var_2C] mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_2C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax loc_79BA2: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_28] mov ecx, [rbp+arg_0] call my_strxfrm_desc_and_reverse mov eax, [rbp+var_28] and eax, 80h cmp eax, 0 jz short loc_79BF2 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_79BF2 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov [rbp+var_38], rax mov rdi, [rbp+var_18] mov rdx, [rbp+var_38] xor esi, esi call _memset mov rax, [rbp+var_20] mov [rbp+var_18], rax loc_79BF2: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx add rsp, 40h pop rbp retn
long long my_strxfrm_pad_desc_and_reverse_nopad( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned int v8; // [rsp+4h] [rbp-3Ch] unsigned long long v11; // [rsp+28h] [rbp-18h] v11 = a3; if ( a5 && a3 < a4 && (a6 & 0x40) != 0 ) { if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) ) v8 = *(_DWORD *)(a1 + 152) * a5; else v8 = a4 - a3; memset(a3, 0LL, v8); v11 += v8; } my_strxfrm_desc_and_reverse(a2, v11, a6, a7); if ( (a6 & 0x80) != 0 && v11 < a4 ) { memset(v11, 0LL, a4 - v11); v11 = a4; } return v11 - a2; }
my_strxfrm_pad_desc_and_reverse_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D CMP dword ptr [RBP + -0x24],0x0 JZ 0x00179ba2 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00179ba2 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x40 CMP EAX,0x0 JZ 0x00179ba2 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV ECX,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x8] IMUL ECX,dword ptr [RDX + 0x98] CMP EAX,ECX JNC 0x00179b6b MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV dword ptr [RBP + -0x3c],EAX JMP 0x00179b7c LAB_00179b6b: MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x98] MOV dword ptr [RBP + -0x3c],EAX LAB_00179b7c: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX XOR ESI,ESI CALL 0x001261c0 MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_00179ba2: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + 0x10] CALL 0x0017cda0 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x80 CMP EAX,0x0 JZ 0x00179bf2 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00179bf2 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] XOR ESI,ESI CALL 0x001261c0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX LAB_00179bf2: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_strxfrm_pad_desc_and_reverse_nopad (long param_1,long param_2,void *param_3,void *param_4,int param_5,uint param_6, int4 param_7) { int4 local_44; int8 local_20; local_20 = param_3; if (((param_5 != 0) && (param_3 < param_4)) && ((param_6 & 0x40) != 0)) { if ((uint)((int)param_4 - (int)param_3) < (uint)(param_5 * *(int *)(param_1 + 0x98))) { local_44 = (int)param_4 - (int)param_3; } else { local_44 = param_5 * *(int *)(param_1 + 0x98); } memset(param_3,0,(ulong)local_44); local_20 = (void *)((long)param_3 + (ulong)local_44); } my_strxfrm_desc_and_reverse(param_2,local_20,param_6,param_7); if (((param_6 & 0x80) != 0) && (local_20 < param_4)) { memset(local_20,0,(long)param_4 - (long)local_20); local_20 = param_4; } return (long)local_20 - param_2; }
50,496
SchemaConverter::SchemaConverter(std::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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
SchemaConverter( const std::function<json(const std::string &)> & fetch_json, bool dotall, bool compact_spaces) : _fetch_json(fetch_json), _dotall(dotall) { _rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE; }
O1
cpp
SchemaConverter::SchemaConverter(std::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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx callq 0x37154 movb %r14b, 0x20(%rbx) leaq 0x28(%rbx), %r14 leaq 0x30(%rbx), %rax movl $0x0, 0x30(%rbx) xorl %ecx, %ecx movq %rcx, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rcx, 0x50(%rbx) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movl $0x1, %eax movq %rax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x78(%rbx) movups %xmm0, 0x80(%rbx) leaq 0xc0(%rbx), %rdx movq %rdx, 0x90(%rbx) movq %rax, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movl %ecx, 0xb0(%rbx) movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xe8(%rbx) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) testl %ebp, %ebp je 0x369b4 leaq 0x83a8c(%rip), %rsi # 0xba42d leaq 0x83a89(%rip), %rdx # 0xba431 leaq 0x8(%rsp), %rdi callq 0x32ea4 jmp 0x369cf movq 0xb918d(%rip), %rsi # 0xefb48 movq 0xb918e(%rip), %rdx # 0xefb50 addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x2887a leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x8462d(%rip), %rsi # 0xbb00c leaq 0x8462b(%rip), %rdx # 0xbb011 leaq 0x28(%rsp), %rdi callq 0x32ea4 leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x371b2 leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x193d0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x36a21 movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x36a38 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0x36a6b movq %rax, %r15 jmp 0x36a82 movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x36a6b movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x36a82 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 leaq 0xc8(%rbx), %rbp leaq 0xe0(%rbx), %rdi callq 0x28150 movq %rbp, %rdi callq 0x28150 movq %r13, %rdi callq 0x375c0 movq %r12, %rdi callq 0x3765e movq %r14, %rdi callq 0x37740 movq 0x10(%rbx), %rax testq %rax, %rax je 0x36ad6 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x19be0 movq %rax, %rdi callq 0x28537
_ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14d, edx mov rbx, rdi call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<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::string const&)>::function(std::function<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::string const&)> const&) mov [rbx+20h], r14b lea r14, [rbx+28h] lea rax, [rbx+30h] mov dword ptr [rbx+30h], 0 xor ecx, ecx mov [rbx+38h], rcx mov [rbx+40h], rax mov [rbx+48h], rax mov [rbx+50h], rcx lea rax, [rbx+88h] mov [rbx+58h], rax mov eax, 1 mov [rbx+60h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov ecx, 3F800000h mov [rbx+78h], ecx movups xmmword ptr [rbx+80h], xmm0 lea rdx, [rbx+0C0h] mov [rbx+90h], rdx mov [rbx+98h], rax movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], ecx movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0E8h], xmm0 lea r12, [rsp+78h+var_60] mov [r12-10h], r12 test ebp, ebp jz short loc_369B4 lea rsi, asc_BA42D; "\" \"?" lea rdx, asc_BA42D+4; "" lea rdi, [rsp+78h+var_70] 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) jmp short loc_369CF loc_369B4: mov rsi, cs:_ZL10SPACE_RULEB5cxx11; SPACE_RULE mov rdx, cs:qword_EFB50 add rdx, rsi lea rdi, [rsp+78h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) loc_369CF: lea r13, [rsp+78h+var_40] mov [r13-10h], r13 lea rsi, aSpace+7; "space" lea rdx, aSpace+0Ch; "" lea rdi, [rsp+78h+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 rsi, [rsp+78h+var_50] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_70] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_36A21 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_36A21: mov rdi, [rsp+78h+var_70]; void * cmp rdi, r12 jz short loc_36A38 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_36A38: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_36A6B mov r15, rax jmp short loc_36A82 mov r15, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_36A6B mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_36A6B: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_36A82 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_36A82: lea r12, [rbx+58h] lea r13, [rbx+90h] lea rbp, [rbx+0C8h] lea rdi, [rbx+0E0h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, r12 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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>>::~_Hashtable() mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [rbx+10h] test rax, rax jz short loc_36AD6 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_36AD6: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void SchemaConverter::SchemaConverter(long long a1, int a2, char a3, int a4) { long long v6; // rax void *v7[2]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-60h] BYREF void *v9[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+38h] [rbp-40h] BYREF std::function<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::string const&)>::function(); *(_BYTE *)(a1 + 32) = a3; *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = 0LL; *(_QWORD *)(a1 + 64) = a1 + 48; *(_QWORD *)(a1 + 72) = a1 + 48; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 192; *(_QWORD *)(a1 + 152) = 1LL; *(_OWORD *)(a1 + 160) = 0LL; *(_DWORD *)(a1 + 176) = 1065353216; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 232) = 0LL; v7[0] = v8; if ( a4 ) std::string::_M_construct<char const*>(v7, "\" \"?", (long long)""); else std::string::_M_construct<char *>(v7, (_BYTE *)SPACE_RULE[abi:cxx11], SPACE_RULE[abi:cxx11] + qword_EFB50); v9[0] = v10; std::string::_M_construct<char const*>(v9, "space", (long long)""); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v9); std::string::_M_assign(v6, v7); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); }
SchemaConverter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI CALL 0x00137154 MOV byte ptr [RBX + 0x20],R14B LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x30] MOV dword ptr [RBX + 0x30],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x38],RCX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RCX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV EAX,0x1 MOV qword ptr [RBX + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RBX + 0x78],ECX MOVUPS xmmword ptr [RBX + 0x80],XMM0 LEA RDX,[RBX + 0xc0] MOV qword ptr [RBX + 0x90],RDX MOV qword ptr [RBX + 0x98],RAX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV dword ptr [RBX + 0xb0],ECX MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xe8],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 TEST EBP,EBP JZ 0x001369b4 LAB_0013699a: LEA RSI,[0x1ba42d] LEA RDX,[0x1ba431] LEA RDI,[RSP + 0x8] CALL 0x00132ea4 JMP 0x001369cf LAB_001369b4: MOV RSI,qword ptr [0x001efb48] MOV RDX,qword ptr [0x001efb50] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x0012887a LAB_001369cf: LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_001369d8: LEA RSI,[0x1bb00c] LEA RDX,[0x1bb011] LEA RDI,[RSP + 0x28] CALL 0x00132ea4 LAB_001369f0: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x001371b2 LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x001193d0 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00136a21 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001196b0 LAB_00136a21: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00136a38 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_00136a38: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::SchemaConverter(std::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> (std::__cxx11::string const&)> const&, bool, bool) */ void __thiscall SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3) { string *psVar1; int7 in_register_00000009; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; std:: 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>(std::__cxx11::string_const&)> ::function((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>(std::__cxx11::string_const&)> *)this,param_1); this[0x20] = (SchemaConverter)param_2; *(int4 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(SchemaConverter **)(this + 0x40) = this + 0x30; *(SchemaConverter **)(this + 0x48) = this + 0x30; *(int8 *)(this + 0x50) = 0; *(SchemaConverter **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(SchemaConverter **)(this + 0x90) = this + 0xc0; *(int8 *)(this + 0x98) = 1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0x3f800000; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; local_70[0] = local_60; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::_M_construct<char*> (local_70,SPACE_RULE_abi_cxx11_,DAT_001efb50 + SPACE_RULE_abi_cxx11_); } else { /* try { // try from 0013699a to 001369ce has its CatchHandler @ 00136a4c */ std::__cxx11::string::_M_construct<char_const*>(local_70,&DAT_001ba42d,&DAT_001ba431); } /* try { // try from 001369d8 to 001369ef has its CatchHandler @ 00136a47 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"space",""); /* try { // try from 001369f0 to 00136a09 has its CatchHandler @ 00136a51 */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x28),(string *)local_50); std::__cxx11::string::_M_assign(psVar1); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } return; }
50,497
SchemaConverter::SchemaConverter(std::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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
SchemaConverter( const std::function<json(const std::string &)> & fetch_json, bool dotall, bool compact_spaces) : _fetch_json(fetch_json), _dotall(dotall) { _rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE; }
O3
cpp
SchemaConverter::SchemaConverter(std::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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx callq 0x363f4 movb %r14b, 0x20(%rbx) leaq 0x28(%rbx), %r14 leaq 0x30(%rbx), %rax movl $0x0, 0x30(%rbx) xorl %ecx, %ecx movq %rcx, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rcx, 0x50(%rbx) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movl $0x1, %eax movq %rax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x78(%rbx) movups %xmm0, 0x80(%rbx) leaq 0xc0(%rbx), %rdx movq %rdx, 0x90(%rbx) movq %rax, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movl %ecx, 0xb0(%rbx) movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xe8(%rbx) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) testl %ebp, %ebp je 0x35c42 leaq 0x817fe(%rip), %rsi # 0xb742d leaq 0x817fb(%rip), %rdx # 0xb7431 leaq 0x8(%rsp), %rdi callq 0x320e8 jmp 0x35c5d movq 0xb6eff(%rip), %rsi # 0xecb48 movq 0xb6f00(%rip), %rdx # 0xecb50 addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x27d52 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x8239f(%rip), %rsi # 0xb800c leaq 0x8239d(%rip), %rdx # 0xb8011 leaq 0x28(%rsp), %rdi callq 0x320e8 leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x36452 leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x193d0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x35caf movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x35cc6 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0x35cf9 movq %rax, %r15 jmp 0x35d10 movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x35cf9 movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x35d10 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 leaq 0xc8(%rbx), %rbp leaq 0xe0(%rbx), %rdi callq 0x275ec movq %rbp, %rdi callq 0x275ec movq %r13, %rdi callq 0x36860 movq %r12, %rdi callq 0x368fe movq %r14, %rdi callq 0x369e0 movq 0x10(%rbx), %rax testq %rax, %rax je 0x35d64 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x19be0 movq %rax, %rdi callq 0x27a01
_ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14d, edx mov rbx, rdi call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<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::string const&)>::function(std::function<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::string const&)> const&) mov [rbx+20h], r14b lea r14, [rbx+28h] lea rax, [rbx+30h] mov dword ptr [rbx+30h], 0 xor ecx, ecx mov [rbx+38h], rcx mov [rbx+40h], rax mov [rbx+48h], rax mov [rbx+50h], rcx lea rax, [rbx+88h] mov [rbx+58h], rax mov eax, 1 mov [rbx+60h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov ecx, 3F800000h mov [rbx+78h], ecx movups xmmword ptr [rbx+80h], xmm0 lea rdx, [rbx+0C0h] mov [rbx+90h], rdx mov [rbx+98h], rax movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], ecx movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0E8h], xmm0 lea r12, [rsp+78h+var_60] mov [r12-10h], r12 test ebp, ebp jz short loc_35C42 lea rsi, asc_B742D; "\" \"?" lea rdx, asc_B742D+4; "" lea rdi, [rsp+78h+var_70] 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) jmp short loc_35C5D loc_35C42: mov rsi, cs:_ZL10SPACE_RULEB5cxx11; SPACE_RULE mov rdx, cs:qword_ECB50 add rdx, rsi lea rdi, [rsp+78h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) loc_35C5D: lea r13, [rsp+78h+var_40] mov [r13-10h], r13 lea rsi, aSpace+7; "space" lea rdx, aSpace+0Ch; "" lea rdi, [rsp+78h+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 rsi, [rsp+78h+var_50] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_70] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_35CAF mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_35CAF: mov rdi, [rsp+78h+var_70]; void * cmp rdi, r12 jz short loc_35CC6 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_35CC6: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_35CF9 mov r15, rax jmp short loc_35D10 mov r15, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_35CF9 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_35CF9: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_35D10 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_35D10: lea r12, [rbx+58h] lea r13, [rbx+90h] lea rbp, [rbx+0C8h] lea rdi, [rbx+0E0h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, r12 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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>>::~_Hashtable() mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [rbx+10h] test rax, rax jz short loc_35D64 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_35D64: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void SchemaConverter::SchemaConverter(long long a1, int a2, char a3, int a4) { long long v6; // rax void *v7[2]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-60h] BYREF void *v9[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+38h] [rbp-40h] BYREF std::function<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::string const&)>::function(); *(_BYTE *)(a1 + 32) = a3; *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = 0LL; *(_QWORD *)(a1 + 64) = a1 + 48; *(_QWORD *)(a1 + 72) = a1 + 48; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 192; *(_QWORD *)(a1 + 152) = 1LL; *(_OWORD *)(a1 + 160) = 0LL; *(_DWORD *)(a1 + 176) = 1065353216; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 232) = 0LL; v7[0] = v8; if ( a4 ) std::string::_M_construct<char const*>((long long)v7, "\" \"?", (long long)""); else std::string::_M_construct<char *>((long long)v7, (_BYTE *)SPACE_RULE[abi:cxx11], SPACE_RULE[abi:cxx11] + qword_ECB50); v9[0] = v10; std::string::_M_construct<char const*>((long long)v9, "space", (long long)""); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v9); std::string::_M_assign(v6, v7); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); }
SchemaConverter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI CALL 0x001363f4 MOV byte ptr [RBX + 0x20],R14B LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x30] MOV dword ptr [RBX + 0x30],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x38],RCX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RCX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV EAX,0x1 MOV qword ptr [RBX + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RBX + 0x78],ECX MOVUPS xmmword ptr [RBX + 0x80],XMM0 LEA RDX,[RBX + 0xc0] MOV qword ptr [RBX + 0x90],RDX MOV qword ptr [RBX + 0x98],RAX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV dword ptr [RBX + 0xb0],ECX MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xe8],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 TEST EBP,EBP JZ 0x00135c42 LAB_00135c28: LEA RSI,[0x1b742d] LEA RDX,[0x1b7431] LEA RDI,[RSP + 0x8] CALL 0x001320e8 JMP 0x00135c5d LAB_00135c42: MOV RSI,qword ptr [0x001ecb48] MOV RDX,qword ptr [0x001ecb50] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x00127d52 LAB_00135c5d: LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_00135c66: LEA RSI,[0x1b800c] LEA RDX,[0x1b8011] LEA RDI,[RSP + 0x28] CALL 0x001320e8 LAB_00135c7e: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x00136452 LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x001193d0 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00135caf MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001196b0 LAB_00135caf: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00135cc6 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_00135cc6: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::SchemaConverter(std::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> (std::__cxx11::string const&)> const&, bool, bool) */ void __thiscall SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3) { string *psVar1; int7 in_register_00000009; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; std:: 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>(std::__cxx11::string_const&)> ::function((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>(std::__cxx11::string_const&)> *)this,param_1); this[0x20] = (SchemaConverter)param_2; *(int4 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(SchemaConverter **)(this + 0x40) = this + 0x30; *(SchemaConverter **)(this + 0x48) = this + 0x30; *(int8 *)(this + 0x50) = 0; *(SchemaConverter **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(SchemaConverter **)(this + 0x90) = this + 0xc0; *(int8 *)(this + 0x98) = 1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0x3f800000; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; local_70[0] = local_60; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::_M_construct<char*> (local_70,SPACE_RULE_abi_cxx11_,DAT_001ecb50 + SPACE_RULE_abi_cxx11_); } else { /* try { // try from 00135c28 to 00135c5c has its CatchHandler @ 00135cda */ std::__cxx11::string::_M_construct<char_const*>(local_70,&DAT_001b742d,&DAT_001b7431); } /* try { // try from 00135c66 to 00135c7d has its CatchHandler @ 00135cd5 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"space",""); /* try { // try from 00135c7e to 00135c97 has its CatchHandler @ 00135cdf */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x28),(string *)local_50); std::__cxx11::string::_M_assign(psVar1); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } return; }
50,498
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) override { SendLn("event=TestIterationStart&iteration=" + StreamableToString(iteration)); }
O1
c
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x24(%rsp), %rsi movl %edx, (%rsi) leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x32327 leaq 0xc6b2(%rip), %rcx # 0x44435 movl $0x23, %r8d movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x8590 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x37dbb movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) jmp 0x37dc2 movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx movq %rsp, %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rbx), %rdi callq 0x39422 movq (%rsp), %rdi cmpq %r14, %rdi je 0x37dfb movq 0x10(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x37e16 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x37e3c movq 0x10(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x37e3c movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x37e57 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal17StreamingListener20OnTestIterationStartERKNS_8UnitTestEi: push r14 push rbx sub rsp, 48h mov rbx, rdi lea rsi, [rsp+58h+var_34] mov [rsi], edx lea r14, [rsp+58h+var_30] mov rdi, r14 call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) lea rcx, aEventTestitera; "event=TestIterationStart&iteration=" mov r8d, 23h ; '#' mov rdi, r14 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r14, [rsp+58h+var_48] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_37DBB mov [rsp+58h+var_58], rdx mov rdx, [rcx] mov [rsp+58h+var_48], rdx jmp short loc_37DC2 loc_37DBB: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_37DC2: mov rdx, [rax+8] mov rsi, rsp mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rbx+8] call _ZN7testing8internal17StreamingListener20AbstractSocketWriter6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_37DFB mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37DFB: lea rax, [rsp+58h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_37E16 mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37E16: add rsp, 48h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r14 jz short loc_37E3C mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_37E3C mov rbx, rax loc_37E3C: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_37E57 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37E57: mov rdi, rbx call __Unwind_Resume
void testing::internal::StreamingListener::OnTestIterationStart( testing::internal::StreamingListener *this, const testing::UnitTest *a2, unsigned int a3) { long long v3; // rax int v4; // r8d int v5; // r9d __int128 *v6; // rcx int v7; // edx void *v8; // [rsp+0h] [rbp-58h] BYREF long long v9; // [rsp+8h] [rbp-50h] __int128 v10; // [rsp+10h] [rbp-48h] BYREF unsigned int v11; // [rsp+24h] [rbp-34h] BYREF void *v12[2]; // [rsp+28h] [rbp-30h] BYREF long long v13; // [rsp+38h] [rbp-20h] BYREF v11 = a3; testing::internal::StreamableToString<int>((long long)v12, &v11); v3 = std::string::replace(v12, 0LL, 0LL); v8 = &v10; v6 = (__int128 *)(v3 + 16); if ( *(_QWORD *)v3 == v3 + 16 ) { v10 = *v6; } else { v8 = *(void **)v3; *(_QWORD *)&v10 = *(_QWORD *)v6; } v9 = *(_QWORD *)(v3 + 8); v7 = v9; *(_QWORD *)v3 = v6; *(_QWORD *)(v3 + 8) = 0LL; *(_BYTE *)(v3 + 16) = 0; testing::internal::StreamingListener::AbstractSocketWriter::SendLn( *((_QWORD *)this + 1), (unsigned int)&v8, v7, (_DWORD)v6, v4, v5, (_DWORD)v8, v9); if ( v8 != &v10 ) operator delete(v8, v10 + 1); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); }
OnTestIterationStart: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA RSI,[RSP + 0x24] MOV dword ptr [RSI],EDX LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00132327 LAB_00137d7c: LEA RCX,[0x144435] MOV R8D,0x23 MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x00108590 LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00137dbb MOV qword ptr [RSP],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX JMP 0x00137dc2 LAB_00137dbb: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_00137dc2: MOV RDX,qword ptr [RAX + 0x8] MOV RSI,RSP MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RBX + 0x8] LAB_00137de0: CALL 0x00139422 LAB_00137de5: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x00137dfb MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001084e0 LAB_00137dfb: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00137e16 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_00137e16: ADD RSP,0x48 POP RBX POP R14 RET
/* testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int) */ void __thiscall testing::internal::StreamingListener::OnTestIterationStart (StreamingListener *this,UnitTest *param_1,int param_2) { long *plVar1; long *plVar2; long *local_58; long local_50; long local_48; long lStack_40; int local_34; long *local_30 [2]; long local_20 [2]; local_34 = param_2; StreamableToString<int>((internal *)local_30,&local_34); /* try { // try from 00137d7c to 00137d94 has its CatchHandler @ 00137e39 */ plVar1 = (long *)std::__cxx11::string::replace((ulong)local_30,0,(char *)0x0,0x144435); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_48 = *plVar2; lStack_40 = plVar1[3]; local_58 = &local_48; } else { local_48 = *plVar2; local_58 = (long *)*plVar1; } local_50 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 00137de0 to 00137de4 has its CatchHandler @ 00137e1e */ AbstractSocketWriter::SendLn(*(AbstractSocketWriter **)(this + 8),(string *)&local_58); if (local_58 != &local_48) { operator_delete(local_58,local_48 + 1); } if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return; }
50,499
ModbusClientPort::readExceptionStatus(ModbusObject*, unsigned char, unsigned char*)
serhmarch[P]ModbusBridge/modbus/src/ModbusClientPort.cpp
StatusCode ModbusClientPort::readExceptionStatus(ModbusObject *client, uint8_t unit, uint8_t *value) { ModbusClientPortPrivate *d = d_ModbusClientPort(d_ptr); const uint16_t szBuff = 1; uint8_t buff[szBuff]; Modbus::StatusCode r; uint16_t szOutBuff; ModbusClientPort::RequestStatus status = this->getRequestStatus(client); switch (status) { case ModbusClientPort::Enable: // no need break case ModbusClientPort::Process: r = this->request(unit, // unit ID MBF_READ_EXCEPTION_STATUS, // modbus function number buff, // in-out buffer 0, // count of input data bytes szBuff, // maximum size of buffer &szOutBuff); // count of output data bytes if ((r != Status_Good) || d->isBroadcast()) return r; if (szOutBuff != 1) return d->setError(Status_BadNotCorrectResponse, StringLiteral("Incorrect received data size")); *value = buff[0]; return d->setGoodStatus(); default: return Status_Processing; } }
O2
cpp
ModbusClientPort::readExceptionStatus(ModbusObject*, unsigned char, unsigned char*): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rcx, %r14 movq 0x8(%rdi), %rbx movq 0x78(%rbx), %rax testq %rax, %rax je 0xa76a movl $0x80000000, %ebp # imm = 0x80000000 cmpq %rsi, %rax jne 0xa7f2 jmp 0xa76e movq %rsi, 0x78(%rbx) leaq 0xc(%rsp), %rax movq %rax, (%rsp) movzbl %dl, %esi pushq $0x7 popq %rdx leaq 0xb(%rsp), %rcx pushq $0x1 popq %r9 xorl %r8d, %r8d callq 0x9bb2 movl %eax, %ebp testl %eax, %eax jne 0xa7f2 cmpb $0x0, 0x6c(%rbx) jne 0xa7a3 testb $0x1, 0x1c4(%rbx) jne 0xa7b9 cmpw $0x1, 0xc(%rsp) jne 0xa7bd movb 0xb(%rsp), %al movb %al, (%r14) andl $0x0, 0x184(%rbx) xorl %ebp, %ebp jmp 0xa7f2 leaq 0x865a(%rip), %rsi # 0x12e1e leaq 0x10(%rsp), %r14 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x8b48 movq %rbx, %rdi movl $0x1000103, %esi # imm = 0x1000103 movq %r14, %rdx callq 0xc0c0 movl %eax, %ebp leaq 0x10(%rsp), %rdi callq 0x5190 movl %ebp, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x5190 movq %rbx, %rdi callq 0x5570
_ZN16ModbusClientPort19readExceptionStatusEP12ModbusObjecthPh: push rbp push r14 push rbx sub rsp, 30h mov r14, rcx mov rbx, [rdi+8] mov rax, [rbx+78h] test rax, rax jz short loc_A76A mov ebp, 80000000h cmp rax, rsi jnz loc_A7F2 jmp short loc_A76E loc_A76A: mov [rbx+78h], rsi loc_A76E: lea rax, [rsp+48h+var_3C] mov [rsp+48h+var_48], rax; unsigned __int16 * movzx esi, dl; unsigned __int8 push 7 pop rdx; unsigned __int8 lea rcx, [rsp+48h+var_3D]; unsigned __int8 * push 1 pop r9; unsigned __int16 xor r8d, r8d; unsigned __int16 call _ZN16ModbusClientPort7requestEhhPhttPt; ModbusClientPort::request(uchar,uchar,uchar *,ushort,ushort,ushort *) mov ebp, eax test eax, eax jnz short loc_A7F2 cmp byte ptr [rbx+6Ch], 0 jnz short loc_A7A3 test byte ptr [rbx+1C4h], 1 jnz short loc_A7B9 loc_A7A3: cmp [rsp+48h+var_3C], 1 jnz short loc_A7BD mov al, [rsp+48h+var_3D] mov [r14], al and dword ptr [rbx+184h], 0 loc_A7B9: xor ebp, ebp jmp short loc_A7F2 loc_A7BD: lea rsi, aIncorrectRecei; "Incorrect received data size" lea r14, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov esi, 1000103h mov rdx, r14 call _ZN23ModbusClientPortPrivate8setErrorEN6Modbus10StatusCodeEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ModbusClientPortPrivate::setError(Modbus::StatusCode,std::string &&) mov ebp, eax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_A7F2: mov eax, ebp add rsp, 30h pop rbx pop r14 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long ModbusClientPort::readExceptionStatus( ModbusClientPort *this, ModbusObject *a2, unsigned __int8 a3, unsigned __int8 *a4) { long long v5; // rbx ModbusObject *v6; // rax unsigned int v7; // ebp unsigned __int8 v9; // [rsp+Bh] [rbp-3Dh] BYREF unsigned __int16 v10; // [rsp+Ch] [rbp-3Ch] BYREF _QWORD v11[7]; // [rsp+10h] [rbp-38h] BYREF v5 = *((_QWORD *)this + 1); v6 = *(ModbusObject **)(v5 + 120); if ( v6 ) { v7 = 0x80000000; if ( v6 != a2 ) return v7; } else { *(_QWORD *)(v5 + 120) = a2; } v7 = ModbusClientPort::request(this, a3, 7u, &v9, 0, 1u, &v10); if ( !v7 ) { if ( *(_BYTE *)(v5 + 108) || (*(_BYTE *)(v5 + 452) & 1) == 0 ) { if ( v10 != 1 ) { std::string::basic_string<std::allocator<char>>(v11, (long long)"Incorrect received data size"); v7 = ModbusClientPortPrivate::setError(v5, 16777475LL, v11); std::string::~string(v11); return v7; } *a4 = v9; *(_DWORD *)(v5 + 388) = 0; } return 0; } return v7; }
readExceptionStatus: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RCX MOV RBX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RBX + 0x78] TEST RAX,RAX JZ 0x0010a76a MOV EBP,0x80000000 CMP RAX,RSI JNZ 0x0010a7f2 JMP 0x0010a76e LAB_0010a76a: MOV qword ptr [RBX + 0x78],RSI LAB_0010a76e: LEA RAX,[RSP + 0xc] MOV qword ptr [RSP],RAX MOVZX ESI,DL PUSH 0x7 POP RDX LEA RCX,[RSP + 0xb] PUSH 0x1 POP R9 XOR R8D,R8D CALL 0x00109bb2 MOV EBP,EAX TEST EAX,EAX JNZ 0x0010a7f2 CMP byte ptr [RBX + 0x6c],0x0 JNZ 0x0010a7a3 TEST byte ptr [RBX + 0x1c4],0x1 JNZ 0x0010a7b9 LAB_0010a7a3: CMP word ptr [RSP + 0xc],0x1 JNZ 0x0010a7bd MOV AL,byte ptr [RSP + 0xb] MOV byte ptr [R14],AL AND dword ptr [RBX + 0x184],0x0 LAB_0010a7b9: XOR EBP,EBP JMP 0x0010a7f2 LAB_0010a7bd: LEA RSI,[0x112e1e] LEA R14,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00108b48 LAB_0010a7d6: MOV RDI,RBX MOV ESI,0x1000103 MOV RDX,R14 CALL 0x0010c0c0 LAB_0010a7e6: MOV EBP,EAX LEA RDI,[RSP + 0x10] CALL 0x00105190 LAB_0010a7f2: MOV EAX,EBP ADD RSP,0x30 POP RBX POP R14 POP RBP RET
/* ModbusClientPort::readExceptionStatus(ModbusObject*, unsigned char, unsigned char*) */ int __thiscall ModbusClientPort::readExceptionStatus (ModbusClientPort *this,ModbusObject *param_1,uchar param_2,uchar *param_3) { long lVar1; int iVar2; uchar local_3d; ushort local_3c; allocator local_39; string local_38 [32]; lVar1 = *(long *)(this + 8); if (*(ModbusObject **)(lVar1 + 0x78) == (ModbusObject *)0x0) { *(ModbusObject **)(lVar1 + 0x78) = param_1; } else if (*(ModbusObject **)(lVar1 + 0x78) != param_1) { return -0x80000000; } iVar2 = request(this,param_2,'\a',&local_3d,0,1,&local_3c); if (iVar2 == 0) { if ((*(char *)(lVar1 + 0x6c) != '\0') || ((*(byte *)(lVar1 + 0x1c4) & 1) == 0)) { if (local_3c != 1) { std::__cxx11::string::string<std::allocator<char>> (local_38,"Incorrect received data size",&local_39); /* try { // try from 0010a7d6 to 0010a7e5 has its CatchHandler @ 0010a7fd */ iVar2 = ModbusClientPortPrivate::setError(lVar1,0x1000103,local_38); std::__cxx11::string::~string(local_38); return iVar2; } *param_3 = local_3d; *(int4 *)(lVar1 + 0x184) = 0; } iVar2 = 0; } return iVar2; }