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
32,300
YAML::Node const YAML::Node::operator[]<char [11]>(char const (&) [11]) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
inline const Node Node::operator[](const Key& key) const { EnsureNodeExists(); detail::node* value = static_cast<const detail::node&>(*m_pNode).get(key, m_pMemory); if (!value) { return Node(ZombieNode, key_to_string(key)); } return Node(*value, m_pMemory); }
O0
c
YAML::Node const YAML::Node::operator[]<char [11]>(char const (&) [11]) const: subq $0xc8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xb8(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x1e4a90 movq 0x30(%rsp), %rsi movq 0x38(%rsi), %rax movq %rax, 0x38(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x40(%rsp) addq $0x28, %rsi leaq 0x98(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0x1e4c50 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x2b8f40 movq %rax, 0x50(%rsp) jmp 0x2b847a leaq 0x98(%rsp), %rdi callq 0x1e4c80 movq 0x50(%rsp), %rax movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0x2b851e movq 0xb0(%rsp), %rsi leaq 0x68(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x2b8fe0 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rdx xorl %esi, %esi callq 0x1e4cc0 jmp 0x2b84c9 leaq 0x68(%rsp), %rdi callq 0x1a7610 jmp 0x2b8585 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x98(%rsp), %rdi callq 0x1e4c80 jmp 0x2b8592 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x68(%rsp), %rdi callq 0x1a7610 jmp 0x2b8592 movq 0x30(%rsp), %rsi movq 0xa8(%rsp), %rax movq %rax, 0x8(%rsp) addq $0x28, %rsi leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x1e4c50 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1e4d10 jmp 0x2b8559 leaq 0x58(%rsp), %rdi callq 0x1e4c80 jmp 0x2b8585 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x58(%rsp), %rdi callq 0x1e4c80 jmp 0x2b8592 movq 0x28(%rsp), %rax addq $0xc8, %rsp retq movq 0x90(%rsp), %rdi callq 0x198ce0 nop
_ZNK4YAML4NodeixIA27_cEEKS0_RKT_: sub rsp, 0C8h mov [rsp+0C8h+var_A8], rdi mov rax, rdi mov [rsp+0C8h+var_A0], rax mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov rdi, [rsp+0C8h+var_10]; this mov [rsp+0C8h+var_98], rdi call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void) mov rsi, [rsp+0C8h+var_98] mov rax, [rsi+38h] mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_88], rax add rsi, 28h ; '(' lea rdi, [rsp+0C8h+var_30] mov [rsp+0C8h+var_80], rdi call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&) mov rdi, [rsp+0C8h+var_90] mov rsi, [rsp+0C8h+var_88] mov rdx, [rsp+0C8h+var_80] call _ZNK4YAML6detail4node3getIA27_cEEPS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [27]>(char [27] const&,std::shared_ptr<YAML::detail::memory_holder>) mov [rsp+0C8h+var_78], rax jmp short $+2 loc_2B847A: lea rdi, [rsp+0C8h+var_30] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() mov rax, [rsp+0C8h+var_78] mov [rsp+0C8h+var_20], rax cmp [rsp+0C8h+var_20], 0 jnz short loc_2B851E mov rsi, [rsp+0C8h+var_18] lea rdi, [rsp+0C8h+var_60] mov [rsp+0C8h+var_B0], rdi call _ZN4YAML13key_to_stringIA27_cEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; YAML::key_to_string<char [27]>(char [27] const&) mov rdi, [rsp+0C8h+var_A8] mov rdx, [rsp+0C8h+var_B0] xor esi, esi call _ZN4YAML4NodeC2ENS0_6ZombieERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::Node::Node(YAML::Node::Zombie,std::string const&) jmp short $+2 loc_2B84C9: lea rdi, [rsp+0C8h+var_60]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2B8585 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_90] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp loc_2B8592 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_60]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2B8592 loc_2B851E: mov rsi, [rsp+0C8h+var_98] mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_C0], rax add rsi, 28h ; '(' lea rdi, [rsp+0C8h+var_70] mov [rsp+0C8h+var_B8], rdi call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&) mov rdi, [rsp+0C8h+var_A8] mov rsi, [rsp+0C8h+var_C0] mov rdx, [rsp+0C8h+var_B8] call _ZN4YAML4NodeC2ERNS_6detail4nodeESt10shared_ptrINS1_13memory_holderEE; YAML::Node::Node(YAML::detail::node &,std::shared_ptr<YAML::detail::memory_holder>) jmp short $+2 loc_2B8559: lea rdi, [rsp+0C8h+var_70] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp short loc_2B8585 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_50] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp short loc_2B8592 loc_2B8585: mov rax, [rsp+0C8h+var_A0] add rsp, 0C8h retn loc_2B8592: mov rdi, [rsp+arg_88] call __Unwind_Resume
long long YAML::Node::operator[]<char [27]>(long long a1, YAML::Node *a2, long long a3) { int v3; // ecx int v4; // r8d int v5; // r9d int v6; // ecx int v7; // r8d int v8; // r9d long long v10; // [rsp+8h] [rbp-C0h] long long v11; // [rsp+38h] [rbp-90h] int v12; // [rsp+40h] [rbp-88h] long long v13; // [rsp+50h] [rbp-78h] _BYTE v14[16]; // [rsp+58h] [rbp-70h] BYREF _BYTE v15[48]; // [rsp+68h] [rbp-60h] BYREF _BYTE v16[16]; // [rsp+98h] [rbp-30h] BYREF long long v17; // [rsp+A8h] [rbp-20h] long long v18; // [rsp+B0h] [rbp-18h] YAML::Node *v19; // [rsp+B8h] [rbp-10h] long long v20; // [rsp+C0h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; YAML::Node::EnsureNodeExists((YAML::detail::node **)a2); v11 = *((_QWORD *)a2 + 7); v12 = v18; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v16, (long long)a2 + 40); v13 = YAML::detail::node::get<char [27]>(v11, v12, (unsigned int)v16, v3, v4, v5); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v16); v17 = v13; if ( v13 ) { v10 = v17; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v14, (long long)a2 + 40); YAML::Node::Node(a1, v10, (long long)v14); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v14); } else { YAML::key_to_string<char [27]>(v15, v18); YAML::Node::Node(a1, 0LL, (int)v15, v6, v7, v8); std::string::~string(v15); } return a1; }
32,301
YAML::Node const YAML::Node::operator[]<char [11]>(char const (&) [11]) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
inline const Node Node::operator[](const Key& key) const { EnsureNodeExists(); detail::node* value = static_cast<const detail::node&>(*m_pNode).get(key, m_pMemory); if (!value) { return Node(ZombieNode, key_to_string(key)); } return Node(*value, m_pMemory); }
O3
c
YAML::Node const YAML::Node::operator[]<char [11]>(char const (&) [11]) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x9d0a4 movq 0x28(%r12), %rax movq 0x38(%r12), %rdi movq %rax, 0x8(%rsp) movq 0x30(%r12), %rax movq %rax, 0x10(%rsp) testq %rax, %rax je 0xbbb91 movq 0x1e5145(%rip), %rcx # 0x2a0cc8 cmpb $0x0, (%rcx) je 0xbbb8d incl 0x8(%rax) jmp 0xbbb91 lock incl 0x8(%rax) leaq 0x8(%rsp), %rdx movq %r15, %rsi callq 0xbbf50 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xbbbb0 callq 0x81a00 testq %r14, %r14 je 0xbbbff movq 0x28(%r12), %rax movq 0x30(%r12), %rdi testq %rdi, %rdi je 0xbbc59 movq 0x1e50f9(%rip), %rdx # 0x2a0cc8 leaq 0x18(%rbx), %rcx cmpb $0x0, (%rdx) je 0xbbc7c incl 0x8(%rdi) movb $0x1, (%rbx) movq %rcx, 0x8(%rbx) movq $0x0, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rdi, 0x30(%rbx) jmp 0xbbca0 leaq 0x18(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0xbc2f8 movb $0x0, (%rbx) leaq 0x8(%rbx), %rdi leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x80c60 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq $0x0, 0x38(%rbx) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbbcac movq 0x28(%rsp), %rsi incq %rsi callq 0x82190 jmp 0xbbcac movb $0x1, (%rbx) leaq 0x18(%rbx), %rcx movq %rcx, 0x8(%rbx) xorl %ecx, %ecx movq %rcx, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rcx, 0x30(%rbx) movq %r14, 0x38(%rbx) jmp 0xbbcac lock incl 0x8(%rdi) cmpb $0x0, (%rdx) movb $0x1, (%rbx) movq %rcx, 0x8(%rbx) movq $0x0, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rdi, 0x30(%rbx) je 0xbbcbb incl 0x8(%rdi) movq %r14, 0x38(%rbx) callq 0x81a00 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq lock incl 0x8(%rdi) jmp 0xbbca3 movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbbcf3 movq 0x28(%rsp), %rsi incq %rsi callq 0x82190 jmp 0xbbcf3 movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xbbcf3 callq 0x81a00 movq %rbx, %rdi callq 0x83b70 nop
_ZNK4YAML4NodeixIA9_cEEKS0_RKT_: push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void) mov rax, [r12+28h] mov rdi, [r12+38h] mov [rsp+58h+var_50], rax mov rax, [r12+30h] mov [rsp+58h+var_48], rax test rax, rax jz short loc_BBB91 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_BBB8D inc dword ptr [rax+8] jmp short loc_BBB91 loc_BBB8D: lock inc dword ptr [rax+8] loc_BBB91: lea rdx, [rsp+58h+var_50] mov rsi, r15 call _ZNK4YAML6detail4node3getIA9_cEEPS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [9]>(char [9] const&,std::shared_ptr<YAML::detail::memory_holder>) mov r14, rax mov rdi, [rsp+58h+var_48] test rdi, rdi jz short loc_BBBB0 call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_BBBB0: test r14, r14 jz short loc_BBBFF mov rax, [r12+28h] mov rdi, [r12+30h] test rdi, rdi jz loc_BBC59 mov rdx, cs:__libc_single_threaded_ptr lea rcx, [rbx+18h] cmp byte ptr [rdx], 0 jz loc_BBC7C inc dword ptr [rdi+8] mov byte ptr [rbx], 1 mov [rbx+8], rcx mov qword ptr [rbx+10h], 0 mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rdi jmp loc_BBCA0 loc_BBBFF: lea r14, [rsp+58h+var_40] mov rdi, r14 mov rsi, r15 call _ZN20streamable_to_stringIA9_cLb1EE4implB5cxx11ERA9_Kc; streamable_to_string<char [9],true>::impl(char const(&)[9]) mov byte ptr [rbx], 0 lea rdi, [rbx+8] lea rax, [rbx+18h] mov [rbx+8], rax mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov qword ptr [rbx+38h], 0 lea rax, [rsp+58h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BBCAC mov rsi, [rsp+58h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BBCAC loc_BBC59: mov byte ptr [rbx], 1 lea rcx, [rbx+18h] mov [rbx+8], rcx xor ecx, ecx mov [rbx+10h], rcx mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rcx mov [rbx+38h], r14 jmp short loc_BBCAC loc_BBC7C: lock inc dword ptr [rdi+8] cmp byte ptr [rdx], 0 mov byte ptr [rbx], 1 mov [rbx+8], rcx mov qword ptr [rbx+10h], 0 mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rdi jz short loc_BBCBB loc_BBCA0: inc dword ptr [rdi+8] loc_BBCA3: mov [rbx+38h], r14 call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_BBCAC: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_BBCBB: lock inc dword ptr [rdi+8] jmp short loc_BBCA3 mov rbx, rax lea rax, [rsp+arg_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BBCF3 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BBCF3 mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_BBCF3 call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_BBCF3: mov rdi, rbx call __Unwind_Resume
operator[]<char[9]>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0019d0a4 MOV RAX,qword ptr [R12 + 0x28] MOV RDI,qword ptr [R12 + 0x38] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JZ 0x001bbb91 MOV RCX,qword ptr [0x003a0cc8] CMP byte ptr [RCX],0x0 JZ 0x001bbb8d INC dword ptr [RAX + 0x8] JMP 0x001bbb91 LAB_001bbb8d: INC.LOCK dword ptr [RAX + 0x8] LAB_001bbb91: LEA RDX,[RSP + 0x8] MOV RSI,R15 CALL 0x001bbf50 LAB_001bbb9e: MOV R14,RAX MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001bbbb0 CALL 0x00181a00 LAB_001bbbb0: TEST R14,R14 JZ 0x001bbbff MOV RAX,qword ptr [R12 + 0x28] MOV RDI,qword ptr [R12 + 0x30] TEST RDI,RDI JZ 0x001bbc59 MOV RDX,qword ptr [0x003a0cc8] LEA RCX,[RBX + 0x18] CMP byte ptr [RDX],0x0 JZ 0x001bbc7c INC dword ptr [RDI + 0x8] MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],0x0 MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RDI JMP 0x001bbca0 LAB_001bbbff: LEA R14,[RSP + 0x18] MOV RDI,R14 MOV RSI,R15 CALL 0x001bc2f8 MOV byte ptr [RBX],0x0 LEA RDI,[RBX + 0x8] LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_001bbc28: CALL 0x00180c60 LAB_001bbc2d: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV qword ptr [RBX + 0x38],0x0 LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001bbcac MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x00182190 JMP 0x001bbcac LAB_001bbc59: MOV byte ptr [RBX],0x1 LEA RCX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RCX XOR ECX,ECX MOV qword ptr [RBX + 0x10],RCX MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RCX MOV qword ptr [RBX + 0x38],R14 JMP 0x001bbcac LAB_001bbc7c: INC.LOCK dword ptr [RDI + 0x8] CMP byte ptr [RDX],0x0 MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],0x0 MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RDI JZ 0x001bbcbb LAB_001bbca0: INC dword ptr [RDI + 0x8] LAB_001bbca3: MOV qword ptr [RBX + 0x38],R14 CALL 0x00181a00 LAB_001bbcac: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_001bbcbb: INC.LOCK dword ptr [RDI + 0x8] JMP 0x001bbca3
/* YAML::Node const YAML::Node::operator[]<char [9]>(char const (&) [9]) const */ char * YAML::Node::operator[]<char[9]>(char *param_1) { char cVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2; int8 uVar3; int *puVar4; node *pnVar5; char *in_RDX; Node *in_RSI; long *local_40; long local_38; long local_30 [2]; EnsureNodeExists(in_RSI); pnVar5 = *(node **)(in_RSI + 0x38); p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30); if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_003a0cc8 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); } else { *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; } } /* try { // try from 001bbb91 to 001bbb9d has its CatchHandler @ 001bbce1 */ pnVar5 = detail::node::get<char[9]>(pnVar5); if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2); } puVar4 = PTR___libc_single_threaded_003a0cc8; if (pnVar5 == (node *)0x0) { streamable_to_string<char[9],true>::impl_abi_cxx11_ ((streamable_to_string<char[9],true> *)&local_40,in_RDX); *param_1 = '\0'; *(char **)(param_1 + 8) = param_1 + 0x18; /* try { // try from 001bbc28 to 001bbc2c has its CatchHandler @ 001bbcc1 */ std::__cxx11::string::_M_construct<char*>(param_1 + 8,local_40,local_38 + (long)local_40); param_1[0x28] = '\0'; param_1[0x29] = '\0'; param_1[0x2a] = '\0'; param_1[0x2b] = '\0'; param_1[0x2c] = '\0'; param_1[0x2d] = '\0'; param_1[0x2e] = '\0'; param_1[0x2f] = '\0'; param_1[0x30] = '\0'; param_1[0x31] = '\0'; param_1[0x32] = '\0'; param_1[0x33] = '\0'; param_1[0x34] = '\0'; param_1[0x35] = '\0'; param_1[0x36] = '\0'; param_1[0x37] = '\0'; param_1[0x38] = '\0'; param_1[0x39] = '\0'; param_1[0x3a] = '\0'; param_1[0x3b] = '\0'; param_1[0x3c] = '\0'; param_1[0x3d] = '\0'; param_1[0x3e] = '\0'; param_1[0x3f] = '\0'; if (local_40 == local_30) { return param_1; } operator_delete(local_40,local_30[0] + 1); return param_1; } uVar3 = *(int8 *)(in_RSI + 0x28); p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30); if (p_Var2 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; param_1[0x30] = '\0'; param_1[0x31] = '\0'; param_1[0x32] = '\0'; param_1[0x33] = '\0'; param_1[0x34] = '\0'; param_1[0x35] = '\0'; param_1[0x36] = '\0'; param_1[0x37] = '\0'; *(node **)(param_1 + 0x38) = pnVar5; return param_1; } if (*PTR___libc_single_threaded_003a0cc8 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); cVar1 = *puVar4; *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2; if (cVar1 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); goto LAB_001bbca3; } } else { *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2; } *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; LAB_001bbca3: *(node **)(param_1 + 0x38) = pnVar5; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2); return param_1; }
32,302
gguf_get_val_u8
monkey531[P]llama/ggml/src/gguf.cpp
uint8_t gguf_get_val_u8(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); GGML_ASSERT(ctx->kv[key_id].get_ne() == 1); return ctx->kv[key_id].get_val<uint8_t>(); }
O2
cpp
gguf_get_val_u8: pushq %r14 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3efff movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x10(%rbx), %rax subq %rdi, %rax pushq $0x58 popq %rcx cqto idivq %rcx cmpq %rsi, %rax jle 0x3efff imulq $0x58, %rsi, %r14 addq %r14, %rdi callq 0x1c870 cmpq $0x1, %rax jne 0x3f01b addq 0x8(%rbx), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x1c440 movb (%rax), %al addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x1b7ff(%rip), %rdi # 0x5a805 leaq 0xc5c0(%rip), %rdx # 0x4b5cd leaq 0x1bc7c(%rip), %rcx # 0x5ac90 movl $0x323, %esi # imm = 0x323 jmp 0x3f035 leaq 0x1b7e3(%rip), %rdi # 0x5a805 leaq 0xc5a4(%rip), %rdx # 0x4b5cd leaq 0x1bd2f(%rip), %rcx # 0x5ad5f movl $0x324, %esi # imm = 0x324 xorl %eax, %eax callq 0x1e760
gguf_get_val_u8: push r14 push rbx push rax test rsi, rsi js short loc_3EFFF mov rbx, rdi mov rdi, [rdi+8] mov rax, [rbx+10h] sub rax, rdi push 58h ; 'X' pop rcx cqo idiv rcx cmp rax, rsi jle short loc_3EFFF imul r14, rsi, 58h ; 'X' add rdi, r14; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3F01B add r14, [rbx+8] mov rdi, r14 xor esi, esi call __ZNK7gguf_kv7get_valIhEERKT_m; gguf_kv::get_val<uchar>(ulong) mov al, [rax] add rsp, 8 pop rbx pop r14 retn loc_3EFFF: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 323h jmp short loc_3F035 loc_3F01B: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1" mov esi, 324h loc_3F035: xor eax, eax call _ggml_abort
char gguf_get_val_u8( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14) { char v14; // al long long v16; // rdi const char *v18; // rcx int v19; // esi char v20; // [rsp-8h] [rbp-18h] v20 = v14; if ( a2 < 0 || (v16 = *(_QWORD *)(a1 + 8), (*(_QWORD *)(a1 + 16) - v16) / 88 <= a2) ) { v18 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v19 = 803; goto LABEL_7; } if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v16)) != 1 ) { v18 = "ctx->kv[key_id].get_ne() == 1"; v19 = 804; LABEL_7: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", v19, (long long)"GGML_ASSERT(%s) failed", (long long)v18, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10, v20); } return *(_BYTE *)gguf_kv::get_val<unsigned char>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL); }
gguf_get_val_u8: PUSH R14 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013efff MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RBX + 0x10] SUB RAX,RDI PUSH 0x58 POP RCX CQO IDIV RCX CMP RAX,RSI JLE 0x0013efff IMUL R14,RSI,0x58 ADD RDI,R14 CALL 0x0011c870 CMP RAX,0x1 JNZ 0x0013f01b ADD R14,qword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x0011c440 MOV AL,byte ptr [RAX] ADD RSP,0x8 POP RBX POP R14 RET LAB_0013efff: LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15ac90] MOV ESI,0x323 JMP 0x0013f035 LAB_0013f01b: LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15ad5f] MOV ESI,0x324 LAB_0013f035: XOR EAX,EAX CALL 0x0011e760
uchar gguf_get_val_u8(long param_1,long param_2) { long lVar1; uchar *puVar2; char *pcVar3; int8 uVar4; if (-1 < param_2) { if (param_2 < (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8)) / 0x58) { lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58)); if (lVar1 == 1) { puVar2 = gguf_kv::get_val<unsigned_char> ((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0); return *puVar2; } pcVar3 = "ctx->kv[key_id].get_ne() == 1"; uVar4 = 0x324; goto LAB_0013f035; } } pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar4 = 0x323; LAB_0013f035: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
32,303
partition_command::partition_command()
msxemulator/build_O3/_deps/picotool-src/main.cpp
partition_command() : multi_cmd("partition", partition_sub_commands) {}
O3
cpp
partition_command::partition_command(): pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x6d689(%rip), %rsi # 0xa5c29 leaq 0x6d68b(%rip), %rdx # 0xa5c32 movq %rsp, %rdi callq 0x5c00c leaq 0xb480a(%rip), %rsi # 0xecdc0 leaq 0x20(%rsp), %rdi callq 0x50850 movq %rsp, %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x508ee leaq 0x20(%rsp), %rdi callq 0x380ee movq (%rsp), %rdi cmpq %r14, %rdi je 0x385f0 movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 leaq 0xa7ea9(%rip), %rax # 0xe04a0 movq %rax, (%rbx) addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x380ee jmp 0x38614 movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x3862a movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 movq %rbx, %rdi callq 0xf7d0
_ZN17partition_commandC2Ev: push r14 push rbx sub rsp, 38h mov rbx, rdi lea r14, [rsp+48h+var_38] mov [r14-10h], r14 lea rsi, aPartition_0; "partition" lea rdx, aPartition_0+9; "" mov rdi, rsp 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, partition_sub_commands lea rdi, [rsp+48h+var_28] call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EEC2ERKS4_; std::vector<std::shared_ptr<cmd>>::vector(std::vector<std::shared_ptr<cmd>> const&) mov rsi, rsp lea rdx, [rsp+48h+var_28] mov rdi, rbx call _ZN9multi_cmdC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI3cmdESaIS9_EE; multi_cmd::multi_cmd(std::string,std::vector<std::shared_ptr<cmd>>) lea rdi, [rsp+48h+var_28]; void * call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EED2Ev; std::vector<std::shared_ptr<cmd>>::~vector() mov rdi, [rsp+48h+var_48]; void * cmp rdi, r14 jz short loc_385F0 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_385F0: lea rax, off_E04A0 mov [rbx], rax add rsp, 38h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_18]; void * call _ZNSt6vectorISt10shared_ptrI3cmdESaIS2_EED2Ev; std::vector<std::shared_ptr<cmd>>::~vector() jmp short loc_38614 mov rbx, rax loc_38614: mov rdi, [rsp+0]; void * cmp rdi, r14 jz short loc_3862A mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3862A: mov rdi, rbx call __Unwind_Resume
void partition_command::partition_command(partition_command *this) { void *v1[2]; // [rsp+0h] [rbp-48h] BYREF _QWORD v2[2]; // [rsp+10h] [rbp-38h] BYREF _QWORD v3[5]; // [rsp+20h] [rbp-28h] BYREF v1[0] = v2; std::string::_M_construct<char const*>(v1, "partition", ""); std::vector<std::shared_ptr<cmd>>::vector(v3, &partition_sub_commands); multi_cmd::multi_cmd(this, v1, v3); std::vector<std::shared_ptr<cmd>>::~vector(v3); if ( v1[0] != v2 ) operator delete(v1[0], v2[0] + 1LL); *(_QWORD *)this = off_E04A0; }
partition_command: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LEA RSI,[0x1a5c29] LEA RDX,[0x1a5c32] MOV RDI,RSP CALL 0x0015c00c LAB_001385af: LEA RSI,[0x1ecdc0] LEA RDI,[RSP + 0x20] CALL 0x00150850 LAB_001385c0: MOV RSI,RSP LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x001508ee LAB_001385d0: LEA RDI,[RSP + 0x20] CALL 0x001380ee MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x001385f0 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010f470 LAB_001385f0: LEA RAX,[0x1e04a0] MOV qword ptr [RBX],RAX ADD RSP,0x38 POP RBX POP R14 RET
/* partition_command::partition_command() */ void __thiscall partition_command::partition_command(partition_command *this) { long *local_48 [2]; long local_38 [2]; vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>> local_28 [24]; local_48[0] = local_38; std::__cxx11::string::_M_construct<char_const*>((string *)local_48,"partition",""); /* try { // try from 001385af to 001385bf has its CatchHandler @ 00138611 */ std::vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>>::vector (local_28,partition_sub_commands); /* try { // try from 001385c0 to 001385cf has its CatchHandler @ 00138602 */ multi_cmd::multi_cmd((multi_cmd *)this,local_48,local_28); std::vector<std::shared_ptr<cmd>,std::allocator<std::shared_ptr<cmd>>>::~vector(local_28); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } *(int ***)this = &PTR__multi_cmd_001e04a0; return; }
32,304
flux::parser::Parser::parseSizeOfExpr()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Expr> Parser::parseSizeOfExpr() { auto start = previous_; // 'sizeof' keyword consume(lexer::TokenType::LEFT_PAREN, "Expected '(' after 'sizeof'"); // Parse the type auto targetType = type(); if (!targetType) { error("Expected type in sizeof expression"); return nullptr; } auto end = consume(lexer::TokenType::RIGHT_PAREN, "Expected ')' after type in sizeof"); return std::make_unique<SizeOfExpr>( std::move(targetType), makeRange(start, end) ); }
O2
cpp
flux::parser::Parser::parseSizeOfExpr(): pushq %r14 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rsi, %r14 movq %rdi, %rbx addq $0x68, %rsi leaq 0x70(%rsp), %rdi callq 0xa5ae leaq 0x7092(%rip), %r8 # 0x2552b leaq 0xf8(%rsp), %rdi pushq $0x5d popq %rdx pushq $0x1b popq %rcx movq %r14, %rsi callq 0x12f2a leaq 0x138(%rsp), %rdi callq 0x60e0 movq %rsp, %rdi movq %r14, %rsi callq 0x17f8c cmpq $0x0, (%rsp) je 0x1e525 leaq 0x7095(%rip), %r8 # 0x2556a leaq 0x10(%rsp), %rdi pushq $0x5e popq %rdx pushq $0x21 popq %rcx movq %r14, %rsi callq 0x12f2a movups 0x88(%rsp), %xmm0 leaq 0xd0(%rsp), %rdx movaps %xmm0, (%rdx) movups 0x38(%rsp), %xmm0 movaps %xmm0, 0x10(%rdx) leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x212fb movq 0x8(%rsp), %rax movq %rax, (%rbx) leaq 0x50(%rsp), %rdi callq 0x60e0 jmp 0x1e53b leaq 0x701b(%rip), %rdx # 0x25547 pushq $0x22 popq %rsi movq %r14, %rdi callq 0x12ca0 andq $0x0, (%rbx) movq (%rsp), %rdi testq %rdi, %rdi je 0x1e54a movq (%rdi), %rax callq *0x8(%rax) leaq 0xb0(%rsp), %rdi callq 0x60e0 movq %rbx, %rax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r14 retq jmp 0x1e576 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x60e0 jmp 0x1e579 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x1e58f movq (%rdi), %rax callq *0x8(%rax) jmp 0x1e58f jmp 0x1e58c movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x60e0 movq %rbx, %rdi callq 0x63e0
_ZN4flux6parser6Parser15parseSizeOfExprEv: push r14 push rbx sub rsp, 158h mov r14, rsi mov rbx, rdi add rsi, 68h ; 'h'; flux::lexer::Token * lea rdi, [rsp+168h+var_F8]; this call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) lea r8, aExpectedAfterS_5; "Expected '(' after 'sizeof'" lea rdi, [rsp+168h+var_70]; this push 5Dh ; ']' pop rdx push 1Bh pop rcx mov rsi, r14 call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) lea rdi, [rsp+168h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp; this mov rsi, r14 call _ZN4flux6parser6Parser4typeEv; flux::parser::Parser::type(void) cmp [rsp+168h+var_168], 0 jz short loc_1E525 lea r8, aExpectedAfterT_8; "Expected ')' after type in sizeof" lea rdi, [rsp+168h+var_158]; this push 5Eh ; '^' pop rdx push 21h ; '!' pop rcx mov rsi, r14 call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) movups xmm0, [rsp+168h+var_E0] lea rdx, [rsp+168h+var_98] movaps xmmword ptr [rdx], xmm0 movups xmm0, [rsp+168h+var_130] movaps xmmword ptr [rdx+10h], xmm0 lea rdi, [rsp+168h+var_160] mov rsi, rsp call _ZSt11make_uniqueIN4flux6parser10SizeOfExprEJSt10unique_ptrINS1_8TypeExprESt14default_deleteIS4_EENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::SizeOfExpr,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>(std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange &&) mov rax, [rsp+168h+var_160] mov [rbx], rax lea rdi, [rsp+168h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1E53B loc_1E525: lea rdx, aExpectedTypeIn_0; "Expected type in sizeof expression" push 22h ; '"' pop rsi mov rdi, r14 call _ZN4flux6parser6Parser5errorESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(std::string_view) and qword ptr [rbx], 0 loc_1E53B: mov rdi, [rsp+168h+var_168] test rdi, rdi jz short loc_1E54A mov rax, [rdi] call qword ptr [rax+8] loc_1E54A: lea rdi, [rsp+168h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 158h pop rbx pop r14 retn jmp short loc_1E576 mov rbx, rax lea rdi, [rsp+arg_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1E579 loc_1E576: mov rbx, rax loc_1E579: mov rdi, [rsp+0] test rdi, rdi jz short loc_1E58F mov rax, [rdi] call qword ptr [rax+8] jmp short loc_1E58F jmp short $+2 loc_1E58C: mov rbx, rax loc_1E58F: lea rdi, [rsp+arg_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::parseSizeOfExpr(flux::parser::Parser *this, _OWORD *a2) { long long v2; // rcx int v3; // r8d int v4; // r9d long long v6; // [rsp+0h] [rbp-168h] BYREF long long v7; // [rsp+8h] [rbp-160h] BYREF int v8[10]; // [rsp+10h] [rbp-158h] BYREF __int128 v9; // [rsp+38h] [rbp-130h] char v10; // [rsp+48h] [rbp-120h] _BYTE v11[32]; // [rsp+50h] [rbp-118h] BYREF _BYTE v12[24]; // [rsp+70h] [rbp-F8h] BYREF __int128 v13; // [rsp+88h] [rbp-E0h] _BYTE v14[32]; // [rsp+B0h] [rbp-B8h] BYREF __int128 v15; // [rsp+D0h] [rbp-98h] __int128 v16; // [rsp+E0h] [rbp-88h] _BYTE v17[64]; // [rsp+F8h] [rbp-70h] BYREF _BYTE v18[48]; // [rsp+138h] [rbp-30h] BYREF flux::lexer::Token::Token((flux::lexer::Token *)v12, (const flux::lexer::Token *)((char *)a2 + 104)); flux::parser::Parser::consume( (flux::parser::Parser *)v17, (long long)a2, 93, 27LL, (long long)"Expected '(' after 'sizeof'"); std::string::~string(v18); flux::parser::Parser::type((flux::parser::Parser *)&v6, a2); if ( v6 ) { flux::parser::Parser::consume( (flux::parser::Parser *)v8, (long long)a2, 94, 33LL, (long long)"Expected ')' after type in sizeof"); v15 = v13; v16 = v9; std::make_unique<flux::parser::SizeOfExpr,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>( &v7, &v6); *(_QWORD *)this = v7; std::string::~string(v11); } else { flux::parser::Parser::error( (int)a2, 34, (int)"Expected type in sizeof expression", v2, v3, v4, 0, v7, v8[0], v8[2], v8[4], v8[6], v8[8], v9, SDWORD2(v9), v10); *(_QWORD *)this = 0LL; } if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); std::string::~string(v14); return this; }
parseSizeOfExpr: PUSH R14 PUSH RBX SUB RSP,0x158 MOV R14,RSI MOV RBX,RDI ADD RSI,0x68 LEA RDI,[RSP + 0x70] CALL 0x0010a5ae LAB_0011e492: LEA R8,[0x12552b] LEA RDI,[RSP + 0xf8] PUSH 0x5d POP RDX PUSH 0x1b POP RCX MOV RSI,R14 CALL 0x00112f2a LEA RDI,[RSP + 0x138] CALL 0x001060e0 LAB_0011e4bc: MOV RDI,RSP MOV RSI,R14 CALL 0x00117f8c CMP qword ptr [RSP],0x0 JZ 0x0011e525 LAB_0011e4ce: LEA R8,[0x12556a] LEA RDI,[RSP + 0x10] PUSH 0x5e POP RDX PUSH 0x21 POP RCX MOV RSI,R14 CALL 0x00112f2a MOVUPS XMM0,xmmword ptr [RSP + 0x88] LEA RDX,[RSP + 0xd0] MOVAPS xmmword ptr [RDX],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVAPS xmmword ptr [RDX + 0x10],XMM0 LAB_0011e504: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x001212fb MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX],RAX LEA RDI,[RSP + 0x50] CALL 0x001060e0 JMP 0x0011e53b LAB_0011e525: LEA RDX,[0x125547] PUSH 0x22 POP RSI MOV RDI,R14 CALL 0x00112ca0 LAB_0011e537: AND qword ptr [RBX],0x0 LAB_0011e53b: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0011e54a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0011e54a: LEA RDI,[RSP + 0xb0] CALL 0x001060e0 MOV RAX,RBX ADD RSP,0x158 POP RBX POP R14 RET
/* flux::parser::Parser::parseSizeOfExpr() */ void flux::parser::Parser::parseSizeOfExpr(void) { long in_RSI; int8 *in_RDI; long *local_168; int8 local_160; int1 local_158 [40]; int8 local_130; int8 uStack_128; string local_118 [32]; Token local_f8 [24]; int8 local_e0; int8 uStack_d8; string local_b8 [32]; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int1 local_70 [64]; string local_30 [32]; lexer::Token::Token(local_f8,(Token *)(in_RSI + 0x68)); /* try { // try from 0011e492 to 0011e4ae has its CatchHandler @ 0011e58c */ consume(local_70); std::__cxx11::string::~string(local_30); /* try { // try from 0011e4bc to 0011e4c6 has its CatchHandler @ 0011e58a */ type(); if (local_168 == (long *)0x0) { /* try { // try from 0011e525 to 0011e536 has its CatchHandler @ 0011e565 */ error(); *in_RDI = 0; } else { /* try { // try from 0011e4ce to 0011e4e7 has its CatchHandler @ 0011e576 */ consume(local_158); local_98 = local_e0; uStack_90 = uStack_d8; local_88 = local_130; uStack_80 = uStack_128; /* try { // try from 0011e504 to 0011e510 has its CatchHandler @ 0011e567 */ std:: make_unique<flux::parser::SizeOfExpr,std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,flux::common::SourceRange> ((unique_ptr *)&local_160,(SourceRange *)&local_168); *in_RDI = local_160; std::__cxx11::string::~string(local_118); } if (local_168 != (long *)0x0) { (**(code **)(*local_168 + 8))(); } std::__cxx11::string::~string(local_b8); return; }
32,305
maria_ftparser_call_initializer
eloqsql/storage/maria/ma_ft_parser.c
MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info, uint keynr, uint paramnr) { uint32 ftparser_nr; struct st_mysql_ftparser *parser; if (!maria_ftparser_alloc_param(info)) return 0; if (keynr == NO_SUCH_KEY) { ftparser_nr= 0; parser= &ft_default_parser; } else { ftparser_nr= info->s->keyinfo[keynr].ftkey_nr; parser= info->s->keyinfo[keynr].parser; } DBUG_ASSERT(paramnr < MAX_PARAM_NR); ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr; if (! info->ftparser_param[ftparser_nr].mysql_add_word) { /* Note, that mysql_add_word is used here as a flag: mysql_add_word == 0 - parser is not initialized mysql_add_word != 0 - parser is initialized, or no initialization needed. */ info->ftparser_param[ftparser_nr].mysql_add_word= (int (*)(struct st_mysql_ftparser_param *, const char *, int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1; if (parser->init && parser->init(&info->ftparser_param[ftparser_nr])) return 0; } return &info->ftparser_param[ftparser_nr]; }
O0
c
maria_ftparser_call_initializer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x4bf70 cmpq $0x0, %rax jne 0x4c01e movq $0x0, -0x8(%rbp) jmp 0x4c11f cmpl $-0x1, -0x14(%rbp) jne 0x4c038 movl $0x0, -0x1c(%rbp) leaq 0x27314e(%rip), %rax # 0x2bf180 movq %rax, -0x28(%rbp) jmp 0x4c082 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movl 0xbc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xd0(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x4c084 jmp 0x4c086 movl -0x1c(%rbp), %eax shll %eax addl -0x18(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0x4c106 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movl $0x1, %ecx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x4c104 movq -0x28(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0x368(%rcx), %rdi movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rdi callq *%rax cmpl $0x0, %eax je 0x4c104 movq $0x0, -0x8(%rbp) jmp 0x4c11f jmp 0x4c106 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
maria_ftparser_call_initializer: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rdi, [rbp+var_10] call maria_ftparser_alloc_param cmp rax, 0 jnz short loc_4C01E mov [rbp+var_8], 0 jmp loc_4C11F loc_4C01E: cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_4C038 mov [rbp+var_1C], 0 lea rax, ft_default_parser mov [rbp+var_28], rax jmp short loc_4C082 loc_4C038: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov eax, [rax+0BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov rax, [rax+0D0h] mov [rbp+var_28], rax loc_4C082: jmp short $+2 loc_4C084: jmp short $+2 loc_4C086: mov eax, [rbp+var_1C] shl eax, 1 add eax, [rbp+var_18] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_4C106 mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov ecx, 1 mov [rax+8], rcx mov rax, [rbp+var_28] cmp qword ptr [rax+10h], 0 jz short loc_4C104 mov rax, [rbp+var_28] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rdi, [rcx+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rdi, rcx call rax cmp eax, 0 jz short loc_4C104 mov [rbp+var_8], 0 jmp short loc_4C11F loc_4C104: jmp short $+2 loc_4C106: mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov [rbp+var_8], rax loc_4C11F: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned long long maria_ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3) { _QWORD *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+14h] [rbp-1Ch] if ( !maria_ftparser_alloc_param(a1) ) return 0LL; if ( a2 == -1 ) { v5 = 0; v4 = &ft_default_parser; } else { v5 = *(_DWORD *)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 188); v4 = *(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 208); } v6 = a3 + 2 * v5; if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) && (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) = 1LL, v4[2]) && ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[109]) ) { return 0LL; } else { return ((unsigned long long)v6 << 6) + a1[109]; } }
maria_ftparser_call_initializer: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014bf70 CMP RAX,0x0 JNZ 0x0014c01e MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014c11f LAB_0014c01e: CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x0014c038 MOV dword ptr [RBP + -0x1c],0x0 LEA RAX,[0x3bf180] MOV qword ptr [RBP + -0x28],RAX JMP 0x0014c082 LAB_0014c038: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0xbc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x28],RAX LAB_0014c082: JMP 0x0014c084 LAB_0014c084: JMP 0x0014c086 LAB_0014c086: MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 ADD EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0014c106 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV ECX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0014c104 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RDI,RCX CALL RAX CMP EAX,0x0 JZ 0x0014c104 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014c11f LAB_0014c104: JMP 0x0014c106 LAB_0014c106: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0014c11f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long maria_ftparser_call_initializer(long *param_1,uint param_2,int param_3) { uint uVar1; int iVar2; long lVar3; int1 *local_30; int local_24; long local_10; lVar3 = maria_ftparser_alloc_param(param_1); if (lVar3 == 0) { local_10 = 0; } else { if (param_2 == 0xffffffff) { local_24 = 0; local_30 = ft_default_parser; } else { local_24 = *(int *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xbc); local_30 = *(int1 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xd0); } uVar1 = local_24 * 2 + param_3; if (((*(long *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) == 0) && (*(int8 *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) = 1, *(long *)(local_30 + 0x10) != 0)) && (iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x6d] + (ulong)uVar1 * 0x40), iVar2 != 0)) { local_10 = 0; } else { local_10 = param_1[0x6d] + (ulong)uVar1 * 0x40; } } return local_10; }
32,306
Balloc
eloqsql/strings/dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O3
c
Balloc: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %edi, %ebx cmpl $0xf, %edi jg 0xd4d91 movslq %ebx, %rcx movq 0x18(%rsi,%rcx,8), %rax testq %rax, %rax je 0xd4d91 movq (%rax), %rdx movq %rdx, 0x18(%rsi,%rcx,8) jmp 0xd4dcc movl $0x1, %r14d movl %ebx, %ecx shll %cl, %r14d movl $0x4, %edx shll %cl, %edx addl $0x1f, %edx andl $-0x8, %edx movq 0x8(%rsi), %rax movslq %edx, %rdi leaq (%rax,%rdi), %rcx cmpq 0x10(%rsi), %rcx jbe 0xd4dc1 callq 0x29710 jmp 0xd4dc5 movq %rcx, 0x8(%rsi) movl %ebx, 0x8(%rax) movl %r14d, 0xc(%rax) movq $0x0, 0x10(%rax) leaq 0x18(%rax), %rcx movq %rcx, (%rax) popq %rbx popq %r14 popq %rbp retq
Balloc: push rbp mov rbp, rsp push r14 push rbx mov ebx, edi cmp edi, 0Fh jg short loc_D4D91 movsxd rcx, ebx mov rax, [rsi+rcx*8+18h] test rax, rax jz short loc_D4D91 mov rdx, [rax] mov [rsi+rcx*8+18h], rdx jmp short loc_D4DCC loc_D4D91: mov r14d, 1 mov ecx, ebx shl r14d, cl mov edx, 4 shl edx, cl add edx, 1Fh and edx, 0FFFFFFF8h mov rax, [rsi+8] movsxd rdi, edx lea rcx, [rax+rdi] cmp rcx, [rsi+10h] jbe short loc_D4DC1 call _malloc jmp short loc_D4DC5 loc_D4DC1: mov [rsi+8], rcx loc_D4DC5: mov [rax+8], ebx mov [rax+0Ch], r14d loc_D4DCC: mov qword ptr [rax+10h], 0 lea rcx, [rax+18h] mov [rax], rcx pop rbx pop r14 pop rbp retn
long long Balloc(int a1, long long a2) { long long result; // rax long long v4; // rdi if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 ) { *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result; } else { result = *(_QWORD *)(a2 + 8); v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8); if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) ) *(_QWORD *)(a2 + 8) = result + v4; else result = malloc(v4); *(_DWORD *)(result + 8) = a1; *(_DWORD *)(result + 12) = 1 << a1; } *(_QWORD *)(result + 16) = 0LL; *(_QWORD *)result = result + 24; return result; }
Balloc: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EBX,EDI CMP EDI,0xf JG 0x001d4d91 MOVSXD RCX,EBX MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18] TEST RAX,RAX JZ 0x001d4d91 MOV RDX,qword ptr [RAX] MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX JMP 0x001d4dcc LAB_001d4d91: MOV R14D,0x1 MOV ECX,EBX SHL R14D,CL MOV EDX,0x4 SHL EDX,CL ADD EDX,0x1f AND EDX,0xfffffff8 MOV RAX,qword ptr [RSI + 0x8] MOVSXD RDI,EDX LEA RCX,[RAX + RDI*0x1] CMP RCX,qword ptr [RSI + 0x10] JBE 0x001d4dc1 CALL 0x00129710 JMP 0x001d4dc5 LAB_001d4dc1: MOV qword ptr [RSI + 0x8],RCX LAB_001d4dc5: MOV dword ptr [RAX + 0x8],EBX MOV dword ptr [RAX + 0xc],R14D LAB_001d4dcc: MOV qword ptr [RAX + 0x10],0x0 LEA RCX,[RAX + 0x18] MOV qword ptr [RAX],RCX POP RBX POP R14 POP RBP RET
void Balloc(int param_1,long param_2) { ulong uVar1; long *plVar2; size_t __size; if (param_1 < 0x10) { plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8); if (plVar2 != (long *)0x0) { *(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2; goto LAB_001d4dcc; } } plVar2 = *(long **)(param_2 + 8); __size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8); uVar1 = (long)plVar2 + __size; if (*(ulong *)(param_2 + 0x10) < uVar1) { plVar2 = (long *)malloc(__size); } else { *(ulong *)(param_2 + 8) = uVar1; } *(int *)(plVar2 + 1) = param_1; *(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f); LAB_001d4dcc: plVar2[2] = 0; *plVar2 = (long)(plVar2 + 3); return; }
32,307
minja::destructuring_assign(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::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O3
cpp
minja::destructuring_assign(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::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x786db leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x8a94c movq (%rbx), %rdi movq (%rdi), %rax movq %r14, %rsi movq %r12, %rdx callq *0x28(%rax) leaq 0x48(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x58f20 movq %rbx, %rdi callq 0x5e40e movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x78691 callq 0x6de32 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x786a0 callq 0x6de32 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x786af callq 0x6de32 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x787fd movq 0xb38c4(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x787e8 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x787f2 movq %rbx, (%rsp) cmpq $0x0, 0x10(%r12) je 0x7880c movq %rdi, %r15 movq %r12, %rdi callq 0x90996 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x7880c cmpq %rsi, %rcx je 0x787fd xorl %ebx, %ebx leaq 0x8(%rsp), %r13 xorl %ebp, %ebp movq (%rsp), %rax movq (%rax), %r14 addq %rbx, %rsi movq %r13, %rdi callq 0x8a94c movq %r12, %rdi movq %rbp, %rsi callq 0x90af6 movq (%r14), %rcx movq %r14, %rdi movq %r13, %rsi movq %rax, %rdx callq *0x28(%rcx) leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x58f20 movq %r14, %rdi callq 0x5e40e movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x78774 callq 0x6de32 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x78783 callq 0x6de32 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x78792 callq 0x6de32 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x787c8 movq 0xb37e5(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x787b3 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x787bd movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x787c8 movq (%rdi), %rax callq *0x18(%rax) incq %rbp movq (%r15), %rsi movq 0x8(%r15), %rax subq %rsi, %rax sarq $0x5, %rax addq $0x20, %rbx cmpq %rax, %rbp jb 0x78722 jmp 0x787fd movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x787fd movq (%rdi), %rax callq *0x18(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x78573(%rip), %rsi # 0xf0d93 movq %rax, %rdi callq 0x1a330 movq 0xb37c1(%rip), %rsi # 0x12bff0 movq 0xb372a(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af10 movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x7885a jmp 0x7884d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x868ee movq %rbx, %rdi callq 0x1af90
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, rdx mov rbx, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz loc_786DB lea r14, [rsp+88h+var_80] mov rdi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbx] mov rax, [rdi] mov rsi, r14 mov rdx, r12 call qword ptr [rax+28h] lea rbx, [rsp+88h+var_40] 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_78691 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_78691: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_786A0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_786A0: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_786AF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_786AF: mov rdi, [rsp+88h+var_78] test rdi, rdi jz loc_787FD mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_787E8 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_787F2 loc_786DB: mov [rsp+88h+var_88], rbx cmp qword ptr [r12+10h], 0 jz loc_7880C mov r15, rdi mov rdi, r12; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz loc_7880C cmp rcx, rsi jz loc_787FD xor ebx, ebx lea r13, [rsp+88h+var_80] xor ebp, ebp loc_78722: mov rax, [rsp+88h+var_88] mov r14, [rax] add rsi, rbx mov rdi, r13 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [r14] mov rdi, r14 mov rsi, r13 mov rdx, rax call qword ptr [rcx+28h] lea r14, [rsp+88h+var_40] 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, [rsp+88h+var_48] test rdi, rdi jz short loc_78774 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_78774: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_78783 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_78783: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_78792 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_78792: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_787C8 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_787B3 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_787BD loc_787B3: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_787BD: cmp eax, 1 jnz short loc_787C8 mov rax, [rdi] call qword ptr [rax+18h] loc_787C8: inc rbp mov rsi, [r15] mov rax, [r15+8] sub rax, rsi sar rax, 5 add rbx, 20h ; ' ' cmp rbp, rax jb loc_78722 jmp short loc_787FD loc_787E8: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_787F2: cmp eax, 1 jnz short loc_787FD mov rax, [rdi] call qword ptr [rax+18h] loc_787FD: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7880C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7885A jmp short $+2 loc_7884D: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7885A: mov rdi, rbx call __Unwind_Resume
unsigned long long minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { unsigned long long result; // rax long long v5; // rdi long long v7; // rsi long long v8; // rbx unsigned long long v9; // rbp long long v10; // r14 long long v11; // rax long long v12; // rdi signed __int32 v13; // eax std::runtime_error *exception; // r14 _BYTE v16[8]; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] volatile signed __int32 *v18; // [rsp+20h] [rbp-68h] volatile signed __int32 *v19; // [rsp+30h] [rbp-58h] volatile signed __int32 *v20; // [rsp+40h] [rbp-48h] char v21[64]; // [rsp+48h] [rbp-40h] BYREF if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v16, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v16, a3); 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(v21); 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(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v5 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } else { if ( !*((_QWORD *)a3 + 2) || (result = minja::Value::size(a3), v7 = *a1, result != (long long)(a1[1] - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( a1[1] != v7 ) { v8 = 0LL; v9 = 0LL; do { v10 = *a2; minja::Value::Value(v16, v8 + v7); v11 = minja::Value::at(a3, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v10 + 40LL))(v10, v16, v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v21); 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(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); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v12 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v13 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v13 - 1; } else { v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v13 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v12 + 24LL))(v12, 0LL); } ++v9; v7 = *a1; result = (long long)(a1[1] - *a1) >> 5; v8 += 32LL; } while ( v9 < result ); } } return result; }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,RDX MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x001786db LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0018a94c MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] LAB_00178663: MOV RSI,R14 MOV RDX,R12 CALL qword ptr [RAX + 0x28] LAB_0017866c: LEA RBX,[RSP + 0x48] MOV RDI,RBX XOR ESI,ESI CALL 0x00158f20 MOV RDI,RBX CALL 0x0015e40e MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x00178691 CALL 0x0016de32 LAB_00178691: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001786a0 CALL 0x0016de32 LAB_001786a0: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001786af CALL 0x0016de32 LAB_001786af: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001787fd MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x001787e8 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001787f2 LAB_001786db: MOV qword ptr [RSP],RBX CMP qword ptr [R12 + 0x10],0x0 JZ 0x0017880c MOV R15,RDI MOV RDI,R12 CALL 0x00190996 MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x0017880c CMP RCX,RSI JZ 0x001787fd XOR EBX,EBX LEA R13,[RSP + 0x8] XOR EBP,EBP LAB_00178722: MOV RAX,qword ptr [RSP] MOV R14,qword ptr [RAX] ADD RSI,RBX MOV RDI,R13 CALL 0x0018a94c LAB_00178734: MOV RDI,R12 MOV RSI,RBP CALL 0x00190af6 MOV RCX,qword ptr [R14] MOV RDI,R14 MOV RSI,R13 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_0017874e: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x00158f20 MOV RDI,R14 CALL 0x0015e40e MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00178774 CALL 0x0016de32 LAB_00178774: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00178783 CALL 0x0016de32 LAB_00178783: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00178792 CALL 0x0016de32 LAB_00178792: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001787c8 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x001787b3 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001787bd LAB_001787b3: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001787bd: CMP EAX,0x1 JNZ 0x001787c8 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001787c8: INC RBP MOV RSI,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] SUB RAX,RSI SAR RAX,0x5 ADD RBX,0x20 CMP RBP,RAX JC 0x00178722 JMP 0x001787fd LAB_001787e8: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001787f2: CMP EAX,0x1 JNZ 0x001787fd MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001787fd: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017880c: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_00178819: LEA RSI,[0x1f0d93] MOV RDI,RAX CALL 0x0011a330 LAB_00178828: MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,R14 CALL 0x0011af10
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { int *piVar1; long *plVar2; int iVar3; long lVar4; int8 uVar5; runtime_error *this; ulong uVar6; long lVar7; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 00178663 to 0017866b has its CatchHandler @ 0017884b */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); 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); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\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))(); } } return; } if (*(long *)(param_3 + 0x10) != 0) { lVar4 = Value::size(param_3); lVar7 = *(long *)param_1; if (lVar4 == *(long *)(param_1 + 8) - lVar7 >> 5) { if (*(long *)(param_1 + 8) == lVar7) { return; } lVar4 = 0; uVar6 = 0; do { plVar2 = *(long **)param_2; Value::Value(local_80,(string *)(lVar7 + lVar4)); /* try { // try from 00178734 to 0017874d has its CatchHandler @ 0017884d */ uVar5 = Value::at(param_3,uVar6); (**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5); 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); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\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))(); } } uVar6 = uVar6 + 1; lVar7 = *(long *)param_1; lVar4 = lVar4 + 0x20; } while (uVar6 < (ulong)(*(long *)(param_1 + 8) - lVar7 >> 5)); return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178819 to 00178827 has its CatchHandler @ 0017883e */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); }
32,308
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0x57dbd movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x57e41 movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x41e83 leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0x57de6 movq %rbx, %r13 jmp 0x57e0b movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x24290 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0x57ded cmpq %r14, %rbx jae 0x57e23 subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x241e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x57e41 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_57DBD mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_57E41 mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_57DBD: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_57DE6 mov r13, rbx jmp short loc_57E0B loc_57DE6: movsx r15, al mov r13, rbx loc_57DED: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_57DED loc_57E0B: cmp rbx, r14 jnb short loc_57E23 sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_57E23: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_57E41 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_57E41: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 long long v8; // r12 long long v9; // r13 _BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v11[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(char ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v10, v11); if ( v8 <= a3 ) { v9 = a2; do { memcpy(v5, v10); v5 += v8; v9 += v8; } while ( v5 + v8 <= v7 ); } else { v9 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v9); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x00157dbd MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00157e41 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00141e83 LAB_00157dbd: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x00157de6 MOV R13,RBX JMP 0x00157e0b LAB_00157de6: MOVSX R15,AL MOV R13,RBX LAB_00157ded: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00124290 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x00157ded LAB_00157e0b: CMP RBX,R14 JNC 0x00157e23 SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x001241e0 LAB_00157e23: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00157e41 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00157e41: CALL 0x001243e0
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
32,309
ma_pvio_read_async
eloqsql/libmariadb/libmariadb/ma_pvio.c
static size_t ma_pvio_read_async(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t res= 0; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; int timeout= pvio->timeout[PVIO_READ_TIMEOUT]; if (!pvio->methods->async_read) { PVIO_SET_ERROR(pvio->mysql, CR_ASYNC_NOT_SUPPORTED, unknown_sqlstate, 0); return -1; } for (;;) { if (pvio->methods->async_read) res= pvio->methods->async_read(pvio, buffer, length); if (res >= 0 || IS_BLOCKING_ERROR()) return res; b->events_to_wait_for= MYSQL_WAIT_READ; if (timeout >= 0) { b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT; b->timeout_value= timeout; } if (b->suspend_resume_hook) (*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data); my_context_yield(&b->async_context); if (b->suspend_resume_hook) (*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data); if (b->events_occurred & MYSQL_WAIT_TIMEOUT) return -1; } }
O0
c
ma_pvio_read_async: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax cmpq $0x0, 0x18(%rax) jne 0x2357c movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x2356f movq -0x10(%rbp), %rax movq 0x50(%rax), %r8 movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi leaq 0x3c922(%rip), %rax # 0x5fe80 movq (%rax), %rdx movl $0x138a, %esi # imm = 0x138A xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq *%r8 movq $-0x1, -0x8(%rbp) jmp 0x23664 jmp 0x2357e movq -0x10(%rbp), %rax movq 0x48(%rax), %rax cmpq $0x0, 0x18(%rax) je 0x235ab movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jge 0x235c6 callq 0x13050 cmpl $0xb, (%rax) je 0x235d3 callq 0x13050 cmpl $0x4, (%rax) je 0x235d3 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x23664 movq -0x30(%rbp), %rax movl $0x1, (%rax) cmpl $0x0, -0x34(%rbp) jl 0x235f8 movq -0x30(%rbp), %rax movl (%rax), %ecx orl $0x8, %ecx movl %ecx, (%rax) movl -0x34(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x2361a movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi movl $0x1, %edi callq *%rax movq -0x30(%rbp), %rdi addq $0x38, %rdi callq 0x3f430 movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x23646 movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi xorl %edi, %edi callq *%rax movq -0x30(%rbp), %rax movl 0x4(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2365f movq $-0x1, -0x8(%rbp) jmp 0x23664 jmp 0x2357e movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
ma_pvio_read_async: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+28h] mov [rbp+var_34], eax mov rax, [rbp+var_10] mov rax, [rax+48h] cmp qword ptr [rax+18h], 0 jnz short loc_2357C mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_2356F mov rax, [rbp+var_10] mov r8, [rax+50h] mov rax, [rbp+var_10] mov rdi, [rax+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 138Ah xor eax, eax mov ecx, eax mov al, 0 call r8 loc_2356F: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_23664 loc_2357C: jmp short $+2 loc_2357E: mov rax, [rbp+var_10] mov rax, [rax+48h] cmp qword ptr [rax+18h], 0 jz short loc_235AB mov rax, [rbp+var_10] mov rax, [rax+48h] mov rax, [rax+18h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_28], rax loc_235AB: cmp [rbp+var_28], 0 jge short loc_235C6 call ___errno_location cmp dword ptr [rax], 0Bh jz short loc_235D3 call ___errno_location cmp dword ptr [rax], 4 jz short loc_235D3 loc_235C6: mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp loc_23664 loc_235D3: mov rax, [rbp+var_30] mov dword ptr [rax], 1 cmp [rbp+var_34], 0 jl short loc_235F8 mov rax, [rbp+var_30] mov ecx, [rax] or ecx, 8 mov [rax], ecx mov ecx, [rbp+var_34] mov rax, [rbp+var_30] mov [rax+10h], ecx loc_235F8: mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_2361A mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] mov edi, 1 call rax loc_2361A: mov rdi, [rbp+var_30] add rdi, 38h ; '8' call my_context_yield mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_23646 mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] xor edi, edi call rax loc_23646: mov rax, [rbp+var_30] mov eax, [rax+4] and eax, 8 cmp eax, 0 jz short loc_2365F mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_23664 loc_2365F: jmp loc_2357E loc_23664: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_pvio_read_async(long long a1, long long a2, long long a3) { int v4; // [rsp+Ch] [rbp-34h] long long v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] v6 = 0LL; v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); v4 = *(_DWORD *)(a1 + 40); if ( *(_QWORD *)(*(_QWORD *)(a1 + 72) + 24LL) ) { do { if ( *(_QWORD *)(*(_QWORD *)(a1 + 72) + 24LL) ) v6 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 24LL))(a1, a2, a3); if ( v6 >= 0 || *(_DWORD *)__errno_location() != 11 && *(_DWORD *)__errno_location() != 4 ) return v6; *(_DWORD *)v5 = 1; if ( v4 >= 0 ) { *(_DWORD *)v5 |= 8u; *(_DWORD *)(v5 + 16) = v4; } if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(long long, _QWORD))(v5 + 32))(1LL, *(_QWORD *)(v5 + 40)); my_context_yield(v5 + 56); if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(_QWORD, _QWORD))(v5 + 32))(0LL, *(_QWORD *)(v5 + 40)); } while ( (*(_DWORD *)(v5 + 4) & 8) == 0 ); return -1LL; } else { if ( *(_QWORD *)(a1 + 80) ) (*(void ( **)(_QWORD, long long, char *, _QWORD))(a1 + 80))( *(_QWORD *)(a1 + 64), 5002LL, SQLSTATE_UNKNOWN, 0LL); return -1LL; } }
ma_pvio_read_async: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0012357c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0012356f MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] LEA RAX,[0x15fe80] MOV RDX,qword ptr [RAX] MOV ESI,0x138a XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL R8 LAB_0012356f: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00123664 LAB_0012357c: JMP 0x0012357e LAB_0012357e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] CMP qword ptr [RAX + 0x18],0x0 JZ 0x001235ab MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x18] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV qword ptr [RBP + -0x28],RAX LAB_001235ab: CMP qword ptr [RBP + -0x28],0x0 JGE 0x001235c6 CALL 0x00113050 CMP dword ptr [RAX],0xb JZ 0x001235d3 CALL 0x00113050 CMP dword ptr [RAX],0x4 JZ 0x001235d3 LAB_001235c6: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x00123664 LAB_001235d3: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x1 CMP dword ptr [RBP + -0x34],0x0 JL 0x001235f8 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] OR ECX,0x8 MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10],ECX LAB_001235f8: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0012361a MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] MOV EDI,0x1 CALL RAX LAB_0012361a: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x38 CALL 0x0013f430 MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00123646 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] XOR EDI,EDI CALL RAX LAB_00123646: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x8 CMP EAX,0x0 JZ 0x0012365f MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00123664 LAB_0012365f: JMP 0x0012357e LAB_00123664: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long ma_pvio_read_async(long param_1,int8 param_2,int8 param_3) { uint uVar1; uint *puVar2; int *piVar3; long local_30; local_30 = 0; puVar2 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); uVar1 = *(uint *)(param_1 + 0x28); if (*(long *)(*(long *)(param_1 + 0x48) + 0x18) == 0) { if (*(long *)(param_1 + 0x50) != 0) { (**(code **)(param_1 + 0x50))(*(int8 *)(param_1 + 0x40),0x138a,SQLSTATE_UNKNOWN,0); } } else { do { if (*(long *)(*(long *)(param_1 + 0x48) + 0x18) != 0) { local_30 = (**(code **)(*(long *)(param_1 + 0x48) + 0x18))(param_1,param_2,param_3); } if ((-1 < local_30) || ((piVar3 = __errno_location(), *piVar3 != 0xb && (piVar3 = __errno_location(), *piVar3 != 4)))) { return local_30; } *puVar2 = 1; if (-1 < (int)uVar1) { *puVar2 = *puVar2 | 8; puVar2[4] = uVar1; } if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10)); } my_context_yield(puVar2 + 0xe); if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10)); } } while ((puVar2[1] & 8) == 0); } return -1; }
32,310
coro::net::make_accept_socket(coro::net::socket::options const&, coro::net::ip_address const&, unsigned short, int)
AlayaLite/build_O3/_deps/libcoro-src/src/net/socket.cpp
auto make_accept_socket(const socket::options& opts, const net::ip_address& address, uint16_t port, int32_t backlog) -> socket { socket s = make_socket(opts); int sock_opt{1}; if (setsockopt(s.native_handle(), SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &sock_opt, sizeof(sock_opt)) < 0) { throw std::runtime_error{"Failed to setsockopt(SO_REUSEADDR | SO_REUSEPORT)"}; } sockaddr_in server{}; server.sin_family = static_cast<int>(opts.domain); server.sin_port = htons(port); server.sin_addr = *reinterpret_cast<const in_addr*>(address.data().data()); if (bind(s.native_handle(), (struct sockaddr*)&server, sizeof(server)) < 0) { throw std::runtime_error{"Failed to bind."}; } if (opts.type == socket::type_t::tcp) { if (listen(s.native_handle(), backlog) < 0) { throw std::runtime_error{"Failed to listen."}; } } return s; }
O3
cpp
coro::net::make_accept_socket(coro::net::socket::options const&, coro::net::ip_address const&, unsigned short, int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %r8d, %ebp movl %ecx, %r12d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx callq 0x8b49 leaq 0xc(%rsp), %rcx movl $0x1, (%rcx) movl (%rbx), %edi movl $0x1, %esi movl $0xf, %edx movl $0x4, %r8d callq 0x3450 testl %eax, %eax js 0x8ca8 leaq 0x10(%rsp), %rsi movq $0x0, 0x8(%rsi) movzwl (%r14), %eax movw %ax, (%rsi) rolw $0x8, %r12w movw %r12w, 0x2(%rsi) movl 0x4(%r15), %eax movl %eax, 0x4(%rsi) movl (%rbx), %edi movl $0x10, %edx callq 0x3060 testl %eax, %eax js 0x8cda cmpl $0x1, 0x4(%r14) jne 0x8c98 movl (%rbx), %edi movl %ebp, %esi callq 0x3300 testl %eax, %eax js 0x8cf8 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x3150 movq %rax, %r15 leaq 0x1956(%rip), %rsi # 0xa612 movq %rax, %rdi callq 0x3100 movq 0x7325(%rip), %rsi # 0xfff0 movq 0x72c6(%rip), %rdx # 0xff98 movq %r15, %rdi callq 0x3410 movl $0x10, %edi callq 0x3150 movq %rax, %r15 leaq 0x1956(%rip), %rsi # 0xa644 movq %rax, %rdi callq 0x3100 jmp 0x8d14 movl $0x10, %edi callq 0x3150 movq %rax, %r15 leaq 0x1948(%rip), %rsi # 0xa654 movq %rax, %rdi callq 0x3100 movq 0x72d5(%rip), %rsi # 0xfff0 movq 0x7276(%rip), %rdx # 0xff98 movq %r15, %rdi callq 0x3410 jmp 0x8d30 jmp 0x8d30 jmp 0x8d3d movq %rax, %r14 movq %r15, %rdi callq 0x3200 jmp 0x8d40 movq %rax, %r14 movq %rbx, %rdi callq 0x8d50 movq %r14, %rdi callq 0x3430
_ZN4coro3net18make_accept_socketERKNS0_6socket7optionsERKNS0_10ip_addressEti: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, r8d mov r12d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi call _ZN4coro3net11make_socketERKNS0_6socket7optionsE; coro::net::make_socket(coro::net::socket::options const&) lea rcx, [rsp+48h+var_3C] mov dword ptr [rcx], 1 mov edi, [rbx] mov esi, 1 mov edx, 0Fh mov r8d, 4 call _setsockopt test eax, eax js short loc_8CA8 lea rsi, [rsp+48h+var_38] mov qword ptr [rsi+8], 0 movzx eax, word ptr [r14] mov [rsi], ax rol r12w, 8 mov [rsi+2], r12w mov eax, [r15+4] mov [rsi+4], eax mov edi, [rbx] mov edx, 10h call _bind test eax, eax js short loc_8CDA cmp dword ptr [r14+4], 1 jnz short loc_8C98 mov edi, [rbx] mov esi, ebp call _listen test eax, eax js short loc_8CF8 loc_8C98: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_8CA8: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aFailedToSetsoc; "Failed to setsockopt(SO_REUSEADDR | SO_"... 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, r15; void * call ___cxa_throw loc_8CDA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aFailedToBind; "Failed to bind." mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_8D14 loc_8CF8: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aFailedToListen; "Failed to listen." mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_8D14: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_8D30 jmp short loc_8D30 jmp short loc_8D3D loc_8D30: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_8D40 loc_8D3D: mov r14, rax loc_8D40: mov rdi, rbx; this call _ZN4coro3net6socketD2Ev; coro::net::socket::~socket() mov rdi, r14 call __Unwind_Resume
unsigned int * coro::net::make_accept_socket( unsigned int *a1, unsigned int *a2, long long a3, __int16 a4, unsigned int a5) { std::runtime_error *exception; // r15 std::runtime_error *v10; // r15 int v11; // [rsp+Ch] [rbp-3Ch] BYREF _WORD v12[2]; // [rsp+10h] [rbp-38h] BYREF int v13; // [rsp+14h] [rbp-34h] long long v14; // [rsp+18h] [rbp-30h] coro::net::make_socket(a1, a2); v11 = 1; if ( (int)setsockopt(*a1, 1LL, 15LL, &v11, 4LL) < 0 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Failed to setsockopt(SO_REUSEADDR | SO_REUSEPORT)"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = 0LL; v12[0] = *(_WORD *)a2; v12[1] = __ROL2__(a4, 8); v13 = *(_DWORD *)(a3 + 4); if ( (int)bind(*a1, v12, 16LL) < 0 ) { v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v10, "Failed to bind."); goto LABEL_9; } if ( a2[1] == 1 && (int)listen(*a1, a5) < 0 ) { v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v10, "Failed to listen."); LABEL_9: __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return a1; }
make_accept_socket: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,R8D MOV R12D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI CALL 0x00108b49 LEA RCX,[RSP + 0xc] MOV dword ptr [RCX],0x1 MOV EDI,dword ptr [RBX] MOV ESI,0x1 MOV EDX,0xf MOV R8D,0x4 CALL 0x00103450 TEST EAX,EAX JS 0x00108ca8 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI + 0x8],0x0 MOVZX EAX,word ptr [R14] MOV word ptr [RSI],AX ROL R12W,0x8 MOV word ptr [RSI + 0x2],R12W MOV EAX,dword ptr [R15 + 0x4] MOV dword ptr [RSI + 0x4],EAX MOV EDI,dword ptr [RBX] MOV EDX,0x10 CALL 0x00103060 TEST EAX,EAX JS 0x00108cda CMP dword ptr [R14 + 0x4],0x1 JNZ 0x00108c98 MOV EDI,dword ptr [RBX] MOV ESI,EBP CALL 0x00103300 TEST EAX,EAX JS 0x00108cf8 LAB_00108c98: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00108ca8: MOV EDI,0x10 CALL 0x00103150 MOV R15,RAX LAB_00108cb5: LEA RSI,[0x10a612] MOV RDI,RAX CALL 0x00103100 LAB_00108cc4: MOV RSI,qword ptr [0x0010fff0] MOV RDX,qword ptr [0x0010ff98] MOV RDI,R15 CALL 0x00103410 LAB_00108cda: MOV EDI,0x10 CALL 0x00103150 MOV R15,RAX LAB_00108ce7: LEA RSI,[0x10a644] MOV RDI,RAX CALL 0x00103100 LAB_00108cf6: JMP 0x00108d14 LAB_00108cf8: MOV EDI,0x10 CALL 0x00103150 MOV R15,RAX LAB_00108d05: LEA RSI,[0x10a654] MOV RDI,RAX CALL 0x00103100 LAB_00108d14: MOV RSI,qword ptr [0x0010fff0] MOV RDX,qword ptr [0x0010ff98] MOV RDI,R15 CALL 0x00103410
/* coro::net::make_accept_socket(coro::net::socket::options const&, coro::net::ip_address const&, unsigned short, int) */ net * __thiscall coro::net::make_accept_socket (net *this,options *param_1,ip_address *param_2,ushort param_3,int param_4) { int iVar1; runtime_error *prVar2; int4 local_3c; sockaddr local_38; make_socket(this,param_1); local_3c = 1; iVar1 = setsockopt(*(int *)this,1,0xf,&local_3c,4); if (iVar1 < 0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00108cb5 to 00108cc3 has its CatchHandler @ 00108d30 */ std::runtime_error::runtime_error(prVar2,"Failed to setsockopt(SO_REUSEADDR | SO_REUSEPORT)"); /* try { // try from 00108cc4 to 00108cd9 has its CatchHandler @ 00108d2e */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_0010fff0,PTR__runtime_error_0010ff98); } local_38.sa_data[6] = '\0'; local_38.sa_data[7] = '\0'; local_38.sa_data[8] = '\0'; local_38.sa_data[9] = '\0'; local_38.sa_data[10] = '\0'; local_38.sa_data[0xb] = '\0'; local_38.sa_data[0xc] = '\0'; local_38.sa_data[0xd] = '\0'; local_38.sa_family = *(sa_family_t *)param_1; local_38.sa_data._0_2_ = param_3 << 8 | param_3 >> 8; local_38.sa_data._2_4_ = *(int4 *)(param_2 + 4); iVar1 = bind(*(int *)this,&local_38,0x10); if (-1 < iVar1) { if (*(int *)(param_1 + 4) == 1) { iVar1 = listen(*(int *)this,param_4); if (iVar1 < 0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00108d05 to 00108d13 has its CatchHandler @ 00108d2a */ std::runtime_error::runtime_error(prVar2,"Failed to listen."); goto LAB_00108d14; } } return this; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00108ce7 to 00108cf5 has its CatchHandler @ 00108d2c */ std::runtime_error::runtime_error(prVar2,"Failed to bind."); LAB_00108d14: /* try { // try from 00108d14 to 00108d29 has its CatchHandler @ 00108d3d */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_0010fff0,PTR__runtime_error_0010ff98); }
32,311
free_ic
bluesky950520[P]quickjs/quickjs.c
int free_ic(JSRuntime* rt, JSInlineCache *ic) { uint32_t i; JSInlineCacheHashSlot *ch, *ch_next; JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY]; if (ic->cache) { for (i = 0; i < ic->count; i++) { shapes = &ic->cache[i].shape; JS_FreeAtomRT(rt, ic->cache[i].atom); for (shape = *shapes; shape != endof(*shapes); shape++) js_free_shape_null(rt, *shape); } } for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { ch_next = ch->next; JS_FreeAtomRT(rt, ch->atom); js_free_rt(rt, ch); } } if (ic->count > 0) js_free_rt(rt, ic->cache); js_free_rt(rt, ic->hash); js_free_rt(rt, ic); return 0; }
O0
c
free_ic: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x5f0e1 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx cmpl (%rcx), %eax jae 0x5f0df movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movl 0x24(%rsp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, (%rsp) movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movl 0x24(%rsp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movl 0x30(%rax), %esi callq 0x23da0 movq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq (%rsp), %rcx addq $0x20, %rcx cmpq %rcx, %rax je 0x5f0cd movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq (%rax), %rsi callq 0x27eb0 movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x8(%rsp) jmp 0x5f099 jmp 0x5f0cf movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x5f046 jmp 0x5f0e1 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jae 0x5f15e movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movl 0x24(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0x5f14f movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rax movl (%rax), %esi callq 0x23da0 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x21960 movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) jmp 0x5f10d jmp 0x5f151 movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x5f0e9 movq 0x28(%rsp), %rax cmpl $0x0, (%rax) jbe 0x5f17b movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x18(%rax), %rsi callq 0x21960 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rsi callq 0x21960 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x21960 xorl %eax, %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
free_ic: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_10] cmp qword ptr [rax+18h], 0 jz loc_5F0E1 mov [rsp+38h+var_14], 0 loc_5F046: mov eax, [rsp+38h+var_14] mov rcx, [rsp+38h+var_10] cmp eax, [rcx] jnb loc_5F0DF mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov ecx, [rsp+38h+var_14] imul rcx, 38h ; '8' add rax, rcx mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov ecx, [rsp+38h+var_14] imul rcx, 38h ; '8' add rax, rcx mov esi, [rax+30h] call JS_FreeAtomRT mov rax, [rsp+38h+var_38] mov [rsp+38h+var_30], rax loc_5F099: mov rax, [rsp+38h+var_30] mov rcx, [rsp+38h+var_38] add rcx, 20h ; ' ' cmp rax, rcx jz short loc_5F0CD mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_30] mov rsi, [rax] call js_free_shape_null mov rax, [rsp+38h+var_30] add rax, 8 mov [rsp+38h+var_30], rax jmp short loc_5F099 loc_5F0CD: jmp short $+2 loc_5F0CF: mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax jmp loc_5F046 loc_5F0DF: jmp short $+2 loc_5F0E1: mov [rsp+38h+var_14], 0 loc_5F0E9: mov eax, [rsp+38h+var_14] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+4] jnb short loc_5F15E mov rax, [rsp+38h+var_10] mov rax, [rax+10h] mov ecx, [rsp+38h+var_14] mov rax, [rax+rcx*8] mov [rsp+38h+var_20], rax loc_5F10D: cmp [rsp+38h+var_20], 0 jz short loc_5F14F mov rax, [rsp+38h+var_20] mov rax, [rax+8] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_20] mov esi, [rax] call JS_FreeAtomRT mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_20] call js_free_rt mov rax, [rsp+38h+var_28] mov [rsp+38h+var_20], rax jmp short loc_5F10D loc_5F14F: jmp short $+2 loc_5F151: mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax jmp short loc_5F0E9 loc_5F15E: mov rax, [rsp+38h+var_10] cmp dword ptr [rax], 0 jbe short loc_5F17B mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rsi, [rax+18h] call js_free_rt loc_5F17B: mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rsi, [rax+10h] call js_free_rt mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call js_free_rt xor eax, eax add rsp, 38h retn
long long free_ic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-38h] long long *j; // [rsp+8h] [rbp-30h] long long v5; // [rsp+10h] [rbp-28h] long long m; // [rsp+18h] [rbp-20h] unsigned int i; // [rsp+24h] [rbp-14h] unsigned int k; // [rsp+24h] [rbp-14h] if ( *(_QWORD *)(a2 + 24) ) { for ( i = 0; i < *(_DWORD *)a2; ++i ) { v3 = 56LL * i + *(_QWORD *)(a2 + 24); JS_FreeAtomRT(a1, *(_DWORD *)(v3 + 48)); for ( j = (long long *)v3; j != (long long *)(v3 + 32); ++j ) js_free_shape_null(a1, *j); } } for ( k = 0; k < *(_DWORD *)(a2 + 4); ++k ) { for ( m = *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * k); m; m = v5 ) { v5 = *(_QWORD *)(m + 8); JS_FreeAtomRT(a1, *(_DWORD *)m); js_free_rt(a1, m); } } if ( *(_DWORD *)a2 ) js_free_rt(a1, *(_QWORD *)(a2 + 24)); js_free_rt(a1, *(_QWORD *)(a2 + 16)); js_free_rt(a1, a2); return 0LL; }
free_ic: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0015f0e1 MOV dword ptr [RSP + 0x24],0x0 LAB_0015f046: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX] JNC 0x0015f0df MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RSP + 0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RSP + 0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV ESI,dword ptr [RAX + 0x30] CALL 0x00123da0 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX LAB_0015f099: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP] ADD RCX,0x20 CMP RAX,RCX JZ 0x0015f0cd MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX] CALL 0x00127eb0 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x8],RAX JMP 0x0015f099 LAB_0015f0cd: JMP 0x0015f0cf LAB_0015f0cf: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0015f046 LAB_0015f0df: JMP 0x0015f0e1 LAB_0015f0e1: MOV dword ptr [RSP + 0x24],0x0 LAB_0015f0e9: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JNC 0x0015f15e MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX LAB_0015f10d: CMP qword ptr [RSP + 0x18],0x0 JZ 0x0015f14f MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RAX] CALL 0x00123da0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00121960 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX JMP 0x0015f10d LAB_0015f14f: JMP 0x0015f151 LAB_0015f151: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0015f0e9 LAB_0015f15e: MOV RAX,qword ptr [RSP + 0x28] CMP dword ptr [RAX],0x0 JBE 0x0015f17b MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x18] CALL 0x00121960 LAB_0015f17b: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00121960 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00121960 XOR EAX,EAX ADD RSP,0x38 RET
int8 free_ic(int8 param_1,uint *param_2) { long lVar1; int4 *puVar2; int8 *puVar3; int8 *local_30; int4 *local_20; uint local_14; if (*(long *)(param_2 + 6) != 0) { for (local_14 = 0; local_14 < *param_2; local_14 = local_14 + 1) { lVar1 = *(long *)(param_2 + 6); JS_FreeAtomRT(param_1,*(int4 *)(*(long *)(param_2 + 6) + (ulong)local_14 * 0x38 + 0x30)) ; puVar3 = (int8 *)(lVar1 + (ulong)local_14 * 0x38); for (local_30 = puVar3; local_30 != puVar3 + 4; local_30 = local_30 + 1) { js_free_shape_null(param_1,*local_30); } } } for (local_14 = 0; local_14 < param_2[1]; local_14 = local_14 + 1) { local_20 = *(int4 **)(*(long *)(param_2 + 4) + (ulong)local_14 * 8); while (local_20 != (int4 *)0x0) { puVar2 = *(int4 **)(local_20 + 2); JS_FreeAtomRT(param_1,*local_20); js_free_rt(param_1,local_20); local_20 = puVar2; } } if (*param_2 != 0) { js_free_rt(param_1,*(int8 *)(param_2 + 6)); } js_free_rt(param_1,*(int8 *)(param_2 + 4)); js_free_rt(param_1,param_2); return 0; }
32,312
free_ic
bluesky950520[P]quickjs/quickjs.c
int free_ic(JSRuntime* rt, JSInlineCache *ic) { uint32_t i; JSInlineCacheHashSlot *ch, *ch_next; JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY]; if (ic->cache) { for (i = 0; i < ic->count; i++) { shapes = &ic->cache[i].shape; JS_FreeAtomRT(rt, ic->cache[i].atom); for (shape = *shapes; shape != endof(*shapes); shape++) js_free_shape_null(rt, *shape); } } for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { ch_next = ch->next; JS_FreeAtomRT(rt, ch->atom); js_free_rt(rt, ch); } } if (ic->count > 0) js_free_rt(rt, ic->cache); js_free_rt(rt, ic->hash); js_free_rt(rt, ic); return 0; }
O2
c
free_ic: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, 0x18(%rsi) je 0x356ac xorl %r15d, %r15d xorl %r12d, %r12d movl (%rbx), %eax cmpq %rax, %r12 jae 0x356ac movq 0x18(%rbx), %r13 imulq $0x38, %r12, %rax movl 0x30(%r13,%rax), %esi movq %r14, %rdi callq 0x182d0 addq %r15, %r13 xorl %ebp, %ebp cmpq $0x20, %rbp je 0x356a3 movq (%r13,%rbp), %rsi movq %r14, %rdi callq 0x1a17b addq $0x8, %rbp jmp 0x3568a incq %r12 addq $0x38, %r15 jmp 0x35669 xorl %r12d, %r12d movl 0x4(%rbx), %eax cmpq %rax, %r12 jae 0x356e8 movq 0x10(%rbx), %rax movq (%rax,%r12,8), %r15 testq %r15, %r15 je 0x356e3 movq 0x8(%r15), %r13 movl (%r15), %esi movq %r14, %rdi callq 0x182d0 movq %r14, %rdi movq %r15, %rsi callq 0x170cb movq %r13, %r15 jmp 0x356bf incq %r12 jmp 0x356af cmpl $0x0, (%rbx) je 0x356f9 movq 0x18(%rbx), %rsi movq %r14, %rdi callq 0x170cb movq 0x10(%rbx), %rsi movq %r14, %rdi callq 0x170cb movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x170cb
free_ic: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi cmp qword ptr [rsi+18h], 0 jz short loc_356AC xor r15d, r15d xor r12d, r12d loc_35669: mov eax, [rbx] cmp r12, rax jnb short loc_356AC mov r13, [rbx+18h] imul rax, r12, 38h ; '8' mov esi, [r13+rax+30h] mov rdi, r14 call JS_FreeAtomRT add r13, r15 xor ebp, ebp loc_3568A: cmp rbp, 20h ; ' ' jz short loc_356A3 mov rsi, [r13+rbp+0] mov rdi, r14 call js_free_shape_null add rbp, 8 jmp short loc_3568A loc_356A3: inc r12 add r15, 38h ; '8' jmp short loc_35669 loc_356AC: xor r12d, r12d loc_356AF: mov eax, [rbx+4] cmp r12, rax jnb short loc_356E8 mov rax, [rbx+10h] mov r15, [rax+r12*8] loc_356BF: test r15, r15 jz short loc_356E3 mov r13, [r15+8] mov esi, [r15] mov rdi, r14 call JS_FreeAtomRT mov rdi, r14 mov rsi, r15 call js_free_rt mov r15, r13 jmp short loc_356BF loc_356E3: inc r12 jmp short loc_356AF loc_356E8: cmp dword ptr [rbx], 0 jz short loc_356F9 mov rsi, [rbx+18h] mov rdi, r14 call js_free_rt loc_356F9: mov rsi, [rbx+10h] mov rdi, r14 call js_free_rt mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp js_free_rt
long long free_ic(long long a1, unsigned int *a2) { long long v2; // r15 unsigned long long i; // r12 long long v4; // r13 long long v5; // r13 long long j; // rbp unsigned long long k; // r12 long long m; // r15 long long v9; // r13 if ( *((_QWORD *)a2 + 3) ) { v2 = 0LL; for ( i = 0LL; i < *a2; ++i ) { v4 = *((_QWORD *)a2 + 3); JS_FreeAtomRT(a1, *(_DWORD *)(v4 + 56 * i + 48)); v5 = v2 + v4; for ( j = 0LL; j != 32; j += 8LL ) js_free_shape_null(a1, *(_QWORD *)(v5 + j)); v2 += 56LL; } } for ( k = 0LL; k < a2[1]; ++k ) { for ( m = *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * k); m; m = v9 ) { v9 = *(_QWORD *)(m + 8); JS_FreeAtomRT(a1, *(_DWORD *)m); js_free_rt(a1, m); } } if ( *a2 ) js_free_rt(a1, *((_QWORD *)a2 + 3)); js_free_rt(a1, *((_QWORD *)a2 + 2)); return js_free_rt(a1, (long long)a2); }
free_ic: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CMP qword ptr [RSI + 0x18],0x0 JZ 0x001356ac XOR R15D,R15D XOR R12D,R12D LAB_00135669: MOV EAX,dword ptr [RBX] CMP R12,RAX JNC 0x001356ac MOV R13,qword ptr [RBX + 0x18] IMUL RAX,R12,0x38 MOV ESI,dword ptr [R13 + RAX*0x1 + 0x30] MOV RDI,R14 CALL 0x001182d0 ADD R13,R15 XOR EBP,EBP LAB_0013568a: CMP RBP,0x20 JZ 0x001356a3 MOV RSI,qword ptr [R13 + RBP*0x1] MOV RDI,R14 CALL 0x0011a17b ADD RBP,0x8 JMP 0x0013568a LAB_001356a3: INC R12 ADD R15,0x38 JMP 0x00135669 LAB_001356ac: XOR R12D,R12D LAB_001356af: MOV EAX,dword ptr [RBX + 0x4] CMP R12,RAX JNC 0x001356e8 MOV RAX,qword ptr [RBX + 0x10] MOV R15,qword ptr [RAX + R12*0x8] LAB_001356bf: TEST R15,R15 JZ 0x001356e3 MOV R13,qword ptr [R15 + 0x8] MOV ESI,dword ptr [R15] MOV RDI,R14 CALL 0x001182d0 MOV RDI,R14 MOV RSI,R15 CALL 0x001170cb MOV R15,R13 JMP 0x001356bf LAB_001356e3: INC R12 JMP 0x001356af LAB_001356e8: CMP dword ptr [RBX],0x0 JZ 0x001356f9 MOV RSI,qword ptr [RBX + 0x18] MOV RDI,R14 CALL 0x001170cb LAB_001356f9: MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R14 CALL 0x001170cb MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001170cb
void free_ic(int8 param_1,uint *param_2) { long lVar1; int4 *puVar2; long lVar3; ulong uVar4; long lVar5; int4 *puVar6; if (*(long *)(param_2 + 6) != 0) { lVar5 = 0; for (uVar4 = 0; uVar4 < *param_2; uVar4 = uVar4 + 1) { lVar1 = *(long *)(param_2 + 6); JS_FreeAtomRT(param_1,*(int4 *)(lVar1 + 0x30 + uVar4 * 0x38)); for (lVar3 = 0; lVar3 != 0x20; lVar3 = lVar3 + 8) { js_free_shape_null(param_1,*(int8 *)(lVar1 + lVar5 + lVar3)); } lVar5 = lVar5 + 0x38; } } for (uVar4 = 0; uVar4 < param_2[1]; uVar4 = uVar4 + 1) { puVar6 = *(int4 **)(*(long *)(param_2 + 4) + uVar4 * 8); while (puVar6 != (int4 *)0x0) { puVar2 = *(int4 **)(puVar6 + 2); JS_FreeAtomRT(param_1,*puVar6); js_free_rt(param_1,puVar6); puVar6 = puVar2; } } if (*param_2 != 0) { js_free_rt(param_1,*(int8 *)(param_2 + 6)); } js_free_rt(param_1,*(int8 *)(param_2 + 4)); js_free_rt(param_1,param_2); return; }
32,313
r3d_render_apply_blend_mode
r3d/src/r3d_core.c
void r3d_render_apply_blend_mode(R3D_BlendMode mode) { switch (mode) { case R3D_BLEND_OPAQUE: glDisable(GL_BLEND); break; case R3D_BLEND_ALPHA: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); break; case R3D_BLEND_ADDITIVE: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); break; case R3D_BLEND_MULTIPLY: glEnable(GL_BLEND); glBlendFunc(GL_DST_COLOR, GL_ZERO); break; default: break; } }
O3
c
r3d_render_apply_blend_mode: pushq %rbp movq %rsp, %rbp cmpl $0x3, %edi ja 0xd1d0f movl %edi, %eax leaq 0x491b7(%rip), %rcx # 0x11ae44 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xb2073(%rip), %rax # 0x183d10 movl $0xbe2, %edi # imm = 0xBE2 popq %rbp jmpq *(%rax) leaq 0xb2164(%rip), %rax # 0x183e10 movl $0xbe2, %edi # imm = 0xBE2 callq *(%rax) leaq 0xb1c46(%rip), %rax # 0x183900 movq (%rax), %rax movl $0x302, %edi # imm = 0x302 movl $0x1, %esi jmp 0xd1d0c leaq 0xb2140(%rip), %rax # 0x183e10 movl $0xbe2, %edi # imm = 0xBE2 callq *(%rax) leaq 0xb1c22(%rip), %rax # 0x183900 movq (%rax), %rax movl $0x306, %edi # imm = 0x306 xorl %esi, %esi jmp 0xd1d0c leaq 0xb211f(%rip), %rax # 0x183e10 movl $0xbe2, %edi # imm = 0xBE2 callq *(%rax) leaq 0xb1c01(%rip), %rax # 0x183900 movq (%rax), %rax movl $0x302, %edi # imm = 0x302 movl $0x303, %esi # imm = 0x303 popq %rbp jmpq *%rax popq %rbp retq nopl (%rax)
r3d_render_apply_blend_mode: push rbp mov rbp, rsp cmp edi, 3; switch 4 cases ja def_D1C94; jumptable 00000000000D1C94 default case mov eax, edi lea rcx, jpt_D1C94 movsxd rax, ds:(jpt_D1C94 - 11AE44h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_D1C96: lea rax, glad_glDisable; jumptable 00000000000D1C94 case 0 mov edi, 0BE2h pop rbp jmp qword ptr [rax] loc_D1CA5: lea rax, glad_glEnable; jumptable 00000000000D1C94 case 2 mov edi, 0BE2h call qword ptr [rax] lea rax, glad_glBlendFunc mov rax, [rax] mov edi, 302h mov esi, 1 jmp short loc_D1D0C loc_D1CC9: lea rax, glad_glEnable; jumptable 00000000000D1C94 case 3 mov edi, 0BE2h call qword ptr [rax] lea rax, glad_glBlendFunc mov rax, [rax] mov edi, 306h xor esi, esi jmp short loc_D1D0C loc_D1CEA: lea rax, glad_glEnable; jumptable 00000000000D1C94 case 1 mov edi, 0BE2h call qword ptr [rax] lea rax, glad_glBlendFunc mov rax, [rax] mov edi, 302h mov esi, 303h loc_D1D0C: pop rbp jmp rax def_D1C94: pop rbp; jumptable 00000000000D1C94 default case retn
long long r3d_render_apply_blend_mode(unsigned int a1) { long long result; // rax long long ( *v2)(long long, long long); // rax long long v3; // rdi long long v4; // rsi result = a1; switch ( a1 ) { case 0u: return glad_glDisable(3042LL); case 1u: glad_glEnable(3042LL); v2 = glad_glBlendFunc; v3 = 770LL; v4 = 771LL; goto LABEL_6; case 2u: glad_glEnable(3042LL); v2 = glad_glBlendFunc; v3 = 770LL; v4 = 1LL; goto LABEL_6; case 3u: glad_glEnable(3042LL); v2 = glad_glBlendFunc; v3 = 774LL; v4 = 0LL; LABEL_6: result = v2(v3, v4); break; default: return result; } return result; }
r3d_render_apply_blend_mode: PUSH RBP MOV RBP,RSP CMP EDI,0x3 JA 0x001d1d0f MOV EAX,EDI LEA RCX,[0x21ae44] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x283d10] MOV EDI,0xbe2 POP RBP JMP qword ptr [RAX] caseD_2: LEA RAX,[0x283e10] MOV EDI,0xbe2 CALL qword ptr [RAX] LEA RAX,[0x283900] MOV RAX,qword ptr [RAX] MOV EDI,0x302 MOV ESI,0x1 JMP 0x001d1d0c caseD_3: LEA RAX,[0x283e10] MOV EDI,0xbe2 CALL qword ptr [RAX] LEA RAX,[0x283900] MOV RAX,qword ptr [RAX] MOV EDI,0x306 XOR ESI,ESI JMP 0x001d1d0c caseD_1: LEA RAX,[0x283e10] MOV EDI,0xbe2 CALL qword ptr [RAX] LEA RAX,[0x283900] MOV RAX,qword ptr [RAX] MOV EDI,0x302 MOV ESI,0x303 LAB_001d1d0c: POP RBP JMP RAX default: POP RBP RET
void r3d_render_apply_blend_mode(int4 param_1) { int8 uVar1; int8 uVar2; switch(param_1) { case 0: /* WARNING: Could not recover jumptable at 0x001d1ca3. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glDisable)(0xbe2); return; case 1: (*glad_glEnable)(0xbe2); uVar2 = 0x302; uVar1 = 0x303; break; case 2: (*glad_glEnable)(0xbe2); uVar2 = 0x302; uVar1 = 1; break; case 3: (*glad_glEnable)(0xbe2); uVar2 = 0x306; uVar1 = 0; break; default: return; } /* WARNING: Could not recover jumptable at 0x001d1d0d. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glBlendFunc)(uVar2,uVar1); return; }
32,314
maria_rtree_set_key_mbr
eloqsql/storage/maria/ma_rt_key.c
int maria_rtree_set_key_mbr(MARIA_HA *info, MARIA_KEY *key, my_off_t child_page) { MARIA_PAGE page; DBUG_ENTER("maria_rtree_set_key_mbr"); if (_ma_fetch_keypage(&page, info, key->keyinfo, child_page, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, info->buff, 0)) DBUG_RETURN(-1); DBUG_RETURN(maria_rtree_page_mbr(key->keyinfo->seg, &page, key->data, key->data_length)); }
O3
c
maria_rtree_set_key_mbr: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x38, %rsp movq %rdx, %rcx movq %rsi, %rbx movq %rdi, %rsi movq 0x8(%rbx), %rdx leaq -0x40(%rbp), %rdi xorl %r8d, %r8d movl $0x3, %r9d pushq $0x0 pushq 0x378(%rsi) callq 0x6f1c2 addq $0x10, %rsp movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl jne 0x634a8 movq (%rbx), %rdx movq 0x8(%rbx), %rax movq 0xc0(%rax), %rdi movl 0x10(%rbx), %ecx leaq -0x40(%rbp), %rsi callq 0x65852 addq $0x38, %rsp popq %rbx popq %rbp retq nop
maria_rtree_set_key_mbr: push rbp mov rbp, rsp push rbx sub rsp, 38h mov rcx, rdx mov rbx, rsi mov rsi, rdi mov rdx, [rbx+8] lea rdi, [rbp+var_40] xor r8d, r8d mov r9d, 3 push 0 push qword ptr [rsi+378h] call _ma_fetch_keypage add rsp, 10h mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jnz short loc_634A8 mov rdx, [rbx] mov rax, [rbx+8] mov rdi, [rax+0C0h] mov ecx, [rbx+10h] lea rsi, [rbp+var_40] call maria_rtree_page_mbr loc_634A8: add rsp, 38h pop rbx pop rbp retn
long long maria_rtree_set_key_mbr(long long a1, long long a2, int a3) { char keypage; // cl long long result; // rax _BYTE v5[64]; // [rsp+0h] [rbp-40h] BYREF keypage = ma_fetch_keypage((unsigned int)v5, a1, *(_QWORD *)(a2 + 8), a3, 0, 3, *(_QWORD *)(a1 + 888)); result = 0xFFFFFFFFLL; if ( !keypage ) return maria_rtree_page_mbr(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 192LL), v5, *(_QWORD *)a2, *(unsigned int *)(a2 + 16)); return result; }
maria_rtree_set_key_mbr: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV RCX,RDX MOV RBX,RSI MOV RSI,RDI MOV RDX,qword ptr [RBX + 0x8] LEA RDI,[RBP + -0x40] XOR R8D,R8D MOV R9D,0x3 PUSH 0x0 PUSH qword ptr [RSI + 0x378] CALL 0x0016f1c2 ADD RSP,0x10 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JNZ 0x001634a8 MOV RDX,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0xc0] MOV ECX,dword ptr [RBX + 0x10] LEA RSI,[RBP + -0x40] CALL 0x00165852 LAB_001634a8: ADD RSP,0x38 POP RBX POP RBP RET
int8 maria_rtree_set_key_mbr(long param_1,int8 *param_2,int8 param_3) { char cVar1; int8 uVar2; int1 local_48 [56]; cVar1 = _ma_fetch_keypage(local_48,param_1,param_2[1],param_3,0,3,*(int8 *)(param_1 + 0x378) ,0); uVar2 = 0xffffffff; if (cVar1 == '\0') { uVar2 = maria_rtree_page_mbr (*(int8 *)(param_2[1] + 0xc0),local_48,*param_2, *(int4 *)(param_2 + 2)); } return uVar2; }
32,315
LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingSpacingInfluenceWidth(double width, double distance, double spacing) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTINGWIDTH) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g", width, distance, spacing); else fprintf(lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", width, distance, spacing); lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double): subq $0x28, %rsp movsd %xmm0, 0x18(%rsp) movsd %xmm1, 0x10(%rsp) movsd %xmm2, 0x8(%rsp) leaq 0xa62a3(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x1efc0 movl $0x1, 0x24(%rsp) jmp 0x1f052 leaq 0xa64d9(%rip), %rax # 0xc54a0 cmpl $0x20, (%rax) je 0x1efd6 movl $0x2, 0x24(%rsp) jmp 0x1f052 cmpl $0x0, 0xa655f(%rip) # 0xc553c je 0x1f00b leaq 0xa626a(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x18(%rsp), %xmm0 movsd 0x10(%rsp), %xmm1 movsd 0x8(%rsp), %xmm2 leaq 0x74223(%rip), %rsi # 0x93225 movb $0x3, %al callq 0x8bf50 jmp 0x1f035 leaq 0xa623e(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x18(%rsp), %xmm0 movsd 0x10(%rsp), %xmm1 movsd 0x8(%rsp), %xmm2 leaq 0x74229(%rip), %rsi # 0x93257 movb $0x3, %al callq 0x2370 leaq 0xa6460(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xa6454(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser37lefwLayerRoutingSpacingInfluenceWidthEddd: sub rsp, 28h movsd [rsp+28h+var_10], xmm0 movsd [rsp+28h+var_18], xmm1 movsd [rsp+28h+var_20], xmm2 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_1EFC0 mov [rsp+28h+var_4], 1 jmp loc_1F052 loc_1EFC0: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 20h ; ' ' jz short loc_1EFD6 mov [rsp+28h+var_4], 2 jmp short loc_1F052 loc_1EFD6: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1F00B lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+28h+var_10] movsd xmm1, [rsp+28h+var_18] movsd xmm2, [rsp+28h+var_20] lea rsi, aWidth11gWithin; "\n WIDTH %.11g WITHIN %.11%.11gSP"... mov al, 3 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1F035 loc_1F00B: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+28h+var_10] movsd xmm1, [rsp+28h+var_18] movsd xmm2, [rsp+28h+var_20] lea rsi, aWidth11gWithin_0; "\n WIDTH %.11g WITHIN %.11g SPACI"... mov al, 3 call _fprintf loc_1F035: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+28h+var_4], 0 loc_1F052: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long LefDefParser::lefwLayerRoutingSpacingInfluenceWidth( LefDefParser *this, double a2, double a3, double a4, long long a5, int a6, int a7, int a8, int a9) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 32 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g", a6, a7, a8, a9); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", a2, a3, a4); ++LefDefParser::lefwLines; return 0; } else { return 2; } } else { return 1; } }
lefwLayerRoutingSpacingInfluenceWidth: SUB RSP,0x28 MOVSD qword ptr [RSP + 0x18],XMM0 MOVSD qword ptr [RSP + 0x10],XMM1 MOVSD qword ptr [RSP + 0x8],XMM2 LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x0011efc0 MOV dword ptr [RSP + 0x24],0x1 JMP 0x0011f052 LAB_0011efc0: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x20 JZ 0x0011efd6 MOV dword ptr [RSP + 0x24],0x2 JMP 0x0011f052 LAB_0011efd6: CMP dword ptr [0x001c553c],0x0 JZ 0x0011f00b LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD XMM1,qword ptr [RSP + 0x10] MOVSD XMM2,qword ptr [RSP + 0x8] LEA RSI,[0x193225] MOV AL,0x3 CALL 0x0018bf50 JMP 0x0011f035 LAB_0011f00b: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD XMM1,qword ptr [RSP + 0x10] MOVSD XMM2,qword ptr [RSP + 0x8] LEA RSI,[0x193257] MOV AL,0x3 CALL 0x00102370 LAB_0011f035: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x24],0x0 LAB_0011f052: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double) */ int4 LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double param_1,double param_2,double param_3) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwState == 0x20) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"\n WIDTH %.11g WITHIN %.11g SPACING %.11g",param_1,param_2,param_3); } else { encPrint(lefwFile,"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g",param_1,param_2,param_3 ); } lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 2; } return local_4; }
32,316
LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingSpacingInfluenceWidth(double width, double distance, double spacing) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTINGWIDTH) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g", width, distance, spacing); else fprintf(lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", width, distance, spacing); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double): leaq 0x7832b(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x14df8 leaq 0x7856c(%rip), %rcx # 0x8d340 movl $0x2, %eax cmpl $0x20, (%rcx) jne 0x14e1b pushq %rax cmpb $0x1, 0x785f6(%rip) # 0x8d3dc jne 0x14dfe leaq 0x4641e(%rip), %rsi # 0x5b20d movb $0x3, %al callq 0x55afd jmp 0x14e0c movl $0x1, %eax retq leaq 0x4643a(%rip), %rsi # 0x5b23f movb $0x3, %al callq 0x22e0 leaq 0x78529(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser37lefwLayerRoutingSpacingInfluenceWidthEddd: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_14DF8 lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov eax, 2 cmp dword ptr [rcx], 20h ; ' ' jnz short locret_14E1B push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_14DFE lea rsi, aWidth11gWithin; "\n WIDTH %.11g WITHIN %.11%.11gSP"... mov al, 3 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_14E0C loc_14DF8: mov eax, 1 retn loc_14DFE: lea rsi, aWidth11gWithin_0; "\n WIDTH %.11g WITHIN %.11g SPACI"... mov al, 3 call _fprintf loc_14E0C: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_14E1B: retn
long long LefDefParser::lefwLayerRoutingSpacingInfluenceWidth( LefDefParser *this, double a2, double a3, double a4, long long a5, int a6, long long a7, int a8, int a9) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState == 32 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g", a6, (unsigned int)&LefDefParser::lefwState, a8, a9); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n WIDTH %.11g WITHIN %.11g SPACING %.11g", a2, a3, a4); ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwLayerRoutingSpacingInfluenceWidth: LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00114df8 LEA RCX,[0x18d340] MOV EAX,0x2 CMP dword ptr [RCX],0x20 JNZ 0x00114e1b PUSH RAX CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00114dfe LEA RSI,[0x15b20d] MOV AL,0x3 CALL 0x00155afd JMP 0x00114e0c LAB_00114df8: MOV EAX,0x1 RET LAB_00114dfe: LEA RSI,[0x15b23f] MOV AL,0x3 CALL 0x001022e0 LAB_00114e0c: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00114e1b: RET
/* LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double, double, double) */ int8 LefDefParser::lefwLayerRoutingSpacingInfluenceWidth(double param_1,double param_2,double param_3) { int8 uVar1; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 2; if (lefwState == 0x20) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"\n WIDTH %.11g WITHIN %.11%.11gSPACING %.11g"); } else { fprintf(lefwFile,"\n WIDTH %.11g WITHIN %.11g SPACING %.11g"); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }
32,317
ggml_pad_reflect_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_pad_reflect_1d( struct ggml_context * ctx, struct ggml_tensor * a, int p0, int p1) { GGML_ASSERT(p0 >= 0); GGML_ASSERT(p1 >= 0); GGML_ASSERT(p0 < a->ne[0]); // padding length on each size must be less than the GGML_ASSERT(p1 < a->ne[0]); // existing length of the dimension being padded GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(a->type == GGML_TYPE_F32); struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, a->ne[0] + p0 + p1, a->ne[1], a->ne[2], a->ne[3]); int32_t params[] = { p0, p1 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_PAD_REFLECT_1D; result->src[0] = a; return result; }
O1
c
ggml_pad_reflect_1d: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp testl %edx, %edx js 0x1fa42 movl %ecx, %ebp testl %ecx, %ecx js 0x1fa61 movl %edx, %r14d movq %rsi, %rbx movl %edx, %r12d movq 0x10(%rsi), %r13 cmpq %r12, %r13 jle 0x1fa80 movq %rdi, 0x8(%rsp) movl %ebp, %r15d cmpq %r15, %r13 jle 0x1fa9c movq %rbx, %rdi xorl %esi, %esi callq 0x1b410 testb %al, %al je 0x1fab8 cmpl $0x0, (%rbx) jne 0x1fad4 addq %r12, %r15 addq %r13, %r15 movups 0x18(%rbx), %xmm0 movq 0x28(%rbx), %rax leaq 0x10(%rsp), %rcx movq %r15, (%rcx) movups %xmm0, 0x8(%rcx) movq %rax, 0x18(%rcx) movq 0x8(%rsp), %rdi xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1b871 testq %rax, %rax je 0x1faf0 movl %r14d, 0x54(%rax) movl %ebp, 0x58(%rax) movl $0x38, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2cb26(%rip), %rdi # 0x4c56f leaq 0x2cb71(%rip), %rdx # 0x4c5c1 leaq 0x2d2e4(%rip), %rcx # 0x4cd3b movl $0x1058, %esi # imm = 0x1058 jmp 0x1fb0a leaq 0x2cb07(%rip), %rdi # 0x4c56f leaq 0x2cb52(%rip), %rdx # 0x4c5c1 leaq 0x2d2cd(%rip), %rcx # 0x4cd43 movl $0x1059, %esi # imm = 0x1059 jmp 0x1fb0a leaq 0x2cae8(%rip), %rdi # 0x4c56f leaq 0x2cb33(%rip), %rdx # 0x4c5c1 leaq 0x2d2b6(%rip), %rcx # 0x4cd4b movl $0x105b, %esi # imm = 0x105B jmp 0x1fb0a leaq 0x2cacc(%rip), %rdi # 0x4c56f leaq 0x2cb17(%rip), %rdx # 0x4c5c1 leaq 0x2d2a8(%rip), %rcx # 0x4cd59 movl $0x105c, %esi # imm = 0x105C jmp 0x1fb0a leaq 0x2cab0(%rip), %rdi # 0x4c56f leaq 0x2cafb(%rip), %rdx # 0x4c5c1 leaq 0x2ceb3(%rip), %rcx # 0x4c980 movl $0x105e, %esi # imm = 0x105E jmp 0x1fb0a leaq 0x2ca94(%rip), %rdi # 0x4c56f leaq 0x2cadf(%rip), %rdx # 0x4c5c1 leaq 0x2d27e(%rip), %rcx # 0x4cd67 movl $0x105f, %esi # imm = 0x105F jmp 0x1fb0a leaq 0x2ebce(%rip), %rdi # 0x4e6c5 leaq 0x2cac3(%rip), %rdx # 0x4c5c1 leaq 0x2eced(%rip), %rcx # 0x4e7f2 movl $0x70, %esi xorl %eax, %eax callq 0x18ce0
ggml_pad_reflect_1d: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h test edx, edx js loc_1FA42 mov ebp, ecx test ecx, ecx js loc_1FA61 mov r14d, edx mov rbx, rsi mov r12d, edx mov r13, [rsi+10h] cmp r13, r12 jle loc_1FA80 mov [rsp+68h+var_60], rdi mov r15d, ebp cmp r13, r15 jle loc_1FA9C mov rdi, rbx xor esi, esi call ggml_is_contiguous_n test al, al jz loc_1FAB8 cmp dword ptr [rbx], 0 jnz loc_1FAD4 add r15, r12 add r15, r13 movups xmm0, xmmword ptr [rbx+18h] mov rax, [rbx+28h] lea rcx, [rsp+68h+var_58] mov [rcx], r15 movups xmmword ptr [rcx+8], xmm0 mov [rcx+18h], rax mov rdi, [rsp+68h+var_60] xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl test rax, rax jz loc_1FAF0 mov [rax+54h], r14d mov [rax+58h], ebp mov dword ptr [rax+50h], 38h ; '8' mov [rax+98h], rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1FA42: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP00_0; "p0 >= 0" mov esi, 1058h jmp loc_1FB0A loc_1FA61: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP10; "p1 >= 0" mov esi, 1059h jmp loc_1FB0A loc_1FA80: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP0ANe0; "p0 < a->ne[0]" mov esi, 105Bh jmp short loc_1FB0A loc_1FA9C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP1ANe0; "p1 < a->ne[0]" mov esi, 105Ch jmp short loc_1FB0A loc_1FAB8: 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, 105Eh jmp short loc_1FB0A loc_1FAD4: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32" mov esi, 105Fh jmp short loc_1FB0A loc_1FAF0: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1FB0A: xor eax, eax call _ggml_abort
long long ggml_pad_reflect_1d(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long v8; // r12 long long v9; // r13 __int128 v10; // xmm0 long long v11; // rax long long result; // rax const char *v13; // rdi const char *v14; // rcx int v15; // esi long long v16; // [rsp+10h] [rbp-58h] BYREF __int128 v17; // [rsp+18h] [rbp-50h] long long v18; // [rsp+28h] [rbp-40h] if ( a3 < 0 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "p0 >= 0"; v15 = 4184; goto LABEL_16; } if ( a4 < 0 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "p1 >= 0"; v15 = 4185; goto LABEL_16; } v8 = (unsigned int)a3; v9 = *(_QWORD *)(a2 + 16); if ( v9 <= (unsigned int)a3 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "p0 < a->ne[0]"; v15 = 4187; goto LABEL_16; } if ( v9 <= (unsigned int)a4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "p1 < a->ne[0]"; v15 = 4188; goto LABEL_16; } if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "ggml_is_contiguous(a)"; v15 = 4190; goto LABEL_16; } if ( *(_DWORD *)a2 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "a->type == GGML_TYPE_F32"; v15 = 4191; goto LABEL_16; } v10 = *(_OWORD *)(a2 + 24); v11 = *(_QWORD *)(a2 + 40); v16 = v9 + v8 + (unsigned int)a4; v17 = v10; v18 = v11; result = ggml_new_tensor_impl(a1, 0, 4, &v16, 0LL, 0LL, *(double *)&v10); if ( !result ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; v14 = "tensor != NULL"; v15 = 112; LABEL_16: ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, a5, a6); } *(_DWORD *)(result + 84) = a3; *(_DWORD *)(result + 88) = a4; *(_DWORD *)(result + 80) = 56; *(_QWORD *)(result + 152) = a2; return result; }
ggml_pad_reflect_1d: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 TEST EDX,EDX JS 0x0011fa42 MOV EBP,ECX TEST ECX,ECX JS 0x0011fa61 MOV R14D,EDX MOV RBX,RSI MOV R12D,EDX MOV R13,qword ptr [RSI + 0x10] CMP R13,R12 JLE 0x0011fa80 MOV qword ptr [RSP + 0x8],RDI MOV R15D,EBP CMP R13,R15 JLE 0x0011fa9c MOV RDI,RBX XOR ESI,ESI CALL 0x0011b410 TEST AL,AL JZ 0x0011fab8 CMP dword ptr [RBX],0x0 JNZ 0x0011fad4 ADD R15,R12 ADD R15,R13 MOVUPS XMM0,xmmword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x28] LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],R15 MOVUPS xmmword ptr [RCX + 0x8],XMM0 MOV qword ptr [RCX + 0x18],RAX MOV RDI,qword ptr [RSP + 0x8] XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011b871 TEST RAX,RAX JZ 0x0011faf0 MOV dword ptr [RAX + 0x54],R14D MOV dword ptr [RAX + 0x58],EBP MOV dword ptr [RAX + 0x50],0x38 MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011fa42: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cd3b] MOV ESI,0x1058 JMP 0x0011fb0a LAB_0011fa61: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cd43] MOV ESI,0x1059 JMP 0x0011fb0a LAB_0011fa80: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cd4b] MOV ESI,0x105b JMP 0x0011fb0a LAB_0011fa9c: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cd59] MOV ESI,0x105c JMP 0x0011fb0a LAB_0011fab8: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c980] MOV ESI,0x105e JMP 0x0011fb0a LAB_0011fad4: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cd67] MOV ESI,0x105f JMP 0x0011fb0a LAB_0011faf0: LEA RDI,[0x14e6c5] LEA RDX,[0x14c5c1] LEA RCX,[0x14e7f2] MOV ESI,0x70 LAB_0011fb0a: XOR EAX,EAX CALL 0x00118ce0
void ggml_pad_reflect_1d(int8 param_1,int *param_2,uint param_3,uint param_4) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; char *pcVar5; long local_58; int local_50; int iStack_4c; int iStack_48; int iStack_44; int8 local_40; if ((int)param_3 < 0) { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar3 = "p0 >= 0"; uVar4 = 0x1058; } else if ((int)param_4 < 0) { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar3 = "p1 >= 0"; uVar4 = 0x1059; } else { lVar2 = *(long *)(param_2 + 4); if ((long)(ulong)param_3 < lVar2) { if ((long)(ulong)param_4 < lVar2) { cVar1 = ggml_is_contiguous_n(param_2,0); if (cVar1 == '\0') { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar3 = "ggml_is_contiguous(a)"; uVar4 = 0x105e; } else if (*param_2 == 0) { local_58 = (ulong)param_4 + (ulong)param_3 + lVar2; local_50 = param_2[6]; iStack_4c = param_2[7]; iStack_48 = param_2[8]; iStack_44 = param_2[9]; local_40 = *(int8 *)(param_2 + 10); lVar2 = ggml_new_tensor_impl(param_1,0,4,&local_58,0,0); if (lVar2 != 0) { *(uint *)(lVar2 + 0x54) = param_3; *(uint *)(lVar2 + 0x58) = param_4; *(int4 *)(lVar2 + 0x50) = 0x38; *(int **)(lVar2 + 0x98) = param_2; return; } pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; pcVar3 = "tensor != NULL"; uVar4 = 0x70; } else { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar3 = "a->type == GGML_TYPE_F32"; uVar4 = 0x105f; } } else { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c" ; pcVar3 = "p1 < a->ne[0]"; uVar4 = 0x105c; } } else { pcVar5 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar3 = "p0 < a->ne[0]"; uVar4 = 0x105b; } } /* WARNING: Subroutine does not return */ ggml_abort(pcVar5,uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
32,318
ggml_pad_reflect_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_pad_reflect_1d( struct ggml_context * ctx, struct ggml_tensor * a, int p0, int p1) { GGML_ASSERT(p0 >= 0); GGML_ASSERT(p1 >= 0); GGML_ASSERT(p0 < a->ne[0]); // padding length on each size must be less than the GGML_ASSERT(p1 < a->ne[0]); // existing length of the dimension being padded GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(a->type == GGML_TYPE_F32); struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, a->ne[0] + p0 + p1, a->ne[1], a->ne[2], a->ne[3]); int32_t params[] = { p0, p1 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_PAD_REFLECT_1D; result->src[0] = a; return result; }
O3
c
ggml_pad_reflect_1d: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp testl %edx, %edx js 0x1e6f5 movl %ecx, %ebp testl %ecx, %ecx js 0x1e714 movl %edx, %r14d movq %rsi, %rbx movl %edx, %r12d movq 0x10(%rsi), %r13 cmpq %r12, %r13 jle 0x1e733 movq %rdi, 0x8(%rsp) movl %ebp, %r15d cmpq %r15, %r13 jbe 0x1e74f movq %rbx, %rdi xorl %esi, %esi callq 0x1a0b9 testb %al, %al je 0x1e76b cmpl $0x0, (%rbx) jne 0x1e787 addq %r12, %r15 addq %r13, %r15 movq 0x28(%rbx), %rax leaq 0x10(%rsp), %rcx movq %r15, (%rcx) movups 0x18(%rbx), %xmm0 movups %xmm0, 0x8(%rcx) movq %rax, 0x18(%rcx) movq 0x8(%rsp), %rdi xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f testq %rax, %rax je 0x1e7a3 movl %r14d, 0x54(%rax) movl %ebp, 0x58(%rax) movl $0x38, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2df17(%rip), %rdi # 0x4c613 leaq 0x2df62(%rip), %rdx # 0x4c665 leaq 0x2e6d5(%rip), %rcx # 0x4cddf movl $0x1058, %esi # imm = 0x1058 jmp 0x1e7bd leaq 0x2def8(%rip), %rdi # 0x4c613 leaq 0x2df43(%rip), %rdx # 0x4c665 leaq 0x2e6be(%rip), %rcx # 0x4cde7 movl $0x1059, %esi # imm = 0x1059 jmp 0x1e7bd leaq 0x2ded9(%rip), %rdi # 0x4c613 leaq 0x2df24(%rip), %rdx # 0x4c665 leaq 0x2e6a7(%rip), %rcx # 0x4cdef movl $0x105b, %esi # imm = 0x105B jmp 0x1e7bd leaq 0x2debd(%rip), %rdi # 0x4c613 leaq 0x2df08(%rip), %rdx # 0x4c665 leaq 0x2e699(%rip), %rcx # 0x4cdfd movl $0x105c, %esi # imm = 0x105C jmp 0x1e7bd leaq 0x2dea1(%rip), %rdi # 0x4c613 leaq 0x2deec(%rip), %rdx # 0x4c665 leaq 0x2e2a4(%rip), %rcx # 0x4ca24 movl $0x105e, %esi # imm = 0x105E jmp 0x1e7bd leaq 0x2de85(%rip), %rdi # 0x4c613 leaq 0x2ded0(%rip), %rdx # 0x4c665 leaq 0x2e66f(%rip), %rcx # 0x4ce0b movl $0x105f, %esi # imm = 0x105F jmp 0x1e7bd leaq 0x2ffbf(%rip), %rdi # 0x4e769 leaq 0x2deb4(%rip), %rdx # 0x4c665 leaq 0x300de(%rip), %rcx # 0x4e896 movl $0x70, %esi xorl %eax, %eax callq 0x17cd0
ggml_pad_reflect_1d: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h test edx, edx js loc_1E6F5 mov ebp, ecx test ecx, ecx js loc_1E714 mov r14d, edx mov rbx, rsi mov r12d, edx mov r13, [rsi+10h] cmp r13, r12 jle loc_1E733 mov [rsp+68h+var_60], rdi mov r15d, ebp cmp r13, r15 jbe loc_1E74F mov rdi, rbx xor esi, esi call ggml_is_contiguous_n test al, al jz loc_1E76B cmp dword ptr [rbx], 0 jnz loc_1E787 add r15, r12 add r15, r13 mov rax, [rbx+28h] lea rcx, [rsp+68h+var_58] mov [rcx], r15 movups xmm0, xmmword ptr [rbx+18h] movups xmmword ptr [rcx+8], xmm0 mov [rcx+18h], rax mov rdi, [rsp+68h+var_60] xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl test rax, rax jz loc_1E7A3 mov [rax+54h], r14d mov [rax+58h], ebp mov dword ptr [rax+50h], 38h ; '8' mov [rax+98h], rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E6F5: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP00_0; "p0 >= 0" mov esi, 1058h jmp loc_1E7BD loc_1E714: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP10; "p1 >= 0" mov esi, 1059h jmp loc_1E7BD loc_1E733: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP0ANe0; "p0 < a->ne[0]" mov esi, 105Bh jmp short loc_1E7BD loc_1E74F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP1ANe0; "p1 < a->ne[0]" mov esi, 105Ch jmp short loc_1E7BD loc_1E76B: 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, 105Eh jmp short loc_1E7BD loc_1E787: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32" mov esi, 105Fh jmp short loc_1E7BD loc_1E7A3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1E7BD: xor eax, eax call _ggml_abort
long long ggml_pad_reflect_1d(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long v8; // r12 long long v9; // r13 long long v10; // rax long long result; // rax const char *v12; // rdi const char *v13; // rcx int v14; // esi long long v15; // [rsp+10h] [rbp-58h] BYREF __int128 v16; // [rsp+18h] [rbp-50h] long long v17; // [rsp+28h] [rbp-40h] if ( a3 < 0 ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "p0 >= 0"; v14 = 4184; goto LABEL_16; } if ( a4 < 0 ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "p1 >= 0"; v14 = 4185; goto LABEL_16; } v8 = (unsigned int)a3; v9 = *(_QWORD *)(a2 + 16); if ( v9 <= (unsigned int)a3 ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "p0 < a->ne[0]"; v14 = 4187; goto LABEL_16; } if ( v9 <= (unsigned long long)(unsigned int)a4 ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "p1 < a->ne[0]"; v14 = 4188; goto LABEL_16; } if ( !ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "ggml_is_contiguous(a)"; v14 = 4190; goto LABEL_16; } if ( *(_DWORD *)a2 ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v13 = "a->type == GGML_TYPE_F32"; v14 = 4191; goto LABEL_16; } v10 = *(_QWORD *)(a2 + 40); v15 = v9 + v8 + (unsigned int)a4; v16 = *(_OWORD *)(a2 + 24); v17 = v10; result = ggml_new_tensor_impl(a1, 0, 4u, &v15, 0LL, 0LL, *(double *)&v16); if ( !result ) { v12 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; v13 = "tensor != NULL"; v14 = 112; LABEL_16: ggml_abort((_DWORD)v12, v14, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v13, a5, a6); } *(_DWORD *)(result + 84) = a3; *(_DWORD *)(result + 88) = a4; *(_DWORD *)(result + 80) = 56; *(_QWORD *)(result + 152) = a2; return result; }
ggml_pad_reflect_1d: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 TEST EDX,EDX JS 0x0011e6f5 MOV EBP,ECX TEST ECX,ECX JS 0x0011e714 MOV R14D,EDX MOV RBX,RSI MOV R12D,EDX MOV R13,qword ptr [RSI + 0x10] CMP R13,R12 JLE 0x0011e733 MOV qword ptr [RSP + 0x8],RDI MOV R15D,EBP CMP R13,R15 JBE 0x0011e74f MOV RDI,RBX XOR ESI,ESI CALL 0x0011a0b9 TEST AL,AL JZ 0x0011e76b CMP dword ptr [RBX],0x0 JNZ 0x0011e787 ADD R15,R12 ADD R15,R13 MOV RAX,qword ptr [RBX + 0x28] LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],R15 MOVUPS XMM0,xmmword ptr [RBX + 0x18] MOVUPS xmmword ptr [RCX + 0x8],XMM0 MOV qword ptr [RCX + 0x18],RAX MOV RDI,qword ptr [RSP + 0x8] XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f TEST RAX,RAX JZ 0x0011e7a3 MOV dword ptr [RAX + 0x54],R14D MOV dword ptr [RAX + 0x58],EBP MOV dword ptr [RAX + 0x50],0x38 MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e6f5: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cddf] MOV ESI,0x1058 JMP 0x0011e7bd LAB_0011e714: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cde7] MOV ESI,0x1059 JMP 0x0011e7bd LAB_0011e733: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cdef] MOV ESI,0x105b JMP 0x0011e7bd LAB_0011e74f: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cdfd] MOV ESI,0x105c JMP 0x0011e7bd LAB_0011e76b: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14ca24] MOV ESI,0x105e JMP 0x0011e7bd LAB_0011e787: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14ce0b] MOV ESI,0x105f JMP 0x0011e7bd LAB_0011e7a3: LEA RDI,[0x14e769] LEA RDX,[0x14c665] LEA RCX,[0x14e896] MOV ESI,0x70 LAB_0011e7bd: XOR EAX,EAX CALL 0x00117cd0
void ggml_pad_reflect_1d(int8 param_1,int *param_2,uint param_3,uint param_4) { ulong uVar1; char cVar2; long lVar3; char *pcVar4; int8 uVar5; char *pcVar6; long local_58; int local_50; int iStack_4c; int iStack_48; int iStack_44; int8 local_40; if ((int)param_3 < 0) { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar4 = "p0 >= 0"; uVar5 = 0x1058; } else if ((int)param_4 < 0) { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar4 = "p1 >= 0"; uVar5 = 0x1059; } else { uVar1 = *(ulong *)(param_2 + 4); if ((long)(ulong)param_3 < (long)uVar1) { if (param_4 < uVar1) { cVar2 = ggml_is_contiguous_n(param_2,0); if (cVar2 == '\0') { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar4 = "ggml_is_contiguous(a)"; uVar5 = 0x105e; } else if (*param_2 == 0) { local_58 = (ulong)param_4 + (ulong)param_3 + uVar1; local_40 = *(int8 *)(param_2 + 10); local_50 = param_2[6]; iStack_4c = param_2[7]; iStack_48 = param_2[8]; iStack_44 = param_2[9]; lVar3 = ggml_new_tensor_impl(param_1,0,4,&local_58,0,0); if (lVar3 != 0) { *(uint *)(lVar3 + 0x54) = param_3; *(uint *)(lVar3 + 0x58) = param_4; *(int4 *)(lVar3 + 0x50) = 0x38; *(int **)(lVar3 + 0x98) = param_2; return; } pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; pcVar4 = "tensor != NULL"; uVar5 = 0x70; } else { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar4 = "a->type == GGML_TYPE_F32"; uVar5 = 0x105f; } } else { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c" ; pcVar4 = "p1 < a->ne[0]"; uVar5 = 0x105c; } } else { pcVar6 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar4 = "p0 < a->ne[0]"; uVar5 = 0x105b; } } /* WARNING: Subroutine does not return */ ggml_abort(pcVar6,uVar5,"GGML_ASSERT(%s) failed",pcVar4); }
32,319
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; }
O3
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x51045 movl %ebx, %eax leaq 0x67f32(%rip), %rcx # 0xb8f54 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x5109b movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x51047 movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x51047 movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x51047 xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x19190 testl %eax, %eax setne %bpl jne 0x5109b leaq 0x9b199(%rip), %rax # 0xec1f8 cmpl $0x0, (%rax) js 0x5109b callq 0x95ba7 movq %rax, %r14 callq 0x19060 movq %rax, %r15 movl (%rax), %edi callq 0x19230 movl (%r15), %r9d leaq 0x68261(%rip), %rdx # 0xb92e6 xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0x95c44 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_51029; jumptable 0000000000051029 default case mov eax, ebx lea rcx, jpt_51029 movsxd rax, ds:(jpt_51029 - 0B8F54h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5102B: mov bpl, 1; jumptable 0000000000051029 case 0 jmp short loc_5109B loc_51030: mov edx, 0FFFFFFF6h; jumptable 0000000000051029 case 2 jmp short loc_51047 loc_51037: mov edx, 0FFFFFFECh; jumptable 0000000000051029 case 3 jmp short loc_51047 loc_5103E: mov edx, 0FFFFFFFBh; jumptable 0000000000051029 case 1 jmp short loc_51047 def_51029: xor edx, edx; jumptable 0000000000051029 default case loc_51047: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_5109B lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_5109B call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_5109B: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1) { char v1; // al unsigned int v2; // ebp long long v3; // rdx int v4; // eax int v5; // r14d unsigned int *v6; // r15 int v7; // eax char v9; // [rsp-8h] [rbp-28h] v9 = v1; switch ( a1 ) { case 0: LOBYTE(v2) = 1; return v2; case 1: v3 = 4294967291LL; goto LABEL_7; case 2: v3 = 4294967286LL; goto LABEL_7; case 3: v3 = 4294967276LL; goto LABEL_7; default: v3 = 0LL; LABEL_7: v4 = setpriority(0LL, 0LL, v3); LOBYTE(v2) = v4 != 0; if ( !v4 && common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v6 = (unsigned int *)__errno_location(); v7 = strerror(*v6); v2 = 0; common_log_add(v5, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v7, *v6, v9); } return v2; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x00151045 MOV EAX,EBX LEA RCX,[0x1b8f54] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x0015109b caseD_2: MOV EDX,0xfffffff6 JMP 0x00151047 caseD_3: MOV EDX,0xffffffec JMP 0x00151047 caseD_1: MOV EDX,0xfffffffb JMP 0x00151047 default: XOR EDX,EDX LAB_00151047: XOR EDI,EDI XOR ESI,ESI CALL 0x00119190 TEST EAX,EAX SETNZ BPL JNZ 0x0015109b LEA RAX,[0x1ec1f8] CMP dword ptr [RAX],0x0 JS 0x0015109b CALL 0x00195ba7 MOV R14,RAX CALL 0x00119060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x00119230 MOV R9D,dword ptr [R15] LEA RDX,[0x1b92e6] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x00195c44 LAB_0015109b: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_0015109b; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_0015109b: return uVar5 & 0xffffffff; }
32,320
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O0
c
my_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq 0x360ec1(%rip), %rax # 0x390230 cmpb $0x0, (%rax) je 0x2f37d movb $0x0, -0x1(%rbp) jmp 0x2f506 leaq 0x360eac(%rip), %rax # 0x390230 movb $0x1, (%rax) leaq 0x360ea6(%rip), %rax # 0x390234 movl (%rax), %ecx addl $0x1, %ecx leaq 0x360e9a(%rip), %rax # 0x390234 movl %ecx, (%rax) leaq 0x1a9385(%rip), %rax # 0x1d8728 movl $0x1b0, (%rax) # imm = 0x1B0 leaq 0x1a937c(%rip), %rax # 0x1d872c movl $0x1c0, (%rax) # imm = 0x1C0 leaq 0x36134b(%rip), %rax # 0x390708 movq $0x0, (%rax) leaq 0x53fed(%rip), %rdi # 0x833b8 callq 0x243a0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2f3f4 movq -0x10(%rbp), %rdi callq 0x2f510 orq $0x180, %rax # imm = 0x180 movl %eax, %ecx leaq 0x1a9336(%rip), %rax # 0x1d8728 movl %ecx, (%rax) leaq 0x53fc3(%rip), %rdi # 0x833be callq 0x243a0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2f424 movq -0x10(%rbp), %rdi callq 0x2f510 orq $0x1c0, %rax # imm = 0x1C0 movl %eax, %ecx leaq 0x1a930a(%rip), %rax # 0x1d872c movl %ecx, (%rax) callq 0x374e0 movq 0x1a8ba8(%rip), %rax # 0x1d7fd8 movq (%rax), %rax movq %rax, 0x360e06(%rip) # 0x390240 movq $0x0, 0x360e03(%rip) # 0x390248 leaq 0x360dec(%rip), %rax # 0x390238 leaq 0x360ded(%rip), %rcx # 0x390240 movq %rcx, (%rax) leaq 0x360e8b(%rip), %rax # 0x3902e8 leaq 0x53f64(%rip), %rcx # 0x833c8 movq %rcx, (%rax) leaq 0x360e72(%rip), %rax # 0x3902e0 cmpq $0x0, (%rax) je 0x2f4a2 leaq 0x360e65(%rip), %rax # 0x3902e0 movq (%rax), %rax movq %rax, -0x18(%rbp) leaq 0x360e57(%rip), %rax # 0x3902e0 movq (%rax), %rdi callq 0x28b80 movq -0x18(%rbp), %rcx addq %rax, %rcx leaq 0x360e49(%rip), %rax # 0x3902e8 movq %rcx, (%rax) callq 0x32400 callq 0x31750 cmpb $0x0, %al je 0x2f4b6 movb $0x1, -0x1(%rbp) jmp 0x2f506 leaq 0x537f1(%rip), %rdi # 0x82cae callq 0x243a0 leaq 0x360e0f(%rip), %rcx # 0x3902d8 movq %rax, (%rcx) cmpq $0x0, %rax je 0x2f4f5 leaq 0x360dff(%rip), %rax # 0x3902d8 movq (%rax), %rsi leaq 0x36100d(%rip), %rdi # 0x3904f0 callq 0x296c0 movq %rax, %rcx leaq 0x360de6(%rip), %rax # 0x3902d8 movq %rcx, (%rax) jmp 0x2f4f7 jmp 0x2f4f9 callq 0x3ae40 jmp 0x2f500 jmp 0x2f502 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
my_init: push rbp mov rbp, rsp sub rsp, 20h lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_2F37D mov [rbp+var_1], 0 jmp loc_2F506 loc_2F37D: lea rax, my_init_done mov byte ptr [rax], 1 lea rax, mysys_usage_id mov ecx, [rax] add ecx, 1 lea rax, mysys_usage_id mov [rax], ecx lea rax, my_umask mov dword ptr [rax], 1B0h lea rax, my_umask_dir mov dword ptr [rax], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_2F3F4 mov rdi, [rbp+var_10] call atoi_octal or rax, 180h mov ecx, eax lea rax, my_umask mov [rax], ecx loc_2F3F4: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_2F424 mov rdi, [rbp+var_10] call atoi_octal or rax, 1C0h mov ecx, eax lea rax, my_umask_dir mov [rax], ecx loc_2F424: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax mov cs:qword_390248, 0 lea rax, mysql_stdin lea rcx, instrumented_stdin mov [rax], rcx lea rax, my_progname_short lea rcx, aUnknown; "unknown" mov [rax], rcx lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_2F4A2 lea rax, my_progname mov rax, [rax] mov [rbp+var_18], rax lea rax, my_progname mov rdi, [rax] call dirname_length mov rcx, [rbp+var_18] add rcx, rax lea rax, my_progname_short mov [rax], rcx loc_2F4A2: call my_mutex_init call my_thread_global_init cmp al, 0 jz short loc_2F4B6 mov [rbp+var_1], 1 jmp short loc_2F506 loc_2F4B6: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rcx, home_dir mov [rcx], rax cmp rax, 0 jz short loc_2F4F5 lea rax, home_dir mov rsi, [rax] lea rdi, home_dir_buff call intern_filename mov rcx, rax lea rax, home_dir mov [rax], rcx loc_2F4F5: jmp short $+2 loc_2F4F7: jmp short $+2 loc_2F4F9: call my_time_init jmp short $+2 loc_2F500: jmp short $+2 loc_2F502: mov [rbp+var_1], 0 loc_2F506: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_init() { _BYTE *v1; // [rsp+8h] [rbp-18h] long long v2; // [rsp+10h] [rbp-10h] long long v3; // [rsp+10h] [rbp-10h] if ( my_init_done ) return 0; my_init_done = 1; ++mysys_usage_id; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v2 = getenv("UMASK"); if ( v2 ) my_umask = atoi_octal(v2) | 0x180; v3 = getenv("UMASK_DIR"); if ( v3 ) my_umask_dir = atoi_octal(v3) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_390248 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; if ( my_progname ) { v1 = my_progname; my_progname_short = &v1[dirname_length(my_progname)]; } my_mutex_init(); if ( (unsigned __int8)my_thread_global_init() ) return 1; home_dir = (_BYTE *)getenv("HOME"); if ( home_dir ) home_dir = (_BYTE *)intern_filename((long long)&home_dir_buff, home_dir); my_time_init(); return 0; }
my_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RAX,[0x490230] CMP byte ptr [RAX],0x0 JZ 0x0012f37d MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012f506 LAB_0012f37d: LEA RAX,[0x490230] MOV byte ptr [RAX],0x1 LEA RAX,[0x490234] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x490234] MOV dword ptr [RAX],ECX LEA RAX,[0x2d8728] MOV dword ptr [RAX],0x1b0 LEA RAX,[0x2d872c] MOV dword ptr [RAX],0x1c0 LEA RAX,[0x490708] MOV qword ptr [RAX],0x0 LEA RDI,[0x1833b8] CALL 0x001243a0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012f3f4 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012f510 OR RAX,0x180 MOV ECX,EAX LEA RAX,[0x2d8728] MOV dword ptr [RAX],ECX LAB_0012f3f4: LEA RDI,[0x1833be] CALL 0x001243a0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012f424 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012f510 OR RAX,0x1c0 MOV ECX,EAX LEA RAX,[0x2d872c] MOV dword ptr [RAX],ECX LAB_0012f424: CALL 0x001374e0 MOV RAX,qword ptr [0x002d7fd8] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00490240],RAX MOV qword ptr [0x00490248],0x0 LEA RAX,[0x490238] LEA RCX,[0x490240] MOV qword ptr [RAX],RCX LEA RAX,[0x4902e8] LEA RCX,[0x1833c8] MOV qword ptr [RAX],RCX LEA RAX,[0x4902e0] CMP qword ptr [RAX],0x0 JZ 0x0012f4a2 LEA RAX,[0x4902e0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x4902e0] MOV RDI,qword ptr [RAX] CALL 0x00128b80 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,RAX LEA RAX,[0x4902e8] MOV qword ptr [RAX],RCX LAB_0012f4a2: CALL 0x00132400 CALL 0x00131750 CMP AL,0x0 JZ 0x0012f4b6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012f506 LAB_0012f4b6: LEA RDI,[0x182cae] CALL 0x001243a0 LEA RCX,[0x4902d8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0012f4f5 LEA RAX,[0x4902d8] MOV RSI,qword ptr [RAX] LEA RDI,[0x4904f0] CALL 0x001296c0 MOV RCX,RAX LEA RAX,[0x4902d8] MOV qword ptr [RAX],RCX LAB_0012f4f5: JMP 0x0012f4f7 LAB_0012f4f7: JMP 0x0012f4f9 LAB_0012f4f9: CALL 0x0013ae40 JMP 0x0012f500 LAB_0012f500: JMP 0x0012f502 LAB_0012f502: MOV byte ptr [RBP + -0x1],0x0 LAB_0012f506: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; int1 local_9; if (my_init_done == '\0') { my_init_done = '\x01'; mysys_usage_id = mysys_usage_id + 1; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_002d7fd8; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar1 + lVar5); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 == '\0') { home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
32,321
bool httplib::detail::process_multipart_ranges_data<bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(unsigned long, unsigned long)>(httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(unsigned long, unsigned long))
nickolajgrishuk[P]metricz-cpp/build_O3/_deps/httplib-src/httplib.h
bool process_multipart_ranges_data(const Request &req, Response &res, const std::string &boundary, const std::string &content_type, SToken stoken, CToken ctoken, Content content) { for (size_t i = 0; i < req.ranges.size(); i++) { ctoken("--"); stoken(boundary); ctoken("\r\n"); if (!content_type.empty()) { ctoken("Content-Type: "); stoken(content_type); ctoken("\r\n"); } auto offsets = get_range_offset_and_length(req, res.body.size(), i); auto offset = offsets.first; auto length = offsets.second; ctoken("Content-Range: "); stoken(make_content_range_header_field(offset, length, res.body.size())); ctoken("\r\n"); ctoken("\r\n"); if (!content(offset, length)) { return false; } ctoken("\r\n"); } ctoken("--"); stoken(boundary); ctoken("--\r\n"); return true; }
O3
c
bool httplib::detail::process_multipart_ranges_data<bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(unsigned long, unsigned long)>(httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'(), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'()>(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, 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&)::'lambda'() const&)::'lambda'(unsigned long, unsigned long)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %rbx movq %r8, 0x20(%rsp) movq %rcx, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq %rsi, 0x38(%rsp) movq 0x188(%rdi), %rax cmpq 0x180(%rdi), %rax je 0x1f1e0 movq %rdi, %r13 movl $0x8, %r15d movq %rsp, %rbp xorl %r14d, %r14d movq %rdi, 0x40(%rsp) leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf481(%rip), %rsi # 0x2e314 leaq 0xf47c(%rip), %rdx # 0x2e316 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1eec4 callq 0x8520 movq 0x28(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x20(%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf524(%rip), %rsi # 0x2e412 leaq 0xf51f(%rip), %rdx # 0x2e414 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1ef1f callq 0x8520 movq 0x30(%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x1efce leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf3d5(%rip), %rsi # 0x2e317 leaq 0xf3dc(%rip), %rdx # 0x2e325 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1ef73 callq 0x8520 movq 0x30(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x20(%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf475(%rip), %rsi # 0x2e412 leaq 0xf470(%rip), %rdx # 0x2e414 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1efce callq 0x8520 movq 0x38(%rsp), %rax movq 0x80(%rax), %r12 movq 0x180(%r13), %rax movq -0x8(%rax,%r15), %rcx movq (%rax,%r15), %rax movq %rcx, %rdx andq %rax, %rdx cmpq $-0x1, %rdx jne 0x1effb xorl %r13d, %r13d jmp 0x1f02d movq %r12, %r13 subq %rax, %r13 testq %r13, %r13 movl $0x0, %edx cmovleq %rdx, %r13 decq %r12 cmpq $-0x1, %rcx cmovneq %rcx, %r13 cmoveq %r12, %rax cmpq $-0x1, %rax cmoveq %r12, %rax subq %r13, %rax incq %rax movq %rax, %r12 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf2e6(%rip), %rsi # 0x2e326 leaq 0xf2ee(%rip), %rdx # 0x2e335 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f071 callq 0x8520 movq 0x38(%rsp), %rax movq 0x80(%rax), %rcx movq %rbp, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d01b movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq 0x20(%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f0b2 callq 0x8520 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf34d(%rip), %rsi # 0x2e412 leaq 0xf348(%rip), %rdx # 0x2e414 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f0f6 callq 0x8520 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf309(%rip), %rsi # 0x2e412 leaq 0xf304(%rip), %rdx # 0x2e414 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f13a callq 0x8520 leaq 0x80(%rsp), %rax movq 0x8(%rax), %rsi movl $0xc0, %ecx addq %rcx, %rsi movq (%rax), %rdi movq 0x10(%rax), %rax movl $0x0, (%rsp) movq (%rax), %r8 movq %r13, %rdx movq %r12, %rcx movq %rbp, %r9 callq 0x1e9ae testb %al, %al je 0x1f273 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rbp, %rdi leaq 0xf28a(%rip), %rsi # 0x2e412 leaq 0xf285(%rip), %rdx # 0x2e414 callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq 0x40(%rsp), %r13 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f1be callq 0x8520 movq 0x188(%r13), %rax subq 0x180(%r13), %rax incq %r14 sarq $0x4, %rax addq $0x10, %r15 cmpq %rax, %r14 jb 0x1ee80 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xf124(%rip), %rsi # 0x2e314 leaq 0xf11f(%rip), %rdx # 0x2e316 movq %rsp, %rdi callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi cmpq %r14, %rdi je 0x1f21f callq 0x8520 movq 0x28(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x20(%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) movq %rsp, %rdi movq %r14, (%rdi) leaq 0xf0f3(%rip), %rsi # 0x2e336 leaq 0xf0f0(%rip), %rdx # 0x2e33a callq 0x10898 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rbx), %rax movq %rbx, %rdi callq *0x28(%rax) movq (%rsp), %rdi cmpq %r14, %rdi je 0x1f26f callq 0x8520 movb $0x1, %al jmp 0x1f275 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1f288 jmp 0x1f2ce movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi jne 0x1f2bf jmp 0x1f2d1 jmp 0x1f2ce jmp 0x1f2ae jmp 0x1f2ce jmp 0x1f2ae jmp 0x1f2ce jmp 0x1f2ce jmp 0x1f2ae jmp 0x1f2ae jmp 0x1f2ae jmp 0x1f2ae jmp 0x1f2ae jmp 0x1f2ae movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1f2d1 callq 0x8520 jmp 0x1f2d1 jmp 0x1f2ce jmp 0x1f2ce jmp 0x1f2ce jmp 0x1f2ce movq %rax, %rbx movq %rbx, %rdi callq 0x8980
_ZN7httplib6detail29process_multipart_ranges_dataIZNS0_27write_multipart_ranges_dataIZNS_6Server27write_content_with_providerERNS_6StreamERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESI_EUlvE_EEbS5_S8_SA_SI_SI_RKT_EUlSI_E_ZNS2_ISJ_EEbS5_S8_SA_SI_SI_SM_EUlSI_E0_ZNS2_ISJ_EEbS5_S8_SA_SI_SI_SM_EUlmmE_EEbS8_SA_SI_SI_SK_T0_T1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, r9 mov [rsp+78h+var_58], r8 mov [rsp+78h+var_48], rcx mov [rsp+78h+var_50], rdx mov [rsp+78h+var_40], rsi mov rax, [rdi+188h] cmp rax, [rdi+180h] jz loc_1F1E0 mov r13, rdi mov r15d, 8 mov rbp, rsp xor r14d, r14d mov [rsp+78h+var_38], rdi loc_1EE80: lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, asc_2E314; "--" lea rdx, asc_2E314+2; "" 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 rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1EEC4 call __ZdlPv; operator delete(void *) loc_1EEC4: mov rax, [rsp+78h+var_50] mov rsi, [rax] mov rdx, [rax+8] mov rdi, [rsp+78h+var_58] mov rax, [rdi] call qword ptr [rax+28h] lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, a0+3; "\r\n" lea rdx, a0+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1EF1F call __ZdlPv; operator delete(void *) loc_1EF1F: mov rax, [rsp+78h+var_48] cmp qword ptr [rax+8], 0 jz loc_1EFCE lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, aContentType_0; "Content-Type: " lea rdx, aContentType_0+0Eh; "" 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 rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1EF73 call __ZdlPv; operator delete(void *) loc_1EF73: mov rax, [rsp+78h+var_48] mov rsi, [rax] mov rdx, [rax+8] mov rdi, [rsp+78h+var_58] mov rax, [rdi] call qword ptr [rax+28h] lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, a0+3; "\r\n" lea rdx, a0+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1EFCE call __ZdlPv; operator delete(void *) loc_1EFCE: mov rax, [rsp+78h+var_40] mov r12, [rax+80h] mov rax, [r13+180h] mov rcx, [rax+r15-8] mov rax, [rax+r15] mov rdx, rcx and rdx, rax cmp rdx, 0FFFFFFFFFFFFFFFFh jnz short loc_1EFFB xor r13d, r13d jmp short loc_1F02D loc_1EFFB: mov r13, r12 sub r13, rax test r13, r13 mov edx, 0 cmovle r13, rdx dec r12 cmp rcx, 0FFFFFFFFFFFFFFFFh cmovnz r13, rcx cmovz rax, r12 cmp rax, 0FFFFFFFFFFFFFFFFh cmovz rax, r12 sub rax, r13 inc rax mov r12, rax loc_1F02D: lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax; void * mov rdi, rbp lea rsi, aContentRange_0; "Content-Range: " lea rdx, aContentRange_0+0Fh; "" 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 rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1F071 call __ZdlPv; operator delete(void *) loc_1F071: mov rax, [rsp+78h+var_40] mov rcx, [rax+80h]; int mov rdi, rbp; int mov rsi, r13; int mov rdx, r12; int call _ZN7httplib6detail31make_content_range_header_fieldB5cxx11Emmm; httplib::detail::make_content_range_header_field(ulong,ulong,ulong) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rdi, [rsp+78h+var_58] mov rax, [rdi] call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1F0B2 call __ZdlPv; operator delete(void *) loc_1F0B2: lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, a0+3; "\r\n" lea rdx, a0+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1F0F6 call __ZdlPv; operator delete(void *) loc_1F0F6: lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, a0+3; "\r\n" lea rdx, a0+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1F13A call __ZdlPv; operator delete(void *) loc_1F13A: lea rax, [rsp+78h+arg_0] mov rsi, [rax+8] mov ecx, 0C0h add rsi, rcx mov rdi, [rax] mov rax, [rax+10h] mov dword ptr [rsp+78h+var_78], 0 mov r8, [rax] mov rdx, r13 mov rcx, r12 mov r9, rbp call _ZN7httplib6detail13write_contentIZNS_6Server27write_content_with_providerERNS_6StreamERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_EUlvE_EEbS4_RKSt8functionIFbmmRNS_8DataSinkEEEmmT_RNS_5ErrorE; httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function<bool ()(ulong,ulong,httplib::DataSink &)> const&,ulong,ulong,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &) test al, al jz loc_1F273 lea rax, [rsp+78h+var_68] mov [rsp+78h+var_78], rax mov rdi, rbp lea rsi, a0+3; "\r\n" lea rdx, a0+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov r13, [rsp+78h+var_38] mov rdi, [rsp+78h+var_78]; void * lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_1F1BE call __ZdlPv; operator delete(void *) loc_1F1BE: mov rax, [r13+188h] sub rax, [r13+180h] inc r14 sar rax, 4 add r15, 10h cmp r14, rax jb loc_1EE80 loc_1F1E0: lea r14, [rsp+78h+var_68] mov [r14-10h], r14 lea rsi, asc_2E314; "--" lea rdx, asc_2E314+2; "" mov rdi, rsp 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 rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * cmp rdi, r14 jz short loc_1F21F call __ZdlPv; operator delete(void *) loc_1F21F: mov rax, [rsp+78h+var_50] mov rsi, [rax] mov rdx, [rax+8] mov rdi, [rsp+78h+var_58] mov rax, [rdi] call qword ptr [rax+28h] mov rdi, rsp mov [rdi], r14 lea rsi, asc_2E336; "--\r\n" lea rdx, asc_2E336+4; "" 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 rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, [rbx] mov rdi, rbx call qword ptr [rax+28h] mov rdi, [rsp+78h+var_78]; void * cmp rdi, r14 jz short loc_1F26F call __ZdlPv; operator delete(void *) loc_1F26F: mov al, 1 jmp short loc_1F275 loc_1F273: xor eax, eax loc_1F275: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1F288 jmp short loc_1F2CE loc_1F288: mov rbx, rax mov rdi, [rsp+0] cmp rdi, r14 jnz short loc_1F2BF jmp short loc_1F2D1 jmp short loc_1F2CE jmp short loc_1F2AE jmp short loc_1F2CE jmp short loc_1F2AE jmp short loc_1F2CE jmp short loc_1F2CE jmp short loc_1F2AE jmp short loc_1F2AE jmp short loc_1F2AE jmp short loc_1F2AE jmp short loc_1F2AE jmp short $+2 loc_1F2AE: mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_1F2D1 loc_1F2BF: call __ZdlPv; operator delete(void *) jmp short loc_1F2D1 jmp short loc_1F2CE jmp short loc_1F2CE jmp short loc_1F2CE jmp short $+2 loc_1F2CE: mov rbx, rax loc_1F2D1: mov rdi, rbx call __Unwind_Resume
char httplib::detail::process_multipart_ranges_data<bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1} const&)::{lambda(std::string const&)#1},bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1} const&)::{lambda(std::string const&)#2},bool httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1} const&)::{lambda(unsigned long,unsigned long)#1}>( long long a1, long long a2, _QWORD *a3, _QWORD *a4, long long a5, long long a6, long long a7, long long a8, long long *a9) { long long v10; // r13 long long v11; // r15 unsigned long long v12; // r14 long long v13; // r12 long long v14; // rax unsigned long long v15; // rcx long long v16; // rax unsigned long long v17; // r13 long long v18; // r12 void *v20; // [rsp+0h] [rbp-78h] BYREF long long v21; // [rsp+8h] [rbp-70h] _BYTE v22[16]; // [rsp+10h] [rbp-68h] BYREF long long v23; // [rsp+20h] [rbp-58h] _QWORD *v24; // [rsp+28h] [rbp-50h] _QWORD *v25; // [rsp+30h] [rbp-48h] long long v26; // [rsp+38h] [rbp-40h] long long v27; // [rsp+40h] [rbp-38h] v23 = a5; v25 = a4; v24 = a3; v26 = a2; if ( *(_QWORD *)(a1 + 392) == *(_QWORD *)(a1 + 384) ) { LABEL_34: v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "--", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)v23 + 40LL))(v23, *v24, v24[1]); v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "--\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); return 1; } else { v10 = a1; v11 = 8LL; v12 = 0LL; v27 = a1; while ( 1 ) { v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "--", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)v23 + 40LL))(v23, *v24, v24[1]); v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); if ( v25[1] ) { v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "Content-Type: ", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)v23 + 40LL))(v23, *v25, v25[1]); v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); } v13 = *(_QWORD *)(v26 + 128); v14 = *(_QWORD *)(v10 + 384); v15 = *(_QWORD *)(v14 + v11 - 8); v16 = *(_QWORD *)(v14 + v11); if ( (v16 & v15) == 0xFFFFFFFFFFFFFFFFLL ) { v17 = 0LL; } else { v17 = v13 - v16; if ( v13 - v16 <= 0 ) v17 = 0LL; v18 = v13 - 1; if ( v15 == -1LL ) v16 = v18; else v17 = v15; if ( v16 == -1 ) v16 = v18; v13 = v16 - v17 + 1; } v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "Content-Range: ", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); httplib::detail::make_content_range_header_field[abi:cxx11](&v20, v17, v13, *(_QWORD *)(v26 + 128)); (*(void ( **)(long long, void *, long long))(*(_QWORD *)v23 + 40LL))(v23, v20, v21); if ( v20 != v22 ) operator delete(v20); v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); if ( v20 != v22 ) operator delete(v20); LODWORD(v20) = 0; if ( !(unsigned __int8)httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>( a7, a8 + 192, v17, v13, *a9, (int *)&v20) ) return 0; v20 = v22; std::string::_M_construct<char const*>((long long)&v20, "\r\n", (long long)""); (*(void ( **)(long long, void *, long long))(*(_QWORD *)a6 + 40LL))(a6, v20, v21); v10 = v27; if ( v20 != v22 ) operator delete(v20); ++v12; v11 += 16LL; if ( v12 >= (long long)(*(_QWORD *)(v10 + 392) - *(_QWORD *)(v10 + 384)) >> 4 ) goto LABEL_34; } } }
process_multipart_ranges_data<httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}const&)::{lambda(std::__cxx11::string_const&)#1},httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}const&)::{lambda(std::__cxx11::string_const&)#2},httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}const&)::{lambda(unsigned_long,unsigned_long)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,R9 MOV qword ptr [RSP + 0x20],R8 MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RDI + 0x188] CMP RAX,qword ptr [RDI + 0x180] JZ 0x0011f1e0 MOV R13,RDI MOV R15D,0x8 MOV RBP,RSP XOR R14D,R14D MOV qword ptr [RSP + 0x40],RDI LAB_0011ee80: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011ee89: MOV RDI,RBP LEA RSI,[0x12e314] LEA RDX,[0x12e316] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011eeab: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011eeb1: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011eec4 CALL 0x00108520 LAB_0011eec4: MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011eee4: MOV RDI,RBP LEA RSI,[0x12e412] LEA RDX,[0x12e414] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011ef06: MOV RDI,RBX CALL qword ptr [RAX + 0x28] MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011ef1f CALL 0x00108520 LAB_0011ef1f: MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011efce LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011ef38: MOV RDI,RBP LEA RSI,[0x12e317] LEA RDX,[0x12e325] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011ef5a: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011ef60: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011ef73 CALL 0x00108520 LAB_0011ef73: MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011ef93: MOV RDI,RBP LEA RSI,[0x12e412] LEA RDX,[0x12e414] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011efb5: MOV RDI,RBX CALL qword ptr [RAX + 0x28] MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011efce CALL 0x00108520 LAB_0011efce: MOV RAX,qword ptr [RSP + 0x38] MOV R12,qword ptr [RAX + 0x80] MOV RAX,qword ptr [R13 + 0x180] MOV RCX,qword ptr [RAX + R15*0x1 + -0x8] MOV RAX,qword ptr [RAX + R15*0x1] MOV RDX,RCX AND RDX,RAX CMP RDX,-0x1 JNZ 0x0011effb XOR R13D,R13D JMP 0x0011f02d LAB_0011effb: MOV R13,R12 SUB R13,RAX TEST R13,R13 MOV EDX,0x0 CMOVLE R13,RDX DEC R12 CMP RCX,-0x1 CMOVNZ R13,RCX CMOVZ RAX,R12 CMP RAX,-0x1 CMOVZ RAX,R12 SUB RAX,R13 INC RAX MOV R12,RAX LAB_0011f02d: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011f036: MOV RDI,RBP LEA RSI,[0x12e326] LEA RDX,[0x12e335] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f058: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011f05e: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011f071 CALL 0x00108520 LAB_0011f071: MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x80] MOV RDI,RBP MOV RSI,R13 MOV RDX,R12 CALL 0x0011d01b MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RDI] LAB_0011f09c: CALL qword ptr [RAX + 0x28] MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011f0b2 CALL 0x00108520 LAB_0011f0b2: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011f0bb: MOV RDI,RBP LEA RSI,[0x12e412] LEA RDX,[0x12e414] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f0dd: MOV RDI,RBX CALL qword ptr [RAX + 0x28] MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011f0f6 CALL 0x00108520 LAB_0011f0f6: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011f0ff: MOV RDI,RBP LEA RSI,[0x12e412] LEA RDX,[0x12e414] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f121: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011f127: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011f13a CALL 0x00108520 LAB_0011f13a: LEA RAX,[RSP + 0x80] MOV RSI,qword ptr [RAX + 0x8] MOV ECX,0xc0 ADD RSI,RCX MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RSP],0x0 MOV R8,qword ptr [RAX] MOV RDX,R13 MOV RCX,R12 MOV R9,RBP CALL 0x0011e9ae TEST AL,AL JZ 0x0011f273 LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0011f17e: MOV RDI,RBP LEA RSI,[0x12e412] LEA RDX,[0x12e414] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f1a0: MOV RDI,RBX CALL qword ptr [RAX + 0x28] MOV R13,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011f1be CALL 0x00108520 LAB_0011f1be: MOV RAX,qword ptr [R13 + 0x188] SUB RAX,qword ptr [R13 + 0x180] INC R14 SAR RAX,0x4 ADD R15,0x10 CMP R14,RAX JC 0x0011ee80 LAB_0011f1e0: LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_0011f1e9: LEA RSI,[0x12e314] LEA RDX,[0x12e316] MOV RDI,RSP CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f20b: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011f211: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x0011f21f CALL 0x00108520 LAB_0011f21f: MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] MOV RDI,RSP MOV qword ptr [RDI],R14 LAB_0011f23c: LEA RSI,[0x12e336] LEA RDX,[0x12e33a] CALL 0x00110898 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RBX] LAB_0011f25b: MOV RDI,RBX CALL qword ptr [RAX + 0x28] LAB_0011f261: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x0011f26f CALL 0x00108520 LAB_0011f26f: MOV AL,0x1 JMP 0x0011f275 LAB_0011f273: XOR EAX,EAX LAB_0011f275: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* bool httplib::detail::process_multipart_ranges_data<httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(std::__cxx11::string const&)#1}, httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(std::__cxx11::string const&)#2}, httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(unsigned long, unsigned long)#1}>(httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(std::__cxx11::string const&)#1}, httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(std::__cxx11::string const&)#2}, httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1}>(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1} const&)::{lambda(unsigned long, unsigned long)#1}) */ bool httplib::detail:: process_multipart_ranges_data<httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_const&)::_lambda(std::__cxx11::string_const&)_1_,httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_const&)::_lambda(std::__cxx11::string_const&)_2_,httplib::detail::write_multipart_ranges_data<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_const&)::_lambda(unsigned_long,unsigned_long)_1_> (long param_1,long param_2,int8 *param_3,int8 *param_4,long *param_5, long *param_6,int8 param_7,long param_8,int8 *param_9) { bool bVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; int1 *local_78; int8 local_70; int1 local_68 [16]; long *local_58; int8 *local_50; int8 *local_48; long local_40; long local_38; local_58 = param_5; local_50 = param_3; local_48 = param_4; local_40 = param_2; if (*(long *)(param_1 + 0x188) != *(long *)(param_1 + 0x180)) { lVar7 = 8; uVar6 = 0; local_38 = param_1; do { local_78 = local_68; /* try { // try from 0011ee89 to 0011ee9e has its CatchHandler @ 0011f2ca */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e314,&DAT_0012e316); /* try { // try from 0011eeab to 0011eeb0 has its CatchHandler @ 0011f2a8 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } (**(code **)(*local_58 + 0x28))(local_58,*local_50,local_50[1]); local_78 = local_68; /* try { // try from 0011eee4 to 0011eef9 has its CatchHandler @ 0011f2c8 */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e412,&DAT_0012e414); /* try { // try from 0011ef06 to 0011ef0b has its CatchHandler @ 0011f2a6 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } if (local_48[1] != 0) { local_78 = local_68; /* try { // try from 0011ef38 to 0011ef4d has its CatchHandler @ 0011f29e */ std::__cxx11::string::_M_construct<char_const*>(&local_78,"Content-Type: ",""); /* try { // try from 0011ef5a to 0011ef5f has its CatchHandler @ 0011f29c */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } (**(code **)(*local_58 + 0x28))(local_58,*local_48,local_48[1]); local_78 = local_68; /* try { // try from 0011ef93 to 0011efa8 has its CatchHandler @ 0011f29a */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e412,&DAT_0012e414); /* try { // try from 0011efb5 to 0011efba has its CatchHandler @ 0011f298 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } } uVar3 = *(ulong *)(local_40 + 0x80); uVar4 = *(ulong *)(*(long *)(param_1 + 0x180) + -8 + lVar7); uVar2 = *(ulong *)(*(long *)(param_1 + 0x180) + lVar7); if ((uVar4 & uVar2) == 0xffffffffffffffff) { uVar4 = 0; } else { uVar5 = uVar3 - uVar2; if ((long)uVar5 < 1) { uVar5 = 0; } if (uVar4 == 0xffffffffffffffff) { uVar2 = uVar3 - 1; uVar4 = uVar5; } if (uVar2 == 0xffffffffffffffff) { uVar2 = uVar3 - 1; } uVar3 = (uVar2 - uVar4) + 1; } local_78 = local_68; /* try { // try from 0011f036 to 0011f04b has its CatchHandler @ 0011f2c6 */ std::__cxx11::string::_M_construct<char_const*>(&local_78,"Content-Range: ",""); /* try { // try from 0011f058 to 0011f05d has its CatchHandler @ 0011f2a4 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } make_content_range_header_field_abi_cxx11_ ((detail *)&local_78,uVar4,uVar3,*(ulong *)(local_40 + 0x80)); /* try { // try from 0011f09c to 0011f09e has its CatchHandler @ 0011f2ae */ (**(code **)(*local_58 + 0x28))(local_58,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } local_78 = local_68; /* try { // try from 0011f0bb to 0011f0d0 has its CatchHandler @ 0011f2ce */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e412,&DAT_0012e414); /* try { // try from 0011f0dd to 0011f0e2 has its CatchHandler @ 0011f2ac */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } local_78 = local_68; /* try { // try from 0011f0ff to 0011f114 has its CatchHandler @ 0011f2cc */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e412,&DAT_0012e414); /* try { // try from 0011f121 to 0011f126 has its CatchHandler @ 0011f2aa */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } local_78 = (int1 *)((ulong)local_78 & 0xffffffff00000000); bVar1 = write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_> (param_7,param_8 + 0xc0,uVar4,uVar3,*param_9,&local_78); if (!bVar1) { return false; } local_78 = local_68; /* try { // try from 0011f17e to 0011f193 has its CatchHandler @ 0011f2a0 */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e412,&DAT_0012e414); /* try { // try from 0011f1a0 to 0011f1a5 has its CatchHandler @ 0011f2a2 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); param_1 = local_38; if (local_78 != local_68) { operator_delete(local_78); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < (ulong)(*(long *)(param_1 + 0x188) - *(long *)(param_1 + 0x180) >> 4)); } local_78 = local_68; /* try { // try from 0011f1e9 to 0011f1fe has its CatchHandler @ 0011f296 */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e314,&DAT_0012e316); /* try { // try from 0011f20b to 0011f210 has its CatchHandler @ 0011f288 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } (**(code **)(*local_58 + 0x28))(local_58,*local_50,local_50[1]); local_78 = local_68; /* try { // try from 0011f23c to 0011f24e has its CatchHandler @ 0011f286 */ std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_0012e336,&DAT_0012e33a); /* try { // try from 0011f25b to 0011f260 has its CatchHandler @ 0011f284 */ (**(code **)(*param_6 + 0x28))(param_6,local_78,local_70); if (local_78 != local_68) { operator_delete(local_78); } return true; }
32,322
inline_mysql_file_chsize
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_chsize( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t newlength, int filler, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, src_line); result= my_chsize(file, newlength, filler, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); return result; } #endif result= my_chsize(file, newlength, filler, flags); return result; }
O0
c
inline_mysql_file_chsize: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x29a7a8(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0xd, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x676f2 leaq 0x29a762(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0x11e250 movl %eax, -0x34(%rbp) leaq 0x29a72a(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x6770e movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0x11e250 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_chsize: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 0Dh call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_676F2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_6770E loc_676F2: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_6770E: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_chsize( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 13LL); if ( v8 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v8, v12, v15, v14); v9 = my_chsize(v13, v12, v11, v10); ((void ( *)(long long, long long))PSI_server[67])(v8, v12); } else { return (unsigned int)my_chsize(v13, v12, v11, v10); } return v9; }
inline_mysql_file_chsize: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0xd CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001676f2 LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0021e250 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016770e LAB_001676f2: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0021e250 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0016770e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_chsize (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,0xd); if (local_48 == 0) { local_c = my_chsize(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_28,local_18,local_1c); local_3c = my_chsize(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,local_28); local_c = local_3c; } return local_c; }
32,323
ast_visualize_impl
eshkol/src/frontend/ast/ast_visualize.c
void ast_visualize_impl(AstNode* ast, const char* format) { if (strcmp(format, "mermaid") == 0) { printf("graph TD\n"); int current_id = 0; print_mermaid_edges(ast, -1, &current_id); } else if (strcmp(format, "dot") == 0) { printf("digraph AST {\n"); printf(" node [shape=box];\n"); int current_id = 0; print_dot_edges(ast, -1, &current_id); printf("}\n"); } }
O3
c
ast_visualize_impl: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x6c20(%rip), %rsi # 0xbe88 movq %r14, %rdi callq 0x10d0 testl %eax, %eax je 0x52c4 leaq 0x6c15(%rip), %rsi # 0xbe90 movq %r14, %rdi callq 0x10d0 testl %eax, %eax jne 0x52e7 leaq 0x6e47(%rip), %rdi # 0xc0d5 callq 0x1050 leaq 0x6e49(%rip), %rdi # 0xc0e3 callq 0x1050 leaq -0x14(%rbp), %rdx movl $0x0, (%rdx) movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x585c leaq 0x6e3a(%rip), %rdi # 0xc0f7 callq 0x1050 jmp 0x52e7 leaq 0x6e2e(%rip), %rdi # 0xc0f9 callq 0x1050 leaq -0x18(%rbp), %rdx movl $0x0, (%rdx) movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x52f0 addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
ast_visualize_impl: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi lea rsi, aMermaid; "mermaid" mov rdi, r14 call _strcmp test eax, eax jz short loc_52C4 lea rsi, aDot; "dot" mov rdi, r14 call _strcmp test eax, eax jnz short loc_52E7 lea rdi, aDigraphAst; "digraph AST {" call _puts lea rdi, aNodeShapeBox; " node [shape=box];" call _puts lea rdx, [rbp+var_14] mov dword ptr [rdx], 0 mov rdi, rbx mov esi, 0FFFFFFFFh call print_dot_edges lea rdi, asc_C0F7; "}" call _puts jmp short loc_52E7 loc_52C4: lea rdi, aGraphTd; "graph TD" call _puts lea rdx, [rbp+var_18] mov dword ptr [rdx], 0 mov rdi, rbx mov esi, 0FFFFFFFFh call print_mermaid_edges loc_52E7: add rsp, 10h pop rbx pop r14 pop rbp retn
long long ast_visualize_impl(long long a1, long long a2) { long long v2; // rdx long long result; // rax long long v4; // rdx long long v5; // rdx long long v6; // rdx int v7; // [rsp+8h] [rbp-18h] BYREF _DWORD v8[5]; // [rsp+Ch] [rbp-14h] BYREF if ( !(unsigned int)strcmp(a2, "mermaid") ) { puts("graph TD", "mermaid", v2); v7 = 0; return print_mermaid_edges(a1, 0xFFFFFFFFLL, &v7); } else { result = strcmp(a2, "dot"); if ( !(_DWORD)result ) { puts("digraph AST {", "dot", v4); puts(" node [shape=box];", "dot", v5); v8[0] = 0; print_dot_edges(a1, 0xFFFFFFFFLL, v8); return puts("}", 0xFFFFFFFFLL, v6); } } return result; }
ast_visualize_impl: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI LEA RSI,[0x10be88] MOV RDI,R14 CALL 0x001010d0 TEST EAX,EAX JZ 0x001052c4 LEA RSI,[0x10be90] MOV RDI,R14 CALL 0x001010d0 TEST EAX,EAX JNZ 0x001052e7 LEA RDI,[0x10c0d5] CALL 0x00101050 LEA RDI,[0x10c0e3] CALL 0x00101050 LEA RDX,[RBP + -0x14] MOV dword ptr [RDX],0x0 MOV RDI,RBX MOV ESI,0xffffffff CALL 0x0010585c LEA RDI,[0x10c0f7] CALL 0x00101050 JMP 0x001052e7 LAB_001052c4: LEA RDI,[0x10c0f9] CALL 0x00101050 LEA RDX,[RBP + -0x18] MOV dword ptr [RDX],0x0 MOV RDI,RBX MOV ESI,0xffffffff CALL 0x001052f0 LAB_001052e7: ADD RSP,0x10 POP RBX POP R14 POP RBP RET
void ast_visualize_impl(int8 param_1,char *param_2) { int iVar1; iVar1 = strcmp(param_2,"mermaid"); if (iVar1 == 0) { puts("graph TD"); print_mermaid_edges(param_1,0xffffffff); } else { iVar1 = strcmp(param_2,"dot"); if (iVar1 == 0) { puts("digraph AST {"); puts(" node [shape=box];"); print_dot_edges(param_1,0xffffffff); puts("}"); } } return; }
32,324
ma_update_blob_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { uchar *rec_buff; int error; ulong reclength,reclength2,extra; my_bool buff_alloced; extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+ MARIA_DYN_DELETE_BLOCK_HEADER); reclength= (info->s->base.pack_reclength+ _ma_calc_total_blob_length(info,record)+ extra); #ifdef NOT_USED /* We now support big rows */ if (reclength > MARIA_DYN_MAX_ROW_LENGTH) { my_errno=HA_ERR_TO_BIG_ROW; return 1; } #endif alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength); if (!rec_buff) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(1); } reclength2= _ma_rec_pack(info, rec_buff+ ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), record); if (!reclength2) { error= 1; goto err; } DBUG_ASSERT(reclength2 <= reclength); error=update_dynamic_record(info,pos, rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), reclength2); err: stack_alloc_free(rec_buff, buff_alloced); return(error != 0); }
O3
c
ma_update_blob_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x3a0(%rax), %r12 movq %rcx, %rsi callq 0x43eee leaq (%r12,%rax), %rsi addq $0x5c, %rsi leaq -0x40(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%r14), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x44000 cmpq $0x10000, %rax # imm = 0x10000 ja 0x43fe8 cmpq $0x1000, %rsi # imm = 0x1000 jb 0x44000 cmpq $0x8001, %rax # imm = 0x8001 jb 0x44000 movq %rsp, %r12 addq $0xf, %rsi andq $-0x10, %rsi subq %rsi, %r12 movq %r12, %rsp movb $0x1, %al movl %eax, -0x34(%rbp) jmp 0x4401b movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xa2c71 testq %rax, %rax je 0x4405b movq %rax, %r12 movl $0x0, -0x34(%rbp) leaq 0x18(%r12), %r13 movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x43561 testl %eax, %eax je 0x44049 movl %eax, %ecx movq %r14, %rdi movq %rbx, %rsi movq %r13, %rdx callq 0x439f6 testb %al, %al setne %bl jmp 0x4404b movb $0x1, %bl cmpb $0x0, -0x34(%rbp) jne 0x44068 movq %r12, %rdi callq 0xa2e9e jmp 0x44068 callq 0xa4ab2 movl $0x80, (%rax) movb $0x1, %bl movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x44088 movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29220
_ma_update_blob_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rcx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r12, [rax+3A0h] mov rsi, rcx call _ma_calc_total_blob_length lea rsi, [r12+rax] add rsi, 5Ch ; '\' lea rcx, [rbp+var_40] mov [rcx], rsi mov rax, [r14+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_44000 cmp rax, 10000h ja short loc_43FE8 cmp rsi, 1000h jb short loc_44000 cmp rax, 8001h jb short loc_44000 loc_43FE8: mov r12, rsp add rsi, 0Fh and rsi, 0FFFFFFFFFFFFFFF0h sub r12, rsi mov rsp, r12 mov al, 1 mov [rbp+var_34], eax jmp short loc_4401B loc_44000: mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz short loc_4405B mov r12, rax mov [rbp+var_34], 0 loc_4401B: lea r13, [r12+18h] mov rdi, r14 mov rsi, r13 mov rdx, r15 call _ma_rec_pack test eax, eax jz short loc_44049 mov ecx, eax mov rdi, r14 mov rsi, rbx mov rdx, r13 call update_dynamic_record test al, al setnz bl jmp short loc_4404B loc_44049: mov bl, 1 loc_4404B: cmp byte ptr [rbp+var_34], 0 jnz short loc_44068 mov rdi, r12 call my_free jmp short loc_44068 loc_4405B: call _my_thread_var mov dword ptr [rax], 80h mov bl, 1 loc_44068: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_44088 mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44088: call ___stack_chk_fail
long long ma_update_blob_record(long long a1, long long a2, long long a3, unsigned __int8 *a4) { long long v6; // r12 unsigned long long v7; // rsi unsigned long long v8; // rax bool v9; // cc unsigned long long v10; // rax char *v11; // r12 long long v12; // rax unsigned int v13; // eax unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF int v16; // [rsp+Ch] [rbp-34h] unsigned long long v17; // [rsp+10h] [rbp-30h] v17 = __readfsqword(0x28u); v6 = *(_QWORD *)(*(_QWORD *)a1 + 928LL); v7 = v6 + ma_calc_total_blob_length((_QWORD *)a1, (long long)a4) + 92; v15 = v7; v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v15; v9 = v8 <= v7; v10 = v8 - v7; if ( v9 || v10 <= 0x10000 && (v7 < 0x1000 || v10 < 0x8001) ) { v12 = my_malloc(0LL, v7, 65552LL); if ( !v12 ) { *(_DWORD *)my_thread_var(0LL) = 128; LOBYTE(a2) = 1; return (unsigned int)a2; } v11 = (char *)v12; v16 = 0; } else { v11 = (char *)&v15 - ((v7 + 15) & 0xFFFFFFFFFFFFFFF0LL); LOBYTE(v10) = 1; v16 = v10; } v13 = ma_rec_pack((unsigned __int8 *)a1, v11 + 24, a4); if ( v13 ) LOBYTE(a2) = update_dynamic_record((_QWORD *)a1, a2, (long long)(v11 + 24), v13); else LOBYTE(a2) = 1; if ( !(_BYTE)v16 ) my_free(v11); return (unsigned int)a2; }
_ma_update_blob_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RCX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R12,qword ptr [RAX + 0x3a0] MOV RSI,RCX CALL 0x00143eee LEA RSI,[R12 + RAX*0x1] ADD RSI,0x5c LEA RCX,[RBP + -0x40] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [R14 + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x00144000 CMP RAX,0x10000 JA 0x00143fe8 CMP RSI,0x1000 JC 0x00144000 CMP RAX,0x8001 JC 0x00144000 LAB_00143fe8: MOV R12,RSP ADD RSI,0xf AND RSI,-0x10 SUB R12,RSI MOV RSP,R12 MOV AL,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0014401b LAB_00144000: MOV EDX,0x10010 XOR EDI,EDI CALL 0x001a2c71 TEST RAX,RAX JZ 0x0014405b MOV R12,RAX MOV dword ptr [RBP + -0x34],0x0 LAB_0014401b: LEA R13,[R12 + 0x18] MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 CALL 0x00143561 TEST EAX,EAX JZ 0x00144049 MOV ECX,EAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R13 CALL 0x001439f6 TEST AL,AL SETNZ BL JMP 0x0014404b LAB_00144049: MOV BL,0x1 LAB_0014404b: CMP byte ptr [RBP + -0x34],0x0 JNZ 0x00144068 MOV RDI,R12 CALL 0x001a2e9e JMP 0x00144068 LAB_0014405b: CALL 0x001a4ab2 MOV dword ptr [RAX],0x80 MOV BL,0x1 LAB_00144068: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00144088 MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144088: CALL 0x00129220
ulong _ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4) { long lVar1; char cVar2; int iVar3; long lVar4; ulong uVar5; int1 *puVar6; int4 *puVar7; int7 uVar8; ulong *puVar9; long in_FS_OFFSET; ulong local_48; int4 local_3c; long local_38; puVar9 = &local_48; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(*param_1 + 0x3a0); lVar4 = _ma_calc_total_blob_length(param_1,param_4); lVar1 = lVar1 + lVar4; local_48 = lVar1 + 0x5c; uVar5 = (*(long *)param_1[0xf] - (long)&local_48) - local_48; uVar8 = (int7)((ulong)param_2 >> 8); if (((ulong)(*(long *)param_1[0xf] - (long)&local_48) < local_48 || uVar5 == 0) || ((uVar5 < 0x10001 && ((local_48 < 0x1000 || (uVar5 < 0x8001)))))) { puVar6 = (int1 *)my_malloc(0,local_48,0x10010); if (puVar6 == (int1 *)0x0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x80; uVar5 = CONCAT71(uVar8,1); goto LAB_00144068; } local_3c = 0; puVar9 = &local_48; } else { puVar6 = (int1 *)((long)&local_48 - (lVar1 + 0x6bU & 0xfffffffffffffff0)); local_3c = (int4)CONCAT71((int7)(uVar5 >> 8),1); puVar9 = (ulong *)puVar6; } *(int8 *)((long)puVar9 + -8) = 0x14402e; iVar3 = _ma_rec_pack(param_1,puVar6 + 0x18,param_4); if (iVar3 == 0) { uVar5 = CONCAT71(uVar8,1); } else { *(int8 *)((long)puVar9 + -8) = 0x144042; cVar2 = update_dynamic_record(param_1,param_2,puVar6 + 0x18,iVar3); uVar5 = CONCAT71(uVar8,cVar2 != '\0'); } if ((char)local_3c == '\0') { *(int8 *)((long)puVar9 + -8) = 0x144059; my_free(puVar6); } LAB_00144068: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5 & 0xffffffff; } /* WARNING: Subroutine does not return */ *(code **)((long)puVar9 + -8) = _ma_delete_dynamic_record; __stack_chk_fail(); }
32,325
js_promise_mark
bluesky950520[P]quickjs/quickjs.c
static void js_promise_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSPromiseData *s = JS_GetOpaque(val, JS_CLASS_PROMISE); struct list_head *el; int i; if (!s) return; for(i = 0; i < 2; i++) { list_for_each(el, &s->promise_reactions[i]) { JSPromiseReactionData *rd = list_entry(el, JSPromiseReactionData, link); JS_MarkValue(rt, rd->resolving_funcs[0], mark_func); JS_MarkValue(rt, rd->resolving_funcs[1], mark_func); JS_MarkValue(rt, rd->handler, mark_func); } } JS_MarkValue(rt, s->promise_result, mark_func); }
O0
c
js_promise_mark: subq $0x48, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movl $0x31, %edx callq 0x3e640 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x979be jmp 0x97aad movl $0x0, 0x14(%rsp) cmpl $0x2, 0x14(%rsp) jge 0x97a91 movq 0x20(%rsp), %rax addq $0x8, %rax movslq 0x14(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x8, %rcx movslq 0x14(%rsp), %rdx shlq $0x4, %rdx addq %rdx, %rcx cmpq %rcx, %rax je 0x97a7f movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x30ed0 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) jmp 0x979ef jmp 0x97a81 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x979c6 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x30ed0 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
js_promise_mark: sub rsp, 48h mov [rsp+48h+var_10], rsi mov [rsp+48h+var_8], rdx mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rcx mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_8] mov edx, 31h ; '1' call JS_GetOpaque mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_979BE jmp loc_97AAD loc_979BE: mov [rsp+48h+var_34], 0 loc_979C6: cmp [rsp+48h+var_34], 2 jge loc_97A91 mov rax, [rsp+48h+var_28] add rax, 8 movsxd rcx, [rsp+48h+var_34] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov [rsp+48h+var_30], rax loc_979EF: mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_28] add rcx, 8 movsxd rdx, [rsp+48h+var_34] shl rdx, 4 add rcx, rdx cmp rax, rcx jz short loc_97A7F mov rax, [rsp+48h+var_30] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_MarkValue mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_MarkValue mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_MarkValue mov rax, [rsp+48h+var_30] mov rax, [rax+8] mov [rsp+48h+var_30], rax jmp loc_979EF loc_97A7F: jmp short $+2 loc_97A81: mov eax, [rsp+48h+var_34] add eax, 1 mov [rsp+48h+var_34], eax jmp loc_979C6 loc_97A91: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_MarkValue loc_97AAD: add rsp, 48h retn
long long js_promise_mark(long long a1, long long a2, int a3, long long ( *a4)(long long, long long)) { long long result; // rax long long *v5; // [rsp+8h] [rbp-40h] int i; // [rsp+14h] [rbp-34h] long long *j; // [rsp+18h] [rbp-30h] long long v8; // [rsp+20h] [rbp-28h] result = JS_GetOpaque(a2, a3, 49); v8 = result; if ( result ) { for ( i = 0; i < 2; ++i ) { for ( j = *(long long **)(16LL * i + v8 + 8 + 8); j != (long long *)(16LL * i + v8 + 8); j = (long long *)j[1] ) { v5 = j; JS_MarkValue(a1, j[2], j[3], a4); JS_MarkValue(a1, v5[4], v5[5], a4); JS_MarkValue(a1, v5[6], v5[7], a4); } } return JS_MarkValue(a1, *(_QWORD *)(v8 + 48), *(_QWORD *)(v8 + 56), a4); } return result; }
js_promise_mark: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RCX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,0x31 CALL 0x0013e640 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001979be JMP 0x00197aad LAB_001979be: MOV dword ptr [RSP + 0x14],0x0 LAB_001979c6: CMP dword ptr [RSP + 0x14],0x2 JGE 0x00197a91 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x8 MOVSXD RCX,dword ptr [RSP + 0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX LAB_001979ef: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x8 MOVSXD RDX,dword ptr [RSP + 0x14] SHL RDX,0x4 ADD RCX,RDX CMP RAX,RCX JZ 0x00197a7f MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x00130ed0 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX JMP 0x001979ef LAB_00197a7f: JMP 0x00197a81 LAB_00197a81: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x001979c6 LAB_00197a91: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x00130ed0 LAB_00197aad: ADD RSP,0x48 RET
void js_promise_mark(int8 param_1,int8 param_2,int8 param_3,int8 param_4) { long lVar1; int4 local_34; int8 local_30; lVar1 = JS_GetOpaque(param_2,param_3,0x31); if (lVar1 != 0) { for (local_34 = 0; local_34 < 2; local_34 = local_34 + 1) { for (local_30 = *(long *)(lVar1 + (long)local_34 * 0x10 + 0x10); local_30 != lVar1 + 8 + (long)local_34 * 0x10; local_30 = *(long *)(local_30 + 8)) { JS_MarkValue(param_1,*(int8 *)(local_30 + 0x10),*(int8 *)(local_30 + 0x18), param_4); JS_MarkValue(param_1,*(int8 *)(local_30 + 0x20),*(int8 *)(local_30 + 0x28), param_4); JS_MarkValue(param_1,*(int8 *)(local_30 + 0x30),*(int8 *)(local_30 + 0x38), param_4); } } JS_MarkValue(param_1,*(int8 *)(lVar1 + 0x30),*(int8 *)(lVar1 + 0x38),param_4); } return; }
32,326
mi_find_writepos
eloqsql/storage/myisam/mi_dynrec.c
static int _mi_find_writepos(MI_INFO *info, ulong reclength, /* record length */ my_off_t *filepos, /* Return file pos */ ulong *length) /* length of block at filepos */ { MI_BLOCK_INFO block_info; ulong tmp; DBUG_ENTER("_mi_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { /* Deleted blocks exists; Get last used block */ *filepos=info->s->state.dellink; block_info.second_read=0; info->rec_cache.seek_not_done=1; if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) & BLOCK_DELETED)) { DBUG_PRINT("error",("Delete link crashed")); my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(-1); } info->s->state.dellink=block_info.next_filepos; info->state->del--; info->state->empty-= block_info.block_len; *length= block_info.block_len; } else { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) & (~ (ulong) (MI_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } if (tmp > MI_MAX_BLOCK_LENGTH) tmp=MI_MAX_BLOCK_LENGTH; *length= tmp; info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } DBUG_RETURN(0); }
O3
c
mi_find_writepos: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %rcx, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq (%rdi), %rax movq 0x58(%rax), %rax cmpq $-0x1, %rax je 0x79c86 cmpb $0x0, 0x33a(%r14) je 0x79d02 movq 0x8(%r14), %rax movq 0x28(%rax), %rax movq %rax, (%rdx) cmpq $0xffed, %rsi # imm = 0xFFED sbbq $-0x1, %rsi leaq 0x3(%rsi), %rax movq (%r14), %rcx movq 0x8(%r14), %rdx movq 0x160(%rcx), %rdi addq $0x6, %rsi andq $-0x4, %rsi cmpq %rdi, %rax cmovbq %rdi, %rsi movq 0x110(%rcx), %rax subq %rsi, %rax cmpq %rax, 0x28(%rdx) jbe 0x79cda callq 0xa1ab2 movl $0x87, (%rax) jmp 0x79d3d movl $0xfffffc, %eax # imm = 0xFFFFFC cmpq %rax, %rsi cmovbq %rsi, %rax movq %rax, (%rbx) movq 0x8(%r14), %rcx addq %rax, 0x28(%rcx) movq (%r14), %rax incq 0x50(%rax) orb $0x1, 0x1d1(%r14) jmp 0x79d6a movq %rax, (%rdx) leaq -0x70(%rbp), %rdi movl $0x0, 0x50(%rdi) movl $0x1, 0x300(%r14) movl 0x1c0(%r14), %esi movq (%r14), %rax movq 0x58(%rax), %rdx callq 0x781ff testb $0x4, %al jne 0x79d44 callq 0xa1ab2 movl $0x7f, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x79d6c movq -0x30(%rbp), %rax movq (%r14), %rcx movq %rax, 0x58(%rcx) movq 0x8(%r14), %rax decq 0x8(%rax) movq -0x48(%rbp), %rax movq 0x8(%r14), %rcx subq %rax, 0x10(%rcx) movq -0x48(%rbp), %rax movq %rax, (%rbx) xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x79d84 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x29250 nopl (%rax)
_mi_find_writepos: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov rbx, rcx mov r14, rdi mov rax, fs:28h mov [rbp+var_18], rax mov rax, [rdi] mov rax, [rax+58h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_79C86 cmp byte ptr [r14+33Ah], 0 jz short loc_79D02 loc_79C86: mov rax, [r14+8] mov rax, [rax+28h] mov [rdx], rax cmp rsi, 0FFEDh sbb rsi, 0FFFFFFFFFFFFFFFFh lea rax, [rsi+3] mov rcx, [r14] mov rdx, [r14+8] mov rdi, [rcx+160h] add rsi, 6 and rsi, 0FFFFFFFFFFFFFFFCh cmp rax, rdi cmovb rsi, rdi mov rax, [rcx+110h] sub rax, rsi cmp [rdx+28h], rax jbe short loc_79CDA call _my_thread_var mov dword ptr [rax], 87h jmp short loc_79D3D loc_79CDA: mov eax, 0FFFFFCh cmp rsi, rax cmovb rax, rsi mov [rbx], rax mov rcx, [r14+8] add [rcx+28h], rax mov rax, [r14] inc qword ptr [rax+50h] or byte ptr [r14+1D1h], 1 jmp short loc_79D6A loc_79D02: mov [rdx], rax lea rdi, [rbp+var_70] mov dword ptr [rdi+50h], 0 mov dword ptr [r14+300h], 1 mov esi, [r14+1C0h] mov rax, [r14] mov rdx, [rax+58h] call _mi_get_block_info test al, 4 jnz short loc_79D44 call _my_thread_var mov dword ptr [rax], 7Fh loc_79D3D: mov eax, 0FFFFFFFFh jmp short loc_79D6C loc_79D44: mov rax, [rbp+var_30] mov rcx, [r14] mov [rcx+58h], rax mov rax, [r14+8] dec qword ptr [rax+8] mov rax, [rbp+var_48] mov rcx, [r14+8] sub [rcx+10h], rax mov rax, [rbp+var_48] mov [rbx], rax loc_79D6A: xor eax, eax loc_79D6C: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_79D84 add rsp, 60h pop rbx pop r14 pop rbp retn loc_79D84: call ___stack_chk_fail
long long mi_find_writepos(_QWORD *a1, unsigned long long a2, _QWORD *a3, long long *a4) { long long v6; // rax unsigned long long v7; // rsi unsigned long long v8; // rax long long v9; // rcx long long v10; // rdx unsigned long long v11; // rdi unsigned long long v12; // rsi long long v13; // rax _BYTE v15[40]; // [rsp+0h] [rbp-70h] BYREF long long v16; // [rsp+28h] [rbp-48h] long long v17; // [rsp+40h] [rbp-30h] int v18; // [rsp+50h] [rbp-20h] unsigned long long v19; // [rsp+58h] [rbp-18h] v19 = __readfsqword(0x28u); v6 = *(_QWORD *)(*a1 + 88LL); if ( v6 == -1 || *((_BYTE *)a1 + 826) ) { *a3 = *(_QWORD *)(a1[1] + 40LL); v7 = a2 - ((a2 < 0xFFED) - 1LL); v8 = v7 + 3; v9 = *a1; v10 = a1[1]; v11 = *(_QWORD *)(*a1 + 352LL); v12 = (v7 + 6) & 0xFFFFFFFFFFFFFFFCLL; if ( v8 < v11 ) v12 = *(_QWORD *)(*a1 + 352LL); if ( *(_QWORD *)(v10 + 40) > *(_QWORD *)(v9 + 272) - v12 ) { *(_DWORD *)my_thread_var(v11) = 135; return 0xFFFFFFFFLL; } v13 = 16777212LL; if ( v12 < 0xFFFFFC ) v13 = v12; *a4 = v13; *(_QWORD *)(a1[1] + 40LL) += v13; ++*(_QWORD *)(*a1 + 80LL); *((_BYTE *)a1 + 465) |= 1u; } else { *a3 = v6; v18 = 0; *((_DWORD *)a1 + 192) = 1; if ( (mi_get_block_info((long long)v15, *((unsigned int *)a1 + 112), *(_QWORD *)(*a1 + 88LL)) & 4) == 0 ) { *(_DWORD *)my_thread_var(v15) = 127; return 0xFFFFFFFFLL; } *(_QWORD *)(*a1 + 88LL) = v17; --*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) -= v16; *a4 = v16; } return 0LL; }
_mi_find_writepos: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV RBX,RCX MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x58] CMP RAX,-0x1 JZ 0x00179c86 CMP byte ptr [R14 + 0x33a],0x0 JZ 0x00179d02 LAB_00179c86: MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RDX],RAX CMP RSI,0xffed SBB RSI,-0x1 LEA RAX,[RSI + 0x3] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RCX + 0x160] ADD RSI,0x6 AND RSI,-0x4 CMP RAX,RDI CMOVC RSI,RDI MOV RAX,qword ptr [RCX + 0x110] SUB RAX,RSI CMP qword ptr [RDX + 0x28],RAX JBE 0x00179cda CALL 0x001a1ab2 MOV dword ptr [RAX],0x87 JMP 0x00179d3d LAB_00179cda: MOV EAX,0xfffffc CMP RSI,RAX CMOVC RAX,RSI MOV qword ptr [RBX],RAX MOV RCX,qword ptr [R14 + 0x8] ADD qword ptr [RCX + 0x28],RAX MOV RAX,qword ptr [R14] INC qword ptr [RAX + 0x50] OR byte ptr [R14 + 0x1d1],0x1 JMP 0x00179d6a LAB_00179d02: MOV qword ptr [RDX],RAX LEA RDI,[RBP + -0x70] MOV dword ptr [RDI + 0x50],0x0 MOV dword ptr [R14 + 0x300],0x1 MOV ESI,dword ptr [R14 + 0x1c0] MOV RAX,qword ptr [R14] MOV RDX,qword ptr [RAX + 0x58] CALL 0x001781ff TEST AL,0x4 JNZ 0x00179d44 CALL 0x001a1ab2 MOV dword ptr [RAX],0x7f LAB_00179d3d: MOV EAX,0xffffffff JMP 0x00179d6c LAB_00179d44: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [R14] MOV qword ptr [RCX + 0x58],RAX MOV RAX,qword ptr [R14 + 0x8] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [R14 + 0x8] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBX],RAX LAB_00179d6a: XOR EAX,EAX LAB_00179d6c: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x00179d84 ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_00179d84: CALL 0x00129250
int8 _mi_find_writepos(long *param_1,ulong param_2,long *param_3,ulong *param_4) { int4 *puVar1; ulong uVar2; int8 uVar3; long lVar4; ulong uVar5; long in_FS_OFFSET; int1 local_78 [40]; ulong local_50; int8 local_38; int4 local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) { *param_3 = *(long *)(param_1[1] + 0x28); lVar4 = (param_2 + 1) - (ulong)(param_2 < 0xffed); uVar2 = *(ulong *)(*param_1 + 0x160); uVar5 = lVar4 + 6U & 0xfffffffffffffffc; if (lVar4 + 3U < uVar2) { uVar5 = uVar2; } if (*(ulong *)(param_1[1] + 0x28) <= *(long *)(*param_1 + 0x110) - uVar5) { uVar2 = 0xfffffc; if (uVar5 < 0xfffffc) { uVar2 = uVar5; } *param_4 = uVar2; *(long *)(param_1[1] + 0x28) = *(long *)(param_1[1] + 0x28) + uVar2; *(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1; *(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) | 1; LAB_00179d6a: uVar3 = 0; goto LAB_00179d6c; } puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0x87; } else { *param_3 = *(long *)(*param_1 + 0x58); local_28 = 0; *(int4 *)(param_1 + 0x60) = 1; uVar2 = _mi_get_block_info(local_78,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58)); if ((uVar2 & 4) != 0) { *(int8 *)(*param_1 + 0x58) = local_38; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_50; *param_4 = local_50; goto LAB_00179d6a; } puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0x7f; } uVar3 = 0xffffffff; LAB_00179d6c: if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
32,327
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r12d movq %rsi, %r14 movq %rdi, %rbx imulq $0x18, %rdx, %r13 leaq (%rsi,%r13), %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r15, %rsi callq 0x94254 testb %r12b, %r12b jne 0x78c9e cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x78d22 andb %cl, %al testb %al, %al je 0x78cee movb $0x1, (%rbx) callq 0x65242 movq %rax, 0x8(%rbx) leaq 0x8(%rsp), %r15 testq %r13, %r13 je 0x78d08 movq %r15, %rdi movq %r14, %rsi callq 0x9434c movq 0x8(%rbx), %rdi movq 0x10(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x6ad64 movq %r15, %rdi callq 0x64c70 addq $0x18, %r14 addq $-0x18, %r13 jmp 0x78cb3 movb $0x2, (%rbx) leaq 0x8(%rsp), %rdi movq %r14, (%rdi) movq %rsp, %rsi movq %r15, (%rsi) callq 0x9436e movq %rax, 0x8(%rbx) pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x6514a addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x265e0 movq %rax, %r14 leaq 0x595b8(%rip), %rsi # 0xd22ec leaq 0x8(%rsp), %rdi movq %rsp, %rdx callq 0x2ac52 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x94266 xorl %ebp, %ebp leaq 0xa6447(%rip), %rsi # 0x11f1a8 leaq -0x11820(%rip), %rdx # 0x67548 movq %r14, %rdi callq 0x275b0 jmp 0x78d76 jmp 0x78d76 jmp 0x78d76 movq %rax, %r15 jmp 0x78da9 movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x64c70 jmp 0x78da9 movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x27998 testb %bpl, %bpl jne 0x78da1 jmp 0x78da9 movq %rax, %r15 movq %r14, %rdi callq 0x268f0 movq %rbx, %rdi callq 0x69aaa movq %r15, %rdi callq 0x27660 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; char push r14; int push r13; int push r12; int push rbx; char sub rsp, 28h mov ebp, r8d mov r12d, ecx mov r14, rsi mov rbx, rdi imul r13, rdx, 18h lea r15, [rsi+r13] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r15 call _ZSt6all_ofIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EbT_SP_T0_; std::all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> 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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> 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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}) test r12b, r12b jnz short loc_78C9E cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_78D22 and al, cl loc_78C9E: test al, al jz short loc_78CEE mov byte ptr [rbx], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>() mov [rbx+8], rax lea r15, [rsp+58h+var_50] loc_78CB3: test r13, r13 jz short loc_78D08 mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_48] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(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>&&) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r14, 18h add r13, 0FFFFFFFFFFFFFFE8h jmp short loc_78CB3 loc_78CEE: mov byte ptr [rbx], 2 lea rdi, [rsp+58h+var_50] mov [rdi], r14 mov rsi, rsp mov [rsi], r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_78D08: push 1 pop rsi mov rdi, rbx 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) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_78D22: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdi, [rsp+58h+var_50] mov rdx, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_78D76 jmp short loc_78D76 jmp short $+2 loc_78D76: mov r15, rax jmp short loc_78DA9 mov r15, rax lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_78DA9 mov r15, rax lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_78DA1 jmp short loc_78DA9 mov r15, rax loc_78DA1: mov rdi, r14; void * call ___cxa_free_exception loc_78DA9: 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, r15 call __Unwind_Resume
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R12D,ECX MOV R14,RSI MOV RBX,RDI IMUL R13,RDX,0x18 LEA R15,[RSI + R13*0x1] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00178c76: MOV RDI,RSI MOV RSI,R15 CALL 0x00194254 TEST R12B,R12B JNZ 0x00178c9e CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x00178d22 AND AL,CL LAB_00178c9e: TEST AL,AL JZ 0x00178cee MOV byte ptr [RBX],0x1 LAB_00178ca5: CALL 0x00165242 MOV qword ptr [RBX + 0x8],RAX LEA R15,[RSP + 0x8] LAB_00178cb3: TEST R13,R13 JZ 0x00178d08 LAB_00178cb8: MOV RDI,R15 MOV RSI,R14 CALL 0x0019434c MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_00178cd7: CALL 0x0016ad64 MOV RDI,R15 CALL 0x00164c70 ADD R14,0x18 ADD R13,-0x18 JMP 0x00178cb3 LAB_00178cee: MOV byte ptr [RBX],0x2 LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R14 MOV RSI,RSP MOV qword ptr [RSI],R15 LAB_00178cff: CALL 0x0019436e LAB_00178d04: MOV qword ptr [RBX + 0x8],RAX LAB_00178d08: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x0016514a ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00178d22: PUSH 0x20 POP RDI CALL 0x001265e0 MOV R14,RAX LAB_00178d2d: LEA RSI,[0x1d22ec] LEA RDI,[RSP + 0x8] MOV RDX,RSP CALL 0x0012ac52 MOV BPL,0x1 LAB_00178d44: LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x00194266 XOR EBP,EBP LEA RSI,[0x21f1a8] LEA RDX,[0x167548] MOV RDI,R14 CALL 0x001275b0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { bool bVar1; ordered_map *poVar2; vector *pvVar3; int8 uVar4; json_ref *local_58; json_ref *local_50; long *local_48; param_3 = param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 00178c76 to 00178c80 has its CatchHandler @ 00178d74 */ bVar1 = std:: all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_> (param_2,param_2 + param_3); if (param_4 == '\0') { if (param_5 == '\x01' && !bVar1) { uVar4 = __cxa_allocate_exception(0x20); /* try { // try from 00178d2d to 00178d40 has its CatchHandler @ 00178d9e */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_50,"cannot create object from initializer list", (allocator *)&local_58); /* try { // try from 00178d44 to 00178d6f has its CatchHandler @ 00178d8a */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar4,0x12d,&local_50,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); } bVar1 = bVar1 && param_5 != '\x02'; } if (bVar1 == false) { *(int1 *)param_1 = 2; local_58 = param_2 + param_3; local_50 = param_2; /* try { // try from 00178cff to 00178d03 has its CatchHandler @ 00178d70 */ pvVar3 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_50,&local_58); param_1[1] = pvVar3; } else { *(int1 *)param_1 = 1; /* try { // try from 00178ca5 to 00178ca9 has its CatchHandler @ 00178d72 */ poVar2 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> (); param_1[1] = poVar2; for (; param_3 != 0; param_3 = param_3 + -0x18) { /* try { // try from 00178cb8 to 00178cc2 has its CatchHandler @ 00178d76 */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 00178cd7 to 00178cdb has its CatchHandler @ 00178d7b */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_48 + 8),(basic_json *)(*local_48 + 0x10)); ~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_50); } } assert_invariant(SUB81(param_1,0)); return; }
32,328
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0xc4dca cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0xa28a5 cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0xa2950 andb %al, %cl testb %cl, %cl je 0xa291a movb $0x1, (%rbx) movl $0x20, %edi callq 0x1dc20 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0xa2934 shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0xc4d24 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x8fb6c movq %r15, %rdi xorl %esi, %esi callq 0x89206 movq %r15, %rdi callq 0x8e4c0 addq $0x18, %r14 addq $-0x18, %r12 jne 0xa28d8 jmp 0xa2934 movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0xc4d76 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x89206 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1d5b0 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x73a8e(%rip), %rsi # 0x1163fc leaq 0x73ab1(%rip), %rdx # 0x116426 movq %rsp, %rdi callq 0x262b6 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0xc4b54 xorl %ebp, %ebp leaq 0xb17fd(%rip), %rsi # 0x154198 leaq -0x171b6(%rip), %rdx # 0x8b7ec movq %r14, %rdi callq 0x1e5b0 jmp 0xa29b0 jmp 0xa29b0 jmp 0xa29b0 movq %rax, %r15 jmp 0xa29fa movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x89206 movq %r14, %rdi callq 0x8e4c0 jmp 0xa29fa movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa29e8 movq 0x10(%rsp), %rsi incq %rsi callq 0x1dc50 testb %bpl, %bpl jne 0xa29f2 jmp 0xa29fa movq %rax, %r15 movq %r14, %rdi callq 0x1d8c0 movq %rbx, %rdi callq 0x8e4c0 movq %r15, %rdi callq 0x1e660
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; int push r14; char push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_A28A5 cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_A2950 and cl, al loc_A28A5: test cl, cl jz short loc_A291A mov byte ptr [rbx], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [rbx+8], rax test r15, r15 jz short loc_A2934 shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_A28D8: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(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>&&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_A28D8 jmp short loc_A2934 loc_A291A: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_A2934: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A2950: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp 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 bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_A29B0 jmp short loc_A29B0 jmp short $+2 loc_A29B0: mov r15, rax jmp short loc_A29FA mov r15, rax mov r14, rsp 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() jmp short loc_A29FA mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_A29E8 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A29E8: test bpl, bpl jnz short loc_A29F2 jmp short loc_A29FA mov r15, rax loc_A29F2: mov rdi, r14; void * call ___cxa_free_exception loc_A29FA: 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, r15 call __Unwind_Resume
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_001a2871: MOV RDI,RSI MOV RSI,R12 CALL 0x001c4dca CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x001a28a5 CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x001a2950 AND CL,AL LAB_001a28a5: TEST CL,CL JZ 0x001a291a MOV byte ptr [RBX],0x1 LAB_001a28ac: MOV EDI,0x20 CALL 0x0011dc20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x001a2934 SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_001a28d8: MOV RDI,R15 MOV RSI,R14 CALL 0x001c4d24 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_001a28f7: CALL 0x0018fb6c MOV RDI,R15 XOR ESI,ESI CALL 0x00189206 MOV RDI,R15 CALL 0x0018e4c0 ADD R14,0x18 ADD R12,-0x18 JNZ 0x001a28d8 JMP 0x001a2934 LAB_001a291a: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_001a292b: CALL 0x001c4d76 LAB_001a2930: MOV qword ptr [RBX + 0x8],RAX LAB_001a2934: MOV RDI,RBX MOV ESI,0x1 CALL 0x00189206 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a2950: MOV EDI,0x20 CALL 0x0011d5b0 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_001a2967: LEA RSI,[0x2163fc] LEA RDX,[0x216426] MOV RDI,RSP CALL 0x001262b6 MOV BPL,0x1 LAB_001a2980: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x001c4b54 XOR EBP,EBP LEA RSI,[0x254198] LEA RDX,[0x18b7ec] MOV RDI,R14 CALL 0x0011e5b0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 001a2871 to 001a287b has its CatchHandler @ 001a29ae */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 001a2967 to 001a297c has its CatchHandler @ 001a29ef */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 001a2980 to 001a29a9 has its CatchHandler @ 001a29cf */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 001a28ac to 001a28b5 has its CatchHandler @ 001a29ac */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 001a28d8 to 001a28e2 has its CatchHandler @ 001a29b0 */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 001a28f7 to 001a28fb has its CatchHandler @ 001a29b5 */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 001a292b to 001a292f has its CatchHandler @ 001a29aa */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
32,329
glfwInputKey
untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c
void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int mods) { if (key >= 0 && key <= GLFW_KEY_LAST) { GLFWbool repeated = GLFW_FALSE; if (action == GLFW_RELEASE && window->keys[key] == GLFW_RELEASE) return; if (action == GLFW_PRESS && window->keys[key] == GLFW_PRESS) repeated = GLFW_TRUE; if (action == GLFW_RELEASE && window->stickyKeys) window->keys[key] = _GLFW_STICK; else window->keys[key] = (char) action; if (repeated) action = GLFW_REPEAT; } if (!window->lockKeyMods) mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK); if (window->callbacks.key) window->callbacks.key((GLFWwindow*) window, key, scancode, action, mods); }
O0
c
glfwInputKey: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl %r8d, -0x18(%rbp) cmpl $0x0, -0xc(%rbp) jl 0x22aae cmpl $0x15c, -0xc(%rbp) # imm = 0x15C jg 0x22aae movl $0x0, -0x1c(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x22a47 movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movsbl 0x80(%rax,%rcx), %eax cmpl $0x0, %eax jne 0x22a47 jmp 0x22aed cmpl $0x1, -0x14(%rbp) jne 0x22a69 movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movsbl 0x80(%rax,%rcx), %eax cmpl $0x1, %eax jne 0x22a69 movl $0x1, -0x1c(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x22a8b movq -0x8(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x22a8b movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movb $0x3, 0x80(%rax,%rcx) jmp 0x22a9f movl -0x14(%rbp), %eax movb %al, %dl movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movb %dl, 0x80(%rax,%rcx) cmpl $0x0, -0x1c(%rbp) je 0x22aac movl $0x2, -0x14(%rbp) jmp 0x22aae movq -0x8(%rbp), %rax cmpl $0x0, 0x70(%rax) jne 0x22ac1 movl -0x18(%rbp), %eax andl $-0x31, %eax movl %eax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x320(%rax) je 0x22aed movq -0x8(%rbp), %rax movq 0x320(%rax), %rax movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx movl -0x14(%rbp), %ecx movl -0x18(%rbp), %r8d callq *%rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_glfwInputKey: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov [rbp+var_18], r8d cmp [rbp+var_C], 0 jl loc_22AAE cmp [rbp+var_C], 15Ch jg loc_22AAE mov [rbp+var_1C], 0 cmp [rbp+var_14], 0 jnz short loc_22A47 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] movsx eax, byte ptr [rax+rcx+80h] cmp eax, 0 jnz short loc_22A47 jmp loc_22AED loc_22A47: cmp [rbp+var_14], 1 jnz short loc_22A69 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] movsx eax, byte ptr [rax+rcx+80h] cmp eax, 1 jnz short loc_22A69 mov [rbp+var_1C], 1 loc_22A69: cmp [rbp+var_14], 0 jnz short loc_22A8B mov rax, [rbp+var_8] cmp dword ptr [rax+68h], 0 jz short loc_22A8B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov byte ptr [rax+rcx+80h], 3 jmp short loc_22A9F loc_22A8B: mov eax, [rbp+var_14] mov dl, al mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov [rax+rcx+80h], dl loc_22A9F: cmp [rbp+var_1C], 0 jz short loc_22AAC mov [rbp+var_14], 2 loc_22AAC: jmp short $+2 loc_22AAE: mov rax, [rbp+var_8] cmp dword ptr [rax+70h], 0 jnz short loc_22AC1 mov eax, [rbp+var_18] and eax, 0FFFFFFCFh mov [rbp+var_18], eax loc_22AC1: mov rax, [rbp+var_8] cmp qword ptr [rax+320h], 0 jz short loc_22AED mov rax, [rbp+var_8] mov rax, [rax+320h] mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] mov ecx, [rbp+var_14] mov r8d, [rbp+var_18] call rax loc_22AED: add rsp, 20h pop rbp retn
long long glfwInputKey(long long a1, signed int a2, unsigned int a3, unsigned int a4, unsigned int a5) { long long result; // rax int v6; // [rsp+4h] [rbp-1Ch] unsigned int v7; // [rsp+8h] [rbp-18h] unsigned int v8; // [rsp+Ch] [rbp-14h] v8 = a4; v7 = a5; if ( (unsigned int)a2 <= 0x15C ) { v6 = 0; if ( !a4 ) { result = (unsigned int)*(char *)(a1 + a2 + 128); if ( !*(_BYTE *)(a1 + a2 + 128) ) return result; } if ( a4 == 1 && *(_BYTE *)(a1 + a2 + 128) == 1 ) v6 = 1; if ( a4 || !*(_DWORD *)(a1 + 104) ) *(_BYTE *)(a1 + a2 + 128) = a4; else *(_BYTE *)(a1 + a2 + 128) = 3; if ( v6 ) v8 = 2; } if ( !*(_DWORD *)(a1 + 112) ) v7 = a5 & 0xFFFFFFCF; result = a1; if ( *(_QWORD *)(a1 + 800) ) return (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD))(a1 + 800))( a1, (unsigned int)a2, a3, v8, v7); return result; }
_glfwInputKey: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV dword ptr [RBP + -0x18],R8D CMP dword ptr [RBP + -0xc],0x0 JL 0x00122aae CMP dword ptr [RBP + -0xc],0x15c JG 0x00122aae MOV dword ptr [RBP + -0x1c],0x0 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00122a47 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x80] CMP EAX,0x0 JNZ 0x00122a47 JMP 0x00122aed LAB_00122a47: CMP dword ptr [RBP + -0x14],0x1 JNZ 0x00122a69 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x80] CMP EAX,0x1 JNZ 0x00122a69 MOV dword ptr [RBP + -0x1c],0x1 LAB_00122a69: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00122a8b MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x68],0x0 JZ 0x00122a8b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV byte ptr [RAX + RCX*0x1 + 0x80],0x3 JMP 0x00122a9f LAB_00122a8b: MOV EAX,dword ptr [RBP + -0x14] MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV byte ptr [RAX + RCX*0x1 + 0x80],DL LAB_00122a9f: CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00122aac MOV dword ptr [RBP + -0x14],0x2 LAB_00122aac: JMP 0x00122aae LAB_00122aae: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x70],0x0 JNZ 0x00122ac1 MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xffffffcf MOV dword ptr [RBP + -0x18],EAX LAB_00122ac1: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x320],0x0 JZ 0x00122aed MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x320] MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] MOV R8D,dword ptr [RBP + -0x18] CALL RAX LAB_00122aed: ADD RSP,0x20 POP RBP RET
void _glfwInputKey(long param_1,int param_2,int4 param_3,int param_4,uint param_5) { bool bVar1; uint local_20; int local_1c; local_1c = param_4; if ((-1 < param_2) && (param_2 < 0x15d)) { bVar1 = false; if ((param_4 == 0) && (*(char *)(param_1 + 0x80 + (long)param_2) == '\0')) { return; } if ((param_4 == 1) && (*(char *)(param_1 + 0x80 + (long)param_2) == '\x01')) { bVar1 = true; } if ((param_4 == 0) && (*(int *)(param_1 + 0x68) != 0)) { *(int1 *)(param_1 + 0x80 + (long)param_2) = 3; } else { *(char *)(param_1 + 0x80 + (long)param_2) = (char)param_4; } if (bVar1) { local_1c = 2; } } local_20 = param_5; if (*(int *)(param_1 + 0x70) == 0) { local_20 = param_5 & 0xffffffcf; } if (*(long *)(param_1 + 800) != 0) { (**(code **)(param_1 + 800))(param_1,param_2,param_3,local_1c,local_20); } return; }
32,330
my_xml_parse
eloqsql/strings/xml.c
int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len) { my_xml_attr_rewind(p); p->beg=str; p->cur=str; p->end=str+len; while ( p->cur < p->end ) { MY_XML_ATTR a; if (p->cur[0] == '<') { int lex; int question=0; int exclam=0; lex=my_xml_scan(p,&a); if (MY_XML_COMMENT == lex) continue; if (lex == MY_XML_CDATA) { a.beg+= 9; a.end-= 3; my_xml_value(p, a.beg, (size_t) (a.end-a.beg)); continue; } lex=my_xml_scan(p,&a); if (MY_XML_SLASH == lex) { if (MY_XML_IDENT != (lex=my_xml_scan(p,&a))) { sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; lex=my_xml_scan(p,&a); goto gt; } if (MY_XML_EXCLAM == lex) { lex=my_xml_scan(p,&a); exclam=1; } else if (MY_XML_QUESTION == lex) { lex=my_xml_scan(p,&a); question=1; } if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_TAG; if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or '/' wanted)", lex2str(lex)); return MY_XML_ERROR; } while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) || ((MY_XML_STRING == lex && exclam))) { MY_XML_ATTR b; if (MY_XML_EQ == (lex=my_xml_scan(p,&b))) { lex=my_xml_scan(p,&b); if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) ) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or string wanted)", lex2str(lex)); return MY_XML_ERROR; } } else if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else if ((MY_XML_STRING == lex) && exclam) { /* We are in <!DOCTYPE>, e.g. <!DOCTYPE name SYSTEM "SystemLiteral"> <!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral"> Just skip "SystemLiteral" and "PublicidLiteral" */ } else break; } if (lex == MY_XML_SLASH) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } gt: if (question) { if (lex != MY_XML_QUESTION) { sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } if (exclam) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; } if (lex != MY_XML_GT) { sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex)); return MY_XML_ERROR; } } else { a.beg=p->cur; for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++); a.end=p->cur; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(&a); if (a.beg != a.end) { my_xml_value(p,a.beg,(size_t) (a.end-a.beg)); } } } if (p->attr.start[0]) { sprintf(p->errstr,"unexpected END-OF-INPUT"); return MY_XML_ERROR; } return MY_XML_OK; }
O3
c
my_xml_parse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x118(%rdi), %rcx movq %rcx, 0x120(%rdi) movq %rsi, 0x128(%rdi) movq %rsi, 0x130(%rdi) leaq (%rsi,%rdx), %rax movq %rax, 0x138(%rdi) testq %rdx, %rdx jle 0x615c9 leaq -0x40(%rbp), %r15 cmpb $0x3c, (%rsi) jne 0x6130b movq %rbx, %rdi movq %r15, %rsi callq 0x61693 cmpl $0x43, %eax je 0x615ab cmpl $0x44, %eax jne 0x61370 movq 0x150(%rbx), %rax testq %rax, %rax je 0x615ab movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx addq $0x9, %rsi subq %rsi, %rdx addq $-0x3, %rdx jmp 0x61366 movq %rsi, -0x40(%rbp) movq %rsi, %rdx cmpq %rax, %rsi jae 0x61331 subq %rsi, %rax movq %rsi, %rdx cmpb $0x3c, (%rdx) je 0x61331 incq %rdx movq %rdx, 0x130(%rbx) decq %rax jne 0x6131d movq %rdx, -0x38(%rbp) testb $0x2, (%rbx) jne 0x6134a movq %r15, %rdi callq 0x61ccb movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx cmpq %rdx, %rsi je 0x615ab movq 0x150(%rbx), %rax testq %rax, %rax je 0x615ab subq %rsi, %rdx movq %rbx, %rdi callq *%rax jmp 0x615ab movq %rbx, %rdi movq %r15, %rsi callq 0x61693 cmpl $0x2f, %eax jne 0x613c2 movq %rbx, %rdi movq %r15, %rsi callq 0x61693 cmpl $0x49, %eax jne 0x61629 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0x61991 testl %eax, %eax jne 0x6167b movq %rbx, %rdi movq %r15, %rsi callq 0x61693 movl %eax, %r13d jmp 0x615a5 movl %eax, %r14d cmpl $0x21, %eax sete %r12b cmpl $0x3f, %eax je 0x613d7 cmpl $0x21, %r14d jne 0x613e4 movq %rbx, %rdi movq %r15, %rsi callq 0x61693 jmp 0x613ea movb $0x1, %r12b movl %r14d, %eax cmpl $0x49, %eax jne 0x61615 movl $0x0, 0x4(%rbx) movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0x61b54 testl %eax, %eax jne 0x6167b movb %r12b, -0x29(%rbp) movl %r14d, %r12d xorl $0x21, %r12d movq %rbx, %rdi movq %r15, %rsi callq 0x61693 movl %eax, %r13d xorl $0x53, %eax orl %r12d, %eax sete %al cmpl $0x49, %r13d je 0x61445 testb %al, %al je 0x6152e movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0x61693 cmpl $0x49, %eax je 0x614d3 movl %eax, %r13d cmpl $0x3d, %eax jne 0x61512 movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0x61693 cmpl $0x53, %eax je 0x6147c cmpl $0x49, %eax jne 0x6163d movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r13 movq -0x38(%rbp), %r15 subq %r13, %r15 movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x61b54 testl %eax, %eax jne 0x6167b movq 0x150(%rbx), %rax testq %rax, %rax je 0x614c8 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq *%rax testl %eax, %eax jne 0x6167b movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx jmp 0x61504 movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r15 movq -0x38(%rbp), %r13 subq %r15, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x61b54 testl %eax, %eax jne 0x6167b movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x61991 testl %eax, %eax je 0x6151e jmp 0x6167b cmpl $0x21, %r14d jne 0x6152a cmpl $0x53, %r13d jne 0x6152a movq %rbx, %rdi leaq -0x40(%rbp), %r15 jmp 0x61423 leaq -0x40(%rbp), %r15 cmpl $0x2f, %r13d movb -0x29(%rbp), %r12b jne 0x6155a movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x61991 testl %eax, %eax jne 0x6167b movq %rbx, %rdi movq %r15, %rsi callq 0x61693 movl %eax, %r13d testb %r12b, %r12b jne 0x6158b cmpl $0x3f, %r13d jne 0x61651 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x61991 testl %eax, %eax jne 0x6167b movq %rbx, %rdi movq %r15, %rsi callq 0x61693 movl %eax, %r13d cmpl $0x21, %r14d jne 0x615a5 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x61991 testl %eax, %eax jne 0x6167b cmpl $0x3e, %r13d jne 0x61600 movq 0x130(%rbx), %rsi movq 0x138(%rbx), %rax cmpq %rax, %rsi jb 0x612c4 movq 0x118(%rbx), %rcx cmpb $0x0, (%rcx) je 0x615f8 addq $0x8, %rbx leaq 0x67a3(%rip), %rcx # 0x67d7c movl $0x1, %r14d movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x241e0 jmp 0x61681 xorl %r14d, %r14d jmp 0x61681 addq $0x8, %rbx movl %r13d, %edi callq 0x618f6 leaq 0x674e(%rip), %rcx # 0x67d61 jmp 0x61664 addq $0x8, %rbx movl %eax, %edi callq 0x618f6 leaq 0x66d4(%rip), %rcx # 0x67cfb jmp 0x61664 addq $0x8, %rbx movl %eax, %edi callq 0x618f6 leaq 0x66a3(%rip), %rcx # 0x67cde jmp 0x61664 addq $0x8, %rbx movl %eax, %edi callq 0x618f6 leaq 0x66d0(%rip), %rcx # 0x67d1f jmp 0x61664 addq $0x8, %rbx movl %r13d, %edi callq 0x618f6 leaq 0x66e2(%rip), %rcx # 0x67d46 movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi movq %rax, %r8 xorl %eax, %eax callq 0x241e0 movl $0x1, %r14d movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_xml_parse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rcx, [rdi+118h] mov [rdi+120h], rcx mov [rdi+128h], rsi mov [rdi+130h], rsi lea rax, [rsi+rdx] mov [rdi+138h], rax test rdx, rdx jle loc_615C9 lea r15, [rbp+var_40] loc_612C4: cmp byte ptr [rsi], 3Ch ; '<' jnz short loc_6130B mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 43h ; 'C' jz loc_615AB cmp eax, 44h ; 'D' jnz loc_61370 mov rax, [rbx+150h] test rax, rax jz loc_615AB mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] add rsi, 9 sub rdx, rsi add rdx, 0FFFFFFFFFFFFFFFDh jmp short loc_61366 loc_6130B: mov [rbp+var_40], rsi mov rdx, rsi cmp rsi, rax jnb short loc_61331 sub rax, rsi mov rdx, rsi loc_6131D: cmp byte ptr [rdx], 3Ch ; '<' jz short loc_61331 inc rdx mov [rbx+130h], rdx dec rax jnz short loc_6131D loc_61331: mov [rbp+var_38], rdx test byte ptr [rbx], 2 jnz short loc_6134A mov rdi, r15 call my_xml_norm_text mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] loc_6134A: cmp rsi, rdx jz loc_615AB mov rax, [rbx+150h] test rax, rax jz loc_615AB sub rdx, rsi loc_61366: mov rdi, rbx call rax jmp loc_615AB loc_61370: mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 2Fh ; '/' jnz short loc_613C2 mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 49h ; 'I' jnz loc_61629 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_leave test eax, eax jnz loc_6167B mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax jmp loc_615A5 loc_613C2: mov r14d, eax cmp eax, 21h ; '!' setz r12b cmp eax, 3Fh ; '?' jz short loc_613D7 cmp r14d, 21h ; '!' jnz short loc_613E4 loc_613D7: mov rdi, rbx mov rsi, r15 call my_xml_scan jmp short loc_613EA loc_613E4: mov r12b, 1 mov eax, r14d loc_613EA: cmp eax, 49h ; 'I' jnz loc_61615 mov dword ptr [rbx+4], 0 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_enter test eax, eax jnz loc_6167B mov [rbp+var_29], r12b mov r12d, r14d xor r12d, 21h mov rdi, rbx loc_61423: mov rsi, r15 call my_xml_scan mov r13d, eax xor eax, 53h or eax, r12d setz al cmp r13d, 49h ; 'I' jz short loc_61445 test al, al jz loc_6152E loc_61445: mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 49h ; 'I' jz short loc_614D3 mov r13d, eax cmp eax, 3Dh ; '=' jnz loc_61512 mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 53h ; 'S' jz short loc_6147C cmp eax, 49h ; 'I' jnz loc_6163D loc_6147C: mov dword ptr [rbx+4], 1 mov r13, [rbp+var_40] mov r15, [rbp+var_38] sub r15, r13 mov rdi, rbx mov rsi, r13 mov rdx, r15 call my_xml_enter test eax, eax jnz loc_6167B mov rax, [rbx+150h] test rax, rax jz short loc_614C8 mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] sub rdx, rsi mov rdi, rbx call rax test eax, eax jnz loc_6167B loc_614C8: mov rdi, rbx mov rsi, r13 mov rdx, r15 jmp short loc_61504 loc_614D3: mov dword ptr [rbx+4], 1 mov r15, [rbp+var_40] mov r13, [rbp+var_38] sub r13, r15 mov rdi, rbx mov rsi, r15 mov rdx, r13 call my_xml_enter test eax, eax jnz loc_6167B mov rdi, rbx mov rsi, r15 mov rdx, r13 loc_61504: call my_xml_leave test eax, eax jz short loc_6151E jmp loc_6167B loc_61512: cmp r14d, 21h ; '!' jnz short loc_6152A cmp r13d, 53h ; 'S' jnz short loc_6152A loc_6151E: mov rdi, rbx lea r15, [rbp+var_40] jmp loc_61423 loc_6152A: lea r15, [rbp+var_40] loc_6152E: cmp r13d, 2Fh ; '/' mov r12b, [rbp+var_29] jnz short loc_6155A mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_6167B mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_6155A: test r12b, r12b jnz short loc_6158B cmp r13d, 3Fh ; '?' jnz loc_61651 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_6167B mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_6158B: cmp r14d, 21h ; '!' jnz short loc_615A5 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_6167B loc_615A5: cmp r13d, 3Eh ; '>' jnz short loc_61600 loc_615AB: mov rsi, [rbx+130h] mov rax, [rbx+138h] cmp rsi, rax jb loc_612C4 mov rcx, [rbx+118h] loc_615C9: cmp byte ptr [rcx], 0 jz short loc_615F8 add rbx, 8 lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT" mov r14d, 1 mov edx, 80h mov rdi, rbx mov esi, 1 xor eax, eax call ___sprintf_chk jmp loc_61681 loc_615F8: xor r14d, r14d jmp loc_61681 loc_61600: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)" jmp short loc_61664 loc_61615: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)" jmp short loc_61664 loc_61629: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)" jmp short loc_61664 loc_6163D: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)" jmp short loc_61664 loc_61651: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)" loc_61664: mov edx, 80h mov rdi, rbx mov esi, 1 mov r8, rax xor eax, eax call ___sprintf_chk loc_6167B: mov r14d, 1 loc_61681: mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_xml_parse(long long a1, _BYTE *a2, long long a3) { _BYTE *v4; // rcx _BYTE *v5; // rax int v6; // eax void ( *v7)(long long, _BYTE *, long long); // rax long long v8; // rdx _BYTE *v9; // rdx long long v10; // rax unsigned int v11; // eax unsigned int v12; // eax unsigned int v13; // r13d unsigned int v14; // r14d bool v15; // r12 long long i; // rdi unsigned int v17; // eax unsigned int v18; // eax _BYTE *v19; // r13 long long v20; // r15 unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax long long v22; // rdi _BYTE *v23; // rsi long long v24; // rdx _BYTE *v25; // r15 long long v26; // r13 bool v27; // r12 unsigned int v28; // r14d long long v29; // rax long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax _QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF _BYTE *v36; // [rsp+10h] [rbp-40h] BYREF _BYTE *v37; // [rsp+18h] [rbp-38h] bool v38; // [rsp+27h] [rbp-29h] v4 = *(_BYTE **)(a1 + 280); *(_QWORD *)(a1 + 288) = v4; *(_QWORD *)(a1 + 296) = a2; *(_QWORD *)(a1 + 304) = a2; v5 = &a2[a3]; *(_QWORD *)(a1 + 312) = &a2[a3]; if ( a3 <= 0 ) goto LABEL_57; while ( *a2 != 60 ) { v36 = a2; v9 = a2; if ( a2 < v5 ) { v10 = v5 - a2; v9 = a2; do { if ( *v9 == 60 ) break; *(_QWORD *)(a1 + 304) = ++v9; --v10; } while ( v10 ); } v37 = v9; if ( (*(_BYTE *)a1 & 2) == 0 ) { my_xml_norm_text(&v36); a2 = v36; v9 = v37; } if ( a2 != v9 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( v7 ) { v8 = v9 - a2; LABEL_16: v7(a1, a2, v8); } } LABEL_55: a2 = *(_BYTE **)(a1 + 304); v5 = *(_BYTE **)(a1 + 312); if ( a2 >= v5 ) { v4 = *(_BYTE **)(a1 + 280); LABEL_57: if ( *v4 ) { v28 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT"); } else { return 0; } return v28; } } v6 = my_xml_scan(a1, &v36); if ( v6 == 67 ) goto LABEL_55; if ( v6 == 68 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( !v7 ) goto LABEL_55; a2 = v36 + 9; v8 = v37 - (v36 + 9) - 3; goto LABEL_16; } v11 = my_xml_scan(a1, &v36); if ( v11 == 47 ) { v12 = my_xml_scan(a1, &v36); if ( v12 == 73 ) { if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) ) { v13 = my_xml_scan(a1, &v36); goto LABEL_54; } } else { v31 = lex2str(v12); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31); } return 1; } v14 = v11; v15 = v11 == 33; if ( v11 == 63 || v11 == 33 ) v11 = my_xml_scan(a1, &v36); else v15 = 1; if ( v11 != 73 ) { v30 = lex2str(v11); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30); return 1; } *(_DWORD *)(a1 + 4) = 0; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v38 = v15; for ( i = a1; ; i = a1 ) { v13 = my_xml_scan(i, &v36); if ( v13 != 73 ) { if ( v14 ^ 0x21 | v13 ^ 0x53 ) break; } v17 = my_xml_scan(a1, v35); if ( v17 == 73 ) { *(_DWORD *)(a1 + 4) = 1; v25 = v36; v26 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v22 = a1; v23 = v25; v24 = v26; LABEL_40: if ( (unsigned int)my_xml_leave(v22, v23, v24) ) return 1; continue; } v13 = v17; if ( v17 == 61 ) { v18 = my_xml_scan(a1, v35); if ( v18 != 83 && v18 != 73 ) { v32 = lex2str(v18); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32); return 1; } *(_DWORD *)(a1 + 4) = 1; v19 = v36; v20 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336); if ( v21 ) { if ( v21(a1, v35[0], v35[1] - v35[0]) ) return 1; } v22 = a1; v23 = v19; v24 = v20; goto LABEL_40; } if ( v14 != 33 || v17 != 83 ) break; } v27 = v38; if ( v13 == 47 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); } if ( v27 ) goto LABEL_52; if ( v13 == 63 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); LABEL_52: if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) ) { LABEL_54: if ( v13 == 62 ) goto LABEL_55; v29 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29); } } else { v33 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33); } return 1; }
my_xml_parse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x118] MOV qword ptr [RDI + 0x120],RCX MOV qword ptr [RDI + 0x128],RSI MOV qword ptr [RDI + 0x130],RSI LEA RAX,[RSI + RDX*0x1] MOV qword ptr [RDI + 0x138],RAX TEST RDX,RDX JLE 0x001615c9 LEA R15,[RBP + -0x40] LAB_001612c4: CMP byte ptr [RSI],0x3c JNZ 0x0016130b MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 CMP EAX,0x43 JZ 0x001615ab CMP EAX,0x44 JNZ 0x00161370 MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001615ab MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] ADD RSI,0x9 SUB RDX,RSI ADD RDX,-0x3 JMP 0x00161366 LAB_0016130b: MOV qword ptr [RBP + -0x40],RSI MOV RDX,RSI CMP RSI,RAX JNC 0x00161331 SUB RAX,RSI MOV RDX,RSI LAB_0016131d: CMP byte ptr [RDX],0x3c JZ 0x00161331 INC RDX MOV qword ptr [RBX + 0x130],RDX DEC RAX JNZ 0x0016131d LAB_00161331: MOV qword ptr [RBP + -0x38],RDX TEST byte ptr [RBX],0x2 JNZ 0x0016134a MOV RDI,R15 CALL 0x00161ccb MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] LAB_0016134a: CMP RSI,RDX JZ 0x001615ab MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001615ab SUB RDX,RSI LAB_00161366: MOV RDI,RBX CALL RAX JMP 0x001615ab LAB_00161370: MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 CMP EAX,0x2f JNZ 0x001613c2 MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 CMP EAX,0x49 JNZ 0x00161629 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x00161991 TEST EAX,EAX JNZ 0x0016167b MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 MOV R13D,EAX JMP 0x001615a5 LAB_001613c2: MOV R14D,EAX CMP EAX,0x21 SETZ R12B CMP EAX,0x3f JZ 0x001613d7 CMP R14D,0x21 JNZ 0x001613e4 LAB_001613d7: MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 JMP 0x001613ea LAB_001613e4: MOV R12B,0x1 MOV EAX,R14D LAB_001613ea: CMP EAX,0x49 JNZ 0x00161615 MOV dword ptr [RBX + 0x4],0x0 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x00161b54 TEST EAX,EAX JNZ 0x0016167b MOV byte ptr [RBP + -0x29],R12B MOV R12D,R14D XOR R12D,0x21 MOV RDI,RBX LAB_00161423: MOV RSI,R15 CALL 0x00161693 MOV R13D,EAX XOR EAX,0x53 OR EAX,R12D SETZ AL CMP R13D,0x49 JZ 0x00161445 TEST AL,AL JZ 0x0016152e LAB_00161445: MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x00161693 CMP EAX,0x49 JZ 0x001614d3 MOV R13D,EAX CMP EAX,0x3d JNZ 0x00161512 MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x00161693 CMP EAX,0x53 JZ 0x0016147c CMP EAX,0x49 JNZ 0x0016163d LAB_0016147c: MOV dword ptr [RBX + 0x4],0x1 MOV R13,qword ptr [RBP + -0x40] MOV R15,qword ptr [RBP + -0x38] SUB R15,R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 CALL 0x00161b54 TEST EAX,EAX JNZ 0x0016167b MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001614c8 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] SUB RDX,RSI MOV RDI,RBX CALL RAX TEST EAX,EAX JNZ 0x0016167b LAB_001614c8: MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 JMP 0x00161504 LAB_001614d3: MOV dword ptr [RBX + 0x4],0x1 MOV R15,qword ptr [RBP + -0x40] MOV R13,qword ptr [RBP + -0x38] SUB R13,R15 MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x00161b54 TEST EAX,EAX JNZ 0x0016167b MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 LAB_00161504: CALL 0x00161991 TEST EAX,EAX JZ 0x0016151e JMP 0x0016167b LAB_00161512: CMP R14D,0x21 JNZ 0x0016152a CMP R13D,0x53 JNZ 0x0016152a LAB_0016151e: MOV RDI,RBX LEA R15,[RBP + -0x40] JMP 0x00161423 LAB_0016152a: LEA R15,[RBP + -0x40] LAB_0016152e: CMP R13D,0x2f MOV R12B,byte ptr [RBP + -0x29] JNZ 0x0016155a MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x00161991 TEST EAX,EAX JNZ 0x0016167b MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 MOV R13D,EAX LAB_0016155a: TEST R12B,R12B JNZ 0x0016158b CMP R13D,0x3f JNZ 0x00161651 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x00161991 TEST EAX,EAX JNZ 0x0016167b MOV RDI,RBX MOV RSI,R15 CALL 0x00161693 MOV R13D,EAX LAB_0016158b: CMP R14D,0x21 JNZ 0x001615a5 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x00161991 TEST EAX,EAX JNZ 0x0016167b LAB_001615a5: CMP R13D,0x3e JNZ 0x00161600 LAB_001615ab: MOV RSI,qword ptr [RBX + 0x130] MOV RAX,qword ptr [RBX + 0x138] CMP RSI,RAX JC 0x001612c4 MOV RCX,qword ptr [RBX + 0x118] LAB_001615c9: CMP byte ptr [RCX],0x0 JZ 0x001615f8 ADD RBX,0x8 LEA RCX,[0x167d7c] MOV R14D,0x1 MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x001241e0 JMP 0x00161681 LAB_001615f8: XOR R14D,R14D JMP 0x00161681 LAB_00161600: ADD RBX,0x8 MOV EDI,R13D CALL 0x001618f6 LEA RCX,[0x167d61] JMP 0x00161664 LAB_00161615: ADD RBX,0x8 MOV EDI,EAX CALL 0x001618f6 LEA RCX,[0x167cfb] JMP 0x00161664 LAB_00161629: ADD RBX,0x8 MOV EDI,EAX CALL 0x001618f6 LEA RCX,[0x167cde] JMP 0x00161664 LAB_0016163d: ADD RBX,0x8 MOV EDI,EAX CALL 0x001618f6 LEA RCX,[0x167d1f] JMP 0x00161664 LAB_00161651: ADD RBX,0x8 MOV EDI,R13D CALL 0x001618f6 LEA RCX,[0x167d46] LAB_00161664: MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 MOV R8,RAX XOR EAX,EAX CALL 0x001241e0 LAB_0016167b: MOV R14D,0x1 LAB_00161681: MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Type propagation algorithm not settling */ bool my_xml_parse(byte *param_1,char *param_2,long param_3) { char cVar1; int iVar2; int iVar3; code *pcVar4; int8 uVar5; char *pcVar6; char *pcVar7; long lVar8; bool bVar9; long local_58; long local_50; char *local_48; char *local_40; char local_31; pcVar7 = *(char **)(param_1 + 0x118); *(char **)(param_1 + 0x120) = pcVar7; *(char **)(param_1 + 0x128) = param_2; *(char **)(param_1 + 0x130) = param_2; pcVar6 = param_2 + param_3; *(char **)(param_1 + 0x138) = pcVar6; if (0 < param_3) { do { if (*param_2 == '<') { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x43) { if (iVar2 == 0x44) { pcVar4 = *(code **)(param_1 + 0x150); if (pcVar4 != (code *)0x0) { pcVar7 = local_40 + (-3 - (long)(local_48 + 9)); pcVar6 = local_48 + 9; goto LAB_00161366; } } else { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x2f) { bVar9 = iVar2 == 0x21; if ((iVar2 == 0x3f) || (iVar2 == 0x21)) { iVar3 = my_xml_scan(param_1,&local_48); } else { bVar9 = true; iVar3 = iVar2; } if (iVar3 == 0x49) { param_1[4] = 0; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48); local_31 = bVar9; do { if (iVar3 != 0) { return true; } LAB_00161423: iVar3 = my_xml_scan(param_1,&local_48); if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_0016152e; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if (iVar3 == 0x49) { param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); goto joined_r0x001614f5; } if (iVar3 != 0x3d) goto LAB_00161512; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if ((iVar3 != 0x53) && (iVar3 != 0x49)) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or string wanted)"; goto LAB_00161664; } param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); if (iVar3 != 0) { return true; } if (*(code **)(param_1 + 0x150) != (code *)0x0) { iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58); joined_r0x001614f5: if (iVar3 != 0) { return true; } } iVar3 = my_xml_leave(param_1,pcVar6,lVar8); } while( true ); } uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or \'/\' wanted)"; LAB_00161664: __sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5); return true; } iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x49) { uVar5 = lex2str(iVar2); pcVar6 = "%s unexpected (ident wanted)"; goto LAB_00161664; } iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48); if (iVar2 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); LAB_001615a5: if (iVar3 != 0x3e) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'>\' wanted)"; goto LAB_00161664; } } } } else { local_40 = param_2; if (param_2 < pcVar6) { lVar8 = (long)pcVar6 - (long)param_2; do { if (*local_40 == '<') break; local_40 = local_40 + 1; *(char **)(param_1 + 0x130) = local_40; lVar8 = lVar8 + -1; } while (lVar8 != 0); } local_48 = param_2; if ((*param_1 & 2) == 0) { my_xml_norm_text(&local_48); } if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0)) { pcVar7 = local_40 + -(long)local_48; pcVar6 = local_48; LAB_00161366: (*pcVar4)(param_1,pcVar6,pcVar7); } } param_2 = *(char **)(param_1 + 0x130); pcVar6 = *(char **)(param_1 + 0x138); } while (param_2 < pcVar6); pcVar7 = *(char **)(param_1 + 0x118); } cVar1 = *pcVar7; if (cVar1 != '\0') { __sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT"); } return cVar1 != '\0'; LAB_00161512: if ((iVar2 != 0x21) || (iVar3 != 0x53)) { LAB_0016152e: cVar1 = local_31; if (iVar3 == 0x2f) { iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if (cVar1 == '\0') { if (iVar3 != 0x3f) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'?\' wanted)"; goto LAB_00161664; } iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) { return true; } goto LAB_001615a5; } goto LAB_00161423; }
32,331
dirname_part
eloqsql/mysys/mf_dirname.c
size_t dirname_part(char *to, const char *name, size_t *to_res_length) { size_t length; DBUG_ENTER("dirname_part"); DBUG_PRINT("enter",("'%s'",name)); length=dirname_length(name); *to_res_length= (size_t) (convert_dirname(to, name, name+length) - to); DBUG_RETURN(length); }
O0
c
dirname_part: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0xd95f6 movq -0x10(%rbp), %rdi callq 0xd9560 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x20(%rbp), %rdx callq 0xd9640 movq %rax, %rcx movq -0x8(%rbp), %rax subq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
dirname_part: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_D95F6: mov rdi, [rbp+var_10] call dirname_length mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_20] call convert_dirname mov rcx, rax mov rax, [rbp+var_8] sub rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3) { long long v4; // [rsp+10h] [rbp-20h] v4 = dirname_length(a2); *a3 = convert_dirname(a1, a2, &a2[v4]) - a1; return v4; }
dirname_part: 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 JMP 0x001d95f6 LAB_001d95f6: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d9560 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x20] CALL 0x001d9640 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] SUB RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
long dirname_part(long param_1,long param_2,long *param_3) { long lVar1; long lVar2; lVar1 = dirname_length(param_2); lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1); *param_3 = lVar2 - param_1; return lVar1; }
32,332
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O2
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x5d351(%rip), %rsi # 0xd0867 leaq 0x28(%rsp), %rbx leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2ac52 leaq 0x48(%rsp), %r14 leaq 0x5d33a(%rip), %rsi # 0xd086e leaq 0xe(%rsp), %rdx movq %r14, %rdi callq 0x2ac52 leaq 0x68(%rsp), %r13 leaq 0x80(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x51bd9(%rip), %rsi # 0xc513a leaq 0xa(%rsp), %rdx callq 0x2ac52 leaq 0xa0(%rsp), %r14 leaq 0x5d277(%rip), %rsi # 0xd07f1 leaq 0xa(%rsp), %rdx movq %r14, %rdi callq 0x2ac52 leaq 0xc0(%rsp), %r13 leaq 0x5d2f4(%rip), %rsi # 0xd088a leaq 0xd(%rsp), %rdx movq %r13, %rdi callq 0x2ac52 leaq 0xf8(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x51b7c(%rip), %rsi # 0xc513a leaq 0x9(%rsp), %rdx callq 0x2ac52 leaq 0x118(%rsp), %r14 leaq 0x5d2a9(%rip), %rsi # 0xd0880 leaq 0x9(%rsp), %rdx movq %r14, %rdi callq 0x2ac52 leaq 0x138(%rsp), %r13 leaq 0x5d29d(%rip), %rsi # 0xd0890 leaq 0xc(%rsp), %rdx movq %r13, %rdi callq 0x2ac52 leaq 0x170(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x51b1f(%rip), %rsi # 0xc513a leaq 0x8(%rsp), %rdx callq 0x2ac52 leaq 0x190(%rsp), %r14 leaq 0x5d1bd(%rip), %rsi # 0xd07f1 leaq 0x8(%rsp), %rdx movq %r14, %rdi callq 0x2ac52 leaq 0x1b0(%rsp), %r13 leaq 0x5d249(%rip), %rsi # 0xd0899 leaq 0xb(%rsp), %rdx movq %r13, %rdi callq 0x2ac52 leaq 0x1e8(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x51ac2(%rip), %rsi # 0xc513a leaq 0x7(%rsp), %rdx callq 0x2ac52 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi pushq $0x4 popq %rdx leaq 0x7(%rsp), %rcx callq 0x787ee movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x78828 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x7369e movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r15, %rdi movq %r12, %rsi callq 0x72e92 leaq 0x10(%rsp), %rdi callq 0x787aa movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x787aa jmp 0x73778 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x78828 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x73702 jmp 0x73778 movq %rax, %r15 leaq 0x1d0(%rsp), %rdi jmp 0x73748 jmp 0x73757 jmp 0x73764 movq %rax, %r15 leaq 0x158(%rsp), %rdi jmp 0x73748 jmp 0x73757 jmp 0x73764 movq %rax, %r15 leaq 0xe0(%rsp), %rdi callq 0x787cc movq %r13, %rdi callq 0x27998 jmp 0x7375a movq %rax, %r15 movq %r14, %rdi callq 0x27998 jmp 0x73767 movq %rax, %r15 addq $-0x78, %r14 movq %r14, %rdi callq 0x78828 cmpq %rbx, %r14 jne 0x73767 movq %r15, %rdi callq 0x27660 movq %rax, %r15 movq %r13, %rdi callq 0x787cc movq %r14, %rdi callq 0x27998 jmp 0x73798 movq %rax, %r15 leaq 0x28(%rsp), %rdi callq 0x27998 jmp 0x73778 movq %rax, %r15 jmp 0x73778
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rsi, aSystem; "system" lea rbx, [rsp+238h+var_210] lea rdx, [rsp+238h+var_229] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_1F0] lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, [rsp+238h+var_22A] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aSFailedToLoadI+2Ah; "" lea rdx, [rsp+238h+var_22E] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_198] lea rsi, aUser; "user" lea rdx, [rsp+238h+var_22E] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_178] lea rsi, aHello; "Hello" lea rdx, [rsp+238h+var_22B] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_140] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aSFailedToLoadI+2Ah; "" lea rdx, [rsp+238h+var_22F] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_120] lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, [rsp+238h+var_22F] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_100] lea rsi, aHiThere; "Hi there" lea rdx, [rsp+238h+var_22C] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_C8] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aSFailedToLoadI+2Ah; "" lea rdx, [rsp+238h+var_230] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_A8] lea rsi, aUser; "user" lea rdx, [rsp+238h+var_230] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_88] lea rsi, aHowAreYou; "How are you?" lea rdx, [rsp+238h+var_22D] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_50] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aSFailedToLoadI+2Ah; "" lea rdx, [rsp+238h+var_231] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] push 4 pop rdx lea rcx, [rsp+238h+var_231] call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov ebx, 168h loc_7369E: lea rdi, [rsp+rbx+238h+var_238] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_7369E movzx r8d, bpl lea rdx, [rsp+238h+var_228] push 1 pop rcx mov rdi, r15 mov rsi, r12 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp short loc_73778 mov r15, rax mov ebx, 168h loc_73702: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_73702 jmp short loc_73778 mov r15, rax lea rdi, [rsp+arg_1C8] jmp short loc_73748 jmp short loc_73757 jmp short loc_73764 mov r15, rax lea rdi, [rsp+arg_150] jmp short loc_73748 jmp short loc_73757 jmp short loc_73764 mov r15, rax lea rdi, [rsp+arg_D8] loc_73748: call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7375A loc_73757: mov r15, rax loc_7375A: mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_73767 loc_73764: mov r15, rax loc_73767: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_73767 loc_73778: mov rdi, r15 call __Unwind_Resume mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_73798 mov r15, rax loc_73798: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_73778 mov r15, rax jmp short loc_73778
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { long long i; // rbx char v6; // [rsp+7h] [rbp-231h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v8[4]; // [rsp+28h] [rbp-210h] BYREF _QWORD v9[4]; // [rsp+48h] [rbp-1F0h] BYREF __int128 v10; // [rsp+68h] [rbp-1D0h] long long v11; // [rsp+78h] [rbp-1C0h] _QWORD v12[4]; // [rsp+80h] [rbp-1B8h] BYREF _QWORD v13[4]; // [rsp+A0h] [rbp-198h] BYREF _QWORD v14[4]; // [rsp+C0h] [rbp-178h] BYREF __int128 v15; // [rsp+E0h] [rbp-158h] long long v16; // [rsp+F0h] [rbp-148h] _QWORD v17[4]; // [rsp+F8h] [rbp-140h] BYREF _QWORD v18[4]; // [rsp+118h] [rbp-120h] BYREF _QWORD v19[4]; // [rsp+138h] [rbp-100h] BYREF __int128 v20; // [rsp+158h] [rbp-E0h] long long v21; // [rsp+168h] [rbp-D0h] _QWORD v22[4]; // [rsp+170h] [rbp-C8h] BYREF _QWORD v23[4]; // [rsp+190h] [rbp-A8h] BYREF _QWORD v24[4]; // [rsp+1B0h] [rbp-88h] BYREF __int128 v25; // [rsp+1D0h] [rbp-68h] long long v26; // [rsp+1E0h] [rbp-58h] _QWORD v27[10]; // [rsp+1E8h] [rbp-50h] BYREF std::string::basic_string<std::allocator<char>>(v8, (long long)"system"); std::string::basic_string<std::allocator<char>>(v9, (long long)"You are a helpful assistant"); v10 = 0LL; v11 = 0LL; std::string::basic_string<std::allocator<char>>(v12, (long long)""); std::string::basic_string<std::allocator<char>>(v13, (long long)"user"); std::string::basic_string<std::allocator<char>>(v14, (long long)"Hello"); v15 = 0LL; v16 = 0LL; std::string::basic_string<std::allocator<char>>(v17, (long long)""); std::string::basic_string<std::allocator<char>>(v18, (long long)"assistant"); std::string::basic_string<std::allocator<char>>(v19, (long long)"Hi there"); v20 = 0LL; v21 = 0LL; std::string::basic_string<std::allocator<char>>(v22, (long long)""); std::string::basic_string<std::allocator<char>>(v23, (long long)"user"); std::string::basic_string<std::allocator<char>>(v24, (long long)"How are you?"); v25 = 0LL; v26 = 0LL; std::string::basic_string<std::allocator<char>>(v27, (long long)""); std::vector<common_chat_msg>::vector(v7, v8, 4LL, &v6); for ( i = 45LL; i != -15; i -= 15LL ) common_chat_msg::~common_chat_msg((common_chat_msg *)&v8[i]); common_chat_apply_template[abi:cxx11](a1, a2, v7, 1u, a3); std::vector<common_chat_msg>::~vector(v7); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LAB_0017350f: LEA RSI,[0x1d0867] LEA RBX,[RSP + 0x28] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x0012ac52 LEA R14,[RSP + 0x48] LAB_0017352d: LEA RSI,[0x1d086e] LEA RDX,[RSP + 0xe] MOV RDI,R14 CALL 0x0012ac52 LEA R13,[RSP + 0x68] LEA RDI,[RSP + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_0017355a: LEA RSI,[0x1c513a] LEA RDX,[RSP + 0xa] CALL 0x0012ac52 LEA R14,[RSP + 0xa0] LAB_00173573: LEA RSI,[0x1d07f1] LEA RDX,[RSP + 0xa] MOV RDI,R14 CALL 0x0012ac52 LEA R13,[RSP + 0xc0] LAB_0017358f: LEA RSI,[0x1d088a] LEA RDX,[RSP + 0xd] MOV RDI,R13 CALL 0x0012ac52 LEA RDI,[RSP + 0xf8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_001735b7: LEA RSI,[0x1c513a] LEA RDX,[RSP + 0x9] CALL 0x0012ac52 LEA R14,[RSP + 0x118] LAB_001735d0: LEA RSI,[0x1d0880] LEA RDX,[RSP + 0x9] MOV RDI,R14 CALL 0x0012ac52 LEA R13,[RSP + 0x138] LAB_001735ec: LEA RSI,[0x1d0890] LEA RDX,[RSP + 0xc] MOV RDI,R13 CALL 0x0012ac52 LEA RDI,[RSP + 0x170] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_00173614: LEA RSI,[0x1c513a] LEA RDX,[RSP + 0x8] CALL 0x0012ac52 LEA R14,[RSP + 0x190] LAB_0017362d: LEA RSI,[0x1d07f1] LEA RDX,[RSP + 0x8] MOV RDI,R14 CALL 0x0012ac52 LEA R13,[RSP + 0x1b0] LAB_00173649: LEA RSI,[0x1d0899] LEA RDX,[RSP + 0xb] MOV RDI,R13 CALL 0x0012ac52 LEA RDI,[RSP + 0x1e8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_00173671: LEA RSI,[0x1c513a] LEA RDX,[RSP + 0x7] CALL 0x0012ac52 LAB_00173682: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] PUSH 0x4 POP RDX LEA RCX,[RSP + 0x7] CALL 0x001787ee MOV EBX,0x168 LAB_0017369e: LEA RDI,[RSP + RBX*0x1] ADD RDI,0x28 CALL 0x00178828 ADD RBX,-0x78 CMP RBX,-0x78 JNZ 0x0017369e LAB_001736b5: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,R12 CALL 0x00172e92 LAB_001736cc: LEA RDI,[RSP + 0x10] CALL 0x001787aa MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long lVar1; int7 in_register_00000031; allocator local_231; allocator local_230; allocator local_22f; allocator local_22e; allocator local_22d; allocator local_22c; allocator local_22b; allocator local_22a; allocator local_229; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [24]; string local_210 [32]; string local_1f0 [32]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; string local_1b8 [32]; string local_198 [32]; string local_178 [32]; int8 local_158; int8 uStack_150; int8 local_148; string local_140 [32]; string local_120 [32]; string local_100 [32]; int8 local_e0; int8 uStack_d8; int8 local_d0; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; int8 local_68; int8 uStack_60; int8 local_58; string local_50 [32]; /* try { // try from 0017350f to 00173527 has its CatchHandler @ 001737a4 */ std::__cxx11::string::string<std::allocator<char>>(local_210,"system",&local_229); /* try { // try from 0017352d to 00173540 has its CatchHandler @ 00173795 */ std::__cxx11::string::string<std::allocator<char>> (local_1f0,"You are a helpful assistant",&local_22a); local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0017355a to 0017356a has its CatchHandler @ 00173780 */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,"",&local_22e); /* try { // try from 00173573 to 00173586 has its CatchHandler @ 00173764 */ std::__cxx11::string::string<std::allocator<char>>(local_198,"user",&local_22e); /* try { // try from 0017358f to 001735a2 has its CatchHandler @ 00173757 */ std::__cxx11::string::string<std::allocator<char>>(local_178,"Hello",&local_22b); local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 001735b7 to 001735c7 has its CatchHandler @ 0017373d */ std::__cxx11::string::string<std::allocator<char>>(local_140,"",&local_22f); /* try { // try from 001735d0 to 001735e3 has its CatchHandler @ 0017373b */ std::__cxx11::string::string<std::allocator<char>>(local_120,"assistant",&local_22f); /* try { // try from 001735ec to 001735ff has its CatchHandler @ 00173739 */ std::__cxx11::string::string<std::allocator<char>>(local_100,"Hi there",&local_22c); local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 00173614 to 00173624 has its CatchHandler @ 0017372c */ std::__cxx11::string::string<std::allocator<char>>(local_c8,"",&local_230); /* try { // try from 0017362d to 00173640 has its CatchHandler @ 0017372a */ std::__cxx11::string::string<std::allocator<char>>(local_a8,"user",&local_230); /* try { // try from 00173649 to 0017365c has its CatchHandler @ 00173728 */ std::__cxx11::string::string<std::allocator<char>>(local_88,"How are you?",&local_22d); local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00173671 to 00173681 has its CatchHandler @ 0017371b */ std::__cxx11::string::string<std::allocator<char>>(local_50,"",&local_231); /* try { // try from 00173682 to 00173698 has its CatchHandler @ 001736fa */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,&local_231); lVar1 = 0x168; do { common_chat_msg::~common_chat_msg((common_chat_msg *)(local_210 + lVar1)); lVar1 = lVar1 + -0x78; } while (lVar1 != -0x78); /* try { // try from 001736b5 to 001736cb has its CatchHandler @ 001736eb */ common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
32,333
ast_create_type_declaration
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_type_declaration(Arena* arena, StringId function_name, Type* type, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_TYPE_DECLARATION, line, column); if (!node) { return NULL; } node->as.type_declaration.function_name = function_name; node->as.type_declaration.type = type; node->type_info = type; // Store the type in the node itself return node; }
O2
c
ast_create_type_declaration: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 pushq $0x1d popq %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x99ac testq %rax, %rax je 0x9f55 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) movq %rbx, 0x18(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_type_declaration: push r14 push rbx push rax mov rbx, rdx mov r14, rsi push 1Dh pop rsi mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_9F55 mov [rax+48h], r14 mov [rax+50h], rbx mov [rax+18h], rbx loc_9F55: add rsp, 8 pop rbx pop r14 retn
_QWORD * ast_create_type_declaration(long long a1, long long a2, long long a3, long long a4, long long a5) { _QWORD *result; // rax result = (_QWORD *)ast_create_node(a1, 29, a4, a5); if ( result ) { result[9] = a2; result[10] = a3; result[3] = a3; } return result; }
ast_create_type_declaration: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI PUSH 0x1d POP RSI MOV RDX,RCX MOV RCX,R8 CALL 0x001099ac TEST RAX,RAX JZ 0x00109f55 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX MOV qword ptr [RAX + 0x18],RBX LAB_00109f55: ADD RSP,0x8 POP RBX POP R14 RET
void ast_create_type_declaration (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0x1d,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; *(int8 *)(lVar1 + 0x18) = param_3; } return; }
32,334
ast_create_type_declaration
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_type_declaration(Arena* arena, StringId function_name, Type* type, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_TYPE_DECLARATION, line, column); if (!node) { return NULL; } node->as.type_declaration.function_name = function_name; node->as.type_declaration.type = type; node->type_info = type; // Store the type in the node itself return node; }
O3
c
ast_create_type_declaration: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x1d, %esi movq %rcx, %rdx movq %r8, %rcx callq 0xa65c testq %rax, %rax je 0xac47 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) movq %rbx, 0x18(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_type_declaration: push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov esi, 1Dh mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_AC47 mov [rax+48h], r14 mov [rax+50h], rbx mov [rax+18h], rbx loc_AC47: add rsp, 8 pop rbx pop r14 retn
_QWORD * ast_create_type_declaration(long long a1, long long a2, long long a3, long long a4, long long a5) { _QWORD *result; // rax result = (_QWORD *)ast_create_node(a1, 29, a4, a5); if ( result ) { result[9] = a2; result[10] = a3; result[3] = a3; } return result; }
ast_create_type_declaration: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV ESI,0x1d MOV RDX,RCX MOV RCX,R8 CALL 0x0010a65c TEST RAX,RAX JZ 0x0010ac47 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX MOV qword ptr [RAX + 0x18],RBX LAB_0010ac47: ADD RSP,0x8 POP RBX POP R14 RET
void ast_create_type_declaration (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0x1d,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; *(int8 *)(lVar1 + 0x18) = param_3; } return; }
32,335
write_hook_for_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_undo_key_insert(enum translog_record_type type, TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { struct st_msg_to_write_hook_for_undo_key *msg= (struct st_msg_to_write_hook_for_undo_key *) hook_arg; MARIA_SHARE *share= tbl_info->s; if (msg->auto_increment > 0) { /* Only reason to set it here is to have a mutex protect from checkpoint reading at the same time (would see a corrupted value). The purpose of the following code is to set auto_increment if the row has a with auto_increment value higher than the current one. We also want to be able to restore the old value, in case of rollback, if no one else has tried to set the value. The logic used is that we only restore the auto_increment value if tbl_info->last_auto_increment == share->last_auto_increment when it's time to do the rollback. */ DBUG_PRINT("info",("auto_inc: %lu new auto_inc: %lu", (ulong)share->state.auto_increment, (ulong)msg->auto_increment)); if (share->state.auto_increment < msg->auto_increment) { /* Remember the original value, in case of rollback */ tbl_info->last_auto_increment= share->last_auto_increment= share->state.auto_increment; share->state.auto_increment= msg->auto_increment; } else { /* If the current value would have affected the original auto_increment value, set it to an impossible value so that it's not restored on rollback */ if (msg->auto_increment > share->last_auto_increment) share->last_auto_increment= ~(ulonglong) 0; } } return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg); }
O3
c
write_hook_for_undo_key_insert: movq 0x18(%r8), %r9 testq %r9, %r9 je 0x405f2 pushq %rbp movq %rsp, %rbp movq (%rdx), %rax movq 0xd8(%rax), %r10 cmpq %r9, %r10 jae 0x4067b movq %r10, 0x610(%rax) movq %r10, 0x3e8(%rdx) movq 0x18(%r8), %r9 movq %r9, 0xd8(%rax) jmp 0x4068f cmpq 0x610(%rax), %r9 jbe 0x4068f movq $-0x1, 0x610(%rax) popq %rbp jmp 0x405f2
write_hook_for_undo_key_insert: mov r9, [r8+18h] test r9, r9 jz write_hook_for_undo_key push rbp mov rbp, rsp mov rax, [rdx] mov r10, [rax+0D8h] cmp r10, r9 jnb short loc_4067B mov [rax+610h], r10 mov [rdx+3E8h], r10 mov r9, [r8+18h] mov [rax+0D8h], r9 jmp short loc_4068F loc_4067B: cmp r9, [rax+610h] jbe short loc_4068F mov qword ptr [rax+610h], 0FFFFFFFFFFFFFFFFh loc_4068F: pop rbp jmp write_hook_for_undo_key
long long write_hook_for_undo_key_insert(unsigned int a1, long long a2, long long a3, long long a4, long long a5) { unsigned long long v5; // r9 long long v7; // rax unsigned long long v8; // r10 v5 = *(_QWORD *)(a5 + 24); if ( v5 ) { v7 = *(_QWORD *)a3; v8 = *(_QWORD *)(*(_QWORD *)a3 + 216LL); if ( v8 >= v5 ) { if ( v5 > *(_QWORD *)(v7 + 1552) ) *(_QWORD *)(v7 + 1552) = -1LL; } else { *(_QWORD *)(v7 + 1552) = v8; *(_QWORD *)(a3 + 1000) = v8; *(_QWORD *)(v7 + 216) = *(_QWORD *)(a5 + 24); } } return write_hook_for_undo_key(a1, a2, a3, a4, a5); }
write_hook_for_undo_key_insert: MOV R9,qword ptr [R8 + 0x18] TEST R9,R9 JZ 0x001405f2 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX] MOV R10,qword ptr [RAX + 0xd8] CMP R10,R9 JNC 0x0014067b MOV qword ptr [RAX + 0x610],R10 MOV qword ptr [RDX + 0x3e8],R10 MOV R9,qword ptr [R8 + 0x18] MOV qword ptr [RAX + 0xd8],R9 JMP 0x0014068f LAB_0014067b: CMP R9,qword ptr [RAX + 0x610] JBE 0x0014068f MOV qword ptr [RAX + 0x610],-0x1 LAB_0014068f: POP RBP JMP 0x001405f2
void write_hook_for_undo_key_insert (int4 param_1,int8 param_2,long *param_3,int8 param_4, int8 *param_5) { ulong uVar1; long lVar2; ulong uVar3; uVar1 = param_5[3]; if (uVar1 != 0) { lVar2 = *param_3; uVar3 = *(ulong *)(lVar2 + 0xd8); if (uVar3 < uVar1) { *(ulong *)(lVar2 + 0x610) = uVar3; param_3[0x7d] = uVar3; *(int8 *)(lVar2 + 0xd8) = param_5[3]; } else if (*(ulong *)(lVar2 + 0x610) < uVar1) { *(int8 *)(lVar2 + 0x610) = 0xffffffffffffffff; } write_hook_for_undo_key(); return; } *(int8 *)*param_5 = param_5[1]; if (*(char *)((long)param_3 + 0x67e) != '\0') { _ma_unlock_key_del(param_3); } write_hook_for_undo(param_1,param_2,param_3,param_4,0); return; }
32,336
void mirroredHeapsort<float, int>(float*, unsigned long, unsigned long, int*)
iqtree3/utils/heapsort.h
void mirroredHeapsort ( V* valueArray , size_t start, size_t stop , S* satteliteArray) { // //Sorts valueArray[start..stop] and "mirrors" //the permutation of the values //on satteliteArray[start..stop]. // if ( start + 1 < stop ) { constructMirroredHeap(valueArray, start, stop, satteliteArray); extractFromMirroredHeap(valueArray, start, stop, satteliteArray); } }
O3
c
void mirroredHeapsort<float, int>(float*, unsigned long, unsigned long, int*): leaq 0x1(%rsi), %rax cmpq %rdx, %rax jae 0x1f2c3 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 callq 0x1f2c4 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1f374 retq
_Z16mirroredHeapsortIfiEvPT_mmPT0_: lea rax, [rsi+1] cmp rax, rdx jnb short locret_1F2C3 push r15 push r14 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r12, rdi call _Z21constructMirroredHeapIfiEvPT_llPT0_; constructMirroredHeap<float,int>(float *,long,long,int *) mov rdi, r12 mov rsi, r15 mov rdx, r14 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _Z23extractFromMirroredHeapIfiEvPT_llPT0_; extractFromMirroredHeap<float,int>(float *,long,long,int *) locret_1F2C3: retn
long long mirroredHeapsort<float,int>(long long a1, long long a2, unsigned long long a3, long long a4) { long long result; // rax result = a2 + 1; if ( a2 + 1 < a3 ) { constructMirroredHeap<float,int>(a1); return extractFromMirroredHeap<float,int>(a1, a2, a3, a4); } return result; }
mirroredHeapsort<float,int>: LEA RAX,[RSI + 0x1] CMP RAX,RDX JNC 0x0011f2c3 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI CALL 0x0011f2c4 MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0011f374 LAB_0011f2c3: RET
/* void mirroredHeapsort<float, int>(float*, unsigned long, unsigned long, int*) */ void mirroredHeapsort<float,int>(float *param_1,ulong param_2,ulong param_3,int *param_4) { if (param_2 + 1 < param_3) { constructMirroredHeap<float,int>(param_1,param_2,param_3,param_4); extractFromMirroredHeap<float,int>(param_1,param_2,param_3,param_4); return; } return; }
32,337
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::~iteration_proxy_value()
monkey531[P]llama/common/./json.hpp
~iteration_proxy_value() = default;
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::~iteration_proxy_value(): pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %rdi leaq 0x60(%rbx), %rax cmpq %rax, %rdi je 0x70bac movq (%rax), %rsi incq %rsi callq 0x186a0 movq 0x30(%rbx), %rdi addq $0x40, %rbx cmpq %rbx, %rdi je 0x70bc5 movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x186a0 popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+50h]; void * lea rax, [rbx+60h] cmp rdi, rax jz short loc_70BAC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_70BAC: mov rdi, [rbx+30h]; void * add rbx, 40h ; '@' cmp rdi, rbx jz short loc_70BC5 mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_70BC5: pop rbx retn
void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value( _QWORD *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi _QWORD *v4; // rbx v2 = (_QWORD *)a1[10]; if ( v2 != a1 + 12 ) operator delete(v2, a1[12] + 1LL); v3 = (_QWORD *)a1[6]; v4 = a1 + 8; if ( v3 != v4 ) operator delete(v3, *v4 + 1LL); }
~iteration_proxy_value: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x50] LEA RAX,[RBX + 0x60] CMP RDI,RAX JZ 0x00170bac MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186a0 LAB_00170bac: MOV RDI,qword ptr [RBX + 0x30] ADD RBX,0x40 CMP RDI,RBX JZ 0x00170bc5 MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x001186a0 LAB_00170bc5: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::~iteration_proxy_value() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::~iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this) { if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) != this + 0x60) { operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50),*(long *)(this + 0x60) + 1); } if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x30) != this + 0x40) { operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x30),*(long *)(this + 0x40) + 1); return; } return; }
32,338
unlink_changed
eloqsql/mysys/mf_keycache.c
static inline void unlink_changed(BLOCK_LINK *block) { DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); if (block->next_changed) block->next_changed->prev_changed= block->prev_changed; *block->prev_changed= block->next_changed; #ifdef DBUG_ASSERT_EXISTS /* This makes it easier to see it's not in a chain during debugging. And some DBUG_ASSERT() rely on it. */ block->next_changed= NULL; block->prev_changed= NULL; #endif }
O0
c
unlink_changed: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) jmp 0xe52ba movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0xe52d9 movq -0x8(%rbp), %rax movq 0x18(%rax), %rcx movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rcx, (%rax) popq %rbp retq nop
unlink_changed_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi jmp short $+2 loc_E52BA: mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_E52D9 mov rax, [rbp+var_8] mov rcx, [rax+18h] mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+18h], rcx loc_E52D9: mov rax, [rbp+var_8] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], rcx pop rbp retn
_QWORD * unlink_changed_0(long long a1) { _QWORD *result; // rax if ( *(_QWORD *)(a1 + 16) ) *(_QWORD *)(*(_QWORD *)(a1 + 16) + 24LL) = *(_QWORD *)(a1 + 24); result = *(_QWORD **)(a1 + 24); *result = *(_QWORD *)(a1 + 16); return result; }
unlink_changed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI JMP 0x001e52ba LAB_001e52ba: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001e52d9 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x18],RCX LAB_001e52d9: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RAX],RCX POP RBP RET
void unlink_changed(long param_1) { if (*(long *)(param_1 + 0x10) != 0) { *(int8 *)(*(long *)(param_1 + 0x10) + 0x18) = *(int8 *)(param_1 + 0x18); } **(int8 **)(param_1 + 0x18) = *(int8 *)(param_1 + 0x10); return; }
32,339
mi_open_keyfile
eloqsql/storage/myisam/mi_open.c
int mi_open_keyfile(MYISAM_SHARE *share) { if ((share->kfile= mysql_file_open(mi_key_file_kfile, share->unique_file_name, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS | MY_WME))) < 0) return 1; return 0; }
O0
c
mi_open_keyfile: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) leaq 0x3ae539(%rip), %rax # 0x3f040c movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x258(%rax), %rcx movq -0x10(%rbp), %rax movl 0x358(%rax), %r8d orl $0x0, %r8d orl $0x20000, %r8d # imm = 0x20000 orl $0x80000, %r8d # imm = 0x80000 leaq 0x9665b(%rip), %rsi # 0xd855f movl $0x504, %edx # imm = 0x504 movl $0x210, %r9d # imm = 0x210 callq 0x3cc50 movq -0x10(%rbp), %rcx movl %eax, 0x350(%rcx) cmpl $0x0, %eax jge 0x41f2c movl $0x1, -0x4(%rbp) jmp 0x41f33 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
mi_open_keyfile: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi lea rax, mi_key_file_kfile mov edi, [rax] mov rax, [rbp+var_10] mov rcx, [rax+258h] mov rax, [rbp+var_10] mov r8d, [rax+358h] or r8d, 0 or r8d, 20000h or r8d, 80000h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 504h mov r9d, 210h call inline_mysql_file_open mov rcx, [rbp+var_10] mov [rcx+350h], eax cmp eax, 0 jge short loc_41F2C mov [rbp+var_4], 1 jmp short loc_41F33 loc_41F2C: mov [rbp+var_4], 0 loc_41F33: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
_BOOL8 mi_open_keyfile(long long a1) { int v1; // eax v1 = inline_mysql_file_open( mi_key_file_kfile, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x504u, *(_QWORD *)(a1 + 600), *(_DWORD *)(a1 + 856) | 0xA0000u, 528LL); *(_DWORD *)(a1 + 848) = v1; return v1 < 0; }
mi_open_keyfile: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x4f040c] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x258] MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x358] OR R8D,0x0 OR R8D,0x20000 OR R8D,0x80000 LEA RSI,[0x1d855f] MOV EDX,0x504 MOV R9D,0x210 CALL 0x0013cc50 MOV RCX,qword ptr [RBP + -0x10] MOV dword ptr [RCX + 0x350],EAX CMP EAX,0x0 JGE 0x00141f2c MOV dword ptr [RBP + -0x4],0x1 JMP 0x00141f33 LAB_00141f2c: MOV dword ptr [RBP + -0x4],0x0 LAB_00141f33: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
bool mi_open_keyfile(long param_1) { int iVar1; iVar1 = inline_mysql_file_open (mi_key_file_kfile, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504, *(int8 *)(param_1 + 600),*(uint *)(param_1 + 0x358) | 0xa0000,0x210); *(int *)(param_1 + 0x350) = iVar1; return iVar1 < 0; }
32,340
mi_open_keyfile
eloqsql/storage/myisam/mi_open.c
int mi_open_keyfile(MYISAM_SHARE *share) { if ((share->kfile= mysql_file_open(mi_key_file_kfile, share->unique_file_name, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS | MY_WME))) < 0) return 1; return 0; }
O3
c
mi_open_keyfile: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx leaq 0x36e16c(%rip), %rax # 0x3a676c movl (%rax), %esi movq 0x258(%rdi), %r15 movl $0xa0000, %r14d # imm = 0xA0000 orl 0x358(%rdi), %r14d leaq 0x2f7d33(%rip), %r13 # 0x330350 movq (%r13), %rax leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %r12 movl $0x2, %edx movq %r15, %rcx movq %r12, %r8 callq *0x148(%rax) movq %rax, (%r12) testq %rax, %rax jne 0x38673 movl $0x210, %edx # imm = 0x210 movq %r15, %rdi movl %r14d, %esi callq 0x5a988 movl %eax, %r14d movl %r14d, 0x350(%rbx) shrl $0x1f, %r14d movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rcx leaq 0x58ee1(%rip), %rsi # 0x9155f movq %rax, %rdi movl $0x504, %edx # imm = 0x504 callq *0x1f0(%rcx) movl $0x210, %edx # imm = 0x210 movq %r15, %rdi movl %r14d, %esi callq 0x5a988 movl %eax, %r14d movq (%r13), %rax movq -0x30(%rbp), %rdi movl %r14d, %esi callq *0x200(%rax) jmp 0x38656
mi_open_keyfile: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi lea rax, mi_key_file_kfile mov esi, [rax] mov r15, [rdi+258h] mov r14d, offset unk_A0000 or r14d, [rdi+358h] lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_78] lea r12, [rbp+var_30] mov edx, 2 mov rcx, r15 mov r8, r12 call qword ptr [rax+148h] mov [r12], rax test rax, rax jnz short loc_38673 mov edx, 210h mov rdi, r15 mov esi, r14d call my_open mov r14d, eax loc_38656: mov [rbx+350h], r14d shr r14d, 1Fh mov eax, r14d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_38673: mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 504h call qword ptr [rcx+1F0h] mov edx, 210h mov rdi, r15 mov esi, r14d call my_open mov r14d, eax mov rax, [r13+0] mov rdi, [rbp+var_30] mov esi, r14d call qword ptr [rax+200h] jmp short loc_38656
long long mi_open_keyfile(long long a1) { long long v1; // r15 unsigned int v2; // r14d long long v3; // rax long long v4; // r14 _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7[6]; // [rsp+50h] [rbp-30h] BYREF v1 = *(_QWORD *)(a1 + 600); v2 = *(_DWORD *)(a1 + 856) | (unsigned int)&unk_A0000; v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v6, mi_key_file_kfile, 2LL, v1, v7); v7[0] = v3; if ( v3 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1284LL); v4 = (unsigned int)my_open(v1, v2, 528LL); ((void ( *)(long long, long long))PSI_server[64])(v7[0], v4); } else { LODWORD(v4) = my_open(v1, v2, 528LL); } *(_DWORD *)(a1 + 848) = v4; return (unsigned int)v4 >> 31; }
mi_open_keyfile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI LEA RAX,[0x4a676c] MOV ESI,dword ptr [RAX] MOV R15,qword ptr [RDI + 0x258] MOV R14D,0xa0000 OR R14D,dword ptr [RDI + 0x358] LEA R13,[0x430350] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x78] LEA R12,[RBP + -0x30] MOV EDX,0x2 MOV RCX,R15 MOV R8,R12 CALL qword ptr [RAX + 0x148] MOV qword ptr [R12],RAX TEST RAX,RAX JNZ 0x00138673 MOV EDX,0x210 MOV RDI,R15 MOV ESI,R14D CALL 0x0015a988 MOV R14D,EAX LAB_00138656: MOV dword ptr [RBX + 0x350],R14D SHR R14D,0x1f MOV EAX,R14D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00138673: MOV RCX,qword ptr [R13] LEA RSI,[0x19155f] MOV RDI,RAX MOV EDX,0x504 CALL qword ptr [RCX + 0x1f0] MOV EDX,0x210 MOV RDI,R15 MOV ESI,R14D CALL 0x0015a988 MOV R14D,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,R14D CALL qword ptr [RAX + 0x200] JMP 0x00138656
uint mi_open_keyfile(long param_1) { int8 uVar1; uint uVar2; int1 local_80 [72]; long local_38; uVar1 = *(int8 *)(param_1 + 600); uVar2 = *(uint *)(param_1 + 0x358) | 0xa0000; local_38 = (**(code **)(PSI_server + 0x148))(local_80,mi_key_file_kfile,2,uVar1,&local_38); if (local_38 == 0) { uVar2 = my_open(uVar1,uVar2,0x210); } else { (**(code **)(PSI_server + 0x1f0)) (local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504); uVar2 = my_open(uVar1,uVar2,0x210); (**(code **)(PSI_server + 0x200))(local_38,uVar2); } *(uint *)(param_1 + 0x350) = uVar2; return uVar2 >> 0x1f; }
32,341
mysql_real_query
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_real_query(MYSQL *mysql, const char *query, unsigned long length) { my_bool skip_result= OPT_EXT_VAL(mysql, multi_command); if (length == (unsigned long)-1) length= (unsigned long)strlen(query); free_old_query(mysql); if (ma_simple_command(mysql, COM_QUERY,query,length,1,0)) return(-1); if (!skip_result && !mysql->options.extension->skip_read_response) return(mysql->methods->db_read_query_result(mysql)); return(0); }
O0
c
mysql_real_query: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1ceb0 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movsbl 0xa8(%rax), %eax cmpl $0x0, %eax je 0x1ceb0 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movsbl 0xa8(%rax), %eax movl %eax, -0x28(%rbp) jmp 0x1ceb7 xorl %eax, %eax movl %eax, -0x28(%rbp) jmp 0x1ceb7 movl -0x28(%rbp), %eax movb %al, -0x21(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0x1ced1 movq -0x18(%rbp), %rdi callq 0x131a0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x1dfe0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl $0x3, %esi movl $0x1, %r8d xorl %eax, %eax movl %eax, %r9d callq 0x16c90 cmpl $0x0, %eax je 0x1cf09 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1cf44 cmpb $0x0, -0x21(%rbp) jne 0x1cf3d movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpb $0x0, 0x148(%rax) jne 0x1cf3d movq -0x10(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x1cf44 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
mysql_real_query: 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] cmp qword ptr [rax+480h], 0 jz short loc_1CEB0 mov rax, [rbp+var_10] mov rax, [rax+480h] movsx eax, byte ptr [rax+0A8h] cmp eax, 0 jz short loc_1CEB0 mov rax, [rbp+var_10] mov rax, [rax+480h] movsx eax, byte ptr [rax+0A8h] mov [rbp+var_28], eax jmp short loc_1CEB7 loc_1CEB0: xor eax, eax mov [rbp+var_28], eax jmp short $+2 loc_1CEB7: mov eax, [rbp+var_28] mov [rbp+var_21], al cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_1CED1 mov rdi, [rbp+var_18] call _strlen mov [rbp+var_20], rax loc_1CED1: mov rdi, [rbp+var_10] call free_old_query mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov esi, 3 mov r8d, 1 xor eax, eax mov r9d, eax call ma_simple_command cmp eax, 0 jz short loc_1CF09 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_1CF44 loc_1CF09: cmp [rbp+var_21], 0 jnz short loc_1CF3D mov rax, [rbp+var_10] mov rax, [rax+480h] cmp byte ptr [rax+148h], 0 jnz short loc_1CF3D mov rax, [rbp+var_10] mov rax, [rax+4D0h] mov rax, [rax+20h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp short loc_1CF44 loc_1CF3D: mov [rbp+var_4], 0 loc_1CF44: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_real_query(long long a1, long long a2, long long a3) { char v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v5 = a3; if ( *(_QWORD *)(a1 + 1152) && *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL) ) v4 = *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL); else v4 = 0; if ( a3 == -1 ) v5 = strlen(a2); free_old_query(a1); if ( (unsigned int)ma_simple_command(a1, 3u, a2, v5, 1, 0LL) ) { return (unsigned int)-1; } else if ( v4 || *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) ) { return 0; } else { return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1); } }
mysql_real_query: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011ceb0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0xa8] CMP EAX,0x0 JZ 0x0011ceb0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0xa8] MOV dword ptr [RBP + -0x28],EAX JMP 0x0011ceb7 LAB_0011ceb0: XOR EAX,EAX MOV dword ptr [RBP + -0x28],EAX JMP 0x0011ceb7 LAB_0011ceb7: MOV EAX,dword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x21],AL CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x0011ced1 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001131a0 MOV qword ptr [RBP + -0x20],RAX LAB_0011ced1: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011dfe0 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV ESI,0x3 MOV R8D,0x1 XOR EAX,EAX MOV R9D,EAX CALL 0x00116c90 CMP EAX,0x0 JZ 0x0011cf09 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011cf44 LAB_0011cf09: CMP byte ptr [RBP + -0x21],0x0 JNZ 0x0011cf3d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP byte ptr [RAX + 0x148],0x0 JNZ 0x0011cf3d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x20] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0011cf44 LAB_0011cf3d: MOV dword ptr [RBP + -0x4],0x0 LAB_0011cf44: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_real_query(long param_1,char *param_2,size_t param_3) { char cVar1; int iVar2; int8 local_28; int4 local_c; if ((*(long *)(param_1 + 0x480) == 0) || (*(char *)(*(long *)(param_1 + 0x480) + 0xa8) == '\0')) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8); } local_28 = param_3; if (param_3 == 0xffffffffffffffff) { local_28 = strlen(param_2); } free_old_query(param_1); iVar2 = ma_simple_command(param_1,3,param_2,local_28,1,0); if (iVar2 == 0) { if ((cVar1 == '\0') && (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0')) { local_c = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1); } else { local_c = 0; } } else { local_c = 0xffffffff; } return local_c; }
32,342
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O0
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x308, %rsp # imm = 0x308 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %edi, -0x234(%rbp) movq 0x1cac82(%rip), %rax # 0x2befe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movq -0x240(%rbp), %rax movq 0x1cac6a(%rip), %rcx # 0x2befe0 cmpq (%rcx), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x241(%rbp) leaq 0xb90222(%rip), %rax # 0xc845b0 cmpb $0x0, (%rax) jne 0xf4398 jmp 0xf4691 jmp 0xf439a jmp 0xf439c cmpq $0x0, -0x240(%rbp) jne 0xf43be movq 0x1cac33(%rip), %rax # 0x2befe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movb $0x0, -0x241(%rbp) movl -0x234(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xf43dc movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0xf44fa movl $0x0, -0x248(%rbp) movl $0x0, -0x24c(%rbp) movl $0x0, -0x250(%rbp) movl -0x248(%rbp), %eax leaq 0x1cd929(%rip), %rcx # 0x2c1d30 cmpl (%rcx), %eax jae 0xf449e leaq 0x1cd922(%rip), %rax # 0x2c1d38 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) jne 0xf442e jmp 0xf448a leaq 0x1cd903(%rip), %rax # 0x2c1d38 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x3, 0x8(%rax) je 0xf4468 leaq 0x1cd8e6(%rip), %rax # 0x2c1d38 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x8(%rax) jne 0xf4479 movl -0x250(%rbp), %eax addl $0x1, %eax movl %eax, -0x250(%rbp) jmp 0xf4488 movl -0x24c(%rbp), %eax addl $0x1, %eax movl %eax, -0x24c(%rbp) jmp 0xf448a movl -0x248(%rbp), %eax addl $0x1, %eax movl %eax, -0x248(%rbp) jmp 0xf43fa cmpl $0x0, -0x24c(%rbp) jne 0xf44b0 cmpl $0x0, -0x250(%rbp) je 0xf44f8 leaq -0x230(%rbp), %rdi leaq 0x1cdd92(%rip), %rax # 0x2c2250 movq 0x90(%rax), %rdx movl -0x24c(%rbp), %ecx movl -0x250(%rbp), %r8d movl $0x200, %esi # imm = 0x200 movb $0x0, %al callq 0x14ec40 leaq -0x230(%rbp), %rsi movl $0x13, %edi movl $0x4, %edx callq 0xf5770 jmp 0xf44f6 jmp 0xf44f8 jmp 0xf44fa callq 0xdd040 callq 0xf1770 callq 0xf5bc0 movl -0x234(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0xf4527 movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0xf464c xorl %edi, %edi leaq -0x2e0(%rbp), %rsi callq 0x2a850 cmpl $0x0, %eax jne 0xf464a movq -0x240(%rbp), %rdi imulq $0x64, -0x2e0(%rbp), %rax movq %rax, -0x2f0(%rbp) movq -0x2d8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2f0(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm0 movsd 0x65d89(%rip), %xmm1 # 0x15a308 divsd %xmm1, %xmm0 imulq $0x64, -0x2d0(%rbp), %rax movq %rax, -0x2e8(%rbp) movq -0x2c8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2e8(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm1 movsd 0x65d4b(%rip), %xmm2 # 0x15a308 divsd %xmm2, %xmm1 movq -0x2c0(%rbp), %rdx movq -0x2b0(%rbp), %rcx movq -0x2a0(%rbp), %r8 movq -0x298(%rbp), %r9 movq -0x290(%rbp), %r13 movq -0x288(%rbp), %r12 movq -0x280(%rbp), %r15 movq -0x278(%rbp), %r14 movq -0x270(%rbp), %rbx movq -0x268(%rbp), %r11 movq -0x260(%rbp), %r10 movq -0x258(%rbp), %rax leaq 0x611d7(%rip), %rsi # 0x1557f3 movq %r13, (%rsp) movq %r12, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %r14, 0x18(%rsp) movq %rbx, 0x20(%rsp) movq %r11, 0x28(%rsp) movq %r10, 0x30(%rsp) movq %rax, 0x38(%rsp) movb $0x2, %al callq 0x2a160 jmp 0xf464c callq 0xf7f50 callq 0xf7cc0 movl -0x234(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jne 0xf466a jmp 0xf4666 jmp 0xf4668 jmp 0xf466a callq 0xfb850 leaq 0xb90c3e(%rip), %rax # 0xc852b4 movl (%rax), %edi callq 0x2a6e0 leaq 0xb90968(%rip), %rax # 0xc84fec movb $0x0, (%rax) leaq 0xb8ff22(%rip), %rax # 0xc845b0 movb $0x0, (%rax) movq %fs:0x28, %rax movq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0xf46b5 addq $0x308, %rsp # imm = 0x308 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
my_end: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 308h mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_234], edi mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov rax, [rbp+var_240] mov rcx, cs:stderr_ptr cmp rax, [rcx] setnz al and al, 1 movzx eax, al mov [rbp+var_241], al lea rax, my_init_done cmp byte ptr [rax], 0 jnz short loc_F4398 jmp loc_F4691 loc_F4398: jmp short $+2 loc_F439A: jmp short $+2 loc_F439C: cmp [rbp+var_240], 0 jnz short loc_F43BE mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov [rbp+var_241], 0 loc_F43BE: mov eax, [rbp+var_234] and eax, 1 cmp eax, 0 jnz short loc_F43DC movsx eax, [rbp+var_241] cmp eax, 0 jz loc_F44FA loc_F43DC: mov [rbp+var_248], 0 mov [rbp+var_24C], 0 mov [rbp+var_250], 0 loc_F43FA: mov eax, [rbp+var_248] lea rcx, my_file_limit cmp eax, [rcx] jnb loc_F449E lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jnz short loc_F442E jmp short loc_F448A loc_F442E: lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 3 jz short loc_F4468 lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 4 jnz short loc_F4479 loc_F4468: mov eax, [rbp+var_250] add eax, 1 mov [rbp+var_250], eax jmp short loc_F4488 loc_F4479: mov eax, [rbp+var_24C] add eax, 1 mov [rbp+var_24C], eax loc_F4488: jmp short $+2 loc_F448A: mov eax, [rbp+var_248] add eax, 1 mov [rbp+var_248], eax jmp loc_F43FA loc_F449E: cmp [rbp+var_24C], 0 jnz short loc_F44B0 cmp [rbp+var_250], 0 jz short loc_F44F8 loc_F44B0: lea rdi, [rbp+var_230] lea rax, globerrs mov rdx, [rax+90h] mov ecx, [rbp+var_24C] mov r8d, [rbp+var_250] mov esi, 200h mov al, 0 call my_snprintf lea rsi, [rbp+var_230] mov edi, 13h mov edx, 4 call my_message_stderr jmp short $+2 loc_F44F6: jmp short $+2 loc_F44F8: jmp short $+2 loc_F44FA: call free_charsets call my_error_unregister_all call my_once_free mov eax, [rbp+var_234] and eax, 2 cmp eax, 0 jnz short loc_F4527 movsx eax, [rbp+var_241] cmp eax, 0 jz loc_F464C loc_F4527: xor edi, edi lea rsi, [rbp+var_2E0] call _getrusage cmp eax, 0 jnz loc_F464A mov rdi, [rbp+var_240] imul rax, [rbp+var_2E0], 64h ; 'd' mov [rbp+var_2F0], rax mov rax, [rbp+var_2D8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2F0] add rax, rcx cvtsi2sd xmm0, rax movsd xmm1, cs:qword_15A308 divsd xmm0, xmm1 imul rax, [rbp+var_2D0], 64h ; 'd' mov [rbp+var_2E8], rax mov rax, [rbp+var_2C8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2E8] add rax, rcx cvtsi2sd xmm1, rax movsd xmm2, cs:qword_15A308 divsd xmm1, xmm2 mov rdx, [rbp+var_2C0] mov rcx, [rbp+var_2B0] mov r8, [rbp+var_2A0] mov r9, [rbp+var_298] mov r13, [rbp+var_290] mov r12, [rbp+var_288] mov r15, [rbp+var_280] mov r14, [rbp+var_278] mov rbx, [rbp+var_270] mov r11, [rbp+var_268] mov r10, [rbp+var_260] mov rax, [rbp+var_258] lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov [rsp+330h+var_330], r13 mov [rsp+330h+var_328], r12 mov [rsp+330h+var_320], r15 mov [rsp+330h+var_318], r14 mov [rsp+330h+var_310], rbx mov [rsp+330h+var_308], r11 mov [rsp+330h+var_300], r10 mov [rsp+330h+var_2F8], rax mov al, 2 call _fprintf loc_F464A: jmp short $+2 loc_F464C: call my_thread_end call my_thread_global_end mov eax, [rbp+var_234] and eax, 4 cmp eax, 0 jnz short loc_F466A jmp short $+2 loc_F4666: jmp short $+2 loc_F4668: jmp short $+2 loc_F466A: call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 0 lea rax, my_init_done mov byte ptr [rax], 0 loc_F4691: mov rax, fs:28h mov rcx, [rbp+var_30] cmp rax, rcx jnz short loc_F46B5 add rsp, 308h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_F46B5: call ___stack_chk_fail
unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6) { _QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF long long v8; // [rsp+60h] [rbp-2D0h] long long v9; // [rsp+68h] [rbp-2C8h] long long v10; // [rsp+70h] [rbp-2C0h] long long v11; // [rsp+80h] [rbp-2B0h] long long v12; // [rsp+90h] [rbp-2A0h] long long v13; // [rsp+98h] [rbp-298h] long long v14; // [rsp+A0h] [rbp-290h] long long v15; // [rsp+A8h] [rbp-288h] long long v16; // [rsp+B0h] [rbp-280h] long long v17; // [rsp+B8h] [rbp-278h] long long v18; // [rsp+C0h] [rbp-270h] long long v19; // [rsp+C8h] [rbp-268h] long long v20; // [rsp+D0h] [rbp-260h] long long v21; // [rsp+D8h] [rbp-258h] int v22; // [rsp+E0h] [rbp-250h] int v23; // [rsp+E4h] [rbp-24Ch] unsigned int v24; // [rsp+E8h] [rbp-248h] char v25; // [rsp+EFh] [rbp-241h] long long v26; // [rsp+F0h] [rbp-240h] int v27; // [rsp+FCh] [rbp-234h] _BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF unsigned long long v29; // [rsp+300h] [rbp-30h] v29 = __readfsqword(0x28u); v27 = a1; v26 = stderr; v25 = 0; if ( my_init_done ) { if ( !v26 ) { v26 = stderr; v25 = 0; } if ( (v27 & 1) != 0 ) { v24 = 0; v23 = 0; v22 = 0; while ( v24 < my_file_limit[0] ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 ) ++v22; else ++v23; } ++v24; } if ( v23 || v22 ) { my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6); my_message_stderr(19LL, v28, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) ) fprintf( v26, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0, (double)(int)(v9 / 10000 + 100 * v8) / 100.0, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x308 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x234],EDI MOV RAX,qword ptr [0x003befe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [0x003befe0] CMP RAX,qword ptr [RCX] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x241],AL LEA RAX,[0xd845b0] CMP byte ptr [RAX],0x0 JNZ 0x001f4398 JMP 0x001f4691 LAB_001f4398: JMP 0x001f439a LAB_001f439a: JMP 0x001f439c LAB_001f439c: CMP qword ptr [RBP + -0x240],0x0 JNZ 0x001f43be MOV RAX,qword ptr [0x003befe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV byte ptr [RBP + -0x241],0x0 LAB_001f43be: MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001f43dc MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x001f44fa LAB_001f43dc: MOV dword ptr [RBP + -0x248],0x0 MOV dword ptr [RBP + -0x24c],0x0 MOV dword ptr [RBP + -0x250],0x0 LAB_001f43fa: MOV EAX,dword ptr [RBP + -0x248] LEA RCX,[0x3c1d30] CMP EAX,dword ptr [RCX] JNC 0x001f449e LEA RAX,[0x3c1d38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JNZ 0x001f442e JMP 0x001f448a LAB_001f442e: LEA RAX,[0x3c1d38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x3 JZ 0x001f4468 LEA RAX,[0x3c1d38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x4 JNZ 0x001f4479 LAB_001f4468: MOV EAX,dword ptr [RBP + -0x250] ADD EAX,0x1 MOV dword ptr [RBP + -0x250],EAX JMP 0x001f4488 LAB_001f4479: MOV EAX,dword ptr [RBP + -0x24c] ADD EAX,0x1 MOV dword ptr [RBP + -0x24c],EAX LAB_001f4488: JMP 0x001f448a LAB_001f448a: MOV EAX,dword ptr [RBP + -0x248] ADD EAX,0x1 MOV dword ptr [RBP + -0x248],EAX JMP 0x001f43fa LAB_001f449e: CMP dword ptr [RBP + -0x24c],0x0 JNZ 0x001f44b0 CMP dword ptr [RBP + -0x250],0x0 JZ 0x001f44f8 LAB_001f44b0: LEA RDI,[RBP + -0x230] LEA RAX,[0x3c2250] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,dword ptr [RBP + -0x24c] MOV R8D,dword ptr [RBP + -0x250] MOV ESI,0x200 MOV AL,0x0 CALL 0x0024ec40 LEA RSI,[RBP + -0x230] MOV EDI,0x13 MOV EDX,0x4 CALL 0x001f5770 JMP 0x001f44f6 LAB_001f44f6: JMP 0x001f44f8 LAB_001f44f8: JMP 0x001f44fa LAB_001f44fa: CALL 0x001dd040 CALL 0x001f1770 CALL 0x001f5bc0 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x2 CMP EAX,0x0 JNZ 0x001f4527 MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x001f464c LAB_001f4527: XOR EDI,EDI LEA RSI,[RBP + -0x2e0] CALL 0x0012a850 CMP EAX,0x0 JNZ 0x001f464a MOV RDI,qword ptr [RBP + -0x240] IMUL RAX,qword ptr [RBP + -0x2e0],0x64 MOV qword ptr [RBP + -0x2f0],RAX MOV RAX,qword ptr [RBP + -0x2d8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2f0] ADD RAX,RCX CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [0x0025a308] DIVSD XMM0,XMM1 IMUL RAX,qword ptr [RBP + -0x2d0],0x64 MOV qword ptr [RBP + -0x2e8],RAX MOV RAX,qword ptr [RBP + -0x2c8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2e8] ADD RAX,RCX CVTSI2SD XMM1,RAX MOVSD XMM2,qword ptr [0x0025a308] DIVSD XMM1,XMM2 MOV RDX,qword ptr [RBP + -0x2c0] MOV RCX,qword ptr [RBP + -0x2b0] MOV R8,qword ptr [RBP + -0x2a0] MOV R9,qword ptr [RBP + -0x298] MOV R13,qword ptr [RBP + -0x290] MOV R12,qword ptr [RBP + -0x288] MOV R15,qword ptr [RBP + -0x280] MOV R14,qword ptr [RBP + -0x278] MOV RBX,qword ptr [RBP + -0x270] MOV R11,qword ptr [RBP + -0x268] MOV R10,qword ptr [RBP + -0x260] MOV RAX,qword ptr [RBP + -0x258] LEA RSI,[0x2557f3] MOV qword ptr [RSP],R13 MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x18],R14 MOV qword ptr [RSP + 0x20],RBX MOV qword ptr [RSP + 0x28],R11 MOV qword ptr [RSP + 0x30],R10 MOV qword ptr [RSP + 0x38],RAX MOV AL,0x2 CALL 0x0012a160 LAB_001f464a: JMP 0x001f464c LAB_001f464c: CALL 0x001f7f50 CALL 0x001f7cc0 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x4 CMP EAX,0x0 JNZ 0x001f466a JMP 0x001f4666 LAB_001f4666: JMP 0x001f4668 LAB_001f4668: JMP 0x001f466a LAB_001f466a: CALL 0x001fb850 LEA RAX,[0xd852b4] MOV EDI,dword ptr [RAX] CALL 0x0012a6e0 LEA RAX,[0xd84fec] MOV byte ptr [RAX],0x0 LEA RAX,[0xd845b0] MOV byte ptr [RAX],0x0 LAB_001f4691: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNZ 0x001f46b5 ADD RSP,0x308 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001f46b5: CALL 0x0012a250
void my_end(uint param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; bool bVar3; rusage local_2e8; int local_258; int local_254; uint local_250; bool local_249; FILE *local_248; uint local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_248 = *(FILE **)PTR_stderr_003befe0; bVar2 = local_248 != *(FILE **)PTR_stderr_003befe0; local_249 = bVar2; local_23c = param_1; if (my_init_done != '\0') { bVar3 = local_248 == (FILE *)0x0; if (bVar3) { local_248 = *(FILE **)PTR_stderr_003befe0; } bVar3 = !bVar3; local_249 = bVar3 && bVar2; if (((param_1 & 1) != 0) || (bVar3 && bVar2)) { local_254 = 0; local_258 = 0; for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) { if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) { if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) || (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) { local_258 = local_258 + 1; } else { local_254 = local_254 + 1; } } } if ((local_254 != 0) || (local_258 != 0)) { my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ((((local_23c & 2) != 0) || (local_249 != false)) && (iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) { fprintf(local_248, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) / DAT_0025a308, (double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) / DAT_0025a308,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt, local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock, local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw, local_2e8.ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
32,343
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O3
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0xb68eef(%rip), %r12 # 0xc09830 cmpb $0x0, (%r12) je 0xa0b17 movl %edi, %r14d movq 0x2e5652(%rip), %rax # 0x385fa8 movq (%rax), %rbx testb $0x1, %r14b je 0xa09ec leaq 0x2e71a6(%rip), %rax # 0x387b10 movl (%rax), %eax testq %rax, %rax je 0xa09aa leaq 0x2e71a0(%rip), %rcx # 0x387b18 movq (%rcx), %rdx shlq $0x4, %rax xorl %esi, %esi xorl %r8d, %r8d xorl %ecx, %ecx movl 0x8(%rdx,%rsi), %edi leal -0x3(%rdi), %r9d cmpl $0x2, %r9d jae 0xa0999 incl %r8d jmp 0xa099f testl %edi, %edi je 0xa099f incl %ecx addq $0x10, %rsi cmpq %rsi, %rax jne 0xa0986 jmp 0xa09af xorl %ecx, %ecx xorl %r8d, %r8d movl %ecx, %eax orl %r8d, %eax je 0xa09ec leaq 0x2e7663(%rip), %rax # 0x388020 movq 0x90(%rax), %rdx leaq -0x230(%rbp), %r15 movl $0x200, %esi # imm = 0x200 movq %r15, %rdi xorl %eax, %eax callq 0xd81da movl $0x4, %edx movl $0x13, %edi movq %r15, %rsi callq 0xa1550 callq 0x93920 callq 0x9f7b6 callq 0xa17ec testb $0x2, %r14b je 0xa0aeb leaq -0x230(%rbp), %rsi xorl %edi, %edi callq 0x298a0 testl %eax, %eax jne 0xa0aeb imulq $0x64, -0x230(%rbp), %rsi movabsq $0x346dc5d63886594b, %rcx # imm = 0x346DC5D63886594B movq %rcx, %rax imulq -0x228(%rbp) movq %rdx, %rax shrq $0x3f, %rax sarq $0xb, %rdx addq %rax, %rdx addq %rsi, %rdx cvtsi2sd %rdx, %xmm0 movsd 0x41c83(%rip), %xmm2 # 0xe26d8 divsd %xmm2, %xmm0 imulq $0x64, -0x220(%rbp), %rsi movq %rcx, %rax imulq -0x218(%rbp) movq %rdx, %rax shrq $0x3f, %rax sarq $0xb, %rdx addq %rax, %rdx addq %rsi, %rdx cvtsi2sd %rdx, %xmm1 divsd %xmm2, %xmm1 movq -0x210(%rbp), %rcx movq -0x200(%rbp), %r8 movq -0x1f0(%rbp), %r9 movups -0x1e8(%rbp), %xmm2 movups -0x1d8(%rbp), %xmm3 movups -0x1c8(%rbp), %xmm4 movups -0x1b8(%rbp), %xmm5 movq -0x1a8(%rbp), %rax movq %rax, 0x40(%rsp) movups %xmm5, 0x30(%rsp) movups %xmm4, 0x20(%rsp) movups %xmm3, 0x10(%rsp) movups %xmm2, (%rsp) leaq 0x3cef8(%rip), %rdx # 0xdd9d4 movq %rbx, %rdi movl $0x1, %esi movb $0x2, %al callq 0x291e0 callq 0xa3350 callq 0xa31e7 callq 0xa5750 leaq 0xb69a33(%rip), %rax # 0xc0a534 movl (%rax), %edi callq 0x29720 leaq 0xb6975d(%rip), %rax # 0xc0a26c xorl %ecx, %ecx movb %cl, (%rax) movb %cl, (%r12) movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0xa0b36 addq $0x260, %rsp # imm = 0x260 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_end: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 260h mov rax, fs:28h mov [rbp+var_28], rax lea r12, my_init_done cmp byte ptr [r12], 0 jz loc_A0B17 mov r14d, edi mov rax, cs:stderr_ptr mov rbx, [rax] test r14b, 1 jz loc_A09EC lea rax, my_file_limit mov eax, [rax] test rax, rax jz short loc_A09AA lea rcx, my_file_info mov rdx, [rcx] shl rax, 4 xor esi, esi xor r8d, r8d xor ecx, ecx loc_A0986: mov edi, [rdx+rsi+8] lea r9d, [rdi-3] cmp r9d, 2 jnb short loc_A0999 inc r8d jmp short loc_A099F loc_A0999: test edi, edi jz short loc_A099F inc ecx loc_A099F: add rsi, 10h cmp rax, rsi jnz short loc_A0986 jmp short loc_A09AF loc_A09AA: xor ecx, ecx xor r8d, r8d loc_A09AF: mov eax, ecx or eax, r8d jz short loc_A09EC lea rax, globerrs mov rdx, [rax+90h] lea r15, [rbp+var_230] mov esi, 200h mov rdi, r15 xor eax, eax call my_snprintf mov edx, 4 mov edi, 13h mov rsi, r15 call my_message_stderr loc_A09EC: call free_charsets call my_error_unregister_all call my_once_free test r14b, 2 jz loc_A0AEB lea rsi, [rbp+var_230] xor edi, edi call _getrusage test eax, eax jnz loc_A0AEB imul rsi, [rbp+var_230], 64h ; 'd' mov rcx, 346DC5D63886594Bh mov rax, rcx imul [rbp+var_228] mov rax, rdx shr rax, 3Fh sar rdx, 0Bh add rdx, rax add rdx, rsi cvtsi2sd xmm0, rdx movsd xmm2, cs:qword_E26D8 divsd xmm0, xmm2 imul rsi, [rbp+var_220], 64h ; 'd' mov rax, rcx imul [rbp+var_218] mov rax, rdx shr rax, 3Fh sar rdx, 0Bh add rdx, rax add rdx, rsi cvtsi2sd xmm1, rdx divsd xmm1, xmm2 mov rcx, [rbp+var_210] mov r8, [rbp+var_200] mov r9, [rbp+var_1F0] movups xmm2, [rbp+var_1E8] movups xmm3, [rbp+var_1D8] movups xmm4, [rbp+var_1C8] movups xmm5, [rbp+var_1B8] mov rax, [rbp+var_1A8] mov [rsp+280h+var_240], rax movups [rsp+280h+var_250], xmm5 movups [rsp+280h+var_260], xmm4 movups [rsp+280h+var_270], xmm3 movups [rsp+280h+var_280], xmm2 lea rdx, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov rdi, rbx mov esi, 1 mov al, 2 call ___fprintf_chk loc_A0AEB: call my_thread_end call my_thread_global_end call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists xor ecx, ecx mov [rax], cl mov [r12], cl loc_A0B17: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_A0B36 add rsp, 260h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A0B36: call ___stack_chk_fail
unsigned long long my_end(char a1, long long a2, long long a3, long long a4, long long a5, int a6) { long long v7; // rbx long long v8; // rsi int v9; // r8d int v10; // ecx int v11; // edi long long v13; // [rsp+50h] [rbp-230h] BYREF long long v14; // [rsp+58h] [rbp-228h] long long v15; // [rsp+60h] [rbp-220h] long long v16; // [rsp+68h] [rbp-218h] long long v17; // [rsp+70h] [rbp-210h] long long v18; // [rsp+80h] [rbp-200h] long long v19; // [rsp+90h] [rbp-1F0h] long long v20; // [rsp+98h] [rbp-1E8h] long long v21; // [rsp+A0h] [rbp-1E0h] long long v22; // [rsp+A8h] [rbp-1D8h] long long v23; // [rsp+B0h] [rbp-1D0h] long long v24; // [rsp+B8h] [rbp-1C8h] long long v25; // [rsp+C0h] [rbp-1C0h] long long v26; // [rsp+C8h] [rbp-1B8h] long long v27; // [rsp+D0h] [rbp-1B0h] long long v28; // [rsp+D8h] [rbp-1A8h] unsigned long long v29; // [rsp+258h] [rbp-28h] v29 = __readfsqword(0x28u); if ( my_init_done ) { v7 = stderr; if ( (a1 & 1) != 0 ) { if ( my_file_limit[0] ) { v8 = 0LL; v9 = 0; v10 = 0; do { v11 = *(_DWORD *)((char *)my_file_info + v8 + 8); a6 = v11 - 3; if ( (unsigned int)(v11 - 3) >= 2 ) { if ( v11 ) ++v10; } else { ++v9; } v8 += 16LL; } while ( 16LL * my_file_limit[0] != v8 ); } else { v10 = 0; v9 = 0; } if ( v9 | v10 ) { my_snprintf((unsigned int)&v13, 512, (unsigned int)globerrs[18], v10, v9, a6); my_message_stderr(19LL, &v13, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (a1 & 2) != 0 && !(unsigned int)getrusage(0LL, &v13) ) __fprintf_chk( v7, 1LL, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(100 * (int)v13 + (int)v14 / 10000) / 100.0, (double)(int)(100 * v15 + v16 / 10000) / 100.0, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R12,[0xd09830] CMP byte ptr [R12],0x0 JZ 0x001a0b17 MOV R14D,EDI MOV RAX,qword ptr [0x00485fa8] MOV RBX,qword ptr [RAX] TEST R14B,0x1 JZ 0x001a09ec LEA RAX,[0x487b10] MOV EAX,dword ptr [RAX] TEST RAX,RAX JZ 0x001a09aa LEA RCX,[0x487b18] MOV RDX,qword ptr [RCX] SHL RAX,0x4 XOR ESI,ESI XOR R8D,R8D XOR ECX,ECX LAB_001a0986: MOV EDI,dword ptr [RDX + RSI*0x1 + 0x8] LEA R9D,[RDI + -0x3] CMP R9D,0x2 JNC 0x001a0999 INC R8D JMP 0x001a099f LAB_001a0999: TEST EDI,EDI JZ 0x001a099f INC ECX LAB_001a099f: ADD RSI,0x10 CMP RAX,RSI JNZ 0x001a0986 JMP 0x001a09af LAB_001a09aa: XOR ECX,ECX XOR R8D,R8D LAB_001a09af: MOV EAX,ECX OR EAX,R8D JZ 0x001a09ec LEA RAX,[0x488020] MOV RDX,qword ptr [RAX + 0x90] LEA R15,[RBP + -0x230] MOV ESI,0x200 MOV RDI,R15 XOR EAX,EAX CALL 0x001d81da MOV EDX,0x4 MOV EDI,0x13 MOV RSI,R15 CALL 0x001a1550 LAB_001a09ec: CALL 0x00193920 CALL 0x0019f7b6 CALL 0x001a17ec TEST R14B,0x2 JZ 0x001a0aeb LEA RSI,[RBP + -0x230] XOR EDI,EDI CALL 0x001298a0 TEST EAX,EAX JNZ 0x001a0aeb IMUL RSI,qword ptr [RBP + -0x230],0x64 MOV RCX,0x346dc5d63886594b MOV RAX,RCX IMUL qword ptr [RBP + -0x228] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0xb ADD RDX,RAX ADD RDX,RSI CVTSI2SD XMM0,RDX MOVSD XMM2,qword ptr [0x001e26d8] DIVSD XMM0,XMM2 IMUL RSI,qword ptr [RBP + -0x220],0x64 MOV RAX,RCX IMUL qword ptr [RBP + -0x218] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0xb ADD RDX,RAX ADD RDX,RSI CVTSI2SD XMM1,RDX DIVSD XMM1,XMM2 MOV RCX,qword ptr [RBP + -0x210] MOV R8,qword ptr [RBP + -0x200] MOV R9,qword ptr [RBP + -0x1f0] MOVUPS XMM2,xmmword ptr [RBP + -0x1e8] MOVUPS XMM3,xmmword ptr [RBP + -0x1d8] MOVUPS XMM4,xmmword ptr [RBP + -0x1c8] MOVUPS XMM5,xmmword ptr [RBP + -0x1b8] MOV RAX,qword ptr [RBP + -0x1a8] MOV qword ptr [RSP + 0x40],RAX MOVUPS xmmword ptr [RSP + 0x30],XMM5 MOVUPS xmmword ptr [RSP + 0x20],XMM4 MOVUPS xmmword ptr [RSP + 0x10],XMM3 MOVUPS xmmword ptr [RSP],XMM2 LEA RDX,[0x1dd9d4] MOV RDI,RBX MOV ESI,0x1 MOV AL,0x2 CALL 0x001291e0 LAB_001a0aeb: CALL 0x001a3350 CALL 0x001a31e7 CALL 0x001a5750 LEA RAX,[0xd0a534] MOV EDI,dword ptr [RAX] CALL 0x00129720 LEA RAX,[0xd0a26c] XOR ECX,ECX MOV byte ptr [RAX],CL MOV byte ptr [R12],CL LAB_001a0b17: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x001a0b36 ADD RSP,0x260 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a0b36: CALL 0x00129250
void my_end(ulong param_1) { int8 uVar1; int iVar2; long lVar3; int iVar4; long in_FS_OFFSET; rusage local_238 [3]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if (my_init_done != '\0') { uVar1 = *(int8 *)PTR_stderr_00485fa8; if ((param_1 & 1) != 0) { if ((ulong)my_file_limit == 0) { iVar2 = 0; iVar4 = 0; } else { lVar3 = 0; iVar4 = 0; iVar2 = 0; do { if (*(int *)(my_file_info + lVar3 + 8) - 3U < 2) { iVar4 = iVar4 + 1; } else if (*(int *)(my_file_info + lVar3 + 8) != 0) { iVar2 = iVar2 + 1; } lVar3 = lVar3 + 0x10; } while ((ulong)my_file_limit << 4 != lVar3); } if (iVar2 != 0 || iVar4 != 0) { my_snprintf(local_238,0x200,globerrs._144_8_); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if (((param_1 & 2) != 0) && (iVar2 = getrusage(RUSAGE_SELF,local_238), iVar2 == 0)) { __fprintf_chk((double)(local_238[0].ru_utime.tv_usec / 10000 + local_238[0].ru_utime.tv_sec * 100) / DAT_001e26d8, (double)(local_238[0].ru_stime.tv_usec / 10000 + local_238[0].ru_stime.tv_sec * 100) / DAT_001e26d8,uVar1,1, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,local_238[0].ru_maxrss,local_238[0].ru_idrss,local_238[0].ru_minflt, (int4)local_238[0].ru_majflt,(int4)local_238[0].ru_nswap, (int4)local_238[0].ru_inblock,(int4)local_238[0].ru_oublock, (int4)local_238[0].ru_msgsnd,(int4)local_238[0].ru_msgrcv, (int4)local_238[0].ru_nsignals,(int4)local_238[0].ru_nvcsw, local_238[0].ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
32,344
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; }
O2
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 0x8e244 movb %r14b, 0x20(%rbx) leaq 0x30(%rbx), %rax andl $0x0, 0x30(%rbx) andq $0x0, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) andq $0x0, 0x50(%rbx) leaq 0x28(%rbx), %r14 leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) pushq $0x1 popq %rax 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) testl %ebp, %ebp je 0x8dc6d leaq 0x2bcd4(%rip), %rsi # 0xb9930 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x27d88 jmp 0x8dc7e leaq 0x725ec(%rip), %rsi # 0x100260 leaq 0x8(%rsp), %rdi callq 0x23c10 leaq 0x2bece(%rip), %rsi # 0xb9b53 leaq 0x28(%rsp), %rdi leaq 0x6(%rsp), %rdx callq 0x27d88 leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x8e28a leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x234e0 leaq 0x28(%rsp), %rdi callq 0x241c8 leaq 0x8(%rsp), %rdi callq 0x241c8 testb %bpl, %bpl addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0x8dceb movq %rax, %r15 jmp 0x8dcf5 movq %rax, %r15 leaq 0x28(%rsp), %rdi callq 0x241c8 leaq 0x8(%rsp), %rdi callq 0x241c8 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 testb %bpl, %bpl leaq 0xe0(%rbx), %rdi leaq 0xc8(%rbx), %rbp callq 0x27dc4 movq %rbp, %rdi callq 0x27dc4 movq %r13, %rdi callq 0x5d9d0 movq %r12, %rdi callq 0x8e6d8 movq %r14, %rdi callq 0x8e796 movq %rbx, %rdi callq 0x49072 movq %r15, %rdi callq 0x23f80
_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 rax, [rbx+30h] and dword ptr [rbx+30h], 0 and qword ptr [rbx+38h], 0 mov [rbx+40h], rax mov [rbx+48h], rax and qword ptr [rbx+50h], 0 lea r14, [rbx+28h] lea rax, [rbx+88h] mov [rbx+58h], rax push 1 pop rax 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 test ebp, ebp jz short loc_8DC6D lea rsi, asc_B9930; "\" \"?" lea rdi, [rsp+78h+var_70] lea rdx, [rsp+78h+var_71] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_8DC7E loc_8DC6D: lea rsi, _ZL10SPACE_RULEB5cxx11; SPACE_RULE lea rdi, [rsp+78h+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) loc_8DC7E: lea rsi, aSpace+7; "space" lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_72] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) 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&) lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_8DCEB mov r15, rax jmp short loc_8DCF5 mov r15, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8DCEB: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8DCF5: lea r12, [rbx+58h] lea r13, [rbx+90h] test bpl, bpl lea rdi, [rbx+0E0h] lea rbp, [rbx+0C8h] 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 rdi, rbx; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r15 call __Unwind_Resume
void SchemaConverter::SchemaConverter(long long a1, long long a2, char a3, int a4) { long long v6; // rax _QWORD v7[4]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[10]; // [rsp+28h] [rbp-50h] 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; if ( a4 ) std::string::basic_string<std::allocator<char>>(v7, (long long)"\" \"?"); else std::string::basic_string(v7, &SPACE_RULE[abi:cxx11]); std::string::basic_string<std::allocator<char>>(v8, (long long)"space"); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v8); std::string::_M_assign(v6, v7); std::string::~string(v8); std::string::~string(v7); }
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 0x0018e244 MOV byte ptr [RBX + 0x20],R14B LEA RAX,[RBX + 0x30] AND dword ptr [RBX + 0x30],0x0 AND qword ptr [RBX + 0x38],0x0 MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX AND qword ptr [RBX + 0x50],0x0 LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX PUSH 0x1 POP RAX 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 TEST EBP,EBP JZ 0x0018dc6d LAB_0018dc55: LEA RSI,[0x1b9930] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00127d88 JMP 0x0018dc7e LAB_0018dc6d: LEA RSI,[0x200260] LEA RDI,[RSP + 0x8] CALL 0x00123c10 LAB_0018dc7e: LEA RSI,[0x1b9b53] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x6] CALL 0x00127d88 LAB_0018dc94: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x0018e28a LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x001234e0 LAB_0018dcae: LEA RDI,[RSP + 0x28] CALL 0x001241c8 LEA RDI,[RSP + 0x8] CALL 0x001241c8 TEST BPL,BPL 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; allocator local_72; allocator local_71; string local_70 [32]; string local_50 [32]; 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; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::string(local_70,(string *)SPACE_RULE_abi_cxx11_); } else { /* try { // try from 0018dc55 to 0018dc7d has its CatchHandler @ 0018dcd9 */ std::__cxx11::string::string<std::allocator<char>>(local_70,"\" \"?",&local_71); } /* try { // try from 0018dc7e to 0018dc93 has its CatchHandler @ 0018dcd4 */ std::__cxx11::string::string<std::allocator<char>>(local_50,"space",&local_72); /* try { // try from 0018dc94 to 0018dcad has its CatchHandler @ 0018dcde */ 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[]((string *)(this + 0x28)); std::__cxx11::string::_M_assign(psVar1); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_70); return; }
32,345
lf_dynarray_value
eloqsql/mysys/lf_dynarray.c
void *lf_dynarray_value(LF_DYNARRAY *array, uint idx) { void * ptr, * volatile * ptr_ptr= 0; int i; for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) /* no-op */; ptr_ptr= &array->level[i]; idx-= dynarray_idxes_in_prev_levels[i]; for (; i > 0; i--) { if (!(ptr= *ptr_ptr)) return(NULL); ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; idx %= dynarray_idxes_in_prev_level[i]; } if (!(ptr= *ptr_ptr)) return(NULL); return ((uchar*)ptr) + array->size_of_element * idx; }
O0
c
lf_dynarray_value: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq $0x0, -0x28(%rbp) movl $0x3, -0x2c(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rdx leaq 0x57a88(%rip), %rcx # 0xb4070 cmpq (%rcx,%rdx,8), %rax jae 0x5c5fb jmp 0x5c5f0 movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x5c5da movq -0x10(%rbp), %rax movslq -0x2c(%rbp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x57a57(%rip), %rax # 0xb4070 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax subq %rcx, %rax movl %eax, -0x14(%rbp) cmpl $0x0, -0x2c(%rbp) jle 0x5c69f movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5c64a movq $0x0, -0x8(%rbp) jmp 0x5c6d2 movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rsi leaq 0x57a30(%rip), %rcx # 0xb4090 xorl %edx, %edx divq (%rcx,%rsi,8) movq %rax, %rcx movq -0x38(%rbp), %rax shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x57a0d(%rip), %rax # 0xb4090 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x14(%rbp) movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x5c626 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5c6ba movq $0x0, -0x8(%rbp) jmp 0x5c6d2 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx imull -0x14(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
lf_dynarray_value: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_28], 0 mov [rbp+var_2C], 3 loc_5C5DA: mov eax, [rbp+var_14] movsxd rdx, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_levels cmp rax, [rcx+rdx*8] jnb short loc_5C5FB jmp short $+2 loc_5C5F0: mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_5C5DA loc_5C5FB: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_2C] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_levels mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] sub rax, rcx mov [rbp+var_14], eax loc_5C626: cmp [rbp+var_2C], 0 jle short loc_5C69F mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz short loc_5C64A mov [rbp+var_8], 0 jmp loc_5C6D2 loc_5C64A: mov rax, [rbp+var_20] mov [rbp+var_38], rax mov eax, [rbp+var_14] movsxd rsi, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_level xor edx, edx div qword ptr [rcx+rsi*8] mov rcx, rax mov rax, [rbp+var_38] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_level mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] xor edx, edx div rcx mov eax, edx mov [rbp+var_14], eax mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_5C626 loc_5C69F: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz short loc_5C6BA mov [rbp+var_8], 0 jmp short loc_5C6D2 loc_5C6BA: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] imul ecx, [rbp+var_14] mov ecx, ecx add rax, rcx mov [rbp+var_8], rax loc_5C6D2: mov rax, [rbp+var_8] pop rbp retn
long long lf_dynarray_value(long long a1, unsigned int a2) { int i; // [rsp+Ch] [rbp-2Ch] _QWORD *v4; // [rsp+10h] [rbp-28h] unsigned int v5; // [rsp+24h] [rbp-14h] for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i ) ; v4 = (_QWORD *)(8LL * i + a1); v5 = a2 - dynarray_idxes_in_prev_levels[i]; while ( i > 0 ) { if ( !*v4 ) return 0LL; v4 = (_QWORD *)(8 * ((unsigned long long)v5 / dynarray_idxes_in_prev_level[i]) + *v4); v5 = (unsigned long long)v5 % dynarray_idxes_in_prev_level[i--]; } if ( *v4 ) return v5 * *(_DWORD *)(a1 + 32) + *v4; else return 0LL; }
lf_dynarray_value: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x2c],0x3 LAB_0015c5da: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,dword ptr [RBP + -0x2c] LEA RCX,[0x1b4070] CMP RAX,qword ptr [RCX + RDX*0x8] JNC 0x0015c5fb JMP 0x0015c5f0 LAB_0015c5f0: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0015c5da LAB_0015c5fb: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x2c] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x1b4070] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] SUB RAX,RCX MOV dword ptr [RBP + -0x14],EAX LAB_0015c626: CMP dword ptr [RBP + -0x2c],0x0 JLE 0x0015c69f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015c64a MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015c6d2 LAB_0015c64a: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x14] MOVSXD RSI,dword ptr [RBP + -0x2c] LEA RCX,[0x1b4090] XOR EDX,EDX DIV qword ptr [RCX + RSI*0x8] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x1b4090] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0015c626 LAB_0015c69f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015c6ba MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015c6d2 LAB_0015c6ba: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] IMUL ECX,dword ptr [RBP + -0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0015c6d2: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long lf_dynarray_value(long param_1,uint param_2) { int local_34; long *local_30; uint local_1c; long local_10; local_34 = 3; while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) { local_34 = local_34 + -1; } local_30 = (long *)(param_1 + (long)local_34 * 8); local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8); while( true ) { if (local_34 < 1) { if (*local_30 == 0) { local_10 = 0; } else { local_10 = *local_30 + (ulong)(*(int *)(param_1 + 0x20) * local_1c); } return local_10; } if (*local_30 == 0) break; local_30 = (long *)(*local_30 + ((ulong)local_1c / *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8); local_1c = (uint)((ulong)local_1c % *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)); local_34 = local_34 + -1; } return 0; }
32,346
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 0x55960 jmp 0x55962 jmp 0x55964 jmp 0x55966 jmp 0x55968 jmp 0x5596a movq -0x10(%rbp), %rdi callq 0x52e30 cmpb $0x0, %al je 0x55985 jmp 0x55979 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x55a65 movq -0x10(%rbp), %rax leaq 0xc24950(%rip), %rcx # 0xc7a2e0 cmpq %rcx, 0x2018(%rax) jne 0x559b4 jmp 0x5599b jmp 0x5599d movq -0x18(%rbp), %rax movq $0x0, (%rax) movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x55a65 jmp 0x559b6 jmp 0x559b8 jmp 0x559ba movq -0x10(%rbp), %rax movq 0x2018(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2028(%rcx), %ecx movzbl (%rax,%rcx), %edi callq 0x52dd0 movb %al, %cl xorl %eax, %eax cmpb $0x0, %cl movb %al, -0x1d(%rbp) jne 0x55a08 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 0x5596a movq -0x10(%rbp), %rax movq 0x2018(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2028(%rcx), %ecx movzbl (%rax,%rcx), %eax cmpl $0xff, %eax jne 0x55a4b jmp 0x55a35 jmp 0x55a37 movq -0x18(%rbp), %rax movq $0x0, (%rax) movl $0xfffffffe, -0x1c(%rbp) # imm = 0xFFFFFFFE jmp 0x55a5d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x55880 movl %eax, -0x1c(%rbp) jmp 0x55a5f 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_55960: jmp short $+2 loc_55962: jmp short $+2 loc_55964: jmp short $+2 loc_55966: jmp short $+2 loc_55968: jmp short $+2 loc_5596A: mov rdi, [rbp+var_10] call translog_get_next_chunk cmp al, 0 jz short loc_55985 jmp short $+2 loc_55979: mov [rbp+var_4], 0FFFFFFFFh jmp loc_55A65 loc_55985: mov rax, [rbp+var_10] lea rcx, end_of_log cmp [rax+2018h], rcx jnz short loc_559B4 jmp short $+2 loc_5599B: jmp short $+2 loc_5599D: mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov [rbp+var_4], 0FFFFFFFEh jmp loc_55A65 loc_559B4: jmp short $+2 loc_559B6: jmp short $+2 loc_559B8: jmp short $+2 loc_559BA: 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_55A08 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_55A08: mov al, [rbp+var_1D] test al, 1 jnz loc_5596A 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_55A4B jmp short $+2 loc_55A35: jmp short $+2 loc_55A37: mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov [rbp+var_1C], 0FFFFFFFEh jmp short loc_55A5D loc_55A4B: 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_55A5D: jmp short $+2 loc_55A5F: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_55A65: 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 0x00155960 LAB_00155960: JMP 0x00155962 LAB_00155962: JMP 0x00155964 LAB_00155964: JMP 0x00155966 LAB_00155966: JMP 0x00155968 LAB_00155968: JMP 0x0015596a LAB_0015596a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00152e30 CMP AL,0x0 JZ 0x00155985 JMP 0x00155979 LAB_00155979: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00155a65 LAB_00155985: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0xd7a2e0] CMP qword ptr [RAX + 0x2018],RCX JNZ 0x001559b4 JMP 0x0015599b LAB_0015599b: JMP 0x0015599d LAB_0015599d: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00155a65 LAB_001559b4: JMP 0x001559b6 LAB_001559b6: JMP 0x001559b8 LAB_001559b8: JMP 0x001559ba LAB_001559ba: 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 0x00152dd0 MOV CL,AL XOR EAX,EAX CMP CL,0x0 MOV byte ptr [RBP + -0x1d],AL JNZ 0x00155a08 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_00155a08: MOV AL,byte ptr [RBP + -0x1d] TEST AL,0x1 JNZ 0x0015596a 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 0x00155a4b JMP 0x00155a35 LAB_00155a35: JMP 0x00155a37 LAB_00155a37: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x1c],0xfffffffe JMP 0x00155a5d LAB_00155a4b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x00155880 MOV dword ptr [RBP + -0x1c],EAX LAB_00155a5d: JMP 0x00155a5f LAB_00155a5f: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_00155a65: 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; }
32,347
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 0xbb31e3(%rip), %r15 # 0xbff6e0 movq %r14, %rdi callq 0x4ac0e testb %al, %al jne 0x4c5a3 movq 0x2018(%r14), %rax cmpq %r15, %rax je 0x4c595 movl 0x2028(%r14), %ecx movzbl (%rax,%rcx), %eax movl %eax, %ecx andl $-0x40, %ecx cmpl $0x40, %ecx je 0x4c54a testl %ecx, %ecx sete %cl movl %eax, %edx notl %edx testb $0x3f, %dl setne %dl testb %dl, %cl jne 0x4c54a cmpl $0xff, %eax jne 0x4c4fd jmp 0x4c595 cmpl $0xff, %eax je 0x4c595 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 0x4bf4c movq $0x0, (%rbx) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE jmp 0x4c5a8 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_4C4FD: mov rdi, r14 call translog_get_next_chunk test al, al jnz loc_4C5A3 mov rax, [r14+2018h] cmp rax, r15 jz short loc_4C595 mov ecx, [r14+2028h] movzx eax, byte ptr [rax+rcx] mov ecx, eax and ecx, 0FFFFFFC0h cmp ecx, 40h ; '@' jz short loc_4C54A test ecx, ecx setz cl mov edx, eax not edx test dl, 3Fh setnz dl test cl, dl jnz short loc_4C54A cmp eax, 0FFh jnz short loc_4C4FD jmp short loc_4C595 loc_4C54A: cmp eax, 0FFh jz short loc_4C595 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_4C595: mov qword ptr [rbx], 0 mov eax, 0FFFFFFFEh jmp short loc_4C5A8 loc_4C5A3: mov eax, 0FFFFFFFFh loc_4C5A8: 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,[0xcff6e0] LAB_0014c4fd: MOV RDI,R14 CALL 0x0014ac0e TEST AL,AL JNZ 0x0014c5a3 MOV RAX,qword ptr [R14 + 0x2018] CMP RAX,R15 JZ 0x0014c595 MOV ECX,dword ptr [R14 + 0x2028] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV ECX,EAX AND ECX,0xffffffc0 CMP ECX,0x40 JZ 0x0014c54a TEST ECX,ECX SETZ CL MOV EDX,EAX NOT EDX TEST DL,0x3f SETNZ DL TEST CL,DL JNZ 0x0014c54a CMP EAX,0xff JNZ 0x0014c4fd JMP 0x0014c595 LAB_0014c54a: CMP EAX,0xff JZ 0x0014c595 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 0x0014bf4c LAB_0014c595: MOV qword ptr [RBX],0x0 MOV EAX,0xfffffffe JMP 0x0014c5a8 LAB_0014c5a3: MOV EAX,0xffffffff LAB_0014c5a8: 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_0014c595; bVar1 = (*(int1 **)(param_1 + 0x2018))[*(uint *)(param_1 + 0x2028)]; if (((bVar1 & 0xc0) == 0x40) || ((bVar1 & 0xc0) == 0 && (~bVar1 & 0x3f) != 0)) break; if (bVar1 == 0xff) { LAB_0014c595: *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_0014c595; }
32,348
my_strntol_8bit
eloqsql/strings/ctype-simple.c
long my_strntol_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; register uchar c; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for ( ; s<e && my_isspace(cs, *s) ; s++); if (s == e) { goto noconv; } /* Check for a sign. */ if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for (c = *s; s != e; c = *++s) { if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (negative) { if (i > (uint32) INT_MIN32) overflow = 1; } else if (i > INT_MAX32) overflow = 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntol_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x70543 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x70543 incq %r10 cmpq %r11, %r10 jb 0x70530 cmpq %r11, %r10 je 0x70648 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl %ecx xorl %ebx, %ebx cmpq %r11, %r10 je 0x705f4 movq %rdi, -0x30(%rbp) xorl %r12d, %r12d movq %r10, %r14 xorl %r13d, %r13d movl %r13d, %ebx movl %r12d, %r15d movb (%r14), %r12b leal -0x30(%r12), %edi cmpb $0xa, %dil jb 0x705b2 leal -0x41(%r12), %edi cmpb $0x19, %dil ja 0x705a0 addb $-0x37, %r12b jmp 0x705af leal -0x61(%r12), %edi cmpb $0x19, %dil ja 0x705ee addb $-0x57, %r12b movl %r12d, %edi movzbl %dil, %edi cmpl %ecx, %edi jge 0x705ee movl $0x1, %r12d cmpl %eax, %ebx jbe 0x705c9 movl %ebx, %r13d jmp 0x705dd jne 0x705d2 movl %eax, %r13d cmpl %edi, %edx jb 0x705dd imull %ecx, %ebx addl %edi, %ebx movl %ebx, %r13d movl %r15d, %r12d incq %r14 cmpq %r11, %r14 jne 0x7057b movl %r13d, %ebx movq %r11, %r14 movl %r12d, %r15d movq -0x30(%rbp), %rdi jmp 0x705fa movq %r11, %r14 xorl %r15d, %r15d cmpq %r10, %r14 je 0x70648 testq %r8, %r8 je 0x70607 movq %r14, (%r8) cmpl $0x80000001, %ebx # imm = 0x80000001 movl $0x1, %eax movl %r15d, %ecx cmovael %eax, %ecx testl %ebx, %ebx cmovsl %eax, %r15d cmpb $0x2d, %dil cmovel %ecx, %r15d testl %r15d, %r15d je 0x70664 cmpb $0x2d, %dil movl $0x22, (%r9) movq $-0x80000000, %rcx # imm = 0x80000000 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmoveq %rcx, %rax jmp 0x70659 movl $0x21, (%r9) testq %r8, %r8 je 0x70657 movq %rsi, (%r8) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %ebx, %ecx movq %rcx, %rax negq %rax cmpb $0x2d, %dil cmovneq %rcx, %rax jmp 0x70659
my_strntol_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_70543 mov rax, [rdi+40h] mov r10, rsi loc_70530: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_70543 inc r10 cmp r10, r11 jb short loc_70530 loc_70543: cmp r10, r11 jz loc_70648 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 mov eax, 0FFFFFFFFh xor edx, edx div ecx xor ebx, ebx cmp r10, r11 jz loc_705F4 mov [rbp+var_30], rdi xor r12d, r12d mov r14, r10 xor r13d, r13d loc_7057B: mov ebx, r13d mov r15d, r12d mov r12b, [r14] lea edi, [r12-30h] cmp dil, 0Ah jb short loc_705B2 lea edi, [r12-41h] cmp dil, 19h ja short loc_705A0 add r12b, 0C9h jmp short loc_705AF loc_705A0: lea edi, [r12-61h] cmp dil, 19h ja short loc_705EE add r12b, 0A9h loc_705AF: mov edi, r12d loc_705B2: movzx edi, dil cmp edi, ecx jge short loc_705EE mov r12d, 1 cmp ebx, eax jbe short loc_705C9 mov r13d, ebx jmp short loc_705DD loc_705C9: jnz short loc_705D2 mov r13d, eax cmp edx, edi jb short loc_705DD loc_705D2: imul ebx, ecx add ebx, edi mov r13d, ebx mov r12d, r15d loc_705DD: inc r14 cmp r14, r11 jnz short loc_7057B mov ebx, r13d mov r14, r11 mov r15d, r12d loc_705EE: mov rdi, [rbp+var_30] jmp short loc_705FA loc_705F4: mov r14, r11 xor r15d, r15d loc_705FA: cmp r14, r10 jz short loc_70648 test r8, r8 jz short loc_70607 mov [r8], r14 loc_70607: cmp ebx, 80000001h mov eax, 1 mov ecx, r15d cmovnb ecx, eax test ebx, ebx cmovs r15d, eax cmp dil, 2Dh ; '-' cmovz r15d, ecx test r15d, r15d jz short loc_70664 cmp dil, 2Dh ; '-' mov dword ptr [r9], 22h ; '"' mov rcx, 0FFFFFFFF80000000h mov eax, 7FFFFFFFh cmovz rax, rcx jmp short loc_70659 loc_70648: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_70657 mov [r8], rsi loc_70657: xor eax, eax loc_70659: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_70664: mov ecx, ebx mov rax, rcx neg rax cmp dil, 2Dh ; '-' cmovnz rax, rcx jmp short loc_70659
long long my_strntol_8bit( long long a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned int v10; // eax unsigned int v11; // ebx int v12; // r12d unsigned __int8 *v13; // r14 unsigned int v14; // r13d int v15; // r15d unsigned __int8 v16; // r12 unsigned __int8 v17; // di unsigned __int8 v18; // r12 int v19; // ecx long long result; // rax unsigned __int8 v21; // [rsp+0h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_36; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFF / a4; v11 = 0; if ( v9 == v6 ) { v13 = &a2[a3]; v15 = 0; } else { v21 = v8; v12 = 0; v13 = v9; v14 = 0; while ( 1 ) { v11 = v14; v15 = v12; v16 = *v13; v17 = *v13 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= (int)a4 ) break; v12 = 1; if ( v14 <= v10 ) { if ( v14 != v10 || (v14 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) ) { v14 = v17 + a4 * v11; v12 = v15; } } if ( ++v13 == v6 ) { v11 = v14; v13 = &a2[a3]; v15 = v12; break; } } v8 = v21; } if ( v13 == v9 ) { LABEL_36: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v13; v19 = v15; if ( v11 >= 0x80000001 ) v19 = 1; if ( (v11 & 0x80000000) != 0 ) v15 = 1; if ( v8 == 45 ) v15 = v19; if ( v15 ) { *a6 = 34; result = 0x7FFFFFFFLL; if ( v8 == 45 ) return 0xFFFFFFFF80000000LL; } else { result = -(long long)v11; if ( v8 != 45 ) return v11; } } return result; }
my_strntol_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x00170543 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_00170530: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x00170543 INC R10 CMP R10,R11 JC 0x00170530 LAB_00170543: CMP R10,R11 JZ 0x00170648 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOV EAX,0xffffffff XOR EDX,EDX DIV ECX XOR EBX,EBX CMP R10,R11 JZ 0x001705f4 MOV qword ptr [RBP + -0x30],RDI XOR R12D,R12D MOV R14,R10 XOR R13D,R13D LAB_0017057b: MOV EBX,R13D MOV R15D,R12D MOV R12B,byte ptr [R14] LEA EDI,[R12 + -0x30] CMP DIL,0xa JC 0x001705b2 LEA EDI,[R12 + -0x41] CMP DIL,0x19 JA 0x001705a0 ADD R12B,0xc9 JMP 0x001705af LAB_001705a0: LEA EDI,[R12 + -0x61] CMP DIL,0x19 JA 0x001705ee ADD R12B,0xa9 LAB_001705af: MOV EDI,R12D LAB_001705b2: MOVZX EDI,DIL CMP EDI,ECX JGE 0x001705ee MOV R12D,0x1 CMP EBX,EAX JBE 0x001705c9 MOV R13D,EBX JMP 0x001705dd LAB_001705c9: JNZ 0x001705d2 MOV R13D,EAX CMP EDX,EDI JC 0x001705dd LAB_001705d2: IMUL EBX,ECX ADD EBX,EDI MOV R13D,EBX MOV R12D,R15D LAB_001705dd: INC R14 CMP R14,R11 JNZ 0x0017057b MOV EBX,R13D MOV R14,R11 MOV R15D,R12D LAB_001705ee: MOV RDI,qword ptr [RBP + -0x30] JMP 0x001705fa LAB_001705f4: MOV R14,R11 XOR R15D,R15D LAB_001705fa: CMP R14,R10 JZ 0x00170648 TEST R8,R8 JZ 0x00170607 MOV qword ptr [R8],R14 LAB_00170607: CMP EBX,0x80000001 MOV EAX,0x1 MOV ECX,R15D CMOVNC ECX,EAX TEST EBX,EBX CMOVS R15D,EAX CMP DIL,0x2d CMOVZ R15D,ECX TEST R15D,R15D JZ 0x00170664 CMP DIL,0x2d MOV dword ptr [R9],0x22 MOV RCX,-0x80000000 MOV EAX,0x7fffffff CMOVZ RAX,RCX JMP 0x00170659 LAB_00170648: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x00170657 MOV qword ptr [R8],RSI LAB_00170657: XOR EAX,EAX LAB_00170659: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00170664: MOV ECX,EBX MOV RAX,RCX NEG RAX CMP DIL,0x2d CMOVNZ RAX,RCX JMP 0x00170659
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5, int4 *param_6) { byte *pbVar1; byte bVar2; byte bVar3; bool bVar4; bool bVar5; uint uVar6; uint uVar7; byte *pbVar8; byte bVar9; uint uVar10; byte *pbVar11; byte *pbVar12; *param_6 = 0; pbVar1 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar1); } if (pbVar8 != pbVar1) { bVar2 = *pbVar8; pbVar8 = pbVar8 + ((bVar2 - 0x2b & 0xfd) == 0); uVar10 = 0; if (pbVar8 == pbVar1) { bVar4 = false; pbVar12 = pbVar1; } else { bVar4 = false; uVar10 = 0; pbVar11 = pbVar8; do { bVar3 = *pbVar11; bVar9 = bVar3 - 0x30; pbVar12 = pbVar11; if (9 < bVar9) { if ((byte)(bVar3 + 0xbf) < 0x1a) { bVar9 = bVar3 - 0x37; } else { if (0x19 < (byte)(bVar3 + 0x9f)) break; bVar9 = bVar3 + 0xa9; } } if ((int)param_4 <= (int)(uint)bVar9) break; uVar7 = (uint)(0xffffffff / (ulong)param_4); uVar6 = uVar10; bVar5 = true; if ((uVar10 <= uVar7) && ((uVar10 != uVar7 || (uVar6 = uVar7, (uint)bVar9 <= (uint)(0xffffffff % (ulong)param_4))) )) { uVar6 = uVar10 * param_4 + (uint)bVar9; bVar5 = bVar4; } bVar4 = bVar5; uVar10 = uVar6; pbVar11 = pbVar11 + 1; pbVar12 = pbVar1; } while (pbVar11 != pbVar1); } if (pbVar12 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar12; } bVar5 = bVar4; if (0x80000000 < uVar10) { bVar5 = true; } if ((int)uVar10 < 0) { bVar4 = true; } if (bVar2 == 0x2d) { bVar4 = bVar5; } if (bVar4) { *param_6 = 0x22; if (bVar2 != 0x2d) { return 0x7fffffff; } return 0xffffffff80000000; } if (bVar2 == 0x2d) { return -(ulong)uVar10; } return (ulong)uVar10; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
32,349
JS_ReadObjectTag
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadObjectTag(BCReaderState *s) { JSContext *ctx = s->ctx; JSValue obj; uint32_t prop_count, i; JSAtom atom; JSValue val; int ret; obj = JS_NewObject(ctx); if (BC_add_object_ref(s, obj)) goto fail; if (bc_get_leb128(s, &prop_count)) goto fail; for(i = 0; i < prop_count; i++) { if (bc_get_atom(s, &atom)) goto fail; #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { bc_read_trace(s, "propname: "); print_atom(s->ctx, atom); printf("\n"); } #endif val = JS_ReadObjectRec(s); if (JS_IsException(val)) { JS_FreeAtom(ctx, atom); goto fail; } ret = JS_DefinePropertyValue(ctx, obj, atom, val, JS_PROP_C_W_E); JS_FreeAtom(ctx, atom); if (ret < 0) goto fail; } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
JS_ReadObjectTag: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r12 movq (%rdi), %r15 movq 0x40(%r15), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r15, %rdi movl $0x1, %ecx callq 0x21651 movq %rax, %rbx movq %rdx, %r13 movq %r12, %rdi movq %rax, %rsi callq 0x48ca0 testl %eax, %eax jne 0x481b4 leaq 0xc(%rsp), %rsi movq %r12, %rdi callq 0x4760c testl %eax, %eax je 0x481f2 movl $0x6, %r12d cmpl $-0x9, %r13d jb 0x481db movq 0x18(%r15), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x481db movq %rbx, %rsi movq %r13, %rdx callq 0x219cc xorl %ebx, %ebx movq %rbx, %rax movq %r12, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc(%rsp), %r14d testl %r14d, %r14d je 0x4826d movq %r12, 0x10(%rsp) movq %r12, %rdi leaq 0x8(%rsp), %rsi callq 0x48ac5 testl %eax, %eax jne 0x481b4 movq %r12, %rdi callq 0x33970 movq %rdx, %r9 cmpl $0x6, %r9d je 0x48275 movl 0x8(%rsp), %ebp movl $0x7, (%rsp) movq %r15, %rdi movq %rbx, %rsi movq %r13, %rdx movl %ebp, %ecx movq %rax, %r8 callq 0x2717d movq %rbx, %r12 movq %r13, %rbx movl %eax, %r13d movq %r15, %rdi movl %ebp, %esi callq 0x20f31 testl %r13d, %r13d movq %rbx, %r13 movq %r12, %rbx movq 0x10(%rsp), %r12 js 0x481b4 decl %r14d jne 0x48201 movq %r13, %r12 jmp 0x481dd movl 0x8(%rsp), %esi movq %r15, %rdi callq 0x20f31 jmp 0x481b4
JS_ReadObjectTag: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdi mov r15, [rdi] mov rax, [r15+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r15 mov ecx, 1 call JS_NewObjectProtoClass mov rbx, rax mov r13, rdx mov rdi, r12 mov rsi, rax call BC_add_object_ref1 test eax, eax jnz short loc_481B4 lea rsi, [rsp+48h+var_3C] mov rdi, r12 call bc_get_leb128 test eax, eax jz short loc_481F2 loc_481B4: mov r12d, 6 cmp r13d, 0FFFFFFF7h jb short loc_481DB mov rdi, [r15+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_481DB mov rsi, rbx mov rdx, r13 call js_free_value_rt loc_481DB: xor ebx, ebx loc_481DD: mov rax, rbx mov rdx, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_481F2: mov r14d, [rsp+48h+var_3C] test r14d, r14d jz short loc_4826D mov [rsp+48h+var_38], r12 loc_48201: mov rdi, r12 lea rsi, [rsp+48h+var_40] call bc_get_atom test eax, eax jnz short loc_481B4 mov rdi, r12 call JS_ReadObjectRec mov r9, rdx cmp r9d, 6 jz short loc_48275 mov ebp, [rsp+48h+var_40] mov [rsp+48h+var_48], 7 mov rdi, r15 mov rsi, rbx mov rdx, r13 mov ecx, ebp mov r8, rax call JS_DefinePropertyValue mov r12, rbx mov rbx, r13 mov r13d, eax mov rdi, r15 mov esi, ebp call JS_FreeAtom test r13d, r13d mov r13, rbx mov rbx, r12 mov r12, [rsp+48h+var_38] js loc_481B4 dec r14d jnz short loc_48201 loc_4826D: mov r12, r13 jmp loc_481DD loc_48275: mov esi, [rsp+48h+var_40] mov rdi, r15 call JS_FreeAtom jmp loc_481B4
_QWORD * JS_ReadObjectTag( long long *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { long long v9; // r12 long long v10; // r15 _QWORD *v11; // rbx long long v12; // rdx long long v13; // r13 long long v14; // rdx int v15; // ecx int v16; // r8d int v17; // r9d long long v18; // rdi int v19; // eax int v21; // r14d long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 _DWORD *ObjectRec; // rax long long v29; // rdx __m128 v30; // xmm4 __m128 v31; // xmm5 int v32; // ebp int v33; // eax _QWORD *v34; // r12 long long v35; // rbx int v36; // r13d bool v37; // sf unsigned int v38; // [rsp+8h] [rbp-40h] BYREF int v39; // [rsp+Ch] [rbp-3Ch] BYREF long long *v40; // [rsp+10h] [rbp-38h] v9 = (long long)a1; v10 = *a1; v11 = (_QWORD *)JS_NewObjectProtoClass( *a1, *(_QWORD *)(*(_QWORD *)(*a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(*a1 + 64) + 24LL), 1u); v13 = v12; if ( !(unsigned int)BC_add_object_ref1(a1, v11) && !(unsigned int)bc_get_leb128((long long)a1, &v39, v14, v15, v16, v17) ) { v21 = v39; if ( !v39 ) return v11; v40 = a1; while ( !(unsigned int)bc_get_atom(v9, &v38) ) { ObjectRec = (_DWORD *)JS_ReadObjectRec(v9, a2, a3, a4, a5, v26, v27, a8, a9, (long long)&v38, v22, v23, v24, v25); if ( (_DWORD)v29 == 6 ) { JS_FreeAtom(v10, v38); break; } v32 = v38; v33 = JS_DefinePropertyValue( v10, (long long)v11, v13, v38, ObjectRec, v29, *(double *)a2.m128_u64, a3, a4, a5, v30, v31, a8, a9, 7); v34 = v11; v35 = v13; v36 = v33; JS_FreeAtom(v10, v32); v37 = v36 < 0; v13 = v35; v11 = v34; v9 = (long long)v40; if ( v37 ) break; if ( !--v21 ) return v11; } } if ( (unsigned int)v13 >= 0xFFFFFFF7 ) { v18 = *(_QWORD *)(v10 + 24); v19 = (*(_DWORD *)v11)--; if ( v19 <= 1 ) js_free_value_rt(v18, v11, v13); } return 0LL; }
JS_ReadObjectTag: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV R15,qword ptr [RDI] MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R15 MOV ECX,0x1 CALL 0x00121651 MOV RBX,RAX MOV R13,RDX MOV RDI,R12 MOV RSI,RAX CALL 0x00148ca0 TEST EAX,EAX JNZ 0x001481b4 LEA RSI,[RSP + 0xc] MOV RDI,R12 CALL 0x0014760c TEST EAX,EAX JZ 0x001481f2 LAB_001481b4: MOV R12D,0x6 CMP R13D,-0x9 JC 0x001481db MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x001481db MOV RSI,RBX MOV RDX,R13 CALL 0x001219cc LAB_001481db: XOR EBX,EBX LAB_001481dd: MOV RAX,RBX MOV RDX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001481f2: MOV R14D,dword ptr [RSP + 0xc] TEST R14D,R14D JZ 0x0014826d MOV qword ptr [RSP + 0x10],R12 LAB_00148201: MOV RDI,R12 LEA RSI,[RSP + 0x8] CALL 0x00148ac5 TEST EAX,EAX JNZ 0x001481b4 MOV RDI,R12 CALL 0x00133970 MOV R9,RDX CMP R9D,0x6 JZ 0x00148275 MOV EBP,dword ptr [RSP + 0x8] MOV dword ptr [RSP],0x7 MOV RDI,R15 MOV RSI,RBX MOV RDX,R13 MOV ECX,EBP MOV R8,RAX CALL 0x0012717d MOV R12,RBX MOV RBX,R13 MOV R13D,EAX MOV RDI,R15 MOV ESI,EBP CALL 0x00120f31 TEST R13D,R13D MOV R13,RBX MOV RBX,R12 MOV R12,qword ptr [RSP + 0x10] JS 0x001481b4 DEC R14D JNZ 0x00148201 LAB_0014826d: MOV R12,R13 JMP 0x001481dd LAB_00148275: MOV ESI,dword ptr [RSP + 0x8] MOV RDI,R15 CALL 0x00120f31 JMP 0x001481b4
int1 [16] JS_ReadObjectTag(long *param_1) { long lVar1; int8 uVar2; int4 uVar3; int iVar4; int iVar5; int *piVar6; int1 auVar7 [16]; int1 auVar8 [16]; int4 local_40; int local_3c; long *local_38; lVar1 = *param_1; auVar7 = JS_NewObjectProtoClass (lVar1,*(int8 *)(*(long *)(lVar1 + 0x40) + 0x10), *(int8 *)(*(long *)(lVar1 + 0x40) + 0x18),1); piVar6 = auVar7._0_8_; iVar4 = BC_add_object_ref1(param_1,piVar6); if ((iVar4 == 0) && (iVar5 = bc_get_leb128(param_1,&local_3c), iVar4 = local_3c, iVar5 == 0)) { for (; iVar4 != 0; iVar4 = iVar4 + -1) { local_38 = param_1; iVar5 = bc_get_atom(param_1,&local_40); if (iVar5 != 0) goto LAB_001481b4; auVar8 = JS_ReadObjectRec(param_1); uVar3 = local_40; if (auVar8._8_4_ == 6) { JS_FreeAtom(lVar1,local_40); goto LAB_001481b4; } iVar5 = JS_DefinePropertyValue(lVar1,piVar6,auVar7._8_8_,local_40,auVar8._0_8_,auVar8._8_8_,7) ; JS_FreeAtom(lVar1,uVar3); if (iVar5 < 0) goto LAB_001481b4; param_1 = local_38; } } else { LAB_001481b4: if (0xfffffff6 < auVar7._8_4_) { uVar2 = *(int8 *)(lVar1 + 0x18); iVar4 = *piVar6; *piVar6 = iVar4 + -1; if (iVar4 < 2) { js_free_value_rt(uVar2,piVar6,auVar7._8_8_); } } auVar7 = ZEXT816(6) << 0x40; } return auVar7; }
32,350
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O0
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp movl %r8d, -0x60(%rbp) movl %ecx, %eax movl -0x60(%rbp), %ecx movl %eax, -0x5c(%rbp) movq %rdx, %rax movl -0x5c(%rbp), %edx movq %rax, -0x58(%rbp) movq %rsi, %rax movq -0x58(%rbp), %rsi movq %rax, -0x50(%rbp) movq %rdi, %r8 movq -0x50(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x10(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movb %dl, -0x21(%rbp) movb %cl, -0x22(%rbp) movb %al, -0x23(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x10(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x9c(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x61(%rbp) je 0x960d8 movq 0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x61(%rbp) je 0x960d8 cmpq $0x0, -0x48(%rbp) seta %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x960e4 jmp 0x96259 movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax jne 0x9613a movq -0x18(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x9613a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) jmp 0x9623c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x22(%rbp), %ecx cmpl %ecx, %eax jne 0x9617e movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) jmp 0x9623c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x23(%rbp), %ecx cmpl %ecx, %eax jne 0x96214 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax andl $0x20010, %eax # imm = 0x20010 cmpl $0x0, %eax je 0x961b3 movq 0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x961bb movq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x961d1 movb $0x0, -0x1(%rbp) jmp 0x962a6 movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x48(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) jmp 0x960af movq 0x18(%rbp), %rcx movq -0x38(%rbp), %rax subq %rax, %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x962a2 movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $0x20, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) jmp 0x96272 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
my_like_range_simple: push rbp mov rbp, rsp mov [rbp+var_60], r8d mov eax, ecx mov ecx, [rbp+var_60] mov [rbp+var_5C], eax mov rax, rdx mov edx, [rbp+var_5C] mov [rbp+var_58], rax mov rax, rsi mov rsi, [rbp+var_58] mov [rbp+var_50], rax mov r8, rdi mov rdi, [rbp+var_50] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_10], r8 mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_21], dl mov [rbp+var_22], cl mov [rbp+var_23], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+arg_8] mov [rbp+var_38], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_40], rax mov rax, [rbp+arg_0] mov rcx, [rbp+var_10] mov ecx, [rcx+9Ch] xor edx, edx div rcx mov [rbp+var_48], rax loc_960AF: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_61], al jz short loc_960D8 mov rcx, [rbp+arg_8] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_61], al jz short loc_960D8 cmp [rbp+var_48], 0 setnbe al mov [rbp+var_61], al loc_960D8: mov al, [rbp+var_61] test al, 1 jnz short loc_960E4 jmp loc_96259 loc_960E4: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_21] cmp eax, ecx jnz short loc_9613A mov rax, [rbp+var_18] add rax, 1 cmp rax, [rbp+var_30] jz short loc_9613A mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl jmp loc_9623C loc_9613A: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_22] cmp eax, ecx jnz short loc_9617E mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl jmp loc_9623C loc_9617E: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_23] cmp eax, ecx jnz loc_96214 mov rax, [rbp+var_10] mov eax, [rax+0Ch] and eax, 20010h cmp eax, 0 jz short loc_961B3 mov rax, [rbp+arg_8] mov rcx, [rbp+var_38] sub rax, rcx mov [rbp+var_70], rax jmp short loc_961BB loc_961B3: mov rax, [rbp+arg_0] mov [rbp+var_70], rax loc_961BB: mov rcx, [rbp+var_70] mov rax, [rbp+arg_18] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_961D1: mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jnz short loc_961D1 mov [rbp+var_1], 0 jmp loc_962A6 loc_96214: mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl loc_9623C: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_48] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax jmp loc_960AF loc_96259: mov rcx, [rbp+arg_8] mov rax, [rbp+var_38] sub rcx, rax mov rax, [rbp+arg_20] mov [rax], rcx mov rax, [rbp+arg_18] mov [rax], rcx loc_96272: mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jz short loc_962A2 mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_96272 loc_962A2: mov [rbp+var_1], 0 loc_962A6: mov al, [rbp+var_1] pop rbp retn
char my_like_range_simple( long long a1, _BYTE *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, _BYTE *a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { char v11; // cl _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax _BYTE *v15; // rax _BYTE *v16; // rax _BYTE *v17; // rax char v18; // cl _BYTE *v19; // rax _BYTE *v20; // rax _BYTE *v21; // rax _BYTE *v22; // rax unsigned long long v24; // [rsp+0h] [rbp-70h] bool v25; // [rsp+Fh] [rbp-61h] unsigned long long i; // [rsp+28h] [rbp-48h] _BYTE *v27; // [rsp+30h] [rbp-40h] long long v28; // [rsp+38h] [rbp-38h] _BYTE *v29; // [rsp+40h] [rbp-30h] _BYTE *v31; // [rsp+58h] [rbp-18h] v31 = a2; v29 = &a2[a3]; v28 = (long long)a8; v27 = &a8[a7]; for ( i = a7 / *(unsigned int *)(a1 + 156); ; --i ) { v25 = 0; if ( v31 != v29 ) { v25 = 0; if ( a8 != v27 ) v25 = i != 0; } if ( !v25 ) { *a11 = &a8[-v28]; *a10 = (unsigned long long)&a8[-v28]; while ( a8 != v27 ) { v21 = a9++; *v21 = 32; v22 = a8++; *v22 = 32; } return 0; } if ( (char)*v31 == a4 && v31 + 1 != v29 ) { v11 = *++v31; v12 = a9++; *v12 = *v31; v13 = a8++; *v13 = v11; goto LABEL_19; } if ( (char)*v31 == a5 ) { v14 = a8++; *v14 = 0; v15 = a9++; *v15 = *(_QWORD *)(a1 + 168); goto LABEL_19; } if ( (char)*v31 == a6 ) break; v18 = *v31; v19 = a9++; *v19 = *v31; v20 = a8++; *v20 = v18; LABEL_19: ++v31; } if ( (*(_DWORD *)(a1 + 12) & 0x20010) != 0 ) v24 = (unsigned long long)&a8[-v28]; else v24 = a7; *a10 = v24; *a11 = a7; do { v16 = a8++; *v16 = 0; v17 = a9++; *v17 = *(_QWORD *)(a1 + 168); } while ( a8 != v27 ); return 0; }
my_like_range_simple: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x60],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x5c] MOV qword ptr [RBP + -0x58],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x50] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],R8 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RBP + -0x21],DL MOV byte ptr [RBP + -0x22],CL MOV byte ptr [RBP + -0x23],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX LAB_001960af: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x61],AL JZ 0x001960d8 MOV RCX,qword ptr [RBP + 0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x61],AL JZ 0x001960d8 CMP qword ptr [RBP + -0x48],0x0 SETA AL MOV byte ptr [RBP + -0x61],AL LAB_001960d8: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x001960e4 JMP 0x00196259 LAB_001960e4: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JNZ 0x0019613a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x0019613a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL JMP 0x0019623c LAB_0019613a: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x22] CMP EAX,ECX JNZ 0x0019617e MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL JMP 0x0019623c LAB_0019617e: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x23] CMP EAX,ECX JNZ 0x00196214 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x20010 CMP EAX,0x0 JZ 0x001961b3 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x001961bb LAB_001961b3: MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x70],RAX LAB_001961bb: MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_001961d1: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x001961d1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001962a6 LAB_00196214: MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL LAB_0019623c: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001960af LAB_00196259: MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x38] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_00196272: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JZ 0x001962a2 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 JMP 0x00196272 LAB_001962a2: MOV byte ptr [RBP + -0x1],0x0 LAB_001962a6: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,char *param_8,char *param_9,ulong *param_10,ulong *param_11) { char cVar1; char *pcVar2; char *pcVar3; ulong uVar4; bool bVar5; ulong local_78; ulong local_50; char *local_20; pcVar3 = param_8; pcVar2 = param_8 + param_7; local_50 = param_7 / *(uint *)(param_1 + 0x9c); local_20 = param_2; while( true ) { bVar5 = false; if ((local_20 != param_2 + param_3) && (bVar5 = false, param_8 != pcVar2)) { bVar5 = local_50 != 0; } if (!bVar5) break; if ((*local_20 == param_4) && (local_20 + 1 != param_2 + param_3)) { local_20 = local_20 + 1; cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } else if (*local_20 == param_5) { *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); } else { if (*local_20 == param_6) { if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { local_78 = param_7; } else { local_78 = (long)param_8 - (long)pcVar3; } *param_10 = local_78; *param_11 = param_7; do { pcVar3 = param_8 + 1; *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); param_8 = pcVar3; param_9 = param_9 + 1; } while (pcVar3 != pcVar2); return 0; } cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } param_9 = param_9 + 1; param_8 = param_8 + 1; local_20 = local_20 + 1; local_50 = local_50 - 1; } uVar4 = (long)param_8 - (long)pcVar3; *param_11 = uVar4; *param_10 = uVar4; while (param_8 != pcVar2) { *param_9 = ' '; *param_8 = ' '; param_8 = param_8 + 1; param_9 = param_9 + 1; } return 0; }
32,351
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O3
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r10 movq 0x30(%rbp), %rdx movq 0x28(%rbp), %r12 movq 0x20(%rbp), %rbx movq 0x18(%rbp), %r14 movq 0x10(%rbp), %r11 testq %r10, %r10 je 0x705e5 addq %rsi, %r10 movl 0x9c(%rdi), %r15d xorl %r13d, %r13d movq %r11, %rax xorl %edx, %edx divq %r15 addq $-0x1, %rax setb %dl cmpq %r13, %r11 je 0x705d8 testb %dl, %dl je 0x705d8 movb (%rsi), %r15b cmpb %cl, %r15b jne 0x705a4 leaq 0x1(%rsi), %rdx cmpq %r10, %rdx je 0x705a4 movb (%rdx), %sil movb %sil, (%rbx,%r13) movb %sil, (%r14,%r13) jmp 0x705ca cmpb %r8b, %r15b jne 0x705ba movb $0x0, (%r14,%r13) movb 0xa8(%rdi), %dl movb %dl, (%rbx,%r13) jmp 0x705c7 cmpb %r9b, %r15b je 0x7061b movb %r15b, (%rbx,%r13) movb %r15b, (%r14,%r13) movq %rsi, %rdx incq %rdx incq %r13 movq %rdx, %rsi cmpq %r10, %rdx jne 0x70576 leaq (%r14,%r13), %rax addq %r13, %rbx movq 0x30(%rbp), %rdx jmp 0x705e8 movq %r14, %rax addq %r14, %r11 movq %rax, %rcx subq %r14, %rcx movq %rcx, (%rdx) movq %rcx, (%r12) cmpq %r11, %rax je 0x7060e movb $0x20, %cl movb %cl, (%rbx) incq %rbx movb %cl, (%rax) incq %rax cmpq %r11, %rax jne 0x705ff xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl $0x20010, 0xc(%rdi) # imm = 0x20010 movq %r13, %rax cmoveq %r11, %rax movq %rax, (%r12) movq 0x30(%rbp), %rax movq %r11, (%rax) movb $0x0, (%r14,%r13) movb 0xa8(%rdi), %al movb %al, (%rbx,%r13) incq %r13 cmpq %r13, %r11 jne 0x70634 jmp 0x7060e
my_like_range_simple: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r10, rdx mov rdx, [rbp+arg_20] mov r12, [rbp+arg_18] mov rbx, [rbp+arg_10] mov r14, [rbp+arg_8] mov r11, [rbp+arg_0] test r10, r10 jz loc_705E5 add r10, rsi mov r15d, [rdi+9Ch] xor r13d, r13d mov rax, r11 xor edx, edx div r15 loc_70576: add rax, 0FFFFFFFFFFFFFFFFh setb dl cmp r11, r13 jz short loc_705D8 test dl, dl jz short loc_705D8 mov r15b, [rsi] cmp r15b, cl jnz short loc_705A4 lea rdx, [rsi+1] cmp rdx, r10 jz short loc_705A4 mov sil, [rdx] mov [rbx+r13], sil mov [r14+r13], sil jmp short loc_705CA loc_705A4: cmp r15b, r8b jnz short loc_705BA mov byte ptr [r14+r13], 0 mov dl, [rdi+0A8h] mov [rbx+r13], dl jmp short loc_705C7 loc_705BA: cmp r15b, r9b jz short loc_7061B mov [rbx+r13], r15b mov [r14+r13], r15b loc_705C7: mov rdx, rsi loc_705CA: inc rdx inc r13 mov rsi, rdx cmp rdx, r10 jnz short loc_70576 loc_705D8: lea rax, [r14+r13] add rbx, r13 mov rdx, [rbp+arg_20] jmp short loc_705E8 loc_705E5: mov rax, r14 loc_705E8: add r11, r14 mov rcx, rax sub rcx, r14 mov [rdx], rcx mov [r12], rcx cmp rax, r11 jz short loc_7060E mov cl, 20h ; ' ' loc_705FF: mov [rbx], cl inc rbx mov [rax], cl inc rax cmp rax, r11 jnz short loc_705FF loc_7060E: xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7061B: test dword ptr [rdi+0Ch], 20010h mov rax, r13 cmovz rax, r11 mov [r12], rax mov rax, [rbp+arg_20] mov [rax], r11 loc_70634: mov byte ptr [r14+r13], 0 mov al, [rdi+0A8h] mov [rbx+r13], al inc r13 cmp r11, r13 jnz short loc_70634 jmp short loc_7060E
long long my_like_range_simple( long long a1, char *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, long long a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { _QWORD *v12; // rdx _BYTE *v13; // rbx char *v14; // r10 unsigned long long v15; // r13 unsigned long long v16; // rax bool v17; // cf char v18; // r15 char *v19; // rdx char v20; // si _BYTE *v21; // rax unsigned long long v23; // rax v12 = a11; v13 = a9; if ( a3 ) { v14 = &a2[a3]; v15 = 0LL; v16 = a7 / *(unsigned int *)(a1 + 156); while ( 1 ) { v17 = v16-- != 0; if ( a7 == v15 || !v17 ) { LABEL_14: v21 = (_BYTE *)(a8 + v15); v13 = &a9[v15]; v12 = a11; goto LABEL_16; } v18 = *a2; if ( *a2 != a4 || (v19 = a2 + 1, a2 + 1 == v14) ) { if ( v18 == a5 ) { *(_BYTE *)(a8 + v15) = 0; a9[v15] = *(_BYTE *)(a1 + 168); } else { if ( v18 == a6 ) { v23 = v15; if ( (*(_DWORD *)(a1 + 12) & 0x20010) == 0 ) v23 = a7; *a10 = v23; *a11 = a7; do { *(_BYTE *)(a8 + v15) = 0; a9[v15++] = *(_BYTE *)(a1 + 168); } while ( a7 != v15 ); return 0LL; } a9[v15] = v18; *(_BYTE *)(a8 + v15) = v18; } v19 = a2; } else { v20 = *v19; a9[v15] = *v19; *(_BYTE *)(a8 + v15) = v20; } ++v15; a2 = v19 + 1; if ( v19 + 1 == v14 ) goto LABEL_14; } } v21 = (_BYTE *)a8; LABEL_16: *v12 = &v21[-a8]; for ( *a10 = (unsigned long long)&v21[-a8]; v21 != (_BYTE *)(a8 + a7); ++v21 ) { *v13++ = 32; *v21 = 32; } return 0LL; }
my_like_range_simple: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R10,RDX MOV RDX,qword ptr [RBP + 0x30] MOV R12,qword ptr [RBP + 0x28] MOV RBX,qword ptr [RBP + 0x20] MOV R14,qword ptr [RBP + 0x18] MOV R11,qword ptr [RBP + 0x10] TEST R10,R10 JZ 0x001705e5 ADD R10,RSI MOV R15D,dword ptr [RDI + 0x9c] XOR R13D,R13D MOV RAX,R11 XOR EDX,EDX DIV R15 LAB_00170576: ADD RAX,-0x1 SETC DL CMP R11,R13 JZ 0x001705d8 TEST DL,DL JZ 0x001705d8 MOV R15B,byte ptr [RSI] CMP R15B,CL JNZ 0x001705a4 LEA RDX,[RSI + 0x1] CMP RDX,R10 JZ 0x001705a4 MOV SIL,byte ptr [RDX] MOV byte ptr [RBX + R13*0x1],SIL MOV byte ptr [R14 + R13*0x1],SIL JMP 0x001705ca LAB_001705a4: CMP R15B,R8B JNZ 0x001705ba MOV byte ptr [R14 + R13*0x1],0x0 MOV DL,byte ptr [RDI + 0xa8] MOV byte ptr [RBX + R13*0x1],DL JMP 0x001705c7 LAB_001705ba: CMP R15B,R9B JZ 0x0017061b MOV byte ptr [RBX + R13*0x1],R15B MOV byte ptr [R14 + R13*0x1],R15B LAB_001705c7: MOV RDX,RSI LAB_001705ca: INC RDX INC R13 MOV RSI,RDX CMP RDX,R10 JNZ 0x00170576 LAB_001705d8: LEA RAX,[R14 + R13*0x1] ADD RBX,R13 MOV RDX,qword ptr [RBP + 0x30] JMP 0x001705e8 LAB_001705e5: MOV RAX,R14 LAB_001705e8: ADD R11,R14 MOV RCX,RAX SUB RCX,R14 MOV qword ptr [RDX],RCX MOV qword ptr [R12],RCX CMP RAX,R11 JZ 0x0017060e MOV CL,0x20 LAB_001705ff: MOV byte ptr [RBX],CL INC RBX MOV byte ptr [RAX],CL INC RAX CMP RAX,R11 JNZ 0x001705ff LAB_0017060e: XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017061b: TEST dword ptr [RDI + 0xc],0x20010 MOV RAX,R13 CMOVZ RAX,R11 MOV qword ptr [R12],RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],R11 LAB_00170634: MOV byte ptr [R14 + R13*0x1],0x0 MOV AL,byte ptr [RDI + 0xa8] MOV byte ptr [RBX + R13*0x1],AL INC R13 CMP R11,R13 JNZ 0x00170634 JMP 0x0017060e
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,int1 *param_8,int1 *param_9,ulong *param_10,ulong *param_11) { char *pcVar1; char cVar2; ulong uVar3; int1 *puVar4; char *pcVar5; ulong uVar6; bool bVar7; puVar4 = param_8; if (param_3 != 0) { pcVar5 = param_2 + param_3; uVar6 = 0; uVar3 = param_7 / *(uint *)(param_1 + 0x9c); do { bVar7 = uVar3 == 0; uVar3 = uVar3 - 1; if ((param_7 == uVar6) || (bVar7)) break; cVar2 = *param_2; if ((cVar2 == param_4) && (pcVar1 = param_2 + 1, pcVar1 != pcVar5)) { cVar2 = *pcVar1; param_9[uVar6] = cVar2; param_8[uVar6] = cVar2; param_2 = pcVar1; } else if (cVar2 == param_5) { param_8[uVar6] = 0; param_9[uVar6] = *(int1 *)(param_1 + 0xa8); } else { if (cVar2 == param_6) { uVar3 = uVar6; if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { uVar3 = param_7; } *param_10 = uVar3; *param_11 = param_7; do { param_8[uVar6] = 0; param_9[uVar6] = *(int1 *)(param_1 + 0xa8); uVar6 = uVar6 + 1; } while (param_7 != uVar6); return 0; } param_9[uVar6] = cVar2; param_8[uVar6] = cVar2; } param_2 = param_2 + 1; uVar6 = uVar6 + 1; } while (param_2 != pcVar5); param_9 = param_9 + uVar6; puVar4 = param_8 + uVar6; } *param_11 = (long)puVar4 - (long)param_8; *param_10 = (long)puVar4 - (long)param_8; for (; puVar4 != param_8 + param_7; puVar4 = puVar4 + 1) { *param_9 = 0x20; param_9 = param_9 + 1; *puVar4 = 0x20; } return 0; }
32,352
ggml_compute_forward_cos_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_cos_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; if (params->ith != 0) { return; } GGML_ASSERT(ggml_are_same_shape(src0, dst)); const int n = ggml_nrows(src0); const int nc = src0->ne[0]; GGML_ASSERT( dst->nb[0] == sizeof(float)); GGML_ASSERT(src0->nb[0] == sizeof(float)); for (int i = 0; i < n; i++) { ggml_vec_cos_f32(nc, (float *) ((char *) dst->data + i*( dst->nb[1])), (float *) ((char *) src0->data + i*(src0->nb[1]))); } }
O0
c
ggml_compute_forward_cos_f32: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, (%rax) je 0x2572d jmp 0x25826 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe260 testb $0x1, %al jne 0x2575f leaq 0x4e41d(%rip), %rdi # 0x73b62 movl $0x154d, %esi # imm = 0x154D leaq 0x4e470(%rip), %rdx # 0x73bc1 leaq 0x4eb62(%rip), %rcx # 0x742ba movb $0x0, %al callq 0xe270 movq -0x18(%rbp), %rdi callq 0xdc20 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq $0x4, 0x30(%rax) je 0x257a2 leaq 0x4e3da(%rip), %rdi # 0x73b62 movl $0x1552, %esi # imm = 0x1552 leaq 0x4e42d(%rip), %rdx # 0x73bc1 leaq 0x4f086(%rip), %rcx # 0x74821 movb $0x0, %al callq 0xe270 movq -0x18(%rbp), %rax cmpq $0x4, 0x30(%rax) je 0x257ce leaq 0x4e3ae(%rip), %rdi # 0x73b62 movl $0x1553, %esi # imm = 0x1553 leaq 0x4e401(%rip), %rdx # 0x73bc1 leaq 0x4f076(%rip), %rcx # 0x7483d movb $0x0, %al callq 0xe270 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x25826 movl -0x20(%rbp), %edi movq -0x10(%rbp), %rax movq 0xf8(%rax), %rsi movslq -0x24(%rbp), %rax movq -0x10(%rbp), %rcx imulq 0x38(%rcx), %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0xf8(%rax), %rdx movslq -0x24(%rbp), %rax movq -0x18(%rbp), %rcx imulq 0x38(%rcx), %rax addq %rax, %rdx callq 0x25830 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x257d5 addq $0x30, %rsp popq %rbp retq nopl (%rax)
ggml_compute_forward_cos_f32: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jz short loc_2572D jmp loc_25826 loc_2572D: mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call _ggml_are_same_shape test al, 1 jnz short loc_2575F lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 154Dh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)" mov al, 0 call _ggml_abort loc_2575F: mov rdi, [rbp+var_18] call _ggml_nrows mov [rbp+var_1C], eax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_20], eax mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 4 jz short loc_257A2 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1552h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_257A2: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 4 jz short loc_257CE lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1553h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_257CE: mov [rbp+var_24], 0 loc_257D5: mov eax, [rbp+var_24] cmp eax, [rbp+var_1C] jge short loc_25826 mov edi, [rbp+var_20] mov rax, [rbp+var_10] mov rsi, [rax+0F8h] movsxd rax, [rbp+var_24] mov rcx, [rbp+var_10] imul rax, [rcx+38h] add rsi, rax mov rax, [rbp+var_18] mov rdx, [rax+0F8h] movsxd rax, [rbp+var_24] mov rcx, [rbp+var_18] imul rax, [rcx+38h] add rdx, rax call ggml_vec_cos_f32 mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_257D5 loc_25826: add rsp, 30h pop rbp retn
unsigned long long ggml_compute_forward_cos_f32(_DWORD *a1, _QWORD *a2) { unsigned long long result; // rax unsigned int i; // [rsp+Ch] [rbp-24h] unsigned int v4; // [rsp+10h] [rbp-20h] int v5; // [rsp+14h] [rbp-1Ch] _QWORD *v6; // [rsp+18h] [rbp-18h] v6 = (_QWORD *)a2[19]; result = (unsigned long long)a1; if ( !*a1 ) { if ( (ggml_are_same_shape(v6, a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5453LL, "GGML_ASSERT(%s) failed", "ggml_are_same_shape(src0, dst)"); v5 = ggml_nrows(v6); v4 = v6[2]; if ( a2[6] != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5458LL, "GGML_ASSERT(%s) failed", "dst->nb[0] == sizeof(float)"); if ( v6[6] != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5459LL, "GGML_ASSERT(%s) failed", "src0->nb[0] == sizeof(float)"); for ( i = 0; ; ++i ) { result = i; if ( (int)i >= v5 ) break; ggml_vec_cos_f32(v4, a2[7] * (int)i + a2[31], v6[7] * (int)i + v6[31]); } } return result; }
ggml_compute_forward_cos_f32: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JZ 0x0012572d JMP 0x00125826 LAB_0012572d: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010e260 TEST AL,0x1 JNZ 0x0012575f LEA RDI,[0x173b62] MOV ESI,0x154d LEA RDX,[0x173bc1] LEA RCX,[0x1742ba] MOV AL,0x0 CALL 0x0010e270 LAB_0012575f: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010dc20 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x4 JZ 0x001257a2 LEA RDI,[0x173b62] MOV ESI,0x1552 LEA RDX,[0x173bc1] LEA RCX,[0x174821] MOV AL,0x0 CALL 0x0010e270 LAB_001257a2: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x4 JZ 0x001257ce LEA RDI,[0x173b62] MOV ESI,0x1553 LEA RDX,[0x173bc1] LEA RCX,[0x17483d] MOV AL,0x0 CALL 0x0010e270 LAB_001257ce: MOV dword ptr [RBP + -0x24],0x0 LAB_001257d5: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x00125826 MOV EDI,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] IMUL RAX,qword ptr [RCX + 0x38] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RCX + 0x38] ADD RDX,RAX CALL 0x00125830 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001257d5 LAB_00125826: ADD RSP,0x30 POP RBP RET
void ggml_compute_forward_cos_f32(int *param_1,long param_2) { long lVar1; int8 uVar2; int iVar3; ulong uVar4; int local_2c; lVar1 = *(long *)(param_2 + 0x98); if (*param_1 == 0) { uVar4 = ggml_are_same_shape(lVar1,param_2); if ((uVar4 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x154d,"GGML_ASSERT(%s) failed","ggml_are_same_shape(src0, dst)"); } iVar3 = ggml_nrows(lVar1); uVar2 = *(int8 *)(lVar1 + 0x10); if (*(long *)(param_2 + 0x30) != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1552,"GGML_ASSERT(%s) failed","dst->nb[0] == sizeof(float)"); } if (*(long *)(lVar1 + 0x30) != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1553,"GGML_ASSERT(%s) failed","src0->nb[0] == sizeof(float)"); } for (local_2c = 0; local_2c < iVar3; local_2c = local_2c + 1) { ggml_vec_cos_f32((int)uVar2, *(long *)(param_2 + 0xf8) + (long)local_2c * *(long *)(param_2 + 0x38), *(long *)(lVar1 + 0xf8) + (long)local_2c * *(long *)(lVar1 + 0x38)); } } return; }
32,353
spdlog::async_logger::backend_flush_()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/async_logger-inl.h
SPDLOG_INLINE void spdlog::async_logger::backend_flush_() { for (auto &sink : sinks_) { SPDLOG_TRY { sink->flush(); } SPDLOG_LOGGER_CATCH(source_loc()) } }
O0
c
spdlog::async_logger::backend_flush_(): subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x28, %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rdi callq 0x42c10 movq %rax, 0xa0(%rsp) movq 0xa8(%rsp), %rdi callq 0x42c80 movq %rax, 0x98(%rsp) leaq 0xa0(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x42c40 xorb $-0x1, %al testb $0x1, %al jne 0x869a2 jmp 0x86b8e leaq 0xa0(%rsp), %rdi callq 0x42ce0 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi callq 0x42cf0 movq %rax, %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax jmp 0x869d2 jmp 0x86a73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) movl 0x84(%rsp), %eax movl $0x2, %ecx cmpl %ecx, %eax jne 0x86a87 movq 0x88(%rsp), %rdi callq 0x16280 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq %rax, 0x10(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x16d00 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x1dbb0 jmp 0x86a49 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x3e770 jmp 0x86a5a leaq 0x30(%rsp), %rdi callq 0x1dfd0 leaq 0x2f(%rsp), %rdi callq 0x16790 callq 0x16c20 jmp 0x86a75 leaq 0xa0(%rsp), %rdi callq 0x42d30 jmp 0x86982 movq 0x88(%rsp), %rdi callq 0x16280 leaq 0x5f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x16d00 movq 0x8(%rsp), %rdx leaq 0x8f083(%rip), %rsi # 0x115b32 leaq 0x60(%rsp), %rdi callq 0x1dbb0 jmp 0x86abb movq 0x20(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x3e770 jmp 0x86acc leaq 0x60(%rsp), %rdi callq 0x1dfd0 leaq 0x5f(%rsp), %rdi callq 0x16790 callq 0x16ac0 jmp 0x86bab movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x86b1e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x60(%rsp), %rdi callq 0x1dfd0 leaq 0x5f(%rsp), %rdi callq 0x16790 jmp 0x86b3e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) callq 0x16c20 jmp 0x86b45 jmp 0x86b96 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x86b7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x30(%rsp), %rdi callq 0x1dfd0 leaq 0x2f(%rsp), %rdi callq 0x16790 callq 0x16c20 jmp 0x86b8c jmp 0x86b96 addq $0xb8, %rsp retq movq 0x88(%rsp), %rdi callq 0x16cf0 movq %rax, %rdi callq 0x1eac0 nopl (%rax,%rax)
_ZN6spdlog12async_logger14backend_flush_Ev: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov rax, [rsp+0B8h+var_8] mov [rsp+0B8h+var_98], rax add rax, 28h ; '(' mov [rsp+0B8h+var_10], rax mov rdi, [rsp+0B8h+var_10] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE5beginEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin(void) mov [rsp+0B8h+var_18], rax mov rdi, [rsp+0B8h+var_10] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE3endEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::end(void) mov [rsp+0B8h+var_20], rax loc_86982: lea rdi, [rsp+0B8h+var_18] lea rsi, [rsp+0B8h+var_20] call _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_869A2 jmp loc_86B8E loc_869A2: lea rdi, [rsp+0B8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*(void) mov [rsp+0B8h+var_28], rax mov rdi, [rsp+0B8h+var_28] call _ZNKSt19__shared_ptr_accessIN6spdlog5sinks4sinkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] mov rax, [rax+18h] call rax jmp short $+2 loc_869D2: jmp loc_86A73 mov rcx, rax mov eax, edx mov [rsp+0B8h+var_30], rcx mov [rsp+0B8h+var_34], eax mov eax, [rsp+0B8h+var_34] mov ecx, 2 cmp eax, ecx jnz loc_86A87 mov rdi, [rsp+0B8h+var_30]; void * call ___cxa_begin_catch mov [rsp+0B8h+var_68], rax mov rdi, [rsp+0B8h+var_68] mov rax, [rdi] mov rax, [rax+10h] call rax mov [rsp+0B8h+var_A8], rax lea rdi, [rsp+0B8h+var_89] mov [rsp+0B8h+var_A0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+0B8h+var_A8] mov rdx, [rsp+0B8h+var_A0] lea rdi, [rsp+0B8h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_86A49: mov rdi, [rsp+0B8h+var_98] lea rsi, [rsp+0B8h+var_88] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_86A5A: lea rdi, [rsp+0B8h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch loc_86A73: jmp short $+2 loc_86A75: lea rdi, [rsp+0B8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(void) jmp loc_86982 loc_86A87: mov rdi, [rsp+0B8h+var_30]; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_59] mov [rsp+0B8h+var_B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0B8h+var_B0] lea rsi, aRethrowingUnkn; "Rethrowing unknown exception in logger" lea rdi, [rsp+0B8h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_86ABB: mov rdi, [rsp+0B8h+var_98] lea rsi, [rsp+0B8h+var_58] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_86ACC: lea rdi, [rsp+0B8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_rethrow jmp loc_86BAB mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_86B1E mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_86B1E: lea rdi, [rsp+arg_57] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_86B3E mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax loc_86B3E: call ___cxa_end_catch jmp short $+2 loc_86B45: jmp short loc_86B96 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_86B7B mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_86B7B: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short $+2 loc_86B8C: jmp short loc_86B96 loc_86B8E: add rsp, 0B8h retn loc_86B96: mov rdi, [rsp+arg_80] call __Unwind_Resume mov rdi, rax call __clang_call_terminate loc_86BAB: nop dword ptr [rax+rax+00h]
char spdlog::async_logger::backend_flush_(spdlog::async_logger *this) { char result; // al long long v2; // rdi long long v3; // [rsp+90h] [rbp-28h] long long v4; // [rsp+98h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+A0h] [rbp-18h] BYREF v5[2] = this; v5[1] = (char *)this + 40; v5[0] = std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin((long long)this + 40); v4 = std::vector<std::shared_ptr<spdlog::sinks::sink>>::end((long long)this + 40); while ( 1 ) { result = ~__gnu_cxx::operator==<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>( (long long)v5, (long long)&v4); if ( (result & 1) == 0 ) break; v3 = __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*((long long)v5); v2 = std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3); (*(void ( **)(long long))(*(_QWORD *)v2 + 24LL))(v2); __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(v5); } return result; }
backend_flush_: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x20],RAX ADD RAX,0x28 MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x00142c10 MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x00142c80 MOV qword ptr [RSP + 0x98],RAX LAB_00186982: LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x98] CALL 0x00142c40 XOR AL,0xff TEST AL,0x1 JNZ 0x001869a2 JMP 0x00186b8e LAB_001869a2: LEA RDI,[RSP + 0xa0] CALL 0x00142ce0 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x00142cf0 MOV RDI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] LAB_001869ce: CALL RAX LAB_001869d0: JMP 0x001869d2 LAB_001869d2: JMP 0x00186a73 LAB_00186a73: JMP 0x00186a75 LAB_00186a75: LEA RDI,[RSP + 0xa0] CALL 0x00142d30 JMP 0x00186982 LAB_00186b8e: ADD RSP,0xb8 RET
/* spdlog::async_logger::backend_flush_() */ void __thiscall spdlog::async_logger::backend_flush_(async_logger *this) { byte bVar1; __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *this_00; long *plVar2; int8 local_20; int8 local_18; vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *local_10; async_logger *local_8; local_10 = (vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *)(this + 0x28); local_8 = this; local_18 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::begin(local_10); local_20 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::end(local_10); while( true ) { bVar1 = _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_18,&local_20); if (((bVar1 ^ 0xff) & 1) == 0) break; this_00 = (__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator*((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_18); plVar2 = (long *)std:: __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(this_00); /* try { // try from 001869ce to 001869cf has its CatchHandler @ 001869d7 */ (**(code **)(*plVar2 + 0x18))(); __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator++((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_18); } return; }
32,354
thr_lock_delete
eloqsql/mysys/thr_lock.c
void thr_lock_delete(THR_LOCK *lock) { DBUG_ENTER("thr_lock_delete"); mysql_mutex_lock(&THR_LOCK_lock); thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list); mysql_mutex_unlock(&THR_LOCK_lock); mysql_mutex_destroy(&lock->mutex); DBUG_VOID_RETURN; }
O0
c
thr_lock_delete: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) leaq 0x374f95(%rip), %rdi # 0x3f8c18 leaq 0x563d5(%rip), %rsi # 0xda05f movl $0x1bb, %edx # imm = 0x1BB callq 0x83ba0 leaq 0x37522d(%rip), %rax # 0x3f8ec8 movq (%rax), %rdi movq -0x8(%rbp), %rsi callq 0x6cf30 movq %rax, %rcx leaq 0x375217(%rip), %rax # 0x3f8ec8 movq %rcx, (%rax) leaq 0x374f5d(%rip), %rdi # 0x3f8c18 callq 0x83c10 movq -0x8(%rbp), %rdi addq $0x18, %rdi callq 0x83ce0 jmp 0x83ccf addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
thr_lock_delete: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi lea rdi, THR_LOCK_lock lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1BBh call inline_mysql_mutex_lock_11 lea rax, thr_lock_thread_list mov rdi, [rax] mov rsi, [rbp+var_8] call list_delete mov rcx, rax lea rax, thr_lock_thread_list mov [rax], rcx lea rdi, THR_LOCK_lock call inline_mysql_mutex_unlock_11 mov rdi, [rbp+var_8] add rdi, 18h call inline_mysql_mutex_destroy_3 jmp short $+2 loc_83CCF: add rsp, 10h pop rbp retn
long long thr_lock_delete(_QWORD *a1) { inline_mysql_mutex_lock_11( (long long)&THR_LOCK_lock, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x1BBu); thr_lock_thread_list = list_delete(thr_lock_thread_list, a1); inline_mysql_mutex_unlock_11((long long)&THR_LOCK_lock); return inline_mysql_mutex_destroy_3(a1 + 3); }
thr_lock_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x4f8c18] LEA RSI,[0x1da05f] MOV EDX,0x1bb CALL 0x00183ba0 LEA RAX,[0x4f8ec8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] CALL 0x0016cf30 MOV RCX,RAX LEA RAX,[0x4f8ec8] MOV qword ptr [RAX],RCX LEA RDI,[0x4f8c18] CALL 0x00183c10 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 CALL 0x00183ce0 JMP 0x00183ccf LAB_00183ccf: ADD RSP,0x10 POP RBP RET
void thr_lock_delete(long param_1) { inline_mysql_mutex_lock (THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1bb); thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1); inline_mysql_mutex_unlock(THR_LOCK_lock); inline_mysql_mutex_destroy(param_1 + 0x18); return; }
32,355
asciiToBytes
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
uint32_t asciiToBytes(const uint8_t *asciiBuff, uint8_t* bytesBuff, uint32_t count) { uint32_t i, j, qBytes = 0; uint8_t tmp; for (i = 0; i < count; i++) { j = i & 1; if (!j) { bytesBuff[i / 2] = 0; qBytes++; } tmp = asciiBuff[i]; if ((tmp >= '0') && (tmp <= '9')) tmp &= 0x0F; else if ((tmp >= 'A') && (tmp <= 'F')) tmp -= 55; else return 0; bytesBuff[i / 2] |= tmp << (4 * (1 - j)); } return qBytes; }
O0
cpp
asciiToBytes: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl $0x0, -0x28(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jae 0xa657 movl -0x20(%rbp), %eax andl $0x1, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jne 0xa5d0 movq -0x18(%rbp), %rax movl -0x20(%rbp), %ecx shrl %ecx movl %ecx, %ecx movb $0x0, (%rax,%rcx) movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) movq -0x10(%rbp), %rax movl -0x20(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x29(%rbp) movzbl -0x29(%rbp), %eax cmpl $0x30, %eax jl 0xa5fb movzbl -0x29(%rbp), %eax cmpl $0x39, %eax jg 0xa5fb movzbl -0x29(%rbp), %eax andl $0xf, %eax movb %al, -0x29(%rbp) jmp 0xa624 movzbl -0x29(%rbp), %eax cmpl $0x41, %eax jl 0xa619 movzbl -0x29(%rbp), %eax cmpl $0x46, %eax jg 0xa619 movzbl -0x29(%rbp), %eax subl $0x37, %eax movb %al, -0x29(%rbp) jmp 0xa622 movl $0x0, -0x4(%rbp) jmp 0xa65d jmp 0xa624 movzbl -0x29(%rbp), %esi movl $0x1, %ecx subl -0x24(%rbp), %ecx shll $0x2, %ecx shll %cl, %esi movq -0x18(%rbp), %rax movl -0x20(%rbp), %ecx shrl %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %edx orl %esi, %edx movb %dl, (%rax,%rcx) movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0xa59d movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
asciiToBytes: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov [rbp+var_20], 0 loc_A59D: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jnb loc_A657 mov eax, [rbp+var_20] and eax, 1 mov [rbp+var_24], eax cmp [rbp+var_24], 0 jnz short loc_A5D0 mov rax, [rbp+var_18] mov ecx, [rbp+var_20] shr ecx, 1 mov ecx, ecx mov byte ptr [rax+rcx], 0 mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax loc_A5D0: mov rax, [rbp+var_10] mov ecx, [rbp+var_20] mov al, [rax+rcx] mov [rbp+var_29], al movzx eax, [rbp+var_29] cmp eax, 30h ; '0' jl short loc_A5FB movzx eax, [rbp+var_29] cmp eax, 39h ; '9' jg short loc_A5FB movzx eax, [rbp+var_29] and eax, 0Fh mov [rbp+var_29], al jmp short loc_A624 loc_A5FB: movzx eax, [rbp+var_29] cmp eax, 41h ; 'A' jl short loc_A619 movzx eax, [rbp+var_29] cmp eax, 46h ; 'F' jg short loc_A619 movzx eax, [rbp+var_29] sub eax, 37h ; '7' mov [rbp+var_29], al jmp short loc_A622 loc_A619: mov [rbp+var_4], 0 jmp short loc_A65D loc_A622: jmp short $+2 loc_A624: movzx esi, [rbp+var_29] mov ecx, 1 sub ecx, [rbp+var_24] shl ecx, 2 shl esi, cl mov rax, [rbp+var_18] mov ecx, [rbp+var_20] shr ecx, 1 mov ecx, ecx movzx edx, byte ptr [rax+rcx] or edx, esi mov [rax+rcx], dl mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp loc_A59D loc_A657: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_A65D: mov eax, [rbp+var_4] pop rbp retn
long long asciiToBytes(long long a1, long long a2, unsigned int a3) { unsigned __int8 v4; // [rsp+1h] [rbp-29h] unsigned __int8 v5; // [rsp+1h] [rbp-29h] unsigned int v6; // [rsp+2h] [rbp-28h] unsigned int i; // [rsp+Ah] [rbp-20h] v6 = 0; for ( i = 0; i < a3; ++i ) { if ( (i & 1) == 0 ) { *(_BYTE *)(a2 + (i >> 1)) = 0; ++v6; } v4 = *(_BYTE *)(a1 + i); if ( v4 < 0x30u || v4 > 0x39u ) { if ( v4 < 0x41u || v4 > 0x46u ) return 0; v5 = v4 - 55; } else { v5 = v4 & 0xF; } *(_BYTE *)(a2 + (i >> 1)) |= v5 << (4 * (1 - (i & 1))); } return v6; }
asciiToBytes: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x20],0x0 LAB_0010a59d: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JNC 0x0010a657 MOV EAX,dword ptr [RBP + -0x20] AND EAX,0x1 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0010a5d0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x20] SHR ECX,0x1 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],0x0 MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX LAB_0010a5d0: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x29],AL MOVZX EAX,byte ptr [RBP + -0x29] CMP EAX,0x30 JL 0x0010a5fb MOVZX EAX,byte ptr [RBP + -0x29] CMP EAX,0x39 JG 0x0010a5fb MOVZX EAX,byte ptr [RBP + -0x29] AND EAX,0xf MOV byte ptr [RBP + -0x29],AL JMP 0x0010a624 LAB_0010a5fb: MOVZX EAX,byte ptr [RBP + -0x29] CMP EAX,0x41 JL 0x0010a619 MOVZX EAX,byte ptr [RBP + -0x29] CMP EAX,0x46 JG 0x0010a619 MOVZX EAX,byte ptr [RBP + -0x29] SUB EAX,0x37 MOV byte ptr [RBP + -0x29],AL JMP 0x0010a622 LAB_0010a619: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010a65d LAB_0010a622: JMP 0x0010a624 LAB_0010a624: MOVZX ESI,byte ptr [RBP + -0x29] MOV ECX,0x1 SUB ECX,dword ptr [RBP + -0x24] SHL ECX,0x2 SHL ESI,CL MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x20] SHR ECX,0x1 MOV ECX,ECX MOVZX EDX,byte ptr [RAX + RCX*0x1] OR EDX,ESI MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x0010a59d LAB_0010a657: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_0010a65d: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int asciiToBytes(long param_1,long param_2,uint param_3) { byte local_31; int local_30; uint local_28; local_30 = 0; local_28 = 0; do { if (param_3 <= local_28) { return local_30; } if ((local_28 & 1) == 0) { *(int1 *)(param_2 + (ulong)(local_28 >> 1)) = 0; local_30 = local_30 + 1; } local_31 = *(byte *)(param_1 + (ulong)local_28); if ((local_31 < 0x30) || (0x39 < local_31)) { if ((local_31 < 0x41) || (0x46 < local_31)) { return 0; } local_31 = local_31 - 0x37; } else { local_31 = local_31 & 0xf; } *(byte *)(param_2 + (ulong)(local_28 >> 1)) = *(byte *)(param_2 + (ulong)(local_28 >> 1)) | local_31 << (('\x01' - (char)(local_28 & 1)) * '\x04' & 0x1fU); local_28 = local_28 + 1; } while( true ); }
32,356
asciiToBytes
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
uint32_t asciiToBytes(const uint8_t *asciiBuff, uint8_t* bytesBuff, uint32_t count) { uint32_t i, j, qBytes = 0; uint8_t tmp; for (i = 0; i < count; i++) { j = i & 1; if (!j) { bytesBuff[i / 2] = 0; qBytes++; } tmp = asciiBuff[i]; if ((tmp >= '0') && (tmp <= '9')) tmp &= 0x0F; else if ((tmp >= 'A') && (tmp <= 'F')) tmp -= 55; else return 0; bytesBuff[i / 2] |= tmp << (4 * (1 - j)); } return qBytes; }
O2
cpp
asciiToBytes: movl %edx, %edx xorl %r8d, %r8d xorl %eax, %eax cmpq %r8, %rdx je 0x72a4 testb $0x1, %r8b jne 0x7261 movl %r8d, %ecx shrl %ecx movb $0x0, (%rsi,%rcx) incl %eax movb (%rdi,%r8), %r9b leal -0x30(%r9), %ecx cmpb $0x9, %cl ja 0x7274 andb $0xf, %r9b jmp 0x7281 leal -0x41(%r9), %ecx cmpb $0x5, %cl ja 0x72a2 addb $-0x37, %r9b movl %r8d, %ecx andl $0x1, %ecx movzbl %r9b, %r9d shll $0x2, %ecx xorb $0x4, %cl shll %cl, %r9d movl %r8d, %ecx shrl %ecx orb %r9b, (%rsi,%rcx) incq %r8 jmp 0x724b xorl %eax, %eax retq
asciiToBytes: mov edx, edx xor r8d, r8d xor eax, eax loc_724B: cmp rdx, r8 jz short locret_72A4 test r8b, 1 jnz short loc_7261 mov ecx, r8d shr ecx, 1 mov byte ptr [rsi+rcx], 0 inc eax loc_7261: mov r9b, [rdi+r8] lea ecx, [r9-30h] cmp cl, 9 ja short loc_7274 and r9b, 0Fh jmp short loc_7281 loc_7274: lea ecx, [r9-41h] cmp cl, 5 ja short loc_72A2 add r9b, 0C9h loc_7281: mov ecx, r8d and ecx, 1 movzx r9d, r9b shl ecx, 2 xor cl, 4 shl r9d, cl mov ecx, r8d shr ecx, 1 or [rsi+rcx], r9b inc r8 jmp short loc_724B loc_72A2: xor eax, eax locret_72A4: retn
long long asciiToBytes(long long a1, long long a2, int a3) { long long v3; // r8 long long result; // rax char v5; // r9 unsigned __int8 v6; // r9 v3 = 0LL; result = 0LL; while ( a3 != v3 ) { if ( (v3 & 1) == 0 ) { *(_BYTE *)(a2 + ((unsigned int)v3 >> 1)) = 0; result = (unsigned int)(result + 1); } v5 = *(_BYTE *)(a1 + v3); if ( (unsigned __int8)(v5 - 48) > 9u ) { if ( (unsigned __int8)(v5 - 65) > 5u ) return 0LL; v6 = v5 - 55; } else { v6 = v5 & 0xF; } *(_BYTE *)(a2 + ((unsigned int)v3 >> 1)) |= v6 << ((4 * (v3 & 1)) ^ 4); ++v3; } return result; }
asciiToBytes: MOV EDX,EDX XOR R8D,R8D XOR EAX,EAX LAB_0010724b: CMP RDX,R8 JZ 0x001072a4 TEST R8B,0x1 JNZ 0x00107261 MOV ECX,R8D SHR ECX,0x1 MOV byte ptr [RSI + RCX*0x1],0x0 INC EAX LAB_00107261: MOV R9B,byte ptr [RDI + R8*0x1] LEA ECX,[R9 + -0x30] CMP CL,0x9 JA 0x00107274 AND R9B,0xf JMP 0x00107281 LAB_00107274: LEA ECX,[R9 + -0x41] CMP CL,0x5 JA 0x001072a2 ADD R9B,0xc9 LAB_00107281: MOV ECX,R8D AND ECX,0x1 MOVZX R9D,R9B SHL ECX,0x2 XOR CL,0x4 SHL R9D,CL MOV ECX,R8D SHR ECX,0x1 OR byte ptr [RSI + RCX*0x1],R9B INC R8 JMP 0x0010724b LAB_001072a2: XOR EAX,EAX LAB_001072a4: RET
int asciiToBytes(long param_1,long param_2,uint param_3) { byte *pbVar1; int iVar2; ulong uVar3; byte bVar4; uVar3 = 0; iVar2 = 0; do { if (param_3 == uVar3) { return iVar2; } if ((uVar3 & 1) == 0) { *(int1 *)(param_2 + (uVar3 >> 1 & 0x7fffffff)) = 0; iVar2 = iVar2 + 1; } bVar4 = *(byte *)(param_1 + uVar3); if ((byte)(bVar4 - 0x30) < 10) { bVar4 = bVar4 & 0xf; } else { if (5 < (byte)(bVar4 + 0xbf)) { return 0; } bVar4 = bVar4 - 0x37; } pbVar1 = (byte *)(param_2 + (uVar3 >> 1 & 0x7fffffff)); *pbVar1 = *pbVar1 | bVar4 << ((byte)(((uint)uVar3 & 1) << 2) ^ 4); uVar3 = uVar3 + 1; } while( true ); }
32,357
Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool Reader::decodeUnicodeEscapeSequence(Token& token, Location& current, Location end, unsigned int& ret_unicode) { if (end - current < 4) return addError( "Bad unicode escape sequence in string: four digits expected.", token, current); int unicode = 0; for (int index = 0; index < 4; ++index) { Char c = *current++; unicode *= 16; if (c >= '0' && c <= '9') unicode += c - '0'; else if (c >= 'a' && c <= 'f') unicode += c - 'a' + 10; else if (c >= 'A' && c <= 'F') unicode += c - 'A' + 10; else return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current); } ret_unicode = static_cast<unsigned int>(unicode); return true; }
O0
cpp
Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&): subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movq %rsi, 0xb0(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0xa0(%rsp) movq %r8, 0x98(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x28(%rsp) movq 0xa0(%rsp), %rax movq 0xa8(%rsp), %rcx movq (%rcx), %rcx subq %rcx, %rax cmpq $0x4, %rax jge 0x174198 leaq 0x77(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x92b00 movq 0x20(%rsp), %rdx leaq 0x40e1b(%rip), %rsi # 0x1b4f22 leaq 0x78(%rsp), %rdi callq 0x8fd10 jmp 0x174113 movq 0x28(%rsp), %rdi movq 0xb0(%rsp), %rdx movq 0xa8(%rsp), %rax movq (%rax), %rcx leaq 0x78(%rsp), %rsi callq 0x171430 movb %al, 0x1f(%rsp) jmp 0x17413b movb 0x1f(%rsp), %al andb $0x1, %al movb %al, 0xc7(%rsp) leaq 0x78(%rsp), %rdi callq 0x8ac60 leaq 0x77(%rsp), %rdi callq 0x8ddb0 jmp 0x17432c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x174189 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x78(%rsp), %rdi callq 0x8ac60 leaq 0x77(%rsp), %rdi callq 0x8ddb0 jmp 0x17433d movl $0x0, 0x60(%rsp) movl $0x0, 0x5c(%rsp) cmpl $0x4, 0x5c(%rsp) jge 0x174316 movq 0xa8(%rsp), %rcx movq (%rcx), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, (%rcx) movb (%rax), %al movb %al, 0x5b(%rsp) movl 0x60(%rsp), %eax shll $0x4, %eax movl %eax, 0x60(%rsp) movsbl 0x5b(%rsp), %eax cmpl $0x30, %eax jl 0x174202 movsbl 0x5b(%rsp), %eax cmpl $0x39, %eax jg 0x174202 movsbl 0x5b(%rsp), %eax subl $0x30, %eax addl 0x60(%rsp), %eax movl %eax, 0x60(%rsp) jmp 0x174304 movsbl 0x5b(%rsp), %eax cmpl $0x61, %eax jl 0x17422e movsbl 0x5b(%rsp), %eax cmpl $0x66, %eax jg 0x17422e movsbl 0x5b(%rsp), %eax subl $0x61, %eax addl $0xa, %eax addl 0x60(%rsp), %eax movl %eax, 0x60(%rsp) jmp 0x174302 movsbl 0x5b(%rsp), %eax cmpl $0x41, %eax jl 0x17425a movsbl 0x5b(%rsp), %eax cmpl $0x46, %eax jg 0x17425a movsbl 0x5b(%rsp), %eax subl $0x41, %eax addl $0xa, %eax addl 0x60(%rsp), %eax movl %eax, 0x60(%rsp) jmp 0x174300 leaq 0x37(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x92b00 movq 0x10(%rsp), %rdx leaq 0x40cea(%rip), %rsi # 0x1b4f5f leaq 0x38(%rsp), %rdi callq 0x8fd10 jmp 0x174281 movq 0x28(%rsp), %rdi movq 0xb0(%rsp), %rdx movq 0xa8(%rsp), %rax movq (%rax), %rcx leaq 0x38(%rsp), %rsi callq 0x171430 movb %al, 0xf(%rsp) jmp 0x1742a9 movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0xc7(%rsp) leaq 0x38(%rsp), %rdi callq 0x8ac60 leaq 0x37(%rsp), %rdi callq 0x8ddb0 jmp 0x17432c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1742f4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x38(%rsp), %rdi callq 0x8ac60 leaq 0x37(%rsp), %rdi callq 0x8ddb0 jmp 0x17433d jmp 0x174302 jmp 0x174304 jmp 0x174306 movl 0x5c(%rsp), %eax addl $0x1, %eax movl %eax, 0x5c(%rsp) jmp 0x1741a8 movl 0x60(%rsp), %ecx movq 0x98(%rsp), %rax movl %ecx, (%rax) movb $0x1, 0xc7(%rsp) movb 0xc7(%rsp), %al andb $0x1, %al addq $0xc8, %rsp retq movq 0x68(%rsp), %rdi callq 0x92a70 nopw (%rax,%rax)
_ZN4Json6Reader27decodeUnicodeEscapeSequenceERNS0_5TokenERPKcS4_Rj: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_18], rsi mov [rsp+0C8h+var_20], rdx mov [rsp+0C8h+var_28], rcx mov [rsp+0C8h+var_30], r8 mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_A0], rax mov rax, [rsp+0C8h+var_28] mov rcx, [rsp+0C8h+var_20] mov rcx, [rcx] sub rax, rcx cmp rax, 4 jge loc_174198 lea rdi, [rsp+0C8h+var_51] mov [rsp+0C8h+var_A8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0C8h+var_A8] lea rsi, aBadUnicodeEsca; "Bad unicode escape sequence in string: "... lea rdi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_174113: mov rdi, [rsp+0C8h+var_A0] mov rdx, [rsp+0C8h+var_18] mov rax, [rsp+0C8h+var_20] mov rcx, [rax] lea rsi, [rsp+0C8h+var_50] call _ZN4Json6Reader8addErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_5TokenEPKc; Json::Reader::addError(std::string const&,Json::Reader::Token &,char const*) mov [rsp+0C8h+var_A9], al jmp short $+2 loc_17413B: mov al, [rsp+0C8h+var_A9] and al, 1 mov [rsp+0C8h+var_1], al lea rdi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_17432C mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_174189 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_174189: lea rdi, [rsp+arg_6F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_17433D loc_174198: mov [rsp+0C8h+var_68], 0 mov [rsp+0C8h+var_6C], 0 loc_1741A8: cmp [rsp+0C8h+var_6C], 4 jge loc_174316 mov rcx, [rsp+0C8h+var_20] mov rax, [rcx] mov rdx, rax add rdx, 1 mov [rcx], rdx mov al, [rax] mov [rsp+0C8h+var_6D], al mov eax, [rsp+0C8h+var_68] shl eax, 4 mov [rsp+0C8h+var_68], eax movsx eax, [rsp+0C8h+var_6D] cmp eax, 30h ; '0' jl short loc_174202 movsx eax, [rsp+0C8h+var_6D] cmp eax, 39h ; '9' jg short loc_174202 movsx eax, [rsp+0C8h+var_6D] sub eax, 30h ; '0' add eax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_68], eax jmp loc_174304 loc_174202: movsx eax, [rsp+0C8h+var_6D] cmp eax, 61h ; 'a' jl short loc_17422E movsx eax, [rsp+0C8h+var_6D] cmp eax, 66h ; 'f' jg short loc_17422E movsx eax, [rsp+0C8h+var_6D] sub eax, 61h ; 'a' add eax, 0Ah add eax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_68], eax jmp loc_174302 loc_17422E: movsx eax, [rsp+0C8h+var_6D] cmp eax, 41h ; 'A' jl short loc_17425A movsx eax, [rsp+0C8h+var_6D] cmp eax, 46h ; 'F' jg short loc_17425A movsx eax, [rsp+0C8h+var_6D] sub eax, 41h ; 'A' add eax, 0Ah add eax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_68], eax jmp loc_174300 loc_17425A: lea rdi, [rsp+0C8h+var_91] mov [rsp+0C8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0C8h+var_B8] lea rsi, aBadUnicodeEsca_0; "Bad unicode escape sequence in string: "... lea rdi, [rsp+0C8h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_174281: mov rdi, [rsp+0C8h+var_A0] mov rdx, [rsp+0C8h+var_18] mov rax, [rsp+0C8h+var_20] mov rcx, [rax] lea rsi, [rsp+0C8h+var_90] call _ZN4Json6Reader8addErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_5TokenEPKc; Json::Reader::addError(std::string const&,Json::Reader::Token &,char const*) mov [rsp+0C8h+var_B9], al jmp short $+2 loc_1742A9: mov al, [rsp+0C8h+var_B9] and al, 1 mov [rsp+0C8h+var_1], al lea rdi, [rsp+0C8h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_91] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_17432C mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_1742F4 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1742F4: lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_17433D loc_174300: jmp short $+2 loc_174302: jmp short $+2 loc_174304: jmp short $+2 loc_174306: mov eax, [rsp+0C8h+var_6C] add eax, 1 mov [rsp+0C8h+var_6C], eax jmp loc_1741A8 loc_174316: mov ecx, [rsp+0C8h+var_68] mov rax, [rsp+0C8h+var_30] mov [rax], ecx mov [rsp+0C8h+var_1], 1 loc_17432C: mov al, [rsp+0C8h+var_1] and al, 1 add rsp, 0C8h retn loc_17433D: mov rdi, [rsp+arg_60] call __Unwind_Resume
char Json::Reader::decodeUnicodeEscapeSequence( long long a1, __int128 *a2, long long *a3, long long a4, _DWORD *a5) { char *v5; // rax char v7; // [rsp+37h] [rbp-91h] BYREF _BYTE v8[35]; // [rsp+38h] [rbp-90h] BYREF char v9; // [rsp+5Bh] [rbp-6Dh] int i; // [rsp+5Ch] [rbp-6Ch] int v11; // [rsp+60h] [rbp-68h] char v12; // [rsp+77h] [rbp-51h] BYREF _BYTE v13[32]; // [rsp+78h] [rbp-50h] BYREF _DWORD *v14; // [rsp+98h] [rbp-30h] long long v15; // [rsp+A0h] [rbp-28h] long long *v16; // [rsp+A8h] [rbp-20h] __int128 *v17; // [rsp+B0h] [rbp-18h] long long v18; // [rsp+B8h] [rbp-10h] char v19; // [rsp+C7h] [rbp-1h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; if ( a4 - *a3 >= 4 ) { v11 = 0; for ( i = 0; i < 4; ++i ) { v5 = (char *)(*v16)++; v9 = *v5; v11 *= 16; if ( v9 < 48 || v9 > 57 ) { if ( v9 < 97 || v9 > 102 ) { if ( v9 < 65 || v9 > 70 ) { std::allocator<char>::allocator(); std::string::basic_string(v8, "Bad unicode escape sequence in string: hexadecimal digit expected.", &v7); v19 = Json::Reader::addError(a1, (long long)v8, v17, *v16) & 1; std::string::~string(v8); std::allocator<char>::~allocator(&v7); return v19 & 1; } v11 += v9 - 65 + 10; } else { v11 += v9 - 97 + 10; } } else { v11 += v9 - 48; } } *v14 = v11; v19 = 1; } else { std::allocator<char>::allocator(); std::string::basic_string(v13, "Bad unicode escape sequence in string: four digits expected.", &v12); v19 = Json::Reader::addError(a1, (long long)v13, v17, *v16) & 1; std::string::~string(v13); std::allocator<char>::~allocator(&v12); } return v19 & 1; }
32,358
Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool Reader::decodeUnicodeEscapeSequence(Token& token, Location& current, Location end, unsigned int& ret_unicode) { if (end - current < 4) return addError( "Bad unicode escape sequence in string: four digits expected.", token, current); int unicode = 0; for (int index = 0; index < 4; ++index) { Char c = *current++; unicode *= 16; if (c >= '0' && c <= '9') unicode += c - '0'; else if (c >= 'a' && c <= 'f') unicode += c - 'a' + 10; else if (c >= 'A' && c <= 'F') unicode += c - 'A' + 10; else return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current); } ret_unicode = static_cast<unsigned int>(unicode); return true; }
O3
cpp
Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq (%rdx), %rax subq %rax, %rcx cmpq $0x4, %rcx jge 0x6f32e leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x199d3(%rip), %rsi # 0x88cca leaq 0x19a08(%rip), %rdx # 0x88d06 leaq 0x8(%rsp), %rdi callq 0x1e620 movq (%r15), %rcx leaq 0x8(%rsp), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x6d944 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x6f32a callq 0x1f0e0 xorl %eax, %eax jmp 0x6f37c incq %rax xorl %ecx, %ecx movl $0x4, %edx movq %rax, (%r15) movsbl -0x1(%rax), %esi shll $0x4, %ecx leal -0x30(%rsi), %edi cmpb $0x9, %dil ja 0x6f352 addl %esi, %ecx addl $-0x30, %ecx jmp 0x6f370 leal -0x61(%rsi), %edi cmpb $0x5, %dil ja 0x6f362 addl %esi, %ecx addl $-0x57, %ecx jmp 0x6f370 leal -0x41(%rsi), %edi cmpb $0x5, %dil ja 0x6f388 addl %esi, %ecx addl $-0x37, %ecx incq %rax decl %edx jne 0x6f338 movl %ecx, (%r8) movb $0x1, %al addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x1996e(%rip), %rsi # 0x88d07 leaq 0x199a9(%rip), %rdx # 0x88d49 leaq 0x8(%rsp), %rdi callq 0x1e620 movq (%r15), %rcx leaq 0x8(%rsp), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x6d944 jmp 0x6f31b jmp 0x6f3c6 jmp 0x6f3da movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x6f3dd callq 0x1f0e0 jmp 0x6f3dd movq %rax, %rbx movq %rbx, %rdi callq 0x1ffd0 nop
_ZN4Json6Reader27decodeUnicodeEscapeSequenceERNS0_5TokenERPKcS4_Rj: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rdx mov rbx, rsi mov r14, rdi mov rax, [rdx] sub rcx, rax cmp rcx, 4 jge short loc_6F32E lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea rsi, aBadUnicodeEsca; "Bad unicode escape sequence in string: "... lea rdx, aBadUnicodeEsca+3Ch; "" 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, [r15]; int lea rsi, [rsp+48h+var_40]; int mov rdi, r14; int mov rdx, rbx; int call _ZN4Json6Reader8addErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_5TokenEPKc; Json::Reader::addError(std::string const&,Json::Reader::Token &,char const*) loc_6F31B: mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_6F32A call __ZdlPv; operator delete(void *) loc_6F32A: xor eax, eax jmp short loc_6F37C loc_6F32E: inc rax xor ecx, ecx mov edx, 4 loc_6F338: mov [r15], rax movsx esi, byte ptr [rax-1] shl ecx, 4 lea edi, [rsi-30h] cmp dil, 9 ja short loc_6F352 add ecx, esi add ecx, 0FFFFFFD0h jmp short loc_6F370 loc_6F352: lea edi, [rsi-61h] cmp dil, 5 ja short loc_6F362 add ecx, esi add ecx, 0FFFFFFA9h jmp short loc_6F370 loc_6F362: lea edi, [rsi-41h] cmp dil, 5 ja short loc_6F388 add ecx, esi add ecx, 0FFFFFFC9h loc_6F370: inc rax dec edx jnz short loc_6F338 mov [r8], ecx mov al, 1 loc_6F37C: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_6F388: lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea rsi, aBadUnicodeEsca_0; "Bad unicode escape sequence in string: "... lea rdx, aBadUnicodeEsca_0+42h; "" 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, [r15]; int lea rsi, [rsp+48h+var_40]; int mov rdi, r14; int mov rdx, rbx; int call _ZN4Json6Reader8addErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_5TokenEPKc; Json::Reader::addError(std::string const&,Json::Reader::Token &,char const*) jmp loc_6F31B jmp short loc_6F3C6 jmp short loc_6F3DA loc_6F3C6: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_6F3DD call __ZdlPv; operator delete(void *) jmp short loc_6F3DD loc_6F3DA: mov rbx, rax loc_6F3DD: mov rdi, rbx call __Unwind_Resume
char Json::Reader::decodeUnicodeEscapeSequence(long long a1, int a2, long long *a3, long long a4, int *a5) { long long v8; // rax int v9; // ecx int v10; // edx int v11; // esi int v12; // ecx void *v13[2]; // [rsp+8h] [rbp-40h] BYREF _BYTE v14[48]; // [rsp+18h] [rbp-30h] BYREF if ( a4 - *a3 >= 4 ) { v8 = *a3 + 1; v9 = 0; v10 = 4; while ( 1 ) { *a3 = v8; v11 = *(char *)(v8 - 1); v12 = 16 * v9; if ( (unsigned __int8)(*(_BYTE *)(v8 - 1) - 48) > 9u ) { if ( (unsigned __int8)(v11 - 97) > 5u ) { if ( (unsigned __int8)(v11 - 65) > 5u ) { v13[0] = v14; std::string::_M_construct<char const*>( v13, "Bad unicode escape sequence in string: hexadecimal digit expected.", ""); Json::Reader::addError(a1, (long long)v13, a2, *a3); goto LABEL_3; } v9 = v11 + v12 - 55; } else { v9 = v11 + v12 - 87; } } else { v9 = v11 + v12 - 48; } ++v8; if ( !--v10 ) { *a5 = v9; return 1; } } } v13[0] = v14; std::string::_M_construct<char const*>(v13, "Bad unicode escape sequence in string: four digits expected.", ""); Json::Reader::addError(a1, (long long)v13, a2, *a3); LABEL_3: if ( v13[0] != v14 ) operator delete(v13[0]); return 0; }
decodeUnicodeEscapeSequence: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDX] SUB RCX,RAX CMP RCX,0x4 JGE 0x0016f32e LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LAB_0016f2f0: LEA RSI,[0x188cca] LEA RDX,[0x188d06] LEA RDI,[RSP + 0x8] CALL 0x0011e620 MOV RCX,qword ptr [R15] LAB_0016f30b: LEA RSI,[RSP + 0x8] MOV RDI,R14 MOV RDX,RBX CALL 0x0016d944 LAB_0016f31b: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0016f32a CALL 0x0011f0e0 LAB_0016f32a: XOR EAX,EAX JMP 0x0016f37c LAB_0016f32e: INC RAX XOR ECX,ECX MOV EDX,0x4 LAB_0016f338: MOV qword ptr [R15],RAX MOVSX ESI,byte ptr [RAX + -0x1] SHL ECX,0x4 LEA EDI,[RSI + -0x30] CMP DIL,0x9 JA 0x0016f352 ADD ECX,ESI ADD ECX,-0x30 JMP 0x0016f370 LAB_0016f352: LEA EDI,[RSI + -0x61] CMP DIL,0x5 JA 0x0016f362 ADD ECX,ESI ADD ECX,-0x57 JMP 0x0016f370 LAB_0016f362: LEA EDI,[RSI + -0x41] CMP DIL,0x5 JA 0x0016f388 ADD ECX,ESI ADD ECX,-0x37 LAB_0016f370: INC RAX DEC EDX JNZ 0x0016f338 MOV dword ptr [R8],ECX MOV AL,0x1 LAB_0016f37c: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_0016f388: LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LAB_0016f392: LEA RSI,[0x188d07] LEA RDX,[0x188d49] LEA RDI,[RSP + 0x8] CALL 0x0011e620 MOV RCX,qword ptr [R15] LAB_0016f3ad: LEA RSI,[RSP + 0x8] MOV RDI,R14 MOV RDX,RBX CALL 0x0016d944 LAB_0016f3bd: JMP 0x0016f31b
/* Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&) */ int8 __thiscall Json::Reader::decodeUnicodeEscapeSequence (Reader *this,Token *param_1,char **param_2,char *param_3,uint *param_4) { char cVar1; char *pcVar2; int8 uVar3; int iVar4; uint uVar5; int iVar6; int iVar7; int1 *local_40 [2]; int1 local_30 [16]; if ((long)param_3 - (long)*param_2 < 4) { local_40[0] = local_30; /* try { // try from 0016f2f0 to 0016f307 has its CatchHandler @ 0016f3da */ std::__cxx11::string::_M_construct<char_const*> (local_40,"Bad unicode escape sequence in string: four digits expected.",""); /* try { // try from 0016f30b to 0016f31a has its CatchHandler @ 0016f3c6 */ addError(this,(string *)local_40,param_1,*param_2); LAB_0016f31b: if (local_40[0] != local_30) { operator_delete(local_40[0]); } uVar3 = 0; } else { pcVar2 = *param_2 + 1; uVar5 = 0; iVar6 = 4; do { *param_2 = pcVar2; cVar1 = pcVar2[-1]; iVar7 = (int)cVar1; iVar4 = uVar5 * 0x10; if ((byte)(cVar1 - 0x30U) < 10) { uVar5 = (iVar4 + iVar7) - 0x30; } else if ((byte)(cVar1 + 0x9fU) < 6) { uVar5 = (iVar4 + iVar7) - 0x57; } else { if (5 < (byte)(cVar1 + 0xbfU)) { local_40[0] = local_30; /* try { // try from 0016f392 to 0016f3a9 has its CatchHandler @ 0016f3c4 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"Bad unicode escape sequence in string: hexadecimal digit expected.", ""); /* try { // try from 0016f3ad to 0016f3bc has its CatchHandler @ 0016f3c2 */ addError(this,(string *)local_40,param_1,*param_2); goto LAB_0016f31b; } uVar5 = (iVar4 + iVar7) - 0x37; } pcVar2 = pcVar2 + 1; iVar6 = iVar6 + -1; } while (iVar6 != 0); *param_4 = uVar5; uVar3 = CONCAT71((int7)((ulong)pcVar2 >> 8),1); } return uVar3; }
32,359
memcmp16
bluesky950520[P]quickjs/quickjs.c
static int memcmp16(const uint16_t *src1, const uint16_t *src2, int len) { int c, i; for(i = 0; i < len; i++) { c = src1[i] - src2[i]; if (c != 0) return c; } return 0; }
O0
c
memcmp16: movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movl %edx, -0x1c(%rsp) movl $0x0, -0x24(%rsp) movl -0x24(%rsp), %eax cmpl -0x1c(%rsp), %eax jge 0x5c1c2 movq -0x10(%rsp), %rax movslq -0x24(%rsp), %rcx movzwl (%rax,%rcx,2), %eax movq -0x18(%rsp), %rcx movslq -0x24(%rsp), %rdx movzwl (%rcx,%rdx,2), %ecx subl %ecx, %eax movl %eax, -0x20(%rsp) cmpl $0x0, -0x20(%rsp) je 0x5c1b3 movl -0x20(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0x5c1ca jmp 0x5c1b5 movl -0x24(%rsp), %eax addl $0x1, %eax movl %eax, -0x24(%rsp) jmp 0x5c176 movl $0x0, -0x4(%rsp) movl -0x4(%rsp), %eax retq nop
memcmp16: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_1C], edx mov [rsp+var_24], 0 loc_5C176: mov eax, [rsp+var_24] cmp eax, [rsp+var_1C] jge short loc_5C1C2 mov rax, [rsp+var_10] movsxd rcx, [rsp+var_24] movzx eax, word ptr [rax+rcx*2] mov rcx, [rsp+var_18] movsxd rdx, [rsp+var_24] movzx ecx, word ptr [rcx+rdx*2] sub eax, ecx mov [rsp+var_20], eax cmp [rsp+var_20], 0 jz short loc_5C1B3 mov eax, [rsp+var_20] mov [rsp+var_4], eax jmp short loc_5C1CA loc_5C1B3: jmp short $+2 loc_5C1B5: mov eax, [rsp+var_24] add eax, 1 mov [rsp+var_24], eax jmp short loc_5C176 loc_5C1C2: mov [rsp+var_4], 0 loc_5C1CA: mov eax, [rsp+var_4] retn
long long memcmp16(long long a1, long long a2, int a3) { int i; // [rsp+0h] [rbp-24h] for ( i = 0; i < a3; ++i ) { if ( *(unsigned __int16 *)(a1 + 2LL * i) != *(unsigned __int16 *)(a2 + 2LL * i) ) return (unsigned int)(*(unsigned __int16 *)(a1 + 2LL * i) - *(unsigned __int16 *)(a2 + 2LL * i)); } return 0; }
memcmp16: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV dword ptr [RSP + -0x1c],EDX MOV dword ptr [RSP + -0x24],0x0 LAB_0015c176: MOV EAX,dword ptr [RSP + -0x24] CMP EAX,dword ptr [RSP + -0x1c] JGE 0x0015c1c2 MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x24] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RSP + -0x18] MOVSXD RDX,dword ptr [RSP + -0x24] MOVZX ECX,word ptr [RCX + RDX*0x2] SUB EAX,ECX MOV dword ptr [RSP + -0x20],EAX CMP dword ptr [RSP + -0x20],0x0 JZ 0x0015c1b3 MOV EAX,dword ptr [RSP + -0x20] MOV dword ptr [RSP + -0x4],EAX JMP 0x0015c1ca LAB_0015c1b3: JMP 0x0015c1b5 LAB_0015c1b5: MOV EAX,dword ptr [RSP + -0x24] ADD EAX,0x1 MOV dword ptr [RSP + -0x24],EAX JMP 0x0015c176 LAB_0015c1c2: MOV dword ptr [RSP + -0x4],0x0 LAB_0015c1ca: MOV EAX,dword ptr [RSP + -0x4] RET
int memcmp16(long param_1,long param_2,int param_3) { int iVar1; int local_24; local_24 = 0; while( true ) { if (param_3 <= local_24) { return 0; } iVar1 = (uint)*(ushort *)(param_1 + (long)local_24 * 2) - (uint)*(ushort *)(param_2 + (long)local_24 * 2); if (iVar1 != 0) break; local_24 = local_24 + 1; } return iVar1; }
32,360
POINTonE1_sign
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c
static void POINTonE1_sign(POINTonE1 *out, const POINTonE1 *in, const pow256 SK) { vec384 Z, ZZ; limb_t inf; POINTonE1_mult_glv(out, in, SK); /* convert to affine to remove possible bias in out->Z */ inf = vec_is_zero(out->Z, sizeof(out->Z)); #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION flt_reciprocal_fp(Z, out->Z); /* 1/Z */ #else reciprocal_fp(Z, out->Z); /* 1/Z */ #endif sqr_fp(ZZ, Z); mul_fp(out->X, out->X, ZZ); /* X = X/Z^2 */ mul_fp(ZZ, ZZ, Z); mul_fp(out->Y, out->Y, ZZ); /* Y = Y/Z^3 */ vec_select(out->Z, out->Z, BLS12_381_G1.Z, sizeof(BLS12_381_G1.Z), inf); /* Z = inf ? 0 : 1 */ }
O1
c
POINTonE1_sign: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %r15 callq 0x5fa01 leaq 0x60(%r15), %rbx movl $0x30, %esi movq %rbx, %rdi callq 0x74d40 movq %rax, %r14 leaq 0x31ae0(%rip), %rdx # 0x90f80 leaq -0x60(%rbp), %rdi movl $0x17d, %ecx # imm = 0x17D movq %rbx, %rsi callq 0x6acb3 leaq 0x31788(%rip), %r12 # 0x90c40 leaq -0x90(%rbp), %r13 movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD movq %r13, %rdi leaq -0x60(%rbp), %rsi movq %r12, %rdx callq 0x78b20 movq %r15, %rdi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 movq %r13, %rdi movq %r13, %rsi leaq -0x60(%rbp), %rdx movq %r12, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 addq $0x30, %r15 movq %r15, %rdi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 leaq 0x313eb(%rip), %rdx # 0x90920 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rcx callq 0x746a0 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
POINTonE1_sign: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r15, rdi call POINTonE1_mult_glv lea rbx, [r15+60h] mov esi, 30h ; '0' mov rdi, rbx call vec_is_zero_16x mov r14, rax lea rdx, _flt_reciprocal_fp_BLS12_381_P_minus_2 lea rdi, [rbp+var_60] mov ecx, 17Dh mov rsi, rbx call exp_mont_384 lea r12, BLS12_381_P lea r13, [rbp+var_90] mov rcx, 89F3FFFCFFFCFFFDh mov rdi, r13 lea rsi, [rbp+var_60] mov rdx, r12 call sqr_mont_384 mov rdi, r15 mov rsi, r15 mov rdx, r13 mov rcx, r12 mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_60] mov rcx, r12 mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 add r15, 30h ; '0' mov rdi, r15 mov rsi, r15 mov rdx, r13 mov rcx, r12 mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 lea rdx, unk_90920 mov rdi, rbx mov rsi, rbx mov rcx, r14 call vec_select_48 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long POINTonE1_sign(long long a1) { long long is_zero_16x; // r14 _BYTE v4[48]; // [rsp+0h] [rbp-90h] BYREF _BYTE v5[96]; // [rsp+30h] [rbp-60h] BYREF POINTonE1_mult_glv(); is_zero_16x = vec_is_zero_16x(a1 + 96, 48LL); exp_mont_384(v5, a1 + 96, &flt_reciprocal_fp_BLS12_381_P_minus_2, 381LL); sqr_mont_384(v4, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(a1, a1, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v4, v4, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(a1 + 48, a1 + 48, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return vec_select_48(a1 + 96, a1 + 96, &unk_90920, is_zero_16x); }
POINTonE1_sign: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R15,RDI CALL 0x0015fa01 LEA RBX,[R15 + 0x60] MOV ESI,0x30 MOV RDI,RBX CALL 0x00174d40 MOV R14,RAX LEA RDX,[0x190f80] LEA RDI,[RBP + -0x60] MOV ECX,0x17d MOV RSI,RBX CALL 0x0016acb3 LEA R12,[0x190c40] LEA R13,[RBP + -0x90] MOV RCX,-0x760c000300030003 MOV RDI,R13 LEA RSI,[RBP + -0x60] MOV RDX,R12 CALL 0x00178b20 MOV RDI,R15 MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 MOV R8,-0x760c000300030003 CALL 0x001792a0 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x60] MOV RCX,R12 MOV R8,-0x760c000300030003 CALL 0x001792a0 ADD R15,0x30 MOV RDI,R15 MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 MOV R8,-0x760c000300030003 CALL 0x001792a0 LEA RDX,[0x190920] MOV RDI,RBX MOV RSI,RBX MOV RCX,R14 CALL 0x001746a0 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void POINTonE1_sign(long param_1) { long lVar1; int8 uVar2; int1 local_98 [48]; int1 local_68 [56]; POINTonE1_mult_glv(); lVar1 = param_1 + 0x60; uVar2 = vec_is_zero_16x(lVar1,0x30); exp_mont_384(local_68,lVar1,flt_reciprocal_fp_BLS12_381_P_minus_2,0x17d); sqr_mont_384(local_98,local_68,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(param_1,param_1,local_98,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_98,local_98,local_68,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0x30,param_1 + 0x30,local_98,BLS12_381_P,0x89f3fffcfffcfffd); vec_select_48(lVar1,lVar1,0x190920,uVar2); return; }
32,361
queue_insert_safe
eloqsql/mysys/queues.c
int queue_insert_safe(QUEUE *queue, uchar *element) { if (queue->elements == queue->max_elements) { if (!queue->auto_extent) return 2; if (resize_queue(queue, queue->max_elements + queue->auto_extent)) return 1; } queue_insert(queue, element); return 0; }
O0
c
queue_insert_safe: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x14(%rcx), %eax jne 0xfeffa movq -0x10(%rbp), %rax cmpl $0x0, 0x20(%rax) jne 0xfefd3 movl $0x2, -0x4(%rbp) jmp 0xff00e movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x14(%rax), %esi movq -0x10(%rbp), %rax addl 0x20(%rax), %esi callq 0xfed80 cmpl $0x0, %eax je 0xfeff8 movl $0x1, -0x4(%rbp) jmp 0xff00e jmp 0xfeffa movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xfee60 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
queue_insert_safe: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+10h] mov rcx, [rbp+var_10] cmp eax, [rcx+14h] jnz short loc_FEFFA mov rax, [rbp+var_10] cmp dword ptr [rax+20h], 0 jnz short loc_FEFD3 mov [rbp+var_4], 2 jmp short loc_FF00E loc_FEFD3: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov esi, [rax+14h] mov rax, [rbp+var_10] add esi, [rax+20h] call resize_queue cmp eax, 0 jz short loc_FEFF8 mov [rbp+var_4], 1 jmp short loc_FF00E loc_FEFF8: jmp short $+2 loc_FEFFA: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call queue_insert mov [rbp+var_4], 0 loc_FF00E: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long queue_insert_safe(_DWORD *a1, long long a2) { if ( a1[4] != a1[5] ) goto LABEL_6; if ( a1[8] ) { if ( (unsigned int)resize_queue((long long)a1, a1[8] + a1[5]) ) return 1; LABEL_6: queue_insert((long long)a1, a2); return 0; } return 2; }
queue_insert_safe: 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 + -0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x14] JNZ 0x001feffa MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x20],0x0 JNZ 0x001fefd3 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001ff00e LAB_001fefd3: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] ADD ESI,dword ptr [RAX + 0x20] CALL 0x001fed80 CMP EAX,0x0 JZ 0x001feff8 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001ff00e LAB_001feff8: JMP 0x001feffa LAB_001feffa: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001fee60 MOV dword ptr [RBP + -0x4],0x0 LAB_001ff00e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 queue_insert_safe(long param_1,int8 param_2) { int iVar1; if (*(int *)(param_1 + 0x10) == *(int *)(param_1 + 0x14)) { if (*(int *)(param_1 + 0x20) == 0) { return 2; } iVar1 = resize_queue(param_1,*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x20)); if (iVar1 != 0) { return 1; } } queue_insert(param_1,param_2); return 0; }
32,362
nlohmann::json_abi_v3_12_0::detail::invalid_iterator nlohmann::json_abi_v3_12_0::detail::invalid_iterator::create<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_12_0::detail::invalid_iterator nlohmann::json_abi_v3_12_0::detail::invalid_iterator::create<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x9550(%rip), %rsi # 0x37a1d leaq 0x9559(%rip), %rdx # 0x37a2d leaq 0x28(%rsp), %rdi callq 0x9a9e leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x29f9c 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 0x1d8bc movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x9fb4 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x9fb4 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x9fb4 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x2e577 movq 0x78(%rsp), %rsi incq %rsi callq 0x8380 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2e592 movq 0x58(%rsp), %rsi incq %rsi callq 0x8380 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x2e5a9 movq 0x38(%rsp), %rsi incq %rsi callq 0x8380 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x2a204 leaq 0x1f6c9(%rip), %rax # 0x4dc88 movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x2e5d9 movq 0x18(%rsp), %rsi incq %rsi callq 0x8380 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 0x2e667 movq 0x18(%rsp), %rsi jmp 0x2e65f movq %rax, %rbx jmp 0x2e650 movq %rax, %rbx jmp 0x2e667 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x2e629 movq 0x18(%rsp), %rsi incq %rsi callq 0x8380 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 0x8d2c movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x2e667 movq 0x38(%rsp), %rsi incq %rsi callq 0x8380 movq %rbx, %rdi callq 0x85d0 nop
_ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: 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, aInvalidIterato; "invalid_iterator" lea rdx, aInvalidIterato+10h; "" 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_12_06detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_12_0::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_2E577 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E577: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2E592 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E592: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_2E5A9 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E5A9: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_12_06detail9exceptionC2EiPKc; nlohmann::json_abi_v3_12_0::detail::exception::exception(int,char const*) lea rax, off_4DC88 mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_2E5D9 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E5D9: 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_2E667 mov rsi, [rsp+arg_10] jmp short loc_2E65F mov rbx, rax jmp short loc_2E650 mov rbx, rax jmp short loc_2E667 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_2E629 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E629: 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_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_2E650: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_2E667 mov rsi, [rsp+arg_30] loc_2E65F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E667: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_12_0::detail::exception * ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_12_0::detail::exception *this, int a2, long long 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, "invalid_iterator", (long long)""); nlohmann::json_abi_v3_12_0::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((long long)v5, v10 + *(_QWORD *)(a3 + 8)); std::string::_M_append(v5, *(_BYTE **)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *(_BYTE **)a3, *(_QWORD *)(a3 + 8)); 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_12_0::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = off_4DC88; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: 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_0012e4c6: LEA RSI,[0x137a1d] LEA RDX,[0x137a2d] LEA RDI,[RSP + 0x28] CALL 0x00109a9e LAB_0012e4de: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x00129f9c 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_0012e51d: LEA RDI,[RSP + 0x8] CALL 0x0011d8bc MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x00109fb4 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x00109fb4 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x00109fb4 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0012e577 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00108380 LAB_0012e577: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012e592 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00108380 LAB_0012e592: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0012e5a9 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00108380 LAB_0012e5a9: MOV RDX,qword ptr [RSP + 0x8] LAB_0012e5ae: MOV RDI,RBX MOV ESI,EBP CALL 0x0012a204 LAB_0012e5b8: LEA RAX,[0x14dc88] MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0012e5d9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108380 LAB_0012e5d9: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (exception *param_1,int param_2,int8 *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; ulong local_78; long local_70 [2]; char *local_60; ulong local_58; char local_50; int7 uStack_4f; /* try { // try from 0012e4c6 to 0012e4dd has its CatchHandler @ 0012e607 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator",""); /* try { // try from 0012e4de to 0012e4ee has its CatchHandler @ 0012e602 */ nlohmann::json_abi_v3_12_0::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 0012e51d to 0012e55f has its CatchHandler @ 0012e60c */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((string *)&local_c0,param_3[1] + local_78); std::__cxx11::string::_M_append((string *)&local_c0,(char *)local_80,local_78); std::__cxx11::string::_M_append((string *)&local_c0,local_60,local_58); std::__cxx11::string::_M_append((string *)&local_c0,(char *)*param_3,param_3[1]); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0012e5ae to 0012e5b7 has its CatchHandler @ 0012e5ee */ nlohmann::json_abi_v3_12_0::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_0014dc88; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
32,363
ma_hashtbl_delete
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record) { uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; if (!hash->records) return(1); blength=hash->blength; data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) return(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; hash->current_record= NO_RECORD; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos->data=empty->data; pos->next=empty->next; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr=rec_hashnr(hash,lastpos->data); /* pos is where lastpos should be */ pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr=rec_hashnr(hash,pos->data); /* pos3 is where the pos should be */ pos3= data+hash_mask(pos_hashnr,hash->blength,hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= hash_mask(lastpos_hashnr,blength,hash->records+1); if (pos2 == hash_mask(pos_hashnr,blength,hash->records+1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: ma_pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); return(0); }
O3
c
ma_hashtbl_delete: movb $0x1, %al cmpl $0x0, 0x8(%rdi) je 0x30e38 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 movl 0xc(%rdi), %r12d movq 0x18(%rdi), %r13 movq 0x30(%rdi), %rax testq %rax, %rax je 0x30bcc leaq -0x58(%rbp), %r15 movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi movl (%r15), %esi jmp 0x30bd9 movl 0x4(%r14), %esi movl %esi, -0x58(%rbp) movl (%r14), %edi addq %rbx, %rdi callq *0x40(%r14) movl %eax, %r15d movl 0x8(%r14), %esi leal -0x1(%r12), %r8d andl %r8d, %eax shrl %r12d decl %r12d movq %r12, -0x70(%rbp) andl %r12d, %r15d cmpl %esi, %eax cmovbl %eax, %r15d movq %r15, %rax shlq $0x4, %rax leaq (%rax,%r13), %r12 cmpq %rbx, 0x8(%r13,%rax) je 0x30c36 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl (%r12), %r15d cmpq %rcx, %r15 je 0x30c6b movq %r12, %rax movq %r15, %rdx shlq $0x4, %rdx leaq (%rdx,%r13), %r12 cmpq %rbx, 0x8(%r13,%rdx) jne 0x30c16 jmp 0x30c38 xorl %eax, %eax decl %esi movl %esi, 0x8(%r14) movl 0xc(%r14), %ecx shrl %ecx cmpl %ecx, %esi jae 0x30c4c movl %ecx, 0xc(%r14) movl $0xffffffff, 0x10(%r14) # imm = 0xFFFFFFFF movl %esi, %r9d shlq $0x4, %r9 addq %r13, %r9 movl (%r12), %ecx testq %rax, %rax je 0x30c72 movl %ecx, (%rax) jmp 0x30c98 movb $0x1, %al jmp 0x30e2a cmpl $-0x1, %ecx je 0x30c98 movq %rcx, %rax shlq $0x4, %rax movq 0x8(%r13,%rax), %rdx movq %rdx, 0x8(%r12) movl (%r13,%rax), %edx movl %edx, (%r12) leaq (%rax,%r13), %r12 movl %ecx, %r15d leaq 0x18(%r14), %rdi cmpq %r9, %r12 je 0x30e15 movq %rdi, -0x38(%rbp) movl %r8d, -0x54(%rbp) movl %esi, -0x50(%rbp) movq %r9, -0x48(%rbp) movq 0x8(%r9), %rdi movq 0x30(%r14), %rax testq %rax, %rax movq %rbx, -0x40(%rbp) je 0x30cd7 leaq -0x5c(%rbp), %rbx movq %rbx, %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi movl (%rbx), %esi jmp 0x30ce4 movl 0x4(%r14), %esi movl %esi, -0x5c(%rbp) movl (%r14), %eax addq %rax, %rdi callq *0x40(%r14) movl 0xc(%r14), %ebx leal -0x1(%rbx), %ecx andl %eax, %ecx shrl %ebx decl %ebx andl %eax, %ebx cmpl 0x8(%r14), %ecx cmovbl %ecx, %ebx movq %rbx, %rcx shlq $0x4, %rcx addq %r13, %rcx cmpq %r12, %rcx je 0x30d34 movl %eax, -0x4c(%rbp) movq %rcx, -0x68(%rbp) movq 0x8(%rcx), %rdi movq 0x30(%r14), %rax testq %rax, %rax je 0x30d45 leaq -0x2c(%rbp), %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi leaq -0x2c(%rbp), %rax movl (%rax), %esi jmp 0x30d52 movq -0x48(%rbp), %rax movups (%rax), %xmm0 movups %xmm0, (%r12) jmp 0x30e0d movl 0x4(%r14), %esi movl %esi, -0x2c(%rbp) movl (%r14), %eax addq %rax, %rdi callq *0x40(%r14) movl 0x8(%r14), %ecx movl 0xc(%r14), %edx leal -0x1(%rdx), %esi andl %eax, %esi shrl %edx decl %edx andl %eax, %edx cmpl %ecx, %esi cmovbl %esi, %edx cmpl %edx, %ebx jne 0x30de1 leal 0x1(%rcx), %edx movl -0x4c(%rbp), %r9d movl %r9d, %esi movl -0x54(%rbp), %r8d andl %r8d, %esi movq -0x70(%rbp), %rdi andl %edi, %r9d cmpl %edx, %esi cmovbl %esi, %r9d andl %eax, %r8d andl %edi, %eax cmpl %edx, %r8d cmovbl %r8d, %eax movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpl %eax, %r9d movq -0x48(%rbp), %rax movq -0x68(%rbp), %rdi jne 0x30db9 cmpl %ecx, %r9d jne 0x30e39 movl %ebx, %edx movups (%rax), %xmm0 movups %xmm0, (%r12) movl (%rdi), %eax movl %r15d, %esi movl %esi, %ecx shlq $0x4, %rcx movl (%r13,%rcx), %esi cmpl %edx, %esi jne 0x30dc6 addq %rcx, %r13 movl %eax, (%r13) movl %r15d, (%rdi) jmp 0x30e0d movq -0x68(%rbp), %rcx movups (%rcx), %xmm0 movups %xmm0, (%r12) movq -0x48(%rbp), %rax movups (%rax), %xmm0 movups %xmm0, (%rcx) movl %edx, %eax shlq $0x4, %rax movl (%r13,%rax), %edx cmpl %ebx, %edx jne 0x30df7 addq %rax, %r13 movl %r15d, (%r13) movq -0x40(%rbp), %rbx movq -0x38(%rbp), %rdi callq 0x2f935 movq 0x38(%r14), %rax testq %rax, %rax je 0x30e28 movq %rbx, %rdi callq *%rax xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%rax), %xmm0 movups %xmm0, (%r12) movl -0x50(%rbp), %ecx movl %ebx, %eax shlq $0x4, %rax movl (%r13,%rax), %ebx cmpl %ecx, %ebx jne 0x30e44 jmp 0x30e06
ma_hashtbl_delete: mov al, 1 cmp dword ptr [rdi+8], 0 jz locret_30E38 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi mov r12d, [rdi+0Ch] mov r13, [rdi+18h] mov rax, [rdi+30h] test rax, rax jz short loc_30BCC lea r15, [rbp-58h] mov rdi, rbx mov rsi, r15 xor edx, edx call rax mov rdi, rax mov esi, [r15] jmp short loc_30BD9 loc_30BCC: mov esi, [r14+4] mov [rbp-58h], esi mov edi, [r14] add rdi, rbx loc_30BD9: call qword ptr [r14+40h] mov r15d, eax mov esi, [r14+8] lea r8d, [r12-1] and eax, r8d shr r12d, 1 dec r12d mov [rbp-70h], r12 and r15d, r12d cmp eax, esi cmovb r15d, eax mov rax, r15 shl rax, 4 lea r12, [rax+r13] cmp [r13+rax+8], rbx jz short loc_30C36 mov ecx, 0FFFFFFFFh loc_30C16: mov r15d, [r12] cmp r15, rcx jz short loc_30C6B mov rax, r12 mov rdx, r15 shl rdx, 4 lea r12, [rdx+r13] cmp [r13+rdx+8], rbx jnz short loc_30C16 jmp short loc_30C38 loc_30C36: xor eax, eax loc_30C38: dec esi mov [r14+8], esi mov ecx, [r14+0Ch] shr ecx, 1 cmp esi, ecx jnb short loc_30C4C mov [r14+0Ch], ecx loc_30C4C: mov dword ptr [r14+10h], 0FFFFFFFFh mov r9d, esi shl r9, 4 add r9, r13 mov ecx, [r12] test rax, rax jz short loc_30C72 mov [rax], ecx jmp short loc_30C98 loc_30C6B: mov al, 1 jmp loc_30E2A loc_30C72: cmp ecx, 0FFFFFFFFh jz short loc_30C98 mov rax, rcx shl rax, 4 mov rdx, [r13+rax+8] mov [r12+8], rdx mov edx, [r13+rax+0] mov [r12], edx lea r12, [rax+r13] mov r15d, ecx loc_30C98: lea rdi, [r14+18h] cmp r12, r9 jz loc_30E15 mov [rbp-38h], rdi mov [rbp-54h], r8d mov [rbp-50h], esi mov [rbp-48h], r9 mov rdi, [r9+8] mov rax, [r14+30h] test rax, rax mov [rbp-40h], rbx jz short loc_30CD7 lea rbx, [rbp-5Ch] mov rsi, rbx xor edx, edx call rax mov rdi, rax mov esi, [rbx] jmp short loc_30CE4 loc_30CD7: mov esi, [r14+4] mov [rbp-5Ch], esi mov eax, [r14] add rdi, rax loc_30CE4: call qword ptr [r14+40h] mov ebx, [r14+0Ch] lea ecx, [rbx-1] and ecx, eax shr ebx, 1 dec ebx and ebx, eax cmp ecx, [r14+8] cmovb ebx, ecx mov rcx, rbx shl rcx, 4 add rcx, r13 cmp rcx, r12 jz short loc_30D34 mov [rbp-4Ch], eax mov [rbp-68h], rcx mov rdi, [rcx+8] mov rax, [r14+30h] test rax, rax jz short loc_30D45 lea rsi, [rbp-2Ch] xor edx, edx call rax mov rdi, rax lea rax, [rbp-2Ch] mov esi, [rax] jmp short loc_30D52 loc_30D34: mov rax, [rbp-48h] movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 jmp loc_30E0D loc_30D45: mov esi, [r14+4] mov [rbp-2Ch], esi mov eax, [r14] add rdi, rax loc_30D52: call qword ptr [r14+40h] mov ecx, [r14+8] mov edx, [r14+0Ch] lea esi, [rdx-1] and esi, eax shr edx, 1 dec edx and edx, eax cmp esi, ecx cmovb edx, esi cmp ebx, edx jnz short loc_30DE1 lea edx, [rcx+1] mov r9d, [rbp-4Ch] mov esi, r9d mov r8d, [rbp-54h] and esi, r8d mov rdi, [rbp-70h] and r9d, edi cmp esi, edx cmovb r9d, esi and r8d, eax and eax, edi cmp r8d, edx cmovb eax, r8d mov edx, 0FFFFFFFFh cmp r9d, eax mov rax, [rbp-48h] mov rdi, [rbp-68h] jnz short loc_30DB9 cmp r9d, ecx jnz loc_30E39 mov edx, ebx loc_30DB9: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 mov eax, [rdi] mov esi, r15d loc_30DC6: mov ecx, esi shl rcx, 4 mov esi, [r13+rcx+0] cmp esi, edx jnz short loc_30DC6 add r13, rcx mov [r13+0], eax mov [rdi], r15d jmp short loc_30E0D loc_30DE1: mov rcx, [rbp-68h] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 mov rax, [rbp-48h] movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_30DF7: mov eax, edx shl rax, 4 mov edx, [r13+rax+0] cmp edx, ebx jnz short loc_30DF7 loc_30E06: add r13, rax mov [r13+0], r15d loc_30E0D: mov rbx, [rbp-40h] mov rdi, [rbp-38h] loc_30E15: call ma_pop_dynamic mov rax, [r14+38h] test rax, rax jz short loc_30E28 mov rdi, rbx call rax loc_30E28: xor eax, eax loc_30E2A: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_30E38: retn loc_30E39: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 mov ecx, [rbp-50h] loc_30E44: mov eax, ebx shl rax, 4 mov ebx, [r13+rax+0] cmp ebx, ecx jnz short loc_30E44 jmp short loc_30E06
char ma_hashtbl_delete(unsigned int *a1, long long a2) { char result; // al long long v3; // rbx unsigned int v5; // r12d long long v6; // r13 long long ( *v7)(long long, unsigned int *, _QWORD); // rax long long v8; // rdi long long v9; // rsi unsigned int v10; // r15d unsigned int v11; // esi unsigned int v12; // r8d unsigned int v13; // eax long long v14; // r15 unsigned int *v15; // r12 unsigned int *v16; // rax unsigned int v17; // esi unsigned int v18; // ecx long long v19; // r9 long long v20; // rcx long long v21; // rdi long long v22; // rdi long long ( *v23)(long long, unsigned int *, _QWORD); // rax long long v24; // rdi long long v25; // rsi unsigned int v26; // eax unsigned int v27; // ebx unsigned int v28; // ecx long long v29; // rbx long long v30; // rcx long long v31; // rdi long long ( *v32)(long long, unsigned int *, _QWORD); // rax long long v33; // rdi long long v34; // rsi int v35; // eax unsigned int v36; // ecx unsigned int v37; // edx unsigned int v38; // esi unsigned int v39; // edx int v40; // r9d unsigned int v41; // r8d int v42; // eax int v43; // edx unsigned int v44; // esi long long v45; // rcx long long v46; // rax void ( *v47)(long long); // rax int v48; // [rsp-78h] [rbp-78h] _DWORD *v49; // [rsp-70h] [rbp-70h] unsigned int v50; // [rsp-64h] [rbp-64h] BYREF unsigned int v51; // [rsp-60h] [rbp-60h] BYREF unsigned int v52; // [rsp-5Ch] [rbp-5Ch] unsigned int v53; // [rsp-58h] [rbp-58h] unsigned int v54; // [rsp-54h] [rbp-54h] _OWORD *v55; // [rsp-50h] [rbp-50h] long long v56; // [rsp-48h] [rbp-48h] unsigned int *v57; // [rsp-40h] [rbp-40h] unsigned int v58; // [rsp-34h] [rbp-34h] BYREF result = 1; if ( !a1[2] ) return result; v3 = a2; v5 = a1[3]; v6 = *((_QWORD *)a1 + 3); v7 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); if ( v7 ) { v8 = v7(a2, &v51, 0LL); v9 = v51; } else { v9 = a1[1]; v51 = a1[1]; v8 = v3 + *a1; } v10 = (*((long long ( **)(long long, long long))a1 + 8))(v8, v9); v11 = a1[2]; v12 = v5 - 1; v13 = (v5 - 1) & v10; v48 = (v5 >> 1) - 1; v14 = v48 & v10; if ( v13 < v11 ) v14 = v13; v15 = (unsigned int *)(16 * v14 + v6); if ( *((_QWORD *)v15 + 1) == v3 ) { v16 = 0LL; LABEL_12: v17 = v11 - 1; a1[2] = v17; v18 = a1[3] >> 1; if ( v17 < v18 ) a1[3] = v18; a1[4] = -1; v19 = v6 + 16LL * v17; v20 = *v15; if ( v16 ) { *v16 = v20; } else if ( (_DWORD)v20 != -1 ) { *((_QWORD *)v15 + 1) = *(_QWORD *)(v6 + 16 * v20 + 8); *v15 = *(_DWORD *)(v6 + 16 * v20); v15 = (unsigned int *)(16 * v20 + v6); LODWORD(v14) = v20; } v21 = (long long)(a1 + 6); if ( v15 == (unsigned int *)v19 ) goto LABEL_47; v57 = a1 + 6; v52 = v12; v53 = v17; v55 = (_OWORD *)(v6 + 16LL * v17); v22 = *(_QWORD *)(v19 + 8); v23 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); v56 = v3; if ( v23 ) { v24 = v23(v22, &v50, 0LL); v25 = v50; } else { v25 = a1[1]; v50 = a1[1]; v24 = *a1 + v22; } v26 = (*((long long ( **)(long long, long long))a1 + 8))(v24, v25); v27 = a1[3]; v28 = v26 & (v27 - 1); v29 = v26 & ((v27 >> 1) - 1); if ( v28 < a1[2] ) v29 = v28; v30 = v6 + 16 * v29; if ( (unsigned int *)v30 == v15 ) { *(_OWORD *)v15 = *v55; } else { v54 = v26; v49 = (_DWORD *)(v6 + 16 * v29); v31 = *(_QWORD *)(v30 + 8); v32 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); if ( v32 ) { v33 = v32(v31, &v58, 0LL); v34 = v58; } else { v34 = a1[1]; v58 = a1[1]; v33 = *a1 + v31; } v35 = (*((long long ( **)(long long, long long))a1 + 8))(v33, v34); v36 = a1[2]; v37 = a1[3]; v38 = v35 & (v37 - 1); v39 = v35 & ((v37 >> 1) - 1); if ( v38 < v36 ) v39 = v38; if ( (_DWORD)v29 == v39 ) { v40 = v48 & v54; if ( (v52 & v54) < v36 + 1 ) v40 = v52 & v54; v41 = v35 & v52; v42 = v48 & v35; if ( v41 < v36 + 1 ) v42 = v41; v43 = -1; if ( v40 != v42 ) goto LABEL_40; if ( v40 == v36 ) { v43 = v29; LABEL_40: *(_OWORD *)v15 = *v55; v44 = v14; do { v45 = 16LL * v44; v44 = *(_DWORD *)(v6 + v45); } while ( v44 != v43 ); *(_DWORD *)(v45 + v6) = *v49; *v49 = v14; goto LABEL_46; } *(_OWORD *)v15 = *v55; do { v46 = 16LL * (unsigned int)v29; LODWORD(v29) = *(_DWORD *)(v6 + v46); } while ( (_DWORD)v29 != v53 ); } else { *(_OWORD *)v15 = *(_OWORD *)v49; *(_OWORD *)v49 = *v55; do { v46 = 16LL * v39; v39 = *(_DWORD *)(v6 + v46); } while ( v39 != (_DWORD)v29 ); } *(_DWORD *)(v46 + v6) = v14; } LABEL_46: v3 = v56; v21 = (long long)v57; LABEL_47: ma_pop_dynamic(v21); v47 = (void ( *)(long long))*((_QWORD *)a1 + 7); if ( v47 ) v47(v3); return 0; } while ( 1 ) { v14 = *v15; if ( v14 == 0xFFFFFFFFLL ) return 1; v16 = v15; v15 = (unsigned int *)(16 * v14 + v6); if ( *((_QWORD *)v15 + 1) == v3 ) goto LABEL_12; } }
ma_hashtbl_delete: MOV AL,0x1 CMP dword ptr [RDI + 0x8],0x0 JZ 0x00130e38 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI MOV R12D,dword ptr [RDI + 0xc] MOV R13,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x00130bcc LEA R15,[RBP + -0x58] MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL RAX MOV RDI,RAX MOV ESI,dword ptr [R15] JMP 0x00130bd9 LAB_00130bcc: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x58],ESI MOV EDI,dword ptr [R14] ADD RDI,RBX LAB_00130bd9: CALL qword ptr [R14 + 0x40] MOV R15D,EAX MOV ESI,dword ptr [R14 + 0x8] LEA R8D,[R12 + -0x1] AND EAX,R8D SHR R12D,0x1 DEC R12D MOV qword ptr [RBP + -0x70],R12 AND R15D,R12D CMP EAX,ESI CMOVC R15D,EAX MOV RAX,R15 SHL RAX,0x4 LEA R12,[RAX + R13*0x1] CMP qword ptr [R13 + RAX*0x1 + 0x8],RBX JZ 0x00130c36 MOV ECX,0xffffffff LAB_00130c16: MOV R15D,dword ptr [R12] CMP R15,RCX JZ 0x00130c6b MOV RAX,R12 MOV RDX,R15 SHL RDX,0x4 LEA R12,[RDX + R13*0x1] CMP qword ptr [R13 + RDX*0x1 + 0x8],RBX JNZ 0x00130c16 JMP 0x00130c38 LAB_00130c36: XOR EAX,EAX LAB_00130c38: DEC ESI MOV dword ptr [R14 + 0x8],ESI MOV ECX,dword ptr [R14 + 0xc] SHR ECX,0x1 CMP ESI,ECX JNC 0x00130c4c MOV dword ptr [R14 + 0xc],ECX LAB_00130c4c: MOV dword ptr [R14 + 0x10],0xffffffff MOV R9D,ESI SHL R9,0x4 ADD R9,R13 MOV ECX,dword ptr [R12] TEST RAX,RAX JZ 0x00130c72 MOV dword ptr [RAX],ECX JMP 0x00130c98 LAB_00130c6b: MOV AL,0x1 JMP 0x00130e2a LAB_00130c72: CMP ECX,-0x1 JZ 0x00130c98 MOV RAX,RCX SHL RAX,0x4 MOV RDX,qword ptr [R13 + RAX*0x1 + 0x8] MOV qword ptr [R12 + 0x8],RDX MOV EDX,dword ptr [R13 + RAX*0x1] MOV dword ptr [R12],EDX LEA R12,[RAX + R13*0x1] MOV R15D,ECX LAB_00130c98: LEA RDI,[R14 + 0x18] CMP R12,R9 JZ 0x00130e15 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x54],R8D MOV dword ptr [RBP + -0x50],ESI MOV qword ptr [RBP + -0x48],R9 MOV RDI,qword ptr [R9 + 0x8] MOV RAX,qword ptr [R14 + 0x30] TEST RAX,RAX MOV qword ptr [RBP + -0x40],RBX JZ 0x00130cd7 LEA RBX,[RBP + -0x5c] MOV RSI,RBX XOR EDX,EDX CALL RAX MOV RDI,RAX MOV ESI,dword ptr [RBX] JMP 0x00130ce4 LAB_00130cd7: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x5c],ESI MOV EAX,dword ptr [R14] ADD RDI,RAX LAB_00130ce4: CALL qword ptr [R14 + 0x40] MOV EBX,dword ptr [R14 + 0xc] LEA ECX,[RBX + -0x1] AND ECX,EAX SHR EBX,0x1 DEC EBX AND EBX,EAX CMP ECX,dword ptr [R14 + 0x8] CMOVC EBX,ECX MOV RCX,RBX SHL RCX,0x4 ADD RCX,R13 CMP RCX,R12 JZ 0x00130d34 MOV dword ptr [RBP + -0x4c],EAX MOV qword ptr [RBP + -0x68],RCX MOV RDI,qword ptr [RCX + 0x8] MOV RAX,qword ptr [R14 + 0x30] TEST RAX,RAX JZ 0x00130d45 LEA RSI,[RBP + -0x2c] XOR EDX,EDX CALL RAX MOV RDI,RAX LEA RAX,[RBP + -0x2c] MOV ESI,dword ptr [RAX] JMP 0x00130d52 LAB_00130d34: MOV RAX,qword ptr [RBP + -0x48] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 JMP 0x00130e0d LAB_00130d45: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x2c],ESI MOV EAX,dword ptr [R14] ADD RDI,RAX LAB_00130d52: CALL qword ptr [R14 + 0x40] MOV ECX,dword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0xc] LEA ESI,[RDX + -0x1] AND ESI,EAX SHR EDX,0x1 DEC EDX AND EDX,EAX CMP ESI,ECX CMOVC EDX,ESI CMP EBX,EDX JNZ 0x00130de1 LEA EDX,[RCX + 0x1] MOV R9D,dword ptr [RBP + -0x4c] MOV ESI,R9D MOV R8D,dword ptr [RBP + -0x54] AND ESI,R8D MOV RDI,qword ptr [RBP + -0x70] AND R9D,EDI CMP ESI,EDX CMOVC R9D,ESI AND R8D,EAX AND EAX,EDI CMP R8D,EDX CMOVC EAX,R8D MOV EDX,0xffffffff CMP R9D,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x68] JNZ 0x00130db9 CMP R9D,ECX JNZ 0x00130e39 MOV EDX,EBX LAB_00130db9: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 MOV EAX,dword ptr [RDI] MOV ESI,R15D LAB_00130dc6: MOV ECX,ESI SHL RCX,0x4 MOV ESI,dword ptr [R13 + RCX*0x1] CMP ESI,EDX JNZ 0x00130dc6 ADD R13,RCX MOV dword ptr [R13],EAX MOV dword ptr [RDI],R15D JMP 0x00130e0d LAB_00130de1: MOV RCX,qword ptr [RBP + -0x68] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 MOV RAX,qword ptr [RBP + -0x48] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_00130df7: MOV EAX,EDX SHL RAX,0x4 MOV EDX,dword ptr [R13 + RAX*0x1] CMP EDX,EBX JNZ 0x00130df7 LAB_00130e06: ADD R13,RAX MOV dword ptr [R13],R15D LAB_00130e0d: MOV RBX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x38] LAB_00130e15: CALL 0x0012f935 MOV RAX,qword ptr [R14 + 0x38] TEST RAX,RAX JZ 0x00130e28 MOV RDI,RBX CALL RAX LAB_00130e28: XOR EAX,EAX LAB_00130e2a: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00130e38: RET LAB_00130e39: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 MOV ECX,dword ptr [RBP + -0x50] LAB_00130e44: MOV EAX,EBX SHL RAX,0x4 MOV EBX,dword ptr [R13 + RAX*0x1] CMP EBX,ECX JNZ 0x00130e44 JMP 0x00130e06
int8 ma_hashtbl_delete(uint *param_1,long param_2) { long lVar1; int8 uVar2; uint uVar3; uint uVar4; uint uVar5; long lVar6; uint *puVar7; ulong uVar8; uint uVar9; uint uVar10; uint *puVar11; uint uVar12; uint *puVar13; ulong uVar14; uint local_64; uint local_60; uint local_5c; uint local_58; uint local_54; uint *local_50; long local_48; uint *local_40; uint local_34; if (param_1[2] == 0) { return 1; } uVar9 = param_1[3]; lVar1 = *(long *)(param_1 + 6); if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_60 = param_1[1]; lVar6 = (ulong)*param_1 + param_2; } else { lVar6 = (**(code **)(param_1 + 0xc))(param_2,&local_60,0); } uVar3 = (**(code **)(param_1 + 0x10))(lVar6,local_60); uVar4 = uVar9 - 1; uVar12 = (uVar9 >> 1) - 1; uVar9 = uVar3 & uVar12; if ((uVar3 & uVar4) < param_1[2]) { uVar9 = uVar3 & uVar4; } uVar14 = (ulong)uVar9; puVar13 = (uint *)(uVar14 * 0x10 + lVar1); if (*(long *)(lVar1 + 8 + uVar14 * 0x10) == param_2) { puVar7 = (uint *)0x0; } else { do { puVar7 = puVar13; uVar14 = (ulong)*puVar7; if (uVar14 == 0xffffffff) { return 1; } puVar13 = (uint *)(uVar14 * 0x10 + lVar1); } while (*(long *)(lVar1 + 8 + uVar14 * 0x10) != param_2); } uVar9 = param_1[2] - 1; param_1[2] = uVar9; if (uVar9 < param_1[3] >> 1) { param_1[3] = param_1[3] >> 1; } param_1[4] = 0xffffffff; puVar11 = (uint *)((ulong)uVar9 * 0x10 + lVar1); uVar3 = *puVar13; if (puVar7 == (uint *)0x0) { if (uVar3 != 0xffffffff) { lVar6 = (ulong)uVar3 * 0x10; *(int8 *)(puVar13 + 2) = *(int8 *)(lVar1 + 8 + lVar6); *puVar13 = *(uint *)(lVar1 + lVar6); puVar13 = (uint *)(lVar6 + lVar1); uVar14 = (ulong)uVar3; } } else { *puVar7 = uVar3; } puVar7 = param_1 + 6; if (puVar13 != puVar11) { local_5c = uVar4; local_58 = uVar9; local_50 = puVar11; local_48 = param_2; local_40 = puVar7; if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_64 = param_1[1]; lVar6 = *(long *)(puVar11 + 2) + (ulong)*param_1; } else { lVar6 = (**(code **)(param_1 + 0xc))(*(long *)(puVar11 + 2),&local_64,0); } uVar4 = (**(code **)(param_1 + 0x10))(lVar6,local_64); uVar3 = param_1[3] - 1 & uVar4; uVar9 = (param_1[3] >> 1) - 1 & uVar4; if (uVar3 < param_1[2]) { uVar9 = uVar3; } uVar8 = (ulong)uVar9; puVar11 = (uint *)(uVar8 * 0x10 + lVar1); if (puVar11 == puVar13) { uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; param_2 = local_48; puVar7 = local_40; } else { local_54 = uVar4; if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_34 = param_1[1]; lVar6 = *(long *)(puVar11 + 2) + (ulong)*param_1; } else { lVar6 = (**(code **)(param_1 + 0xc))(*(long *)(puVar11 + 2),&local_34,0); } uVar5 = (**(code **)(param_1 + 0x10))(lVar6,local_34); uVar4 = param_1[2]; uVar10 = param_1[3] - 1 & uVar5; uVar3 = (param_1[3] >> 1) - 1 & uVar5; if (uVar10 < uVar4) { uVar3 = uVar10; } uVar10 = (uint)uVar14; param_2 = local_48; puVar7 = local_40; if (uVar9 == uVar3) { uVar3 = local_54 & uVar12; if ((local_54 & local_5c) < uVar4 + 1) { uVar3 = local_54 & local_5c; } uVar12 = uVar5 & uVar12; if ((local_5c & uVar5) < uVar4 + 1) { uVar12 = local_5c & uVar5; } uVar5 = 0xffffffff; if ((uVar3 != uVar12) || (uVar5 = uVar9, uVar3 == uVar4)) { uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; do { lVar6 = uVar14 * 0x10; uVar9 = *(uint *)(lVar1 + lVar6); uVar14 = (ulong)uVar9; } while (uVar9 != uVar5); *(uint *)(lVar1 + lVar6) = *puVar11; *puVar11 = uVar10; goto LAB_00130e15; } uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; do { lVar6 = uVar8 * 0x10; uVar8 = (ulong)*(uint *)(lVar1 + lVar6); } while (*(uint *)(lVar1 + lVar6) != local_58); } else { uVar2 = *(int8 *)(puVar11 + 2); *(int8 *)puVar13 = *(int8 *)puVar11; *(int8 *)(puVar13 + 2) = uVar2; uVar4 = local_50[1]; uVar12 = local_50[2]; uVar5 = local_50[3]; *puVar11 = *local_50; puVar11[1] = uVar4; puVar11[2] = uVar12; puVar11[3] = uVar5; do { lVar6 = (ulong)uVar3 * 0x10; uVar3 = *(uint *)(lVar1 + lVar6); } while (uVar3 != uVar9); } *(uint *)(lVar1 + lVar6) = uVar10; } } LAB_00130e15: ma_pop_dynamic(puVar7); if (*(code **)(param_1 + 0xe) != (code *)0x0) { (**(code **)(param_1 + 0xe))(param_2); } return 0; }
32,364
flush_log_for_bitmap
eloqsql/storage/maria/ma_bitmap.c
static my_bool flush_log_for_bitmap(PAGECACHE_IO_HOOK_ARGS *args __attribute__ ((unused))) { #ifdef DBUG_ASSERT_EXISTS const MARIA_SHARE *share= (MARIA_SHARE*)args->data; #endif DBUG_ENTER("flush_log_for_bitmap"); DBUG_ASSERT(share->now_transactional); /* WAL imposes that UNDOs reach disk before bitmap is flushed. We don't know the LSN of the last UNDO about this bitmap page, so we flush whole log. */ DBUG_RETURN(translog_flush(translog_get_horizon())); }
O0
c
flush_log_for_bitmap: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x63a1e jmp 0x63a20 movb $0x0, %al callq 0x917e0 movq %rax, %rdi callq 0x93420 movb %al, -0x9(%rbp) movb -0x9(%rbp), %al addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
flush_log_for_bitmap: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_63A1E: jmp short $+2 loc_63A20: mov al, 0 call translog_get_horizon mov rdi, rax call translog_flush mov [rbp+var_9], al mov al, [rbp+var_9] add rsp, 10h pop rbp retn
long long flush_log_for_bitmap() { long long horizon; // rax horizon = translog_get_horizon(); return translog_flush(horizon); }
flush_log_for_bitmap: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x00163a1e LAB_00163a1e: JMP 0x00163a20 LAB_00163a20: MOV AL,0x0 CALL 0x001917e0 MOV RDI,RAX CALL 0x00193420 MOV byte ptr [RBP + -0x9],AL MOV AL,byte ptr [RBP + -0x9] ADD RSP,0x10 POP RBP RET
int1 flush_log_for_bitmap(void) { int8 uVar1; int1 uVar2; uVar1 = translog_get_horizon(); uVar2 = translog_flush(uVar1); return uVar2; }
32,365
map_to_g2
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/map_to_g2.c
static void map_to_g2(POINTonE2 *out, const vec384x u, const vec384x v) { POINTonE2 p; map_to_isogenous_E2(&p, u); if (v != NULL) { map_to_isogenous_E2(out, v); /* borrow |out| */ POINTonE2_dadd(&p, &p, out, Aprime_E2); } isogeny_map_to_E2(&p, &p); /* sprinkle isogenous powder */ clear_cofactor(out, &p); }
O1
c
map_to_g2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 movq %rdx, %r14 movq %rdi, %rbx leaq -0x290(%rbp), %r13 movq %r13, %rdi callq 0x2713d testq %r14, %r14 je 0x1ec5d movq %rbx, %rdi movq %r14, %rsi callq 0x2713d leaq 0x21f25(%rip), %rcx # 0x40b70 leaq -0x290(%rbp), %rdi movq %rdi, %rsi movq %rbx, %rdx callq 0x1d111 movq %rbx, -0x48(%rbp) movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD movl $0xc0, %ebx leaq -0x410(%rbp), %r14 leaq (%r14,%rbx), %r12 addq %rbx, %r13 movq %r13, %rsi leaq 0x20e98(%rip), %r13 # 0x3fb20 movq %r12, %rdi movq %rsi, -0x40(%rbp) movq %r13, %rdx movq %r15, %rcx callq 0x33a20 leaq -0x3b0(%rbp), %rdi movq %r12, %rsi movq %r13, %rdx movq %r15, %rcx callq 0x33a20 movq %r14, %rdi movq %r12, -0x38(%rbp) movq %r12, %rsi leaq -0x3b0(%rbp), %rdx movq %r13, %rcx movq %r15, %r8 callq 0x338e0 leaq 0x2225e(%rip), %r12 # 0x40f30 leaq (%rbx,%rbp), %rdi addq $-0x170, %rdi # imm = 0xFE90 leaq (%r12,%rbx), %rsi leaq (%rbx,%rbp), %rdx addq $-0x410, %rdx # imm = 0xFBF0 movq %r13, %rcx movq %r15, %r8 callq 0x338e0 addq $-0x60, %rbx cmpq $-0x60, %rbx jne 0x1ecd2 leaq 0x22348(%rip), %rdx # 0x41050 leaq 0x20e11(%rip), %r13 # 0x3fb20 leaq -0x4d0(%rbp), %r12 leaq -0x290(%rbp), %rsi movq %r12, %rdi movq %r13, %rcx movq %r15, %r8 callq 0x338e0 movl $0xc0, %eax leaq -0x170(%rbp), %rbx leaq (%rbx,%rax), %rdx movq %r12, %rdi movq %r12, %rsi movq %rdx, -0x30(%rbp) movq %r13, %rcx callq 0x2f460 movl $0x2, %ecx movq %r12, %rdi leaq -0x290(%rbp), %rsi movq %rbx, %rdx callq 0x2783c movl $0xc0, %eax addq %rax, %r14 movl $0x60, %ebx leaq 0x22338(%rip), %r12 # 0x410b0 leaq (%rbx,%rbp), %rdi addq $-0x170, %rdi # imm = 0xFE90 leaq (%r12,%rbx), %rsi movq %r14, %rdx movq %r13, %rcx movq %r15, %r8 callq 0x338e0 addq $-0x60, %r14 addq $-0x60, %rbx cmpq $-0x60, %rbx jne 0x1ed78 leaq -0x110(%rbp), %rdx leaq 0x20d6f(%rip), %r14 # 0x3fb20 leaq -0x2f0(%rbp), %rbx leaq -0x290(%rbp), %r12 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rcx callq 0x2f460 leaq -0x170(%rbp), %rdx movl $0x1, %ecx movq %rbx, %rdi movq %r12, %rsi callq 0x2783c movq %rbx, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movl $0xc0, %ebx leaq 0x2236b(%rip), %r12 # 0x41170 leaq (%rbx,%rbp), %rdi addq $-0x170, %rdi # imm = 0xFE90 leaq (%r12,%rbx), %rsi leaq (%rbx,%rbp), %rdx addq $-0x410, %rdx # imm = 0xFBF0 movq %r14, %rcx movq %r15, %r8 callq 0x338e0 addq $-0x60, %rbx cmpq $-0x60, %rbx jne 0x1ee05 leaq 0x22455(%rip), %rdx # 0x41290 leaq 0x20cde(%rip), %r14 # 0x3fb20 leaq -0x470(%rbp), %r13 leaq -0x290(%rbp), %rbx movq %r13, %rdi movq %rbx, %rsi movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movq %r13, %rdi movq %r13, %rsi movq -0x30(%rbp), %rdx movq %r14, %rcx callq 0x2f460 leaq -0x170(%rbp), %rdx movl $0x2, %ecx movq %r13, %rdi movq %rbx, %rsi callq 0x2783c leaq -0x230(%rbp), %rdx movq %r13, %rdi movq %r13, %rsi movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movl $0xc0, %ebx leaq 0x22442(%rip), %r12 # 0x412f0 leaq (%rbx,%rbp), %rdi addq $-0x170, %rdi # imm = 0xFE90 leaq (%r12,%rbx), %rsi leaq (%rbx,%rbp), %rdx addq $-0x410, %rdx # imm = 0xFBF0 movq %r14, %rcx movq %r15, %r8 callq 0x338e0 addq $-0x60, %rbx cmpq $-0x60, %rbx jne 0x1eeae leaq 0x20c3c(%rip), %r14 # 0x3fb20 leaq -0x530(%rbp), %r13 leaq -0x290(%rbp), %rbx movq %r13, %rdi movq %rbx, %rsi movq -0x30(%rbp), %rdx movq %r14, %rcx callq 0x2f460 leaq -0x170(%rbp), %rdx movl $0x2, %ecx movq %r13, %rdi movq %rbx, %rsi callq 0x2783c movq -0x38(%rbp), %r12 movq %r12, %rdi movq %r12, %rsi movq -0x40(%rbp), %rbx movq %rbx, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movq %r13, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 leaq -0x2f0(%rbp), %rsi movq %rbx, %rdi movq %r13, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 leaq -0x4d0(%rbp), %rsi leaq -0x290(%rbp), %r12 movq %r12, %rdi movq %r13, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movq %r12, %rdi movq %r12, %rsi movq %rbx, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 leaq -0x230(%rbp), %r13 movq %r13, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx callq 0x33a20 movq %r13, %rdi movq %r13, %rsi leaq -0x2f0(%rbp), %rdx movq %r14, %rcx movq %r15, %r8 callq 0x338e0 leaq -0x470(%rbp), %rdx movq %r13, %rdi movq %r13, %rsi movq %r14, %rcx movq %r15, %r8 callq 0x338e0 movq -0x48(%rbp), %rbx movq %rbx, %rdi movq %r12, %rsi callq 0x1db4e movq %rbx, %rdi movq %rbx, %rsi callq 0x26fe2 movq %rbx, %rdi movq %rbx, %rsi callq 0x26fe2 leaq -0x410(%rbp), %r15 movl $0x120, %edx # imm = 0x120 movq %r15, %rdi movq %r12, %rsi callq 0x5060 leaq -0x3b0(%rbp), %rdi movl $0x1, %edx movq %rdi, %rsi movq %r14, %rcx callq 0x2fa00 leaq -0x380(%rbp), %rdi movl $0x1, %edx movq %rdi, %rsi movq %r14, %rcx callq 0x2fa00 leaq -0x170(%rbp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x26fe2 movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x1d111 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x1d111 movq %r15, %rdi movq %r12, %rsi callq 0x278b3 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x1d111 movq %r15, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x1d111 movq %r14, %rdi movq %r15, %rsi callq 0x278b3 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x1d111 addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
map_to_g2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h mov r14, rdx mov rbx, rdi lea r13, [rbp+var_290] mov rdi, r13 call map_to_isogenous_E2 test r14, r14 jz short loc_1EC5D mov rdi, rbx mov rsi, r14 call map_to_isogenous_E2 lea rcx, Aprime_E2 lea rdi, [rbp+var_290] mov rsi, rdi mov rdx, rbx call POINTonE2_dadd loc_1EC5D: mov [rbp+var_48], rbx mov r15, 89F3FFFCFFFCFFFDh mov ebx, 0C0h lea r14, [rbp+var_410] lea r12, [r14+rbx] add r13, rbx mov rsi, r13 lea r13, BLS12_381_P mov rdi, r12 mov [rbp+var_40], rsi mov rdx, r13 mov rcx, r15 call sqr_mont_384x lea rdi, [rbp+var_3B0] mov rsi, r12 mov rdx, r13 mov rcx, r15 call sqr_mont_384x mov rdi, r14 mov [rbp+var_38], r12 mov rsi, r12 lea rdx, [rbp+var_3B0] mov rcx, r13 mov r8, r15 call mul_mont_384x lea r12, isogeny_map_to_E2_isogeny_map_x_num loc_1ECD2: lea rdi, [rbx+rbp] add rdi, 0FFFFFFFFFFFFFE90h lea rsi, [r12+rbx] lea rdx, [rbx+rbp] add rdx, 0FFFFFFFFFFFFFBF0h mov rcx, r13 mov r8, r15 call mul_mont_384x add rbx, 0FFFFFFFFFFFFFFA0h cmp rbx, 0FFFFFFFFFFFFFFA0h jnz short loc_1ECD2 lea rdx, unk_41050 lea r13, BLS12_381_P lea r12, [rbp+var_4D0] lea rsi, [rbp+var_290] mov rdi, r12 mov rcx, r13 mov r8, r15 call mul_mont_384x mov eax, 0C0h lea rbx, [rbp+var_170] lea rdx, [rbx+rax] mov rdi, r12 mov rsi, r12 mov [rbp+var_30], rdx mov rcx, r13 call add_mod_384x mov ecx, 2 mov rdi, r12 lea rsi, [rbp+var_290] mov rdx, rbx call map_fp2 mov eax, 0C0h add r14, rax mov ebx, 60h ; '`' lea r12, isogeny_map_to_E2_isogeny_map_x_den loc_1ED78: lea rdi, [rbx+rbp] add rdi, 0FFFFFFFFFFFFFE90h lea rsi, [r12+rbx] mov rdx, r14 mov rcx, r13 mov r8, r15 call mul_mont_384x add r14, 0FFFFFFFFFFFFFFA0h add rbx, 0FFFFFFFFFFFFFFA0h cmp rbx, 0FFFFFFFFFFFFFFA0h jnz short loc_1ED78 lea rdx, [rbp+var_110] lea r14, BLS12_381_P lea rbx, [rbp+var_2F0] lea r12, [rbp+var_290] mov rdi, rbx mov rsi, r12 mov rcx, r14 call add_mod_384x lea rdx, [rbp+var_170] mov ecx, 1 mov rdi, rbx mov rsi, r12 call map_fp2 mov rdi, rbx mov rsi, rbx mov rdx, [rbp+var_38] mov rcx, r14 mov r8, r15 call mul_mont_384x mov ebx, 0C0h lea r12, isogeny_map_to_E2_isogeny_map_y_num loc_1EE05: lea rdi, [rbx+rbp] add rdi, 0FFFFFFFFFFFFFE90h lea rsi, [r12+rbx] lea rdx, [rbx+rbp] add rdx, 0FFFFFFFFFFFFFBF0h mov rcx, r14 mov r8, r15 call mul_mont_384x add rbx, 0FFFFFFFFFFFFFFA0h cmp rbx, 0FFFFFFFFFFFFFFA0h jnz short loc_1EE05 lea rdx, unk_41290 lea r14, BLS12_381_P lea r13, [rbp+var_470] lea rbx, [rbp+var_290] mov rdi, r13 mov rsi, rbx mov rcx, r14 mov r8, r15 call mul_mont_384x mov rdi, r13 mov rsi, r13 mov rdx, [rbp+var_30] mov rcx, r14 call add_mod_384x lea rdx, [rbp+var_170] mov ecx, 2 mov rdi, r13 mov rsi, rbx call map_fp2 lea rdx, [rbp+var_230] mov rdi, r13 mov rsi, r13 mov rcx, r14 mov r8, r15 call mul_mont_384x mov ebx, 0C0h lea r12, isogeny_map_to_E2_isogeny_map_y_den loc_1EEAE: lea rdi, [rbx+rbp] add rdi, 0FFFFFFFFFFFFFE90h lea rsi, [r12+rbx] lea rdx, [rbx+rbp] add rdx, 0FFFFFFFFFFFFFBF0h mov rcx, r14 mov r8, r15 call mul_mont_384x add rbx, 0FFFFFFFFFFFFFFA0h cmp rbx, 0FFFFFFFFFFFFFFA0h jnz short loc_1EEAE lea r14, BLS12_381_P lea r13, [rbp+var_530] lea rbx, [rbp+var_290] mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_30] mov rcx, r14 call add_mod_384x lea rdx, [rbp+var_170] mov ecx, 2 mov rdi, r13 mov rsi, rbx call map_fp2 mov r12, [rbp+var_38] mov rdi, r12 mov rsi, r12 mov rbx, [rbp+var_40] mov rdx, rbx mov rcx, r14 mov r8, r15 call mul_mont_384x mov rdi, r13 mov rsi, r13 mov rdx, r12 mov rcx, r14 mov r8, r15 call mul_mont_384x lea rsi, [rbp+var_2F0] mov rdi, rbx mov rdx, r13 mov rcx, r14 mov r8, r15 call mul_mont_384x lea rsi, [rbp+var_4D0] lea r12, [rbp+var_290] mov rdi, r12 mov rdx, r13 mov rcx, r14 mov r8, r15 call mul_mont_384x mov rdi, r12 mov rsi, r12 mov rdx, rbx mov rcx, r14 mov r8, r15 call mul_mont_384x lea r13, [rbp+var_230] mov rdi, r13 mov rsi, rbx mov rdx, r14 mov rcx, r15 call sqr_mont_384x mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_2F0] mov rcx, r14 mov r8, r15 call mul_mont_384x lea rdx, [rbp+var_470] mov rdi, r13 mov rsi, r13 mov rcx, r14 mov r8, r15 call mul_mont_384x mov rbx, [rbp+var_48] mov rdi, rbx mov rsi, r12 call POINTonE2_double mov rdi, rbx mov rsi, rbx call psi mov rdi, rbx mov rsi, rbx call psi lea r15, [rbp+var_410] mov edx, 120h mov rdi, r15 mov rsi, r12 call _memcpy lea rdi, [rbp+var_3B0] mov edx, 1 mov rsi, rdi mov rcx, r14 call cneg_mod_384 lea rdi, [rbp+var_380] mov edx, 1 mov rsi, rdi mov rcx, r14 call cneg_mod_384 lea r14, [rbp+var_170] mov rdi, r14 mov rsi, r15 call psi mov rdi, rbx mov rsi, rbx mov rdx, r15 xor ecx, ecx call POINTonE2_dadd mov rdi, rbx mov rsi, rbx mov rdx, r14 xor ecx, ecx call POINTonE2_dadd mov rdi, r15 mov rsi, r12 call POINTonE2_times_minus_z mov rdi, r15 mov rsi, r15 mov rdx, r12 xor ecx, ecx call POINTonE2_dadd mov rdi, r15 mov rsi, r15 mov rdx, r14 xor ecx, ecx call POINTonE2_dadd mov rdi, r14 mov rsi, r15 call POINTonE2_times_minus_z mov rdi, rbx mov rsi, rbx mov rdx, r14 xor ecx, ecx call POINTonE2_dadd add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long map_to_g2(long long a1, long long a2, long long a3) { long long v4; // rbx _BYTE *v5; // r14 long long i; // rbx long long j; // rbx long long k; // rbx _BYTE *v9; // r12 _BYTE *v10; // rbx long long v11; // rbx _BYTE v13[96]; // [rsp+0h] [rbp-530h] BYREF _BYTE v14[96]; // [rsp+60h] [rbp-4D0h] BYREF _BYTE v15[96]; // [rsp+C0h] [rbp-470h] BYREF _BYTE v16[96]; // [rsp+120h] [rbp-410h] BYREF _BYTE v17[48]; // [rsp+180h] [rbp-3B0h] BYREF _BYTE v18[48]; // [rsp+1B0h] [rbp-380h] BYREF _BYTE v19[96]; // [rsp+1E0h] [rbp-350h] BYREF _BYTE v20[96]; // [rsp+240h] [rbp-2F0h] BYREF _BYTE v21[96]; // [rsp+2A0h] [rbp-290h] BYREF _BYTE v22[96]; // [rsp+300h] [rbp-230h] BYREF _BYTE v23[96]; // [rsp+360h] [rbp-1D0h] BYREF _BYTE v24[96]; // [rsp+3C0h] [rbp-170h] BYREF _BYTE v25[96]; // [rsp+420h] [rbp-110h] BYREF _BYTE v26[104]; // [rsp+480h] [rbp-B0h] BYREF long long v27; // [rsp+4E8h] [rbp-48h] _BYTE *v28; // [rsp+4F0h] [rbp-40h] _BYTE *v29; // [rsp+4F8h] [rbp-38h] _BYTE *v30; // [rsp+500h] [rbp-30h] map_to_isogenous_E2(v21); if ( a3 ) { map_to_isogenous_E2(a1); POINTonE2_dadd((long long)v21, (long long)v21, a1, (long long)&Aprime_E2); } v27 = a1; v4 = 192LL; v28 = v23; sqr_mont_384x(v19, v23, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384x(v17, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v29 = v19; mul_mont_384x(v16, v19, v17, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); do { mul_mont_384x( &v24[v4], (char *)&isogeny_map_to_E2_isogeny_map_x_num + v4, &v16[v4], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v4 -= 96LL; } while ( v4 != -96 ); mul_mont_384x(v14, v21, &unk_41050, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v30 = v26; add_mod_384x(v14, v14, v26, &BLS12_381_P); map_fp2(v14, v21, v24, 2LL); v5 = v19; for ( i = 96LL; i != -96; i -= 96LL ) { mul_mont_384x(&v24[i], (char *)&isogeny_map_to_E2_isogeny_map_x_den + i, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v5 -= 96; } add_mod_384x(v20, v21, v25, &BLS12_381_P); map_fp2(v20, v21, v24, 1LL); mul_mont_384x(v20, v20, v29, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); for ( j = 192LL; j != -96; j -= 96LL ) mul_mont_384x( &v24[j], (char *)&isogeny_map_to_E2_isogeny_map_y_num + j, &v16[j], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v15, v21, &unk_41290, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384x(v15, v15, v30, &BLS12_381_P); map_fp2(v15, v21, v24, 2LL); mul_mont_384x(v15, v15, v22, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); for ( k = 192LL; k != -96; k -= 96LL ) mul_mont_384x( &v24[k], (char *)&isogeny_map_to_E2_isogeny_map_y_den + k, &v16[k], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384x(v13, v21, v30, &BLS12_381_P); map_fp2(v13, v21, v24, 2LL); v9 = v29; v10 = v28; mul_mont_384x(v29, v29, v28, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v13, v13, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v10, v20, v13, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v21, v14, v13, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v21, v21, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384x(v22, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v22, v22, v20, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v22, v22, v15, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v11 = v27; POINTonE2_double(v27, (long long)v21); psi(v11); psi(v11); memcpy(v16, v21, 288LL); cneg_mod_384(v17, v17, 1LL, &BLS12_381_P); cneg_mod_384(v18, v18, 1LL, &BLS12_381_P); psi(v24); POINTonE2_dadd(v11, v11, (long long)v16, 0LL); POINTonE2_dadd(v11, v11, (long long)v24, 0LL); POINTonE2_times_minus_z(v16, v21); POINTonE2_dadd((long long)v16, (long long)v16, (long long)v21, 0LL); POINTonE2_dadd((long long)v16, (long long)v16, (long long)v24, 0LL); POINTonE2_times_minus_z(v24, v16); return POINTonE2_dadd(v11, v11, (long long)v24, 0LL); }
map_to_g2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 MOV R14,RDX MOV RBX,RDI LEA R13,[RBP + -0x290] MOV RDI,R13 CALL 0x0012713d TEST R14,R14 JZ 0x0011ec5d MOV RDI,RBX MOV RSI,R14 CALL 0x0012713d LEA RCX,[0x140b70] LEA RDI,[RBP + -0x290] MOV RSI,RDI MOV RDX,RBX CALL 0x0011d111 LAB_0011ec5d: MOV qword ptr [RBP + -0x48],RBX MOV R15,-0x760c000300030003 MOV EBX,0xc0 LEA R14,[RBP + -0x410] LEA R12,[R14 + RBX*0x1] ADD R13,RBX MOV RSI,R13 LEA R13,[0x13fb20] MOV RDI,R12 MOV qword ptr [RBP + -0x40],RSI MOV RDX,R13 MOV RCX,R15 CALL 0x00133a20 LEA RDI,[RBP + -0x3b0] MOV RSI,R12 MOV RDX,R13 MOV RCX,R15 CALL 0x00133a20 MOV RDI,R14 MOV qword ptr [RBP + -0x38],R12 MOV RSI,R12 LEA RDX,[RBP + -0x3b0] MOV RCX,R13 MOV R8,R15 CALL 0x001338e0 LEA R12,[0x140f30] LAB_0011ecd2: LEA RDI,[RBX + RBP*0x1] ADD RDI,-0x170 LEA RSI,[R12 + RBX*0x1] LEA RDX,[RBX + RBP*0x1] ADD RDX,-0x410 MOV RCX,R13 MOV R8,R15 CALL 0x001338e0 ADD RBX,-0x60 CMP RBX,-0x60 JNZ 0x0011ecd2 LEA RDX,[0x141050] LEA R13,[0x13fb20] LEA R12,[RBP + -0x4d0] LEA RSI,[RBP + -0x290] MOV RDI,R12 MOV RCX,R13 MOV R8,R15 CALL 0x001338e0 MOV EAX,0xc0 LEA RBX,[RBP + -0x170] LEA RDX,[RBX + RAX*0x1] MOV RDI,R12 MOV RSI,R12 MOV qword ptr [RBP + -0x30],RDX MOV RCX,R13 CALL 0x0012f460 MOV ECX,0x2 MOV RDI,R12 LEA RSI,[RBP + -0x290] MOV RDX,RBX CALL 0x0012783c MOV EAX,0xc0 ADD R14,RAX MOV EBX,0x60 LEA R12,[0x1410b0] LAB_0011ed78: LEA RDI,[RBX + RBP*0x1] ADD RDI,-0x170 LEA RSI,[R12 + RBX*0x1] MOV RDX,R14 MOV RCX,R13 MOV R8,R15 CALL 0x001338e0 ADD R14,-0x60 ADD RBX,-0x60 CMP RBX,-0x60 JNZ 0x0011ed78 LEA RDX,[RBP + -0x110] LEA R14,[0x13fb20] LEA RBX,[RBP + -0x2f0] LEA R12,[RBP + -0x290] MOV RDI,RBX MOV RSI,R12 MOV RCX,R14 CALL 0x0012f460 LEA RDX,[RBP + -0x170] MOV ECX,0x1 MOV RDI,RBX MOV RSI,R12 CALL 0x0012783c MOV RDI,RBX MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV EBX,0xc0 LEA R12,[0x141170] LAB_0011ee05: LEA RDI,[RBX + RBP*0x1] ADD RDI,-0x170 LEA RSI,[R12 + RBX*0x1] LEA RDX,[RBX + RBP*0x1] ADD RDX,-0x410 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 ADD RBX,-0x60 CMP RBX,-0x60 JNZ 0x0011ee05 LEA RDX,[0x141290] LEA R14,[0x13fb20] LEA R13,[RBP + -0x470] LEA RBX,[RBP + -0x290] MOV RDI,R13 MOV RSI,RBX MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV RDI,R13 MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,R14 CALL 0x0012f460 LEA RDX,[RBP + -0x170] MOV ECX,0x2 MOV RDI,R13 MOV RSI,RBX CALL 0x0012783c LEA RDX,[RBP + -0x230] MOV RDI,R13 MOV RSI,R13 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV EBX,0xc0 LEA R12,[0x1412f0] LAB_0011eeae: LEA RDI,[RBX + RBP*0x1] ADD RDI,-0x170 LEA RSI,[R12 + RBX*0x1] LEA RDX,[RBX + RBP*0x1] ADD RDX,-0x410 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 ADD RBX,-0x60 CMP RBX,-0x60 JNZ 0x0011eeae LEA R14,[0x13fb20] LEA R13,[RBP + -0x530] LEA RBX,[RBP + -0x290] MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x30] MOV RCX,R14 CALL 0x0012f460 LEA RDX,[RBP + -0x170] MOV ECX,0x2 MOV RDI,R13 MOV RSI,RBX CALL 0x0012783c MOV R12,qword ptr [RBP + -0x38] MOV RDI,R12 MOV RSI,R12 MOV RBX,qword ptr [RBP + -0x40] MOV RDX,RBX MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV RDI,R13 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 LEA RSI,[RBP + -0x2f0] MOV RDI,RBX MOV RDX,R13 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 LEA RSI,[RBP + -0x4d0] LEA R12,[RBP + -0x290] MOV RDI,R12 MOV RDX,R13 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV RDI,R12 MOV RSI,R12 MOV RDX,RBX MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 LEA R13,[RBP + -0x230] MOV RDI,R13 MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 CALL 0x00133a20 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x2f0] MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 LEA RDX,[RBP + -0x470] MOV RDI,R13 MOV RSI,R13 MOV RCX,R14 MOV R8,R15 CALL 0x001338e0 MOV RBX,qword ptr [RBP + -0x48] MOV RDI,RBX MOV RSI,R12 CALL 0x0011db4e MOV RDI,RBX MOV RSI,RBX CALL 0x00126fe2 MOV RDI,RBX MOV RSI,RBX CALL 0x00126fe2 LEA R15,[RBP + -0x410] MOV EDX,0x120 MOV RDI,R15 MOV RSI,R12 CALL 0x00105060 LEA RDI,[RBP + -0x3b0] MOV EDX,0x1 MOV RSI,RDI MOV RCX,R14 CALL 0x0012fa00 LEA RDI,[RBP + -0x380] MOV EDX,0x1 MOV RSI,RDI MOV RCX,R14 CALL 0x0012fa00 LEA R14,[RBP + -0x170] MOV RDI,R14 MOV RSI,R15 CALL 0x00126fe2 MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 XOR ECX,ECX CALL 0x0011d111 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 XOR ECX,ECX CALL 0x0011d111 MOV RDI,R15 MOV RSI,R12 CALL 0x001278b3 MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 XOR ECX,ECX CALL 0x0011d111 MOV RDI,R15 MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX CALL 0x0011d111 MOV RDI,R14 MOV RSI,R15 CALL 0x001278b3 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 XOR ECX,ECX CALL 0x0011d111 ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void map_to_g2(int8 param_1,int8 param_2,long param_3) { int8 uVar1; int1 *puVar2; long lVar3; int1 *puVar4; int1 local_538 [96]; int1 local_4d8 [96]; int1 local_478 [96]; int1 local_418 [96]; int1 local_3b8 [48]; int1 local_388 [48]; int1 local_358 [96]; int1 local_2f8 [96]; int1 local_298 [96]; int1 local_238 [96]; int1 auStack_1d8 [96]; int1 local_178 [96]; int1 local_118 [96]; int1 local_b8 [104]; int8 local_50; int1 *local_48; int1 *local_40; int1 *local_38; map_to_isogenous_E2(local_298); if (param_3 != 0) { map_to_isogenous_E2(param_1,param_3); POINTonE2_dadd(local_298,local_298,param_1,Aprime_E2); } lVar3 = 0xc0; local_48 = auStack_1d8; local_50 = param_1; sqr_mont_384x(local_358,local_48,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384x(local_3b8,local_358,BLS12_381_P,0x89f3fffcfffcfffd); local_40 = local_358; mul_mont_384x(local_418,local_358,local_3b8,BLS12_381_P,0x89f3fffcfffcfffd); do { mul_mont_384x(local_178 + lVar3,isogeny_map_to_E2_isogeny_map_x_num + lVar3,local_418 + lVar3, BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = lVar3 + -0x60; } while (lVar3 != -0x60); mul_mont_384x(local_4d8,local_298,0x141050,BLS12_381_P,0x89f3fffcfffcfffd); local_38 = local_b8; add_mod_384x(local_4d8,local_4d8,local_38,BLS12_381_P); map_fp2(local_4d8,local_298,local_178,2); puVar4 = local_358; lVar3 = 0x60; do { mul_mont_384x(local_178 + lVar3,isogeny_map_to_E2_isogeny_map_x_den + lVar3,puVar4,BLS12_381_P, 0x89f3fffcfffcfffd); puVar4 = puVar4 + -0x60; lVar3 = lVar3 + -0x60; } while (lVar3 != -0x60); add_mod_384x(local_2f8,local_298,local_118,BLS12_381_P); map_fp2(local_2f8,local_298,local_178,1); mul_mont_384x(local_2f8,local_2f8,local_40,BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = 0xc0; do { mul_mont_384x(local_178 + lVar3,isogeny_map_to_E2_isogeny_map_y_num + lVar3,local_418 + lVar3, BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = lVar3 + -0x60; } while (lVar3 != -0x60); mul_mont_384x(local_478,local_298,0x141290,BLS12_381_P,0x89f3fffcfffcfffd); add_mod_384x(local_478,local_478,local_38,BLS12_381_P); map_fp2(local_478,local_298,local_178,2); mul_mont_384x(local_478,local_478,local_238,BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = 0xc0; do { mul_mont_384x(local_178 + lVar3,isogeny_map_to_E2_isogeny_map_y_den + lVar3,local_418 + lVar3, BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = lVar3 + -0x60; } while (lVar3 != -0x60); add_mod_384x(local_538,local_298,local_38,BLS12_381_P); map_fp2(local_538,local_298,local_178,2); puVar2 = local_40; puVar4 = local_48; mul_mont_384x(local_40,local_40,local_48,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_538,local_538,puVar2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(puVar4,local_2f8,local_538,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_298,local_4d8,local_538,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_298,local_298,puVar4,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384x(local_238,puVar4,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_238,local_238,local_2f8,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_238,local_238,local_478,BLS12_381_P,0x89f3fffcfffcfffd); uVar1 = local_50; POINTonE2_double(local_50,local_298); psi(uVar1,uVar1); psi(uVar1,uVar1); memcpy(local_418,local_298,0x120); cneg_mod_384(local_3b8,local_3b8,1,BLS12_381_P); cneg_mod_384(local_388,local_388,1,BLS12_381_P); psi(local_178,local_418); POINTonE2_dadd(uVar1,uVar1,local_418,0); POINTonE2_dadd(uVar1,uVar1,local_178,0); POINTonE2_times_minus_z(local_418,local_298); POINTonE2_dadd(local_418,local_418,local_298,0); POINTonE2_dadd(local_418,local_418,local_178,0); POINTonE2_times_minus_z(local_178,local_418); POINTonE2_dadd(uVar1,uVar1,local_178,0); return; }
32,366
init_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { int i; size_t mem_per_cache; size_t mem_decr; int cnt; SIMPLE_KEY_CACHE_CB *partition; SIMPLE_KEY_CACHE_CB **partition_ptr; uint partitions= keycache->partitions; int blocks= 0; DBUG_ENTER("partitioned_init_key_cache"); keycache->key_cache_block_size = key_cache_block_size; if (keycache->key_cache_inited) partition_ptr= keycache->partition_array; else { if(!(partition_ptr= (SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions, MYF(MY_WME)))) DBUG_RETURN(-1); bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions); keycache->partition_array= partition_ptr; } mem_per_cache = use_mem / partitions; mem_decr= mem_per_cache / 5; for (i= 0; i < (int) partitions; i++) { my_bool key_cache_inited= keycache->key_cache_inited; if (key_cache_inited) partition= *partition_ptr; else { if (!(partition= (SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB), MYF(MY_WME)))) continue; partition->key_cache_inited= 0; } cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache, division_limit, age_threshold, changed_blocks_hash_size); if (cnt <= 0) { end_simple_key_cache(partition, 1); if (!key_cache_inited) { my_free(partition); partition= 0; } if ((i == 0 && cnt < 0) || i > 0) { /* Here we have two cases: 1. i == 0 and cnt < 0 cnt < 0 => mem_per_cache is not big enough to allocate minimal number of key blocks in the key cache of the partition. Decrease the the number of the partitions by 1 and start again. 2. i > 0 There is not enough memory for one of the succeeding partitions. Just skip this partition decreasing the number of partitions in the key cache by one. Do not change the value of mem_per_cache in both cases. */ if (key_cache_inited) { my_free(partition); partition= 0; if(key_cache_inited) memmove(partition_ptr, partition_ptr+1, sizeof(partition_ptr)*(partitions-i-1)); } if (!--partitions) break; } else { /* We come here when i == 0 && cnt == 0. cnt == 0 => the memory allocator fails to allocate a block of memory of the size mem_per_cache. Decrease the value of mem_per_cache without changing the current number of partitions and start again. Make sure that such a decrease may happen not more than 5 times in total. */ if (use_mem <= mem_decr) break; use_mem-= mem_decr; } i--; mem_per_cache= use_mem/partitions; continue; } else { blocks+= cnt; *partition_ptr++= partition; } } keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array); keycache->key_cache_mem_size= mem_per_cache * partitions; for (i= 0; i < (int) partitions; i++) keycache->partition_array[i]->hash_factor= partitions; keycache->key_cache_inited= 1; if (!partitions) blocks= -1; DBUG_RETURN(blocks); }
O0
c
init_partitioned_key_cache: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x5c(%rbp) movl $0x0, -0x60(%rbp) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x18(%rax) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0xe7cd0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x58(%rbp) jmp 0xe7d24 leaq 0xb9b5e1(%rip), %rax # 0xc832b8 movl (%rax), %edi movl -0x5c(%rbp), %eax movl %eax, %esi shlq $0x3, %rsi movl $0x10, %edx callq 0xf3860 movq %rax, -0x58(%rbp) cmpq $0x0, %rax jne 0xe7d04 jmp 0xe7cf8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xe7f3b movq -0x58(%rbp), %rdi movl -0x5c(%rbp), %eax movl %eax, %edx shlq $0x3, %rdx xorl %esi, %esi callq 0x2a2c0 movq -0x58(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movl -0x5c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x5, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x40(%rbp) movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax cmpl -0x5c(%rbp), %eax jge 0xe7eba movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x61(%rbp) cmpb $0x0, -0x61(%rbp) je 0xe7d75 movq -0x58(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) jmp 0xe7da3 leaq 0xb9b53c(%rip), %rax # 0xc832b8 movl (%rax), %edi movl $0x170, %esi # imm = 0x170 movl $0x10, %edx callq 0xf3860 movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0xe7d9c jmp 0xe7eac movq -0x50(%rbp), %rax movb $0x0, (%rax) movq -0x50(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x38(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d movl -0x2c(%rbp), %r9d callq 0xe5a00 movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) jg 0xe7e8b movq -0x50(%rbp), %rdi movl $0x1, %esi callq 0xe6b20 cmpb $0x0, -0x61(%rbp) jne 0xe7df0 movq -0x50(%rbp), %rdi callq 0xf3be0 movq $0x0, -0x50(%rbp) cmpl $0x0, -0x30(%rbp) jne 0xe7dfc cmpl $0x0, -0x44(%rbp) jl 0xe7e02 cmpl $0x0, -0x30(%rbp) jle 0xe7e55 cmpb $0x0, -0x61(%rbp) je 0xe7e43 movq -0x50(%rbp), %rdi callq 0xf3be0 movq $0x0, -0x50(%rbp) cmpb $0x0, -0x61(%rbp) je 0xe7e41 movq -0x58(%rbp), %rdi movq -0x58(%rbp), %rsi addq $0x8, %rsi movl -0x5c(%rbp), %eax subl -0x30(%rbp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %edx shlq $0x3, %rdx callq 0x2a130 jmp 0xe7e43 movl -0x5c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x5c(%rbp) cmpl $0x0, %eax jne 0xe7e53 jmp 0xe7eba jmp 0xe7e70 movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0xe7e61 jmp 0xe7eba movq -0x40(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) movq -0x20(%rbp), %rax movl -0x5c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) jmp 0xe7eac movl -0x44(%rbp), %eax addl -0x60(%rbp), %eax movl %eax, -0x60(%rbp) movq -0x50(%rbp), %rcx movq -0x58(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x58(%rbp) movq %rcx, (%rax) jmp 0xe7eac movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xe7d4d movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax sarq $0x3, %rax movl %eax, %ecx movl %ecx, -0x5c(%rbp) movq -0x10(%rbp), %rax movl %ecx, 0x1c(%rax) movq -0x38(%rbp), %rcx movl -0x5c(%rbp), %eax imulq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax cmpl -0x5c(%rbp), %eax jge 0xe7f1f movl -0x5c(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x30(%rbp), %rdx movq (%rax,%rdx,8), %rax movl %ecx, 0x164(%rax) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xe7ef3 movq -0x10(%rbp), %rax movb $0x1, (%rax) cmpl $0x0, -0x5c(%rbp) jne 0xe7f33 movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF jmp 0xe7f35 movl -0x60(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
init_partitioned_key_cache: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], r8d mov [rbp+var_2C], r9d mov rax, [rbp+var_10] mov eax, [rax+1Ch] mov [rbp+var_5C], eax mov [rbp+var_60], 0 mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+18h], ecx mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_E7CD0 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_58], rax jmp short loc_E7D24 loc_E7CD0: lea rax, key_memory_KEY_CACHE mov edi, [rax] mov eax, [rbp+var_5C] mov esi, eax shl rsi, 3 mov edx, 10h call my_malloc mov [rbp+var_58], rax cmp rax, 0 jnz short loc_E7D04 jmp short $+2 loc_E7CF8: mov [rbp+var_4], 0FFFFFFFFh jmp loc_E7F3B loc_E7D04: mov rdi, [rbp+var_58] mov eax, [rbp+var_5C] mov edx, eax shl rdx, 3 xor esi, esi call _memset mov rcx, [rbp+var_58] mov rax, [rbp+var_10] mov [rax+8], rcx loc_E7D24: mov rax, [rbp+var_20] mov ecx, [rbp+var_5C] xor edx, edx div rcx mov [rbp+var_38], rax mov rax, [rbp+var_38] mov ecx, 5 xor edx, edx div rcx mov [rbp+var_40], rax mov [rbp+var_30], 0 loc_E7D4D: mov eax, [rbp+var_30] cmp eax, [rbp+var_5C] jge loc_E7EBA mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_61], al cmp [rbp+var_61], 0 jz short loc_E7D75 mov rax, [rbp+var_58] mov rax, [rax] mov [rbp+var_50], rax jmp short loc_E7DA3 loc_E7D75: lea rax, key_memory_KEY_CACHE mov edi, [rax] mov esi, 170h mov edx, 10h call my_malloc mov [rbp+var_50], rax cmp rax, 0 jnz short loc_E7D9C jmp loc_E7EAC loc_E7D9C: mov rax, [rbp+var_50] mov byte ptr [rax], 0 loc_E7DA3: mov rdi, [rbp+var_50] mov esi, [rbp+var_14] mov rdx, [rbp+var_38] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] mov r9d, [rbp+var_2C] call init_simple_key_cache mov [rbp+var_44], eax cmp [rbp+var_44], 0 jg loc_E7E8B mov rdi, [rbp+var_50] mov esi, 1 call end_simple_key_cache cmp [rbp+var_61], 0 jnz short loc_E7DF0 mov rdi, [rbp+var_50] call my_free mov [rbp+var_50], 0 loc_E7DF0: cmp [rbp+var_30], 0 jnz short loc_E7DFC cmp [rbp+var_44], 0 jl short loc_E7E02 loc_E7DFC: cmp [rbp+var_30], 0 jle short loc_E7E55 loc_E7E02: cmp [rbp+var_61], 0 jz short loc_E7E43 mov rdi, [rbp+var_50] call my_free mov [rbp+var_50], 0 cmp [rbp+var_61], 0 jz short loc_E7E41 mov rdi, [rbp+var_58] mov rsi, [rbp+var_58] add rsi, 8 mov eax, [rbp+var_5C] sub eax, [rbp+var_30] sub eax, 1 mov eax, eax mov edx, eax shl rdx, 3 call _memmove loc_E7E41: jmp short $+2 loc_E7E43: mov eax, [rbp+var_5C] add eax, 0FFFFFFFFh mov [rbp+var_5C], eax cmp eax, 0 jnz short loc_E7E53 jmp short loc_E7EBA loc_E7E53: jmp short loc_E7E70 loc_E7E55: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] ja short loc_E7E61 jmp short loc_E7EBA loc_E7E61: mov rcx, [rbp+var_40] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_E7E70: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax mov rax, [rbp+var_20] mov ecx, [rbp+var_5C] xor edx, edx div rcx mov [rbp+var_38], rax jmp short loc_E7EAC loc_E7E8B: mov eax, [rbp+var_44] add eax, [rbp+var_60] mov [rbp+var_60], eax mov rcx, [rbp+var_50] mov rax, [rbp+var_58] mov rdx, rax add rdx, 8 mov [rbp+var_58], rdx mov [rax], rcx jmp short $+2 loc_E7EAC: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_E7D4D loc_E7EBA: mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov rcx, [rcx+8] sub rax, rcx sar rax, 3 mov ecx, eax mov [rbp+var_5C], ecx mov rax, [rbp+var_10] mov [rax+1Ch], ecx mov rcx, [rbp+var_38] mov eax, [rbp+var_5C] imul rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx mov [rbp+var_30], 0 loc_E7EF3: mov eax, [rbp+var_30] cmp eax, [rbp+var_5C] jge short loc_E7F1F mov ecx, [rbp+var_5C] mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rdx, [rbp+var_30] mov rax, [rax+rdx*8] mov [rax+164h], ecx mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp short loc_E7EF3 loc_E7F1F: mov rax, [rbp+var_10] mov byte ptr [rax], 1 cmp [rbp+var_5C], 0 jnz short loc_E7F33 mov [rbp+var_60], 0FFFFFFFFh loc_E7F33: jmp short $+2 loc_E7F35: mov eax, [rbp+var_60] mov [rbp+var_4], eax loc_E7F3B: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long init_partitioned_key_cache( char *a1, unsigned int a2, unsigned long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { int inited; // eax long long *v7; // rax char v9; // [rsp+Fh] [rbp-61h] unsigned int v10; // [rsp+10h] [rbp-60h] unsigned int v11; // [rsp+14h] [rbp-5Ch] unsigned int v12; // [rsp+14h] [rbp-5Ch] long long *v13; // [rsp+18h] [rbp-58h] _BYTE *v14; // [rsp+20h] [rbp-50h] int v15; // [rsp+2Ch] [rbp-44h] unsigned long long v16; // [rsp+30h] [rbp-40h] unsigned long long v17; // [rsp+38h] [rbp-38h] int i; // [rsp+40h] [rbp-30h] int j; // [rsp+40h] [rbp-30h] v11 = *((_DWORD *)a1 + 7); v10 = 0; *((_DWORD *)a1 + 6) = a2; if ( *a1 ) { v13 = (long long *)*((_QWORD *)a1 + 1); } else { v13 = (long long *)my_malloc(key_memory_KEY_CACHE, 8LL * v11, 16LL); if ( !v13 ) return (unsigned int)-1; memset(v13, 0LL, 8LL * v11); *((_QWORD *)a1 + 1) = v13; } v17 = a3 / v11; v16 = v17 / 5; for ( i = 0; i < (int)v11; ++i ) { v9 = *a1; if ( *a1 ) { v14 = (_BYTE *)*v13; inited = init_simple_key_cache(*v13, a2, v17, a4, a5, a6); } else { v14 = (_BYTE *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL); if ( !v14 ) continue; *v14 = 0; inited = init_simple_key_cache((long long)v14, a2, v17, a4, a5, a6); } v15 = inited; if ( inited > 0 ) { v10 += inited; v7 = v13++; *v7 = (long long)v14; } else { end_simple_key_cache((long long)v14, 1); if ( !v9 ) { my_free(v14); v14 = 0LL; } if ( (i || v15 >= 0) && i <= 0 ) { if ( a3 <= v16 ) break; a3 -= v16; } else { if ( v9 ) { my_free(v14); memmove(v13, v13 + 1, 8LL * (v11 - i - 1)); } if ( !--v11 ) break; } --i; v17 = a3 / v11; } } v12 = ((long long)v13 - *((_QWORD *)a1 + 1)) >> 3; *((_DWORD *)a1 + 7) = v12; *((_QWORD *)a1 + 2) = v12 * v17; for ( j = 0; j < (int)v12; ++j ) *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL * j) + 356LL) = v12; *a1 = 1; if ( !v12 ) return (unsigned int)-1; return v10; }
init_partitioned_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x5c],EAX MOV dword ptr [RBP + -0x60],0x0 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],ECX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x001e7cd0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x58],RAX JMP 0x001e7d24 LAB_001e7cd0: LEA RAX,[0xd832b8] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x5c] MOV ESI,EAX SHL RSI,0x3 MOV EDX,0x10 CALL 0x001f3860 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JNZ 0x001e7d04 JMP 0x001e7cf8 LAB_001e7cf8: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001e7f3b LAB_001e7d04: MOV RDI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x5c] MOV EDX,EAX SHL RDX,0x3 XOR ESI,ESI CALL 0x0012a2c0 MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX LAB_001e7d24: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x5c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x5 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x30],0x0 LAB_001e7d4d: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x5c] JGE 0x001e7eba MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x61],AL CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7d75 MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX JMP 0x001e7da3 LAB_001e7d75: LEA RAX,[0xd832b8] MOV EDI,dword ptr [RAX] MOV ESI,0x170 MOV EDX,0x10 CALL 0x001f3860 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x001e7d9c JMP 0x001e7eac LAB_001e7d9c: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 LAB_001e7da3: MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] MOV R9D,dword ptr [RBP + -0x2c] CALL 0x001e5a00 MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JG 0x001e7e8b MOV RDI,qword ptr [RBP + -0x50] MOV ESI,0x1 CALL 0x001e6b20 CMP byte ptr [RBP + -0x61],0x0 JNZ 0x001e7df0 MOV RDI,qword ptr [RBP + -0x50] CALL 0x001f3be0 MOV qword ptr [RBP + -0x50],0x0 LAB_001e7df0: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x001e7dfc CMP dword ptr [RBP + -0x44],0x0 JL 0x001e7e02 LAB_001e7dfc: CMP dword ptr [RBP + -0x30],0x0 JLE 0x001e7e55 LAB_001e7e02: CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7e43 MOV RDI,qword ptr [RBP + -0x50] CALL 0x001f3be0 MOV qword ptr [RBP + -0x50],0x0 CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7e41 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x58] ADD RSI,0x8 MOV EAX,dword ptr [RBP + -0x5c] SUB EAX,dword ptr [RBP + -0x30] SUB EAX,0x1 MOV EAX,EAX MOV EDX,EAX SHL RDX,0x3 CALL 0x0012a130 LAB_001e7e41: JMP 0x001e7e43 LAB_001e7e43: MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x5c],EAX CMP EAX,0x0 JNZ 0x001e7e53 JMP 0x001e7eba LAB_001e7e53: JMP 0x001e7e70 LAB_001e7e55: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JA 0x001e7e61 JMP 0x001e7eba LAB_001e7e61: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001e7e70: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x5c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x001e7eac LAB_001e7e8b: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x60],EAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RAX],RCX JMP 0x001e7eac LAB_001e7eac: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001e7d4d LAB_001e7eba: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX SAR RAX,0x3 MOV ECX,EAX MOV dword ptr [RBP + -0x5c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],ECX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x5c] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RBP + -0x30],0x0 LAB_001e7ef3: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x5c] JGE 0x001e7f1f MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + RDX*0x8] MOV dword ptr [RAX + 0x164],ECX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001e7ef3 LAB_001e7f1f: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 CMP dword ptr [RBP + -0x5c],0x0 JNZ 0x001e7f33 MOV dword ptr [RBP + -0x60],0xffffffff LAB_001e7f33: JMP 0x001e7f35 LAB_001e7f35: MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x4],EAX LAB_001e7f3b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int init_partitioned_key_cache (char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5, int4 param_6) { char cVar1; int iVar2; ulong uVar3; int local_68; uint local_64; int8 *local_60; int1 *local_58; ulong local_40; int local_38; ulong local_28; local_64 = *(uint *)(param_1 + 0x1c); local_68 = 0; *(int4 *)(param_1 + 0x18) = param_2; if (*param_1 == '\0') { local_60 = (int8 *)my_malloc(key_memory_KEY_CACHE,(ulong)local_64 << 3,0x10); if (local_60 == (int8 *)0x0) { return -1; } memset(local_60,0,(ulong)local_64 << 3); *(int8 **)(param_1 + 8) = local_60; } else { local_60 = *(int8 **)(param_1 + 8); } local_40 = param_3 / local_64; uVar3 = local_40 / 5; local_28 = param_3; for (local_38 = 0; local_38 < (int)local_64; local_38 = local_38 + 1) { cVar1 = *param_1; if (cVar1 == '\0') { local_58 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10); if (local_58 != (int1 *)0x0) { *local_58 = 0; goto LAB_001e7da3; } } else { local_58 = (int1 *)*local_60; LAB_001e7da3: iVar2 = init_simple_key_cache(local_58,param_2,local_40,param_4,param_5,param_6); if (iVar2 < 1) { end_simple_key_cache(local_58,1); if (cVar1 == '\0') { my_free(local_58); local_58 = (int1 *)0x0; } if (((local_38 == 0) && (iVar2 < 0)) || (0 < local_38)) { if ((cVar1 != '\0') && (my_free(local_58), cVar1 != '\0')) { memmove(local_60,local_60 + 1,(ulong)((local_64 - local_38) - 1) << 3); } local_64 = local_64 - 1; if (local_64 == 0) break; } else { if (local_28 <= uVar3) break; local_28 = local_28 - uVar3; } local_38 = local_38 + -1; local_40 = local_28 / local_64; } else { local_68 = iVar2 + local_68; *local_60 = local_58; local_60 = local_60 + 1; } } } uVar3 = (long)local_60 - *(long *)(param_1 + 8) >> 3; iVar2 = (int)uVar3; *(int *)(param_1 + 0x1c) = iVar2; *(ulong *)(param_1 + 0x10) = local_40 * (uVar3 & 0xffffffff); for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) { *(int *)(*(long *)(*(long *)(param_1 + 8) + (long)local_38 * 8) + 0x164) = iVar2; } *param_1 = '\x01'; if (iVar2 == 0) { local_68 = -1; } return local_68; }
32,367
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O3
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 leaq (%r8,%r8), %rax subq $0x1, %r12 cmovbq %rax, %r12 movq %rdi, -0x40(%rbp) movl 0x9c(%rdi), %r13d movq %r9, -0x38(%rbp) movb $0x0, (%r9) movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %r8, %r8 jle 0x92ef3 movq %r8, %r15 movq %rcx, %r14 movq -0x30(%rbp), %rbx addq %rbx, %r12 addq %rcx, %r15 cmpl $0x2, %r13d jb 0x92e8e movq -0x40(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r14, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax jge 0x92eb3 movb (%r14), %cl cmpb $0x27, %cl jne 0x92ea6 leaq 0x2(%rbx), %rax cmpq %r12, %rax ja 0x92ee9 movw $0x2727, (%rbx) # imm = 0x2727 jmp 0x92edc leaq 0x1(%rbx), %rax cmpq %r12, %rax ja 0x92ee9 movb %cl, (%rbx) jmp 0x92edc movl %eax, %ecx movl %eax, %eax addq %rbx, %rax cmpq %r12, %rax ja 0x92ee9 decq %r14 movq %r14, %rdx leaq 0x1(%rdx), %r14 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r14, %rdx movq %rax, %rbx decl %ecx jne 0x92ec5 incq %r14 movq %rax, %rbx cmpq %r15, %r14 jb 0x92e6c jmp 0x92ef3 movq -0x38(%rbp), %rax movb $0x1, (%rax) movq %rbx, %rax movb $0x0, (%rax) subq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
escape_quotes_for_mysql: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx lea rax, [r8+r8] sub r12, 1 cmovb r12, rax mov [rbp+var_40], rdi mov r13d, [rdi+9Ch] mov [rbp+var_38], r9 mov byte ptr [r9], 0 mov [rbp+var_30], rsi mov rax, rsi test r8, r8 jle loc_92EF3 mov r15, r8 mov r14, rcx mov rbx, [rbp+var_30] add r12, rbx add r15, rcx loc_92E6C: cmp r13d, 2 jb short loc_92E8E mov rdi, [rbp+var_40] mov rax, [rdi+0B8h] mov rsi, r14 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_92EB3 loc_92E8E: mov cl, [r14] cmp cl, 27h ; ''' jnz short loc_92EA6 lea rax, [rbx+2] cmp rax, r12 ja short loc_92EE9 mov word ptr [rbx], 2727h jmp short loc_92EDC loc_92EA6: lea rax, [rbx+1] cmp rax, r12 ja short loc_92EE9 mov [rbx], cl jmp short loc_92EDC loc_92EB3: mov ecx, eax mov eax, eax add rax, rbx cmp rax, r12 ja short loc_92EE9 dec r14 mov rdx, r14 loc_92EC5: lea r14, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r14 mov rbx, rax dec ecx jnz short loc_92EC5 loc_92EDC: inc r14 mov rbx, rax cmp r14, r15 jb short loc_92E6C jmp short loc_92EF3 loc_92EE9: mov rax, [rbp+var_38] mov byte ptr [rax], 1 mov rax, rbx loc_92EF3: mov byte ptr [rax], 0 sub rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, _BYTE *a2, long long a3, _BYTE *a4, long long a5, _BYTE *a6) { long long v6; // r12 unsigned int v7; // r13d _BYTE *v8; // rax _BYTE *v9; // r14 _WORD *v10; // rbx unsigned long long v11; // r12 unsigned long long v12; // r15 int v13; // eax int v14; // ecx _BYTE *v15; // rdx v6 = a3 - 1; if ( !a3 ) v6 = 2 * a5; v7 = *(_DWORD *)(a1 + 156); *a6 = 0; v8 = a2; if ( a5 > 0 ) { v9 = a4; v10 = a2; v11 = (unsigned long long)&a2[v6]; v12 = (unsigned long long)&a4[a5]; do { if ( v7 >= 2 && (v13 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v9, v12), v13 >= 2) ) { v14 = v13; if ( (unsigned long long)v10 + (unsigned int)v13 > v11 ) { LABEL_17: *a6 = 1; v8 = v10; break; } v15 = v9 - 1; do { v9 = v15 + 1; v8 = (char *)v10 + 1; *(_BYTE *)v10 = *++v15; v10 = (_WORD *)((char *)v10 + 1); --v14; } while ( v14 ); } else if ( *v9 == 39 ) { v8 = v10 + 1; if ( (unsigned long long)(v10 + 1) > v11 ) goto LABEL_17; *v10 = 10023; } else { v8 = (char *)v10 + 1; if ( (unsigned long long)v10 + 1 > v11 ) goto LABEL_17; *(_BYTE *)v10 = *v9; } ++v9; v10 = v8; } while ( (unsigned long long)v9 < v12 ); } *v8 = 0; return (_BYTE *)(v8 - a2); }
escape_quotes_for_mysql: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX LEA RAX,[R8 + R8*0x1] SUB R12,0x1 CMOVC R12,RAX MOV qword ptr [RBP + -0x40],RDI MOV R13D,dword ptr [RDI + 0x9c] MOV qword ptr [RBP + -0x38],R9 MOV byte ptr [R9],0x0 MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST R8,R8 JLE 0x00192ef3 MOV R15,R8 MOV R14,RCX MOV RBX,qword ptr [RBP + -0x30] ADD R12,RBX ADD R15,RCX LAB_00192e6c: CMP R13D,0x2 JC 0x00192e8e MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R14 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00192eb3 LAB_00192e8e: MOV CL,byte ptr [R14] CMP CL,0x27 JNZ 0x00192ea6 LEA RAX,[RBX + 0x2] CMP RAX,R12 JA 0x00192ee9 MOV word ptr [RBX],0x2727 JMP 0x00192edc LAB_00192ea6: LEA RAX,[RBX + 0x1] CMP RAX,R12 JA 0x00192ee9 MOV byte ptr [RBX],CL JMP 0x00192edc LAB_00192eb3: MOV ECX,EAX MOV EAX,EAX ADD RAX,RBX CMP RAX,R12 JA 0x00192ee9 DEC R14 MOV RDX,R14 LAB_00192ec5: LEA R14,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R14 MOV RBX,RAX DEC ECX JNZ 0x00192ec5 LAB_00192edc: INC R14 MOV RBX,RAX CMP R14,R15 JC 0x00192e6c JMP 0x00192ef3 LAB_00192ee9: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],0x1 MOV RAX,RBX LAB_00192ef3: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long escape_quotes_for_mysql (long param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { uint uVar1; uint uVar2; char *pcVar3; char *pcVar4; char *pcVar5; long lVar6; char *pcVar7; char *pcVar8; lVar6 = param_3 + -1; if (param_3 == 0) { lVar6 = param_5 * 2; } uVar1 = *(uint *)(param_1 + 0x9c); *param_6 = 0; pcVar3 = param_2; if (0 < param_5) { pcVar7 = param_2 + lVar6; pcVar8 = param_4 + param_5; pcVar5 = param_2; do { if ((uVar1 < 2) || (uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pcVar8), (int)uVar2 < 2)) { if (*param_4 == '\'') { pcVar3 = pcVar5 + 2; if (pcVar7 < pcVar3) { LAB_00192ee9: *param_6 = 1; pcVar3 = pcVar5; break; } pcVar5[0] = '\''; pcVar5[1] = '\''; } else { pcVar3 = pcVar5 + 1; if (pcVar7 < pcVar3) goto LAB_00192ee9; *pcVar5 = *param_4; } } else { if (pcVar7 < pcVar5 + uVar2) goto LAB_00192ee9; pcVar4 = param_4 + -1; do { param_4 = pcVar4 + 1; pcVar3 = pcVar5 + 1; *pcVar5 = pcVar4[1]; uVar2 = uVar2 - 1; pcVar4 = param_4; pcVar5 = pcVar3; } while (uVar2 != 0); } param_4 = param_4 + 1; pcVar5 = pcVar3; } while (param_4 < pcVar8); } *pcVar3 = '\0'; return (long)pcVar3 - (long)param_2; }
32,368
walk_and_copy
eloqsql/storage/myisam/ft_nlq_search.c
static int walk_and_copy(FT_SUPERDOC *from, uint32 count __attribute__((unused)), FT_DOC **to) { DBUG_ENTER("walk_and_copy"); from->doc.weight+=from->tmp_weight*from->word_ptr->weight; (*to)->dpos=from->doc.dpos; (*to)->weight=from->doc.weight; (*to)++; DBUG_RETURN(0); }
O3
c
walk_and_copy: pushq %rbp movq %rsp, %rbp movsd 0x18(%rdi), %xmm0 movq (%rdi), %rax movq 0x10(%rdi), %rcx mulsd 0x8(%rcx), %xmm0 addsd 0x8(%rdi), %xmm0 movsd %xmm0, 0x8(%rdi) movq (%rdx), %rcx movq %rax, (%rcx) movsd 0x8(%rdi), %xmm0 movq (%rdx), %rax movsd %xmm0, 0x8(%rax) addq $0x10, (%rdx) xorl %eax, %eax popq %rbp retq
walk_and_copy_0: push rbp mov rbp, rsp movsd xmm0, qword ptr [rdi+18h] mov rax, [rdi] mov rcx, [rdi+10h] mulsd xmm0, qword ptr [rcx+8] addsd xmm0, qword ptr [rdi+8] movsd qword ptr [rdi+8], xmm0 mov rcx, [rdx] mov [rcx], rax movsd xmm0, qword ptr [rdi+8] mov rax, [rdx] movsd qword ptr [rax+8], xmm0 add qword ptr [rdx], 10h xor eax, eax pop rbp retn
long long walk_and_copy_0(double *a1, long long a2, long long a3) { long long v3; // rax v3 = *(_QWORD *)a1; a1[1] = a1[3] * *(double *)(*((_QWORD *)a1 + 2) + 8LL) + a1[1]; **(_QWORD **)a3 = v3; *(double *)(*(_QWORD *)a3 + 8LL) = a1[1]; *(_QWORD *)a3 += 16LL; return 0LL; }
walk_and_copy: PUSH RBP MOV RBP,RSP MOVSD XMM0,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x10] MULSD XMM0,qword ptr [RCX + 0x8] ADDSD XMM0,qword ptr [RDI + 0x8] MOVSD qword ptr [RDI + 0x8],XMM0 MOV RCX,qword ptr [RDX] MOV qword ptr [RCX],RAX MOVSD XMM0,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDX] MOVSD qword ptr [RAX + 0x8],XMM0 ADD qword ptr [RDX],0x10 XOR EAX,EAX POP RBP RET
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3) { param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1]; *(int8 *)*param_3 = *param_1; *(int8 *)(*param_3 + 8) = param_1[1]; *param_3 = *param_3 + 0x10; return 0; }
32,369
insert_events_waits_history_long(PFS_events_waits*)
eloqsql/storage/perfschema/pfs_events_waits.cc
void insert_events_waits_history_long(PFS_events_waits *wait) { if (unlikely(events_waits_history_long_size == 0)) return; uint index= PFS_atomic::add_u32(&events_waits_history_long_index.m_u32, 1); index= index % events_waits_history_long_size; if (index == 0) events_waits_history_long_full= true; /* See related comment in insert_events_waits_history. */ copy_events_waits(&events_waits_history_long_array[index], wait); }
O0
cpp
insert_events_waits_history_long(PFS_events_waits*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, 0x3b7fcc(%rip) # 0x40de80 sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x55ec3 jmp 0x55f14 leaq 0x3b8176(%rip), %rdi # 0x40e040 movl $0x1, %esi callq 0x37ac0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax xorl %ecx, %ecx movl %ecx, %edx divq 0x3b7f9b(%rip) # 0x40de80 movl %edx, %eax movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x55ef7 movb $0x1, 0x3b8109(%rip) # 0x40e000 movq 0x3b8182(%rip), %rdi # 0x40e080 movl -0xc(%rbp), %eax imulq $0xb0, %rax, %rax addq %rax, %rdi movq -0x8(%rbp), %rsi callq 0x55e70 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_Z32insert_events_waits_history_longP16PFS_events_waits: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp cs:events_waits_history_long_size, 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_55EC3 jmp short loc_55F14 loc_55EC3: lea rdi, events_waits_history_long_index; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov [rbp+var_C], eax mov eax, [rbp+var_C] xor ecx, ecx mov edx, ecx div cs:events_waits_history_long_size mov eax, edx mov [rbp+var_C], eax cmp [rbp+var_C], 0 jnz short loc_55EF7 mov cs:events_waits_history_long_full, 1 loc_55EF7: mov rdi, cs:events_waits_history_long_array mov eax, [rbp+var_C] imul rax, 0B0h add rdi, rax mov rsi, [rbp+var_8] call _ZL17copy_events_waitsP16PFS_events_waitsPKS_; copy_events_waits(PFS_events_waits *,PFS_events_waits const*) loc_55F14: add rsp, 10h pop rbp retn
long long insert_events_waits_history_long(long long a1) { long long result; // rax unsigned int v2; // [rsp+4h] [rbp-Ch] result = events_waits_history_long_size == 0; if ( events_waits_history_long_size ) { v2 = (unsigned int)PFS_atomic::add_u32( (PFS_atomic *)&events_waits_history_long_index, (unsigned int *)((char *)&dword_0 + 1)) % events_waits_history_long_size; if ( !v2 ) events_waits_history_long_full = 1; return copy_events_waits(176LL * v2 + events_waits_history_long_array, a1); } return result; }
insert_events_waits_history_long: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [0x0050de80],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00155ec3 JMP 0x00155f14 LAB_00155ec3: LEA RDI,[0x50e040] MOV ESI,0x1 CALL 0x00137ac0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] XOR ECX,ECX MOV EDX,ECX DIV qword ptr [0x0050de80] MOV EAX,EDX MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x00155ef7 MOV byte ptr [0x0050e000],0x1 LAB_00155ef7: MOV RDI,qword ptr [0x0050e080] MOV EAX,dword ptr [RBP + -0xc] IMUL RAX,RAX,0xb0 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x8] CALL 0x00155e70 LAB_00155f14: ADD RSP,0x10 POP RBP RET
/* insert_events_waits_history_long(PFS_events_waits*) */ void insert_events_waits_history_long(PFS_events_waits *param_1) { uint uVar1; if (events_waits_history_long_size != 0) { uVar1 = PFS_atomic::add_u32((uint *)events_waits_history_long_index,1); if ((int)((ulong)uVar1 % events_waits_history_long_size) == 0) { events_waits_history_long_full = 1; } copy_events_waits((PFS_events_waits *) (events_waits_history_long_array + ((ulong)uVar1 % events_waits_history_long_size & 0xffffffff) * 0xb0),param_1); } return; }
32,370
thr_upgrade_write_delay_lock
eloqsql/mysys/thr_lock.c
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data, enum thr_lock_type new_lock_type, ulong lock_wait_timeout) { THR_LOCK *lock=data->lock; enum enum_thr_lock_result res; DBUG_ENTER("thr_upgrade_write_delay_lock"); mysql_mutex_lock(&lock->mutex); if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY) { mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */ } check_locks(lock,"before upgrading lock", data->type, 0); /* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */ data->type= new_lock_type; /* Upgrade lock */ /* Check if someone has given us the lock */ if (!data->cond) { if (!lock->read.data) /* No read locks */ { /* We have the lock */ /* For this function, get_status is not allowed to fail */ if (data->lock->get_status) (*data->lock->get_status)(data->status_param, 0); mysql_mutex_unlock(&lock->mutex); if (lock->start_trans) (*lock->start_trans)(data->status_param); DBUG_RETURN(0); } if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else lock->write.last=data->prev; if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ data->next->prev= &data->next; else lock->write_wait.last= &data->next; data->prev= &lock->write_wait.data; lock->write_wait.data=data; check_locks(lock,"upgrading lock", new_lock_type, 0); } else { check_locks(lock,"waiting for lock", new_lock_type, 0); } res= wait_for_lock(&lock->write_wait, data, 1, lock_wait_timeout); if (res == THR_LOCK_SUCCESS && lock->start_trans) DBUG_RETURN((*lock->start_trans)(data->status_param)); DBUG_RETURN(0); }
O0
c
thr_upgrade_write_delay_lock: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi addq $0x18, %rdi leaq 0x5481c(%rip), %rsi # 0x857da movl $0x5a5, %edx # imm = 0x5A5 callq 0x2f850 movq -0x10(%rbp), %rax cmpl $0x0, 0x40(%rax) je 0x30fdc movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jl 0x31001 movq -0x28(%rbp), %rdi addq $0x18, %rdi callq 0x2f8c0 movq -0x10(%rbp), %rax cmpl $0x0, 0x40(%rax) sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x3118d movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x40(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x31135 movq -0x28(%rbp), %rax cmpq $0x0, 0x70(%rax) jne 0x3108d movq -0x10(%rbp), %rax movq 0x18(%rax), %rax cmpq $0x0, 0xb0(%rax) je 0x31052 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq 0xb0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi xorl %esi, %esi callq *%rax movq -0x28(%rbp), %rdi addq $0x18, %rdi callq 0x2f8c0 movq -0x28(%rbp), %rax cmpq $0x0, 0xd0(%rax) je 0x31082 movq -0x28(%rbp), %rax movq 0xd0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax jmp 0x31084 movb $0x0, -0x1(%rbp) jmp 0x3118d movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x310bc movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x310cf movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x28(%rbp), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0x310fe movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x31111 movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x28(%rbp), %rcx addq $0x80, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x80(%rax) jmp 0x31137 jmp 0x31137 movq -0x28(%rbp), %rdi addq $0x80, %rdi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rcx movl $0x1, %edx callq 0x311a0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x31187 movq -0x28(%rbp), %rax cmpq $0x0, 0xd0(%rax) je 0x31187 jmp 0x3116d movq -0x28(%rbp), %rax movq 0xd0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movb %al, -0x1(%rbp) jmp 0x3118d jmp 0x31189 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
thr_upgrade_write_delay_lock: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] add rdi, 18h lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5A5h call inline_mysql_mutex_lock_4 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0 jz short loc_30FDC mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jl short loc_31001 loc_30FDC: mov rdi, [rbp+var_28] add rdi, 18h call inline_mysql_mutex_unlock_4 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0 setz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp loc_3118D loc_31001: mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+40h], ecx mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jnz loc_31135 mov rax, [rbp+var_28] cmp qword ptr [rax+70h], 0 jnz short loc_3108D mov rax, [rbp+var_10] mov rax, [rax+18h] cmp qword ptr [rax+0B0h], 0 jz short loc_31052 mov rax, [rbp+var_10] mov rax, [rax+18h] mov rax, [rax+0B0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] xor esi, esi call rax loc_31052: mov rdi, [rbp+var_28] add rdi, 18h call inline_mysql_mutex_unlock_4 mov rax, [rbp+var_28] cmp qword ptr [rax+0D0h], 0 jz short loc_31082 mov rax, [rbp+var_28] mov rax, [rax+0D0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax loc_31082: jmp short $+2 loc_31084: mov [rbp+var_1], 0 jmp loc_3118D loc_3108D: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_310BC mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_310CF loc_310BC: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_28] mov [rax+98h], rcx loc_310CF: mov rax, [rbp+var_28] mov rax, [rax+80h] mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jz short loc_310FE mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_31111 loc_310FE: mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_28] mov [rax+88h], rcx loc_31111: mov rcx, [rbp+var_28] add rcx, 80h mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+80h], rcx jmp short loc_31137 loc_31135: jmp short $+2 loc_31137: mov rdi, [rbp+var_28] add rdi, 80h mov rsi, [rbp+var_10] mov rcx, [rbp+var_20] mov edx, 1 call wait_for_lock mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jnz short loc_31187 mov rax, [rbp+var_28] cmp qword ptr [rax+0D0h], 0 jz short loc_31187 jmp short $+2 loc_3116D: mov rax, [rbp+var_28] mov rax, [rax+0D0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax mov [rbp+var_1], al jmp short loc_3118D loc_31187: jmp short $+2 loc_31189: mov [rbp+var_1], 0 loc_3118D: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char thr_upgrade_write_delay_lock(long long a1, int a2, long long a3) { long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-28h] v6 = *(_QWORD *)(a1 + 24); inline_mysql_mutex_lock_4(v6 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5A5u); if ( !*(_DWORD *)(a1 + 64) || *(int *)(a1 + 64) >= 11 ) { inline_mysql_mutex_unlock_4(v6 + 24); return *(_DWORD *)(a1 + 64) == 0; } *(_DWORD *)(a1 + 64) = a2; if ( *(_QWORD *)(a1 + 32) ) goto LABEL_18; if ( *(_QWORD *)(v6 + 112) ) { v3 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v3; if ( v3 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16); else *(_QWORD *)(v6 + 152) = *(_QWORD *)(a1 + 16); v4 = *(_QWORD *)(v6 + 128); *(_QWORD *)(a1 + 8) = v4; if ( v4 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = a1 + 8; else *(_QWORD *)(v6 + 136) = a1 + 8; *(_QWORD *)(a1 + 16) = v6 + 128; *(_QWORD *)(v6 + 128) = a1; LABEL_18: if ( (unsigned int)wait_for_lock(v6 + 128, a1, 1LL, a3) || !*(_QWORD *)(v6 + 208) ) return 0; else return (*(long long ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40)); } if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 176LL) ) (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 24) + 176LL))(*(_QWORD *)(a1 + 40), 0LL); inline_mysql_mutex_unlock_4(v6 + 24); if ( *(_QWORD *)(v6 + 208) ) (*(void ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40)); return 0; }
thr_upgrade_write_delay_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 LEA RSI,[0x1857da] MOV EDX,0x5a5 CALL 0x0012f850 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x0 JZ 0x00130fdc MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0xb JL 0x00131001 LAB_00130fdc: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 CALL 0x0012f8c0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0013118d LAB_00131001: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00131135 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x70],0x0 JNZ 0x0013108d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0xb0],0x0 JZ 0x00131052 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xb0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] XOR ESI,ESI CALL RAX LAB_00131052: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 CALL 0x0012f8c0 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xd0],0x0 JZ 0x00131082 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX LAB_00131082: JMP 0x00131084 LAB_00131084: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013118d LAB_0013108d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001310bc MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001310cf LAB_001310bc: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],RCX LAB_001310cf: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x001310fe MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x00131111 LAB_001310fe: MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x88],RCX LAB_00131111: MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x80 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x80],RCX JMP 0x00131137 LAB_00131135: JMP 0x00131137 LAB_00131137: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x80 MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV EDX,0x1 CALL 0x001311a0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x00131187 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xd0],0x0 JZ 0x00131187 JMP 0x0013116d LAB_0013116d: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX MOV byte ptr [RBP + -0x1],AL JMP 0x0013118d LAB_00131187: JMP 0x00131189 LAB_00131189: MOV byte ptr [RBP + -0x1],0x0 LAB_0013118d: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 thr_upgrade_write_delay_lock(long param_1,int4 param_2,int8 param_3) { long lVar1; long lVar2; int iVar3; int1 local_9; lVar1 = *(long *)(param_1 + 0x18); inline_mysql_mutex_lock (lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5a5); if ((*(int *)(param_1 + 0x40) == 0) || (10 < *(int *)(param_1 + 0x40))) { inline_mysql_mutex_unlock(lVar1 + 0x18); local_9 = *(int *)(param_1 + 0x40) == 0; } else { *(int4 *)(param_1 + 0x40) = param_2; if (*(long *)(param_1 + 0x20) == 0) { if (*(long *)(lVar1 + 0x70) == 0) { if (*(long *)(*(long *)(param_1 + 0x18) + 0xb0) != 0) { (**(code **)(*(long *)(param_1 + 0x18) + 0xb0))(*(int8 *)(param_1 + 0x28),0); } inline_mysql_mutex_unlock(lVar1 + 0x18); if (*(long *)(lVar1 + 0xd0) != 0) { (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); } return 0; } lVar2 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar2; if (lVar2 == 0) { *(int8 *)(lVar1 + 0x98) = *(int8 *)(param_1 + 0x10); } else { *(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10); } lVar2 = *(long *)(lVar1 + 0x80); *(long *)(param_1 + 8) = lVar2; if (lVar2 == 0) { *(long *)(lVar1 + 0x88) = param_1 + 8; } else { *(long *)(*(long *)(param_1 + 8) + 0x10) = param_1 + 8; } *(long *)(param_1 + 0x10) = lVar1 + 0x80; *(long *)(lVar1 + 0x80) = param_1; } iVar3 = wait_for_lock(lVar1 + 0x80,param_1,1,param_3); if ((iVar3 == 0) && (*(long *)(lVar1 + 0xd0) != 0)) { local_9 = (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); } else { local_9 = 0; } } return local_9; }
32,371
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 0x5c5bb movl $0x0, -0x4(%rbp) jmp 0x5c62b cmpl $0x0, -0x1c(%rbp) jne 0x5c5d4 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rdi movq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x4(%rbp) jmp 0x5c62b movl $0x0, -0x38(%rbp) cmpl $0x100, -0x38(%rbp) # imm = 0x100 jge 0x5c624 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 0x5c590 movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0x5c617 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5c62b jmp 0x5c619 movl -0x38(%rbp), %eax addl $0x1, %eax movl %eax, -0x38(%rbp) jmp 0x5c5db 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_5C5BB mov [rbp+var_4], 0 jmp short loc_5C62B loc_5C5BB: cmp [rbp+var_1C], 0 jnz short loc_5C5D4 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_5C62B loc_5C5D4: mov [rbp+var_38], 0 loc_5C5DB: cmp [rbp+var_38], 100h jge short loc_5C624 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_5C617 mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_5C62B loc_5C617: jmp short $+2 loc_5C619: mov eax, [rbp+var_38] add eax, 1 mov [rbp+var_38], eax jmp short loc_5C5DB loc_5C624: mov [rbp+var_4], 0 loc_5C62B: 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 0x0015c5bb MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015c62b LAB_0015c5bb: CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0015c5d4 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 0x0015c62b LAB_0015c5d4: MOV dword ptr [RBP + -0x38],0x0 LAB_0015c5db: CMP dword ptr [RBP + -0x38],0x100 JGE 0x0015c624 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 0x0015c590 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x0015c617 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015c62b LAB_0015c617: JMP 0x0015c619 LAB_0015c619: MOV EAX,dword ptr [RBP + -0x38] ADD EAX,0x1 MOV dword ptr [RBP + -0x38],EAX JMP 0x0015c5db LAB_0015c624: MOV dword ptr [RBP + -0x4],0x0 LAB_0015c62b: 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; }
32,372
mariadb_get_infov
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...) { va_list ap; va_start(ap, arg); switch(value) { case MARIADB_MAX_ALLOWED_PACKET: *((size_t *)arg)= (size_t)max_allowed_packet; break; case MARIADB_NET_BUFFER_LENGTH: *((size_t *)arg)= (size_t)net_buffer_length; break; case MARIADB_CONNECTION_ERROR_ID: if (!mysql) goto error; *((unsigned int *)arg)= mysql->net.last_errno; break; case MARIADB_CONNECTION_ERROR: if (!mysql) goto error; *((char **)arg)= mysql->net.last_error; break; case MARIADB_CONNECTION_SQLSTATE: if (!mysql) goto error; *((char **)arg)= mysql->net.sqlstate; break; case MARIADB_CONNECTION_TLS_VERSION: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((char **)arg)= (char *)ma_pvio_tls_get_protocol_version(mysql->net.pvio->ctls); else #endif goto error; break; case MARIADB_CONNECTION_TLS_VERSION_ID: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((unsigned int *)arg)= ma_pvio_tls_get_protocol_version_id(mysql->net.pvio->ctls); else #endif goto error; break; case MARIADB_TLS_LIBRARY: #ifdef HAVE_TLS *((const char **)arg)= tls_library_version; #else *((const char **)arg)= "Off"; #endif break; case MARIADB_CLIENT_VERSION: *((const char **)arg)= MARIADB_CLIENT_VERSION_STR; break; case MARIADB_CLIENT_VERSION_ID: *((size_t *)arg)= MARIADB_VERSION_ID; break; case MARIADB_CONNECTION_SERVER_VERSION: if (mysql) *((char **)arg)= mysql->server_version; else goto error; break; case MARIADB_CONNECTION_SERVER_TYPE: if (mysql) *((const char **)arg)= mariadb_connection(mysql) ? "MariaDB" : "MySQL"; else goto error; break; case MARIADB_CONNECTION_SERVER_VERSION_ID: if (mysql) *((size_t *)arg)= mariadb_server_version_id(mysql); else goto error; break; case MARIADB_CONNECTION_PROTOCOL_VERSION_ID: if (mysql) *((unsigned int *)arg)= mysql->protocol_version; else goto error; break; case MARIADB_CONNECTION_MARIADB_CHARSET_INFO: if (mysql) mariadb_get_charset_info(mysql, (MY_CHARSET_INFO *)arg); else goto error; break; case MARIADB_CONNECTION_SOCKET: if (mysql) *((my_socket *)arg)= mariadb_get_socket(mysql); else goto error; break; case MARIADB_CONNECTION_TYPE: if (mysql && mysql->net.pvio) *((int *)arg)= (int)mysql->net.pvio->type; else goto error; break; case MARIADB_CONNECTION_ASYNC_TIMEOUT_MS: if (mysql && mysql->options.extension && mysql->options.extension->async_context) *((unsigned int *)arg)= mysql->options.extension->async_context->timeout_value; break; case MARIADB_CONNECTION_ASYNC_TIMEOUT: if (mysql && mysql->options.extension && mysql->options.extension->async_context) { unsigned int timeout= mysql->options.extension->async_context->timeout_value; if (timeout > UINT_MAX - 999) *((unsigned int *)arg)= (timeout - 1)/1000 + 1; else *((unsigned int *)arg)= (timeout+999)/1000; } break; case MARIADB_CHARSET_NAME: { char *name; name= va_arg(ap, char *); if (name) *((MARIADB_CHARSET_INFO **)arg)= (MARIADB_CHARSET_INFO *)mysql_find_charset_name(name); else goto error; } break; case MARIADB_CHARSET_ID: { unsigned int nr; nr= va_arg(ap, unsigned int); *((MARIADB_CHARSET_INFO **)arg)= (MARIADB_CHARSET_INFO *)mysql_find_charset_nr(nr); } break; case MARIADB_CONNECTION_SSL_CIPHER: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((char **)arg)= (char *)ma_pvio_tls_cipher(mysql->net.pvio->ctls); else #endif *((char **)arg)= NULL; break; case MARIADB_CLIENT_ERRORS: *((char ***)arg)= (char **)client_errors; break; case MARIADB_CONNECTION_INFO: if (mysql) *((char **)arg)= (char *)mysql->info; else goto error; break; case MARIADB_CONNECTION_PVIO_TYPE: if (mysql && mysql->net.pvio) *((unsigned int *)arg)= (unsigned int)mysql->net.pvio->type; else goto error; break; case MARIADB_CONNECTION_SCHEMA: if (mysql) *((char **)arg)= mysql->db; else goto error; break; case MARIADB_CONNECTION_USER: if (mysql) *((char **)arg)= mysql->user; else goto error; break; case MARIADB_CONNECTION_PORT: if (mysql) *((unsigned int *)arg)= mysql->port; else goto error; break; case MARIADB_CONNECTION_UNIX_SOCKET: if (mysql) *((char **)arg)= mysql->unix_socket; else goto error; break; case MARIADB_CONNECTION_HOST: if (mysql) *((char **)arg)= mysql->host; else goto error; break; case MARIADB_CONNECTION_SERVER_STATUS: if (mysql) *((unsigned int *)arg)= mysql->server_status; else goto error; break; case MARIADB_CONNECTION_SERVER_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->server_capabilities; else goto error; break; case MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->extension->mariadb_server_capabilities; else goto error; break; case MARIADB_CONNECTION_CLIENT_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->client_flag; else goto error; break; case MARIADB_CONNECTION_BYTES_READ: *((size_t *)arg)= mysql->net.pvio->bytes_read; break; case MARIADB_CONNECTION_BYTES_SENT: *((size_t *)arg)= mysql->net.pvio->bytes_sent; break; default: va_end(ap); return(-1); } va_end(ap); return(0); error: va_end(ap); return(-1); }
O3
c
mariadb_get_infov: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xc8, %rsp movq %rdx, %rbx leaq -0xd0(%rbp), %rdx movq %rcx, 0x18(%rdx) movq %r8, 0x20(%rdx) movq %r9, 0x28(%rdx) testb %al, %al je 0x219ce 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) movq %rdx, -0x10(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x18(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 movq %rax, -0x20(%rbp) movb $-0x1, %al cmpl $0x23, %esi ja 0x21d81 movl %esi, %ecx leaq 0x1d6bc(%rip), %rdx # 0x3f0b8 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx testq %rdi, %rdi je 0x21d81 movq (%rdi), %rcx testq %rcx, %rcx je 0x21d81 movl 0x20(%rcx), %eax jmp 0x21d1e movq (%rdi), %rax movq 0x68(%rax), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2b8(%rdi), %rax jmp 0x21d7c movq (%rdi), %rax movq 0x60(%rax), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2d0(%rdi), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2e8(%rdi), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x368(%rdi), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2e0(%rdi), %rax jmp 0x21d7c movq $0x18902, (%rbx) # imm = 0x18902 jmp 0x21d7f testq %rdi, %rdi je 0x21d81 movl 0x360(%rdi), %eax jmp 0x21d1e testq %rdi, %rdi je 0x21d81 movl 0x90(%rdi), %eax jmp 0x21d1e leaq 0x2f412(%rip), %rax # 0x50ef0 jmp 0x21d7c testq %rdi, %rdi je 0x21d81 callq 0x1a9df testb %al, %al leaq 0x1a455(%rip), %rax # 0x3bf4f leaq 0x1a43e(%rip), %rcx # 0x3bf3f cmoveq %rax, %rcx movq %rcx, (%rbx) jmp 0x21d7f leaq 0x1a441(%rip), %rax # 0x3bf55 jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq %rbx, %rsi callq 0x21770 jmp 0x21d7f movl -0x20(%rbp), %ecx cmpq $0x28, %rcx ja 0x21d4e movq %rcx, %rax addq -0x10(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x20(%rbp) jmp 0x21d5a movl -0x20(%rbp), %edx cmpq $0x28, %rdx ja 0x21d63 movq %rdx, %rcx addq -0x10(%rbp), %rcx addl $0x8, %edx movl %edx, -0x20(%rbp) jmp 0x21d6f testq %rdi, %rdi je 0x21d81 movq 0x370(%rdi), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2d0(%rdi), %rdi callq 0x20e75 jmp 0x21d7c testq %rdi, %rdi je 0x21d45 movq (%rdi), %rax testq %rax, %rax je 0x21d45 movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x21d45 callq 0x22b46 jmp 0x21d7c testq %rdi, %rdi je 0x21d7f movq 0x480(%rdi), %rax testq %rax, %rax je 0x21d7f movq 0x28(%rax), %rax testq %rax, %rax je 0x21d7f movl 0x10(%rax), %eax cmpl $0xfffffc19, %eax # imm = 0xFFFFFC19 jb 0x21d8b decl %eax imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3 shrq $0x26, %rax incl %eax jmp 0x21d9b leaq 0x310f9(%rip), %rax # 0x52d10 jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movl 0x378(%rdi), %eax jmp 0x21d1e testq %rdi, %rdi je 0x21d7f movq 0x480(%rdi), %rax testq %rax, %rax je 0x21d7f movq 0x28(%rax), %rax testq %rax, %rax je 0x21d7f movl 0x10(%rax), %eax jmp 0x21d1e testq %rdi, %rdi je 0x21d81 callq 0x21922 jmp 0x21d1e testq %rdi, %rdi je 0x21d81 movq 0x2b0(%rdi), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 addq $0x97, %rdi jmp 0x21cfe testq %rdi, %rdi je 0x21d81 movl 0x380(%rdi), %eax jmp 0x21d1e testq %rdi, %rdi je 0x21d81 movq 0x4f0(%rdi), %rax movq 0x70(%rax), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq (%rdi), %rcx testq %rcx, %rcx je 0x21d81 movq 0x38(%rcx), %rdi testq %rdi, %rdi je 0x21d81 callq 0x22b64 jmp 0x21d7c testq %rdi, %rdi je 0x21d81 addq $0x297, %rdi # imm = 0x297 movq %rdi, (%rbx) jmp 0x21d7f testq %rdi, %rdi je 0x21d81 movq (%rdi), %rcx testq %rcx, %rcx je 0x21d81 movq 0x38(%rcx), %rdi testq %rdi, %rdi je 0x21d81 callq 0x22b5a movl %eax, (%rbx) jmp 0x21d7f leaq 0x2f16f(%rip), %rax # 0x50e98 jmp 0x21d32 leaq 0x2f17e(%rip), %rax # 0x50eb0 movq (%rax), %rax jmp 0x21d7c testq %rdi, %rdi je 0x21d81 movq 0x2c8(%rdi), %rax jmp 0x21d7c movq $0x0, (%rbx) jmp 0x21d7f movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movl (%rax), %edi callq 0x35292 jmp 0x21d7c movq -0x18(%rbp), %rcx leaq 0x8(%rcx), %rdx movq %rdx, -0x18(%rbp) movq (%rcx), %rdi testq %rdi, %rdi je 0x21d81 callq 0x35316 movq %rax, (%rbx) xorl %eax, %eax addq $0xc8, %rsp popq %rbx popq %rbp retq addl $0x3e7, %eax # imm = 0x3E7 imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3 shrq $0x26, %rax movl %eax, (%rbx) jmp 0x21d7f
mariadb_get_infov: push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov rbx, rdx lea rdx, [rbp+var_D0] mov [rdx+18h], rcx mov [rdx+20h], r8 mov [rdx+28h], r9 test al, al jz short loc_219CE 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_219CE: mov [rbp+var_10], rdx lea rax, [rbp+arg_0] mov [rbp+var_18], rax mov rax, 3000000018h mov [rbp+var_20], rax mov al, 0FFh cmp esi, 23h; switch 36 cases ja def_21A03; jumptable 0000000000021A03 default case mov ecx, esi lea rdx, jpt_21A03 movsxd rcx, ds:(jpt_21A03 - 3F0B8h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_21A05: test rdi, rdi; jumptable 0000000000021A03 cases 14,25 jz def_21A03; jumptable 0000000000021A03 default case mov rcx, [rdi] test rcx, rcx jz def_21A03; jumptable 0000000000021A03 default case mov eax, [rcx+20h] jmp loc_21D1E loc_21A22: mov rax, [rdi]; jumptable 0000000000021A03 case 35 mov rax, [rax+68h] jmp loc_21D7C loc_21A2E: test rdi, rdi; jumptable 0000000000021A03 case 27 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2B8h] jmp loc_21D7C loc_21A43: mov rax, [rdi]; jumptable 0000000000021A03 case 34 mov rax, [rax+60h] jmp loc_21D7C loc_21A4F: test rdi, rdi; jumptable 0000000000021A03 case 17 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2D0h] jmp loc_21D7C loc_21A64: test rdi, rdi; jumptable 0000000000021A03 case 15 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2E8h] jmp loc_21D7C loc_21A79: test rdi, rdi; jumptable 0000000000021A03 case 33 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+368h] jmp loc_21D7C loc_21A8E: test rdi, rdi; jumptable 0000000000021A03 case 11 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2E0h] jmp loc_21D7C loc_21AA3: mov qword ptr [rbx], offset loc_18902; jumptable 0000000000021A03 case 4 jmp loc_21D7F loc_21AAF: test rdi, rdi; jumptable 0000000000021A03 case 12 jz def_21A03; jumptable 0000000000021A03 default case mov eax, [rdi+360h] jmp loc_21D1E loc_21AC3: test rdi, rdi; jumptable 0000000000021A03 case 9 jz def_21A03; jumptable 0000000000021A03 default case mov eax, [rdi+90h] jmp loc_21D1E loc_21AD7: lea rax, client_errors; jumptable 0000000000021A03 case 2 jmp loc_21D7C loc_21AE3: test rdi, rdi; jumptable 0000000000021A03 case 16 jz def_21A03; jumptable 0000000000021A03 default case call mariadb_connection test al, al lea rax, aMysql; "MySQL" lea rcx, aMariadb; "MariaDB" cmovz rcx, rax mov [rbx], rcx jmp loc_21D7F loc_21B0D: lea rax, a10610; jumptable 0000000000021A03 case 3 jmp loc_21D7C loc_21B19: test rdi, rdi; jumptable 0000000000021A03 case 7 jz def_21A03; jumptable 0000000000021A03 default case mov rsi, rbx call mariadb_get_charset_info jmp loc_21D7F loc_21B2F: mov ecx, dword ptr [rbp+var_20]; jumptable 0000000000021A03 case 0 cmp rcx, 28h ; '(' ja loc_21D4E mov rax, rcx add rax, [rbp+var_10] add ecx, 8 mov dword ptr [rbp+var_20], ecx jmp loc_21D5A loc_21B4E: mov edx, dword ptr [rbp+var_20]; jumptable 0000000000021A03 case 1 cmp rdx, 28h ; '(' ja loc_21D63 mov rcx, rdx add rcx, [rbp+var_10] add edx, 8 mov dword ptr [rbp+var_20], edx jmp loc_21D6F loc_21B6D: test rdi, rdi; jumptable 0000000000021A03 case 31 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+370h] jmp loc_21D7C loc_21B82: test rdi, rdi; jumptable 0000000000021A03 case 18 jz def_21A03; jumptable 0000000000021A03 default case mov rdi, [rdi+2D0h] call mariadb_server_version_id jmp loc_21D7C loc_21B9C: test rdi, rdi; jumptable 0000000000021A03 case 21 jz loc_21D45 mov rax, [rdi] test rax, rax jz loc_21D45 mov rdi, [rax+38h] test rdi, rdi jz loc_21D45 call ma_pvio_tls_cipher jmp loc_21D7C loc_21BC8: test rdi, rdi; jumptable 0000000000021A03 case 5 jz loc_21D7F mov rax, [rdi+480h] test rax, rax jz loc_21D7F mov rax, [rax+28h] test rax, rax jz loc_21D7F mov eax, [rax+10h] cmp eax, 0FFFFFC19h jb loc_21D8B dec eax imul rax, 10624DD3h shr rax, 26h inc eax jmp loc_21D9B loc_21C10: lea rax, tls_library_version; jumptable 0000000000021A03 case 22 jmp loc_21D7C loc_21C1C: test rdi, rdi; jumptable 0000000000021A03 case 13 jz def_21A03; jumptable 0000000000021A03 default case mov eax, [rdi+378h] jmp loc_21D1E loc_21C30: test rdi, rdi; jumptable 0000000000021A03 case 6 jz loc_21D7F mov rax, [rdi+480h] test rax, rax jz loc_21D7F mov rax, [rax+28h] test rax, rax jz loc_21D7F mov eax, [rax+10h] jmp loc_21D1E loc_21C5E: test rdi, rdi; jumptable 0000000000021A03 case 19 jz def_21A03; jumptable 0000000000021A03 default case call mariadb_get_socket jmp loc_21D1E loc_21C71: test rdi, rdi; jumptable 0000000000021A03 case 10 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2B0h] jmp loc_21D7C loc_21C86: test rdi, rdi; jumptable 0000000000021A03 case 8 jz def_21A03; jumptable 0000000000021A03 default case add rdi, 97h jmp short loc_21CFE loc_21C98: test rdi, rdi; jumptable 0000000000021A03 case 30 jz def_21A03; jumptable 0000000000021A03 default case mov eax, [rdi+380h] jmp short loc_21D1E loc_21CA9: test rdi, rdi; jumptable 0000000000021A03 case 32 jz def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+4F0h] mov rax, [rax+70h] jmp loc_21D7C loc_21CC2: test rdi, rdi; jumptable 0000000000021A03 case 23 jz def_21A03; jumptable 0000000000021A03 default case mov rcx, [rdi] test rcx, rcx jz def_21A03; jumptable 0000000000021A03 default case mov rdi, [rcx+38h] test rdi, rdi jz def_21A03; jumptable 0000000000021A03 default case call ma_pvio_tls_get_protocol_version jmp loc_21D7C loc_21CEE: test rdi, rdi; jumptable 0000000000021A03 case 20 jz def_21A03; jumptable 0000000000021A03 default case add rdi, 297h loc_21CFE: mov [rbx], rdi jmp short loc_21D7F loc_21D03: test rdi, rdi; jumptable 0000000000021A03 case 24 jz short def_21A03; jumptable 0000000000021A03 default case mov rcx, [rdi] test rcx, rcx jz short def_21A03; jumptable 0000000000021A03 default case mov rdi, [rcx+38h] test rdi, rdi jz short def_21A03; jumptable 0000000000021A03 default case call ma_pvio_tls_get_protocol_version_id loc_21D1E: mov [rbx], eax jmp short loc_21D7F loc_21D22: lea rax, max_allowed_packet; jumptable 0000000000021A03 case 28 jmp short loc_21D32 loc_21D2B: lea rax, net_buffer_length; jumptable 0000000000021A03 case 29 loc_21D32: mov rax, [rax] jmp short loc_21D7C loc_21D37: test rdi, rdi; jumptable 0000000000021A03 case 26 jz short def_21A03; jumptable 0000000000021A03 default case mov rax, [rdi+2C8h] jmp short loc_21D7C loc_21D45: mov qword ptr [rbx], 0 jmp short loc_21D7F loc_21D4E: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx loc_21D5A: mov edi, [rax] call mysql_find_charset_nr jmp short loc_21D7C loc_21D63: mov rcx, [rbp+var_18] lea rdx, [rcx+8] mov [rbp+var_18], rdx loc_21D6F: mov rdi, [rcx] test rdi, rdi jz short def_21A03; jumptable 0000000000021A03 default case call mysql_find_charset_name loc_21D7C: mov [rbx], rax loc_21D7F: xor eax, eax def_21A03: add rsp, 0C8h; jumptable 0000000000021A03 default case pop rbx pop rbp retn loc_21D8B: add eax, 3E7h imul rax, 10624DD3h shr rax, 26h loc_21D9B: mov [rbx], eax jmp short loc_21D7F
long long mariadb_get_infov( long long a1, int a2, const char **a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { long long result; // rax int socket; // eax const char *charset_nr; // rax bool v19; // al const char *v20; // rcx char *v21; // rax char *v22; // rcx long long v23; // rax long long v24; // rax unsigned int v25; // eax unsigned int v26; // eax long long v27; // rax long long v28; // rax long long v29; // rdi const char **v30; // rax char v31; // [rsp+0h] [rbp-D0h] BYREF long long v32; // [rsp+18h] [rbp-B8h] long long v33; // [rsp+20h] [rbp-B0h] long long v34; // [rsp+28h] [rbp-A8h] __m128 v35; // [rsp+30h] [rbp-A0h] __m128 v36; // [rsp+40h] [rbp-90h] __m128 v37; // [rsp+50h] [rbp-80h] __m128 v38; // [rsp+60h] [rbp-70h] __m128 v39; // [rsp+70h] [rbp-60h] __m128 v40; // [rsp+80h] [rbp-50h] __m128 v41; // [rsp+90h] [rbp-40h] __m128 v42; // [rsp+A0h] [rbp-30h] long long v43; // [rsp+B0h] [rbp-20h] char *v44; // [rsp+B8h] [rbp-18h] char *v45; // [rsp+C0h] [rbp-10h] v35 = a7; v36 = a8; v37 = a9; v38 = a10; v39 = a11; v40 = a12; v41 = a13; v42 = a14; v32 = a4; v33 = a5; v34 = a6; v45 = &v31; v44 = &a15; result = 0x30000000FFLL; v43 = 0x3000000018LL; switch ( a2 ) { case 0: if ( (unsigned int)v43 > 0x28uLL ) { v21 = v44; v44 += 8; } else { v21 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } charset_nr = (const char *)mysql_find_charset_nr(*(unsigned int *)v21); goto LABEL_87; case 1: if ( (unsigned int)v43 > 0x28uLL ) { v22 = v44; v44 += 8; } else { v22 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } if ( !*(_QWORD *)v22 ) return result; charset_nr = (const char *)mysql_find_charset_name(*(_QWORD *)v22); goto LABEL_87; case 2: charset_nr = (const char *)client_errors; goto LABEL_87; case 3: charset_nr = "10.6.10"; goto LABEL_87; case 4: *a3 = (const char *)&loc_18902; return 0LL; case 5: if ( a1 ) { v23 = *(_QWORD *)(a1 + 1152); if ( v23 ) { v24 = *(_QWORD *)(v23 + 40); if ( v24 ) { v25 = *(_DWORD *)(v24 + 16); if ( v25 < 0xFFFFFC19 ) v26 = (v25 + 999) / 0x3E8; else v26 = (v25 - 1) / 0x3E8 + 1; *(_DWORD *)a3 = v26; } } } return 0LL; case 6: if ( !a1 ) return 0LL; v27 = *(_QWORD *)(a1 + 1152); if ( !v27 ) return 0LL; v28 = *(_QWORD *)(v27 + 40); if ( !v28 ) return 0LL; socket = *(_DWORD *)(v28 + 16); goto LABEL_75; case 7: if ( !a1 ) return result; mariadb_get_charset_info(a1, (long long)a3); return 0LL; case 8: if ( !a1 ) return result; v29 = a1 + 151; goto LABEL_70; case 9: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 144); goto LABEL_75; case 10: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 688); goto LABEL_87; case 11: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 736); goto LABEL_87; case 12: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 864); goto LABEL_75; case 13: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 888); goto LABEL_75; case 14: case 25: if ( !a1 || !*(_QWORD *)a1 ) return result; socket = *(_DWORD *)(*(_QWORD *)a1 + 32LL); goto LABEL_75; case 15: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 744); goto LABEL_87; case 16: if ( !a1 ) return result; v19 = mariadb_connection(a1); v20 = "MariaDB"; if ( !v19 ) v20 = "MySQL"; *a3 = v20; return 0LL; case 17: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 720); goto LABEL_87; case 18: if ( !a1 ) return result; charset_nr = (const char *)mariadb_server_version_id(*(_QWORD *)(a1 + 720)); goto LABEL_87; case 19: if ( !a1 ) return result; socket = mariadb_get_socket((long long *)a1); goto LABEL_75; case 20: if ( !a1 ) return result; v29 = a1 + 663; LABEL_70: *a3 = (const char *)v29; return 0LL; case 21: if ( a1 && *(_QWORD *)a1 && *(_QWORD *)(*(_QWORD *)a1 + 56LL) ) { charset_nr = (const char *)ma_pvio_tls_cipher(); LABEL_87: *a3 = charset_nr; } else { *a3 = 0LL; } return 0LL; case 22: charset_nr = (const char *)&tls_library_version; goto LABEL_87; case 23: if ( !a1 || !*(_QWORD *)a1 || !*(_QWORD *)(*(_QWORD *)a1 + 56LL) ) return result; charset_nr = (const char *)ma_pvio_tls_get_protocol_version(); goto LABEL_87; case 24: if ( !a1 || !*(_QWORD *)a1 || !*(_QWORD *)(*(_QWORD *)a1 + 56LL) ) return result; socket = ma_pvio_tls_get_protocol_version_id(); goto LABEL_75; case 26: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 712); goto LABEL_87; case 27: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 696); goto LABEL_87; case 28: v30 = (const char **)&max_allowed_packet; goto LABEL_78; case 29: v30 = (const char **)&net_buffer_length; LABEL_78: charset_nr = *v30; goto LABEL_87; case 30: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 896); LABEL_75: *(_DWORD *)a3 = socket; return 0LL; case 31: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 880); goto LABEL_87; case 32: if ( !a1 ) return result; charset_nr = *(const char **)(*(_QWORD *)(a1 + 1264) + 112LL); goto LABEL_87; case 33: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 872); goto LABEL_87; case 34: charset_nr = *(const char **)(*(_QWORD *)a1 + 96LL); goto LABEL_87; case 35: charset_nr = *(const char **)(*(_QWORD *)a1 + 104LL); goto LABEL_87; default: return result; } }
mariadb_get_infov: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV RBX,RDX LEA RDX,[RBP + -0xd0] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX + 0x20],R8 MOV qword ptr [RDX + 0x28],R9 TEST AL,AL JZ 0x001219ce 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_001219ce: MOV qword ptr [RBP + -0x10],RDX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,0x3000000018 MOV qword ptr [RBP + -0x20],RAX MOV AL,0xff CMP ESI,0x23 JA 0x00121d81 MOV ECX,ESI LEA RDX,[0x13f0b8] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_e: TEST RDI,RDI JZ 0x00121d81 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x00121d81 MOV EAX,dword ptr [RCX + 0x20] JMP 0x00121d1e caseD_23: MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x68] JMP 0x00121d7c caseD_1b: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2b8] JMP 0x00121d7c caseD_22: MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x60] JMP 0x00121d7c caseD_11: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2d0] JMP 0x00121d7c caseD_f: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2e8] JMP 0x00121d7c caseD_21: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x368] JMP 0x00121d7c caseD_b: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2e0] JMP 0x00121d7c caseD_4: MOV qword ptr [RBX],0x18902 JMP 0x00121d7f caseD_c: TEST RDI,RDI JZ 0x00121d81 MOV EAX,dword ptr [RDI + 0x360] JMP 0x00121d1e caseD_9: TEST RDI,RDI JZ 0x00121d81 MOV EAX,dword ptr [RDI + 0x90] JMP 0x00121d1e caseD_2: LEA RAX,[0x150ef0] JMP 0x00121d7c caseD_10: TEST RDI,RDI JZ 0x00121d81 CALL 0x0011a9df TEST AL,AL LEA RAX,[0x13bf4f] LEA RCX,[0x13bf3f] CMOVZ RCX,RAX MOV qword ptr [RBX],RCX JMP 0x00121d7f caseD_3: LEA RAX,[0x13bf55] JMP 0x00121d7c caseD_7: TEST RDI,RDI JZ 0x00121d81 MOV RSI,RBX CALL 0x00121770 JMP 0x00121d7f caseD_0: MOV ECX,dword ptr [RBP + -0x20] CMP RCX,0x28 JA 0x00121d4e MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x10] ADD ECX,0x8 MOV dword ptr [RBP + -0x20],ECX JMP 0x00121d5a caseD_1: MOV EDX,dword ptr [RBP + -0x20] CMP RDX,0x28 JA 0x00121d63 MOV RCX,RDX ADD RCX,qword ptr [RBP + -0x10] ADD EDX,0x8 MOV dword ptr [RBP + -0x20],EDX JMP 0x00121d6f caseD_1f: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x370] JMP 0x00121d7c caseD_12: TEST RDI,RDI JZ 0x00121d81 MOV RDI,qword ptr [RDI + 0x2d0] CALL 0x00120e75 JMP 0x00121d7c caseD_15: TEST RDI,RDI JZ 0x00121d45 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00121d45 MOV RDI,qword ptr [RAX + 0x38] TEST RDI,RDI JZ 0x00121d45 CALL 0x00122b46 JMP 0x00121d7c caseD_5: TEST RDI,RDI JZ 0x00121d7f MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x00121d7f MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x00121d7f MOV EAX,dword ptr [RAX + 0x10] CMP EAX,0xfffffc19 JC 0x00121d8b DEC EAX IMUL RAX,RAX,0x10624dd3 SHR RAX,0x26 INC EAX JMP 0x00121d9b caseD_16: LEA RAX,[0x152d10] JMP 0x00121d7c caseD_d: TEST RDI,RDI JZ 0x00121d81 MOV EAX,dword ptr [RDI + 0x378] JMP 0x00121d1e caseD_6: TEST RDI,RDI JZ 0x00121d7f MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x00121d7f MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x00121d7f MOV EAX,dword ptr [RAX + 0x10] JMP 0x00121d1e caseD_13: TEST RDI,RDI JZ 0x00121d81 CALL 0x00121922 JMP 0x00121d1e caseD_a: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2b0] JMP 0x00121d7c caseD_8: TEST RDI,RDI JZ 0x00121d81 ADD RDI,0x97 JMP 0x00121cfe caseD_1e: TEST RDI,RDI JZ 0x00121d81 MOV EAX,dword ptr [RDI + 0x380] JMP 0x00121d1e caseD_20: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x4f0] MOV RAX,qword ptr [RAX + 0x70] JMP 0x00121d7c caseD_17: TEST RDI,RDI JZ 0x00121d81 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x00121d81 MOV RDI,qword ptr [RCX + 0x38] TEST RDI,RDI JZ 0x00121d81 CALL 0x00122b64 JMP 0x00121d7c caseD_14: TEST RDI,RDI JZ 0x00121d81 ADD RDI,0x297 LAB_00121cfe: MOV qword ptr [RBX],RDI JMP 0x00121d7f caseD_18: TEST RDI,RDI JZ 0x00121d81 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x00121d81 MOV RDI,qword ptr [RCX + 0x38] TEST RDI,RDI JZ 0x00121d81 CALL 0x00122b5a LAB_00121d1e: MOV dword ptr [RBX],EAX JMP 0x00121d7f caseD_1c: LEA RAX,[0x150e98] JMP 0x00121d32 caseD_1d: LEA RAX,[0x150eb0] LAB_00121d32: MOV RAX,qword ptr [RAX] JMP 0x00121d7c caseD_1a: TEST RDI,RDI JZ 0x00121d81 MOV RAX,qword ptr [RDI + 0x2c8] JMP 0x00121d7c LAB_00121d45: MOV qword ptr [RBX],0x0 JMP 0x00121d7f LAB_00121d4e: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX LAB_00121d5a: MOV EDI,dword ptr [RAX] CALL 0x00135292 JMP 0x00121d7c LAB_00121d63: MOV RCX,qword ptr [RBP + -0x18] LEA RDX,[RCX + 0x8] MOV qword ptr [RBP + -0x18],RDX LAB_00121d6f: MOV RDI,qword ptr [RCX] TEST RDI,RDI JZ 0x00121d81 CALL 0x00135316 LAB_00121d7c: MOV qword ptr [RBX],RAX LAB_00121d7f: XOR EAX,EAX default: ADD RSP,0xc8 POP RBX POP RBP RET LAB_00121d8b: ADD EAX,0x3e7 IMUL RAX,RAX,0x10624dd3 SHR RAX,0x26 LAB_00121d9b: MOV dword ptr [RBX],EAX JMP 0x00121d7f
/* WARNING: Removing unreachable block (ram,0x00121d4e) */ /* WARNING: Removing unreachable block (ram,0x00121d63) */ /* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffff40 : 0x00121d5a */ /* WARNING: Restarted to delay deadcode elimination for space: stack */ int8 mariadb_get_infov(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long *param_9,int4 param_10,uint *param_11,int8 param_12, int8 param_13,int8 param_14) { int4 uVar1; char in_AL; char cVar2; uint uVar3; int8 uVar4; int1 *puVar5; long *plVar6; char *pcVar7; long lVar8; int1 local_d8 [24]; long local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000018; uVar4 = 0x30000000ff; local_b8 = param_13; local_b0 = param_14; switch(param_10) { case 0: local_28 = 0x3000000020; uVar1 = (int4)local_c0; local_c0 = param_12; puVar5 = (int1 *)mysql_find_charset_nr(uVar1); break; case 1: local_28 = 0x3000000020; if (local_c0 == 0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)mysql_find_charset_name(); break; case 2: puVar5 = (int1 *)&client_errors; break; case 3: puVar5 = "10.6.10"; break; case 4: param_11[0] = 0x18902; param_11[1] = 0; goto LAB_00121d7f; case 5: if (((param_9 != (long *)0x0) && (param_9[0x90] != 0)) && (lVar8 = *(long *)(param_9[0x90] + 0x28), lVar8 != 0)) { uVar3 = *(uint *)(lVar8 + 0x10); if (uVar3 < 0xfffffc19) { uVar3 = (uVar3 + 999) / 1000; } else { uVar3 = (uVar3 - 1) / 1000 + 1; } *param_11 = uVar3; } goto LAB_00121d7f; case 6: if (((param_9 != (long *)0x0) && (param_9[0x90] != 0)) && (lVar8 = *(long *)(param_9[0x90] + 0x28), lVar8 != 0)) { uVar3 = *(uint *)(lVar8 + 0x10); goto LAB_00121d1e; } goto LAB_00121d7f; case 7: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; mariadb_get_charset_info(param_9,param_11); goto LAB_00121d7f; case 8: if (param_9 == (long *)0x0) { return 0x30000000ff; } lVar8 = (long)param_9 + 0x97; goto LAB_00121cfe; case 9: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x12); goto LAB_00121d1e; case 10: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x56]; break; case 0xb: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5c]; break; case 0xc: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x6c); goto LAB_00121d1e; case 0xd: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x6f); goto LAB_00121d1e; case 0xe: case 0x19: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } uVar3 = *(uint *)(*param_9 + 0x20); goto LAB_00121d1e; case 0xf: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5d]; break; case 0x10: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; cVar2 = mariadb_connection(); pcVar7 = "MariaDB"; if (cVar2 == '\0') { pcVar7 = "MySQL"; } *(char **)param_11 = pcVar7; goto LAB_00121d7f; case 0x11: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5a]; break; case 0x12: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)mariadb_server_version_id(param_9[0x5a]); break; case 0x13: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; uVar3 = mariadb_get_socket(); goto LAB_00121d1e; case 0x14: if (param_9 == (long *)0x0) { return 0x30000000ff; } lVar8 = (long)param_9 + 0x297; LAB_00121cfe: *(long *)param_11 = lVar8; goto LAB_00121d7f; case 0x15: if (((param_9 != (long *)0x0) && (*param_9 != 0)) && (*(long *)(*param_9 + 0x38) != 0)) { local_c0 = param_12; puVar5 = (int1 *)ma_pvio_tls_cipher(); break; } param_11[0] = 0; param_11[1] = 0; goto LAB_00121d7f; case 0x16: puVar5 = tls_library_version; break; case 0x17: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } if (*(long *)(*param_9 + 0x38) == 0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)ma_pvio_tls_get_protocol_version(); break; case 0x18: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } if (*(long *)(*param_9 + 0x38) == 0) { return 0x30000000ff; } local_c0 = param_12; uVar3 = ma_pvio_tls_get_protocol_version_id(); goto LAB_00121d1e; case 0x1a: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x59]; break; case 0x1b: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x57]; break; case 0x1c: plVar6 = &max_allowed_packet; goto LAB_00121d32; case 0x1d: plVar6 = &net_buffer_length; LAB_00121d32: puVar5 = (int1 *)*plVar6; break; case 0x1e: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x70); LAB_00121d1e: *param_11 = uVar3; goto LAB_00121d7f; case 0x1f: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x6e]; break; case 0x20: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = *(int1 **)(param_9[0x9e] + 0x70); break; case 0x21: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x6d]; break; case 0x22: puVar5 = *(int1 **)(*param_9 + 0x60); break; case 0x23: puVar5 = *(int1 **)(*param_9 + 0x68); break; default: goto switchD_00121a03_default; } *(int1 **)param_11 = puVar5; LAB_00121d7f: uVar4 = 0; switchD_00121a03_default: return uVar4; }
32,373
svc_service_system_halt
qoraal-tictactoe/build_O0/_deps/qoraal-src/src/svc/svc_services.c
void svc_service_system_halt (void) { unsigned int i ; SVC_SERVICE_T* pservice ; if (!_svc_service_list || !_cfg_service_cnt) return ; os_mutex_lock (&_svc_service_mutex) ; for (i=_cfg_service_cnt; i; i--) { pservice = &_svc_service_list[i-1] ; if(pservice->status < SVC_SERVICE_STATUS_STARTED) { continue ; } if (pservice->ctrl) { pservice->ctrl(SVC_SERVICE_CTRL_HALT, pservice->parm) ; } } os_mutex_unlock (&_svc_service_mutex) ; }
O0
c
svc_service_system_halt: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp cmpq $0x0, 0x2f248(%rip) # 0x4edc8 je 0x1fb8b cmpl $0x0, 0x2f247(%rip) # 0x4edd0 jne 0x1fb8d jmp 0x1fc09 leaq 0x2cfa4(%rip), %rdi # 0x4cb38 callq 0x1cd80 movl 0x2f231(%rip), %eax # 0x4edd0 movl %eax, -0x4(%rbp) cmpl $0x0, -0x4(%rbp) je 0x1fbfd movq 0x2f219(%rip), %rax # 0x4edc8 movl -0x4(%rbp), %ecx subl $0x1, %ecx movl %ecx, %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpl $0x3, 0x54(%rax) jge 0x1fbce jmp 0x1fbf2 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x1fbf0 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movq 0x48(%rcx), %rsi movl $0x3ed, %edi # imm = 0x3ED callq *%rax jmp 0x1fbf2 movl -0x4(%rbp), %eax addl $-0x1, %eax movl %eax, -0x4(%rbp) jmp 0x1fba2 leaq 0x2cf34(%rip), %rdi # 0x4cb38 callq 0x1cdd0 addq $0x10, %rsp popq %rbp retq nop
svc_service_system_halt: push rbp mov rbp, rsp sub rsp, 10h cmp cs:_svc_service_list, 0 jz short loc_1FB8B cmp cs:_cfg_service_cnt, 0 jnz short loc_1FB8D loc_1FB8B: jmp short loc_1FC09 loc_1FB8D: lea rdi, _svc_service_mutex call os_mutex_lock mov eax, cs:_cfg_service_cnt mov [rbp+var_4], eax loc_1FBA2: cmp [rbp+var_4], 0 jz short loc_1FBFD mov rax, cs:_svc_service_list mov ecx, [rbp+var_4] sub ecx, 1 mov ecx, ecx imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 3 jge short loc_1FBCE jmp short loc_1FBF2 loc_1FBCE: mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_1FBF0 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_10] mov rsi, [rcx+48h] mov edi, 3EDh call rax loc_1FBF0: jmp short $+2 loc_1FBF2: mov eax, [rbp+var_4] add eax, 0FFFFFFFFh mov [rbp+var_4], eax jmp short loc_1FBA2 loc_1FBFD: lea rdi, _svc_service_mutex call os_mutex_unlock loc_1FC09: add rsp, 10h pop rbp retn
long long svc_service_system_halt() { long long result; // rax long long v1; // [rsp+0h] [rbp-10h] int i; // [rsp+Ch] [rbp-4h] if ( svc_service_list && cfg_service_cnt ) { os_mutex_lock(&svc_service_mutex); for ( i = cfg_service_cnt; i; --i ) { v1 = 112LL * (unsigned int)(i - 1) + svc_service_list; if ( *(int *)(v1 + 84) >= 3 ) { if ( *(_QWORD *)(v1 + 64) ) (*(void ( **)(long long, _QWORD))(v1 + 64))(1005LL, *(_QWORD *)(v1 + 72)); } } return os_mutex_unlock(&svc_service_mutex); } return result; }
svc_service_system_halt: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CMP qword ptr [0x0014edc8],0x0 JZ 0x0011fb8b CMP dword ptr [0x0014edd0],0x0 JNZ 0x0011fb8d LAB_0011fb8b: JMP 0x0011fc09 LAB_0011fb8d: LEA RDI,[0x14cb38] CALL 0x0011cd80 MOV EAX,dword ptr [0x0014edd0] MOV dword ptr [RBP + -0x4],EAX LAB_0011fba2: CMP dword ptr [RBP + -0x4],0x0 JZ 0x0011fbfd MOV RAX,qword ptr [0x0014edc8] MOV ECX,dword ptr [RBP + -0x4] SUB ECX,0x1 MOV ECX,ECX IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x3 JGE 0x0011fbce JMP 0x0011fbf2 LAB_0011fbce: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0011fbf0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x48] MOV EDI,0x3ed CALL RAX LAB_0011fbf0: JMP 0x0011fbf2 LAB_0011fbf2: MOV EAX,dword ptr [RBP + -0x4] ADD EAX,-0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0011fba2 LAB_0011fbfd: LEA RDI,[0x14cb38] CALL 0x0011cdd0 LAB_0011fc09: ADD RSP,0x10 POP RBP RET
void svc_service_system_halt(void) { long lVar1; int local_c; if ((_svc_service_list != 0) && (_cfg_service_cnt != 0)) { os_mutex_lock(&_svc_service_mutex); for (local_c = _cfg_service_cnt; local_c != 0; local_c = local_c + -1) { lVar1 = _svc_service_list + (ulong)(local_c - 1) * 0x70; if ((2 < *(int *)(lVar1 + 0x54)) && (*(long *)(lVar1 + 0x40) != 0)) { (**(code **)(lVar1 + 0x40))(0x3ed,*(int8 *)(lVar1 + 0x48)); } } os_mutex_unlock(&_svc_service_mutex); } return; }
32,374
translog_file_init
eloqsql/storage/maria/ma_loghandler.c
static void translog_file_init(TRANSLOG_FILE *file, uint32 number, my_bool is_sync) { pagecache_file_set_null_hooks(&file->handler); file->handler.post_read_hook= translog_page_validator; file->handler.flush_log_callback= maria_flush_log_for_page_none; file->handler.callback_data= (uchar*)file; file->number= number; file->was_recovered= 0; file->is_sync= is_sync; }
O0
c
translog_file_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movb %al, -0xd(%rbp) movq -0x8(%rbp), %rdi addq $0x8, %rdi callq 0x40a60 movq -0x8(%rbp), %rax leaq 0x6994(%rip), %rcx # 0x37830 movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax leaq 0x116c5(%rip), %rcx # 0x42570 movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movb $0x0, 0x50(%rax) movb -0xd(%rbp), %cl movq -0x8(%rbp), %rax movb %cl, 0x51(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
translog_file_init: push rbp mov rbp, rsp sub rsp, 10h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_D], al mov rdi, [rbp+var_8] add rdi, 8 call pagecache_file_set_null_hooks mov rax, [rbp+var_8] lea rcx, translog_page_validator mov [rax+28h], rcx mov rax, [rbp+var_8] lea rcx, maria_flush_log_for_page_none mov [rax+40h], rcx mov rcx, [rbp+var_8] mov rax, [rbp+var_8] mov [rax+48h], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_8] mov byte ptr [rax+50h], 0 mov cl, [rbp+var_D] mov rax, [rbp+var_8] mov [rax+51h], cl add rsp, 10h pop rbp retn
long long translog_file_init(long long a1, int a2, char a3) { long long result; // rax pagecache_file_set_null_hooks(a1 + 8); *(_QWORD *)(a1 + 40) = translog_page_validator; *(_QWORD *)(a1 + 64) = maria_flush_log_for_page_none; *(_QWORD *)(a1 + 72) = a1; *(_DWORD *)a1 = a2; *(_BYTE *)(a1 + 80) = 0; result = a1; *(_BYTE *)(a1 + 81) = a3; return result; }
translog_file_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV byte ptr [RBP + -0xd],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8 CALL 0x00140a60 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x137830] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142570] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x50],0x0 MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x51],CL ADD RSP,0x10 POP RBP RET
void translog_file_init(int4 *param_1,int4 param_2,int1 param_3) { pagecache_file_set_null_hooks(param_1 + 2); *(code **)(param_1 + 10) = translog_page_validator; *(code **)(param_1 + 0x10) = maria_flush_log_for_page_none; *(int4 **)(param_1 + 0x12) = param_1; *param_1 = param_2; *(int1 *)(param_1 + 0x14) = 0; *(int1 *)((long)param_1 + 0x51) = param_3; return; }
32,375
my_fwrite
eloqsql/mysys/my_fstream.c
size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags) { size_t writtenbytes =0; my_off_t seekptr; #if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) uint errors; #endif DBUG_ENTER("my_fwrite"); DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu", stream, Buffer, (uint) Count, MyFlags)); #if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) errors=0; #endif seekptr= ftell(stream); for (;;) { size_t written; if ((written = (size_t) fwrite((char*) Buffer,sizeof(char), Count, stream)) != Count) { DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes)); my_errno=errno; if (written != (size_t) -1) { seekptr+=written; Buffer+=written; writtenbytes+=written; Count-=written; } #ifdef EINTR if (errno == EINTR) { (void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)); continue; } #endif #if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) if (my_thread_var->abort) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ if ((errno == ENOSPC || errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { wait_for_free_space("[stream]", errors); errors++; (void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)); continue; } #endif if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP))) { if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { my_error(EE_WRITE, MYF(ME_BELL), my_filename(my_fileno(stream)), errno); } writtenbytes= (size_t) -1; /* Return that we got error */ break; } } if (MyFlags & (MY_NABP | MY_FNABP)) writtenbytes= 0; /* Everything OK */ else writtenbytes+= written; break; } DBUG_RETURN(writtenbytes); }
O0
c
my_fwrite: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq $0x0, -0x28(%rbp) jmp 0x98f92 movq -0x8(%rbp), %rdi callq 0x2a650 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rcx movl $0x1, %esi callq 0x2a7f0 movq %rax, -0x38(%rbp) cmpq -0x18(%rbp), %rax je 0x9909d jmp 0x98fc5 jmp 0x98fc7 callq 0x2a040 movl (%rax), %eax movl %eax, -0x3c(%rbp) callq 0xa2e50 movl -0x3c(%rbp), %ecx movl %ecx, (%rax) cmpq $-0x1, -0x38(%rbp) je 0x99015 movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rcx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) callq 0x2a040 cmpl $0x4, (%rax) jne 0x99037 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi xorl %edx, %edx xorl %eax, %eax movl %eax, %ecx callq 0x990e0 jmp 0x98f9f movq -0x8(%rbp), %rdi callq 0x2a7a0 cmpl $0x0, %eax jne 0x99053 movq -0x20(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x9909b movq -0x20(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0x99091 movq -0x8(%rbp), %rdi callq 0x98f50 movl %eax, %edi callq 0xac0c0 movq %rax, -0x48(%rbp) callq 0x2a040 movq -0x48(%rbp), %rdx movl (%rax), %ecx movl $0x3, %edi movl $0x4, %esi movb $0x0, %al callq 0x98310 movq $-0x1, -0x28(%rbp) jmp 0x990c3 jmp 0x9909d movq -0x20(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x990b5 movq $0x0, -0x28(%rbp) jmp 0x990c1 movq -0x38(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x990c3 jmp 0x990c5 movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
my_fwrite: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], 0 jmp short $+2 loc_98F92: mov rdi, [rbp+var_8] call _ftello64 mov [rbp+var_30], rax loc_98F9F: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_8] mov esi, 1 call _fwrite mov [rbp+var_38], rax cmp rax, [rbp+var_18] jz loc_9909D jmp short $+2 loc_98FC5: jmp short $+2 loc_98FC7: call ___errno_location mov eax, [rax] mov [rbp+var_3C], eax call _my_thread_var mov ecx, [rbp+var_3C] mov [rax], ecx cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_99015 mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_38] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rcx, [rbp+var_38] mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax loc_99015: call ___errno_location cmp dword ptr [rax], 4 jnz short loc_99037 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] xor edx, edx xor eax, eax mov ecx, eax call my_fseek jmp loc_98F9F loc_99037: mov rdi, [rbp+var_8] call _ferror cmp eax, 0 jnz short loc_99053 mov rax, [rbp+var_20] and rax, 6 cmp rax, 0 jz short loc_9909B loc_99053: mov rax, [rbp+var_20] and rax, 1Ah cmp rax, 0 jz short loc_99091 mov rdi, [rbp+var_8] call my_fileno mov edi, eax call my_filename mov [rbp+var_48], rax call ___errno_location mov rdx, [rbp+var_48] mov ecx, [rax] mov edi, 3 mov esi, 4 mov al, 0 call my_error loc_99091: mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh jmp short loc_990C3 loc_9909B: jmp short $+2 loc_9909D: mov rax, [rbp+var_20] and rax, 6 cmp rax, 0 jz short loc_990B5 mov [rbp+var_28], 0 jmp short loc_990C1 loc_990B5: mov rax, [rbp+var_38] add rax, [rbp+var_28] mov [rbp+var_28], rax loc_990C1: jmp short $+2 loc_990C3: jmp short $+2 loc_990C5: mov rax, [rbp+var_28] mov [rbp+var_50], rax mov rax, [rbp+var_50] add rsp, 50h pop rbp retn
long long my_fwrite(long long a1, long long a2, long long a3, char a4) { long long v4; // rdx long long v5; // rdi unsigned int *v6; // rax long long v8; // [rsp+8h] [rbp-48h] int v9; // [rsp+14h] [rbp-3Ch] long long v10; // [rsp+18h] [rbp-38h] long long i; // [rsp+20h] [rbp-30h] long long v12; // [rsp+28h] [rbp-28h] v12 = 0LL; for ( i = ftello64(a1); ; my_fseek(a1, i, 0LL, 0LL) ) { v10 = fwrite(a2, 1LL, a3, a1); if ( v10 == a3 ) goto LABEL_12; v9 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a2, 1LL, v4) = v9; if ( v10 != -1 ) { i += v10; a2 += v10; v12 += v10; a3 -= v10; } if ( *(_DWORD *)__errno_location() != 4 ) break; } if ( !(unsigned int)ferror(a1) && (a4 & 6) == 0 ) { LABEL_12: if ( (a4 & 6) != 0 ) return 0LL; else return v12 + v10; } if ( (a4 & 0x1A) != 0 ) { v5 = (unsigned int)my_fileno(a1); v8 = my_filename(v5); v6 = (unsigned int *)__errno_location(); my_error(3u, 4LL, v8, *v6); } return -1LL; }
my_fwrite: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],0x0 JMP 0x00198f92 LAB_00198f92: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a650 MOV qword ptr [RBP + -0x30],RAX LAB_00198f9f: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x0012a7f0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,qword ptr [RBP + -0x18] JZ 0x0019909d JMP 0x00198fc5 LAB_00198fc5: JMP 0x00198fc7 LAB_00198fc7: CALL 0x0012a040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CALL 0x001a2e50 MOV ECX,dword ptr [RBP + -0x3c] MOV dword ptr [RAX],ECX CMP qword ptr [RBP + -0x38],-0x1 JZ 0x00199015 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_00199015: CALL 0x0012a040 CMP dword ptr [RAX],0x4 JNZ 0x00199037 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] XOR EDX,EDX XOR EAX,EAX MOV ECX,EAX CALL 0x001990e0 JMP 0x00198f9f LAB_00199037: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a7a0 CMP EAX,0x0 JNZ 0x00199053 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x6 CMP RAX,0x0 JZ 0x0019909b LAB_00199053: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x1a CMP RAX,0x0 JZ 0x00199091 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00198f50 MOV EDI,EAX CALL 0x001ac0c0 MOV qword ptr [RBP + -0x48],RAX CALL 0x0012a040 MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX] MOV EDI,0x3 MOV ESI,0x4 MOV AL,0x0 CALL 0x00198310 LAB_00199091: MOV qword ptr [RBP + -0x28],-0x1 JMP 0x001990c3 LAB_0019909b: JMP 0x0019909d LAB_0019909d: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x6 CMP RAX,0x0 JZ 0x001990b5 MOV qword ptr [RBP + -0x28],0x0 JMP 0x001990c1 LAB_001990b5: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_001990c1: JMP 0x001990c3 LAB_001990c3: JMP 0x001990c5 LAB_001990c5: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RSP,0x50 POP RBP RET
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int4 uVar2; size_t sVar3; int *piVar4; int8 uVar5; long local_38; long local_30; size_t local_20; void *local_18; local_30 = 0; local_38 = ftello64(param_1); local_20 = param_3; local_18 = param_2; do { sVar3 = fwrite(local_18,1,local_20,param_1); if (sVar3 == local_20) { LAB_0019909d: if ((param_4 & 6) == 0) { local_30 = sVar3 + local_30; } else { local_30 = 0; } return local_30; } piVar4 = __errno_location(); iVar1 = *piVar4; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if (sVar3 != 0xffffffffffffffff) { local_38 = sVar3 + local_38; local_18 = (void *)(sVar3 + (long)local_18); local_30 = sVar3 + local_30; local_20 = local_20 - sVar3; } piVar4 = __errno_location(); if (*piVar4 != 4) { iVar1 = ferror(param_1); if ((iVar1 != 0) || ((param_4 & 6) != 0)) { if ((param_4 & 0x1a) != 0) { uVar2 = my_fileno(param_1); uVar5 = my_filename(uVar2); piVar4 = __errno_location(); my_error(3,4,uVar5,*piVar4); } return -1; } goto LAB_0019909d; } my_fseek(param_1,local_38,0,0); } while( true ); }
32,376
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O0
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x42752 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x4275a movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x48(%rbp) movsbl -0x31(%rbp), %eax cmpl $0x0, %eax je 0x42789 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x42789 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x4278b movq -0x40(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, %rax je 0x42801 movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x28(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x427ff movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movzbl -0x1(%rdx), %edx movzbl (%rcx,%rdx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x42833 jmp 0x4278b movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x42815 movl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0x4282d movq -0x20(%rbp), %rdx movq -0x30(%rbp), %rsi xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rsi, %rdx cmovbl %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_strnncoll_simple: push rbp mov rbp, rsp mov al, r9b 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_31], al mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_42752 mov rax, [rbp+var_30] mov [rbp+var_50], rax jmp short loc_4275A loc_42752: mov rax, [rbp+var_20] mov [rbp+var_50], rax loc_4275A: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_48], rax movsx eax, [rbp+var_31] cmp eax, 0 jz short loc_42789 mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_42789 mov rax, [rbp+var_30] mov [rbp+var_20], rax loc_42789: jmp short $+2 loc_4278B: mov rax, [rbp+var_40] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rcx cmp rax, 0 jz short loc_42801 mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] mov rsi, rdx add rsi, 1 mov [rbp+var_28], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_427FF mov rax, [rbp+var_48] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] movzx edx, byte ptr [rdx-1] movzx ecx, byte ptr [rcx+rdx] sub eax, ecx mov [rbp+var_4], eax jmp short loc_42833 loc_427FF: jmp short loc_4278B loc_42801: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_42815 mov eax, 1 mov [rbp+var_54], eax jmp short loc_4282D loc_42815: mov rdx, [rbp+var_20] mov rsi, [rbp+var_30] xor eax, eax mov ecx, 0FFFFFFFFh cmp rdx, rsi cmovb eax, ecx mov [rbp+var_54], eax loc_4282D: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_42833: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v7; // rcx unsigned __int8 *v8; // rdx unsigned int v9; // eax unsigned long long v12; // [rsp+4h] [rbp-50h] long long v13; // [rsp+Ch] [rbp-48h] unsigned long long v14; // [rsp+14h] [rbp-40h] unsigned long long v16; // [rsp+34h] [rbp-20h] v16 = a3; if ( a3 <= a5 ) v12 = a3; else v12 = a5; v14 = v12; v13 = *(_QWORD *)(a1 + 88); if ( a6 && a3 > a5 ) v16 = a5; while ( v14-- ) { v7 = a2++; v8 = a4++; if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) ) return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1))); } if ( v16 <= a5 ) { v9 = 0; if ( v16 < a5 ) v9 = -1; return v9; } else { return 1; } }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP MOV AL,R9B 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 byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00142752 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX JMP 0x0014275a LAB_00142752: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX LAB_0014275a: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x48],RAX MOVSX EAX,byte ptr [RBP + -0x31] CMP EAX,0x0 JZ 0x00142789 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00142789 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX LAB_00142789: JMP 0x0014278b LAB_0014278b: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x40],RCX CMP RAX,0x0 JZ 0x00142801 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x28],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x001427ff MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOVZX EDX,byte ptr [RDX + -0x1] MOVZX ECX,byte ptr [RCX + RDX*0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00142833 LAB_001427ff: JMP 0x0014278b LAB_00142801: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00142815 MOV EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x0014282d LAB_00142815: MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ECX,0xffffffff CMP RDX,RSI CMOVC EAX,ECX MOV dword ptr [RBP + -0x54],EAX LAB_0014282d: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_00142833: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { long lVar1; byte *pbVar2; byte *pbVar3; int local_5c; ulong local_58; ulong local_48; byte *local_30; ulong local_28; byte *local_20; local_58 = param_3; if (param_5 < param_3) { local_58 = param_5; } local_48 = local_58; lVar1 = *(long *)(param_1 + 0x58); pbVar2 = param_4; pbVar3 = param_2; local_28 = param_3; if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) { pbVar2 = param_4; pbVar3 = param_2; local_28 = param_5; } do { local_20 = pbVar3; local_30 = pbVar2; if (local_48 == 0) { if (param_5 < local_28) { local_5c = 1; } else { local_5c = 0; if (local_28 < param_5) { local_5c = -1; } } return local_5c; } local_48 = local_48 - 1; pbVar2 = local_30 + 1; pbVar3 = local_20 + 1; } while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30)); return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30); }
32,377
my_numchars_mb
eloqsql/strings/ctype-mb.c
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end) { register size_t count= 0; while (pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; count++; } return count; }
O3
c
my_numchars_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq %rdx, %rsi jae 0x59855 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 xorl %r14d, %r14d movl $0x1, %r13d movq 0xb8(%r12), %rax movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r13d, %eax cmovll %r13d, %eax addq %rax, %r15 incq %r14 cmpq %rbx, %r15 jb 0x59826 jmp 0x59858 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_numchars_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp rsi, rdx jnb short loc_59855 mov rbx, rdx mov r15, rsi mov r12, rdi xor r14d, r14d mov r13d, 1 loc_59826: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r13d cmovl eax, r13d add r15, rax inc r14 cmp r15, rbx jb short loc_59826 jmp short loc_59858 loc_59855: xor r14d, r14d loc_59858: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r15 long long v5; // r14 long long v6; // rax bool v7; // cc if ( a2 >= a3 ) return 0LL; v4 = a2; v5 = 0LL; do { v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, a3); v7 = (int)v6 < 2; if ( (unsigned int)v6 < 2 ) v6 = 1LL; if ( v7 ) v6 = 1LL; v4 += v6; ++v5; } while ( v4 < a3 ); return v5; }
my_numchars_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP RSI,RDX JNC 0x00159855 MOV RBX,RDX MOV R15,RSI MOV R12,RDI XOR R14D,R14D MOV R13D,0x1 LAB_00159826: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R13D CMOVL EAX,R13D ADD R15,RAX INC R14 CMP R15,RBX JC 0x00159826 JMP 0x00159858 LAB_00159855: XOR R14D,R14D LAB_00159858: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_numchars_mb(long param_1,ulong param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; if (param_2 < param_3) { lVar3 = 0; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } param_2 = param_2 + uVar2; lVar3 = lVar3 + 1; } while (param_2 < param_3); } else { lVar3 = 0; } return lVar3; }
32,378
ma_tls_write_async
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write_async(MARIADB_PVIO *pvio, const unsigned char *buffer, size_t length) { int res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; MARIADB_TLS *ctls= pvio->ctls; for (;;) { res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length); if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl)) return res; } }
O3
c
ma_tls_write_async: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq 0x38(%rdi), %r13 movq 0x40(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %r15 movq 0x10(%r13), %rdi movq %r14, %rsi movl %ebx, %edx callq 0x13830 movl %eax, %r12d movq 0x10(%r13), %rdx movl %eax, %edi movq %r15, %rsi callq 0x286f6 testb %al, %al je 0x28796 movslq %r12d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_write_async: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r13, [rdi+38h] mov rax, [rdi+40h] mov rax, [rax+480h] mov r15, [rax+28h] loc_28796: mov rdi, [r13+10h] mov rsi, r14 mov edx, ebx call _SSL_write mov r12d, eax mov rdx, [r13+10h] mov edi, eax mov rsi, r15 call ma_tls_async_check_result test al, al jz short loc_28796 movsxd rax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_write_async(long long a1, long long a2, unsigned int a3) { long long v4; // r13 long long v5; // r15 int v6; // r12d v4 = *(_QWORD *)(a1 + 56); v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); do v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3); while ( !(unsigned __int8)ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) ); return v6; }
ma_tls_write_async: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R13,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LAB_00128796: MOV RDI,qword ptr [R13 + 0x10] MOV RSI,R14 MOV EDX,EBX CALL 0x00113830 MOV R12D,EAX MOV RDX,qword ptr [R13 + 0x10] MOV EDI,EAX MOV RSI,R15 CALL 0x001286f6 TEST AL,AL JZ 0x00128796 MOVSXD RAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_write_async(long param_1,void *param_2,int param_3) { long lVar1; int8 uVar2; char cVar3; int iVar4; lVar1 = *(long *)(param_1 + 0x38); uVar2 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); do { iVar4 = SSL_write(*(SSL **)(lVar1 + 0x10),param_2,param_3); cVar3 = ma_tls_async_check_result(iVar4,uVar2,*(int8 *)(lVar1 + 0x10)); } while (cVar3 == '\0'); return (long)iVar4; }
32,379
mysql_client_plugin_init
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
int mysql_client_plugin_init() { MYSQL mysql; struct st_mysql_client_plugin **builtin; va_list unused; LINT_INIT_STRUCT(unused); if (initialized) return 0; memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ pthread_mutex_init(&LOCK_load_client_plugin, NULL); ma_init_alloc_root(&mem_root, 128, 128); memset(&plugin_list, 0, sizeof(plugin_list)); initialized= 1; pthread_mutex_lock(&LOCK_load_client_plugin); for (builtin= mysql_client_builtins; *builtin; builtin++) add_plugin(&mysql, *builtin, 0, 0, unused); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(&mysql); return 0; }
O0
c
mysql_client_plugin_init: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0x530(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x36300 cmpb $0x0, 0x39242e(%rip) # 0x3ea660 je 0x58243 movl $0x0, -0x504(%rbp) jmp 0x58314 leaq -0x500(%rbp), %rdi xorl %esi, %esi movl $0x4f8, %edx # imm = 0x4F8 callq 0x36300 leaq 0x39240b(%rip), %rdi # 0x3ea668 xorl %eax, %eax movl %eax, %esi callq 0x363f0 leaq 0x392423(%rip), %rdi # 0x3ea690 movl $0x80, %edx movq %rdx, %rsi callq 0x47420 leaq 0x39244f(%rip), %rdi # 0x3ea6d0 xorl %esi, %esi movl $0x40, %edx callq 0x36300 movb $0x1, 0x3923cc(%rip) # 0x3ea660 leaq 0x3923cd(%rip), %rdi # 0x3ea668 callq 0x36280 leaq 0x1d7e19(%rip), %rax # 0x2300c0 movq %rax, -0x510(%rbp) movq -0x510(%rbp), %rax cmpq $0x0, (%rax) je 0x582f2 movq -0x510(%rbp), %rax movq (%rax), %rsi leaq -0x530(%rbp), %r8 leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %edx xorl %ecx, %ecx callq 0x58350 movq -0x510(%rbp), %rax addq $0x8, %rax movq %rax, -0x510(%rbp) jmp 0x582ae leaq 0x39236f(%rip), %rdi # 0x3ea668 callq 0x36250 leaq -0x500(%rbp), %rdi callq 0x58580 movl $0x0, -0x504(%rbp) movl -0x504(%rbp), %eax movl %eax, -0x534(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x58341 movl -0x534(%rbp), %eax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x362b0 nopw %cs:(%rax,%rax)
mysql_client_plugin_init: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_530] xor esi, esi mov edx, 18h call _memset cmp cs:initialized, 0 jz short loc_58243 mov [rbp+var_504], 0 jmp loc_58314 loc_58243: lea rdi, [rbp+var_500] xor esi, esi mov edx, 4F8h call _memset lea rdi, LOCK_load_client_plugin xor eax, eax mov esi, eax call _pthread_mutex_init lea rdi, mem_root mov edx, 80h mov rsi, rdx call ma_init_alloc_root lea rdi, plugin_list xor esi, esi mov edx, 40h ; '@' call _memset mov cs:initialized, 1 lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock lea rax, mysql_client_builtins mov [rbp+var_510], rax loc_582AE: mov rax, [rbp+var_510] cmp qword ptr [rax], 0 jz short loc_582F2 mov rax, [rbp+var_510] mov rsi, [rax] lea r8, [rbp+var_530] lea rdi, [rbp+var_500] xor eax, eax mov edx, eax xor ecx, ecx call add_plugin mov rax, [rbp+var_510] add rax, 8 mov [rbp+var_510], rax jmp short loc_582AE loc_582F2: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock lea rdi, [rbp+var_500] call load_env_plugins mov [rbp+var_504], 0 loc_58314: mov eax, [rbp+var_504] mov [rbp+var_534], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_58341 mov eax, [rbp+var_534] add rsp, 540h pop rbp retn loc_58341: call ___stack_chk_fail
long long mysql_client_plugin_init() { _BYTE v1[32]; // [rsp+10h] [rbp-530h] BYREF _QWORD *i; // [rsp+30h] [rbp-510h] _BYTE v4[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v5; // [rsp+538h] [rbp-8h] v5 = __readfsqword(0x28u); memset(v1, 0LL, 24LL); if ( initialized ) { return 0; } else { memset(v4, 0LL, sizeof(v4)); pthread_mutex_init(&LOCK_load_client_plugin, 0LL); ma_init_alloc_root(mem_root, 128LL, 128LL); memset(&plugin_list, 0LL, 64LL); initialized = 1; pthread_mutex_lock(&LOCK_load_client_plugin); for ( i = &mysql_client_builtins; *i; ++i ) add_plugin(v4, *i, 0LL, 0LL, v1); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(v4); return 0; } }
mysql_client_plugin_init: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0x530] XOR ESI,ESI MOV EDX,0x18 CALL 0x00136300 CMP byte ptr [0x004ea660],0x0 JZ 0x00158243 MOV dword ptr [RBP + -0x504],0x0 JMP 0x00158314 LAB_00158243: LEA RDI,[RBP + -0x500] XOR ESI,ESI MOV EDX,0x4f8 CALL 0x00136300 LEA RDI,[0x4ea668] XOR EAX,EAX MOV ESI,EAX CALL 0x001363f0 LEA RDI,[0x4ea690] MOV EDX,0x80 MOV RSI,RDX CALL 0x00147420 LEA RDI,[0x4ea6d0] XOR ESI,ESI MOV EDX,0x40 CALL 0x00136300 MOV byte ptr [0x004ea660],0x1 LEA RDI,[0x4ea668] CALL 0x00136280 LEA RAX,[0x3300c0] MOV qword ptr [RBP + -0x510],RAX LAB_001582ae: MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX],0x0 JZ 0x001582f2 MOV RAX,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RAX] LEA R8,[RBP + -0x530] LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV EDX,EAX XOR ECX,ECX CALL 0x00158350 MOV RAX,qword ptr [RBP + -0x510] ADD RAX,0x8 MOV qword ptr [RBP + -0x510],RAX JMP 0x001582ae LAB_001582f2: LEA RDI,[0x4ea668] CALL 0x00136250 LEA RDI,[RBP + -0x500] CALL 0x00158580 MOV dword ptr [RBP + -0x504],0x0 LAB_00158314: MOV EAX,dword ptr [RBP + -0x504] MOV dword ptr [RBP + -0x534],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00158341 MOV EAX,dword ptr [RBP + -0x534] ADD RSP,0x540 POP RBP RET LAB_00158341: CALL 0x001362b0
int4 mysql_client_plugin_init(void) { long in_FS_OFFSET; int1 local_538 [32]; int **local_518; int4 local_50c; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(local_538,0,0x18); if (initialized == '\0') { memset(local_508,0,0x4f8); pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0); ma_init_alloc_root(mem_root); memset(plugin_list,0,0x40); initialized = '\x01'; pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); for (local_518 = &mysql_client_builtins; *local_518 != (int *)0x0; local_518 = local_518 + 1) { add_plugin(local_508,*local_518,0,0,local_538); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); load_env_plugins(local_508); } local_50c = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0; }
32,380
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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>>>>::find<char const (&) [5], 0>(char const (&) [5])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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>>>>::find<char const (&) [5], 0>(char const (&) [5]): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xdf5f0 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xdf620 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xdf650 testb $0x1, %al jne 0x14ddc6 jmp 0x14de06 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xf6140 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x14de20 testb $0x1, %al jne 0x14ddf6 jmp 0x14ddf8 jmp 0x14de15 jmp 0x14ddfa leaq 0x30(%rsp), %rdi callq 0xdf6d0 jmp 0x14dda2 movq 0x10(%rsp), %rdi callq 0xdf620 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; 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>>>::begin(void) mov [rsp+38h+var_8], rax loc_14DDA2: mov rdi, [rsp+38h+var_28] 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 [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__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_14DDC6 jmp short loc_14DE06 loc_14DDC6: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] 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+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA11_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_14DDF6 jmp short loc_14DDF8 loc_14DDF6: jmp short loc_14DE15 loc_14DDF8: jmp short $+2 loc_14DDFA: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __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) jmp short loc_14DDA2 loc_14DE06: mov rdi, [rsp+38h+var_28] 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 [rsp+38h+var_8], rax loc_14DE15: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = 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>>>::begin(a1); ; __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++(&i) ) { v4 = 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(a1); 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)&i, (long long)&v4) ) break; v2 = __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)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[11]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return 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(a1); }
32,381
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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>>>>::find<char const (&) [5], 0>(char const (&) [5])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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>>>>::find<char const (&) [5], 0>(char const (&) [5]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x70c81 movq %r14, %rdi movq %rbx, %rsi callq 0x29b97 testb %al, %al jne 0x70c7e addq $0x30, %r14 jmp 0x70c60 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_70C60: mov rax, [r15+8] cmp r14, rax jz short loc_70C81 mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_70C7E add r14, 30h ; '0' jmp short loc_70C60 loc_70C7E: mov rax, r14 loc_70C81: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_00170c60: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x00170c81 MOV RDI,R14 MOV RSI,RBX CALL 0x00129b97 TEST AL,AL JNZ 0x00170c7e ADD R14,0x30 JMP 0x00170c60 LAB_00170c7e: MOV RAX,R14 LAB_00170c81: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
32,382
move_to_next_bitmap
eloqsql/storage/maria/ma_bitmap.c
static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap) { pgcache_page_no_t page= bitmap->page; MARIA_STATE_INFO *state= &info->s->state; DBUG_ENTER("move_to_next_bitmap"); if (state->first_bitmap_with_space != ~(pgcache_page_no_t) 0 && state->first_bitmap_with_space != page) { page= state->first_bitmap_with_space; state->first_bitmap_with_space= ~(pgcache_page_no_t) 0; DBUG_ASSERT(page % bitmap->pages_covered == 0); } else { page+= bitmap->pages_covered; DBUG_ASSERT(page % bitmap->pages_covered == 0); } DBUG_RETURN(_ma_change_bitmap_page(info, bitmap, page)); }
O3
c
move_to_next_bitmap: pushq %rbp movq %rsp, %rbp movq 0x10(%rsi), %rax movq (%rdi), %rcx movq 0xd0(%rcx), %rdx cmpq $-0x1, %rdx sete %r8b cmpq %rax, %rdx sete %r9b orb %r8b, %r9b je 0x4211e addq 0x138(%rsi), %rax movq %rax, %rdx jmp 0x42129 movq $-0x1, 0xd0(%rcx) popq %rbp jmp 0x41065
move_to_next_bitmap: push rbp mov rbp, rsp mov rax, [rsi+10h] mov rcx, [rdi] mov rdx, [rcx+0D0h] cmp rdx, 0FFFFFFFFFFFFFFFFh setz r8b cmp rdx, rax setz r9b or r9b, r8b jz short loc_4211E add rax, [rsi+138h] mov rdx, rax jmp short loc_42129 loc_4211E: mov qword ptr [rcx+0D0h], 0FFFFFFFFFFFFFFFFh loc_42129: pop rbp jmp _ma_change_bitmap_page
long long move_to_next_bitmap(long long *a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // rax long long v6; // rcx unsigned long long v7; // rdx v5 = *(_QWORD *)(a2 + 16); v6 = *a1; v7 = *(_QWORD *)(*a1 + 208); LOBYTE(a5) = v7 == -1LL; if ( (unsigned __int8)a5 | (v7 == v5) ) v7 = *(_QWORD *)(a2 + 312) + v5; else *(_QWORD *)(v6 + 208) = -1LL; return ma_change_bitmap_page(a1, a2, v7, v6, a5); }
move_to_next_bitmap: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0x10] MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RCX + 0xd0] CMP RDX,-0x1 SETZ R8B CMP RDX,RAX SETZ R9B OR R9B,R8B JZ 0x0014211e ADD RAX,qword ptr [RSI + 0x138] MOV RDX,RAX JMP 0x00142129 LAB_0014211e: MOV qword ptr [RCX + 0xd0],-0x1 LAB_00142129: POP RBP JMP 0x00141065
void move_to_next_bitmap(long *param_1,long param_2) { long lVar1; lVar1 = *(long *)(*param_1 + 0xd0); if (lVar1 == *(long *)(param_2 + 0x10) || lVar1 == -1) { lVar1 = *(long *)(param_2 + 0x10) + *(long *)(param_2 + 0x138); } else { *(int8 *)(*param_1 + 0xd0) = 0xffffffffffffffff; } _ma_change_bitmap_page(param_1,param_2,lVar1); return; }
32,383
my_strntoull10rnd_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t length, int unsign_fl, char **endptr, int *err) { char buf[256], *b= buf; ulonglong res; const uchar *end, *s= (const uchar*) nptr; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf)-1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be a number part */ *b++= (char) wc; } res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err); *endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O0
c
my_strntoull10rnd_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0x190, %rsp # imm = 0x190 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x118(%rbp) movq %rsi, -0x120(%rbp) movq %rdx, -0x128(%rbp) movl %ecx, -0x12c(%rbp) movq %r8, -0x138(%rbp) movq %r9, -0x140(%rbp) leaq -0x110(%rbp), %rax movq %rax, -0x148(%rbp) movq -0x120(%rbp), %rax movq %rax, -0x160(%rbp) movq -0x118(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x170(%rbp) cmpq $0x100, -0x128(%rbp) # imm = 0x100 jb 0x5d72e movq $0xff, -0x128(%rbp) movq -0x160(%rbp), %rax addq -0x128(%rbp), %rax movq %rax, -0x158(%rbp) movq -0x170(%rbp), %rax movq -0x118(%rbp), %rdi movq -0x160(%rbp), %rdx movq -0x158(%rbp), %rcx leaq -0x168(%rbp), %rsi callq *%rax movl %eax, -0x174(%rbp) cmpl $0x0, %eax jle 0x5d7c8 movl -0x174(%rbp), %ecx movq -0x160(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x160(%rbp) cmpq $0x65, -0x168(%rbp) ja 0x5d7a1 cmpq $0x0, -0x168(%rbp) jne 0x5d7a3 jmp 0x5d7c8 movq -0x168(%rbp), %rax movb %al, %cl movq -0x148(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x148(%rbp) movb %cl, (%rax) jmp 0x5d743 movq -0x118(%rbp), %rdi movq -0x148(%rbp), %rdx leaq -0x110(%rbp), %rsi movq %rsi, -0x188(%rbp) subq %rsi, %rdx movl -0x12c(%rbp), %ecx movq -0x138(%rbp), %r8 movq -0x140(%rbp), %r9 callq 0x48040 movq -0x188(%rbp), %rdi movq %rax, -0x150(%rbp) movq -0x120(%rbp), %rcx movq -0x118(%rbp), %rax movl 0x98(%rax), %eax movl %eax, %edx movq -0x138(%rbp), %rax movq (%rax), %rsi subq %rdi, %rsi imulq %rsi, %rdx addq %rdx, %rcx movq %rcx, (%rax) movq -0x150(%rbp), %rax movq %rax, -0x180(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5d86b movq -0x180(%rbp), %rax addq $0x190, %rsp # imm = 0x190 popq %rbp retq callq 0x24370
my_strntoull10rnd_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 190h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_118], rdi mov [rbp+var_120], rsi mov [rbp+var_128], rdx mov [rbp+var_12C], ecx mov [rbp+var_138], r8 mov [rbp+var_140], r9 lea rax, [rbp+var_110] mov [rbp+var_148], rax mov rax, [rbp+var_120] mov [rbp+var_160], rax mov rax, [rbp+var_118] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_170], rax cmp [rbp+var_128], 100h jb short loc_5D72E mov [rbp+var_128], 0FFh loc_5D72E: mov rax, [rbp+var_160] add rax, [rbp+var_128] mov [rbp+var_158], rax loc_5D743: mov rax, [rbp+var_170] mov rdi, [rbp+var_118] mov rdx, [rbp+var_160] mov rcx, [rbp+var_158] lea rsi, [rbp+var_168] call rax mov [rbp+var_174], eax cmp eax, 0 jle short loc_5D7C8 mov ecx, [rbp+var_174] mov rax, [rbp+var_160] movsxd rcx, ecx add rax, rcx mov [rbp+var_160], rax cmp [rbp+var_168], 65h ; 'e' ja short loc_5D7A1 cmp [rbp+var_168], 0 jnz short loc_5D7A3 loc_5D7A1: jmp short loc_5D7C8 loc_5D7A3: mov rax, [rbp+var_168] mov cl, al mov rax, [rbp+var_148] mov rdx, rax add rdx, 1 mov [rbp+var_148], rdx mov [rax], cl jmp loc_5D743 loc_5D7C8: mov rdi, [rbp+var_118] mov rdx, [rbp+var_148] lea rsi, [rbp+var_110] mov [rbp+var_188], rsi sub rdx, rsi mov ecx, [rbp+var_12C] mov r8, [rbp+var_138] mov r9, [rbp+var_140] call my_strntoull10rnd_8bit mov rdi, [rbp+var_188] mov [rbp+var_150], rax mov rcx, [rbp+var_120] mov rax, [rbp+var_118] mov eax, [rax+98h] mov edx, eax mov rax, [rbp+var_138] mov rsi, [rax] sub rsi, rdi imul rdx, rsi add rcx, rdx mov [rax], rcx mov rax, [rbp+var_150] mov [rbp+var_180], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5D86B mov rax, [rbp+var_180] add rsp, 190h pop rbp retn loc_5D86B: call ___stack_chk_fail
long long my_strntoull10rnd_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, int a4, _QWORD *a5, int *a6) { _BYTE *v6; // rax int v8; // [rsp+1Ch] [rbp-174h] long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h] unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF long long v11; // [rsp+30h] [rbp-160h] long long v12; // [rsp+38h] [rbp-158h] long long v13; // [rsp+40h] [rbp-150h] _BYTE *v14; // [rsp+48h] [rbp-148h] int *v15; // [rsp+50h] [rbp-140h] _QWORD *v16; // [rsp+58h] [rbp-138h] int v17; // [rsp+64h] [rbp-12Ch] long long v18; // [rsp+68h] [rbp-128h] long long v19; // [rsp+70h] [rbp-120h] long long v20; // [rsp+78h] [rbp-118h] _BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF unsigned long long v22; // [rsp+188h] [rbp-8h] v22 = __readfsqword(0x28u); v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; v14 = v21; v11 = a2; v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( a3 >= 0x100 ) v18 = 255LL; v12 = v18 + v11; while ( 1 ) { v8 = v9(v20, &v10, v11, v12); if ( v8 <= 0 ) break; v11 += v8; if ( v10 > 0x65 || !v10 ) break; v6 = v14++; *v6 = v10; } v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15); *v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19; return v13; }
my_strntoull10rnd_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x190 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x118],RDI MOV qword ptr [RBP + -0x120],RSI MOV qword ptr [RBP + -0x128],RDX MOV dword ptr [RBP + -0x12c],ECX MOV qword ptr [RBP + -0x138],R8 MOV qword ptr [RBP + -0x140],R9 LEA RAX,[RBP + -0x110] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x160],RAX MOV RAX,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x170],RAX CMP qword ptr [RBP + -0x128],0x100 JC 0x0015d72e MOV qword ptr [RBP + -0x128],0xff LAB_0015d72e: MOV RAX,qword ptr [RBP + -0x160] ADD RAX,qword ptr [RBP + -0x128] MOV qword ptr [RBP + -0x158],RAX LAB_0015d743: MOV RAX,qword ptr [RBP + -0x170] MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x160] MOV RCX,qword ptr [RBP + -0x158] LEA RSI,[RBP + -0x168] CALL RAX MOV dword ptr [RBP + -0x174],EAX CMP EAX,0x0 JLE 0x0015d7c8 MOV ECX,dword ptr [RBP + -0x174] MOV RAX,qword ptr [RBP + -0x160] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x160],RAX CMP qword ptr [RBP + -0x168],0x65 JA 0x0015d7a1 CMP qword ptr [RBP + -0x168],0x0 JNZ 0x0015d7a3 LAB_0015d7a1: JMP 0x0015d7c8 LAB_0015d7a3: MOV RAX,qword ptr [RBP + -0x168] MOV CL,AL MOV RAX,qword ptr [RBP + -0x148] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x148],RDX MOV byte ptr [RAX],CL JMP 0x0015d743 LAB_0015d7c8: MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x148] LEA RSI,[RBP + -0x110] MOV qword ptr [RBP + -0x188],RSI SUB RDX,RSI MOV ECX,dword ptr [RBP + -0x12c] MOV R8,qword ptr [RBP + -0x138] MOV R9,qword ptr [RBP + -0x140] CALL 0x00148040 MOV RDI,qword ptr [RBP + -0x188] MOV qword ptr [RBP + -0x150],RAX MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RBP + -0x118] MOV EAX,dword ptr [RAX + 0x98] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RAX] SUB RSI,RDI IMUL RDX,RSI ADD RCX,RDX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x150] MOV qword ptr [RBP + -0x180],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015d86b MOV RAX,qword ptr [RBP + -0x180] ADD RSP,0x190 POP RBP RET LAB_0015d86b: CALL 0x00124370
int8 my_strntoull10rnd_mb2_or_mb4 (long param_1,long param_2,ulong param_3,int4 param_4,long *param_5, int8 param_6) { code *pcVar1; int iVar2; long in_FS_OFFSET; ulong local_170; long local_168; long local_160; int8 local_158; int1 *local_150; int8 local_148; long *local_140; int4 local_134; ulong local_130; long local_128; long local_120; int1 local_118 [264]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_130 = param_3; if (0xff < param_3) { local_130 = 0xff; } local_160 = param_2 + local_130; local_168 = param_2; local_150 = local_118; local_148 = param_6; local_140 = param_5; local_134 = param_4; local_128 = param_2; local_120 = param_1; while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 && (local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) { *local_150 = (char)local_170; local_150 = local_150 + 1; } local_158 = my_strntoull10rnd_8bit (local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140, local_148); *local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_158; }
32,384
mysql_stmt_free_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_free_result_start(my_bool *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_free_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_free_result(stmt); return 0; }) }
O3
c
mysql_stmt_free_result_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x2d3dd movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0x9f(%rip), %rsi # 0x2d462 callq 0x2e238 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x2d3e7 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x2d457 movq %r14, %rdi callq 0x212e8 jmp 0x2d453 js 0x2d3ef movb 0x8(%r15), %al jmp 0x2d453 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1d713(%rip), %rax # 0x4ab20 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1d6f8(%rip), %rax # 0x4ab30 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_free_result_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_2D3DD mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_free_result_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_2D3E7 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_2D457 loc_2D3DD: mov rdi, r14 call mysql_stmt_free_result jmp short loc_2D453 loc_2D3E7: js short loc_2D3EF mov al, [r15+8] jmp short loc_2D453 loc_2D3EF: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_2D453: mov [rbx], al xor eax, eax loc_2D457: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_free_result_start(char *a1, long long a2) { long long v2; // rax long long v3; // rax _BYTE *v4; // r15 int v5; // eax char v7; // al long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(_BYTE **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; v4[20] = 1; v5 = my_context_spawn(v4 + 56, mysql_stmt_free_result_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { v4[21] = 1; return *(unsigned int *)v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[8]; } } else { v7 = mysql_stmt_free_result(a2); } *a1 = v7; return 0LL; }
mysql_stmt_free_result_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0012d3dd MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12d462] CALL 0x0012e238 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012d3e7 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0012d457 LAB_0012d3dd: MOV RDI,R14 CALL 0x001212e8 JMP 0x0012d453 LAB_0012d3e7: JS 0x0012d3ef MOV AL,byte ptr [R15 + 0x8] JMP 0x0012d453 LAB_0012d3ef: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14ab20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14ab30] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0012d453: MOV byte ptr [RBX],AL XOR EAX,EAX LAB_0012d457: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_free_result_start(int1 *param_1,long param_2) { int4 *puVar1; int1 uVar2; int iVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar2 = mysql_stmt_free_result(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_free_result_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar3) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014ab70, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } } *param_1 = uVar2; return 0; }
32,385
coprodis_command::coprodis_command()
msxemulator/build_O3/_deps/picotool-src/main.cpp
coprodis_command() : cmd("coprodis") {}
O3
cpp
coprodis_command::coprodis_command(): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x6d5f7(%rip), %rsi # 0xa5d63 leaq 0x6d5f8(%rip), %rdx # 0xa5d6b movq %rsp, %r14 movq %r14, %rdi callq 0x5c00c leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movq (%r14), %rcx cmpq %r15, %rcx je 0x3879d movq %rcx, 0x8(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x18(%rbx) jmp 0x387a4 movups (%r15), %xmm0 movups %xmm0, (%rax) movq 0x8(%rsp), %rax movq %rax, 0x10(%rbx) leaq 0xa75dc(%rip), %rax # 0xdfd90 movq %rax, (%rbx) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN16coprodis_commandC2Ev: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aCoprodis; "coprodis" lea rdx, aCoprodis+8; "" mov r14, rsp mov rdi, r14 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 rax, [rbx+18h] mov [rbx+8], rax mov rcx, [r14] cmp rcx, r15 jz short loc_3879D mov [rbx+8], rcx mov rax, [rsp+38h+var_28] mov [rbx+18h], rax jmp short loc_387A4 loc_3879D: movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 loc_387A4: mov rax, [rsp+38h+var_30] mov [rbx+10h], rax lea rax, off_DFD90 mov [rbx], rax add rsp, 20h pop rbx pop r14 pop r15 retn
void coprodis_command::coprodis_command(coprodis_command *this) { _QWORD v1[2]; // [rsp+0h] [rbp-38h] BYREF _OWORD v2[2]; // [rsp+10h] [rbp-28h] BYREF v1[0] = v2; std::string::_M_construct<char const*>(v1, "coprodis", ""); *((_QWORD *)this + 1) = (char *)this + 24; if ( (_OWORD *)v1[0] == v2 ) { *(_OWORD *)((char *)this + 24) = v2[0]; } else { *((_QWORD *)this + 1) = v1[0]; *((_QWORD *)this + 3) = *(_QWORD *)&v2[0]; } *((_QWORD *)this + 2) = v1[1]; *(_QWORD *)this = off_DFD90; }
coprodis_command: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x1a5d63] LEA RDX,[0x1a5d6b] MOV R14,RSP MOV RDI,R14 CALL 0x0015c00c LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV RCX,qword ptr [R14] CMP RCX,R15 JZ 0x0013879d MOV qword ptr [RBX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x18],RAX JMP 0x001387a4 LAB_0013879d: MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 LAB_001387a4: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x10],RAX LEA RAX,[0x1dfd90] MOV qword ptr [RBX],RAX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* coprodis_command::coprodis_command() */ void __thiscall coprodis_command::coprodis_command(coprodis_command *this) { int8 *local_38; int8 local_30; int8 local_28; int8 uStack_20; local_38 = &local_28; std::__cxx11::string::_M_construct<char_const*>((string *)&local_38,"coprodis",""); *(coprodis_command **)(this + 8) = this + 0x18; if (local_38 == &local_28) { *(int8 *)(this + 0x18) = local_28; *(int8 *)(this + 0x20) = uStack_20; } else { *(int8 **)(this + 8) = local_38; *(int8 *)(this + 0x18) = local_28; } *(int8 *)(this + 0x10) = local_30; *(int ***)this = &PTR__cmd_001dfd90; return; }
32,386
wait_for_flush
eloqsql/storage/maria/ma_pagecache.c
static void wait_for_flush(PAGECACHE *pagecache __attribute__((unused)), PAGECACHE_BLOCK_LINK *block __attribute__((unused))) { struct st_my_thread_var *thread= my_thread_var; DBUG_ENTER("wait_for_flush"); wqueue_add_to_queue(&block->wqueue[COND_FOR_SAVED], thread); do { DBUG_PRINT("wait", ("suspend thread %s %ld", thread->name, (ulong) thread->id)); pagecache_pthread_cond_wait(&thread->suspend, &pagecache->cache_lock); } while(thread->next); DBUG_VOID_RETURN; }
O3
c
wait_for_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx callq 0xa1b22 movq %rax, %r14 addq $0x50, %r15 movq %r15, %rdi movq %rax, %rsi callq 0xa66cf movq %r14, %r15 addq $0x8, %r15 addq $0xc8, %rbx leaq 0xa476c(%rip), %r12 # 0xd95b2 cmpq $0x0, 0x38(%r14) jne 0x34e64 movq %r15, %rdi movq %rbx, %rsi callq 0x29430 cmpq $0x0, 0x88(%r14) jne 0x34e46 jmp 0x34e79 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx movl $0x665, %ecx # imm = 0x665 callq 0x2eea0 jmp 0x34e58 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
wait_for_flush: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r15, rsi mov rbx, rdi call _my_thread_var mov r14, rax add r15, 50h ; 'P' mov rdi, r15 mov rsi, rax call wqueue_add_to_queue mov r15, r14 add r15, 8 add rbx, 0C8h lea r12, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... loc_34E46: cmp qword ptr [r14+38h], 0 jnz short loc_34E64 mov rdi, r15 mov rsi, rbx call _pthread_cond_wait loc_34E58: cmp qword ptr [r14+88h], 0 jnz short loc_34E46 jmp short loc_34E79 loc_34E64: mov rdi, r15 mov rsi, rbx mov rdx, r12 mov ecx, 665h call psi_cond_wait jmp short loc_34E58 loc_34E79: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long wait_for_flush(long long a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // r14 long long v6; // rbx long long result; // rax v5 = my_thread_var(a1, a2, a3, a4, a5); wqueue_add_to_queue(a2 + 80, v5); v6 = a1 + 200; do { if ( *(_QWORD *)(v5 + 56) ) result = psi_cond_wait( v5 + 8, v6, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x665u); else result = pthread_cond_wait(v5 + 8, v6); } while ( *(_QWORD *)(v5 + 136) ); return result; }
wait_for_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15,RSI MOV RBX,RDI CALL 0x001a1b22 MOV R14,RAX ADD R15,0x50 MOV RDI,R15 MOV RSI,RAX CALL 0x001a66cf MOV R15,R14 ADD R15,0x8 ADD RBX,0xc8 LEA R12,[0x1d95b2] LAB_00134e46: CMP qword ptr [R14 + 0x38],0x0 JNZ 0x00134e64 MOV RDI,R15 MOV RSI,RBX CALL 0x00129430 LAB_00134e58: CMP qword ptr [R14 + 0x88],0x0 JNZ 0x00134e46 JMP 0x00134e79 LAB_00134e64: MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 MOV ECX,0x665 CALL 0x0012eea0 JMP 0x00134e58 LAB_00134e79: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void wait_for_flush(long param_1,long param_2) { long lVar1; lVar1 = _my_thread_var(); wqueue_add_to_queue(param_2 + 0x50,lVar1); do { if (*(long *)(lVar1 + 0x38) == 0) { pthread_cond_wait((pthread_cond_t *)(lVar1 + 8),(pthread_mutex_t *)(param_1 + 200)); } else { psi_cond_wait((pthread_cond_t *)(lVar1 + 8),(pthread_mutex_t *)(param_1 + 200), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x665); } } while (*(long *)(lVar1 + 0x88) != 0); return; }
32,387
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_ucs2_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x985ca movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x92ea0 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x985d6 jmp 0x98670 movq -0x48(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x98690 jmp 0x985e5 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 0x98621 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 0x9865a movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x9859a movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_hash_sort_ucs2_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_9859A: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_985CA mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_ucs2_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_985CA: mov al, [rbp+var_59] test al, 1 jnz short loc_985D6 jmp loc_98670 loc_985D6: mov rdi, [rbp+var_48] lea rsi, [rbp+var_30] call my_tosort_ucs2 jmp short $+2 loc_985E5: 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_98621: 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_9865A: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_9859A loc_98670: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_ucs2_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+18h] [rbp-48h] unsigned long long v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+2Ch] [rbp-34h] unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF _QWORD *v16; // [rsp+38h] [rbp-28h] unsigned long long *v17; // [rsp+40h] [rbp-20h] long long v18; // [rsp+48h] [rbp-18h] unsigned long long v19; // [rsp+50h] [rbp-10h] long long v20; // [rsp+58h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v13 = a3 + a2; v12 = *(_QWORD *)(a1 + 120); v10 = *a4; v8 = *a5; while ( 1 ) { v7 = 0; if ( v19 < v13 ) { v14 = my_ucs2_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6); v7 = v14 > 0; } if ( !v7 ) break; my_tosort_ucs2(v12, &v15); v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F))); v9 = v8 + 3; v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F))); v8 = v9 + 3; v19 += v14; } *v17 = v10; result = v16; *v16 = v8; return result; }
my_hash_sort_ucs2_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_0019859a: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x001985ca MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00192ea0 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_001985ca: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x001985d6 JMP 0x00198670 LAB_001985d6: MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL 0x00198690 JMP 0x001985e5 LAB_001985e5: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00198621 LAB_00198621: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0019865a LAB_0019865a: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0019859a LAB_00198670: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_ucs2_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; bool bVar2; long local_60; ulong local_58; int local_3c; ulong local_38; long *local_30; ulong *local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_tosort_ucs2(uVar1,&local_38); local_58 = ((local_58 & 0x3f) + local_60) * (local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (local_38 >> 8) + local_58 * 0x100 ^ local_58; local_60 = local_60 + 6; local_18 = local_18 + (long)local_3c; } *local_28 = local_58; *local_30 = local_60; return; }
32,388
ankerl::nanobench::Result::maximum(ankerl::nanobench::Result::Measure) const
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
double Result::maximum(Measure m) const noexcept { auto const& data = mNameToMeasurements[detail::u(m)]; if (data.empty()) { return 0.0; } // here its save to assume that at least one element is there return *std::max_element(data.begin(), data.end()); }
O0
c
ankerl::nanobench::Result::maximum(ankerl::nanobench::Result::Measure) const: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x118, %rax # imm = 0x118 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rdi callq 0x1df80 movq -0x40(%rbp), %rdi movq %rax, %rsi callq 0x1e180 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x1e3d0 testb $0x1, %al jne 0x17d76 jmp 0x17d80 xorps %xmm0, %xmm0 movsd %xmm0, -0x8(%rbp) jmp 0x17dc7 movq -0x20(%rbp), %rdi callq 0x1e570 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rdi callq 0x1e5a0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x1e690 movq %rax, -0x48(%rbp) jmp 0x17dad movq -0x48(%rbp), %rax movq %rax, -0x28(%rbp) leaq -0x28(%rbp), %rdi callq 0x1e670 movsd (%rax), %xmm0 movsd %xmm0, -0x8(%rbp) movsd -0x8(%rbp), %xmm0 addq $0x50, %rsp popq %rbp retq movq %rax, %rdi callq 0xf7b0 nopw (%rax,%rax)
_ZNK6ankerl9nanobench6Result7maximumENS1_7MeasureE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] add rax, 118h mov [rbp+var_40], rax mov rdi, [rbp+var_18] call _ZN6ankerl9nanobench6detail1uINS0_6Result7MeasureEEENSt15underlying_typeIT_E4typeES6_; ankerl::nanobench::detail::u<ankerl::nanobench::Result::Measure>(ankerl::nanobench::Result::Measure) mov rdi, [rbp+var_40] mov rsi, rax call _ZNKSt6vectorIS_IdSaIdEESaIS1_EEixEm; std::vector<std::vector<double>>::operator[](ulong) mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _ZNKSt6vectorIdSaIdEE5emptyEv; std::vector<double>::empty(void) test al, 1 jnz short loc_17D76 jmp short loc_17D80 loc_17D76: xorps xmm0, xmm0 movsd [rbp+var_8], xmm0 jmp short loc_17DC7 loc_17D80: mov rdi, [rbp+var_20] call _ZNKSt6vectorIdSaIdEE5beginEv; std::vector<double>::begin(void) mov [rbp+var_30], rax mov rdi, [rbp+var_20] call _ZNKSt6vectorIdSaIdEE3endEv; std::vector<double>::end(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] call _ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEEET_S8_S8_; std::max_element<__gnu_cxx::__normal_iterator<double const*,std::vector<double>>>(__gnu_cxx::__normal_iterator<double const*,std::vector<double>>,__gnu_cxx::__normal_iterator<double const*,std::vector<double>>) mov [rbp+var_48], rax jmp short $+2 loc_17DAD: mov rax, [rbp+var_48] mov [rbp+var_28], rax lea rdi, [rbp+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEdeEv; __gnu_cxx::__normal_iterator<double const*,std::vector<double>>::operator*(void) movsd xmm0, qword ptr [rax] movsd [rbp+var_8], xmm0 loc_17DC7: movsd xmm0, [rbp+var_8] add rsp, 50h pop rbp retn mov rdi, rax call __clang_call_terminate
double ankerl::nanobench::Result::maximum(long long a1, long long a2) { long long v2; // rax long long v3; // rsi long long v5; // [rsp+20h] [rbp-30h] long long v6; // [rsp+28h] [rbp-28h] BYREF long long v7; // [rsp+30h] [rbp-20h] long long v8; // [rsp+38h] [rbp-18h] long long v9; // [rsp+40h] [rbp-10h] v9 = a1; v8 = a2; v2 = ankerl::nanobench::detail::u<ankerl::nanobench::Result::Measure>(a2); v7 = std::vector<std::vector<double>>::operator[](a1 + 280, v2); if ( (std::vector<double>::empty(v7) & 1) != 0 ) return 0.0; v5 = std::vector<double>::begin(v7); v3 = std::vector<double>::end(v7); v6 = std::max_element<__gnu_cxx::__normal_iterator<double const*,std::vector<double>>>(v5, v3); return *(double *)__gnu_cxx::__normal_iterator<double const*,std::vector<double>>::operator*(&v6); }
maximum: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x118 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0011df80 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,RAX CALL 0x0011e180 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011e3d0 TEST AL,0x1 JNZ 0x00117d76 JMP 0x00117d80 LAB_00117d76: XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x8],XMM0 JMP 0x00117dc7 LAB_00117d80: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011e570 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011e5a0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] LAB_00117da2: CALL 0x0011e690 MOV qword ptr [RBP + -0x48],RAX JMP 0x00117dad LAB_00117dad: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x28] CALL 0x0011e670 MOVSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x8],XMM0 LAB_00117dc7: MOVSD XMM0,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* ankerl::nanobench::Result::maximum(ankerl::nanobench::Result::Measure) const */ int8 __thiscall ankerl::nanobench::Result::maximum(Result *this,int8 param_2) { ulong uVar1; int8 uVar2; int8 uVar3; int8 *puVar4; int8 local_30; vector<double,std::allocator<double>> *local_28; int8 local_20; Result *local_18; int8 local_10; local_20 = param_2; local_18 = this; uVar1 = detail::u<ankerl::nanobench::Result::Measure>(param_2); local_28 = (vector<double,std::allocator<double>> *) std:: vector<std::vector<double,std::allocator<double>>,std::allocator<std::vector<double,std::allocator<double>>>> ::operator[]((vector<std::vector<double,std::allocator<double>>,std::allocator<std::vector<double,std::allocator<double>>>> *)(this + 0x118),uVar1); uVar1 = std::vector<double,std::allocator<double>>::empty(local_28); if ((uVar1 & 1) == 0) { uVar2 = std::vector<double,std::allocator<double>>::begin(local_28); uVar3 = std::vector<double,std::allocator<double>>::end(local_28); /* try { // try from 00117da2 to 00117da6 has its CatchHandler @ 00117dd2 */ local_30 = std:: max_element<__gnu_cxx::__normal_iterator<double_const*,std::vector<double,std::allocator<double>>>> (uVar2,uVar3); puVar4 = (int8 *) __gnu_cxx::__normal_iterator<double_const*,std::vector<double,std::allocator<double>>> ::operator*((__normal_iterator<double_const*,std::vector<double,std::allocator<double>>> *)&local_30); local_10 = *puVar4; } else { local_10 = 0; } return local_10; }
32,389
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::handle_value<double&>(double&, bool)
llama.cpp/common/json.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O3
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::handle_value<double&>(double&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rdi, %rbx movq 0x30(%rdi), %rax movl 0x38(%rdi), %ecx cmpq %rax, 0x20(%rdi) sete %dl testl %ecx, %ecx sete %dil andb %dl, %dil cmpb $0x1, %dil je 0xed700 movl %ecx, %ecx movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000 leaq -0x1(%rcx), %rdx addq $0x3e, %rcx testq %rdx, %rdx cmovnsq %rdx, %rcx sarq $0x6, %rcx leaq (%rax,%rcx,8), %rax leaq 0x3f(%r14), %rcx andq %rdx, %rcx xorl %edi, %edi cmpq %r14, %rcx setbe %dil movq -0x8(%rax,%rdi,8), %rax btq %rdx, %rax jae 0xed593 leaq 0x10(%rsp), %rdi callq 0xec27c testb %bpl, %bpl jne 0xed540 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x5, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0xed721 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0xed6d4 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0xed59d movq -0x8(%rax), %rax testq %rax, %rax je 0xed6d4 movzbl (%rax), %ecx cmpl $0x1, %ecx je 0xed5f7 cmpl $0x2, %ecx jne 0xed726 movq 0x8(%rax), %rdi leaq 0x10(%rsp), %rsi callq 0xea8cc movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0xed6d0 xorl %ebx, %ebx xorl %r14d, %r14d jmp 0xed6f0 leaq 0x10(%rsp), %r14 movups (%r14), %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0xe6386 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0xe6386 movq (%rbx), %rdi movq %r15, %rsi callq 0xe8c42 movq %r15, %rdi xorl %esi, %esi callq 0xe6386 movq %r15, %rdi callq 0xeb19e movq (%rbx), %r14 jmp 0xed6d0 movq 0x58(%rbx), %rax movl 0x60(%rbx), %ecx cmpq %rax, 0x48(%rbx) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0xed734 movl %ecx, %esi leaq -0x1(%rsi), %rcx movq %rsi, %rdx addq $0x3e, %rdx testq %rcx, %rcx cmovnsq %rcx, %rdx sarq $0x6, %rdx leaq (%rax,%rdx,8), %rdi leaq 0x3f(%r14), %rdx andq %rcx, %rdx xorl %r8d, %r8d cmpq %r14, %rdx setbe %r8b movl $0x1, %edx shlq %cl, %rdx andq -0x8(%rdi,%r8,8), %rdx subl $0x1, %esi movl %esi, 0x60(%rbx) jae 0xed669 movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rdx, %rdx je 0xed6d4 cmpq $0x0, 0x70(%rbx) je 0xed755 leaq 0x10(%rsp), %r14 movups (%r14), %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0xe6386 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0xe6386 movq 0x70(%rbx), %rdi movq %r15, %rsi callq 0xe8c42 movq %r15, %rdi xorl %esi, %esi callq 0xe6386 movq %r15, %rdi callq 0xeb19e movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0xed6d9 xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x10(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0xe6386 movq %r15, %rdi callq 0xeb19e movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x94b3d(%rip), %rdi # 0x182244 leaq 0x85704(%rip), %rdx # 0x172e12 leaq 0x88c18(%rip), %rcx # 0x17632d movl $0x1c28, %esi # imm = 0x1C28 xorl %eax, %eax callq 0x26090 callq 0x265f0 leaq 0x88c14(%rip), %rcx # 0x176341 movl $0x1c4b, %esi # imm = 0x1C4B jmp 0xed740 leaq 0x88c44(%rip), %rcx # 0x17637f movl $0x1c57, %esi # imm = 0x1C57 leaq 0x94afd(%rip), %rdi # 0x182244 leaq 0x856c4(%rip), %rdx # 0x172e12 xorl %eax, %eax callq 0x26090 leaq 0x94ae8(%rip), %rdi # 0x182244 leaq 0x856af(%rip), %rdx # 0x172e12 leaq 0x88c2d(%rip), %rcx # 0x176397 movl $0x1c60, %esi # imm = 0x1C60 xorl %eax, %eax callq 0x26090 jmp 0xed778 movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0xe6386 movq %r14, %rdi callq 0xeb19e movq %rbx, %rdi callq 0x25ca0
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRSB_EESt4pairIbPSF_EOT_b: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov rbx, rdi mov rax, [rdi+30h] mov ecx, [rdi+38h] cmp [rdi+20h], rax setz dl test ecx, ecx setz dil and dil, dl cmp dil, 1 jz loc_ED700 mov ecx, ecx mov r14, 8000000000000000h lea rdx, [rcx-1] add rcx, 3Eh ; '>' test rdx, rdx cmovns rcx, rdx sar rcx, 6 lea rax, [rax+rcx*8] lea rcx, [r14+3Fh] and rcx, rdx xor edi, edi cmp rcx, r14 setbe dil mov rax, [rax+rdi*8-8] bt rax, rdx jnb loc_ED593 lea rdi, [rsp+68h+var_58] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ test bpl, bpl jnz short loc_ED540 mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_5C], eax mov [rsp+68h+var_5D], 5 cmp qword ptr [rbx+90h], 0 jz loc_ED721 lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_5C] lea rdx, [rsp+68h+var_5D] lea rcx, [rsp+68h+var_58] call qword ptr [rbx+98h] test al, al jz loc_ED6D4 loc_ED540: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_ED59D mov rax, [rax-8] test rax, rax jz loc_ED6D4 movzx ecx, byte ptr [rax] cmp ecx, 1 jz loc_ED5F7 cmp ecx, 2 jnz loc_ED726 mov rdi, [rax+8] lea rsi, [rsp+68h+var_58] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_ED6D0 loc_ED593: xor ebx, ebx xor r14d, r14d jmp loc_ED6F0 loc_ED59D: lea r14, [rsp+68h+var_58] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_38] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx] jmp loc_ED6D0 loc_ED5F7: mov rax, [rbx+58h] mov ecx, [rbx+60h] cmp [rbx+48h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_ED734 mov esi, ecx lea rcx, [rsi-1] mov rdx, rsi add rdx, 3Eh ; '>' test rcx, rcx cmovns rdx, rcx sar rdx, 6 lea rdi, [rax+rdx*8] lea rdx, [r14+3Fh] and rdx, rcx xor r8d, r8d cmp rdx, r14 setbe r8b mov edx, 1 shl rdx, cl and rdx, [rdi+r8*8-8] sub esi, 1 mov [rbx+60h], esi jnb short loc_ED669 mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_ED669: test rdx, rdx jz short loc_ED6D4 cmp qword ptr [rbx+70h], 0 jz loc_ED755 lea r14, [rsp+68h+var_58] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_48] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx+70h] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx+70h] loc_ED6D0: mov bl, 1 jmp short loc_ED6D9 loc_ED6D4: xor ebx, ebx xor r14d, r14d loc_ED6D9: lea r15, [rsp+68h+var_58] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_ED6F0: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_ED700: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1C28h xor eax, eax call _ggml_abort loc_ED721: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_ED726: lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"... mov esi, 1C4Bh jmp short loc_ED740 loc_ED734: lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()" mov esi, 1C57h loc_ED740: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort loc_ED755: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjectElement; "object_element" mov esi, 1C60h xor eax, eax call _ggml_abort jmp short $+2 loc_ED778: mov rbx, rax lea r14, [rsp+68h+var_58] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<std::string&>( long long a1, long long a2, char a3) { unsigned int v4; // ebx long long v5; // rax unsigned int v6; // ecx signed long long v7; // rdx long long v8; // rcx long long v9; // rax long long v10; // rax unsigned __int8 *v11; // rax int v12; // ecx long long v13; // rax unsigned int v14; // ecx long long v15; // rsi long long v16; // rcx long long v17; // rdx long long v18; // rdx const char *v20; // rcx long long v21; // rsi long long v22; // rax long long v23; // rbx char v24; // [rsp+Bh] [rbp-5Dh] BYREF int v25; // [rsp+Ch] [rbp-5Ch] BYREF __int128 v26; // [rsp+10h] [rbp-58h] BYREF __int128 v27; // [rsp+20h] [rbp-48h] BYREF _OWORD v28[3]; // [rsp+30h] [rbp-38h] BYREF v4 = a1; v5 = *(_QWORD *)(a1 + 48); v6 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7208LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); goto LABEL_28; } v7 = v6 - 1LL; v8 = v6 + 62LL; if ( v7 >= 0 ) v8 = v7; v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v9, v7) ) { ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_((char *)&v26); if ( a3 ) { LABEL_8: v10 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v10 ) { v28[0] = v26; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)a1, (long long)v28); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v28); goto LABEL_23; } v11 = *(unsigned __int8 **)(v10 - 8); if ( v11 ) { v12 = *v11; if ( v12 != 1 ) { if ( v12 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( *((_QWORD *)v11 + 1), (long long)&v26); LABEL_23: LOBYTE(v4) = 1; LABEL_25: nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26); return v4; } v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; v21 = 7243LL; goto LABEL_31; } v13 = *(_QWORD *)(a1 + 88); v14 = *(_DWORD *)(a1 + 96); if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 ) { v20 = "!key_keep_stack.empty()"; v21 = 7255LL; LABEL_31: ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20); goto LABEL_32; } v15 = v14; v16 = v14 - 1LL; v17 = v15 + 62; if ( v16 >= 0 ) v17 = v16; v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16); *(_DWORD *)(a1 + 96) = v15 - 1; if ( !(_DWORD)v15 ) { *(_DWORD *)(a1 + 96) = 63; *(_QWORD *)(a1 + 88) = v13 - 8; } if ( v18 ) { if ( *(_QWORD *)(a1 + 112) ) { v27 = v26; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v27); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)(a1 + 112), (long long)&v27); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v27); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v27); goto LABEL_23; } LABEL_32: ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7264LL, "GGML_ASSERT(%s) failed", "object_element"); v23 = v22; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26); _Unwind_Resume(v23); } } LABEL_24: v4 = 0; goto LABEL_25; } v25 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v24 = 5; if ( *(_QWORD *)(a1 + 144) ) { if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))( a1 + 128, &v25, &v24, &v26) ) goto LABEL_24; goto LABEL_8; } LABEL_28: std::__throw_bad_function_call(); } return 0; }
handle_value<std::__cxx11::string&>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x30] MOV ECX,dword ptr [RDI + 0x38] CMP qword ptr [RDI + 0x20],RAX SETZ DL TEST ECX,ECX SETZ DIL AND DIL,DL CMP DIL,0x1 JZ 0x001ed700 MOV ECX,ECX MOV R14,-0x8000000000000000 LEA RDX,[RCX + -0x1] ADD RCX,0x3e TEST RDX,RDX CMOVNS RCX,RDX SAR RCX,0x6 LEA RAX,[RAX + RCX*0x8] LEA RCX,[R14 + 0x3f] AND RCX,RDX XOR EDI,EDI CMP RCX,R14 SETBE DIL MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8] BT RAX,RDX JNC 0x001ed593 LEA RDI,[RSP + 0x10] CALL 0x001ec27c TEST BPL,BPL JNZ 0x001ed540 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x001ed721 LEA RDI,[RBX + 0x80] LAB_001ed523: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x001ed6d4 LAB_001ed540: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x001ed59d MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x001ed6d4 MOVZX ECX,byte ptr [RAX] CMP ECX,0x1 JZ 0x001ed5f7 CMP ECX,0x2 JNZ 0x001ed726 MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x001ea8cc LAB_001ed57a: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x001ed6d0 LAB_001ed593: XOR EBX,EBX XOR R14D,R14D JMP 0x001ed6f0 LAB_001ed59d: LEA R14,[RSP + 0x10] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x001e6386 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x001e6386 MOV RDI,qword ptr [RBX] MOV RSI,R15 CALL 0x001e8c42 MOV RDI,R15 XOR ESI,ESI CALL 0x001e6386 MOV RDI,R15 CALL 0x001eb19e MOV R14,qword ptr [RBX] JMP 0x001ed6d0 LAB_001ed5f7: MOV RAX,qword ptr [RBX + 0x58] MOV ECX,dword ptr [RBX + 0x60] CMP qword ptr [RBX + 0x48],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x001ed734 MOV ESI,ECX LEA RCX,[RSI + -0x1] MOV RDX,RSI ADD RDX,0x3e TEST RCX,RCX CMOVNS RDX,RCX SAR RDX,0x6 LEA RDI,[RAX + RDX*0x8] LEA RDX,[R14 + 0x3f] AND RDX,RCX XOR R8D,R8D CMP RDX,R14 SETBE R8B MOV EDX,0x1 SHL RDX,CL AND RDX,qword ptr [RDI + R8*0x8 + -0x8] SUB ESI,0x1 MOV dword ptr [RBX + 0x60],ESI JNC 0x001ed669 MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_001ed669: TEST RDX,RDX JZ 0x001ed6d4 CMP qword ptr [RBX + 0x70],0x0 JZ 0x001ed755 LEA R14,[RSP + 0x10] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x001e6386 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x001e6386 MOV RDI,qword ptr [RBX + 0x70] MOV RSI,R15 CALL 0x001e8c42 MOV RDI,R15 XOR ESI,ESI CALL 0x001e6386 MOV RDI,R15 CALL 0x001eb19e MOV R14,qword ptr [RBX + 0x70] LAB_001ed6d0: MOV BL,0x1 JMP 0x001ed6d9 LAB_001ed6d4: XOR EBX,EBX XOR R14D,R14D LAB_001ed6d9: LEA R15,[RSP + 0x10] MOV RDI,R15 XOR ESI,ESI CALL 0x001e6386 MOV RDI,R15 CALL 0x001eb19e LAB_001ed6f0: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001ed700: LEA RDI,[0x282244] LEA RDX,[0x272e12] LEA RCX,[0x27632d] MOV ESI,0x1c28 XOR EAX,EAX CALL 0x00126090 LAB_001ed721: CALL 0x001265f0 LAB_001ed726: LEA RCX,[0x276341] MOV ESI,0x1c4b JMP 0x001ed740 LAB_001ed734: LEA RCX,[0x27637f] MOV ESI,0x1c57 LAB_001ed740: LEA RDI,[0x282244] LEA RDX,[0x272e12] XOR EAX,EAX CALL 0x00126090 LAB_001ed755: LEA RDI,[0x282244] LEA RDX,[0x272e12] LEA RCX,[0x276397] MOV ESI,0x1c60 XOR EAX,EAX CALL 0x00126090
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::handle_value<std::__cxx11::string&>(std::__cxx11::string&, bool) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::handle_value<std::__cxx11::string&> (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,string *param_1,bool param_2) { uint uVar1; char cVar2; ulong uVar3; char *pcVar4; ulong uVar5; int8 uVar6; bool bVar7; long lVar8; int1 auVar9 [16]; int1 local_5d; int4 local_5c; basic_json local_58 [8]; int8 uStack_50; data local_48 [8]; int8 uStack_40; data local_38 [8]; int8 uStack_30; uVar1 = *(uint *)(this + 0x38); if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) & 1) == 0) { uVar5 = 0; lVar8 = 0; goto LAB_001ed6f0; } _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_58); if (param_2) { LAB_001ed540: if (*(long *)(this + 8) == *(long *)(this + 0x10)) { uStack_30 = uStack_50; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_58,0)); local_58[0] = (basic_json)0x0; uStack_50 = 0; bVar7 = SUB81(local_38,0); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)this,local_38); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); lVar8 = *(long *)this; } else { pcVar4 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar4 == (char *)0x0) goto LAB_001ed6d4; if (*pcVar4 == '\x01') { lVar8 = *(long *)(this + 0x58); uVar1 = *(uint *)(this + 0x60); if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) { pcVar4 = "!key_keep_stack.empty()"; uVar6 = 0x1c57; goto LAB_001ed740; } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar1 - 1; if (uVar1 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = lVar8 + -8; } if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_001ed6d4; if (*(long *)(this + 0x70) == 0) { /* try { // try from 001ed755 to 001ed775 has its CatchHandler @ 001ed776 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60, "GGML_ASSERT(%s) failed","object_element"); } uStack_40 = uStack_50; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_58,0)); local_58[0] = (basic_json)0x0; uStack_50 = 0; bVar7 = SUB81(local_48,0); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(this + 0x70),local_48); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_48); lVar8 = *(long *)(this + 0x70); } else { if (*pcVar4 != '\x02') { pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; uVar6 = 0x1c4b; LAB_001ed740: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar4); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pcVar4 + 8),local_58); lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } } uVar5 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_5d = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 001ed721 to 001ed754 has its CatchHandler @ 001ed778 */ std::__throw_bad_function_call(); } /* try { // try from 001ed523 to 001ed579 has its CatchHandler @ 001ed778 */ cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,local_58); if (cVar2 != '\0') goto LAB_001ed540; LAB_001ed6d4: uVar5 = 0; lVar8 = 0; } basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_58,0)); basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_58); LAB_001ed6f0: auVar9._0_8_ = uVar5 & 0xffffffff; auVar9._8_8_ = lVar8; return auVar9; }
32,390
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O0
c
js_promise_resolve_function_call: subq $0x108, %rsp # imm = 0x108 movl 0x118(%rsp), %eax movq 0x110(%rsp), %rax movq %rsi, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq %rcx, 0xd8(%rsp) movq %r8, 0xe0(%rsp) movq %rdi, 0xd0(%rsp) movl %r9d, 0xcc(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0xb8(%rsp) cmpq $0x0, 0xb8(%rsp) je 0x53af7 movq 0xb8(%rsp), %rax movq 0x10(%rax), %rax cmpl $0x0, 0x4(%rax) je 0x53b13 movl $0x0, 0xf8(%rsp) movq $0x3, 0x100(%rsp) jmp 0x53dd7 movq 0xb8(%rsp), %rax movq 0x10(%rax), %rax movl $0x1, 0x4(%rax) movq 0xc0(%rsp), %rax movzwl 0x6(%rax), %eax subl $0x32, %eax movl %eax, 0x5c(%rsp) cmpl $0x0, 0xcc(%rsp) jle 0x53b64 movq 0x110(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xa8(%rsp) movq 0x8(%rax), %rax movq %rax, 0xb0(%rsp) jmp 0x53b8f movl $0x0, 0x48(%rsp) movq $0x3, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xb0(%rsp) cmpl $0x0, 0x5c(%rsp) jne 0x53bb0 movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0x53bb5 jmp 0x53d00 movq 0xd0(%rsp), %rdi movq 0xb8(%rsp), %rax movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdx movq (%rax), %rcx movq 0x8(%rax), %r8 callq 0x35b10 cmpl $0x0, %eax je 0x53c08 movq 0xd0(%rsp), %rdi leaq 0xbb775(%rip), %rsi # 0x10f36a movb $0x0, %al callq 0x2d300 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x53c60 jmp 0x53c0a movq 0xd0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdx movl $0x80, %ecx callq 0x29d80 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x53ccd jmp 0x53c60 movq 0xd0(%rsp), %rdi callq 0x2cf70 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0xd0(%rsp), %rdi movq 0xb8(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x18(%rsp), %rcx movq 0x20(%rsp), %r8 callq 0x91df0 movq 0xd0(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x23c90 jmp 0x53dc0 movq 0xd0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x2e510 cmpl $0x0, %eax jne 0x53d36 movq 0xd0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movq 0xd0(%rsp), %rdi movq 0xb8(%rsp), %rax movl 0x5c(%rsp), %r9d movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0xa8(%rsp), %rcx movq 0xb0(%rsp), %r8 callq 0x91e40 jmp 0x53dbe movq 0xb8(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x70(%rsp) movq 0x8(%rax), %rax movq %rax, 0x78(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x80(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xd0(%rsp), %rdi leaq 0x70(%rsp), %rcx leaq 0x3e463(%rip), %rsi # 0x92200 movl $0x3, %edx callq 0x23930 movq 0xd0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 jmp 0x53dc0 movl $0x0, 0xf8(%rsp) movq $0x3, 0x100(%rsp) movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rdx addq $0x108, %rsp # imm = 0x108 retq nop
js_promise_resolve_function_call: sub rsp, 108h mov eax, [rsp+108h+arg_8] mov rax, [rsp+108h+arg_0] mov [rsp+108h+var_20], rsi mov [rsp+108h+var_18], rdx mov [rsp+108h+var_30], rcx mov [rsp+108h+var_28], r8 mov [rsp+108h+var_38], rdi mov [rsp+108h+var_3C], r9d mov rax, [rsp+108h+var_20] mov [rsp+108h+var_48], rax mov rax, [rsp+108h+var_48] mov rax, [rax+30h] mov [rsp+108h+var_50], rax cmp [rsp+108h+var_50], 0 jz short loc_53AF7 mov rax, [rsp+108h+var_50] mov rax, [rax+10h] cmp dword ptr [rax+4], 0 jz short loc_53B13 loc_53AF7: mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 3 jmp loc_53DD7 loc_53B13: mov rax, [rsp+108h+var_50] mov rax, [rax+10h] mov dword ptr [rax+4], 1 mov rax, [rsp+108h+var_48] movzx eax, word ptr [rax+6] sub eax, 32h ; '2' mov [rsp+108h+var_AC], eax cmp [rsp+108h+var_3C], 0 jle short loc_53B64 mov rax, [rsp+108h+arg_0] mov rcx, [rax] mov [rsp+108h+var_60], rcx mov rax, [rax+8] mov [rsp+108h+var_58], rax jmp short loc_53B8F loc_53B64: mov dword ptr [rsp+108h+var_C0], 0 mov [rsp+108h+var_B8], 3 mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_60], rax mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_58], rax loc_53B8F: cmp [rsp+108h+var_AC], 0 jnz short loc_53BB0 mov rdi, [rsp+108h+var_60] mov rsi, [rsp+108h+var_58] call JS_IsObject cmp eax, 0 jnz short loc_53BB5 loc_53BB0: jmp loc_53D00 loc_53BB5: mov rdi, [rsp+108h+var_38] mov rax, [rsp+108h+var_50] mov rsi, [rsp+108h+var_60] mov rdx, [rsp+108h+var_58] mov rcx, [rax] mov r8, [rax+8] call js_same_value cmp eax, 0 jz short loc_53C08 mov rdi, [rsp+108h+var_38] lea rsi, aPromiseSelfRes; "promise self resolution" mov al, 0 call JS_ThrowTypeError mov [rsp+108h+var_D0], rax mov [rsp+108h+var_C8], rdx jmp short loc_53C60 loc_53C08: jmp short $+2 loc_53C0A: mov rdi, [rsp+108h+var_38] mov rsi, [rsp+108h+var_60] mov rdx, [rsp+108h+var_58] mov ecx, 80h call JS_GetProperty mov [rsp+108h+var_E0], rax mov [rsp+108h+var_D8], rdx mov rax, [rsp+108h+var_E0] mov [rsp+108h+var_A8], rax mov rax, [rsp+108h+var_D8] mov [rsp+108h+var_A0], rax mov rdi, [rsp+108h+var_A8] mov rsi, [rsp+108h+var_A0] call JS_IsException_1 cmp eax, 0 jz short loc_53CCD jmp short $+2 loc_53C60: mov rdi, [rsp+108h+var_38] call JS_GetException mov [rsp+108h+var_100], rax mov [rsp+108h+var_F8], rdx mov rax, [rsp+108h+var_100] mov [rsp+108h+var_F0], rax mov rax, [rsp+108h+var_F8] mov [rsp+108h+var_E8], rax mov rdi, [rsp+108h+var_38] mov rax, [rsp+108h+var_50] mov rsi, [rax] mov rdx, [rax+8] mov rcx, [rsp+108h+var_F0] mov r8, [rsp+108h+var_E8] call reject_promise mov rdi, [rsp+108h+var_38] mov rsi, [rsp+108h+var_F0] mov rdx, [rsp+108h+var_E8] call JS_FreeValue jmp loc_53DC0 loc_53CCD: mov rdi, [rsp+108h+var_38] mov rsi, [rsp+108h+var_A8] mov rdx, [rsp+108h+var_A0] call JS_IsFunction cmp eax, 0 jnz short loc_53D36 mov rdi, [rsp+108h+var_38] mov rsi, [rsp+108h+var_A8] mov rdx, [rsp+108h+var_A0] call JS_FreeValue loc_53D00: mov rdi, [rsp+108h+var_38] mov rax, [rsp+108h+var_50] mov r9d, [rsp+108h+var_AC] mov rsi, [rax] mov rdx, [rax+8] mov rcx, [rsp+108h+var_60] mov r8, [rsp+108h+var_58] call fulfill_or_reject_promise jmp loc_53DBE loc_53D36: mov rax, [rsp+108h+var_50] mov rcx, [rax] mov [rsp+108h+var_98], rcx mov rax, [rax+8] mov [rsp+108h+var_90], rax mov rax, [rsp+108h+var_60] mov [rsp+108h+var_88], rax mov rax, [rsp+108h+var_58] mov [rsp+108h+var_80], rax mov rax, [rsp+108h+var_A8] mov [rsp+108h+var_78], rax mov rax, [rsp+108h+var_A0] mov [rsp+108h+var_70], rax mov rdi, [rsp+108h+var_38] lea rcx, [rsp+108h+var_98] lea rsi, js_promise_resolve_thenable_job mov edx, 3 call JS_EnqueueJob mov rdi, [rsp+108h+var_38] mov rsi, [rsp+108h+var_A8] mov rdx, [rsp+108h+var_A0] call JS_FreeValue loc_53DBE: jmp short $+2 loc_53DC0: mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 3 loc_53DD7: mov rax, [rsp+108h+var_10] mov rdx, [rsp+108h+var_8] add rsp, 108h retn
long long js_promise_resolve_function_call( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15) { long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // rdx char v24; // [rsp+0h] [rbp-108h] long long Exception; // [rsp+8h] [rbp-100h] long long v26; // [rsp+20h] [rbp-E8h] long long Property; // [rsp+28h] [rbp-E0h] _DWORD *v28; // [rsp+48h] [rbp-C0h] unsigned int v29; // [rsp+5Ch] [rbp-ACh] long long v30; // [rsp+68h] [rbp-A0h] _QWORD v31[7]; // [rsp+70h] [rbp-98h] BYREF _DWORD *v32; // [rsp+A8h] [rbp-60h] long long v33; // [rsp+B0h] [rbp-58h] _QWORD *v34; // [rsp+B8h] [rbp-50h] long long v35; // [rsp+C0h] [rbp-48h] int v36; // [rsp+CCh] [rbp-3Ch] long long v37; // [rsp+D0h] [rbp-38h] long long v38; // [rsp+D8h] [rbp-30h] long long v39; // [rsp+E0h] [rbp-28h] long long v40; // [rsp+E8h] [rbp-20h] long long v41; // [rsp+F0h] [rbp-18h] long long v42; // [rsp+F8h] [rbp-10h] long long v43; // [rsp+100h] [rbp-8h] v40 = a2; v41 = a3; v38 = a4; v39 = a5; v37 = a1; v36 = a6; v35 = a2; v34 = *(_QWORD **)(a2 + 48); if ( v34 && !*(_DWORD *)(v34[2] + 4LL) ) { *(_DWORD *)(v34[2] + 4LL) = 1; v29 = *(unsigned __int16 *)(v35 + 6) - 50; if ( v36 <= 0 ) { LODWORD(v28) = 0; v32 = v28; v33 = 3LL; } else { v32 = *(_DWORD **)a15; v33 = *(_QWORD *)(a15 + 8); } if ( v29 || !JS_IsObject((long long)v32, v33) ) { LABEL_16: fulfill_or_reject_promise(v37, *v34, v34[1], v32, v33, v29); goto LABEL_18; } if ( (unsigned int)js_same_value(v37, v32, v33, (_DWORD *)*v34, v34[1]) ) { JS_ThrowTypeError( v37, (long long)"promise self resolution", v15, v16, v17, v18, a7, a8, a9, a10, v19, v20, a13, a14, v24); } else { Property = JS_GetProperty(v37, (int)v32, v33, 128); v30 = v21; if ( !JS_IsException_1(Property, v21) ) { if ( (unsigned int)JS_IsFunction(v37, Property, v30) ) { v31[0] = *v34; v31[1] = v34[1]; v31[2] = v32; v31[3] = v33; v31[4] = Property; v31[5] = v30; JS_EnqueueJob(v37, (long long)js_promise_resolve_thenable_job, 3, (long long)v31); JS_FreeValue(v37, Property, v30); goto LABEL_18; } JS_FreeValue(v37, Property, v30); goto LABEL_16; } } Exception = JS_GetException(v37); v26 = v22; reject_promise(v37, *v34, v34[1], Exception, v22); JS_FreeValue(v37, Exception, v26); LABEL_18: LODWORD(v42) = 0; v43 = 3LL; return v42; } LODWORD(v42) = 0; v43 = 3LL; return v42; }
js_promise_resolve_function_call: SUB RSP,0x108 MOV EAX,dword ptr [RSP + 0x118] MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xe0],R8 MOV qword ptr [RSP + 0xd0],RDI MOV dword ptr [RSP + 0xcc],R9D MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0xb8],RAX CMP qword ptr [RSP + 0xb8],0x0 JZ 0x00153af7 MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x00153b13 LAB_00153af7: MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x3 JMP 0x00153dd7 LAB_00153b13: MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x4],0x1 MOV RAX,qword ptr [RSP + 0xc0] MOVZX EAX,word ptr [RAX + 0x6] SUB EAX,0x32 MOV dword ptr [RSP + 0x5c],EAX CMP dword ptr [RSP + 0xcc],0x0 JLE 0x00153b64 MOV RAX,qword ptr [RSP + 0x110] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xa8],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xb0],RAX JMP 0x00153b8f LAB_00153b64: MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x3 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xb0],RAX LAB_00153b8f: CMP dword ptr [RSP + 0x5c],0x0 JNZ 0x00153bb0 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x00153bb5 LAB_00153bb0: JMP 0x00153d00 LAB_00153bb5: MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RSP + 0xb8] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RAX] MOV R8,qword ptr [RAX + 0x8] CALL 0x00135b10 CMP EAX,0x0 JZ 0x00153c08 MOV RDI,qword ptr [RSP + 0xd0] LEA RSI,[0x20f36a] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x00153c60 LAB_00153c08: JMP 0x00153c0a LAB_00153c0a: MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] MOV ECX,0x80 CALL 0x00129d80 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00153ccd JMP 0x00153c60 LAB_00153c60: MOV RDI,qword ptr [RSP + 0xd0] CALL 0x0012cf70 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RSP + 0xb8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x20] CALL 0x00191df0 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00123c90 JMP 0x00153dc0 LAB_00153ccd: MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x0012e510 CMP EAX,0x0 JNZ 0x00153d36 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 LAB_00153d00: MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RSP + 0xb8] MOV R9D,dword ptr [RSP + 0x5c] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0xa8] MOV R8,qword ptr [RSP + 0xb0] CALL 0x00191e40 JMP 0x00153dbe LAB_00153d36: MOV RAX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xd0] LEA RCX,[RSP + 0x70] LEA RSI,[0x192200] MOV EDX,0x3 CALL 0x00123930 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 LAB_00153dbe: JMP 0x00153dc0 LAB_00153dc0: MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x3 LAB_00153dd7: MOV RAX,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] ADD RSP,0x108 RET
int1 [16] js_promise_resolve_function_call (int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int param_6,long *param_7) { int iVar1; int iVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; uint uStack_bc; int8 local_98; int8 local_90; long local_88; long local_80; int1 local_78 [16]; long local_60; long local_58; int8 *local_50; long local_48; int local_3c; int8 local_38; int8 local_30; int8 local_28; long local_20; int8 local_18; uint uStack_c; local_50 = *(int8 **)(param_2 + 0x30); if ((local_50 == (int8 *)0x0) || (*(int *)(local_50[2] + 4) != 0)) goto LAB_00153dd7; *(int4 *)(local_50[2] + 4) = 1; iVar1 = *(ushort *)(param_2 + 6) - 0x32; if (param_6 < 1) { local_60 = (ulong)uStack_bc << 0x20; local_58 = 3; } else { local_60 = *param_7; local_58 = param_7[1]; } local_48 = param_2; local_3c = param_6; local_38 = param_1; local_30 = param_4; local_28 = param_5; local_20 = param_2; local_18 = param_3; if ((iVar1 == 0) && (iVar2 = JS_IsObject(local_60,local_58), iVar2 != 0)) { iVar2 = js_same_value(local_38,local_60,local_58,*local_50,local_50[1]); if (iVar2 == 0) { auVar5 = JS_GetProperty(local_38,local_60,local_58,0x80); uVar4 = auVar5._8_8_; uVar3 = auVar5._0_8_; iVar2 = JS_IsException(uVar3,uVar4); if (iVar2 == 0) { iVar2 = JS_IsFunction(local_38,uVar3,uVar4); if (iVar2 != 0) { local_98 = *local_50; local_90 = local_50[1]; local_88 = local_60; local_80 = local_58; local_78 = auVar5; JS_EnqueueJob(local_38,js_promise_resolve_thenable_job,3,&local_98); JS_FreeValue(local_38,uVar3,uVar4); goto LAB_00153dd7; } JS_FreeValue(local_38,uVar3,uVar4); goto LAB_00153d00; } } else { JS_ThrowTypeError(local_38,"promise self resolution"); } auVar5 = JS_GetException(local_38); reject_promise(local_38,*local_50,local_50[1],auVar5._0_8_,auVar5._8_8_); JS_FreeValue(local_38,auVar5._0_8_,auVar5._8_8_); } else { LAB_00153d00: fulfill_or_reject_promise(local_38,*local_50,local_50[1],local_60,local_58,iVar1); } LAB_00153dd7: auVar5._8_8_ = 3; auVar5._0_8_ = (ulong)uStack_c << 0x20; return auVar5; }
32,391
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O1
c
js_promise_resolve_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x365dd movq 0x10(%r13), %rax cmpl $0x0, 0x4(%rax) jne 0x365dd movq %rdi, %rbx movl $0x1, 0x4(%rax) movzwl 0x6(%rsi), %ebp addl $-0x32, %ebp testl %r9d, %r9d jle 0x364bc movq 0x90(%rsp), %rax movq (%rax), %rcx movq 0x8(%rax), %r14 movabsq $-0x100000000, %r15 # imm = 0xFFFFFFFF00000000 andq %rcx, %r15 movl %ecx, %eax jmp 0x364c7 movl $0x3, %r14d xorl %eax, %eax xorl %r15d, %r15d testl %ebp, %ebp jne 0x365c1 cmpl $-0x1, %r14d jne 0x365c1 movq %r15, %r12 orq %rax, %r12 movq (%r13), %rcx movq 0x8(%r13), %r8 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movq %rax, 0x18(%rsp) callq 0x26461 testl %eax, %eax je 0x36511 leaq 0x69e01(%rip), %rsi # 0xa0306 movq %rbx, %rdi xorl %eax, %eax callq 0x22567 jmp 0x36540 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movl $0x80, %ecx movq %r12, 0x10(%rsp) movq %r12, %r8 movq %r14, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rdx, %r12 cmpl $0x6, %r12d jne 0x36594 movq 0x18(%rbx), %rax movq 0xf0(%rax), %r14 movq 0xf8(%rax), %r15 movl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r14, %rcx movq %r15, %r8 movl $0x1, %r9d callq 0x52d02 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1d8c6 jmp 0x365dd movq %rbx, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %r12, %rdx callq 0x22dbe testl %eax, %eax jne 0x365f3 movq 0x18(%rbx), %rdi movq 0x8(%rsp), %rsi movq %r12, %rdx callq 0x1d8c6 movq 0x18(%rsp), %rax movq (%r13), %rsi movq 0x8(%r13), %rdx orq %rax, %r15 movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 movl %ebp, %r9d callq 0x52d02 movl $0x3, %edx xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%r13), %xmm0 leaq 0x20(%rsp), %rcx movaps %xmm0, (%rcx) movq 0x10(%rsp), %rax movq %rax, 0x10(%rcx) movq %r14, 0x18(%rcx) movq 0x8(%rsp), %r14 movq %r14, 0x20(%rcx) movq %r12, 0x28(%rcx) leaq 0x1c8ba(%rip), %rsi # 0x52edb movq %rbx, %rdi movl $0x3, %edx callq 0xf01c movq 0x18(%rbx), %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x3658d
js_promise_resolve_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r13, [rsi+30h] test r13, r13 jz loc_365DD mov rax, [r13+10h] cmp dword ptr [rax+4], 0 jnz loc_365DD mov rbx, rdi mov dword ptr [rax+4], 1 movzx ebp, word ptr [rsi+6] add ebp, 0FFFFFFCEh test r9d, r9d jle short loc_364BC mov rax, [rsp+88h+arg_0] mov rcx, [rax] mov r14, [rax+8] mov r15, 0FFFFFFFF00000000h and r15, rcx mov eax, ecx jmp short loc_364C7 loc_364BC: mov r14d, 3 xor eax, eax xor r15d, r15d loc_364C7: test ebp, ebp jnz loc_365C1 cmp r14d, 0FFFFFFFFh jnz loc_365C1 mov r12, r15 or r12, rax mov rcx, [r13+0] mov r8, [r13+8] mov rdi, rbx mov rsi, r12 mov rdx, r14 mov [rsp+88h+var_70], rax call js_same_value test eax, eax jz short loc_36511 lea rsi, aPromiseSelfRes; "promise self resolution" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_36540 loc_36511: mov rdi, rbx mov rsi, r12 mov rdx, r14 mov ecx, 80h mov [rsp+88h+var_78], r12 mov r8, r12 mov r9, r14 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rdx cmp r12d, 6 jnz short loc_36594 loc_36540: mov rax, [rbx+18h] mov r14, [rax+0F0h] mov r15, [rax+0F8h] mov dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r14 mov r8, r15 mov r9d, 1 call fulfill_or_reject_promise mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r15 loc_3658D: call JS_FreeValueRT jmp short loc_365DD loc_36594: mov rdi, rbx mov [rsp+88h+var_80], rax mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jnz short loc_365F3 mov rdi, [rbx+18h] mov rsi, [rsp+88h+var_80] mov rdx, r12 call JS_FreeValueRT mov rax, [rsp+88h+var_70] loc_365C1: mov rsi, [r13+0] mov rdx, [r13+8] or r15, rax mov rdi, rbx mov rcx, r15 mov r8, r14 mov r9d, ebp call fulfill_or_reject_promise loc_365DD: mov edx, 3 xor eax, eax add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_365F3: movups xmm0, xmmword ptr [r13+0] lea rcx, [rsp+88h+var_68] movaps xmmword ptr [rcx], xmm0 mov rax, [rsp+88h+var_78] mov [rcx+10h], rax mov [rcx+18h], r14 mov r14, [rsp+88h+var_80] mov [rcx+20h], r14 mov [rcx+28h], r12 lea rsi, js_promise_resolve_thenable_job mov rdi, rbx mov edx, 3 call JS_EnqueueJob mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r12 jmp loc_3658D
long long js_promise_resolve_function_call( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, int a14, _QWORD *a15) { _QWORD *v15; // r13 long long v16; // rax unsigned int v17; // ebp long long v18; // r14 unsigned long long v19; // r15 long long v20; // rax long long v21; // r12 long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 unsigned long long PropertyInternal2; // rax long long v29; // rdx long long v30; // r12 long long v31; // rax _DWORD *v32; // r14 long long v33; // r15 long long v34; // rdi _DWORD *v35; // rsi long long v36; // rdx char v38; // [rsp+0h] [rbp-88h] _DWORD *v39; // [rsp+8h] [rbp-80h] long long v40; // [rsp+10h] [rbp-78h] long long v41; // [rsp+18h] [rbp-70h] __int128 v42; // [rsp+20h] [rbp-68h] BYREF long long v43; // [rsp+30h] [rbp-58h] long long v44; // [rsp+38h] [rbp-50h] _DWORD *v45; // [rsp+40h] [rbp-48h] long long v46; // [rsp+48h] [rbp-40h] v15 = *(_QWORD **)(a2 + 48); if ( v15 ) { v16 = v15[2]; if ( !*(_DWORD *)(v16 + 4) ) { *(_DWORD *)(v16 + 4) = 1; v17 = *(unsigned __int16 *)(a2 + 6) - 50; if ( a14 <= 0 ) { v18 = 3LL; v20 = 0LL; v19 = 0LL; } else { v18 = a15[1]; v19 = *a15 & 0xFFFFFFFF00000000LL; v20 = (unsigned int)*a15; } if ( *(_WORD *)(a2 + 6) == 50 && (_DWORD)v18 == -1 ) { v21 = v20 | v19; v41 = v20; if ( (unsigned int)js_same_value(a1, (_DWORD *)(v20 | v19), v18, (_DWORD *)*v15, v15[1]) ) { JS_ThrowTypeError( a1, (long long)"promise self resolution", v22, v23, v24, v25, a3, a4, a5, a6, v26, v27, a9, a10, v38); LABEL_11: v31 = *(_QWORD *)(a1 + 24); v32 = *(_DWORD **)(v31 + 240); v33 = *(_QWORD *)(v31 + 248); *(_DWORD *)(v31 + 240) = 0; *(_QWORD *)(v31 + 248) = 4LL; fulfill_or_reject_promise(a1, *v15, v15[1], v32, v33, 1LL); v34 = *(_QWORD *)(a1 + 24); v35 = v32; v36 = v33; LABEL_12: JS_FreeValueRT(v34, v35, v36); return 0LL; } v40 = v21; PropertyInternal2 = JS_GetPropertyInternal2(a1, v21, v18, 0x80u, v21, v18, 0LL, 0); v30 = v29; if ( (_DWORD)v29 == 6 ) goto LABEL_11; v39 = (_DWORD *)PropertyInternal2; if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v29) ) { v42 = *(_OWORD *)v15; v43 = v40; v44 = v18; v45 = v39; v46 = v30; JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3, (long long)&v42); v34 = *(_QWORD *)(a1 + 24); v35 = v39; v36 = v30; goto LABEL_12; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v30); v20 = v41; } fulfill_or_reject_promise(a1, *v15, v15[1], v20 | v19, v18, v17); } } return 0LL; }
32,392
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O2
c
js_promise_resolve_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x2fc88 movq 0x10(%r13), %rax cmpl $0x0, 0x4(%rax) jne 0x2fc88 movq %rdi, %rbx movl $0x1, 0x4(%rax) movzwl 0x6(%rsi), %ebp addl $-0x32, %ebp testl %r9d, %r9d jle 0x2fb5e movq 0x80(%rsp), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 jmp 0x2fb65 pushq $0x3 popq %r14 xorl %r15d, %r15d movl %r14d, %eax notl %eax orl %ebp, %eax jne 0x2fc6f movq (%r13), %rcx movq 0x8(%r13), %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1ff32 testl %eax, %eax je 0x2fb9f leaq 0x576ad(%rip), %rsi # 0x87240 movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x2fbbb movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x80, %ecx callq 0x1b043 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x2fc09 movq 0x18(%rbx), %rax movq 0xf0(%rax), %r14 movq 0xf8(%rax), %r15 andl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx pushq $0x1 popq %r9 movq %rbx, %rdi movq %r14, %rcx movq %r15, %r8 callq 0x47072 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1801e jmp 0x2fc88 movq %rbx, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %r12, %rdx callq 0x1ce7d testl %eax, %eax je 0x2fc5f movups (%r13), %xmm0 leaq 0x10(%rsp), %rcx movaps %xmm0, (%rcx) movq %r15, 0x10(%rcx) movq %r14, 0x18(%rcx) movq 0x8(%rsp), %r14 movq %r14, 0x20(%rcx) movq %r12, 0x28(%rcx) leaq 0x175ed(%rip), %rsi # 0x47236 pushq $0x3 popq %rdx movq %rbx, %rdi callq 0x17ea9 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x2fc02 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r12, %rdx callq 0x1801e movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 movl %ebp, %r9d callq 0x47072 pushq $0x3 popq %rdx xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_resolve_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, [rsi+30h] test r13, r13 jz loc_2FC88 mov rax, [r13+10h] cmp dword ptr [rax+4], 0 jnz loc_2FC88 mov rbx, rdi mov dword ptr [rax+4], 1 movzx ebp, word ptr [rsi+6] add ebp, 0FFFFFFCEh test r9d, r9d jle short loc_2FB5E mov rax, [rsp+78h+arg_0] mov r15, [rax] mov r14, [rax+8] jmp short loc_2FB65 loc_2FB5E: push 3 pop r14 xor r15d, r15d loc_2FB65: mov eax, r14d not eax or eax, ebp jnz loc_2FC6F mov rcx, [r13+0] mov r8, [r13+8] mov rdi, rbx mov rsi, r15 mov rdx, r14 call js_same_value test eax, eax jz short loc_2FB9F lea rsi, aPromiseSelfRes; "promise self resolution" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_2FBBB loc_2FB9F: mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, 80h call JS_GetProperty mov r12, rdx cmp r12d, 6 jnz short loc_2FC09 loc_2FBBB: mov rax, [rbx+18h] mov r14, [rax+0F0h] mov r15, [rax+0F8h] and dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 mov rsi, [r13+0] mov rdx, [r13+8] push 1 pop r9 mov rdi, rbx mov rcx, r14 mov r8, r15 call fulfill_or_reject_promise mov rdi, rbx mov rsi, r14 mov rdx, r15 loc_2FC02: call JS_FreeValue jmp short loc_2FC88 loc_2FC09: mov rdi, rbx mov [rsp+78h+var_70], rax mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jz short loc_2FC5F movups xmm0, xmmword ptr [r13+0] lea rcx, [rsp+78h+var_68] movaps xmmword ptr [rcx], xmm0 mov [rcx+10h], r15 mov [rcx+18h], r14 mov r14, [rsp+78h+var_70] mov [rcx+20h], r14 mov [rcx+28h], r12 lea rsi, js_promise_resolve_thenable_job push 3 pop rdx mov rdi, rbx call JS_EnqueueJob mov rdi, rbx mov rsi, r14 mov rdx, r12 jmp short loc_2FC02 loc_2FC5F: mov rdi, rbx mov rsi, [rsp+78h+var_70] mov rdx, r12 call JS_FreeValue loc_2FC6F: mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r15 mov r8, r14 mov r9d, ebp call fulfill_or_reject_promise loc_2FC88: push 3 pop rdx xor eax, eax add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_promise_resolve_function_call( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, int a14, long long a15) { _QWORD *v15; // r13 long long v16; // rax unsigned int v17; // ebp _DWORD *v18; // r15 long long v19; // r14 long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long Property; // rax long long v27; // rdx long long v28; // r12 long long v29; // rax long long v30; // r14 long long v31; // r15 long long v32; // rsi long long v33; // rdx char v35; // [rsp+0h] [rbp-78h] long long v36; // [rsp+8h] [rbp-70h] __int128 v37; // [rsp+10h] [rbp-68h] BYREF _DWORD *v38; // [rsp+20h] [rbp-58h] long long v39; // [rsp+28h] [rbp-50h] long long v40; // [rsp+30h] [rbp-48h] long long v41; // [rsp+38h] [rbp-40h] v15 = *(_QWORD **)(a2 + 48); if ( v15 ) { v16 = v15[2]; if ( !*(_DWORD *)(v16 + 4) ) { *(_DWORD *)(v16 + 4) = 1; v17 = *(unsigned __int16 *)(a2 + 6) - 50; if ( a14 <= 0 ) { v19 = 3LL; v18 = 0LL; } else { v18 = *(_DWORD **)a15; v19 = *(_QWORD *)(a15 + 8); } if ( !(v17 | ~(_DWORD)v19) ) { if ( (unsigned int)js_same_value(a1, v18, v19, (_DWORD *)*v15, v15[1]) ) { JS_ThrowTypeError( a1, (long long)"promise self resolution", v20, v21, v22, v23, a3, a4, a5, a6, v24, v25, a9, a10, v35); LABEL_10: v29 = *(_QWORD *)(a1 + 24); v30 = *(_QWORD *)(v29 + 240); v31 = *(_QWORD *)(v29 + 248); *(_DWORD *)(v29 + 240) = 0; *(_QWORD *)(v29 + 248) = 4LL; fulfill_or_reject_promise(a1, *v15, v15[1], v30, v31, 1LL); v32 = v30; v33 = v31; LABEL_11: JS_FreeValue(a1, v32, v33); return 0LL; } Property = JS_GetProperty(a1, (int)v18, v19, 128); v28 = v27; if ( (_DWORD)v27 == 6 ) goto LABEL_10; v36 = Property; if ( (unsigned int)JS_IsFunction(a1, Property, v27) ) { v37 = *(_OWORD *)v15; v38 = v18; v39 = v19; v40 = v36; v41 = v28; JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3u, (long long)&v37); v32 = v36; v33 = v28; goto LABEL_11; } JS_FreeValue(a1, v36, v28); } fulfill_or_reject_promise(a1, *v15, v15[1], v18, v19, v17); } } return 0LL; }
js_promise_resolve_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,qword ptr [RSI + 0x30] TEST R13,R13 JZ 0x0012fc88 MOV RAX,qword ptr [R13 + 0x10] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x0012fc88 MOV RBX,RDI MOV dword ptr [RAX + 0x4],0x1 MOVZX EBP,word ptr [RSI + 0x6] ADD EBP,-0x32 TEST R9D,R9D JLE 0x0012fb5e MOV RAX,qword ptr [RSP + 0x80] MOV R15,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] JMP 0x0012fb65 LAB_0012fb5e: PUSH 0x3 POP R14 XOR R15D,R15D LAB_0012fb65: MOV EAX,R14D NOT EAX OR EAX,EBP JNZ 0x0012fc6f MOV RCX,qword ptr [R13] MOV R8,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011ff32 TEST EAX,EAX JZ 0x0012fb9f LEA RSI,[0x187240] MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d JMP 0x0012fbbb LAB_0012fb9f: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,0x80 CALL 0x0011b043 MOV R12,RDX CMP R12D,0x6 JNZ 0x0012fc09 LAB_0012fbbb: MOV RAX,qword ptr [RBX + 0x18] MOV R14,qword ptr [RAX + 0xf0] MOV R15,qword ptr [RAX + 0xf8] AND dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] PUSH 0x1 POP R9 MOV RDI,RBX MOV RCX,R14 MOV R8,R15 CALL 0x00147072 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 LAB_0012fc02: CALL 0x0011801e JMP 0x0012fc88 LAB_0012fc09: MOV RDI,RBX MOV qword ptr [RSP + 0x8],RAX MOV RSI,RAX MOV RDX,R12 CALL 0x0011ce7d TEST EAX,EAX JZ 0x0012fc5f MOVUPS XMM0,xmmword ptr [R13] LEA RCX,[RSP + 0x10] MOVAPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],R15 MOV qword ptr [RCX + 0x18],R14 MOV R14,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x20],R14 MOV qword ptr [RCX + 0x28],R12 LEA RSI,[0x147236] PUSH 0x3 POP RDX MOV RDI,RBX CALL 0x00117ea9 MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 JMP 0x0012fc02 LAB_0012fc5f: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R12 CALL 0x0011801e LAB_0012fc6f: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RCX,R15 MOV R8,R14 MOV R9D,EBP CALL 0x00147072 LAB_0012fc88: PUSH 0x3 POP RDX XOR EAX,EAX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_resolve_function_call(long param_1,long param_2) { int8 *puVar1; long lVar2; int iVar3; int iVar4; int in_R9D; int8 uVar5; int8 uVar6; int1 auVar7 [16]; int8 *in_stack_00000008; puVar1 = *(int8 **)(param_2 + 0x30); if ((puVar1 == (int8 *)0x0) || (*(int *)(puVar1[2] + 4) != 0)) goto LAB_0012fc88; *(int4 *)(puVar1[2] + 4) = 1; iVar4 = *(ushort *)(param_2 + 6) - 0x32; if (in_R9D < 1) { uVar5 = 3; uVar6 = 0; } else { uVar6 = *in_stack_00000008; uVar5 = in_stack_00000008[1]; } if ((int)uVar5 != -1 || iVar4 != 0) { LAB_0012fc6f: fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,iVar4); goto LAB_0012fc88; } iVar3 = js_same_value(param_1,uVar6,uVar5,*puVar1,puVar1[1]); if (iVar3 == 0) { auVar7 = JS_GetProperty(param_1,uVar6,uVar5,0x80); if (auVar7._8_4_ == 6) goto LAB_0012fbbb; iVar3 = JS_IsFunction(param_1,auVar7._0_8_,auVar7._8_8_); if (iVar3 == 0) { JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); goto LAB_0012fc6f; } JS_EnqueueJob(param_1,js_promise_resolve_thenable_job,3); } else { JS_ThrowTypeError(param_1,"promise self resolution"); LAB_0012fbbb: lVar2 = *(long *)(param_1 + 0x18); uVar6 = *(int8 *)*(int1 (*) [16])(lVar2 + 0xf0); uVar5 = *(int8 *)(lVar2 + 0xf8); auVar7 = *(int1 (*) [16])(lVar2 + 0xf0); *(int4 *)(lVar2 + 0xf0) = 0; *(int8 *)(lVar2 + 0xf8) = 4; fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,1); } JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); LAB_0012fc88: return ZEXT816(3) << 0x40; }
32,393
ggml_easy::ctx::set_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*)
ngxson[P]ggml-easy/ggml-easy.h
void set_tensor_data(const std::string & name, const void * data) { ggml_tensor * t = ggml_get_tensor(ctx_gf, name.c_str()); if (!t) { throw std::runtime_error(string_format("tensor not found: %s", name.c_str())); } ggml_backend_tensor_set(t, data, 0, ggml_nbytes(t)); }
O1
c
ggml_easy::ctx::set_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %r14 movq 0x48(%rdi), %rdi movq (%rsi), %rsi callq 0x45a0 testq %rax, %rax je 0x8634 movq %rax, %r15 movq %rax, %rdi callq 0x4090 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x42b0 movl $0x10, %edi callq 0x4250 movq %rax, %rbx movq (%r14), %rdx leaq 0x3e96(%rip), %rsi # 0xc4e1 leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x5b59 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x4670 xorl %ebp, %ebp movq 0x8980(%rip), %rsi # 0x10ff0 movq 0x8951(%rip), %rdx # 0x10fc8 movq %rbx, %rdi callq 0x46e0 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x86a5 movq 0x18(%rsp), %rsi incq %rsi callq 0x4460 jmp 0x86a5 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x86b2 movq %rbx, %rdi callq 0x4360 movq %r14, %rdi callq 0x4730
_ZN9ggml_easy3ctx15set_tensor_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKv: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, rdx mov r14, rsi mov rdi, [rdi+48h] mov rsi, [rsi] call _ggml_get_tensor test rax, rax jz short loc_8634 mov r15, rax mov rdi, rax call _ggml_nbytes mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax add rsp, 28h pop rbx pop r14 pop r15 pop rbp jmp _ggml_backend_tensor_set loc_8634: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aWeightTensorNo+7; "tensor not found: %s" lea rdi, [rsp+48h+var_40] xor eax, eax call _ZN9ggml_easy13string_formatB5cxx11EPKcz; ggml_easy::string_format(char const*,...) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_86A5 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_86A5 mov r14, rax mov bpl, 1 loc_86A5: test bpl, bpl jz short loc_86B2 mov rdi, rbx; void * call ___cxa_free_exception loc_86B2: mov rdi, r14 call __Unwind_Resume
long long ggml_easy::ctx::set_tensor_data( long long a1, long long *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long tensor; // rax long long v13; // r15 long long v14; // rax void *exception; // rbx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 char v22; // [rsp+0h] [rbp-48h] long long v23; // [rsp+8h] [rbp-40h] BYREF tensor = ggml_get_tensor(*(_QWORD *)(a1 + 72), *a2); if ( !tensor ) { exception = __cxa_allocate_exception(0x10uLL); ggml_easy::string_format[abi:cxx11]( &v23, (long long)"tensor not found: %s", *a2, v17, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11, v22); std::runtime_error::runtime_error(exception); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = tensor; v14 = ggml_nbytes(tensor); return ggml_backend_tensor_set(v13, a3, 0LL, v14); }
set_tensor_data: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RSI MOV RDI,qword ptr [RDI + 0x48] MOV RSI,qword ptr [RSI] CALL 0x001045a0 TEST RAX,RAX JZ 0x00108634 MOV R15,RAX MOV RDI,RAX CALL 0x00104090 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP JMP 0x001042b0 LAB_00108634: MOV EDI,0x10 CALL 0x00104250 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_00108644: LEA RSI,[0x10c4e1] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x00105b59 MOV BPL,0x1 LAB_0010865a: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00104670 XOR EBP,EBP MOV RSI,qword ptr [0x00110ff0] MOV RDX,qword ptr [0x00110fc8] MOV RDI,RBX CALL 0x001046e0
/* ggml_easy::ctx::set_tensor_data(std::__cxx11::string const&, void const*) */ void __thiscall ggml_easy::ctx::set_tensor_data(ctx *this,string *param_1,void *param_2) { long lVar1; int8 uVar2; runtime_error *this_00; string local_40 [32]; lVar1 = ggml_get_tensor(*(int8 *)(this + 0x48),*(int8 *)param_1); if (lVar1 != 0) { uVar2 = ggml_nbytes(lVar1); ggml_backend_tensor_set(lVar1,param_2,0,uVar2); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00108644 to 00108656 has its CatchHandler @ 0010869f */ string_format_abi_cxx11_((char *)local_40,"tensor not found: %s",*(int8 *)param_1); /* try { // try from 0010865a to 0010867e has its CatchHandler @ 0010867f */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00110ff0,PTR__runtime_error_00110fc8); }
32,394
ggml_easy::ctx::set_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*)
ngxson[P]ggml-easy/ggml-easy.h
void set_tensor_data(const std::string & name, const void * data) { ggml_tensor * t = ggml_get_tensor(ctx_gf, name.c_str()); if (!t) { throw std::runtime_error(string_format("tensor not found: %s", name.c_str())); } ggml_backend_tensor_set(t, data, 0, ggml_nbytes(t)); }
O2
c
ggml_easy::ctx::set_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %r14 movq 0x48(%rdi), %rdi movq (%rsi), %rsi callq 0x5590 testq %rax, %rax je 0x87c0 movq %rax, %r15 movq %rax, %rdi callq 0x5090 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x52c0 pushq $0x10 popq %rdi callq 0x5260 movq %rax, %rbx movq (%r14), %rdx leaq 0x3ccc(%rip), %rsi # 0xc4a1 leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x64ab movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x5670 xorl %ebp, %ebp movq 0x97f6(%rip), %rsi # 0x11ff0 movq 0x97bf(%rip), %rdx # 0x11fc0 movq %rbx, %rdi callq 0x56e0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x5210 testb %bpl, %bpl jne 0x8820 jmp 0x8828 movq %rax, %r14 movq %rbx, %rdi callq 0x5370 movq %r14, %rdi callq 0x5720
_ZN9ggml_easy3ctx15set_tensor_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKv: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, rdx mov r14, rsi mov rdi, [rdi+48h] mov rsi, [rsi] call _ggml_get_tensor test rax, rax jz short loc_87C0 mov r15, rax mov rdi, rax call _ggml_nbytes mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax add rsp, 28h pop rbx pop r14 pop r15 pop rbp jmp _ggml_backend_tensor_set loc_87C0: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aWeightTensorNo+7; "tensor not found: %s" lea rdi, [rsp+48h+var_40] xor eax, eax call _ZN9ggml_easy13string_formatB5cxx11EPKcz; ggml_easy::string_format(char const*,...) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_8820 jmp short loc_8828 mov r14, rax loc_8820: mov rdi, rbx; void * call ___cxa_free_exception loc_8828: mov rdi, r14 call __Unwind_Resume
long long ggml_easy::ctx::set_tensor_data( long long a1, long long *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long tensor; // rax long long v13; // r15 long long v14; // rax void *exception; // rbx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 char v22; // [rsp+0h] [rbp-48h] _QWORD v23[8]; // [rsp+8h] [rbp-40h] BYREF tensor = ggml_get_tensor(*(_QWORD *)(a1 + 72), *a2); if ( !tensor ) { exception = __cxa_allocate_exception(0x10uLL); ggml_easy::string_format[abi:cxx11]( v23, (long long)"tensor not found: %s", *a2, v17, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11, v22); std::runtime_error::runtime_error(exception, v23); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = tensor; v14 = ggml_nbytes(tensor); return ggml_backend_tensor_set(v13, a3, 0LL, v14); }
set_tensor_data: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RSI MOV RDI,qword ptr [RDI + 0x48] MOV RSI,qword ptr [RSI] CALL 0x00105590 TEST RAX,RAX JZ 0x001087c0 MOV R15,RAX MOV RDI,RAX CALL 0x00105090 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP JMP 0x001052c0 LAB_001087c0: PUSH 0x10 POP RDI CALL 0x00105260 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001087ce: LEA RSI,[0x10c4a1] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x001064ab MOV BPL,0x1 LAB_001087e4: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00105670 XOR EBP,EBP MOV RSI,qword ptr [0x00111ff0] MOV RDX,qword ptr [0x00111fc0] MOV RDI,RBX CALL 0x001056e0
/* ggml_easy::ctx::set_tensor_data(std::__cxx11::string const&, void const*) */ void __thiscall ggml_easy::ctx::set_tensor_data(ctx *this,string *param_1,void *param_2) { long lVar1; int8 uVar2; runtime_error *this_00; string local_40 [32]; lVar1 = ggml_get_tensor(*(int8 *)(this + 0x48),*(int8 *)param_1); if (lVar1 != 0) { uVar2 = ggml_nbytes(lVar1); ggml_backend_tensor_set(lVar1,param_2,0,uVar2); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001087ce to 001087e0 has its CatchHandler @ 0010881d */ string_format_abi_cxx11_((char *)local_40,"tensor not found: %s",*(int8 *)param_1); /* try { // try from 001087e4 to 00108808 has its CatchHandler @ 00108809 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00111ff0,PTR__runtime_error_00111fc0); }
32,395
flush_simple_key_cache_blocks
eloqsql/mysys/mf_keycache.c
static int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache, File file, void *file_extra __attribute__((unused)), enum flush_type type) { int res= 0; DBUG_ENTER("flush_key_blocks"); DBUG_PRINT("enter", ("keycache: %p", keycache)); if (!keycache->key_cache_inited) DBUG_RETURN(0); keycache_pthread_mutex_lock(&keycache->cache_lock); /* While waiting for lock, keycache could have been ended. */ if (keycache->disk_blocks > 0) { inc_counter_for_resize_op(keycache); res= flush_key_blocks_int(keycache, file, type); dec_counter_for_resize_op(keycache); } keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_RETURN(res); }
O3
c
flush_simple_key_cache_blocks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx cmpb $0x0, (%rdi) je 0x99951 movl %ecx, %r15d movl %esi, %r12d movq %rdi, %r14 leaq 0xc0(%rdi), %rbx cmpq $0x0, 0x100(%rdi) jne 0x99979 movq %rbx, %rdi callq 0x29200 cmpl $0x0, 0x48(%r14) jle 0x99956 incq 0x70(%r14) movq %r14, %rdi movl %r12d, %esi movl %r15d, %edx callq 0x99d0e movl %eax, %r15d decq 0x70(%r14) jne 0x99959 leaq 0x110(%r14), %rdi callq 0x98819 jmp 0x99959 xorl %r15d, %r15d jmp 0x9996d xorl %r15d, %r15d movq 0x100(%r14), %rdi testq %rdi, %rdi jne 0x9998f movq %rbx, %rdi callq 0x291c0 movl %r15d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x42655(%rip), %rsi # 0xdbfd5 movq %rbx, %rdi movl $0x111a, %edx # imm = 0x111A callq 0x2eb6f jmp 0x99921 leaq 0x2ec67a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x99965
flush_simple_key_cache_blocks: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx cmp byte ptr [rdi], 0 jz short loc_99951 mov r15d, ecx mov r12d, esi mov r14, rdi lea rbx, [rdi+0C0h] cmp qword ptr [rdi+100h], 0 jnz short loc_99979 mov rdi, rbx call _pthread_mutex_lock loc_99921: cmp dword ptr [r14+48h], 0 jle short loc_99956 inc qword ptr [r14+70h] mov rdi, r14 mov esi, r12d mov edx, r15d call flush_key_blocks_int mov r15d, eax dec qword ptr [r14+70h] jnz short loc_99959 lea rdi, [r14+110h] call release_whole_queue jmp short loc_99959 loc_99951: xor r15d, r15d jmp short loc_9996D loc_99956: xor r15d, r15d loc_99959: mov rdi, [r14+100h] test rdi, rdi jnz short loc_9998F loc_99965: mov rdi, rbx call _pthread_mutex_unlock loc_9996D: mov eax, r15d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_99979: lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 111Ah call psi_mutex_lock jmp short loc_99921 loc_9998F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_99965
long long flush_simple_key_cache_blocks(long long a1, unsigned int a2, long long a3, unsigned int a4) { unsigned int v5; // r15d if ( *(_BYTE *)a1 ) { if ( *(_QWORD *)(a1 + 256) ) psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x111Au); else pthread_mutex_lock(a1 + 192); if ( *(int *)(a1 + 72) <= 0 ) { v5 = 0; } else { ++*(_QWORD *)(a1 + 112); v5 = flush_key_blocks_int(a1, a2, a4); if ( (*(_QWORD *)(a1 + 112))-- == 1LL ) release_whole_queue((long long *)(a1 + 272)); } if ( *(_QWORD *)(a1 + 256) ) PSI_server[44](); pthread_mutex_unlock(a1 + 192); } else { return 0; } return v5; }
flush_simple_key_cache_blocks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX CMP byte ptr [RDI],0x0 JZ 0x00199951 MOV R15D,ECX MOV R12D,ESI MOV R14,RDI LEA RBX,[RDI + 0xc0] CMP qword ptr [RDI + 0x100],0x0 JNZ 0x00199979 MOV RDI,RBX CALL 0x00129200 LAB_00199921: CMP dword ptr [R14 + 0x48],0x0 JLE 0x00199956 INC qword ptr [R14 + 0x70] MOV RDI,R14 MOV ESI,R12D MOV EDX,R15D CALL 0x00199d0e MOV R15D,EAX DEC qword ptr [R14 + 0x70] JNZ 0x00199959 LEA RDI,[R14 + 0x110] CALL 0x00198819 JMP 0x00199959 LAB_00199951: XOR R15D,R15D JMP 0x0019996d LAB_00199956: XOR R15D,R15D LAB_00199959: MOV RDI,qword ptr [R14 + 0x100] TEST RDI,RDI JNZ 0x0019998f LAB_00199965: MOV RDI,RBX CALL 0x001291c0 LAB_0019996d: MOV EAX,R15D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00199979: LEA RSI,[0x1dbfd5] MOV RDI,RBX MOV EDX,0x111a CALL 0x0012eb6f JMP 0x00199921 LAB_0019998f: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00199965
int4 flush_simple_key_cache_blocks (char *param_1,int4 param_2,int8 param_3,int4 param_4) { long *plVar1; pthread_mutex_t *__mutex; int4 uVar2; if (*param_1 == '\0') { uVar2 = 0; } else { __mutex = (pthread_mutex_t *)(param_1 + 0xc0); if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x111a); } if (*(int *)(param_1 + 0x48) < 1) { uVar2 = 0; } else { *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1; uVar2 = flush_key_blocks_int(param_1,param_2,param_4); plVar1 = (long *)(param_1 + 0x70); *plVar1 = *plVar1 + -1; if (*plVar1 == 0) { release_whole_queue(param_1 + 0x110); } } if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return uVar2; }
32,396
Query_cache::relink(Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*)
eloqsql/sql/sql_cache.cc
void Query_cache::relink(Query_cache_block *oblock, Query_cache_block *nblock, Query_cache_block *next, Query_cache_block *prev, Query_cache_block *pnext, Query_cache_block *pprev) { if (prev == oblock) //check pointer to himself { nblock->prev = nblock; nblock->next = nblock; } else { nblock->prev = prev; prev->next=nblock; } if (next != oblock) { nblock->next = next; next->prev=nblock; } nblock->pprev = pprev; // Physical pointer to himself have only 1 free block nblock->pnext = pnext; pprev->pnext=nblock; pnext->pprev=nblock; }
O0
cpp
Query_cache::relink(Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*, Query_cache_block*): pushq %rbp movq %rsp, %rbp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x964d34 movq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x20(%rax) jmp 0x964d4c movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x20(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x964d6e movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x28(%rax) movq 0x10(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x18(%rax) popq %rbp retq
_ZN11Query_cache6relinkEP17Query_cache_blockS1_S1_S1_S1_S1_: push rbp mov rbp, rsp mov rax, [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_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_28] cmp rax, [rbp+var_10] jnz short loc_964D34 mov rcx, [rbp+var_18] mov rax, [rbp+var_18] mov [rax+28h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_18] mov [rax+20h], rcx jmp short loc_964D4C loc_964D34: mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax+28h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+20h], rcx loc_964D4C: mov rax, [rbp+var_20] cmp rax, [rbp+var_10] jz short loc_964D6E mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax+20h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+28h], rcx loc_964D6E: mov rcx, [rbp+arg_0] mov rax, [rbp+var_18] mov [rax+18h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+arg_0] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+18h], rcx pop rbp retn
Query_cache_block * Query_cache::relink( Query_cache *this, Query_cache_block *a2, Query_cache_block *a3, Query_cache_block *a4, Query_cache_block *a5, Query_cache_block *a6, Query_cache_block *a7) { Query_cache_block *result; // rax if ( a5 == a2 ) { *((_QWORD *)a3 + 5) = a3; *((_QWORD *)a3 + 4) = a3; } else { *((_QWORD *)a3 + 5) = a5; *((_QWORD *)a5 + 4) = a3; } if ( a4 != a2 ) { *((_QWORD *)a3 + 4) = a4; *((_QWORD *)a4 + 5) = a3; } *((_QWORD *)a3 + 3) = a7; *((_QWORD *)a3 + 2) = a6; *((_QWORD *)a7 + 2) = a3; result = a6; *((_QWORD *)a6 + 3) = a3; return result; }
__relocate_a_1<std::pair<unsigned_int,unsigned_int>*,std::pair<unsigned_int,unsigned_int>*,std::allocator<std::pair<unsigned_int,unsigned_int>>>: 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 qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_00964d10: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JZ 0x00964d45 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00964d60 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x8 MOV qword ptr [RBP + -0x28],RAX JMP 0x00964d10 LAB_00964d45: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* std::pair<unsigned int, unsigned int>* std::__relocate_a_1<std::pair<unsigned int, unsigned int>*, std::pair<unsigned int, unsigned int>*, std::allocator<std::pair<unsigned int, unsigned int> > >(std::pair<unsigned int, unsigned int>*, std::pair<unsigned int, unsigned int>*, std::pair<unsigned int, unsigned int>*, std::allocator<std::pair<unsigned int, unsigned int> >&) */ pair * std:: __relocate_a_1<std::pair<unsigned_int,unsigned_int>*,std::pair<unsigned_int,unsigned_int>*,std::allocator<std::pair<unsigned_int,unsigned_int>>> (pair *param_1,pair *param_2,pair *param_3,allocator *param_4) { pair *local_30; pair *local_10; local_30 = param_3; for (local_10 = param_1; local_10 != param_2; local_10 = local_10 + 8) { __relocate_object_a<std::pair<unsigned_int,unsigned_int>,std::pair<unsigned_int,unsigned_int>,std::allocator<std::pair<unsigned_int,unsigned_int>>> (local_30,local_10,param_4); local_30 = local_30 + 8; } return local_30; }
32,397
ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/util.cpp
Component operator|(Component component, ElementDecorator decorator) { return component | Renderer(decorator); // NOLINT }
O2
cpp
ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>): pushq %r14 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x1341e leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x20dca leaq 0x38(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x26799 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x2b5d0 leaq 0x38(%rsp), %rdi callq 0x13b10 leaq 0x18(%rsp), %rdi callq 0x13b10 leaq 0x10(%rsp), %rdi callq 0x13452 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x13b10 jmp 0x2b6a4 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x13b10 jmp 0x2b6b3 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x13452 movq %rbx, %rdi callq 0xc7f0
_ZN5ftxuiorESt10shared_ptrINS_13ComponentBaseEESt8functionIFS0_INS_4NodeEES5_EE: push r14 push rbx sub rsp, 58h mov r14, rdx mov rbx, rdi lea rdi, [rsp+68h+var_60] call _ZNSt12__shared_ptrIN5ftxui13ComponentBaseELN9__gnu_cxx12_Lock_policyE2EEC2ERKS4_; std::__shared_ptr<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rsp+68h+var_50] mov rsi, r14 call _ZNSt8functionIFSt10shared_ptrIN5ftxui4NodeEES3_EEC2ERKS5_; std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::function(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)> const&) lea rdi, [rsp+68h+var_30] lea rsi, [rsp+68h+var_50] call _ZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEES3_EE; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>) lea rsi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_30] mov rdi, rbx call _ZN5ftxuiorESt10shared_ptrINS_13ComponentBaseEESt8functionIFS2_S2_EE; ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>,std::function<std::shared_ptr<ftxui::ComponentBase> ()(std::shared_ptr<ftxui::ComponentBase>)>) lea rdi, [rsp+68h+var_30]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+68h+var_50]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+68h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 58h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_30]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_2B6A4 mov rbx, rax loc_2B6A4: lea rdi, [rsp+arg_10]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_2B6B3 mov rbx, rax loc_2B6B3: lea rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
long long ftxui::operator|(long long a1, _QWORD *a2, long long a3) { long long v5; // [rsp+8h] [rbp-60h] BYREF long long v6; // [rsp+10h] [rbp-58h] BYREF _OWORD v7[2]; // [rsp+18h] [rbp-50h] BYREF _BYTE v8[48]; // [rsp+38h] [rbp-30h] BYREF std::__shared_ptr<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(&v5, a2); std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::function(v7, a3); ftxui::Renderer((long long)v8, (long long)v7); ftxui::operator|(a1, &v5, (long long)v8); std::_Function_base::~_Function_base((std::_Function_base *)v8); std::_Function_base::~_Function_base((std::_Function_base *)v7); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6); return a1; }
operator|: PUSH R14 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x0011341e LAB_0012b63b: LEA RDI,[RSP + 0x18] MOV RSI,R14 CALL 0x00120dca LAB_0012b648: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x18] CALL 0x00126799 LAB_0012b657: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x0012b5d0 LAB_0012b669: LEA RDI,[RSP + 0x38] CALL 0x00113b10 LEA RDI,[RSP + 0x18] CALL 0x00113b10 LEA RDI,[RSP + 0x10] CALL 0x00113452 MOV RAX,RBX ADD RSP,0x58 POP RBX POP R14 RET
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) */ ftxui * __thiscall ftxui::operator|(ftxui *this,__shared_ptr *param_2,function *param_3) { __shared_ptr<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2> local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8]; function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)> local_50 [32]; ftxui local_30 [32]; std::__shared_ptr<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(local_60,param_2) ; /* try { // try from 0012b63b to 0012b647 has its CatchHandler @ 0012b6b0 */ std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>::function (local_50,param_3); /* try { // try from 0012b648 to 0012b656 has its CatchHandler @ 0012b6a1 */ Renderer(local_30,local_50); /* try { // try from 0012b657 to 0012b668 has its CatchHandler @ 0012b692 */ operator|(this,local_60,local_30); std::_Function_base::~_Function_base((_Function_base *)local_30); std::_Function_base::~_Function_base((_Function_base *)local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); return this; }
32,398
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O0
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x95acd movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x95ab5 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x95b64 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x95b64 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x95aee movq -0x18(%rbp), %rcx leaq 0x8197e(%rip), %rax # 0x117460 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x95af7 movl $0x0, -0x4(%rbp) jmp 0x95b64 cmpl $0xff, -0x2c(%rbp) jg 0x95b27 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x95b13 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x95b64 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x95b64 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x95b3e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x95b64 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_wc_mb_cp932: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_95ACD mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_95AB5 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_95B64 loc_95AB5: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_95B64 loc_95ACD: cmp [rbp+var_18], 0FFFFh ja short loc_95AEE mov rcx, [rbp+var_18] lea rax, unicode_to_cp932 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_95AF7 loc_95AEE: mov [rbp+var_4], 0 jmp short loc_95B64 loc_95AF7: cmp [rbp+var_2C], 0FFh jg short loc_95B27 mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_95B13 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_95B64 loc_95B13: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_95B64 loc_95B27: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_95B3E mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_95B64 loc_95B3E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_95B64: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 ) { if ( unicode_to_cp932[a2] > 0xFFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_cp932: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x00195acd MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00195ab5 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00195b64 LAB_00195ab5: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00195b64 LAB_00195acd: CMP qword ptr [RBP + -0x18],0xffff JA 0x00195aee MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x217460] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x00195af7 LAB_00195aee: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00195b64 LAB_00195af7: CMP dword ptr [RBP + -0x2c],0xff JG 0x00195b27 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00195b13 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00195b64 LAB_00195b13: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00195b64 LAB_00195b27: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00195b3e MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00195b64 LAB_00195b3e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00195b64: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_cp932(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort uVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if ((param_2 < 0x10000) && (uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2), uVar1 != 0)) { if (uVar1 < 0x100) { if (param_3 < param_4) { *param_3 = (char)uVar1; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(uVar1 >> 8); param_3[1] = (char)uVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
32,399
R3D_SetShadowUpdateFrequency
r3d/src/r3d_lighting.c
void R3D_SetShadowUpdateFrequency(R3D_Light id, int msec) { r3d_get_and_check_light(light, id); light->shadow.updateConf.frequencySec = (float)msec / 1000; }
O3
c
R3D_SetShadowUpdateFrequency: pushq %rbp movq %rsp, %rbp movl %edi, %edx testl %edi, %edi je 0xbea35 leaq 0xf1225(%rip), %rax # 0x1afc20 cmpl %edx, 0x168(%rax) jbe 0xbea35 movq 0x128(%rax), %rdi leal -0x1(%rdx), %ecx cmpb $0x1, (%rdi,%rcx) jne 0xbea35 movq 0x108(%rax), %rdi cmpq %rcx, 0x110(%rax) setbe %r8b testq %rdi, %rdi sete %r9b orb %r8b, %r9b cmpb $0x1, %r9b jne 0xbea49 leaq 0x533a7(%rip), %rsi # 0x111de3 movl $0x5, %edi xorl %eax, %eax popq %rbp jmp 0xa9c29 imulq 0x120(%rax), %rcx cvtsi2ss %esi, %xmm0 divss 0x235a7(%rip), %xmm0 # 0xe2004 movss %xmm0, 0x4(%rdi,%rcx) popq %rbp retq
R3D_SetShadowUpdateFrequency: push rbp mov rbp, rsp mov edx, edi test edi, edi jz short loc_BEA35 lea rax, R3D cmp [rax+168h], edx jbe short loc_BEA35 mov rdi, [rax+128h] lea ecx, [rdx-1] cmp byte ptr [rdi+rcx], 1 jnz short loc_BEA35 mov rdi, [rax+108h] cmp [rax+110h], rcx setbe r8b test rdi, rdi setz r9b or r9b, r8b cmp r9b, 1 jnz short loc_BEA49 loc_BEA35: lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid" mov edi, 5 xor eax, eax pop rbp jmp TraceLog loc_BEA49: imul rcx, [rax+120h] cvtsi2ss xmm0, esi divss xmm0, cs:dword_E2004 movss dword ptr [rdi+rcx+4], xmm0 pop rbp retn
void R3D_SetShadowUpdateFrequency(unsigned int a1, int a2) { unsigned long long v3; // rcx long long v4; // rdi if ( a1 && *((_DWORD *)&R3D + 90) > a1 && (v3 = a1 - 1, *(_BYTE *)(*((_QWORD *)&R3D + 37) + v3) == 1) && (v4 = *((_QWORD *)&R3D + 33), *((_QWORD *)&R3D + 34) > v3 && v4 != 0) ) { *(float *)(v4 + *((_QWORD *)&R3D + 36) * v3 + 4) = (float)a2 / 1000.0; } else { TraceLog(5, (long long)"Light [ID %i] is not valid", a1); } }
R3D_SetShadowUpdateFrequency: PUSH RBP MOV RBP,RSP MOV EDX,EDI TEST EDI,EDI JZ 0x001bea35 LEA RAX,[0x2afc20] CMP dword ptr [RAX + 0x168],EDX JBE 0x001bea35 MOV RDI,qword ptr [RAX + 0x128] LEA ECX,[RDX + -0x1] CMP byte ptr [RDI + RCX*0x1],0x1 JNZ 0x001bea35 MOV RDI,qword ptr [RAX + 0x108] CMP qword ptr [RAX + 0x110],RCX SETBE R8B TEST RDI,RDI SETZ R9B OR R9B,R8B CMP R9B,0x1 JNZ 0x001bea49 LAB_001bea35: LEA RSI,[0x211de3] MOV EDI,0x5 XOR EAX,EAX POP RBP JMP 0x001a9c29 LAB_001bea49: IMUL RCX,qword ptr [RAX + 0x120] CVTSI2SS XMM0,ESI DIVSS XMM0,dword ptr [0x001e2004] MOVSS dword ptr [RDI + RCX*0x1 + 0x4],XMM0 POP RBP RET
void R3D_SetShadowUpdateFrequency(uint param_1,int param_2) { ulong uVar1; if (((param_1 != 0) && (param_1 < DAT_002afd88)) && (uVar1 = (ulong)(param_1 - 1), *(char *)(DAT_002afd48 + uVar1) == '\x01')) { if (DAT_002afd28 != 0 && uVar1 < DAT_002afd30) { *(float *)(DAT_002afd28 + 4 + uVar1 * DAT_002afd40) = (float)param_2 / DAT_001e2004; return; } } TraceLog(5,"Light [ID %i] is not valid"); return; }