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
15,500
httplib::ThreadPool::enqueue(std::function<void ()>)
hkr04[P]cpp-mcp/common/httplib.h
bool enqueue(std::function<void()> fn) override { { std::unique_lock<std::mutex> lock(mutex_); if (max_queued_requests_ > 0 && jobs_.size() >= max_queued_requests_) { return false; } jobs_.push_back(std::move(fn)); } cond_.notify_one(); return true; }
O3
c
httplib::ThreadPool::enqueue(std::function<void ()>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x78(%rdi), %rax leaq 0x8(%rsp), %r15 movq %rax, (%r15) movb $0x0, 0x8(%r15) movq %r15, %rdi callq 0x1f4b4 movb $0x1, 0x8(%r15) movq 0x30(%rbx), %r15 movq 0x40(%rbx), %r12 decq %r12 cmpq %r15, %r12 jb 0x41588 leaq 0x20(%rbx), %rdi movq %rdi, %rsi movq %r14, %rdx callq 0x41a66 leaq 0x8(%rsp), %rdi callq 0x1f49e addq $0x48, %rbx movq %rbx, %rdi callq 0xa310 jmp 0x41592 leaq 0x8(%rsp), %rdi callq 0x1f49e cmpq %r15, %r12 setae %al addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1f49e movq %rbx, %rdi callq 0xaa50 nop
_ZN7httplib10ThreadPool7enqueueESt8functionIFvvEE: push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi lea rax, [rdi+78h] lea r15, [rsp+38h+var_30] mov [r15], rax mov byte ptr [r15+8], 0 mov rdi, r15 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov byte ptr [r15+8], 1 mov r15, [rbx+30h] mov r12, [rbx+40h] dec r12 cmp r12, r15 jb short loc_41588 lea rdi, [rbx+20h] mov rsi, rdi mov rdx, r14 call _ZNSt7__cxx114listISt8functionIFvvEESaIS3_EE9_M_insertIJS3_EEEvSt14_List_iteratorIS3_EDpOT_; std::list<std::function<void ()(void)>>::_M_insert<std::function<void ()(void)>>(std::_List_iterator<std::function<void ()(void)>>,std::function<void ()(void)> &&) lea rdi, [rsp+38h+var_30] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() add rbx, 48h ; 'H' mov rdi, rbx; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) jmp short loc_41592 loc_41588: lea rdi, [rsp+38h+var_30] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() loc_41592: cmp r12, r15 setnb al add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov rdi, rbx call __Unwind_Resume
bool httplib::ThreadPool::enqueue(_QWORD *a1, long long a2) { unsigned long long v2; // r15 unsigned long long v3; // r12 _QWORD *v5; // [rsp+8h] [rbp-30h] BYREF char v6; // [rsp+10h] [rbp-28h] v5 = a1 + 15; v6 = 0; std::unique_lock<std::mutex>::lock((long long *)&v5); v6 = 1; v2 = a1[6]; v3 = a1[8] - 1LL; if ( v3 < v2 ) { std::unique_lock<std::mutex>::~unique_lock((long long)&v5); } else { std::list<std::function<void ()(void)>>::_M_insert<std::function<void ()(void)>>(a1 + 4, a1 + 4, a2); std::unique_lock<std::mutex>::~unique_lock((long long)&v5); std::condition_variable::notify_one((std::condition_variable *)(a1 + 9)); } return v3 >= v2; }
enqueue: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x78] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RAX MOV byte ptr [R15 + 0x8],0x0 MOV RDI,R15 CALL 0x0011f4b4 MOV byte ptr [R15 + 0x8],0x1 MOV R15,qword ptr [RBX + 0x30] MOV R12,qword ptr [RBX + 0x40] DEC R12 CMP R12,R15 JC 0x00141588 LEA RDI,[RBX + 0x20] LAB_00141565: MOV RSI,RDI MOV RDX,R14 CALL 0x00141a66 LAB_00141570: LEA RDI,[RSP + 0x8] CALL 0x0011f49e ADD RBX,0x48 MOV RDI,RBX CALL 0x0010a310 JMP 0x00141592 LAB_00141588: LEA RDI,[RSP + 0x8] CALL 0x0011f49e LAB_00141592: CMP R12,R15 SETNC AL ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* httplib::ThreadPool::enqueue(std::function<void ()>) */ bool __thiscall httplib::ThreadPool::enqueue(ThreadPool *this,int8 param_2) { ulong uVar1; long lVar2; ThreadPool *local_30; int1 local_28; local_30 = this + 0x78; local_28 = 0; std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_30); local_28 = 1; uVar1 = *(ulong *)(this + 0x30); lVar2 = *(long *)(this + 0x40); if (lVar2 - 1U < uVar1) { std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_30); } else { /* try { // try from 00141565 to 0014156f has its CatchHandler @ 001415a4 */ std::__cxx11::list<std::function<void()>,std::allocator<std::function<void()>>>:: _M_insert<std::function<void()>> ((list<std::function<void()>,std::allocator<std::function<void()>>> *)(this + 0x20), (list<std::function<void()>,std::allocator<std::function<void()>>> *)(this + 0x20), param_2); std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_30); std::condition_variable::notify_one(); } return uVar1 <= lVar2 - 1U; }
15,501
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O3
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, %rdi movl $0x2f, %esi movq $-0x1, %rdx callq 0x1b160 leaq 0x1(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi movq $-0x1, %rcx callq 0x1a940 leaq 0x28(%r15), %rdi movq %rbx, %rsi callq 0xc0450 leaq 0x30(%r15), %rcx cmpq %rcx, %rax jne 0xc32c9 leaq 0x90(%r15), %r12 movq %r12, %rdi movq %r14, %rsi callq 0xc54ea testq %rax, %rax jne 0xc32c9 leaq 0x18(%rsp), %rdx movq %r12, (%rdx) movq %r12, %rdi movq %r14, %rsi callq 0xb8764 leaq 0x58(%r15), %rdi movq %r14, %rsi callq 0xc5524 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x5d4a6 leaq 0x18(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0xc05d2 leaq 0x18(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x1aac0 movq (%r15), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0xc32a7 movq 0x28(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %r12, %rdi movq %r14, %rsi callq 0xc597a leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x58484 movq %r14, %rdi callq 0x5d972 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xc32da movq %rax, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x58484 movq %r15, %rdi callq 0x5d972 jmp 0xc32ff jmp 0xc32fc jmp 0xc32fc jmp 0xc32fc movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0xc3316 movq (%rbx), %rsi incq %rsi callq 0x1a8f0 movq %r14, %rdi callq 0x1afd0
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rdx mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdx, [rax+1] mov rdi, rbx mov rsi, r14 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [r15+28h] mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; 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>>>::find(std::string const&) lea rcx, [r15+30h] cmp rax, rcx jnz loc_C32C9 lea r12, [r15+90h] mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE4findERKS5_; 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>>::find(std::string const&) test rax, rax jnz loc_C32C9 lea rdx, [rsp+58h+var_40] mov [rdx], r12 mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>) lea rdi, [r15+58h] mov rsi, r14 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<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>,true>::operator[](std::string const&) lea rdi, [rsp+58h+var_50] mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_50] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&) lea r15, [rsp+58h+var_40] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * lea rax, [rsp+58h+var_30] cmp rdi, rax jz short loc_C32A7 mov rsi, [rsp+58h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C32A7: mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; 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>>::_M_erase(std::integral_constant<bool,true>,std::string const&) lea r14, [rsp+58h+var_50] 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() loc_C32C9: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_C32DA: mov r14, rax lea r15, [rsp+arg_0] 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() jmp short loc_C32FF jmp short loc_C32FC jmp short loc_C32FC jmp short $+2 loc_C32FC: mov r14, rax loc_C32FF: mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_C3316 mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C3316: mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4) { long long v5; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d unsigned __int8 *v10; // rax unsigned __int8 v12[16]; // [rsp+8h] [rbp-50h] BYREF void *v13[2]; // [rsp+18h] [rbp-40h] BYREF long long v14; // [rsp+28h] [rbp-30h] BYREF v5 = std::string::rfind(a3, 47LL, -1LL); std::string::substr(a1, a3, v5 + 1, -1LL); if ( 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>>>::find( a2 + 40, a1) == a2 + 48 && !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>>::find( a2 + 144, a3) ) { v13[0] = (void *)(a2 + 144); 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>( a2 + 144, a3, v13); v10 = (unsigned __int8 *)std::__detail::_Map_base<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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,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>,true>::operator[]( (int)a2 + 88, a3, v6, v7, v8, v9); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v12, v10); SchemaConverter::visit(v13, a2, (long long)v12, a1, a4); std::string::operator=(a1, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); 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>>::_M_erase( a2 + 144, 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((char *)v12); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v12); } return a1; }
_resolve_ref: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RDX MOV ESI,0x2f MOV RDX,-0x1 CALL 0x0011b160 LEA RDX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RCX,-0x1 CALL 0x0011a940 LEA RDI,[R15 + 0x28] LAB_001c320c: MOV RSI,RBX CALL 0x001c0450 LEA RCX,[R15 + 0x30] CMP RAX,RCX JNZ 0x001c32c9 LEA R12,[R15 + 0x90] LAB_001c3228: MOV RDI,R12 MOV RSI,R14 CALL 0x001c54ea TEST RAX,RAX JNZ 0x001c32c9 LEA RDX,[RSP + 0x18] MOV qword ptr [RDX],R12 LAB_001c3244: MOV RDI,R12 MOV RSI,R14 CALL 0x001b8764 LEA RDI,[R15 + 0x58] LAB_001c3253: MOV RSI,R14 CALL 0x001c5524 LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x0015d4a6 LAB_001c3268: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x001c05d2 LEA R15,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 CALL 0x0011aac0 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x001c32a7 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011a8f0 LAB_001c32a7: MOV RDI,R12 MOV RSI,R14 CALL 0x001c597a LAB_001c32b2: LEA R14,[RSP + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00158484 MOV RDI,R14 CALL 0x0015d972 LAB_001c32c9: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */ string * SchemaConverter::_resolve_ref(string *param_1) { _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *this; string *psVar1; long lVar2; basic_json *pbVar3; string *in_RDX; string *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_50 [16]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *local_40 [2]; long local_30 [2]; std::__cxx11::string::rfind((char)in_RDX,0x2f); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX); /* try { // try from 001c320c to 001c3213 has its CatchHandler @ 001c32fc */ psVar1 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(in_RSI + 0x28),param_1); if (psVar1 == in_RSI + 0x30) { this = (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(in_RSI + 0x90); /* try { // try from 001c3228 to 001c3232 has its CatchHandler @ 001c32fa */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::find(this,in_RDX); if (lVar2 == 0) { local_40[0] = this; /* try { // try from 001c3244 to 001c324e has its CatchHandler @ 001c32f6 */ std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> :: _M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>> (this); /* try { // try from 001c3253 to 001c3267 has its CatchHandler @ 001c32f8 */ pbVar3 = (basic_json *) std::__detail:: _Map_base<std::__cxx11::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(in_RSI + 0x58),in_RDX); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_50,pbVar3); /* try { // try from 001c3268 to 001c327c has its CatchHandler @ 001c32da */ visit((basic_json *)local_40,in_RSI); std::__cxx11::string::operator=(param_1,(string *)local_40); if (local_40[0] != (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)local_30) { operator_delete(local_40[0],local_30[0] + 1); } /* try { // try from 001c32a7 to 001c32b1 has its CatchHandler @ 001c32d8 */ std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::_M_erase(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_50); } } return param_1; }
15,502
maria_indexes_are_disabled
eloqsql/storage/maria/ma_open.c
int maria_indexes_are_disabled(MARIA_HA *info) { MARIA_SHARE *share= info->s; /* No keys or all are enabled. keys is the number of keys. Left shifted gives us only one bit set. When decreased by one, gives us all all bits up to this one set and it gets unset. */ if (!share->base.keys || (maria_is_all_keys_active(share->state.key_map, share->base.keys))) return 0; /* All are disabled */ if (maria_is_any_key_active(share->state.key_map)) return 1; /* We have keys. Some enabled, some disabled. Don't check for any non-unique disabled but return directly 2 */ return 2; }
O0
c
maria_indexes_are_disabled: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x3e8(%rax) je 0x95294 movq -0x18(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpl $0x40, 0x3e8(%rax) jae 0x9527a movq -0x18(%rbp), %rax movl 0x3e8(%rax), %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax subq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x95287 movq $-0x1, %rax movq %rax, -0x28(%rbp) jmp 0x95287 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx cmpq %rcx, %rax jne 0x9529d movl $0x0, -0x4(%rbp) jmp 0x952cb movq -0x18(%rbp), %rax cmpq $0x0, 0x140(%rax) je 0x952b3 movb $0x1, %al testb $0x1, %al jne 0x952bb jmp 0x952c4 xorl %eax, %eax testb $0x1, %al jne 0x952bb jmp 0x952c4 movl $0x1, -0x4(%rbp) jmp 0x952cb movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq
maria_indexes_are_disabled: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax+3E8h], 0 jz short loc_95294 mov rax, [rbp+var_18] mov rax, [rax+140h] mov [rbp+var_20], rax mov rax, [rbp+var_18] cmp dword ptr [rax+3E8h], 40h ; '@' jnb short loc_9527A mov rax, [rbp+var_18] mov eax, [rax+3E8h] mov ecx, eax mov eax, 1 shl rax, cl sub rax, 1 mov [rbp+var_28], rax jmp short loc_95287 loc_9527A: mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax jmp short $+2 loc_95287: mov rax, [rbp+var_20] mov rcx, [rbp+var_28] cmp rax, rcx jnz short loc_9529D loc_95294: mov [rbp+var_4], 0 jmp short loc_952CB loc_9529D: mov rax, [rbp+var_18] cmp qword ptr [rax+140h], 0 jz short loc_952B3 mov al, 1 test al, 1 jnz short loc_952BB jmp short loc_952C4 loc_952B3: xor eax, eax test al, 1 jnz short loc_952BB jmp short loc_952C4 loc_952BB: mov [rbp+var_4], 1 jmp short loc_952CB loc_952C4: mov [rbp+var_4], 2 loc_952CB: mov eax, [rbp+var_4] pop rbp retn
long long maria_indexes_are_disabled(long long *a1) { long long v2; // [rsp+0h] [rbp-28h] long long v3; // [rsp+10h] [rbp-18h] v3 = *a1; if ( *(_DWORD *)(*a1 + 1000) && (*(_DWORD *)(v3 + 1000) >= 0x40u ? (v2 = -1LL) : (v2 = (1LL << *(_DWORD *)(v3 + 1000)) - 1), *(_QWORD *)(v3 + 320) != v2) ) { if ( *(_QWORD *)(v3 + 320) ) return 1; else return 2; } else { return 0; } }
maria_indexes_are_disabled: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x3e8],0x0 JZ 0x00195294 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x3e8],0x40 JNC 0x0019527a MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x3e8] MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL SUB RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00195287 LAB_0019527a: MOV RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00195287 LAB_00195287: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] CMP RAX,RCX JNZ 0x0019529d LAB_00195294: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001952cb LAB_0019529d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x140],0x0 JZ 0x001952b3 MOV AL,0x1 TEST AL,0x1 JNZ 0x001952bb JMP 0x001952c4 LAB_001952b3: XOR EAX,EAX TEST AL,0x1 JNZ 0x001952bb JMP 0x001952c4 LAB_001952bb: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001952cb LAB_001952c4: MOV dword ptr [RBP + -0x4],0x2 LAB_001952cb: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001952b1) */ int4 maria_indexes_are_disabled(long *param_1) { long lVar1; long local_30; lVar1 = *param_1; if (*(int *)(lVar1 + 1000) != 0) { if (*(uint *)(lVar1 + 1000) < 0x40) { local_30 = (1L << ((byte)*(int4 *)(lVar1 + 1000) & 0x3f)) + -1; } else { local_30 = -1; } if (*(long *)(lVar1 + 0x140) != local_30) { if (*(long *)(lVar1 + 0x140) != 0) { return 1; } return 2; } } return 0; }
15,503
js_reflect_set
bluesky950520[P]quickjs/quickjs.c
static JSValue js_reflect_set(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, prop, val, receiver; int ret; JSAtom atom; obj = argv[0]; prop = argv[1]; val = argv[2]; if (argc > 3) receiver = argv[3]; else receiver = obj; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) return JS_EXCEPTION; ret = JS_SetPropertyInternal2(ctx, obj, atom, js_dup(val), receiver, 0, NULL); JS_FreeAtom(ctx, atom); if (ret < 0) return JS_EXCEPTION; else return js_bool(ret); }
O1
c
js_reflect_set: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movq (%r8), %rax movq 0x8(%r8), %r12 cmpl $0x4, %ecx jl 0x12ce3 movups 0x30(%r8), %xmm0 movaps %xmm0, 0x20(%rsp) jmp 0x12ced movq %rax, 0x20(%rsp) movq %r12, 0x28(%rsp) cmpl $-0x1, %r12d jne 0x12d7d movq %rax, 0x38(%rsp) movq 0x10(%r8), %rsi movq 0x18(%r8), %rdx movq 0x20(%r8), %r15 movq 0x28(%r8), %r13 movq %rbx, %rdi callq 0x280ef pushq $0x6 popq %r14 testl %eax, %eax je 0x12daa movl %eax, %ebp movq %r15, 0x40(%rsp) cmpl $-0x9, %r13d jb 0x12d34 movq 0x40(%rsp), %rax incl (%rax) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) andq $0x0, 0x18(%rsp) andl $0x0, 0x10(%rsp) movq %rbx, %rdi movq 0x38(%rsp), %rsi movq %r12, %rdx movl %ebp, %ecx movq %r15, %r8 movq %r13, %r9 callq 0x283e4 movl %eax, %r15d movq %rbx, %rdi movl %ebp, %esi callq 0x24834 testl %r15d, %r15d js 0x12daa setne %al movzbl %al, %r15d pushq $0x1 jmp 0x12d93 leaq 0x90519(%rip), %rsi # 0xa329d xorl %r15d, %r15d movq %rbx, %rdi xorl %eax, %eax callq 0x265c3 pushq $0x6 popq %r14 movq %r15, %rax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r15d, %r15d jmp 0x12d95
js_reflect_set: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi mov rax, [r8] mov r12, [r8+8] cmp ecx, 4 jl short loc_12CE3 movups xmm0, xmmword ptr [r8+30h] movaps [rsp+78h+var_58], xmm0 jmp short loc_12CED loc_12CE3: mov qword ptr [rsp+78h+var_58], rax mov qword ptr [rsp+78h+var_58+8], r12 loc_12CED: cmp r12d, 0FFFFFFFFh jnz loc_12D7D mov [rsp+78h+var_40], rax mov rsi, [r8+10h] mov rdx, [r8+18h] mov r15, [r8+20h] mov r13, [r8+28h] mov rdi, rbx call JS_ValueToAtom push 6 pop r14 test eax, eax jz loc_12DAA mov ebp, eax mov [rsp+78h+var_38], r15 cmp r13d, 0FFFFFFF7h jb short loc_12D34 mov rax, [rsp+78h+var_38] inc dword ptr [rax] loc_12D34: movaps xmm0, [rsp+78h+var_58] movups [rsp+78h+var_78], xmm0 and [rsp+78h+var_60], 0 and [rsp+78h+var_68], 0 mov rdi, rbx mov rsi, [rsp+78h+var_40] mov rdx, r12 mov ecx, ebp mov r8, r15 mov r9, r13 call JS_SetPropertyInternal2 mov r15d, eax mov rdi, rbx mov esi, ebp call JS_FreeAtom test r15d, r15d js short loc_12DAA setnz al movzx r15d, al push 1 jmp short loc_12D93 loc_12D7D: lea rsi, aOperandPrototy+20h; "not an object" xor r15d, r15d mov rdi, rbx xor eax, eax call JS_ThrowTypeError push 6 loc_12D93: pop r14 loc_12D95: mov rax, r15 mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_12DAA: xor r15d, r15d jmp short loc_12D95
_BOOL8 js_reflect_set(long long a1, long long a2, int a3, int a4, __int128 *a5, int a6) { _DWORD *v6; // r15 long long v7; // r13 unsigned int v8; // eax unsigned int v9; // ebp int v10; // r15d long long v11; // r15 __int128 v13; // [rsp+20h] [rbp-58h] int v14; // [rsp+38h] [rbp-40h] if ( a4 < 4 ) v13 = *a5; else v13 = a5[3]; if ( (unsigned int)*((_QWORD *)a5 + 1) == -1 ) { v14 = *(_QWORD *)a5; v6 = (_DWORD *)*((_QWORD *)a5 + 4); v7 = *((_QWORD *)a5 + 5); v8 = JS_ValueToAtom(a1, *((_QWORD *)a5 + 2), *((_QWORD *)a5 + 3)); if ( !v8 ) return 0LL; v9 = v8; if ( (unsigned int)v7 >= 0xFFFFFFF7 ) ++*v6; v10 = JS_SetPropertyInternal2(a1, v14, -1, v8, (_DWORD)v6, v7, v13, DWORD2(v13), 0, 0LL); JS_FreeAtom(a1, v9); return v10 >= 0 && v10 != 0; } else { v11 = 0LL; JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6); } return v11; }
js_reflect_set: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV RAX,qword ptr [R8] MOV R12,qword ptr [R8 + 0x8] CMP ECX,0x4 JL 0x00112ce3 MOVUPS XMM0,xmmword ptr [R8 + 0x30] MOVAPS xmmword ptr [RSP + 0x20],XMM0 JMP 0x00112ced LAB_00112ce3: MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],R12 LAB_00112ced: CMP R12D,-0x1 JNZ 0x00112d7d MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [R8 + 0x10] MOV RDX,qword ptr [R8 + 0x18] MOV R15,qword ptr [R8 + 0x20] MOV R13,qword ptr [R8 + 0x28] MOV RDI,RBX CALL 0x001280ef PUSH 0x6 POP R14 TEST EAX,EAX JZ 0x00112daa MOV EBP,EAX MOV qword ptr [RSP + 0x40],R15 CMP R13D,-0x9 JC 0x00112d34 MOV RAX,qword ptr [RSP + 0x40] INC dword ptr [RAX] LAB_00112d34: MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x18],0x0 AND dword ptr [RSP + 0x10],0x0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x38] MOV RDX,R12 MOV ECX,EBP MOV R8,R15 MOV R9,R13 CALL 0x001283e4 MOV R15D,EAX MOV RDI,RBX MOV ESI,EBP CALL 0x00124834 TEST R15D,R15D JS 0x00112daa SETNZ AL MOVZX R15D,AL PUSH 0x1 JMP 0x00112d93 LAB_00112d7d: LEA RSI,[0x1a329d] XOR R15D,R15D MOV RDI,RBX XOR EAX,EAX CALL 0x001265c3 PUSH 0x6 LAB_00112d93: POP R14 LAB_00112d95: MOV RAX,R15 MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00112daa: XOR R15D,R15D JMP 0x00112d95
bool js_reflect_set(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int8 uVar1; int8 uVar2; int *piVar3; int8 uVar4; int iVar5; int iVar6; int8 local_58; int8 uStack_50; uVar1 = *param_5; uVar2 = param_5[1]; local_58 = uVar1; uStack_50 = uVar2; if (3 < param_4) { local_58 = param_5[6]; uStack_50 = param_5[7]; } if ((int)uVar2 == -1) { piVar3 = (int *)param_5[4]; uVar4 = param_5[5]; iVar5 = JS_ValueToAtom(param_1,param_5[2],param_5[3]); if (iVar5 != 0) { if (0xfffffff6 < (uint)uVar4) { *piVar3 = *piVar3 + 1; } iVar6 = JS_SetPropertyInternal2 (param_1,uVar1,uVar2,iVar5,piVar3,uVar4,(int4)local_58, (int4)uStack_50,0,0); JS_FreeAtom(param_1,iVar5); if (-1 < iVar6) { return iVar6 != 0; } } } else { JS_ThrowTypeError(param_1,"not an object"); } return false; }
15,504
js_reflect_set
bluesky950520[P]quickjs/quickjs.c
static JSValue js_reflect_set(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, prop, val, receiver; int ret; JSAtom atom; obj = argv[0]; prop = argv[1]; val = argv[2]; if (argc > 3) receiver = argv[3]; else receiver = obj; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) return JS_EXCEPTION; ret = JS_SetPropertyInternal2(ctx, obj, atom, js_dup(val), receiver, 0, NULL); JS_FreeAtom(ctx, atom); if (ret < 0) return JS_EXCEPTION; else return js_bool(ret); }
O2
c
js_reflect_set: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq (%r8), %r15 movq 0x8(%r8), %r12 cmpl $0x4, %ecx jl 0x6de98 movups 0x30(%r8), %xmm0 movaps %xmm0, 0x20(%rsp) jmp 0x6dea2 movq %r15, 0x20(%rsp) movq %r12, 0x28(%rsp) cmpl $-0x1, %r12d jne 0x6df22 movq 0x10(%r8), %rsi movq 0x18(%r8), %rdx movq 0x20(%r8), %rax movq %rax, 0x30(%rsp) movq 0x28(%r8), %rbp movq %rbx, %rdi callq 0x21c6c pushq $0x6 popq %r14 testl %eax, %eax je 0x6df2e movl %eax, %r13d cmpl $-0x9, %ebp movq 0x30(%rsp), %r8 jb 0x6dedd incl (%r8) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) andq $0x0, 0x18(%rsp) andl $0x0, 0x10(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movl %r13d, %ecx movq %rbp, %r9 callq 0x22025 movl %eax, %ebp movq %rbx, %rdi movl %r13d, %esi callq 0x1e545 testl %ebp, %ebp js 0x6df2e setne %al movzbl %al, %eax pushq $0x1 popq %r14 jmp 0x6df30 movq %rbx, %rdi callq 0x21191 pushq $0x6 popq %r14 xorl %eax, %eax movq %r14, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_reflect_set: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi mov r15, [r8] mov r12, [r8+8] cmp ecx, 4 jl short loc_6DE98 movups xmm0, xmmword ptr [r8+30h] movaps [rsp+68h+var_48], xmm0 jmp short loc_6DEA2 loc_6DE98: mov qword ptr [rsp+68h+var_48], r15 mov qword ptr [rsp+68h+var_48+8], r12 loc_6DEA2: cmp r12d, 0FFFFFFFFh jnz short loc_6DF22 mov rsi, [r8+10h] mov rdx, [r8+18h] mov rax, [r8+20h] mov [rsp+68h+var_38], rax mov rbp, [r8+28h] mov rdi, rbx call JS_ValueToAtom push 6 pop r14 test eax, eax jz short loc_6DF2E mov r13d, eax cmp ebp, 0FFFFFFF7h mov r8, [rsp+68h+var_38] jb short loc_6DEDD inc dword ptr [r8] loc_6DEDD: movaps xmm0, [rsp+68h+var_48] movups [rsp+68h+var_68], xmm0 and [rsp+68h+var_50], 0 and [rsp+68h+var_58], 0 mov rdi, rbx mov rsi, r15 mov rdx, r12 mov ecx, r13d mov r9, rbp call JS_SetPropertyInternal2 mov ebp, eax mov rdi, rbx mov esi, r13d call JS_FreeAtom test ebp, ebp js short loc_6DF2E setnz al movzx eax, al push 1 pop r14 jmp short loc_6DF30 loc_6DF22: mov rdi, rbx call JS_ThrowTypeErrorNotAnObject push 6 pop r14 loc_6DF2E: xor eax, eax loc_6DF30: mov rdx, r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BOOL8 js_reflect_set( long long a1, long long a2, long long a3, long long a4, __m128 *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // r15 long long v15; // r12 long long v16; // rbp unsigned int v17; // eax int v18; // r13d int v19; // ebp char v21; // [rsp+0h] [rbp-68h] __int128 v22; // [rsp+8h] [rbp-60h] __m128 v23; // [rsp+20h] [rbp-48h] unsigned int *v24; // [rsp+30h] [rbp-38h] v14 = a5->m128_u64[0]; v15 = a5->m128_i64[1]; if ( (int)a4 < 4 ) { v23 = *a5; } else { a7 = a5[3]; v23 = a7; } if ( (_DWORD)v15 == -1 ) { v24 = (unsigned int *)a5[2].m128_u64[0]; v16 = a5[2].m128_i64[1]; v17 = JS_ValueToAtom(a1, a5[1].m128_i64[0], a5[1].m128_u64[1]); if ( v17 ) { v18 = v17; if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*v24; *(_QWORD *)&v22 = v23.m128_u64[1]; DWORD2(v22) = 0; v19 = JS_SetPropertyInternal2(a1, v14, v15, v17, v24, v16, v23.m128_i64[0], v22, 0LL); JS_FreeAtom(a1, v18); if ( v19 >= 0 ) return v19 != 0; } } else { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v21); } return 0LL; }
js_reflect_set: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV R15,qword ptr [R8] MOV R12,qword ptr [R8 + 0x8] CMP ECX,0x4 JL 0x0016de98 MOVUPS XMM0,xmmword ptr [R8 + 0x30] MOVAPS xmmword ptr [RSP + 0x20],XMM0 JMP 0x0016dea2 LAB_0016de98: MOV qword ptr [RSP + 0x20],R15 MOV qword ptr [RSP + 0x28],R12 LAB_0016dea2: CMP R12D,-0x1 JNZ 0x0016df22 MOV RSI,qword ptr [R8 + 0x10] MOV RDX,qword ptr [R8 + 0x18] MOV RAX,qword ptr [R8 + 0x20] MOV qword ptr [RSP + 0x30],RAX MOV RBP,qword ptr [R8 + 0x28] MOV RDI,RBX CALL 0x00121c6c PUSH 0x6 POP R14 TEST EAX,EAX JZ 0x0016df2e MOV R13D,EAX CMP EBP,-0x9 MOV R8,qword ptr [RSP + 0x30] JC 0x0016dedd INC dword ptr [R8] LAB_0016dedd: MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x18],0x0 AND dword ptr [RSP + 0x10],0x0 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV ECX,R13D MOV R9,RBP CALL 0x00122025 MOV EBP,EAX MOV RDI,RBX MOV ESI,R13D CALL 0x0011e545 TEST EBP,EBP JS 0x0016df2e SETNZ AL MOVZX EAX,AL PUSH 0x1 POP R14 JMP 0x0016df30 LAB_0016df22: MOV RDI,RBX CALL 0x00121191 PUSH 0x6 POP R14 LAB_0016df2e: XOR EAX,EAX LAB_0016df30: MOV RDX,R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool js_reflect_set(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int8 uVar1; int8 uVar2; int *piVar3; int8 uVar4; int iVar5; int iVar6; int8 local_48; int8 uStack_40; uVar1 = *param_5; uVar2 = param_5[1]; local_48 = uVar1; uStack_40 = uVar2; if (3 < param_4) { local_48 = param_5[6]; uStack_40 = param_5[7]; } if ((int)uVar2 == -1) { piVar3 = (int *)param_5[4]; uVar4 = param_5[5]; iVar5 = JS_ValueToAtom(param_1,param_5[2],param_5[3]); if (iVar5 != 0) { if (0xfffffff6 < (uint)uVar4) { *piVar3 = *piVar3 + 1; } iVar6 = JS_SetPropertyInternal2 (param_1,uVar1,uVar2,iVar5,piVar3,uVar4,(int4)local_48, (int4)uStack_40,0,0); JS_FreeAtom(param_1,iVar5); if (-1 < iVar6) { return iVar6 != 0; } } } else { JS_ThrowTypeErrorNotAnObject(param_1); } return false; }
15,505
ma_get_length
eloqsql/storage/maria/ma_blockrec.c
static ulong ma_get_length(const uchar **packet) { reg1 const uchar *pos= *packet; if (*pos < 251) { (*packet)++; return (ulong) *pos; } if (*pos == 251) { (*packet)+= 2; return (ulong) pos[1]; } if (*pos == 252) { (*packet)+= 3; return (ulong) uint2korr(pos+1); } if (*pos == 253) { (*packet)+= 4; return (ulong) uint3korr(pos+1); } DBUG_ASSERT(*pos == 254); (*packet)+= 5; return (ulong) uint4korr(pos+1); }
O0
c
ma_get_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfb, %eax jge 0x7dacf movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x8(%rbp) jmp 0x7db89 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfb, %eax jne 0x7dafc movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x2, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movq %rax, -0x8(%rbp) jmp 0x7db89 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfc, %eax jne 0x7db26 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x3, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzwl 0x1(%rax), %eax movq %rax, -0x8(%rbp) jmp 0x7db89 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfd, %eax jne 0x7db6c movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x7db89 jmp 0x7db6e jmp 0x7db70 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x5, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movl 0x1(%rax), %eax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
ma_get_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FBh jge short loc_7DACF mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_8], rax jmp loc_7DB89 loc_7DACF: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FBh jnz short loc_7DAFC mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 2 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] mov [rbp+var_8], rax jmp loc_7DB89 loc_7DAFC: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FCh jnz short loc_7DB26 mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 3 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, word ptr [rax+1] mov [rbp+var_8], rax jmp short loc_7DB89 loc_7DB26: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FDh jnz short loc_7DB6C mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_8], rax jmp short loc_7DB89 loc_7DB6C: jmp short $+2 loc_7DB6E: jmp short $+2 loc_7DB70: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 5 mov [rax], rcx mov rax, [rbp+var_18] mov eax, [rax+1] mov [rbp+var_8], rax loc_7DB89: mov rax, [rbp+var_8] pop rbp retn
long long ma_get_length(unsigned __int8 **a1) { unsigned __int8 *v2; // [rsp+0h] [rbp-18h] v2 = *a1; if ( **a1 >= 0xFBu ) { switch ( *v2 ) { case 0xFBu: *a1 += 2; return v2[1]; case 0xFCu: *a1 += 3; return *(unsigned __int16 *)(v2 + 1); case 0xFDu: *a1 += 4; return (v2[3] << 16) | (unsigned int)*(unsigned __int16 *)(v2 + 1); default: *a1 += 5; return *(unsigned int *)(v2 + 1); } } else { ++*a1; return *v2; } }
ma_get_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfb JGE 0x0017dacf MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017db89 LAB_0017dacf: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfb JNZ 0x0017dafc MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x2 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017db89 LAB_0017dafc: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfc JNZ 0x0017db26 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x3 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x1] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017db89 LAB_0017db26: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfd JNZ 0x0017db6c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x0017db89 LAB_0017db6c: JMP 0x0017db6e LAB_0017db6e: JMP 0x0017db70 LAB_0017db70: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x5 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x1] MOV qword ptr [RBP + -0x8],RAX LAB_0017db89: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
uint ma_get_length(long *param_1) { byte *pbVar1; uint uVar2; pbVar1 = (byte *)*param_1; if (*pbVar1 < 0xfb) { *param_1 = *param_1 + 1; uVar2 = (uint)*pbVar1; } else if (*pbVar1 == 0xfb) { *param_1 = *param_1 + 2; uVar2 = (uint)pbVar1[1]; } else if (*pbVar1 == 0xfc) { *param_1 = *param_1 + 3; uVar2 = (uint)*(ushort *)(pbVar1 + 1); } else if (*pbVar1 == 0xfd) { *param_1 = *param_1 + 4; uVar2 = (uint)*(uint3 *)(pbVar1 + 1); } else { *param_1 = *param_1 + 5; uVar2 = *(uint *)(pbVar1 + 1); } return uVar2; }
15,506
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, double, 0>(fmt::v10::appender, double)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt { if (is_constant_evaluated()) return write(out, value, format_specs<Char>()); if (const_check(!is_supported_floating_point(value))) return out; auto fspecs = float_specs(); if (detail::signbit(value)) { fspecs.sign = sign::minus; value = -value; } constexpr auto specs = format_specs<Char>(); using floaty = conditional_t<std::is_same<T, long double>::value, double, T>; using floaty_uint = typename dragonbox::float_info<floaty>::carrier_uint; floaty_uint mask = exponent_mask<floaty>(); if ((bit_cast<floaty_uint>(value) & mask) == mask) return write_nonfinite(out, std::isnan(value), specs, fspecs); auto dec = dragonbox::to_decimal(static_cast<floaty>(value)); return write_float(out, dec, specs, fspecs, {}); }
O0
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, double, 0>(fmt::v10::appender, double): subq $0x98, %rsp movq %rdi, 0x70(%rsp) movsd %xmm0, 0x68(%rsp) movsd 0x68(%rsp), %xmm0 callq 0xaeee0 xorb $-0x1, %al andb $0x1, %al movb %al, 0x8f(%rsp) testb $0x1, 0x8f(%rsp) je 0xaed71 movq 0x70(%rsp), %rax movq %rax, 0x78(%rsp) jmp 0xaeec8 leaq 0x60(%rsp), %rdi xorl %esi, %esi movl $0x8, %edx callq 0x8db70 movsd 0x68(%rsp), %xmm0 movsd %xmm0, 0x90(%rsp) movsd 0x90(%rsp), %xmm0 callq 0x8baa0 testb $0x1, %al jne 0xaeda5 jmp 0xaedda movl 0x64(%rsp), %eax andl $0xffff00ff, %eax # imm = 0xFFFF00FF orl $0x100, %eax # imm = 0x100 movl %eax, 0x64(%rsp) movsd 0x68(%rsp), %xmm0 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 movsd %xmm0, 0x68(%rsp) movq 0x32f64f(%rip), %rax # 0x3de430 movq %rax, 0x50(%rsp) movq 0x32f64b(%rip), %rax # 0x3de438 movq %rax, 0x58(%rsp) callq 0xaeef0 movq %rax, 0x48(%rsp) leaq 0x68(%rsp), %rdi callq 0xaef10 andq 0x48(%rsp), %rax cmpq 0x48(%rsp), %rax jne 0xaee61 movq 0x70(%rsp), %rax movq %rax, 0x40(%rsp) movsd 0x68(%rsp), %xmm0 callq 0x93ce0 movq 0x50(%rsp), %rcx movq %rcx, 0x30(%rsp) movq 0x58(%rsp), %rcx movq %rcx, 0x38(%rsp) movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rdx movq 0x38(%rsp), %rcx movzbl %al, %esi andl $0x1, %esi leaq 0x60(%rsp), %r8 callq 0xaaec0 movq %rax, 0x78(%rsp) jmp 0xaeec8 movsd 0x68(%rsp), %xmm0 callq 0xaef60 movq %rax, 0x20(%rsp) movl %edx, 0x28(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq $0x0, (%rax) movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rcx movq 0x8(%rsp), %r8 leaq 0x20(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0xafd50 movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax addq $0x98, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_: sub rsp, 98h mov [rsp+98h+var_28], rdi movsd [rsp+98h+var_30], xmm0 movsd xmm0, [rsp+98h+var_30] call _ZN3fmt3v106detail27is_supported_floating_pointIdEEbT_; fmt::v10::detail::is_supported_floating_point<double>(double) xor al, 0FFh and al, 1 mov [rsp+98h+var_9], al test [rsp+98h+var_9], 1 jz short loc_AED71 mov rax, [rsp+98h+var_28] mov [rsp+98h+var_20], rax jmp loc_AEEC8 loc_AED71: lea rdi, [rsp+98h+var_38] xor esi, esi mov edx, 8 call _memset movsd xmm0, [rsp+98h+var_30] movsd [rsp+98h+var_8], xmm0 movsd xmm0, [rsp+98h+var_8]; double call __ZSt7signbitd; std::signbit(double) test al, 1 jnz short loc_AEDA5 jmp short loc_AEDDA loc_AEDA5: mov eax, dword ptr [rsp+98h+var_38+4] and eax, 0FFFF00FFh or eax, 100h mov dword ptr [rsp+98h+var_38+4], eax movsd xmm0, [rsp+98h+var_30] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax movsd [rsp+98h+var_30], xmm0 loc_AEDDA: mov rax, cs:qword_3DE430 mov [rsp+98h+var_48], rax mov rax, cs:qword_3DE438 mov [rsp+98h+var_40], rax call _ZN3fmt3v106detail13exponent_maskIdEENS1_9dragonbox10float_infoIT_vE12carrier_uintEv; fmt::v10::detail::exponent_mask<double>(void) mov [rsp+98h+var_50], rax lea rdi, [rsp+98h+var_30] call _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_ and rax, [rsp+98h+var_50] cmp rax, [rsp+98h+var_50] jnz short loc_AEE61 mov rax, [rsp+98h+var_28] mov [rsp+98h+var_58], rax movsd xmm0, [rsp+98h+var_30]; double call __ZSt5isnand; std::isnan(double) mov rcx, [rsp+98h+var_48] mov [rsp+98h+var_68], rcx mov rcx, [rsp+98h+var_40] mov [rsp+98h+var_60], rcx mov rdi, [rsp+98h+var_58] mov rdx, [rsp+98h+var_68] mov rcx, [rsp+98h+var_60] movzx esi, al and esi, 1 lea r8, [rsp+98h+var_38] call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&) mov [rsp+98h+var_20], rax jmp short loc_AEEC8 loc_AEE61: movsd xmm0, [rsp+98h+var_30] call _ZN3fmt3v106detail9dragonbox10to_decimalIdEENS2_10decimal_fpIT_EES5_; fmt::v10::detail::dragonbox::to_decimal<double>(double) mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], edx mov rax, [rsp+98h+var_28] mov [rsp+98h+var_80], rax mov rax, [rsp+98h+var_38] mov [rsp+98h+var_88], rax lea rax, [rsp+98h+var_90] mov [rsp+98h+var_18], rax mov rax, [rsp+98h+var_18] mov qword ptr [rax], 0 mov rdi, [rsp+98h+var_80] mov rcx, [rsp+98h+var_88] mov r8, [rsp+98h+var_90] lea rsi, [rsp+98h+var_78] lea rdx, [rsp+98h+var_48] call _ZN3fmt3v106detail11write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIdEEcEET_S7_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<double>,char>(fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<double> const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref) mov [rsp+98h+var_20], rax loc_AEEC8: mov rax, [rsp+98h+var_20] add rsp, 98h retn
long long ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_( long long a1, double a2) { char is_supported_floating; // al char v3; // al int v4; // edx _QWORD v6[3]; // [rsp+8h] [rbp-90h] BYREF long long v7; // [rsp+20h] [rbp-78h] BYREF int v8; // [rsp+28h] [rbp-70h] long long v9; // [rsp+30h] [rbp-68h] long long v10; // [rsp+38h] [rbp-60h] long long v11; // [rsp+40h] [rbp-58h] long long v12; // [rsp+48h] [rbp-50h] long long v13; // [rsp+50h] [rbp-48h] BYREF long long v14; // [rsp+58h] [rbp-40h] long long v15; // [rsp+60h] [rbp-38h] BYREF double v16; // [rsp+68h] [rbp-30h] BYREF long long v17; // [rsp+70h] [rbp-28h] _QWORD *v19; // [rsp+80h] [rbp-18h] bool v20; // [rsp+8Fh] [rbp-9h] double v21; // [rsp+90h] [rbp-8h] v17 = a1; v16 = a2; is_supported_floating = fmt::v10::detail::is_supported_floating_point<double>(a2); v20 = (is_supported_floating & 1) == 0; if ( (is_supported_floating & 1) == 0 ) return v17; memset(&v15, 0LL, sizeof(v15)); v21 = v16; if ( (std::signbit(v16) & 1) != 0 ) { HIDWORD(v15) = HIDWORD(v15) & 0xFFFF00FF | 0x100; *(_QWORD *)&v16 ^= 0x8000000000000000LL; } v13 = 0xFFFFFFFF00000000LL; v14 = 0x100000020000000LL; v12 = fmt::v10::detail::exponent_mask<double>(); if ( (v12 & ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_(&v16)) == v12 ) { v11 = v17; v3 = std::isnan(v16); v9 = v13; v10 = v14; return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(v11, v3 & 1, v13, v14, (long long)&v15); } else { v7 = fmt::v10::detail::dragonbox::to_decimal<double>(v16); v8 = v4; v6[2] = v17; v6[1] = v15; v19 = v6; v6[0] = 0LL; return fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<double>,char>( v17, &v7, &v13, v15, 0LL); } }
_ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_: SUB RSP,0x98 MOV qword ptr [RSP + 0x70],RDI MOVSD qword ptr [RSP + 0x68],XMM0 MOVSD XMM0,qword ptr [RSP + 0x68] CALL 0x001aeee0 XOR AL,0xff AND AL,0x1 MOV byte ptr [RSP + 0x8f],AL TEST byte ptr [RSP + 0x8f],0x1 JZ 0x001aed71 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x78],RAX JMP 0x001aeec8 LAB_001aed71: LEA RDI,[RSP + 0x60] XOR ESI,ESI MOV EDX,0x8 CALL 0x0018db70 MOVSD XMM0,qword ptr [RSP + 0x68] MOVSD qword ptr [RSP + 0x90],XMM0 MOVSD XMM0,qword ptr [RSP + 0x90] CALL 0x0018baa0 TEST AL,0x1 JNZ 0x001aeda5 JMP 0x001aedda LAB_001aeda5: MOV EAX,dword ptr [RSP + 0x64] AND EAX,0xffff00ff OR EAX,0x100 MOV dword ptr [RSP + 0x64],EAX MOVSD XMM0,qword ptr [RSP + 0x68] MOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX MOVQ XMM0,RAX MOVSD qword ptr [RSP + 0x68],XMM0 LAB_001aedda: MOV RAX,qword ptr [0x004de430] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [0x004de438] MOV qword ptr [RSP + 0x58],RAX CALL 0x001aeef0 MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x68] CALL 0x001aef10 AND RAX,qword ptr [RSP + 0x48] CMP RAX,qword ptr [RSP + 0x48] JNZ 0x001aee61 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x40],RAX MOVSD XMM0,qword ptr [RSP + 0x68] CALL 0x00193ce0 MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x30],RCX MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOVZX ESI,AL AND ESI,0x1 LEA R8,[RSP + 0x60] CALL 0x001aaec0 MOV qword ptr [RSP + 0x78],RAX JMP 0x001aeec8 LAB_001aee61: MOVSD XMM0,qword ptr [RSP + 0x68] CALL 0x001aef60 MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x28],EDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x50] CALL 0x001afd50 MOV qword ptr [RSP + 0x78],RAX LAB_001aeec8: MOV RAX,qword ptr [RSP + 0x78] ADD RSP,0x98 RET
detail * _ZN3fmt3v106detail5writeIcNS0_8appenderEdTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_ (double param_1,detail *param_2) { bool bVar1; byte bVar2; ulong uVar3; int1 local_90 [8]; int8 local_88; detail *local_80; int1 local_78 [12]; int8 local_68; int8 local_60; detail *local_58; ulong local_50; int8 local_48; int8 local_40; int4 local_38; uint uStack_34; double local_30; detail *local_28; detail *local_20; int1 *local_18; byte local_9; double local_8; local_30 = param_1; local_28 = param_2; bVar1 = fmt::v10::detail::is_supported_floating_point<double>(param_1); local_9 = (bVar1 ^ 0xffU) & 1; if (local_9 == 0) { memset(&local_38,0,8); local_8 = local_30; uVar3 = std::signbit(local_30); if ((uVar3 & 1) != 0) { uStack_34 = uStack_34 & 0xffff00ff | 0x100; local_30 = -local_30; } local_48 = DAT_004de430; local_40 = DAT_004de438; local_50 = fmt::v10::detail::exponent_mask<double>(); uVar3 = _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_ (&local_30); if ((uVar3 & local_50) == local_50) { local_58 = local_28; bVar2 = std::isnan(local_30); local_68 = local_48; local_60 = local_40; local_20 = (detail *) fmt::v10::detail::write_nonfinite<char,fmt::v10::appender> (local_58,bVar2 & 1,local_48,local_40,&local_38); } else { local_78 = fmt::v10::detail::dragonbox::to_decimal<double>(local_30); local_80 = local_28; local_88 = CONCAT44(uStack_34,local_38); local_18 = local_90; local_20 = (detail *) fmt::v10::detail:: write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<double>,char> (local_28,local_78,&local_48,local_88,0); } } else { local_20 = local_28; } return local_20; }
15,507
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, double, 0>(fmt::v10::appender, double)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt { if (is_constant_evaluated()) return write(out, value, format_specs<Char>()); if (const_check(!is_supported_floating_point(value))) return out; auto fspecs = float_specs(); if (detail::signbit(value)) { fspecs.sign = sign::minus; value = -value; } constexpr auto specs = format_specs<Char>(); using floaty = conditional_t<std::is_same<T, long double>::value, double, T>; using floaty_uint = typename dragonbox::float_info<floaty>::carrier_uint; floaty_uint mask = exponent_mask<floaty>(); if ((bit_cast<floaty_uint>(value) & mask) == mask) return write_nonfinite(out, std::isnan(value), specs, fspecs); auto dec = dragonbox::to_decimal(static_cast<floaty>(value)); return write_float(out, dec, specs, fspecs, {}); }
O3
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, double, 0>(fmt::v10::appender, double): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movq $0x0, 0x8(%rsp) movd %xmm0, %eax testl %eax, %eax jns 0x3860e movl $0x100, 0xc(%rsp) # imm = 0x100 pxor 0x128ae2(%rip), %xmm0 # 0x1610f0 movups 0x128b5b(%rip), %xmm1 # 0x161170 movaps %xmm1, 0x10(%rsp) movd %xmm0, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl $0x7f800000, %eax # imm = 0x7F800000 jl 0x38656 xorl %esi, %esi ucomiss %xmm0, %xmm0 setp %sil movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 movabsq $0x100000020000000, %rcx # imm = 0x100000020000000 leaq 0x8(%rsp), %r8 movq %rbx, %rdi callq 0x3867e jmp 0x38678 callq 0x3870c leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movq 0x8(%rsp), %rcx leaq 0x10(%rsp), %rdx movq %rbx, %rdi xorl %r8d, %r8d callq 0x38a54 addq $0x30, %rsp popq %rbx retq
_ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_: push rbx; int sub rsp, 30h mov rbx, rdi mov qword ptr [rsp+38h+var_30], 0; int movd eax, xmm0 test eax, eax jns short loc_3860E mov [rsp+38h+var_30+4], 100h pxor xmm0, cs:xmmword_1610F0 loc_3860E: movups xmm1, cs:xmmword_161170 movaps xmmword ptr [rsp+38h+var_28], xmm1; int movd eax, xmm0 and eax, 7FFFFFFFh cmp eax, 7F800000h jl short loc_38656 xor esi, esi ucomiss xmm0, xmm0 setp sil mov rdx, 0FFFFFFFF00000000h mov rcx, 100000020000000h lea r8, [rsp+38h+var_30] mov rdi, rbx call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&) jmp short loc_38678 loc_38656: call _ZN3fmt3v106detail9dragonbox10to_decimalIfEENS2_10decimal_fpIT_EES5_; fmt::v10::detail::dragonbox::to_decimal<float>(float) lea rsi, [rsp+38h+var_10]; __int64 mov [rsi], rax mov rcx, qword ptr [rsp+38h+var_30] lea rdx, [rsp+38h+var_28]; __int64 mov rdi, rbx; int xor r8d, r8d call _ZN3fmt3v106detail14do_write_floatINS0_8appenderENS1_9dragonbox10decimal_fpIfEEcNS1_14digit_groupingIcEEEET_S9_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::do_write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float>,char,fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float> const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref) loc_38678: add rsp, 30h pop rbx retn
_ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_: PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV qword ptr [RSP + 0x8],0x0 MOVD EAX,XMM0 TEST EAX,EAX JNS 0x0013860e MOV dword ptr [RSP + 0xc],0x100 PXOR XMM0,xmmword ptr [0x002610f0] LAB_0013860e: MOVUPS XMM1,xmmword ptr [0x00261170] MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOVD EAX,XMM0 AND EAX,0x7fffffff CMP EAX,0x7f800000 JL 0x00138656 XOR ESI,ESI UCOMISS XMM0,XMM0 SETP SIL MOV RDX,-0x100000000 MOV RCX,0x100000020000000 LEA R8,[RSP + 0x8] MOV RDI,RBX CALL 0x0013867e JMP 0x00138678 LAB_00138656: CALL 0x0013870c LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOV RCX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RDI,RBX XOR R8D,R8D CALL 0x00138a54 LAB_00138678: ADD RSP,0x30 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void _ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr13is_fast_floatIT1_EE5valueEiE4typeELi0EEET0_S8_S5_ (float param_1,detail *param_2) { int8 local_30; int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; int8 local_10; local_30 = 0; if ((int)param_1 < 0) { local_30 = 0x10000000000; param_1 = (float)((uint)param_1 ^ SUB164(_DAT_002610f0,0)); } local_28 = _DAT_00261170; uStack_24 = _UNK_00261174; uStack_20 = _UNK_00261178; uStack_1c = _UNK_0026117c; if ((uint)ABS(param_1) < 0x7f800000) { local_10 = fmt::v10::detail::dragonbox::to_decimal<float>(param_1); fmt::v10::detail:: do_write_float<fmt::v10::appender,fmt::v10::detail::dragonbox::decimal_fp<float>,char,fmt::v10::detail::digit_grouping<char>> (param_2,&local_10,&local_28,local_30,0); } else { fmt::v10::detail::write_nonfinite<char,fmt::v10::appender> (param_2,NAN(param_1),0xffffffff00000000,0x100000020000000,&local_30); } return; }
15,508
my_hash_sort_utf16_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= pos + len; register ulong m1= *nr1, m2= *nr2; for ( ; pos < end ; pos++) { MY_HASH_ADD(m1, m2, (uint)*pos); } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf16_nopad_bin: pushq %rbp movq %rsp, %rbp 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, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0xbbe4e jmp 0xbbe06 movq -0x38(%rbp), %rax andq $0x3f, %rax addq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rax addq $0x3, %rax movq %rax, -0x40(%rbp) jmp 0xbbe40 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xbbdfa movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf16_nopad_bin: push rbp mov rbp, rsp 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_30], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax loc_BBDFA: mov rax, [rbp+var_10] cmp rax, [rbp+var_30] jnb short loc_BBE4E jmp short $+2 loc_BBE06: mov rax, [rbp+var_38] and rax, 3Fh add rax, [rbp+var_40] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_38] shl rcx, 8 add rax, rcx xor rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_40] add rax, 3 mov [rbp+var_40], rax jmp short $+2 loc_BBE40: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_BBDFA loc_BBE4E: mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx pop rbp retn
_QWORD * my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { _QWORD *result; // rax long long v6; // [rsp+0h] [rbp-40h] long long v7; // [rsp+8h] [rbp-38h] unsigned __int8 *v8; // [rsp+30h] [rbp-10h] v8 = a2; v7 = *a4; v6 = *a5; while ( v8 < &a2[a3] ) { v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F)); v6 += 3LL; ++v8; } *a4 = v7; result = a5; *a5 = v6; return result; }
my_hash_sort_utf16_nopad_bin: PUSH RBP MOV RBP,RSP 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 + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_001bbdfa: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001bbe4e JMP 0x001bbe06 LAB_001bbe06: MOV RAX,qword ptr [RBP + -0x38] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x38] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x3 MOV qword ptr [RBP + -0x40],RAX JMP 0x001bbe40 LAB_001bbe40: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001bbdfa LAB_001bbe4e: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX POP RBP RET
void my_hash_sort_utf16_nopad_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long local_48; ulong local_40; byte *local_18; local_40 = *param_4; local_48 = *param_5; for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) { local_40 = ((local_40 & 0x3f) + local_48) * (ulong)*local_18 + local_40 * 0x100 ^ local_40; local_48 = local_48 + 3; } *param_4 = local_40; *param_5 = local_48; return; }
15,509
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
monkey531[P]llama/common/minja.hpp
json parseNumber(CharIterator& it, const CharIterator& end) { auto before = it; consumeSpaces(); auto start = it; bool hasDecimal = false; bool hasExponent = false; if (it != end && (*it == '-' || *it == '+')) ++it; while (it != end) { if (std::isdigit(*it)) { ++it; } else if (*it == '.') { if (hasDecimal) throw std::runtime_error("Multiple decimal points"); hasDecimal = true; ++it; } else if (it != start && (*it == 'e' || *it == 'E')) { if (hasExponent) throw std::runtime_error("Multiple exponents"); hasExponent = true; ++it; } else { break; } } if (start == it) { it = before; return json(); // No valid characters found } std::string str(start, it); try { return json::parse(str); } catch (json::parse_error& e) { throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")"); return json(); } }
O3
cpp
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq (%rdx), %r9 movq 0x18(%rsi), %rbp movq 0x20(%rsi), %r13 movq %r9, %rsi cmpq %rbp, %r13 je 0x9944e movq %rbx, 0x8(%rsp) movq %r9, %rbx movsbl (%r13), %edi callq 0x1b0d0 testl %eax, %eax je 0x99443 incq %r13 movq %r13, 0x20(%r12) cmpq %rbp, %r13 jne 0x99428 movq (%r14), %rsi movq %rbx, %r9 movq 0x8(%rsp), %rbx movq (%r15), %rax cmpq %rsi, %rax je 0x99538 movzbl (%rsi), %ecx cmpl $0x2d, %ecx je 0x9946a movq %rsi, %rdx cmpl $0x2b, %ecx jne 0x99474 leaq 0x1(%rsi), %rdx movq %rdx, (%r14) movq (%r15), %rax cmpq %rax, %rdx je 0x994c1 xorl %eax, %eax xorl %ecx, %ecx movsbl (%rdx), %edi leal -0x30(%rdi), %r8d cmpl $0xa, %r8d jb 0x994b6 movzbl %dil, %edi cmpl $0x2e, %edi jne 0x9949e testb $0x1, %al movb $0x1, %al je 0x994b6 jmp 0x99575 cmpq %rsi, %rdx je 0x994c1 orl $0x20, %edi cmpl $0x65, %edi jne 0x994c1 testb $0x1, %cl movb $0x1, %cl jne 0x99593 incq %rdx movq %rdx, (%r14) cmpq (%r15), %rdx jne 0x9947d cmpq %rsi, %rdx je 0x99538 leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x10(%rsp), %rdi callq 0x7e354 xorps %xmm0, %xmm0 leaq 0x90(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rsi movq %rbx, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0x99dec movq 0xa0(%rsp), %rax testq %rax, %rax je 0x9951f leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x99560 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x99560 movq %r9, (%r14) movb $0x0, (%rbx) movq $0x0, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x66666 movq %rbx, %rdi movl $0x1, %esi callq 0x66666 movq %rbx, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x64c95(%rip), %rsi # 0xfe21e movq %rax, %rdi callq 0x1b330 jmp 0x995af movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x64c8f(%rip), %rsi # 0xfe236 movq %rax, %rdi callq 0x1b330 movq 0xa1a32(%rip), %rsi # 0x13afe8 movq 0xa199b(%rip), %rdx # 0x13af58 movq %rbx, %rdi callq 0x1bf90 jmp 0x9983a movq %rdx, %rbx movq %rax, %r14 movq 0xa0(%rsp), %rax testq %rax, %rax je 0x995ef leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax cmpl $0x1, %ebx jne 0x9981f movq %r14, %rdi callq 0x1b390 movq %rax, %r14 movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x64c32(%rip), %rsi # 0xfe249 leaq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x623d1 leaq 0x64c36(%rip), %rsi # 0xfe263 leaq 0x50(%rsp), %rdi callq 0x1c1b0 leaq 0x40(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x9965a movups (%rcx), %xmm0 movups %xmm0, (%r12) jmp 0x99667 movq %rdx, 0x30(%rsp) movq (%rcx), %rdx movq %rdx, 0x40(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x38(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0xb8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %rax, %rsi callq 0x2d02c leaq 0xd8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x86b76 leaq 0x69185(%rip), %rsi # 0x102843 leaq 0xd8(%rsp), %rdi callq 0x1c1b0 leaq 0x80(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x996f0 movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x99700 movq %rdx, 0x70(%rsp) movq (%rcx), %rdx movq %rdx, 0x80(%rsp) movq 0x8(%rax), %rdx leaq 0x70(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq %rbx, %rdi callq 0x1be80 xorl %ebp, %ebp movq 0xa18b8(%rip), %rsi # 0x13afe8 movq 0xa1821(%rip), %rdx # 0x13af58 movq %rbx, %rdi callq 0x1bf90 movq %rax, %r14 movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x99764 movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x99764 movq %rax, %r14 movb $0x1, %bpl leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9978d movq 0xe8(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x9978d movq %rax, %r14 movb $0x1, %bpl leaq 0xc8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x997b6 movq 0xc8(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x997b6 movq %rax, %r14 movb $0x1, %bpl movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x997cd movq 0x40(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x997e8 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 testb %bpl, %bpl jne 0x99812 jmp 0x9981a movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99812 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x99812 movq %rax, %r14 movq %rbx, %rdi callq 0x1b680 callq 0x1beb0 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x99854 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x99854 jmp 0x9983a movq %rax, %rdi callq 0x2d431 movq %rax, %r14 jmp 0x99854 jmp 0x99849 movq %rax, %r14 movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1c020
_ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rdx mov r12, rsi mov rbx, rdi mov r9, [rdx] mov rbp, [rsi+18h] mov r13, [rsi+20h] mov rsi, r9 cmp r13, rbp jz short loc_9944E mov [rsp+128h+var_120], rbx mov rbx, r9 loc_99428: movsx edi, byte ptr [r13+0] call _isspace test eax, eax jz short loc_99443 inc r13 mov [r12+20h], r13 cmp r13, rbp jnz short loc_99428 loc_99443: mov rsi, [r14] mov r9, rbx mov rbx, [rsp+128h+var_120] loc_9944E: mov rax, [r15] cmp rax, rsi jz loc_99538 movzx ecx, byte ptr [rsi] cmp ecx, 2Dh ; '-' jz short loc_9946A mov rdx, rsi cmp ecx, 2Bh ; '+' jnz short loc_99474 loc_9946A: lea rdx, [rsi+1] mov [r14], rdx mov rax, [r15] loc_99474: cmp rdx, rax jz short loc_994C1 xor eax, eax xor ecx, ecx loc_9947D: movsx edi, byte ptr [rdx] lea r8d, [rdi-30h] cmp r8d, 0Ah jb short loc_994B6 movzx edi, dil cmp edi, 2Eh ; '.' jnz short loc_9949E test al, 1 mov al, 1 jz short loc_994B6 jmp loc_99575 loc_9949E: cmp rdx, rsi jz short loc_994C1 or edi, 20h cmp edi, 65h ; 'e' jnz short loc_994C1 test cl, 1 mov cl, 1 jnz loc_99593 loc_994B6: inc rdx mov [r14], rdx cmp rdx, [r15] jnz short loc_9947D loc_994C1: cmp rdx, rsi jz short loc_99538 lea r15, [rsp+128h+var_108] mov [r15-10h], r15 lea rdi, [rsp+128h+var_118] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_98] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rsi, [rsp+128h+var_118] mov rdi, rbx mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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,bool) mov rax, [rsp+128h+var_88] test rax, rax jz short loc_9951F lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_9951F: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_99560 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99560 loc_99538: mov [r14], r9 mov byte ptr [rbx], 0 mov qword ptr [rbx+8], 0 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) 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) loc_99560: mov rax, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_99575: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleDecima; "Multiple decimal points" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_995AF loc_99593: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleExpone; "Multiple exponents" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_995AF: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_9983A mov rbx, rdx mov r14, rax mov rax, [rsp+128h+var_88] test rax, rax jz short loc_995EF lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_995EF: cmp ebx, 1 jnz loc_9981F mov rdi, r14; void * call ___cxa_begin_catch mov r14, rax mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToParseN; "Failed to parse number: '" lea rdi, [rsp+128h+var_D8] lea rdx, [rsp+128h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, asc_FE263; "' (" lea rdi, [rsp+128h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+128h+var_E8] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_9965A movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 jmp short loc_99667 loc_9965A: mov [rsp+128h+var_F8], rdx mov rdx, [rcx] mov [rsp+128h+var_E8], rdx loc_99667: mov rdx, [rax+8] mov [rsp+128h+var_F0], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+128h+var_70] lea rdx, [rsp+128h+var_121] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+128h+var_50] lea rsi, [rsp+128h+var_F8] lea rdx, [rsp+128h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, a09401910201912+51h; ")" lea rdi, [rsp+128h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+128h+var_A8] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_996F0 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_99700 loc_996F0: mov [rsp+128h+var_B8], rdx mov rdx, [rcx] mov [rsp+128h+var_A8], rdx loc_99700: mov rdx, [rax+8] lea rsi, [rsp+128h+var_B8] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+128h+var_B8]; void * cmp rdi, r13 jz short loc_99764 mov rsi, [rsp+128h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99764 mov r14, rax mov bpl, 1 loc_99764: lea rax, [rsp+128h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9978D mov rsi, [rsp+128h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9978D mov r14, rax mov bpl, 1 loc_9978D: lea rax, [rsp+128h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_997B6 mov rsi, [rsp+128h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_997B6 mov r14, rax mov bpl, 1 loc_997B6: mov rdi, [rsp+128h+var_F8]; void * cmp rdi, r12 jz short loc_997CD mov rsi, [rsp+128h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_997CD: lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_997E8 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_997E8: test bpl, bpl jnz short loc_99812 jmp short loc_9981A mov r14, rax lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99812 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99812 mov r14, rax loc_99812: mov rdi, rbx; void * call ___cxa_free_exception loc_9981A: call ___cxa_end_catch loc_9981F: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_99854 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99854 jmp short $+2 loc_9983A: mov rdi, rax call __clang_call_terminate mov r14, rax jmp short loc_99854 jmp short $+2 loc_99849: mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_99854: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseNumber(long long a1, long long a2, char **a3, char **a4) { long long v7; // rbx char *v8; // r9 char *v9; // rbp char *v10; // r13 char *v11; // rsi char *v12; // rbx char *v13; // rax int v14; // ecx char *v15; // rdx char v16; // al char v17; // cl int v18; // edi bool v19; // zf std::runtime_error *exception; // rbx void *v22[2]; // [rsp+10h] [rbp-118h] BYREF _QWORD v23[2]; // [rsp+20h] [rbp-108h] BYREF __int128 v24; // [rsp+90h] [rbp-98h] BYREF __int128 v25; // [rsp+A0h] [rbp-88h] v7 = a1; v8 = *a3; v9 = *(char **)(a2 + 24); v10 = *(char **)(a2 + 32); v11 = *a3; if ( v10 != v9 ) { v12 = *a3; do { if ( !(unsigned int)isspace((unsigned int)*v10) ) break; *(_QWORD *)(a2 + 32) = ++v10; } while ( v10 != v9 ); v11 = *a3; v8 = v12; v7 = a1; } v13 = *a4; if ( *a4 == v11 ) goto LABEL_25; v14 = (unsigned __int8)*v11; if ( v14 == 45 || (v15 = v11, v14 == 43) ) { v15 = v11 + 1; *a3 = v11 + 1; v13 = *a4; } if ( v15 != v13 ) { v16 = 0; v17 = 0; do { v18 = *v15; if ( (unsigned int)(v18 - 48) >= 0xA ) { if ( (unsigned __int8)v18 == 46 ) { v19 = (v16 & 1) == 0; v16 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple decimal points"); goto LABEL_28; } } else { if ( v15 == v11 || ((unsigned __int8)v18 | 0x20) != 0x65 ) break; v19 = (v17 & 1) == 0; v17 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple exponents"); LABEL_28: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } } *a3 = ++v15; } while ( v15 != *a4 ); } if ( v15 == v11 ) { LABEL_25: *a3 = v8; *(_BYTE *)v7 = 0; *(_QWORD *)(v7 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); } else { v22[0] = v23; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)v22, v11, (long long)v15); v25 = 0LL; v24 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( v7, v22, &v24, 1LL, 0LL); if ( (_QWORD)v25 ) ((void ( *)(__int128 *, __int128 *, long long))v25)(&v24, &v24, 3LL); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); } return v7; }
parseNumber: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV R9,qword ptr [RDX] MOV RBP,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RSI,R9 CMP R13,RBP JZ 0x0019944e MOV qword ptr [RSP + 0x8],RBX MOV RBX,R9 LAB_00199428: MOVSX EDI,byte ptr [R13] CALL 0x0011b0d0 TEST EAX,EAX JZ 0x00199443 INC R13 MOV qword ptr [R12 + 0x20],R13 CMP R13,RBP JNZ 0x00199428 LAB_00199443: MOV RSI,qword ptr [R14] MOV R9,RBX MOV RBX,qword ptr [RSP + 0x8] LAB_0019944e: MOV RAX,qword ptr [R15] CMP RAX,RSI JZ 0x00199538 MOVZX ECX,byte ptr [RSI] CMP ECX,0x2d JZ 0x0019946a MOV RDX,RSI CMP ECX,0x2b JNZ 0x00199474 LAB_0019946a: LEA RDX,[RSI + 0x1] MOV qword ptr [R14],RDX MOV RAX,qword ptr [R15] LAB_00199474: CMP RDX,RAX JZ 0x001994c1 XOR EAX,EAX XOR ECX,ECX LAB_0019947d: MOVSX EDI,byte ptr [RDX] LEA R8D,[RDI + -0x30] CMP R8D,0xa JC 0x001994b6 MOVZX EDI,DIL CMP EDI,0x2e JNZ 0x0019949e TEST AL,0x1 MOV AL,0x1 JZ 0x001994b6 JMP 0x00199575 LAB_0019949e: CMP RDX,RSI JZ 0x001994c1 OR EDI,0x20 CMP EDI,0x65 JNZ 0x001994c1 TEST CL,0x1 MOV CL,0x1 JNZ 0x00199593 LAB_001994b6: INC RDX MOV qword ptr [R14],RDX CMP RDX,qword ptr [R15] JNZ 0x0019947d LAB_001994c1: CMP RDX,RSI JZ 0x00199538 LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LAB_001994cf: LEA RDI,[RSP + 0x10] CALL 0x0017e354 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x90] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_001994eb: LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x00199dec MOV RAX,qword ptr [RSP + 0xa0] TEST RAX,RAX JZ 0x0019951f LAB_0019950d: LEA RDI,[RSP + 0x90] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019951f: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x00199560 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b8f0 JMP 0x00199560 LAB_00199538: MOV qword ptr [R14],R9 MOV byte ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00166666 MOV RDI,RBX MOV ESI,0x1 CALL 0x00166666 LAB_00199560: MOV RAX,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00199575: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_00199582: LEA RSI,[0x1fe21e] MOV RDI,RAX CALL 0x0011b330 LAB_00199591: JMP 0x001995af LAB_00199593: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_001995a0: LEA RSI,[0x1fe236] MOV RDI,RAX CALL 0x0011b330 LAB_001995af: MOV RSI,qword ptr [0x0023afe8] MOV RDX,qword ptr [0x0023af58] MOV RDI,RBX CALL 0x0011bf90
/* minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > const&) */ __normal_iterator * minja::Parser::parseNumber(__normal_iterator *param_1,__normal_iterator *param_2) { byte bVar1; byte *pbVar2; char *pcVar3; bool bVar4; bool bVar5; bool bVar6; int iVar7; byte *pbVar8; runtime_error *this; bool bVar9; int8 *in_RCX; long *in_RDX; byte *pbVar10; byte *pbVar11; char *pcVar12; long *local_118 [2]; long local_108 [14]; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; pbVar2 = (byte *)*in_RDX; pcVar3 = *(char **)(param_2 + 0x18); pcVar12 = *(char **)(param_2 + 0x20); pbVar11 = pbVar2; if (pcVar12 != pcVar3) { do { iVar7 = isspace((int)*pcVar12); if (iVar7 == 0) break; pcVar12 = pcVar12 + 1; *(char **)(param_2 + 0x20) = pcVar12; } while (pcVar12 != pcVar3); pbVar11 = (byte *)*in_RDX; } pbVar8 = (byte *)*in_RCX; if (pbVar8 != pbVar11) { if ((*pbVar11 == 0x2d) || (pbVar10 = pbVar11, *pbVar11 == 0x2b)) { pbVar10 = pbVar11 + 1; *in_RDX = (long)pbVar10; pbVar8 = (byte *)*in_RCX; } if (pbVar10 != pbVar8) { bVar6 = false; bVar9 = false; do { bVar1 = *pbVar10; bVar4 = bVar6; bVar5 = bVar9; if (9 < (int)(char)bVar1 - 0x30U) { if (bVar1 == 0x2e) { bVar4 = true; if (bVar6) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00199582 to 00199590 has its CatchHandler @ 00199849 */ std::runtime_error::runtime_error(this,"Multiple decimal points"); LAB_001995af: /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58); } } else { if ((pbVar10 == pbVar11) || ((bVar1 | 0x20) != 0x65)) break; bVar5 = true; if (bVar9) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001995a0 to 001995ae has its CatchHandler @ 00199847 */ std::runtime_error::runtime_error(this,"Multiple exponents"); goto LAB_001995af; } } } bVar9 = bVar5; bVar6 = bVar4; pbVar10 = pbVar10 + 1; *in_RDX = (long)pbVar10; } while (pbVar10 != (byte *)*in_RCX); } if (pbVar10 != pbVar11) { /* try { // try from 001994cf to 001994d8 has its CatchHandler @ 00199842 */ local_118[0] = local_108; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>(local_118); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; /* try { // try from 001994eb to 001994ff has its CatchHandler @ 001995ca */ 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> ::parse<std::__cxx11::string&> ((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,local_118,&local_98,1,0); if (local_88 != (code *)0x0) { /* try { // try from 0019950d to 0019951e has its CatchHandler @ 001995c5 */ (*local_88)(&local_98,&local_98,3); } if (local_118[0] == local_108) { return param_1; } operator_delete(local_118[0],local_108[0] + 1); return param_1; } } *in_RDX = (long)pbVar2; *param_1 = 0; *(int8 *)(param_1 + 8) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); return param_1; }
15,510
my_hash_sort_utf16_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0) { my_tosort_utf16(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf16_nopad: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x48(%rbp), %rcx movb %al, -0x61(%rbp) jae 0x91bbe movq -0x38(%rbp), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x91bca jmp 0x91c64 movq -0x50(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x91c80 jmp 0x91bd9 movq -0x58(%rbp), %rax andq $0x3f, %rax addq -0x60(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx imulq %rcx, %rax movq -0x58(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) jmp 0x91c15 movq -0x58(%rbp), %rax andq $0x3f, %rax addq -0x60(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx imulq %rcx, %rax movq -0x58(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) jmp 0x91c4e movl -0x3c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x91b8d movq -0x58(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x60(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x70, %rsp popq %rbp retq
my_hash_sort_utf16_nopad: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_60], rax loc_91B8D: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_48] mov [rbp+var_61], al jnb short loc_91BBE mov rax, [rbp+var_38] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_48] lea rsi, [rbp+var_30] call rax mov [rbp+var_3C], eax cmp eax, 0 setnle al mov [rbp+var_61], al loc_91BBE: mov al, [rbp+var_61] test al, 1 jnz short loc_91BCA jmp loc_91C64 loc_91BCA: mov rdi, [rbp+var_50] lea rsi, [rbp+var_30] call my_tosort_utf16 jmp short $+2 loc_91BD9: mov rax, [rbp+var_58] and rax, 3Fh add rax, [rbp+var_60] mov rcx, [rbp+var_30] and rcx, 0FFh imul rax, rcx mov rcx, [rbp+var_58] shl rcx, 8 add rax, rcx xor rax, [rbp+var_58] mov [rbp+var_58], rax mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax jmp short $+2 loc_91C15: mov rax, [rbp+var_58] and rax, 3Fh add rax, [rbp+var_60] mov rcx, [rbp+var_30] shr rcx, 8 imul rax, rcx mov rcx, [rbp+var_58] shl rcx, 8 add rax, rcx xor rax, [rbp+var_58] mov [rbp+var_58], rax mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax jmp short $+2 loc_91C4E: mov ecx, [rbp+var_3C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_91B8D loc_91C64: mov rcx, [rbp+var_58] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_60] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 70h pop rbp retn
_QWORD * my_hash_sort_utf16_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5) { _QWORD *result; // rax bool v6; // [rsp+Fh] [rbp-61h] long long v7; // [rsp+10h] [rbp-60h] long long v8; // [rsp+10h] [rbp-60h] unsigned long long v9; // [rsp+18h] [rbp-58h] long long v10; // [rsp+18h] [rbp-58h] long long v11; // [rsp+20h] [rbp-50h] unsigned long long v12; // [rsp+28h] [rbp-48h] int v13; // [rsp+34h] [rbp-3Ch] long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h] unsigned long long v15; // [rsp+40h] [rbp-30h] BYREF _QWORD *v16; // [rsp+48h] [rbp-28h] unsigned long long *v17; // [rsp+50h] [rbp-20h] long long v18; // [rsp+58h] [rbp-18h] unsigned long long v19; // [rsp+60h] [rbp-10h] long long v20; // [rsp+68h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); v12 = a3 + a2; v11 = *(_QWORD *)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v6 = 0; if ( v19 < v12 ) { v13 = v14(v20, &v15, v19, v12); v6 = v13 > 0; } if ( !v6 ) break; my_tosort_utf16(v11, &v15); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v15 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + (v15 >> 8) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; v19 += v13; } *v17 = v9; result = v16; *v16 = v7; return result; }
my_hash_sort_utf16_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX LAB_00191b8d: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x61],AL JNC 0x00191bbe MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x61],AL LAB_00191bbe: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x00191bca JMP 0x00191c64 LAB_00191bca: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x30] CALL 0x00191c80 JMP 0x00191bd9 LAB_00191bd9: MOV RAX,qword ptr [RBP + -0x58] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX JMP 0x00191c15 LAB_00191c15: MOV RAX,qword ptr [RBP + -0x58] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX JMP 0x00191c4e LAB_00191c4e: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x00191b8d LAB_00191c64: MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x70 POP RBP RET
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { code *pcVar1; int8 uVar2; bool bVar3; long local_68; ulong local_60; int local_44; ulong local_38; long *local_30; ulong *local_28; long local_20; ulong local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = *(int8 *)(param_1 + 0x78); local_60 = *param_4; local_68 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar3 = false; if (local_18 < param_2 + param_3) { local_44 = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3); bVar3 = 0 < local_44; } if (!bVar3) break; my_tosort_utf16(uVar2,&local_38); local_60 = ((local_60 & 0x3f) + local_68) * (local_38 & 0xff) + local_60 * 0x100 ^ local_60; local_60 = ((local_60 & 0x3f) + local_68 + 3) * (local_38 >> 8) + local_60 * 0x100 ^ local_60; local_68 = local_68 + 6; local_18 = local_18 + (long)local_44; } *local_28 = local_60; *local_30 = local_68; return; }
15,511
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O0
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movl $0x0, 0x4(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, (%rax) jge 0xda99e cmpq $0x0, 0x8(%rsp) je 0xda98e movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi movl $0x214, %edx # imm = 0x214 callq 0x520f0 jmp 0xda99c callq 0xda6d0 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) jmp 0xda99e movl $0x0, (%rsp) cmpl $0x200, (%rsp) # imm = 0x200 jge 0xda9d6 movq 0x10(%rsp), %rax movslq (%rsp), %rcx testb $0x1, 0x4(%rax,%rcx) je 0xda9c9 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0xda9cb movl (%rsp), %eax addl $0x1, %eax movl %eax, (%rsp) jmp 0xda9a5 cmpl $0x0, 0x4(%rsp) je 0xdaa24 movl 0x4(%rsp), %eax movq 0x10(%rsp), %rcx cmpl (%rcx), %eax jge 0xdaa24 jmp 0xda9ec xorl %eax, %eax leaq 0x1709d3(%rip), %rcx # 0x24b3c8 cmpl (%rcx), %eax jg 0xdaa20 callq 0x1800d0 movq %rax, %rdi movl 0x4(%rsp), %ecx movq 0x10(%rsp), %rax movl (%rax), %r8d movl $0x3, %esi leaq 0xf2416(%rip), %rdx # 0x1cce2f movb $0x0, %al callq 0x1801c0 jmp 0xdaa22 jmp 0xdaa24 addq $0x18, %rsp retq nopl (%rax)
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov [rsp+18h+var_14], 0 mov rax, [rsp+18h+var_8] cmp dword ptr [rax], 0 jge short loc_DA99E cmp [rsp+18h+var_10], 0 jz short loc_DA98E mov rsi, [rsp+18h+var_10] mov rdi, [rsp+18h+var_8] mov edx, 214h call _memcpy jmp short loc_DA99C loc_DA98E: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov ecx, eax mov rax, [rsp+18h+var_8] mov [rax], ecx loc_DA99C: jmp short $+2 loc_DA99E: mov [rsp+18h+var_18], 0 loc_DA9A5: cmp [rsp+18h+var_18], 200h jge short loc_DA9D6 mov rax, [rsp+18h+var_8] movsxd rcx, [rsp+18h+var_18] test byte ptr [rax+rcx+4], 1 jz short loc_DA9C9 mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax loc_DA9C9: jmp short $+2 loc_DA9CB: mov eax, [rsp+18h+var_18] add eax, 1 mov [rsp+18h+var_18], eax jmp short loc_DA9A5 loc_DA9D6: cmp [rsp+18h+var_14], 0 jz short loc_DAA24 mov eax, [rsp+18h+var_14] mov rcx, [rsp+18h+var_8] cmp eax, [rcx] jge short loc_DAA24 jmp short $+2 loc_DA9EC: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_DAA20 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov ecx, [rsp+18h+var_14] mov rax, [rsp+18h+var_8] mov r8d, [rax] mov esi, 3 lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_DAA20: jmp short $+2 loc_DAA22: jmp short $+2 loc_DAA24: add rsp, 18h retn
long long postprocess_cpu_params(_DWORD *a1, long long a2) { long long result; // rax int num_math; // ecx int v4; // eax int v5; // r9d int i; // [rsp+0h] [rbp-18h] unsigned int v7; // [rsp+4h] [rbp-14h] v7 = 0; result = (long long)a1; if ( (int)*a1 < 0 ) { if ( a2 ) { result = memcpy(a1, a2, 532LL); } else { num_math = cpu_get_num_math(); result = (long long)a1; *a1 = num_math; } } for ( i = 0; i < 512; ++i ) { if ( (*((_BYTE *)a1 + i + 4) & 1) != 0 ) ++v7; result = (unsigned int)(i + 1); } if ( v7 ) { result = v7; if ( (signed int)v7 < *a1 ) { result = 0LL; if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); return common_log_add( v4, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v7, *a1, v5); } } } return result; }
postprocess_cpu_params: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x4],0x0 MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX],0x0 JGE 0x001da99e CMP qword ptr [RSP + 0x8],0x0 JZ 0x001da98e MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] MOV EDX,0x214 CALL 0x001520f0 JMP 0x001da99c LAB_001da98e: CALL 0x001da6d0 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX LAB_001da99c: JMP 0x001da99e LAB_001da99e: MOV dword ptr [RSP],0x0 LAB_001da9a5: CMP dword ptr [RSP],0x200 JGE 0x001da9d6 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP] TEST byte ptr [RAX + RCX*0x1 + 0x4],0x1 JZ 0x001da9c9 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX LAB_001da9c9: JMP 0x001da9cb LAB_001da9cb: MOV EAX,dword ptr [RSP] ADD EAX,0x1 MOV dword ptr [RSP],EAX JMP 0x001da9a5 LAB_001da9d6: CMP dword ptr [RSP + 0x4],0x0 JZ 0x001daa24 MOV EAX,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x10] CMP EAX,dword ptr [RCX] JGE 0x001daa24 JMP 0x001da9ec LAB_001da9ec: XOR EAX,EAX LEA RCX,[0x34b3c8] CMP EAX,dword ptr [RCX] JG 0x001daa20 CALL 0x002800d0 MOV RDI,RAX MOV ECX,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x10] MOV R8D,dword ptr [RAX] MOV ESI,0x3 LEA RDX,[0x2cce2f] MOV AL,0x0 CALL 0x002801c0 LAB_001daa20: JMP 0x001daa22 LAB_001daa22: JMP 0x001daa24 LAB_001daa24: ADD RSP,0x18 RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int4 uVar1; int8 uVar2; int local_18; int local_14; local_14 = 0; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar1 = cpu_get_num_math(); *(int4 *)param_1 = uVar1; } else { memcpy(param_1,param_2,0x214); } } for (local_18 = 0; local_18 < 0x200; local_18 = local_18 + 1) { if (((byte)param_1[(long)local_18 + 4] & 1) != 0) { local_14 = local_14 + 1; } } if (((local_14 != 0) && (local_14 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); common_log_add(uVar2,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", local_14,*(int4 *)param_1); } return; }
15,512
thai2sortable
eloqsql/strings/ctype-tis620.c
static size_t thai2sortable(uchar *tstr, size_t len) { uchar *p; size_t tlen; uchar l2bias; tlen= len; l2bias= 256 - 8; for (p= tstr; tlen > 0; p++, tlen--) { uchar c= *p; if (isthai(c)) { const int *t_ctype0= t_ctype[c]; if (isconsnt(c)) l2bias -= 8; if (isldvowel(c) && tlen != 1 && isconsnt(p[1])) { /* simply swap between leading-vowel and consonant */ *p= p[1]; p[1]= c; tlen--; p++; continue; } /* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */ if (t_ctype0[1] >= L2_GARAN) { /* l2bias use to control position weight of l2char example (*=l2char) XX*X must come before X*XX */ memmove((char*) p, (char*) (p+1), tlen-1); tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1; p--; continue; } } else { l2bias-= 8; *p= to_lower_tis620[c]; } } return len; }
O3
c
thai2sortable: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x38(%rbp) movq %rsi, -0x30(%rbp) testq %rsi, %rsi je 0x5bafc movb $-0x8, %r13b leaq 0x1fe651(%rip), %r12 # 0x25a090 leaq 0x305b5a(%rip), %r8 # 0x3615a0 movq -0x38(%rbp), %r15 movq -0x30(%rbp), %rbx movb (%r15), %al movzbl %al, %ecx testb %cl, %cl js 0x5ba70 addb $-0x8, %r13b movb (%rcx,%r8), %al movb %al, (%r15) incq %r15 decq %rbx jne 0x5ba4e jmp 0x5bafc leaq (%rcx,%rcx,4), %rcx movl 0x10(%r12,%rcx,4), %edx leal -0x8(%r13), %esi testb $0x10, %dl movzbl %r13b, %edi movzbl %sil, %r13d cmovel %edi, %r13d cmpq $0x1, %rbx je 0x5baa9 andl $0x20, %edx je 0x5baa9 movzbl 0x1(%r15), %edx leaq -0xcf(%rdx), %rsi cmpq $-0x2e, %rsi jae 0x5baea leaq (%r12,%rcx,4), %rax movl 0x4(%rax), %r14d cmpl $0x9, %r14d jl 0x5ba63 leaq 0x1(%r15), %rsi leaq -0x1(%rbx), %rdx movq %r15, %rdi callq 0x25510 leaq 0x305ad2(%rip), %r8 # 0x3615a0 addb %r13b, %r14b addb $-0x8, %r14b movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movb %r14b, -0x1(%rcx,%rax) decq %r15 jmp 0x5ba63 movb %dl, (%r15) movb %al, 0x1(%r15) incq %r15 decq %rbx jmp 0x5ba63 movq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
thai2sortable: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdi mov [rbp+var_30], rsi test rsi, rsi jz loc_5BAFC mov r13b, 0F8h lea r12, t_ctype lea r8, to_lower_tis620 mov r15, [rbp+var_38] mov rbx, [rbp+var_30] loc_5BA4E: mov al, [r15] movzx ecx, al test cl, cl js short loc_5BA70 add r13b, 0F8h mov al, [rcx+r8] mov [r15], al loc_5BA63: inc r15 dec rbx jnz short loc_5BA4E jmp loc_5BAFC loc_5BA70: lea rcx, [rcx+rcx*4] mov edx, [r12+rcx*4+10h] lea esi, [r13-8] test dl, 10h movzx edi, r13b movzx r13d, sil cmovz r13d, edi cmp rbx, 1 jz short loc_5BAA9 and edx, 20h jz short loc_5BAA9 movzx edx, byte ptr [r15+1] lea rsi, [rdx-0CFh] cmp rsi, 0FFFFFFFFFFFFFFD2h jnb short loc_5BAEA loc_5BAA9: lea rax, [r12+rcx*4] mov r14d, [rax+4] cmp r14d, 9 jl short loc_5BA63 lea rsi, [r15+1] lea rdx, [rbx-1] mov rdi, r15 call _memmove lea r8, to_lower_tis620 add r14b, r13b add r14b, 0F8h mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov [rcx+rax-1], r14b dec r15 jmp loc_5BA63 loc_5BAEA: mov [r15], dl mov [r15+1], al inc r15 dec rbx jmp loc_5BA63 loc_5BAFC: mov rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long thai2sortable(unsigned __int8 *a1, long long a2) { char v2; // r13 unsigned __int8 *v3; // r15 long long v4; // rbx unsigned __int8 v5; // al long long v6; // rcx long long v7; // rcx int v8; // edx char v9; // di long long v10; // rdx int v11; // r14d if ( a2 ) { v2 = -8; v3 = a1; v4 = a2; do { v5 = *v3; v6 = *v3; if ( (v6 & 0x80u) != 0LL ) { v7 = 5 * v6; v8 = t_ctype[v7 + 4]; v9 = v2; v2 -= 8; if ( (v8 & 0x10) == 0 ) v2 = v9; if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) ) { *v3 = v10; *++v3 = v5; --v4; } else { v11 = t_ctype[v7 + 1]; if ( v11 >= 9 ) { memmove(v3, v3 + 1, v4 - 1); a1[a2 - 1] = v2 + v11 - 8; --v3; } } } else { v2 -= 8; *v3 = to_lower_tis620[v6]; } ++v3; --v4; } while ( v4 ); } return a2; }
thai2sortable: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RSI TEST RSI,RSI JZ 0x0015bafc MOV R13B,0xf8 LEA R12,[0x35a090] LEA R8,[0x4615a0] MOV R15,qword ptr [RBP + -0x38] MOV RBX,qword ptr [RBP + -0x30] LAB_0015ba4e: MOV AL,byte ptr [R15] MOVZX ECX,AL TEST CL,CL JS 0x0015ba70 ADD R13B,0xf8 MOV AL,byte ptr [RCX + R8*0x1] MOV byte ptr [R15],AL LAB_0015ba63: INC R15 DEC RBX JNZ 0x0015ba4e JMP 0x0015bafc LAB_0015ba70: LEA RCX,[RCX + RCX*0x4] MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10] LEA ESI,[R13 + -0x8] TEST DL,0x10 MOVZX EDI,R13B MOVZX R13D,SIL CMOVZ R13D,EDI CMP RBX,0x1 JZ 0x0015baa9 AND EDX,0x20 JZ 0x0015baa9 MOVZX EDX,byte ptr [R15 + 0x1] LEA RSI,[RDX + -0xcf] CMP RSI,-0x2e JNC 0x0015baea LAB_0015baa9: LEA RAX,[R12 + RCX*0x4] MOV R14D,dword ptr [RAX + 0x4] CMP R14D,0x9 JL 0x0015ba63 LEA RSI,[R15 + 0x1] LEA RDX,[RBX + -0x1] MOV RDI,R15 CALL 0x00125510 LEA R8,[0x4615a0] ADD R14B,R13B ADD R14B,0xf8 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B DEC R15 JMP 0x0015ba63 LAB_0015baea: MOV byte ptr [R15],DL MOV byte ptr [R15 + 0x1],AL INC R15 DEC RBX JMP 0x0015ba63 LAB_0015bafc: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long thai2sortable(byte *param_1,long param_2) { byte bVar1; int iVar2; char cVar3; ulong uVar4; long lVar5; char cVar6; byte *__dest; if (param_2 != 0) { cVar6 = -8; lVar5 = param_2; __dest = param_1; do { bVar1 = *__dest; uVar4 = (ulong)bVar1; if ((char)bVar1 < '\0') { cVar3 = cVar6 + -8; if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) { cVar3 = cVar6; } cVar6 = cVar3; if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) || ((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) { iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4); if (8 < iVar2) { memmove(__dest,__dest + 1,lVar5 - 1); param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8; __dest = __dest + -1; } } else { *__dest = __dest[1]; __dest[1] = bVar1; __dest = __dest + 1; lVar5 = lVar5 + -1; } } else { *__dest = to_lower_tis620[uVar4]; cVar6 = cVar6 + -8; } __dest = __dest + 1; lVar5 = lVar5 + -1; } while (lVar5 != 0); } return param_2; }
15,513
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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, bool)
monkey531[P]llama/common/./json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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, bool): subq $0x158, %rsp # imm = 0x158 movq %rdx, 0x8(%rsp) movq %rdi, 0x10(%rsp) movb %r8b, %al movq %rdi, %r8 movq %r8, 0x18(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) andb $0x1, %cl movb %cl, 0x13f(%rsp) andb $0x1, %al movb %al, 0x13e(%rsp) movb $0x0, 0x13d(%rsp) xorl %eax, %eax movl %eax, %esi callq 0xa18c0 movq 0x148(%rsp), %rdi callq 0x14fb00 movq %rdx, 0x20(%rsp) movq %rax, 0x28(%rsp) jmp 0x246f91 movq 0x8(%rsp), %rsi movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, 0x60(%rsp) movq %rax, 0x68(%rsp) leaq 0x30(%rsp), %rdi callq 0x14fb30 jmp 0x246fb6 movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movzbl 0x13e(%rsp), %r9d movzbl 0x13f(%rsp), %r8d andl $0x1, %r8d andl $0x1, %r9d leaq 0x70(%rsp), %rdi leaq 0x30(%rsp), %rcx callq 0x14fa20 jmp 0x246feb movq 0x10(%rsp), %rdx leaq 0x70(%rsp), %rdi movl $0x1, %esi callq 0x14fbe0 jmp 0x247001 leaq 0x70(%rsp), %rdi callq 0x1502c0 leaq 0x30(%rsp), %rdi callq 0x14fa10 movb $0x1, 0x13d(%rsp) testb $0x1, 0x13d(%rsp) jne 0x247077 jmp 0x24706d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0x247084 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0x247061 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x70(%rsp), %rdi callq 0x1502c0 leaq 0x30(%rsp), %rdi callq 0x14fa10 jmp 0x247084 movq 0x10(%rsp), %rdi callq 0xa1a90 movq 0x18(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq 0x10(%rsp), %rdi callq 0xa1a90 movq 0x58(%rsp), %rdi callq 0x64e40 nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: sub rsp, 158h mov [rsp+158h+var_150], rdx mov [rsp+158h+var_148], rdi mov al, r8b mov r8, rdi mov [rsp+158h+var_140], r8 mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx and cl, 1 mov [rsp+158h+var_19], cl and al, 1 mov [rsp+158h+var_1A], al mov [rsp+158h+var_1B], 0 xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) mov rdi, [rsp+158h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail13input_adapterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_36container_input_adapter_factory_impl31container_input_adapter_factoryIT_vE12adapter_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::input_adapter<std::string>(std::string const&) mov [rsp+158h+var_138], rdx mov [rsp+158h+var_130], rax jmp short $+2 loc_246F91: mov rsi, [rsp+158h+var_150] mov rax, [rsp+158h+var_138] mov rcx, [rsp+158h+var_130] mov [rsp+158h+var_F8], rcx mov [rsp+158h+var_F0], rax lea rdi, [rsp+158h+var_128] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) jmp short $+2 loc_246FB6: mov rsi, [rsp+158h+var_F8] mov rdx, [rsp+158h+var_F0] movzx r9d, [rsp+158h+var_1A] movzx r8d, [rsp+158h+var_19] and r8d, 1 and r9d, 1 lea rdi, [rsp+158h+var_E8] lea rcx, [rsp+158h+var_128] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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,bool) jmp short $+2 loc_246FEB: mov rdx, [rsp+158h+var_148] lea rdi, [rsp+158h+var_E8] mov esi, 1 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) jmp short $+2 loc_247001: lea rdi, [rsp+158h+var_E8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() lea rdi, [rsp+158h+var_128] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::~function() mov [rsp+158h+var_1B], 1 test [rsp+158h+var_1B], 1 jnz short loc_247077 jmp short loc_24706D mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_247084 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_247061 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_68] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() loc_247061: lea rdi, [rsp+arg_28] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::~function() jmp short loc_247084 loc_24706D: mov rdi, [rsp+158h+var_148] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_247077: mov rax, [rsp+158h+var_140] add rsp, 158h retn loc_247084: mov rdi, [rsp+arg_8] 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() mov rdi, [rsp+arg_50] call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( long long a1, long long a2, long long a3, char a4, char a5) { long long v5; // rdx _BYTE v8[48]; // [rsp+30h] [rbp-128h] BYREF long long v9; // [rsp+60h] [rbp-F8h] long long v10; // [rsp+68h] [rbp-F0h] _BYTE v11[206]; // [rsp+70h] [rbp-E8h] BYREF char v12; // [rsp+13Eh] [rbp-1Ah] char v13; // [rsp+13Fh] [rbp-19h] long long v14; // [rsp+140h] [rbp-18h] long long v15; // [rsp+148h] [rbp-10h] long long v16; // [rsp+150h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4 & 1; v12 = a5 & 1; v11[205] = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(a1); v9 = nlohmann::json_abi_v3_11_3::detail::input_adapter<std::string>(a2); v10 = v5; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( (std::_Function_base *)v8, 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v11, v9, v10, (long long)v8, v13 & 1, v12 & 1); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v11, 1, a1); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser((std::_Function_base *)v11); std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::~function((std::_Function_base *)v8); return a1; }
__normal_iterator: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX RET
/* __gnu_cxx::__normal_iterator<std::unique_ptr<server_task_result, std::default_delete<server_task_result> > const*, std::vector<std::unique_ptr<server_task_result, std::default_delete<server_task_result> >, std::allocator<std::unique_ptr<server_task_result, std::default_delete<server_task_result> > > > >::__normal_iterator(std::unique_ptr<server_task_result, std::default_delete<server_task_result> > const* const&) */ void __thiscall __gnu_cxx:: __normal_iterator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>const*,std::vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>> ::__normal_iterator(__normal_iterator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>const*,std::vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>> *this,unique_ptr **param_1) { *(unique_ptr **)this = *param_1; return; }
15,514
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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, bool)
monkey531[P]llama/common/./json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xf0, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movq (%rsi), %r15 movq 0x8(%rsi), %r12 leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x7a78c addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r15, %rsi movq %r12, %rdx callq 0x7a6e0 leaq 0x28(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x7a7ea leaq 0x50(%rsp), %r14 movq %r14, %rdi callq 0x7aeb6 movq -0x18(%r14), %rax testq %rax, %rax je 0x1047dc leaq 0x28(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x18(%rsp), %rax testq %rax, %rax je 0x1047f5 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xf0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x104839 jmp 0x104839 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x7adac jmp 0x10481e movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x104844 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x104844 movq %rax, %rdi callq 0x3f24b movq %rax, %r14 movq %rbx, %rdi callq 0x44196 movq %r14, %rdi callq 0x20380
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r12 push rbx sub rsp, 0F0h mov ebp, r8d mov r14d, ecx mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov r15, [rsi] mov r12, [rsi+8] lea rdi, [rsp+118h+var_110] mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F0] lea rcx, [rsp+118h+var_110] mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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,bool) lea rdi, [rsp+118h+var_F0]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_C8] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_1047DC lea rdi, [rsp+118h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_1047DC: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_1047F5 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax loc_1047F5: mov rax, rbx add rsp, 0F0h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short loc_104839 jmp short loc_104839 mov r14, rax lea rdi, [rsp+118h+var_F0] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_10481E mov r14, rax loc_10481E: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_104844 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax jmp short loc_104844 loc_104839: mov rdi, rax call __clang_call_terminate mov r14, rax loc_104844: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v7; // r15 long long v8; // r12 __int128 v10; // [rsp+8h] [rbp-110h] BYREF void ( *v11)(__int128 *, __int128 *, long long); // [rsp+18h] [rbp-100h] int v12[4]; // [rsp+28h] [rbp-F0h] BYREF void ( *v13)(int *, int *, long long); // [rsp+38h] [rbp-E0h] _QWORD v14[25]; // [rsp+50h] [rbp-C8h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; v7 = *a2; v8 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( &v10, 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v12, v7, v7 + v8, &v10, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v12, 1, (char *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v14); if ( v13 ) v13(v12, v12, 3LL); if ( v11 ) v11(&v10, &v10, 3LL); return a1; }
15,515
bf_set_zero
bluesky950520[P]quickjs/libbf.c
void bf_set_zero(bf_t *r, int is_neg) { bf_resize(r, 0); /* cannot fail */ r->expn = BF_EXP_ZERO; r->sign = is_neg; }
O1
c
bf_set_zero: pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 cmpq $0x0, 0x18(%rdi) je 0x84c2e movq (%r14), %rax movq 0x20(%r14), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%r14) movq $0x0, 0x18(%r14) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r14) movl %ebx, 0x8(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq
bf_set_zero: push r14 push rbx push rax mov ebx, esi mov r14, rdi cmp qword ptr [rdi+18h], 0 jz short loc_84C2E mov rax, [r14] mov rsi, [r14+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [r14+20h], rax mov qword ptr [r14+18h], 0 loc_84C2E: mov rax, 8000000000000000h mov [r14+10h], rax mov [r14+8], ebx add rsp, 8 pop rbx pop r14 retn
unsigned long long bf_set_zero(_QWORD *a1, int a2) { unsigned long long result; // rax if ( a1[3] ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } result = 0x8000000000000000LL; a1[2] = 0x8000000000000000LL; *((_DWORD *)a1 + 2) = a2; return result; }
bf_set_zero: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI CMP qword ptr [RDI + 0x18],0x0 JZ 0x00184c2e MOV RAX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x18],0x0 LAB_00184c2e: MOV RAX,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RAX MOV dword ptr [R14 + 0x8],EBX ADD RSP,0x8 POP RBX POP R14 RET
void bf_set_zero(long *param_1,int4 param_2) { long lVar1; if (param_1[3] != 0) { lVar1 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar1; param_1[3] = 0; } param_1[2] = -0x8000000000000000; *(int4 *)(param_1 + 1) = param_2; return; }
15,516
blst_scalar_from_fr
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/exports.c
void blst_scalar_from_fr(pow256 ret, const vec256 a) { const union { long one; char little; } is_endian = { 1 }; if ((uptr_t)ret == (uptr_t)a && is_endian.little) { from_mont_256((limb_t *)ret, a, BLS12_381_r, r0); } else { vec256 out; from_mont_256(out, a, BLS12_381_r, r0); le_bytes_from_limbs(ret, out, 32); vec_zero(out, sizeof(out)); } }
O0
c
blst_scalar_from_fr: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq 0x32019(%rip), %rax # 0xe6330 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx cmpq %rcx, %rax jne 0xb4351 movsbl -0x18(%rbp), %eax cmpl $0x0, %eax je 0xb4351 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x31ac0(%rip), %rdx # 0xe5e00 movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF callq 0xcb4a0 jmp 0xb438f leaq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x31aa0(%rip), %rdx # 0xe5e00 movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF callq 0xcb4a0 movq -0x8(%rbp), %rdi leaq -0x40(%rbp), %rsi movl $0x20, %edx callq 0xb43a0 leaq -0x40(%rbp), %rdi movl $0x20, %esi callq 0xa7170 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
blst_scalar_from_fr: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, cs:qword_E6330 mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] cmp rax, rcx jnz short loc_B4351 movsx eax, byte ptr [rbp+var_18] cmp eax, 0 jz short loc_B4351 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, BLS12_381_r mov rcx, 0FFFFFFFEFFFFFFFFh call from_mont_256 jmp short loc_B438F loc_B4351: lea rdi, [rbp+var_40] mov rsi, [rbp+var_10] lea rdx, BLS12_381_r mov rcx, 0FFFFFFFEFFFFFFFFh call from_mont_256 mov rdi, [rbp+var_8] lea rsi, [rbp+var_40] mov edx, 20h ; ' ' call le_bytes_from_limbs lea rdi, [rbp+var_40] mov esi, 20h ; ' ' call vec_zero loc_B438F: add rsp, 40h pop rbp retn
long long blst_scalar_from_fr(long long a1, long long a2) { _BYTE v3[40]; // [rsp+0h] [rbp-40h] BYREF long long v4; // [rsp+28h] [rbp-18h] long long v5; // [rsp+30h] [rbp-10h] long long v6; // [rsp+38h] [rbp-8h] v6 = a1; v5 = a2; v4 = 1LL; if ( a1 == a2 ) return from_mont_256(v6, v5, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); from_mont_256(v3, v5, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); le_bytes_from_limbs(v6, v3, 32LL); return vec_zero((long long)v3, 0x20uLL); }
blst_scalar_from_fr: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [0x001e6330] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JNZ 0x001b4351 MOVSX EAX,byte ptr [RBP + -0x18] CMP EAX,0x0 JZ 0x001b4351 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x1e5e00] MOV RCX,-0x100000001 CALL 0x001cb4a0 JMP 0x001b438f LAB_001b4351: LEA RDI,[RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x1e5e00] MOV RCX,-0x100000001 CALL 0x001cb4a0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x40] MOV EDX,0x20 CALL 0x001b43a0 LEA RDI,[RBP + -0x40] MOV ESI,0x20 CALL 0x001a7170 LAB_001b438f: ADD RSP,0x40 POP RBP RET
void blst_scalar_from_fr(long param_1,long param_2) { int1 local_48 [40]; int8 local_20; long local_18; long local_10; local_20 = DAT_001e6330; local_18 = param_2; local_10 = param_1; if ((param_1 == param_2) && (local_20._0_1_ = (char)DAT_001e6330, (char)local_20 != '\0')) { from_mont_256(param_1,param_2,BLS12_381_r,0xfffffffeffffffff); } else { from_mont_256(local_48,param_2,BLS12_381_r,0xfffffffeffffffff); le_bytes_from_limbs(local_10,local_48,0x20); vec_zero(local_48,0x20); } return; }
15,517
mysql_load_plugin_v
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
struct st_mysql_client_plugin * STDCALL mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, int argc, va_list args) { const char *errmsg; #ifdef _WIN32 char errbuf[1024]; #endif char dlpath[FN_REFLEN+1]; void *sym, *dlhandle = NULL; struct st_mysql_client_plugin *plugin; char *env_plugin_dir= getenv("MARIADB_PLUGIN_DIR"); CLEAR_CLIENT_ERROR(mysql); if (is_not_initialized(mysql, name)) return NULL; pthread_mutex_lock(&LOCK_load_client_plugin); /* make sure the plugin wasn't loaded meanwhile */ if (type >= 0 && find_plugin(name, type)) { errmsg= "it is already loaded"; goto err; } /* Compile dll path */ #ifndef WIN32 snprintf(dlpath, sizeof(dlpath) - 1, "%s/%s%s", mysql->options.extension && mysql->options.extension->plugin_dir ? mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir : MARIADB_PLUGINDIR, name, SO_EXT); #else { char *p= (mysql->options.extension && mysql->options.extension->plugin_dir) ? mysql->options.extension->plugin_dir : env_plugin_dir; snprintf(dlpath, sizeof(dlpath), "%s%s%s%s", p ? p : "", p ? "\\" : "", name, SO_EXT); } #endif if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\")) { errmsg= "invalid plugin name"; goto err; } /* Open new dll handle */ if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW))) { #ifdef _WIN32 char winmsg[255]; size_t len; winmsg[0] = 0; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), winmsg, 255, NULL); len= strlen(winmsg); while (len > 0 && (winmsg[len - 1] == '\n' || winmsg[len - 1] == '\r')) len--; if (len) winmsg[len] = 0; snprintf(errbuf, sizeof(errbuf), "%s Library path is '%s'", winmsg, dlpath); errmsg= errbuf; #else errmsg= dlerror(); #endif goto err; } if (!(sym= dlsym(dlhandle, plugin_declarations_sym))) { errmsg= "not a plugin"; (void)dlclose(dlhandle); goto err; } plugin= (struct st_mysql_client_plugin*)sym; if (type >=0 && type != plugin->type) { errmsg= "type mismatch"; goto err; } if (strcmp(name, plugin->name)) { errmsg= "name mismatch"; goto err; } if (type < 0 && find_plugin(name, plugin->type)) { errmsg= "it is already loaded"; goto err; } plugin= add_plugin(mysql, plugin, dlhandle, argc, args); pthread_mutex_unlock(&LOCK_load_client_plugin); return plugin; err: if (dlhandle) dlclose(dlhandle); pthread_mutex_unlock(&LOCK_load_client_plugin); my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg); return NULL; }
O0
c
mysql_load_plugin_v: pushq %rbp movq %rsp, %rbp subq $0x280, %rsp # imm = 0x280 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movl %edx, -0x22c(%rbp) movl %ecx, -0x230(%rbp) movq %r8, -0x238(%rbp) movq $0x0, -0x250(%rbp) leaq 0x72454(%rip), %rdi # 0xcf0df callq 0x377a0 movq %rax, -0x260(%rbp) movq -0x220(%rbp), %rax movl $0x0, 0x90(%rax) movq -0x220(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x71ea0(%rip), %rsi # 0xceb5d callq 0x37410 movq -0x220(%rbp), %rax movb $0x0, 0x97(%rax) movq -0x220(%rbp), %rax cmpq $0x0, 0x2a0(%rax) je 0x5ccf6 movq -0x220(%rbp), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x5ccf8 movq -0x220(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0x5cb20 cmpl $0x0, %eax je 0x5cd20 movq $0x0, -0x218(%rbp) jmp 0x5cff9 leaq 0x394201(%rip), %rdi # 0x3f0f28 callq 0x37290 cmpl $0x0, -0x22c(%rbp) jl 0x5cd60 movq -0x228(%rbp), %rdi movl -0x22c(%rbp), %esi callq 0x5cb90 cmpq $0x0, %rax je 0x5cd60 leaq 0x7239e(%rip), %rax # 0xcf0f2 movq %rax, -0x240(%rbp) jmp 0x5cf93 leaq -0x210(%rbp), %rax movq %rax, -0x268(%rbp) movq -0x220(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x5cdad movq -0x220(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, (%rax) je 0x5cdad movq -0x220(%rbp), %rax movq 0x480(%rax), %rax movq (%rax), %rax movq %rax, -0x270(%rbp) jmp 0x5cde5 cmpq $0x0, -0x260(%rbp) je 0x5cdc7 movq -0x260(%rbp), %rax movq %rax, -0x278(%rbp) jmp 0x5cdd7 leaq 0x72341(%rip), %rax # 0xcf10f movq %rax, -0x278(%rbp) jmp 0x5cdd7 movq -0x278(%rbp), %rax movq %rax, -0x270(%rbp) movq -0x268(%rbp), %rdi movq -0x270(%rbp), %rcx movq -0x228(%rbp), %r8 movl $0x200, %esi # imm = 0x200 leaq 0x72301(%rip), %rdx # 0xcf107 leaq 0x72320(%rip), %r9 # 0xcf12d movb $0x0, %al callq 0x374d0 movq -0x228(%rbp), %rdi leaq 0x7230f(%rip), %rsi # 0xcf131 callq 0x37560 cmpq $0x0, %rax je 0x5ce40 leaq 0x72311(%rip), %rax # 0xcf145 movq %rax, -0x240(%rbp) jmp 0x5cf93 leaq -0x210(%rbp), %rdi movl $0x2, %esi callq 0x378d0 movq %rax, -0x250(%rbp) cmpq $0x0, %rax jne 0x5ce6f callq 0x37350 movq %rax, -0x240(%rbp) jmp 0x5cf93 movq -0x250(%rbp), %rdi leaq 0x722dc(%rip), %rsi # 0xcf159 callq 0x371d0 movq %rax, -0x248(%rbp) cmpq $0x0, %rax jne 0x5ceae leaq 0x722e5(%rip), %rax # 0xcf17b movq %rax, -0x240(%rbp) movq -0x250(%rbp), %rdi callq 0x37a90 jmp 0x5cf93 movq -0x248(%rbp), %rax movq %rax, -0x258(%rbp) cmpl $0x0, -0x22c(%rbp) jl 0x5cee9 movl -0x22c(%rbp), %eax movq -0x258(%rbp), %rcx cmpl (%rcx), %eax je 0x5cee9 leaq 0x722ab(%rip), %rax # 0xcf188 movq %rax, -0x240(%rbp) jmp 0x5cf93 movq -0x228(%rbp), %rdi movq -0x258(%rbp), %rax movq 0x8(%rax), %rsi callq 0x37880 cmpl $0x0, %eax je 0x5cf15 leaq 0x7228a(%rip), %rax # 0xcf196 movq %rax, -0x240(%rbp) jmp 0x5cf93 cmpl $0x0, -0x22c(%rbp) jge 0x5cf49 movq -0x228(%rbp), %rdi movq -0x258(%rbp), %rax movl (%rax), %esi callq 0x5cb90 cmpq $0x0, %rax je 0x5cf49 leaq 0x721b2(%rip), %rax # 0xcf0f2 movq %rax, -0x240(%rbp) jmp 0x5cf93 movq -0x220(%rbp), %rdi movq -0x258(%rbp), %rsi movq -0x250(%rbp), %rdx movl -0x230(%rbp), %ecx movq -0x238(%rbp), %r8 callq 0x5c6d0 movq %rax, -0x258(%rbp) leaq 0x393faa(%rip), %rdi # 0x3f0f28 callq 0x37260 movq -0x258(%rbp), %rax movq %rax, -0x218(%rbp) jmp 0x5cff9 cmpq $0x0, -0x250(%rbp) je 0x5cfa9 movq -0x250(%rbp), %rdi callq 0x37a90 leaq 0x393f78(%rip), %rdi # 0x3f0f28 callq 0x37260 movq -0x220(%rbp), %rdi leaq 0x1da78d(%rip), %rax # 0x237750 movq (%rax), %rdx leaq 0x1da793(%rip), %rax # 0x237760 movq 0x1d8(%rax), %rcx movq -0x228(%rbp), %r8 movq -0x240(%rbp), %r9 movl $0x80b, %esi # imm = 0x80B movb $0x0, %al callq 0x3ce90 movq $0x0, -0x218(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x280(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5d029 movq -0x280(%rbp), %rax addq $0x280, %rsp # imm = 0x280 popq %rbp retq callq 0x372c0 nop
mysql_load_plugin_v: push rbp mov rbp, rsp sub rsp, 280h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_22C], edx mov [rbp+var_230], ecx mov [rbp+var_238], r8 mov [rbp+var_250], 0 lea rdi, aMariadbPluginD; "MARIADB_PLUGIN_DIR" call _getenv mov [rbp+var_260], rax mov rax, [rbp+var_220] mov dword ptr [rax+90h], 0 mov rdi, [rbp+var_220] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_220] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_220] cmp qword ptr [rax+2A0h], 0 jz short loc_5CCF6 mov rax, [rbp+var_220] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_5CCF6: jmp short $+2 loc_5CCF8: mov rdi, [rbp+var_220] mov rsi, [rbp+var_228] call is_not_initialized cmp eax, 0 jz short loc_5CD20 mov [rbp+var_218], 0 jmp loc_5CFF9 loc_5CD20: lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock cmp [rbp+var_22C], 0 jl short loc_5CD60 mov rdi, [rbp+var_228] mov esi, [rbp+var_22C] call find_plugin cmp rax, 0 jz short loc_5CD60 lea rax, aItIsAlreadyLoa; "it is already loaded" mov [rbp+var_240], rax jmp loc_5CF93 loc_5CD60: lea rax, [rbp+var_210] mov [rbp+var_268], rax mov rax, [rbp+var_220] cmp qword ptr [rax+480h], 0 jz short loc_5CDAD mov rax, [rbp+var_220] mov rax, [rax+480h] cmp qword ptr [rax], 0 jz short loc_5CDAD mov rax, [rbp+var_220] mov rax, [rax+480h] mov rax, [rax] mov [rbp+var_270], rax jmp short loc_5CDE5 loc_5CDAD: cmp [rbp+var_260], 0 jz short loc_5CDC7 mov rax, [rbp+var_260] mov [rbp+var_278], rax jmp short loc_5CDD7 loc_5CDC7: lea rax, aHomeMonoInstal; "/home/mono/install/lib/plugin" mov [rbp+var_278], rax jmp short $+2 loc_5CDD7: mov rax, [rbp+var_278] mov [rbp+var_270], rax loc_5CDE5: mov rdi, [rbp+var_268] mov rcx, [rbp+var_270] mov r8, [rbp+var_228] mov esi, 200h lea rdx, aSSS_0; "%s/%s%s" lea r9, aSo; ".so" mov al, 0 call _snprintf mov rdi, [rbp+var_228] lea rsi, asc_CF131; "()[]!@#$%^&/*;.,'?\\" call _strpbrk cmp rax, 0 jz short loc_5CE40 lea rax, aInvalidPluginN; "invalid plugin name" mov [rbp+var_240], rax jmp loc_5CF93 loc_5CE40: lea rdi, [rbp+var_210] mov esi, 2 call _dlopen mov [rbp+var_250], rax cmp rax, 0 jnz short loc_5CE6F call _dlerror mov [rbp+var_240], rax jmp loc_5CF93 loc_5CE6F: mov rdi, [rbp+var_250] lea rsi, aMysqlClientPlu; "_mysql_client_plugin_declaration_" call _dlsym mov [rbp+var_248], rax cmp rax, 0 jnz short loc_5CEAE lea rax, aNotAPlugin; "not a plugin" mov [rbp+var_240], rax mov rdi, [rbp+var_250] call _dlclose jmp loc_5CF93 loc_5CEAE: mov rax, [rbp+var_248] mov [rbp+var_258], rax cmp [rbp+var_22C], 0 jl short loc_5CEE9 mov eax, [rbp+var_22C] mov rcx, [rbp+var_258] cmp eax, [rcx] jz short loc_5CEE9 lea rax, aTypeMismatch; "type mismatch" mov [rbp+var_240], rax jmp loc_5CF93 loc_5CEE9: mov rdi, [rbp+var_228] mov rax, [rbp+var_258] mov rsi, [rax+8] call _strcmp cmp eax, 0 jz short loc_5CF15 lea rax, aNameMismatch; "name mismatch" mov [rbp+var_240], rax jmp short loc_5CF93 loc_5CF15: cmp [rbp+var_22C], 0 jge short loc_5CF49 mov rdi, [rbp+var_228] mov rax, [rbp+var_258] mov esi, [rax] call find_plugin cmp rax, 0 jz short loc_5CF49 lea rax, aItIsAlreadyLoa; "it is already loaded" mov [rbp+var_240], rax jmp short loc_5CF93 loc_5CF49: mov rdi, [rbp+var_220] mov rsi, [rbp+var_258] mov rdx, [rbp+var_250] mov ecx, [rbp+var_230] mov r8, [rbp+var_238] call add_plugin mov [rbp+var_258], rax lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock mov rax, [rbp+var_258] mov [rbp+var_218], rax jmp short loc_5CFF9 loc_5CF93: cmp [rbp+var_250], 0 jz short loc_5CFA9 mov rdi, [rbp+var_250] call _dlclose loc_5CFA9: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock mov rdi, [rbp+var_220] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] mov r8, [rbp+var_228] mov r9, [rbp+var_240] mov esi, 80Bh mov al, 0 call my_set_error mov [rbp+var_218], 0 loc_5CFF9: mov rax, [rbp+var_218] mov [rbp+var_280], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5D029 mov rax, [rbp+var_280] add rsp, 280h pop rbp retn loc_5D029: call ___stack_chk_fail
void (** mysql_load_plugin_v(long long a1, const char *a2, signed int a3, unsigned int a4, long long a5))(void) { const char *v6; // [rsp+8h] [rbp-278h] long long v7; // [rsp+20h] [rbp-260h] void (**v8)(void); // [rsp+28h] [rbp-258h] long long v9; // [rsp+30h] [rbp-250h] long long v10; // [rsp+38h] [rbp-248h] const char *v11; // [rsp+40h] [rbp-240h] _BYTE v16[520]; // [rsp+70h] [rbp-210h] BYREF unsigned long long v17; // [rsp+278h] [rbp-8h] v17 = __readfsqword(0x28u); v9 = 0LL; v7 = getenv("MARIADB_PLUGIN_DIR"); *(_DWORD *)(a1 + 144) = 0; strcpy(a1 + 663, "00000"); *(_BYTE *)(a1 + 151) = 0; if ( *(_QWORD *)(a1 + 672) ) *(_DWORD *)(*(_QWORD *)(a1 + 672) + 4LL) = 0; if ( (unsigned int)is_not_initialized(a1, (long long)a2) ) return 0LL; pthread_mutex_lock(&LOCK_load_client_plugin); if ( a3 >= 0 && find_plugin((long long)a2, a3) ) { v11 = "it is already loaded"; } else { if ( *(_QWORD *)(a1 + 1152) && **(_QWORD **)(a1 + 1152) ) { snprintf(v16, 512LL, "%s/%s%s", **(const char ***)(a1 + 1152), a2, ".so"); } else { if ( v7 ) v6 = (const char *)v7; else v6 = "/home/mono/install/lib/plugin"; snprintf(v16, 512LL, "%s/%s%s", v6, a2, ".so"); } if ( strpbrk(a2, "()[]!@#$%^&/*;.,'?\\") ) { v11 = "invalid plugin name"; } else { v9 = dlopen(v16, 2LL); if ( v9 ) { v10 = dlsym(v9, "_mysql_client_plugin_declaration_"); if ( v10 ) { if ( a3 < 0 || a3 == *(_DWORD *)v10 ) { if ( !(unsigned int)strcmp(a2, *(_QWORD *)(v10 + 8)) ) { if ( a3 >= 0 || !find_plugin((long long)a2, *(_DWORD *)v10) ) { v8 = add_plugin(a1, (void (**)(void))v10, v9, a4, a5); pthread_mutex_unlock(&LOCK_load_client_plugin); return v8; } v11 = "it is already loaded"; } else { v11 = "name mismatch"; } } else { v11 = "type mismatch"; } } else { v11 = "not a plugin"; dlclose(v9); } } else { v11 = (const char *)dlerror(); } } } if ( v9 ) dlclose(v9); pthread_mutex_unlock(&LOCK_load_client_plugin); my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, v11); return 0LL; }
mysql_load_plugin_v: PUSH RBP MOV RBP,RSP SUB RSP,0x280 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV dword ptr [RBP + -0x22c],EDX MOV dword ptr [RBP + -0x230],ECX MOV qword ptr [RBP + -0x238],R8 MOV qword ptr [RBP + -0x250],0x0 LEA RDI,[0x1cf0df] CALL 0x001377a0 MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr [RBP + -0x220] MOV dword ptr [RAX + 0x90],0x0 MOV RDI,qword ptr [RBP + -0x220] ADD RDI,0x297 LEA RSI,[0x1ceb5d] CALL 0x00137410 MOV RAX,qword ptr [RBP + -0x220] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x0015ccf6 MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_0015ccf6: JMP 0x0015ccf8 LAB_0015ccf8: MOV RDI,qword ptr [RBP + -0x220] MOV RSI,qword ptr [RBP + -0x228] CALL 0x0015cb20 CMP EAX,0x0 JZ 0x0015cd20 MOV qword ptr [RBP + -0x218],0x0 JMP 0x0015cff9 LAB_0015cd20: LEA RDI,[0x4f0f28] CALL 0x00137290 CMP dword ptr [RBP + -0x22c],0x0 JL 0x0015cd60 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x22c] CALL 0x0015cb90 CMP RAX,0x0 JZ 0x0015cd60 LEA RAX,[0x1cf0f2] MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015cd60: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x268],RAX MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0015cdad MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX],0x0 JZ 0x0015cdad MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x270],RAX JMP 0x0015cde5 LAB_0015cdad: CMP qword ptr [RBP + -0x260],0x0 JZ 0x0015cdc7 MOV RAX,qword ptr [RBP + -0x260] MOV qword ptr [RBP + -0x278],RAX JMP 0x0015cdd7 LAB_0015cdc7: LEA RAX,[0x1cf10f] MOV qword ptr [RBP + -0x278],RAX JMP 0x0015cdd7 LAB_0015cdd7: MOV RAX,qword ptr [RBP + -0x278] MOV qword ptr [RBP + -0x270],RAX LAB_0015cde5: MOV RDI,qword ptr [RBP + -0x268] MOV RCX,qword ptr [RBP + -0x270] MOV R8,qword ptr [RBP + -0x228] MOV ESI,0x200 LEA RDX,[0x1cf107] LEA R9,[0x1cf12d] MOV AL,0x0 CALL 0x001374d0 MOV RDI,qword ptr [RBP + -0x228] LEA RSI,[0x1cf131] CALL 0x00137560 CMP RAX,0x0 JZ 0x0015ce40 LEA RAX,[0x1cf145] MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015ce40: LEA RDI,[RBP + -0x210] MOV ESI,0x2 CALL 0x001378d0 MOV qword ptr [RBP + -0x250],RAX CMP RAX,0x0 JNZ 0x0015ce6f CALL 0x00137350 MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015ce6f: MOV RDI,qword ptr [RBP + -0x250] LEA RSI,[0x1cf159] CALL 0x001371d0 MOV qword ptr [RBP + -0x248],RAX CMP RAX,0x0 JNZ 0x0015ceae LEA RAX,[0x1cf17b] MOV qword ptr [RBP + -0x240],RAX MOV RDI,qword ptr [RBP + -0x250] CALL 0x00137a90 JMP 0x0015cf93 LAB_0015ceae: MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x258],RAX CMP dword ptr [RBP + -0x22c],0x0 JL 0x0015cee9 MOV EAX,dword ptr [RBP + -0x22c] MOV RCX,qword ptr [RBP + -0x258] CMP EAX,dword ptr [RCX] JZ 0x0015cee9 LEA RAX,[0x1cf188] MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015cee9: MOV RDI,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x258] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00137880 CMP EAX,0x0 JZ 0x0015cf15 LEA RAX,[0x1cf196] MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015cf15: CMP dword ptr [RBP + -0x22c],0x0 JGE 0x0015cf49 MOV RDI,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x258] MOV ESI,dword ptr [RAX] CALL 0x0015cb90 CMP RAX,0x0 JZ 0x0015cf49 LEA RAX,[0x1cf0f2] MOV qword ptr [RBP + -0x240],RAX JMP 0x0015cf93 LAB_0015cf49: MOV RDI,qword ptr [RBP + -0x220] MOV RSI,qword ptr [RBP + -0x258] MOV RDX,qword ptr [RBP + -0x250] MOV ECX,dword ptr [RBP + -0x230] MOV R8,qword ptr [RBP + -0x238] CALL 0x0015c6d0 MOV qword ptr [RBP + -0x258],RAX LEA RDI,[0x4f0f28] CALL 0x00137260 MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x218],RAX JMP 0x0015cff9 LAB_0015cf93: CMP qword ptr [RBP + -0x250],0x0 JZ 0x0015cfa9 MOV RDI,qword ptr [RBP + -0x250] CALL 0x00137a90 LAB_0015cfa9: LEA RDI,[0x4f0f28] CALL 0x00137260 MOV RDI,qword ptr [RBP + -0x220] LEA RAX,[0x337750] MOV RDX,qword ptr [RAX] LEA RAX,[0x337760] MOV RCX,qword ptr [RAX + 0x1d8] MOV R8,qword ptr [RBP + -0x228] MOV R9,qword ptr [RBP + -0x240] MOV ESI,0x80b MOV AL,0x0 CALL 0x0013ce90 MOV qword ptr [RBP + -0x218],0x0 LAB_0015cff9: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x280],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015d029 MOV RAX,qword ptr [RBP + -0x280] ADD RSP,0x280 POP RBP RET LAB_0015d029: CALL 0x001372c0
int8 mysql_load_plugin_v(long param_1,char *param_2,int param_3,int4 param_4,int8 param_5) { int iVar1; long lVar2; char *pcVar3; int *piVar4; long in_FS_OFFSET; char *local_280; char *local_278; long local_258; char *local_248; int8 local_220; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_258 = 0; local_280 = getenv("MARIADB_PLUGIN_DIR"); *(int4 *)(param_1 + 0x90) = 0; strcpy((char *)(param_1 + 0x297),"00000"); *(int1 *)(param_1 + 0x97) = 0; if (*(long *)(param_1 + 0x2a0) != 0) { *(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0; } iVar1 = is_not_initialized(param_1,param_2); if (iVar1 == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); if ((param_3 < 0) || (lVar2 = find_plugin(param_2,param_3), lVar2 == 0)) { if ((*(long *)(param_1 + 0x480) == 0) || (**(long **)(param_1 + 0x480) == 0)) { if (local_280 == (char *)0x0) { local_280 = "/home/mono/install/lib/plugin"; } local_278 = local_280; } else { local_278 = (char *)**(int8 **)(param_1 + 0x480); } snprintf(local_218,0x200,"%s/%s%s",local_278,param_2,&DAT_001cf12d); pcVar3 = strpbrk(param_2,"()[]!@#$%^&/*;.,\'?\\"); if (pcVar3 == (char *)0x0) { local_258 = dlopen(local_218,2); if (local_258 == 0) { local_248 = (char *)dlerror(); } else { piVar4 = (int *)dlsym(local_258,"_mysql_client_plugin_declaration_"); if (piVar4 == (int *)0x0) { local_248 = "not a plugin"; dlclose(local_258); } else if ((param_3 < 0) || (param_3 == *piVar4)) { iVar1 = strcmp(param_2,*(char **)(piVar4 + 2)); if (iVar1 == 0) { if ((-1 < param_3) || (lVar2 = find_plugin(param_2,*piVar4), lVar2 == 0)) { local_220 = add_plugin(param_1,piVar4,local_258,param_4,param_5); pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); goto LAB_0015cff9; } local_248 = "it is already loaded"; } else { local_248 = "name mismatch"; } } else { local_248 = "type mismatch"; } } } else { local_248 = "invalid plugin name"; } } else { local_248 = "it is already loaded"; } if (local_258 != 0) { dlclose(local_258); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00337938, param_2,local_248); local_220 = 0; } else { local_220 = 0; } LAB_0015cff9: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_220; }
15,518
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _add_primitive(const std::string & name, const BuiltinRule & rule) { auto n = _add_rule(name, rule.content); for (const auto & dep : rule.deps) { BuiltinRule dep_rule; auto it = PRIMITIVE_RULES.find(dep); if (it == PRIMITIVE_RULES.end()) { it = STRING_FORMAT_RULES.find(dep); if (it == STRING_FORMAT_RULES.end()) { _errors.push_back("Rule " + dep + " not known"); continue; } } if (_rules.find(dep) == _rules.end()) { _add_primitive(dep, it->second); } } return n; }
O0
cpp
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&): subq $0x168, %rsp # imm = 0x168 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x160(%rsp) movq %rsi, 0x158(%rsp) movq %rdx, 0x150(%rsp) movq %rcx, 0x148(%rsp) movq 0x158(%rsp), %rsi movq %rsi, 0x38(%rsp) movb $0x0, 0x147(%rsp) movq 0x150(%rsp), %rdx movq 0x148(%rsp), %rcx callq 0x1c8b10 movq 0x148(%rsp), %rax addq $0x20, %rax movq %rax, 0x138(%rsp) movq 0x138(%rsp), %rdi callq 0x83760 movq %rax, 0x130(%rsp) movq 0x138(%rsp), %rdi callq 0x83790 movq %rax, 0x128(%rsp) leaq 0x130(%rsp), %rdi leaq 0x128(%rsp), %rsi callq 0xacb20 testb $0x1, %al jne 0x1cf04a jmp 0x1cf2eb leaq 0x130(%rsp), %rdi callq 0xacb60 movq %rax, 0x120(%rsp) leaq 0xe8(%rsp), %rdi callq 0x1dca70 movq 0x120(%rsp), %rsi leaq 0xfb435(%rip), %rdi # 0x2ca4b0 callq 0x1cf380 movq %rax, 0x20(%rsp) jmp 0x1cf087 movq 0x20(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0xfb415(%rip), %rdi # 0x2ca4b0 callq 0x1cf3b0 movq %rax, 0xc8(%rsp) leaq 0xe0(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x1cf4f0 testb $0x1, %al jne 0x1cf0c6 jmp 0x1cf20f movq 0x120(%rsp), %rsi leaq 0xfb413(%rip), %rdi # 0x2ca4e8 callq 0x1cf380 movq %rax, 0x18(%rsp) jmp 0x1cf0e1 movq 0x18(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0xfb3e3(%rip), %rdi # 0x2ca4e8 callq 0x1cf3b0 movq %rax, 0xb8(%rsp) leaq 0xe0(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x1cf4f0 testb $0x1, %al jne 0x1cf130 jmp 0x1cf20d movq 0x38(%rsp), %rax addq $0xc8, %rax movq %rax, 0x10(%rsp) movq 0x120(%rsp), %rdx leaq 0x674d7(%rip), %rsi # 0x236626 leaq 0x78(%rsp), %rdi callq 0xaeea0 jmp 0x1cf15b leaq 0x674ca(%rip), %rdx # 0x23662c leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0xac850 jmp 0x1cf176 movq 0x10(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x1191a0 jmp 0x1cf18a leaq 0x98(%rsp), %rdi callq 0x5f628 leaq 0x78(%rsp), %rdi callq 0x5f628 movl $0x3, 0x74(%rsp) jmp 0x1cf2a5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) jmp 0x1cf2d2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) jmp 0x1cf1fe movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) leaq 0x98(%rsp), %rdi callq 0x5f628 leaq 0x78(%rsp), %rdi callq 0x5f628 jmp 0x1cf2d2 jmp 0x1cf20f movq 0x38(%rsp), %rdi addq $0x28, %rdi movq 0x120(%rsp), %rsi callq 0x1c9020 movq %rax, 0x8(%rsp) jmp 0x1cf22c movq 0x38(%rsp), %rdi movq 0x8(%rsp), %rax movq %rax, 0x68(%rsp) addq $0x28, %rdi callq 0x1c3a40 movq %rax, 0x60(%rsp) leaq 0x68(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x1c3a20 testb $0x1, %al jne 0x1cf25e jmp 0x1cf29d movq 0x120(%rsp), %rax movq %rax, (%rsp) leaq 0xe0(%rsp), %rdi callq 0x1dcaa0 movq 0x38(%rsp), %rsi movq (%rsp), %rdx movq %rax, %rcx addq $0x20, %rcx leaq 0x40(%rsp), %rdi callq 0x1cef90 jmp 0x1cf293 leaq 0x40(%rsp), %rdi callq 0x5f628 movl $0x0, 0x74(%rsp) leaq 0xe8(%rsp), %rdi callq 0x1c1d20 movl 0x74(%rsp), %eax testl %eax, %eax je 0x1cf2be jmp 0x1cf2bc jmp 0x1cf2c0 jmp 0x1cf2c0 leaq 0x130(%rsp), %rdi callq 0xacba0 jmp 0x1cf02c leaq 0xe8(%rsp), %rdi callq 0x1c1d20 movq 0x28(%rsp), %rdi callq 0x5f628 jmp 0x1cf31c movb $0x1, 0x147(%rsp) movl $0x1, 0x74(%rsp) testb $0x1, 0x147(%rsp) jne 0x1cf30f movq 0x28(%rsp), %rdi callq 0x5f628 movq 0x30(%rsp), %rax addq $0x168, %rsp # imm = 0x168 retq movq 0xd8(%rsp), %rdi callq 0x5ec30 nopl (%rax)
_ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule: sub rsp, 168h mov [rsp+168h+var_140], rdi; int mov rax, rdi mov [rsp+168h+var_138], rax; int mov qword ptr [rsp+168h+var_8], rdi; char mov qword ptr [rsp+168h+var_10], rsi; int mov [rsp+168h+var_18], rdx; __int64 mov qword ptr [rsp+168h+var_20], rcx; int mov rsi, qword ptr [rsp+168h+var_10]; int mov qword ptr [rsp+168h+var_130], rsi; int mov [rsp+168h+var_21], 0 mov rdx, [rsp+168h+var_18]; int mov rcx, qword ptr [rsp+168h+var_20]; int call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&) mov rax, qword ptr [rsp+168h+var_20] add rax, 20h ; ' ' mov qword ptr [rsp+168h+var_30], rax; int mov rdi, qword ptr [rsp+168h+var_30] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov qword ptr [rsp+168h+var_38], rax; int mov rdi, qword ptr [rsp+168h+var_30] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov qword ptr [rsp+168h+var_40], rax; int loc_1CF02C: lea rdi, [rsp+168h+var_38] lea rsi, [rsp+168h+var_40] call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&) test al, 1 jnz short loc_1CF04A jmp loc_1CF2EB loc_1CF04A: lea rdi, [rsp+168h+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void) mov qword ptr [rsp+168h+var_48], rax; int lea rdi, [rsp+168h+var_80]; this call _ZN11BuiltinRuleC2Ev; BuiltinRule::BuiltinRule(void) mov rsi, qword ptr [rsp+168h+var_48] lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE4findERSC_; std::unordered_map<std::string,BuiltinRule>::find(std::string const&) mov [rsp+168h+var_148], rax; void * jmp short $+2 loc_1CF087: mov rax, [rsp+168h+var_148] mov qword ptr [rsp+168h+var_88], rax; char lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE3endEv; std::unordered_map<std::string,BuiltinRule>::end(void) mov qword ptr [rsp+168h+var_A0], rax; int lea rdi, [rsp+168h+var_88] lea rsi, [rsp+168h+var_A0] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb1EEESD_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&) test al, 1 jnz short loc_1CF0C6 jmp loc_1CF20F loc_1CF0C6: mov rsi, qword ptr [rsp+168h+var_48] lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE4findERSC_; std::unordered_map<std::string,BuiltinRule>::find(std::string const&) mov qword ptr [rsp+168h+var_150], rax; int jmp short $+2 loc_1CF0E1: mov rax, qword ptr [rsp+168h+var_150] mov [rsp+168h+var_A8], rax mov rax, [rsp+168h+var_A8] mov qword ptr [rsp+168h+var_88], rax lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE3endEv; std::unordered_map<std::string,BuiltinRule>::end(void) mov [rsp+168h+var_B0], rax lea rdi, [rsp+168h+var_88] lea rsi, [rsp+168h+var_B0] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb1EEESD_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&) test al, 1 jnz short loc_1CF130 jmp loc_1CF20D loc_1CF130: mov rax, qword ptr [rsp+168h+var_130] add rax, 0C8h mov [rsp+168h+var_158], rax; void * mov rdx, qword ptr [rsp+168h+var_48]; int lea rsi, aRule; "Rule " lea rdi, [rsp+168h+var_F0]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_1CF15B: lea rdx, aNotKnown; " not known" lea rdi, [rsp+168h+var_D0] lea rsi, [rsp+168h+var_F0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_1CF176: mov rdi, [rsp+168h+var_158] lea rsi, [rsp+168h+var_D0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_1CF18A: lea rdi, [rsp+168h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rsp+168h+var_F4], 3 jmp loc_1CF2A5 mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax jmp loc_1CF2D2 mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax jmp short loc_1CF1FE mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1CF1FE: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1CF2D2 loc_1CF20D: jmp short $+2 loc_1CF20F: mov rdi, qword ptr [rsp+168h+var_130] add rdi, 28h ; '(' mov rsi, qword ptr [rsp+168h+var_48] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE4findERS9_; std::map<std::string,std::string>::find(std::string const&) mov qword ptr [rsp+168h+var_160], rax; int jmp short $+2 loc_1CF22C: mov rdi, qword ptr [rsp+168h+var_130] mov rax, qword ptr [rsp+168h+var_160] mov qword ptr [rsp+168h+var_100], rax; int add rdi, 28h ; '(' call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void) mov qword ptr [rsp+168h+var_108], rax; int lea rdi, [rsp+168h+var_100] lea rsi, [rsp+168h+var_108] call _ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator==(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&) test al, 1 jnz short loc_1CF25E jmp short loc_1CF29D loc_1CF25E: mov rax, qword ptr [rsp+168h+var_48] mov [rsp+168h+var_168], rax; int lea rdi, [rsp+168h+var_88] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator->(void) mov rsi, qword ptr [rsp+168h+var_130]; int mov rdx, [rsp+168h+var_168]; int mov rcx, rax add rcx, 20h ; ' '; int lea rdi, [rsp+168h+var_128]; int call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&) jmp short $+2 loc_1CF293: lea rdi, [rsp+168h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1CF29D: mov [rsp+168h+var_F4], 0 loc_1CF2A5: lea rdi, [rsp+168h+var_80]; this call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule() mov eax, [rsp+168h+var_F4] test eax, eax jz short loc_1CF2BE jmp short $+2 loc_1CF2BC: jmp short loc_1CF2C0 loc_1CF2BE: jmp short $+2 loc_1CF2C0: lea rdi, [rsp+168h+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void) jmp loc_1CF02C loc_1CF2D2: lea rdi, [rsp+arg_E0]; this call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule() mov rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1CF31C loc_1CF2EB: mov [rsp+168h+var_21], 1 mov [rsp+168h+var_F4], 1 test [rsp+168h+var_21], 1 jnz short loc_1CF30F mov rdi, [rsp+168h+var_140]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1CF30F: mov rax, [rsp+168h+var_138] add rsp, 168h retn loc_1CF31C: mov rdi, [rsp+arg_D0] call __Unwind_Resume
long long SchemaConverter::_add_primitive(long long a1, long long a2, long long a3, long long a4) { long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 int v8; // eax int v9; // r8d int v10; // r9d int v12; // [rsp+0h] [rbp-168h] long long v13; // [rsp+8h] [rbp-160h] int v14; // [rsp+10h] [rbp-158h] int v15[2]; // [rsp+18h] [rbp-150h] void *v16; // [rsp+20h] [rbp-148h] int v17; // [rsp+28h] [rbp-140h] long long v18; // [rsp+30h] [rbp-138h] int v19[2]; // [rsp+38h] [rbp-130h] char v20[8]; // [rsp+40h] [rbp-128h] BYREF int v21; // [rsp+48h] [rbp-120h] int v22; // [rsp+50h] [rbp-118h] int v23; // [rsp+58h] [rbp-110h] int v24[2]; // [rsp+60h] [rbp-108h] BYREF int v25[2]; // [rsp+68h] [rbp-100h] BYREF char v26; // [rsp+70h] [rbp-F8h] int v27; // [rsp+74h] [rbp-F4h] int v28[6]; // [rsp+78h] [rbp-F0h] BYREF char v29; // [rsp+90h] [rbp-D8h] int v30[8]; // [rsp+98h] [rbp-D0h] BYREF long long v31; // [rsp+B8h] [rbp-B0h] BYREF long long v32; // [rsp+C0h] [rbp-A8h] char v33[8]; // [rsp+C8h] [rbp-A0h] BYREF long long v34; // [rsp+D0h] [rbp-98h] int v35; // [rsp+D8h] [rbp-90h] char v36[8]; // [rsp+E0h] [rbp-88h] BYREF _BYTE v37[56]; // [rsp+E8h] [rbp-80h] BYREF int v38[2]; // [rsp+120h] [rbp-48h] int v39[2]; // [rsp+128h] [rbp-40h] BYREF int v40[2]; // [rsp+130h] [rbp-38h] BYREF int v41[2]; // [rsp+138h] [rbp-30h] char v42; // [rsp+147h] [rbp-21h] int v43[2]; // [rsp+148h] [rbp-20h] long long v44; // [rsp+150h] [rbp-18h] int v45[2]; // [rsp+158h] [rbp-10h] char v46[8]; // [rsp+160h] [rbp-8h] v17 = a1; v18 = a1; *(_QWORD *)v46 = a1; *(_QWORD *)v45 = a2; v44 = a3; *(_QWORD *)v43 = a4; *(_QWORD *)v19 = a2; v42 = 0; SchemaConverter::_add_rule(a1, a2, a3, a4); *(_QWORD *)v41 = *(_QWORD *)v43 + 32LL; *(_QWORD *)v40 = std::vector<std::string>::begin((_QWORD *)(*(_QWORD *)v43 + 32LL)); *(_QWORD *)v39 = std::vector<std::string>::end(*(_QWORD *)v43 + 32LL); while ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)v40, (long long)v39) ) { *(_QWORD *)v38 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*((long long)v40); BuiltinRule::BuiltinRule((BuiltinRule *)v37); v16 = (void *)std::unordered_map<std::string,BuiltinRule>::find(&PRIMITIVE_RULES[abi:cxx11], *(_QWORD *)v38); *(_QWORD *)v36 = v16; *(_QWORD *)v33 = std::unordered_map<std::string,BuiltinRule>::end(&PRIMITIVE_RULES[abi:cxx11]); if ( (std::__detail::operator==(v36, v33) & 1) != 0 && (*(_QWORD *)v15 = std::unordered_map<std::string,BuiltinRule>::find( &STRING_FORMAT_RULES[abi:cxx11], *(_QWORD *)v38), v32 = *(_QWORD *)v15, *(_QWORD *)v36 = *(_QWORD *)v15, v31 = std::unordered_map<std::string,BuiltinRule>::end(&STRING_FORMAT_RULES[abi:cxx11]), (std::__detail::operator==(v36, &v31) & 1) != 0) ) { v14 = v19[0] + 200; std::operator+<char>((long long)v28, (long long)"Rule ", *(long long *)v38); std::operator+<char>((long long)v30, (long long)v28, (long long)" not known"); std::vector<std::string>::push_back(*(_QWORD *)v19 + 200LL, (long long)v30, v4, v5, v6, v7); std::string::~string(v30); std::string::~string(v28); v27 = 3; } else { v13 = std::map<std::string,std::string>::find(*(_QWORD *)v19 + 40LL, *(long long *)v38); *(_QWORD *)v25 = v13; *(_QWORD *)v24 = std::map<std::string,std::string>::end(*(_QWORD *)v19 + 40LL); if ( std::operator==(v25, v24) ) { v12 = v38[0]; v8 = std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator->(v36); SchemaConverter::_add_primitive( (int)v20, v19[0], v12, v8 + 32, v9, v10, v12, v13, v14, v15[0], v16, v17, v18, v19[0], *(int *)v20, v21, v22, v23, v24[0], v25[0], v26, v28[0], v28[2], v28[4], v29, v30[0], v30[2], v30[4], v30[6], v31, v32, *(int *)v33, v34, v35, v36[0]); std::string::~string(v20); } v27 = 0; } BuiltinRule::~BuiltinRule((BuiltinRule *)v37); __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(v40); } return v18; }
15,519
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _add_primitive(const std::string & name, const BuiltinRule & rule) { auto n = _add_rule(name, rule.content); for (const auto & dep : rule.deps) { BuiltinRule dep_rule; auto it = PRIMITIVE_RULES.find(dep); if (it == PRIMITIVE_RULES.end()) { it = STRING_FORMAT_RULES.find(dep); if (it == STRING_FORMAT_RULES.end()) { _errors.push_back("Rule " + dep + " not known"); continue; } } if (_rules.find(dep) == _rules.end()) { _add_primitive(dep, it->second); } } return n; }
O3
cpp
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq %rdi, 0x8(%rsp) movq %rsi, 0x10(%rsp) callq 0xcdde4 movq 0x20(%rbx), %r15 movq 0x28(%rbx), %r14 cmpq %r14, %r15 je 0xd338a leaq 0x80(%rsp), %rbx leaq 0x90(%rsp), %r12 movq 0x10(%rsp), %rax leaq 0x28(%rax), %rcx movq %rcx, 0x48(%rsp) leaq 0x30(%rax), %rcx movq %rcx, 0x40(%rsp) addq $0xc8, %rax movq %rax, 0x38(%rsp) xorl %r13d, %r13d movq %rbx, 0x70(%rsp) movq %r13, 0x78(%rsp) movb $0x0, 0x80(%rsp) movq %r13, 0x10(%r12) xorps %xmm0, %xmm0 movups %xmm0, (%r12) leaq 0x690a5(%rip), %rdi # 0x13c2d0 movq %r15, %rsi callq 0xd8960 movq %rax, %rbp testq %rax, %rax jne 0xd3252 leaq 0x690c6(%rip), %rdi # 0x13c308 movq %r15, %rsi callq 0xd8960 movq %rax, %rbp testq %rax, %rax je 0xd32ac movq 0x48(%rsp), %rdi movq %r15, %rsi callq 0xce484 cmpq 0x40(%rsp), %rax jne 0xd335b addq $0x28, %rbp leaq 0xa8(%rsp), %rdi movq 0x10(%rsp), %rsi movq %r15, %rdx movq %rbp, %rcx callq 0xd319c movq 0xa8(%rsp), %rdi leaq 0xb8(%rsp), %rax cmpq %rax, %rdi je 0xd335b movq 0xb8(%rsp), %rsi jmp 0xd3353 leaq 0x50(%rsp), %rbp movq %rbp, %rdi leaq 0x2f9b4(%rip), %rsi # 0x102c6f movq %r15, %rdx callq 0x623d1 movq %rbp, %rdi leaq 0x2f9a8(%rip), %rsi # 0x102c75 callq 0x1c1b0 leaq 0x28(%rsp), %rbp movq %rbp, 0x18(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xd32fa movq %rdx, 0x18(%rsp) movq (%rcx), %rdx movq %rdx, 0x28(%rsp) jmp 0xd3301 movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rdx movq %rdx, 0x20(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x38(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x6384a movq 0x18(%rsp), %rdi cmpq %rbp, %rdi je 0xd333f movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0xd335b movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %r12, %rdi callq 0x2d06a movq 0x70(%rsp), %rdi cmpq %rbx, %rdi je 0xd337d movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8f0 addq $0x20, %r15 cmpq %r14, %r15 jne 0xd3205 movq 0x8(%rsp), %rax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x18(%rsp), %rdi cmpq %rbp, %rdi je 0xd33c0 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xd33c0 movq %rax, %rbx movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0xd33e7 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xd33e7 jmp 0xd33e4 jmp 0xd33e4 jmp 0xd33e4 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0xcc14e movq 0x8(%rsp), %rcx movq (%rcx), %rdi addq $0x10, %rcx cmpq %rcx, %rdi je 0xd340d movq (%rcx), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rdi callq 0x1c020 nop
_ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov [rsp+0F8h+var_F0], rdi; int mov [rsp+0F8h+var_E8], rsi; void * call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&) mov r15, [rbx+20h] mov r14, [rbx+28h] cmp r15, r14 jz loc_D338A lea rbx, [rsp+0F8h+var_78] lea r12, [rsp+0F8h+var_68] mov rax, [rsp+0F8h+var_E8] lea rcx, [rax+28h] mov [rsp+0F8h+var_B0], rcx; void * lea rcx, [rax+30h] mov qword ptr [rsp+0F8h+var_B8], rcx; int add rax, 0C8h mov [rsp+0F8h+var_C0], rax; int xor r13d, r13d loc_D3205: mov [rsp+0F8h+var_88], rbx; int mov [rsp+0F8h+var_80], r13; __int64 mov byte ptr [rsp+0F8h+var_78], 0; int mov [r12+10h], r13 xorps xmm0, xmm0 movups xmmword ptr [r12], xmm0 lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbp, rax test rax, rax jnz short loc_D3252 lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbp, rax test rax, rax jz short loc_D32AC loc_D3252: mov rdi, [rsp+0F8h+var_B0] mov rsi, r15 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; 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>>>::find(std::string const&) cmp rax, qword ptr [rsp+0F8h+var_B8] jnz loc_D335B add rbp, 28h ; '(' lea rdi, [rsp+0F8h+var_50]; int mov rsi, [rsp+0F8h+var_E8]; int mov rdx, r15; int mov rcx, rbp; int call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&) mov rdi, qword ptr [rsp+0F8h+var_50] lea rax, [rsp+0F8h+var_40] cmp rdi, rax jz loc_D335B mov rsi, [rsp+0F8h+var_40] jmp loc_D3353 loc_D32AC: lea rbp, [rsp+0F8h+var_A8] mov rdi, rbp lea rsi, aRule; "Rule " mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, rbp lea rsi, aNotKnown; " not known" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rbp, [rsp+0F8h+var_D0] mov [rsp+0F8h+var_E0], rbp mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_D32FA mov [rsp+0F8h+var_E0], rdx mov rdx, [rcx] mov [rsp+0F8h+var_D0], rdx jmp short loc_D3301 loc_D32FA: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 loc_D3301: mov rdx, [rax+8] mov [rsp+0F8h+var_D8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+0F8h+var_C0] lea rsi, [rsp+0F8h+var_E0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+0F8h+var_E0]; void * cmp rdi, rbp jz short loc_D333F mov rsi, [rsp+0F8h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D333F: mov rdi, [rsp+0F8h+var_A8]; void * lea rax, [rsp+0F8h+var_98] cmp rdi, rax jz short loc_D335B mov rsi, [rsp+0F8h+var_98] loc_D3353: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D335B: mov rdi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+0F8h+var_88]; void * cmp rdi, rbx jz short loc_D337D mov rsi, qword ptr [rsp+0F8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D337D: add r15, 20h ; ' ' cmp r15, r14 jnz loc_D3205 loc_D338A: mov rax, [rsp+0F8h+var_F0] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_10]; void * cmp rdi, rbp jz short loc_D33C0 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D33C0 mov rbx, rax loc_D33C0: mov rdi, [rsp+arg_48]; void * lea rax, [rsp+arg_58] cmp rdi, rax jz short loc_D33E7 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D33E7 jmp short loc_D33E4 jmp short loc_D33E4 jmp short $+2 loc_D33E4: mov rbx, rax loc_D33E7: lea rdi, [rsp+arg_68]; this call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule() mov rcx, [rsp+arg_0] mov rdi, [rcx]; void * add rcx, 10h cmp rdi, rcx jz short loc_D340D mov rsi, [rcx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D340D: mov rdi, rbx call __Unwind_Resume
void * SchemaConverter::_add_primitive(long long a1, long long a2, long long *a3, _QWORD *a4) { _QWORD *v5; // r15 _QWORD *v6; // r14 long long v7; // rax int v8; // ebp long long v9; // rax long long v10; // rax int v11; // r8d int v12; // r9d void *v13; // rdi long long v14; // rsi long long v15; // rax __int128 *v16; // rcx long long v18; // [rsp+0h] [rbp-F8h] void *v19; // [rsp+8h] [rbp-F0h] void *v20; // [rsp+10h] [rbp-E8h] void *v21; // [rsp+18h] [rbp-E0h] BYREF long long v22; // [rsp+20h] [rbp-D8h] __int128 v23; // [rsp+28h] [rbp-D0h] BYREF long long v24; // [rsp+38h] [rbp-C0h] int v25[2]; // [rsp+40h] [rbp-B8h] void *v26; // [rsp+48h] [rbp-B0h] void *v27[2]; // [rsp+50h] [rbp-A8h] BYREF long long v28; // [rsp+60h] [rbp-98h] BYREF char v29; // [rsp+68h] [rbp-90h] void *v30; // [rsp+70h] [rbp-88h] long long v31; // [rsp+78h] [rbp-80h] int v32[2]; // [rsp+80h] [rbp-78h] BYREF __int128 v33; // [rsp+90h] [rbp-68h] BYREF long long v34; // [rsp+A0h] [rbp-58h] int v35[2]; // [rsp+A8h] [rbp-50h] BYREF long long v36; // [rsp+B8h] [rbp-40h] BYREF v19 = (void *)a1; v20 = (void *)a2; SchemaConverter::_add_rule(a1, a2, a3, a4); v5 = (_QWORD *)a4[4]; v6 = (_QWORD *)a4[5]; if ( v5 != v6 ) { v26 = (void *)(a2 + 40); *(_QWORD *)v25 = a2 + 48; v24 = a2 + 200; do { v30 = v32; v31 = 0LL; LOBYTE(v32[0]) = 0; v34 = 0LL; v33 = 0LL; v7 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( PRIMITIVE_RULES[abi:cxx11], v5); v8 = v7; if ( v7 || (v9 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( STRING_FORMAT_RULES[abi:cxx11], v5), v8 = v9, v9) ) { v10 = 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>>>::find( (long long)v26, (long long)v5); if ( v10 != *(_QWORD *)v25 ) goto LABEL_16; SchemaConverter::_add_primitive( (int)v35, (int)v20, (int)v5, v8 + 40, v11, v12, v18, (int)v19, v20, (int)v21, v22, v23, SDWORD2(v23), v24, v25[0], v26, (int)v27[0], (long long)v27[1], v28, v29); v13 = *(void **)v35; if ( *(long long **)v35 == &v36 ) goto LABEL_16; v14 = v36; } else { std::operator+<char>((long long)v27, (long long)"Rule ", v5); v15 = std::string::append(v27, " not known"); v21 = &v23; v16 = (__int128 *)(v15 + 16); if ( *(_QWORD *)v15 == v15 + 16 ) { v23 = *v16; } else { v21 = *(void **)v15; *(_QWORD *)&v23 = *(_QWORD *)v16; } v22 = *(_QWORD *)(v15 + 8); *(_QWORD *)v15 = v16; *(_QWORD *)(v15 + 8) = 0LL; *(_BYTE *)(v15 + 16) = 0; std::vector<std::string>::emplace_back<std::string>(v24, (long long)&v21); if ( v21 != &v23 ) operator delete(v21, v23 + 1); v13 = v27[0]; if ( v27[0] == &v28 ) goto LABEL_16; v14 = v28; } operator delete(v13, v14 + 1); LABEL_16: std::vector<std::string>::~vector((long long)&v33); if ( v30 != v32 ) operator delete(v30, *(_QWORD *)v32 + 1LL); v5 += 4; } while ( v5 != v6 ); } return v19; }
_add_primitive: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x10],RSI CALL 0x001cdde4 MOV R15,qword ptr [RBX + 0x20] MOV R14,qword ptr [RBX + 0x28] CMP R15,R14 JZ 0x001d338a LEA RBX,[RSP + 0x80] LEA R12,[RSP + 0x90] MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[RAX + 0x28] MOV qword ptr [RSP + 0x48],RCX LEA RCX,[RAX + 0x30] MOV qword ptr [RSP + 0x40],RCX ADD RAX,0xc8 MOV qword ptr [RSP + 0x38],RAX XOR R13D,R13D LAB_001d3205: MOV qword ptr [RSP + 0x70],RBX MOV qword ptr [RSP + 0x78],R13 MOV byte ptr [RSP + 0x80],0x0 MOV qword ptr [R12 + 0x10],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12],XMM0 LAB_001d3224: LEA RDI,[0x23c2d0] MOV RSI,R15 CALL 0x001d8960 MOV RBP,RAX TEST RAX,RAX JNZ 0x001d3252 LAB_001d323b: LEA RDI,[0x23c308] MOV RSI,R15 CALL 0x001d8960 MOV RBP,RAX TEST RAX,RAX JZ 0x001d32ac LAB_001d3252: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,R15 CALL 0x001ce484 CMP RAX,qword ptr [RSP + 0x40] JNZ 0x001d335b ADD RBP,0x28 LAB_001d326e: LEA RDI,[RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R15 MOV RCX,RBP CALL 0x001d319c MOV RDI,qword ptr [RSP + 0xa8] LEA RAX,[RSP + 0xb8] CMP RDI,RAX JZ 0x001d335b MOV RSI,qword ptr [RSP + 0xb8] JMP 0x001d3353 LAB_001d32ac: LEA RBP,[RSP + 0x50] MOV RDI,RBP LEA RSI,[0x202c6f] MOV RDX,R15 CALL 0x001623d1 LAB_001d32c3: MOV RDI,RBP LEA RSI,[0x202c75] CALL 0x0011c1b0 LEA RBP,[RSP + 0x28] MOV qword ptr [RSP + 0x18],RBP MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001d32fa MOV qword ptr [RSP + 0x18],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x28],RDX JMP 0x001d3301 LAB_001d32fa: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 LAB_001d3301: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001d3319: MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x18] CALL 0x0016384a LAB_001d3328: MOV RDI,qword ptr [RSP + 0x18] CMP RDI,RBP JZ 0x001d333f MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011b8f0 LAB_001d333f: MOV RDI,qword ptr [RSP + 0x50] LEA RAX,[RSP + 0x60] CMP RDI,RAX JZ 0x001d335b MOV RSI,qword ptr [RSP + 0x60] LAB_001d3353: INC RSI CALL 0x0011b8f0 LAB_001d335b: MOV RDI,R12 CALL 0x0012d06a MOV RDI,qword ptr [RSP + 0x70] CMP RDI,RBX JZ 0x001d337d MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x0011b8f0 LAB_001d337d: ADD R15,0x20 CMP R15,R14 JNZ 0x001d3205 LAB_001d338a: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_add_primitive(std::__cxx11::string const&, BuiltinRule const&) */ string * SchemaConverter::_add_primitive(string *param_1,BuiltinRule *param_2) { string *psVar1; long lVar2; BuiltinRule *pBVar3; long *plVar4; long in_RCX; long *plVar5; string *psVar6; long *local_e0; long local_d8; long local_d0; long lStack_c8; BuiltinRule *local_c0; BuiltinRule *local_b8; BuiltinRule *local_b0; long *local_a8 [2]; long local_98 [2]; int1 *local_88; int8 local_80; int1 local_78; int7 uStack_77; int8 local_68; int8 uStack_60; int8 local_58; long *local_50 [2]; long local_40 [2]; _add_rule(param_1,(string *)param_2); psVar6 = *(string **)(in_RCX + 0x20); psVar1 = *(string **)(in_RCX + 0x28); if (psVar6 != psVar1) { local_b0 = param_2 + 0x28; local_b8 = param_2 + 0x30; local_c0 = param_2 + 200; do { local_80 = 0; local_78 = 0; local_58 = 0; local_68 = 0; uStack_60 = 0; local_88 = &local_78; /* try { // try from 001d3224 to 001d3232 has its CatchHandler @ 001d33e4 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)PRIMITIVE_RULES_abi_cxx11_,psVar6); /* try { // try from 001d323b to 001d3249 has its CatchHandler @ 001d33e0 */ if ((lVar2 == 0) && (lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)STRING_FORMAT_RULES_abi_cxx11_,psVar6), lVar2 == 0)) { /* try { // try from 001d32ac to 001d32c2 has its CatchHandler @ 001d33de */ std::operator+((char *)local_a8,(string *)"Rule "); /* try { // try from 001d32c3 to 001d32d1 has its CatchHandler @ 001d33bd */ plVar4 = (long *)std::__cxx11::string::append((char *)local_a8); plVar5 = plVar4 + 2; if ((long *)*plVar4 == plVar5) { local_d0 = *plVar5; lStack_c8 = plVar4[3]; local_e0 = &local_d0; } else { local_d0 = *plVar5; local_e0 = (long *)*plVar4; } local_d8 = plVar4[1]; *plVar4 = (long)plVar5; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; /* try { // try from 001d3319 to 001d3327 has its CatchHandler @ 001d33a1 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_c0, (string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } lVar2 = local_98[0]; plVar4 = local_a8[0]; if (local_a8[0] != local_98) { LAB_001d3353: operator_delete(plVar4,lVar2 + 1); } } else { /* try { // try from 001d3252 to 001d325e has its CatchHandler @ 001d33e2 */ pBVar3 = (BuiltinRule *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)local_b0,psVar6); /* try { // try from 001d326e to 001d3285 has its CatchHandler @ 001d33e4 */ if ((pBVar3 == local_b8) && (_add_primitive((string *)local_50,param_2), lVar2 = local_40[0], plVar4 = local_50[0], local_50[0] != local_40)) goto LAB_001d3353; } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68); if (local_88 != &local_78) { operator_delete(local_88,CONCAT71(uStack_77,local_78) + 1); } psVar6 = psVar6 + 0x20; } while (psVar6 != psVar1); } return param_1; }
15,520
alloc_free
eloqsql/mysys/lf_alloc-pin.c
static void alloc_free(uchar *first, uchar volatile *last, LF_ALLOCATOR *allocator) { /* we need a union here to access type-punned pointer reliably. otherwise gcc -fstrict-aliasing will not see 'tmp' changed in the loop */ union { uchar * node; void *ptr; } tmp; tmp.node= allocator->top; do { anext_node(last)= tmp.node; } while (!my_atomic_casptr((void **)(char *)&allocator->top, (void **)&tmp.ptr, first) && LF_BACKOFF()); }
O0
c
alloc_free: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x38(%rcx), %ecx movq %rdx, (%rax,%rcx) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq -0x28(%rbp), %rdx lock cmpxchgq %rdx, 0x48(%rcx) movq %rax, %rcx sete %al movb %al, -0x39(%rbp) movq %rcx, -0x38(%rbp) testb $0x1, %al jne 0xc7726 movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) movb -0x39(%rbp), %al andb $0x1, %al movb %al, -0x29(%rbp) xorl %eax, %eax testb $0x1, -0x29(%rbp) movb %al, -0x3a(%rbp) jne 0xc7747 callq 0xc7910 cmpl $0x0, %eax setne %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al testb $0x1, %al jne 0xc76e0 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
alloc_free: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_20], rax loc_C76E0: mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov ecx, [rcx+38h] mov [rax+rcx], rdx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rdx, [rbp+var_28] lock cmpxchg [rcx+48h], rdx mov rcx, rax setz al mov [rbp+var_39], al mov [rbp+var_38], rcx test al, 1 jnz short loc_C7726 mov rax, [rbp+var_38] mov [rbp+var_20], rax loc_C7726: mov al, [rbp+var_39] and al, 1 mov [rbp+var_29], al xor eax, eax test [rbp+var_29], 1 mov [rbp+var_3A], al jnz short loc_C7747 call LF_BACKOFF cmp eax, 0 setnz al mov [rbp+var_3A], al loc_C7747: mov al, [rbp+var_3A] test al, 1 jnz short loc_C76E0 add rsp, 40h pop rbp retn
bool alloc_free(signed long long a1, long long a2, long long a3) { signed long long v3; // rcx bool result; // al bool v5; // [rsp+6h] [rbp-3Ah] bool v6; // [rsp+7h] [rbp-39h] signed long long v7; // [rsp+20h] [rbp-20h] v7 = *(_QWORD *)(a3 + 72); do { *(_QWORD *)(a2 + *(unsigned int *)(a3 + 56)) = v7; v3 = _InterlockedCompareExchange64((volatile signed long long *)(a3 + 72), a1, v7); v6 = v7 == v3; if ( v7 != v3 ) v7 = v3; v5 = 0; if ( !v6 ) v5 = (unsigned int)LF_BACKOFF() != 0; result = v5; } while ( v5 ); return result; }
alloc_free: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x20],RAX LAB_001c76e0: MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x38] MOV qword ptr [RAX + RCX*0x1],RDX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CMPXCHG.LOCK qword ptr [RCX + 0x48],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x39],AL MOV qword ptr [RBP + -0x38],RCX TEST AL,0x1 JNZ 0x001c7726 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX LAB_001c7726: MOV AL,byte ptr [RBP + -0x39] AND AL,0x1 MOV byte ptr [RBP + -0x29],AL XOR EAX,EAX TEST byte ptr [RBP + -0x29],0x1 MOV byte ptr [RBP + -0x3a],AL JNZ 0x001c7747 CALL 0x001c7910 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x3a],AL LAB_001c7747: MOV AL,byte ptr [RBP + -0x3a] TEST AL,0x1 JNZ 0x001c76e0 ADD RSP,0x40 POP RBP RET
void alloc_free(long param_1,long param_2,long param_3) { int iVar1; long lVar2; bool bVar3; bool bVar4; int8 local_28; local_28 = *(long *)(param_3 + 0x48); do { *(long *)(param_2 + (ulong)*(uint *)(param_3 + 0x38)) = local_28; LOCK(); lVar2 = *(long *)(param_3 + 0x48); bVar3 = local_28 == lVar2; if (bVar3) { *(long *)(param_3 + 0x48) = param_1; lVar2 = local_28; } UNLOCK(); if (!bVar3) { local_28 = lVar2; } bVar4 = false; if (!bVar3) { iVar1 = LF_BACKOFF(); bVar4 = iVar1 != 0; } } while (bVar4); return; }
15,521
JS_DefineObjectNameComputed
bluesky950520[P]quickjs/quickjs.c
static int JS_DefineObjectNameComputed(JSContext *ctx, JSValue obj, JSValue str, int flags) { if (JS_IsObject(obj) && !js_object_has_name(ctx, obj)) { JSAtom prop; JSValue name_str; prop = JS_ValueToAtom(ctx, str); if (prop == JS_ATOM_NULL) return -1; name_str = js_get_function_name(ctx, prop); JS_FreeAtom(ctx, prop); if (JS_IsException(name_str)) return -1; if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_name, name_str, flags) < 0) return -1; } return 0; }
O0
c
JS_DefineObjectNameComputed: subq $0x68, %rsp movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x40(%rsp) movq %r8, 0x48(%rsp) movq %rdi, 0x38(%rsp) movl %r9d, 0x34(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x31260 cmpl $0x0, %eax je 0x6f156 movq 0x38(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x75920 cmpl $0x0, %eax jne 0x6f156 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x374f0 movl %eax, 0x30(%rsp) cmpl $0x0, 0x30(%rsp) jne 0x6f0c3 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x6f15e movq 0x38(%rsp), %rdi movl 0x30(%rsp), %esi callq 0x75ad0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rdi movl 0x30(%rsp), %esi callq 0x2f330 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x6f11b movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x6f15e movq 0x38(%rsp), %rdi movl 0x34(%rsp), %eax movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movl $0x37, %ecx movl %eax, (%rsp) callq 0x3d4a0 cmpl $0x0, %eax jge 0x6f154 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x6f15e jmp 0x6f156 movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw (%rax,%rax)
JS_DefineObjectNameComputed: sub rsp, 68h mov [rsp+68h+var_18], rsi mov [rsp+68h+var_10], rdx mov [rsp+68h+var_28], rcx mov [rsp+68h+var_20], r8 mov [rsp+68h+var_30], rdi mov [rsp+68h+var_34], r9d mov rdi, [rsp+68h+var_18] mov rsi, [rsp+68h+var_10] call JS_IsObject cmp eax, 0 jz loc_6F156 mov rdi, [rsp+68h+var_30] mov rsi, [rsp+68h+var_18] mov rdx, [rsp+68h+var_10] call js_object_has_name cmp eax, 0 jnz loc_6F156 mov rdi, [rsp+68h+var_30] mov rsi, [rsp+68h+var_28] mov rdx, [rsp+68h+var_20] call JS_ValueToAtom mov [rsp+68h+var_38], eax cmp [rsp+68h+var_38], 0 jnz short loc_6F0C3 mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_6F15E loc_6F0C3: mov rdi, [rsp+68h+var_30] mov esi, [rsp+68h+var_38] call js_get_function_name mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], rdx mov rax, [rsp+68h+var_58] mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_50] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_30] mov esi, [rsp+68h+var_38] call JS_FreeAtom mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_6F11B mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_6F15E loc_6F11B: mov rdi, [rsp+68h+var_30] mov eax, [rsp+68h+var_34] mov rsi, [rsp+68h+var_18] mov rdx, [rsp+68h+var_10] mov r8, [rsp+68h+var_48] mov r9, [rsp+68h+var_40] mov ecx, 37h ; '7' mov [rsp+68h+var_68], eax call JS_DefinePropertyValue cmp eax, 0 jge short loc_6F154 mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_6F15E loc_6F154: jmp short $+2 loc_6F156: mov [rsp+68h+var_4], 0 loc_6F15E: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long JS_DefineObjectNameComputed( 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 v14; // rdx __m128 v15; // xmm4 __m128 v16; // xmm5 _DWORD *function_name; // [rsp+10h] [rbp-58h] long long v19; // [rsp+28h] [rbp-40h] unsigned int v20; // [rsp+30h] [rbp-38h] if ( !JS_IsObject(a2, a3) || (unsigned int)js_object_has_name(a1, a2, a3) ) return 0; v20 = JS_ValueToAtom(a1, a4, a5); if ( v20 ) { function_name = (_DWORD *)js_get_function_name(a1, v20); v19 = v14; JS_FreeAtom(a1, v20); if ( JS_IsException_1((long long)function_name, v19) ) return (unsigned int)-1; if ( (int)JS_DefinePropertyValue(a1, a2, a3, 0x37u, function_name, v19, a7, a8, a9, a10, v15, v16, a13, a14, a6) < 0 ) return (unsigned int)-1; return 0; } return (unsigned int)-1; }
JS_DefineObjectNameComputed: SUB RSP,0x68 MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],R8 MOV qword ptr [RSP + 0x38],RDI MOV dword ptr [RSP + 0x34],R9D MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00131260 CMP EAX,0x0 JZ 0x0016f156 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00175920 CMP EAX,0x0 JNZ 0x0016f156 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x001374f0 MOV dword ptr [RSP + 0x30],EAX CMP dword ptr [RSP + 0x30],0x0 JNZ 0x0016f0c3 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0016f15e LAB_0016f0c3: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x30] CALL 0x00175ad0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x30] CALL 0x0012f330 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0016f11b MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0016f15e LAB_0016f11b: MOV RDI,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0x34] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV ECX,0x37 MOV dword ptr [RSP],EAX CALL 0x0013d4a0 CMP EAX,0x0 JGE 0x0016f154 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0016f15e LAB_0016f154: JMP 0x0016f156 LAB_0016f156: MOV dword ptr [RSP + 0x64],0x0 LAB_0016f15e: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int4 JS_DefineObjectNameComputed (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6) { int iVar1; int1 auVar2 [16]; iVar1 = JS_IsObject(param_2,param_3); if ((iVar1 != 0) && (iVar1 = js_object_has_name(param_1,param_2,param_3), iVar1 == 0)) { iVar1 = JS_ValueToAtom(param_1,param_4,param_5); if (iVar1 == 0) { return 0xffffffff; } auVar2 = js_get_function_name(param_1,iVar1); JS_FreeAtom(param_1,iVar1); iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_); if (iVar1 != 0) { return 0xffffffff; } iVar1 = JS_DefinePropertyValue(param_1,param_2,param_3,0x37,auVar2._0_8_,auVar2._8_8_,param_6); if (iVar1 < 0) { return 0xffffffff; } } return 0; }
15,522
JS_DefineObjectNameComputed
bluesky950520[P]quickjs/quickjs.c
static int JS_DefineObjectNameComputed(JSContext *ctx, JSValue obj, JSValue str, int flags) { if (JS_IsObject(obj) && !js_object_has_name(ctx, obj)) { JSAtom prop; JSValue name_str; prop = JS_ValueToAtom(ctx, str); if (prop == JS_ATOM_NULL) return -1; name_str = js_get_function_name(ctx, prop); JS_FreeAtom(ctx, prop); if (JS_IsException(name_str)) return -1; if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_name, name_str, flags) < 0) return -1; } return 0; }
O2
c
JS_DefineObjectNameComputed: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx cmpl $-0x1, %ebx jne 0x3bb42 movq %r8, %r12 movq %rcx, %r13 movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi callq 0x3d704 testl %eax, %eax je 0x3bb55 xorl %ebp, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x21c6c pushq $-0x1 popq %rbp testl %eax, %eax je 0x3bb44 movl %eax, %r12d movq %r15, %rdi movl %eax, %esi callq 0x3d760 movq %rax, 0x10(%rsp) movq %rdx, %r13 movq %r15, %rdi movl %r12d, %esi callq 0x1e545 cmpl $0x6, %r13d je 0x3bb44 movl $0x1, (%rsp) pushq $0x37 popq %rcx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq 0x10(%rsp), %r8 movq %r13, %r9 callq 0x24422 testl %eax, %eax jns 0x3bb42 jmp 0x3bb44
JS_DefineObjectNameComputed: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx cmp ebx, 0FFFFFFFFh jnz short loc_3BB42 mov r12, r8 mov r13, rcx mov r14, rsi mov r15, rdi mov rdi, rsi call js_object_has_name test eax, eax jz short loc_3BB55 loc_3BB42: xor ebp, ebp loc_3BB44: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3BB55: mov rdi, r15 mov rsi, r13 mov rdx, r12 call JS_ValueToAtom push 0FFFFFFFFFFFFFFFFh pop rbp test eax, eax jz short loc_3BB44 mov r12d, eax mov rdi, r15 mov esi, eax call js_get_function_name mov [rsp+48h+var_38], rax mov r13, rdx mov rdi, r15 mov esi, r12d call JS_FreeAtom cmp r13d, 6 jz short loc_3BB44 mov [rsp+48h+var_48], 1 push 37h ; '7' pop rcx mov rdi, r15 mov rsi, r14 mov rdx, rbx mov r8, [rsp+48h+var_38] mov r9, r13 call JS_DefinePropertyValue test eax, eax jns short loc_3BB42 jmp short loc_3BB44
long long JS_DefineObjectNameComputed( long long a1, long long a2, long long a3, long long a4, int a5, double a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { unsigned int v16; // ebp unsigned int v18; // eax int v19; // r12d long long v20; // rdx long long v21; // r13 __m128 v22; // xmm4 __m128 v23; // xmm5 _DWORD *function_name; // [rsp+10h] [rbp-38h] if ( (_DWORD)a3 != -1 ) return 0; if ( (unsigned int)js_object_has_name(a2) ) return 0; v18 = JS_ValueToAtom(a1, a4, a5); v16 = -1; if ( v18 ) { v19 = v18; function_name = (_DWORD *)js_get_function_name(a1, v18); v21 = v20; JS_FreeAtom(a1, v19); if ( (_DWORD)v21 != 6 && (int)JS_DefinePropertyValue(a1, a2, a3, 55LL, function_name, v21, a6, a7, a8, a9, v22, v23, a12, a13, 1) >= 0 ) { return 0; } } return v16; }
JS_DefineObjectNameComputed: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX CMP EBX,-0x1 JNZ 0x0013bb42 MOV R12,R8 MOV R13,RCX MOV R14,RSI MOV R15,RDI MOV RDI,RSI CALL 0x0013d704 TEST EAX,EAX JZ 0x0013bb55 LAB_0013bb42: XOR EBP,EBP LAB_0013bb44: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013bb55: MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 CALL 0x00121c6c PUSH -0x1 POP RBP TEST EAX,EAX JZ 0x0013bb44 MOV R12D,EAX MOV RDI,R15 MOV ESI,EAX CALL 0x0013d760 MOV qword ptr [RSP + 0x10],RAX MOV R13,RDX MOV RDI,R15 MOV ESI,R12D CALL 0x0011e545 CMP R13D,0x6 JZ 0x0013bb44 MOV dword ptr [RSP],0x1 PUSH 0x37 POP RCX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV R8,qword ptr [RSP + 0x10] MOV R9,R13 CALL 0x00124422 TEST EAX,EAX JNS 0x0013bb42 JMP 0x0013bb44
int4 JS_DefineObjectNameComputed (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int1 auVar2 [16]; if (((int)param_3 == -1) && (iVar1 = js_object_has_name(param_2), iVar1 == 0)) { iVar1 = JS_ValueToAtom(param_1,param_4,param_5); if (iVar1 == 0) { return 0xffffffff; } auVar2 = js_get_function_name(param_1,iVar1); JS_FreeAtom(param_1,iVar1); if (auVar2._8_4_ == 6) { return 0xffffffff; } iVar1 = JS_DefinePropertyValue(param_1,param_2,param_3,0x37,auVar2._0_8_,auVar2._8_8_,1); if (iVar1 < 0) { return 0xffffffff; } } return 0; }
15,523
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment()
hkr04[P]cpp-mcp/common/json.hpp
bool scan_comment() { switch (get()) { // single-line comments skip input until a newline or EOF is read case '/': { while (true) { switch (get()) { case '\n': case '\r': case char_traits<char_type>::eof(): case '\0': return true; default: break; } } } // multi-line comments skip input until */ is read case '*': { while (true) { switch (get()) { case char_traits<char_type>::eof(): case '\0': { error_message = "invalid comment; missing closing '*/'"; return false; } case '*': { switch (get()) { case '/': return true; default: { unget(); continue; } } } default: continue; } } } // unexpected character after reading '/' default: { error_message = "invalid comment; expecting '/' or '*' after '/'"; return false; } } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment(): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0xb0ac cmpl $0x2f, %eax je 0x47d03 cmpl $0x2a, %eax jne 0x47d20 movq %rbx, %rdi callq 0xb0ac leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x47d29 cmpl $0x2a, %eax jne 0x47cd7 movq %rbx, %rdi callq 0xb0ac cmpl $0x2f, %eax je 0x47d1c movq %rbx, %rdi callq 0xb122 jmp 0x47cd7 movl $0x4803, %ebp # imm = 0x4803 movq %rbx, %rdi callq 0xb0ac incl %eax cmpl $0xf, %eax jae 0x47d08 btl %eax, %ebp jae 0x47d08 movb $0x1, %al jmp 0x47d36 leaq 0x1234b(%rip), %rax # 0x5a072 jmp 0x47d30 leaq 0x1231c(%rip), %rax # 0x5a04c movq %rax, 0x70(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv: push rbp push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 2Fh ; '/' jz short loc_47D03 cmp eax, 2Ah ; '*' jnz short loc_47D20 loc_47CD7: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax+1] cmp ecx, 2 jb short loc_47D29 cmp eax, 2Ah ; '*' jnz short loc_47CD7 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 2Fh ; '/' jz short loc_47D1C mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) jmp short loc_47CD7 loc_47D03: mov ebp, 4803h loc_47D08: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) inc eax cmp eax, 0Fh jnb short loc_47D08 bt ebp, eax jnb short loc_47D08 loc_47D1C: mov al, 1 jmp short loc_47D36 loc_47D20: lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"... jmp short loc_47D30 loc_47D29: lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'" loc_47D30: mov [rbx+70h], rax xor eax, eax loc_47D36: add rsp, 8 pop rbx pop rbp retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment( __m128i *a1) { int v1; // eax int v2; // eax int v3; // ebp unsigned int v4; // eax const char *v6; // rax v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( v1 == 47 ) { v3 = 18435; do { do v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) + 1; while ( v4 >= 0xF ); } while ( !_bittest(&v3, v4) ); return 1; } else { if ( v1 == 42 ) { while ( 1 ) { v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( (unsigned int)(v2 + 1) < 2 ) break; if ( v2 == 42 ) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 ) return 1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget((long long)a1); } } v6 = "invalid comment; missing closing '*/'"; } else { v6 = "invalid comment; expecting '/' or '*' after '/'"; } a1[7].m128i_i64[0] = (long long)v6; return 0; } }
scan_comment: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0010b0ac CMP EAX,0x2f JZ 0x00147d03 CMP EAX,0x2a JNZ 0x00147d20 LAB_00147cd7: MOV RDI,RBX CALL 0x0010b0ac LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x00147d29 CMP EAX,0x2a JNZ 0x00147cd7 MOV RDI,RBX CALL 0x0010b0ac CMP EAX,0x2f JZ 0x00147d1c MOV RDI,RBX CALL 0x0010b122 JMP 0x00147cd7 LAB_00147d03: MOV EBP,0x4803 LAB_00147d08: MOV RDI,RBX CALL 0x0010b0ac INC EAX CMP EAX,0xf JNC 0x00147d08 BT EBP,EAX JNC 0x00147d08 LAB_00147d1c: MOV AL,0x1 JMP 0x00147d36 LAB_00147d20: LEA RAX,[0x15a072] JMP 0x00147d30 LAB_00147d29: LEA RAX,[0x15a04c] LAB_00147d30: MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX LAB_00147d36: ADD RSP,0x8 POP RBX POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_comment() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; int8 uVar2; char *pcVar3; iVar1 = get(this); if (iVar1 == 0x2f) { do { do { iVar1 = get(this); } while (0xe < iVar1 + 1U); } while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0); LAB_00147d1c: uVar2 = 1; } else { if (iVar1 == 0x2a) { while (iVar1 = get(this), 1 < iVar1 + 1U) { if (iVar1 == 0x2a) { iVar1 = get(this); if (iVar1 == 0x2f) goto LAB_00147d1c; unget(this); } } pcVar3 = "invalid comment; missing closing \'*/\'"; } else { pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'"; } *(char **)(this + 0x70) = pcVar3; uVar2 = 0; } return uVar2; }
15,524
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O0
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp 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 -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xbef6a jmp 0xbef6c movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xbf0a0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0xbedd0 movl %eax, %eax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0xbf071 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl (%rax), %esi movq -0x10(%rbp), %rax movzbl 0x1(%rax), %edx callq 0xc1ab0 movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0xbf02b cmpq $0x0, 0x10(%rbp) je 0xbefd0 movq -0x50(%rbp), %rax movl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0xbefda movq -0x50(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) cmpl $0xff, -0x54(%rbp) jle 0xbf00e movl -0x54(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x54(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0xbf06f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0xbf09b movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0xbef6c movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_casefold_mb: push rbp mov rbp, rsp sub rsp, 60h 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_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax jmp short $+2 loc_BEF6A: jmp short $+2 loc_BEF6C: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb loc_BF0A0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] call my_ismbchar_0 mov eax, eax mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz loc_BF071 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx esi, byte ptr [rax] mov rax, [rbp+var_10] movzx edx, byte ptr [rax+1] call get_case_info_for_ch mov [rbp+var_50], rax cmp rax, 0 jz short loc_BF02B cmp [rbp+arg_0], 0 jz short loc_BEFD0 mov rax, [rbp+var_50] mov eax, [rax] mov [rbp+var_58], eax jmp short loc_BEFDA loc_BEFD0: mov rax, [rbp+var_50] mov eax, [rax+4] mov [rbp+var_58], eax loc_BEFDA: mov eax, [rbp+var_58] mov [rbp+var_54], eax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax cmp [rbp+var_54], 0FFh jle short loc_BF00E mov eax, [rbp+var_54] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_BF00E: mov eax, [rbp+var_54] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl jmp short loc_BF06F loc_BF02B: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_BF06F: jmp short loc_BF09B loc_BF071: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_BF09B: jmp loc_BEF6C loc_BF0A0: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6, long long a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax char *v9; // rax char v10; // cl _BYTE *v11; // rax unsigned __int8 *v12; // rcx unsigned __int8 *v13; // rax int v15; // [rsp+8h] [rbp-58h] int *case_info_for_ch; // [rsp+10h] [rbp-50h] unsigned long long v18; // [rsp+28h] [rbp-38h] unsigned __int8 *v20; // [rsp+40h] [rbp-20h] unsigned __int8 *v21; // [rsp+50h] [rbp-10h] v21 = a2; v20 = a4; v18 = (unsigned long long)&a2[a3]; while ( (unsigned long long)v21 < v18 ) { if ( (unsigned int)my_ismbchar_0(a1, (long long)v21, v18) ) { case_info_for_ch = (int *)get_case_info_for_ch(a1, *v21, v21[1]); if ( case_info_for_ch ) { if ( a7 ) v15 = *case_info_for_ch; else v15 = case_info_for_ch[1]; v21 += 2; if ( v15 > 255 ) { v7 = v20++; *v7 = BYTE1(v15); } v8 = v20++; *v8 = v15; } else { *v20 = *v21; v9 = (char *)(v21 + 1); v21 += 2; v10 = *v9; v11 = v20 + 1; v20 += 2; *v11 = v10; } } else { v12 = v21++; v13 = v20++; *v13 = *(_BYTE *)(a6 + *v12); } } return (_BYTE *)(v20 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x001bef6a LAB_001bef6a: JMP 0x001bef6c LAB_001bef6c: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001bf0a0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001bedd0 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x001bf071 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX ESI,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX + 0x1] CALL 0x001c1ab0 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x001bf02b CMP qword ptr [RBP + 0x10],0x0 JZ 0x001befd0 MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x001befda LAB_001befd0: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x58],EAX LAB_001befda: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x54],0xff JLE 0x001bf00e MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x8 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 LAB_001bf00e: MOV EAX,dword ptr [RBP + -0x54] AND EAX,0xff 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 0x001bf06f LAB_001bf02b: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX 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 + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX 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 LAB_001bf06f: JMP 0x001bf09b LAB_001bf071: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_001bf09b: JMP 0x001bef6c LAB_001bf0a0: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casefold_mb(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5, long param_6,long param_7) { int iVar1; int *piVar2; byte *pbVar3; int local_60; byte *local_28; byte *local_18; local_28 = param_4; local_18 = param_2; while (local_18 < param_2 + param_3) { iVar1 = my_ismbchar(param_1,local_18,param_2 + param_3); if (iVar1 == 0) { *local_28 = *(byte *)(param_6 + (ulong)*local_18); local_28 = local_28 + 1; local_18 = local_18 + 1; } else { piVar2 = (int *)get_case_info_for_ch(param_1,*local_18,local_18[1]); if (piVar2 == (int *)0x0) { pbVar3 = local_28 + 1; *local_28 = *local_18; local_28 = local_28 + 2; *pbVar3 = local_18[1]; } else { if (param_7 == 0) { local_60 = piVar2[1]; } else { local_60 = *piVar2; } if (0xff < local_60) { *local_28 = (byte)((uint)local_60 >> 8); local_28 = local_28 + 1; } *local_28 = (byte)local_60; local_28 = local_28 + 1; } local_18 = local_18 + 2; } } return (long)local_28 - (long)param_4; }
15,525
ggml_compute_forward_set_i32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_set_i32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; const struct ggml_tensor * src1 = dst->src[1]; GGML_ASSERT(ggml_are_same_shape(src0, dst)); GGML_ASSERT(ggml_is_contiguous(dst) && ggml_is_contiguous(src0)); // view src0 and dst with these strides and data offset inbytes during set // nb0 is implicitly element_size because src0 and dst are contiguous size_t nb1 = ((int32_t *) dst->op_params)[0]; size_t nb2 = ((int32_t *) dst->op_params)[1]; size_t nb3 = ((int32_t *) dst->op_params)[2]; size_t offset = ((int32_t *) dst->op_params)[3]; bool inplace = (bool) ((int32_t *) dst->op_params)[4]; if (!inplace) { if (params->ith == 0) { // memcpy needs to be synchronized across threads to avoid race conditions. // => do it in INIT phase memcpy( ((char *) dst->data), ((char *) src0->data), ggml_nbytes(dst)); } ggml_barrier(params->threadpool); } const int ith = params->ith; const int nth = params->nth; const int nr = ggml_nrows(src1); const int nc = src1->ne[0]; GGML_TENSOR_LOCALS(int64_t, ne1, src1, ne) GGML_TENSOR_LOCALS(size_t, nb1, src1, nb) // src0 and dst as viewed during set const size_t nb0 = ggml_element_size(src0); const int im0 = (ne10 == 0 ? 0 : ne10-1); const int im1 = (ne11 == 0 ? 0 : ne11-1); const int im2 = (ne12 == 0 ? 0 : ne12-1); const int im3 = (ne13 == 0 ? 0 : ne13-1); GGML_ASSERT(offset + im0*nb0 + im1*nb1 + im2*nb2 + im3*nb3 <= ggml_nbytes(dst)); GGML_ASSERT(nb10 == sizeof(int32_t)); // rows per thread const int dr = (nr + nth - 1)/nth; // row range for this thread const int ir0 = dr*ith; const int ir1 = MIN(ir0 + dr, nr); for (int ir = ir0; ir < ir1; ++ir) { // src0 and dst are viewed with shape of src1 and offset // => same indices const int i3 = ir/(ne12*ne11); const int i2 = (ir - i3*ne12*ne11)/ne11; const int i1 = (ir - i3*ne12*ne11 - i2*ne11); ggml_vec_cpy_i32(nc, (int32_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 + offset), (int32_t *) ((char *) src1->data + i3*nb13 + i2*nb12 + i1*nb11)); } }
O0
c
ggml_compute_forward_set_i32: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe260 testb $0x1, %al jne 0x2c183 leaq 0x479f9(%rip), %rdi # 0x73b62 movl $0x1fc1, %esi # imm = 0x1FC1 leaq 0x47a4c(%rip), %rdx # 0x73bc1 leaq 0x4813e(%rip), %rcx # 0x742ba movb $0x0, %al callq 0xe270 movq -0x10(%rbp), %rdi callq 0xd280 testb $0x1, %al jne 0x2c192 jmp 0x2c19f movq -0x18(%rbp), %rdi callq 0xd280 testb $0x1, %al jne 0x2c1c0 leaq 0x479bc(%rip), %rdi # 0x73b62 movl $0x1fc2, %esi # imm = 0x1FC2 leaq 0x47a0f(%rip), %rdx # 0x73bc1 leaq 0x480ae(%rip), %rcx # 0x74267 movb $0x0, %al callq 0xe270 movq -0x10(%rbp), %rax movslq 0x54(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movslq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movslq 0x5c(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movslq 0x60(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x64(%rax) setne %al andb $0x1, %al movb %al, -0x41(%rbp) testb $0x1, -0x41(%rbp) jne 0x2c25f movq -0x8(%rbp), %rax cmpl $0x0, (%rax) jne 0x2c252 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0xe0(%rbp) movq -0x18(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0xd8(%rbp) movq -0x10(%rbp), %rdi callq 0xd0d0 movq -0xe0(%rbp), %rdi movq -0xd8(%rbp), %rsi movq %rax, %rdx callq 0xd8a0 movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0xd060 movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, -0x48(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x4c(%rbp) movq -0x20(%rbp), %rdi callq 0xdc20 movl %eax, -0x50(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movl %eax, -0x54(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x70(%rbp) movq -0x20(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x78(%rbp) movq -0x20(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x80(%rbp) movq -0x20(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x88(%rbp) movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x98(%rbp) movq -0x18(%rbp), %rdi callq 0xdb50 movq %rax, -0xa0(%rbp) cmpq $0x0, -0x60(%rbp) jne 0x2c314 xorl %eax, %eax movq %rax, -0xe8(%rbp) jmp 0x2c323 movq -0x60(%rbp), %rax subq $0x1, %rax movq %rax, -0xe8(%rbp) movq -0xe8(%rbp), %rax movl %eax, -0xa4(%rbp) cmpq $0x0, -0x68(%rbp) jne 0x2c342 xorl %eax, %eax movq %rax, -0xf0(%rbp) jmp 0x2c351 movq -0x68(%rbp), %rax subq $0x1, %rax movq %rax, -0xf0(%rbp) movq -0xf0(%rbp), %rax movl %eax, -0xa8(%rbp) cmpq $0x0, -0x70(%rbp) jne 0x2c370 xorl %eax, %eax movq %rax, -0xf8(%rbp) jmp 0x2c37f movq -0x70(%rbp), %rax subq $0x1, %rax movq %rax, -0xf8(%rbp) movq -0xf8(%rbp), %rax movl %eax, -0xac(%rbp) cmpq $0x0, -0x78(%rbp) jne 0x2c39e xorl %eax, %eax movq %rax, -0x100(%rbp) jmp 0x2c3ad movq -0x78(%rbp), %rax subq $0x1, %rax movq %rax, -0x100(%rbp) movq -0x100(%rbp), %rax movl %eax, -0xb0(%rbp) movq -0x40(%rbp), %rax movslq -0xa4(%rbp), %rcx imulq -0xa0(%rbp), %rcx addq %rcx, %rax movslq -0xa8(%rbp), %rcx imulq -0x28(%rbp), %rcx addq %rcx, %rax movslq -0xac(%rbp), %rcx imulq -0x30(%rbp), %rcx addq %rcx, %rax movslq -0xb0(%rbp), %rcx imulq -0x38(%rbp), %rcx addq %rcx, %rax movq %rax, -0x108(%rbp) movq -0x10(%rbp), %rdi callq 0xd0d0 movq %rax, %rcx movq -0x108(%rbp), %rax cmpq %rcx, %rax jbe 0x2c43d leaq 0x4773f(%rip), %rdi # 0x73b62 movl $0x1fe9, %esi # imm = 0x1FE9 leaq 0x47792(%rip), %rdx # 0x73bc1 leaq 0x48b76(%rip), %rcx # 0x74fac movb $0x0, %al callq 0xe270 cmpq $0x4, -0x80(%rbp) je 0x2c465 leaq 0x47717(%rip), %rdi # 0x73b62 movl $0x1feb, %esi # imm = 0x1FEB leaq 0x4776a(%rip), %rdx # 0x73bc1 leaq 0x48b91(%rip), %rcx # 0x74fef movb $0x0, %al callq 0xe270 movl -0x50(%rbp), %eax addl -0x4c(%rbp), %eax subl $0x1, %eax cltd idivl -0x4c(%rbp) movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax imull -0x48(%rbp), %eax movl %eax, -0xb8(%rbp) movl -0xb8(%rbp), %eax addl -0xb4(%rbp), %eax cmpl -0x50(%rbp), %eax jge 0x2c4ad movl -0xb8(%rbp), %eax addl -0xb4(%rbp), %eax movl %eax, -0x10c(%rbp) jmp 0x2c4b6 movl -0x50(%rbp), %eax movl %eax, -0x10c(%rbp) movl -0x10c(%rbp), %eax movl %eax, -0xbc(%rbp) movl -0xb8(%rbp), %eax movl %eax, -0xc0(%rbp) movl -0xc0(%rbp), %eax cmpl -0xbc(%rbp), %eax jge 0x2c5eb movslq -0xc0(%rbp), %rax movq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx cqto idivq %rcx movl %eax, -0xc4(%rbp) movslq -0xc0(%rbp), %rax movslq -0xc4(%rbp), %rcx imulq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax cqto idivq -0x68(%rbp) movl %eax, -0xc8(%rbp) movslq -0xc0(%rbp), %rax movslq -0xc4(%rbp), %rcx imulq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax movslq -0xc8(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax movl %eax, -0xcc(%rbp) movl -0x54(%rbp), %edi movq -0x10(%rbp), %rax movq 0xf8(%rax), %rsi movslq -0xc4(%rbp), %rax imulq -0x38(%rbp), %rax addq %rax, %rsi movslq -0xc8(%rbp), %rax imulq -0x30(%rbp), %rax addq %rax, %rsi movslq -0xcc(%rbp), %rax imulq -0x28(%rbp), %rax addq %rax, %rsi addq -0x40(%rbp), %rsi movq -0x20(%rbp), %rax movq 0xf8(%rax), %rdx movslq -0xc4(%rbp), %rax imulq -0x98(%rbp), %rax addq %rax, %rdx movslq -0xc8(%rbp), %rax imulq -0x90(%rbp), %rax addq %rax, %rdx movslq -0xcc(%rbp), %rax imulq -0x88(%rbp), %rax addq %rax, %rdx callq 0x2c600 movl -0xc0(%rbp), %eax addl $0x1, %eax movl %eax, -0xc0(%rbp) jmp 0x2c4ce addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_set_i32: push rbp mov rbp, rsp sub rsp, 110h 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_10] mov rax, [rax+0A0h] mov [rbp+var_20], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call _ggml_are_same_shape test al, 1 jnz short loc_2C183 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1FC1h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)" mov al, 0 call _ggml_abort loc_2C183: mov rdi, [rbp+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_2C192 jmp short loc_2C19F loc_2C192: mov rdi, [rbp+var_18] call _ggml_is_contiguous test al, 1 jnz short loc_2C1C0 loc_2C19F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1FC2h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_1; "ggml_is_contiguous(dst) && ggml_is_cont"... mov al, 0 call _ggml_abort loc_2C1C0: mov rax, [rbp+var_10] movsxd rax, dword ptr [rax+54h] mov [rbp+var_28], rax mov rax, [rbp+var_10] movsxd rax, dword ptr [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_10] movsxd rax, dword ptr [rax+5Ch] mov [rbp+var_38], rax mov rax, [rbp+var_10] movsxd rax, dword ptr [rax+60h] mov [rbp+var_40], rax mov rax, [rbp+var_10] cmp dword ptr [rax+64h], 0 setnz al and al, 1 mov [rbp+var_41], al test [rbp+var_41], 1 jnz short loc_2C25F mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jnz short loc_2C252 mov rax, [rbp+var_10] mov rax, [rax+0F8h] mov [rbp+var_E0], rax mov rax, [rbp+var_18] mov rax, [rax+0F8h] mov [rbp+var_D8], rax mov rdi, [rbp+var_10] call _ggml_nbytes mov rdi, [rbp+var_E0] mov rsi, [rbp+var_D8] mov rdx, rax call _memcpy loc_2C252: mov rax, [rbp+var_8] mov rdi, [rax+18h] call _ggml_barrier loc_2C25F: mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_48], eax mov rax, [rbp+var_8] mov eax, [rax+4] mov [rbp+var_4C], eax mov rdi, [rbp+var_20] call _ggml_nrows mov [rbp+var_50], eax mov rax, [rbp+var_20] mov rax, [rax+10h] mov [rbp+var_54], eax mov rax, [rbp+var_20] mov rax, [rax+10h] mov [rbp+var_60], rax mov rax, [rbp+var_20] mov rax, [rax+18h] mov [rbp+var_68], rax mov rax, [rbp+var_20] mov rax, [rax+20h] mov [rbp+var_70], rax mov rax, [rbp+var_20] mov rax, [rax+28h] mov [rbp+var_78], rax mov rax, [rbp+var_20] mov rax, [rax+30h] mov [rbp+var_80], rax mov rax, [rbp+var_20] mov rax, [rax+38h] mov [rbp+var_88], rax mov rax, [rbp+var_20] mov rax, [rax+40h] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov rax, [rax+48h] mov [rbp+var_98], rax mov rdi, [rbp+var_18] call _ggml_element_size mov [rbp+var_A0], rax cmp [rbp+var_60], 0 jnz short loc_2C314 xor eax, eax mov [rbp+var_E8], rax jmp short loc_2C323 loc_2C314: mov rax, [rbp+var_60] sub rax, 1 mov [rbp+var_E8], rax loc_2C323: mov rax, [rbp+var_E8] mov [rbp+var_A4], eax cmp [rbp+var_68], 0 jnz short loc_2C342 xor eax, eax mov [rbp+var_F0], rax jmp short loc_2C351 loc_2C342: mov rax, [rbp+var_68] sub rax, 1 mov [rbp+var_F0], rax loc_2C351: mov rax, [rbp+var_F0] mov [rbp+var_A8], eax cmp [rbp+var_70], 0 jnz short loc_2C370 xor eax, eax mov [rbp+var_F8], rax jmp short loc_2C37F loc_2C370: mov rax, [rbp+var_70] sub rax, 1 mov [rbp+var_F8], rax loc_2C37F: mov rax, [rbp+var_F8] mov [rbp+var_AC], eax cmp [rbp+var_78], 0 jnz short loc_2C39E xor eax, eax mov [rbp+var_100], rax jmp short loc_2C3AD loc_2C39E: mov rax, [rbp+var_78] sub rax, 1 mov [rbp+var_100], rax loc_2C3AD: mov rax, [rbp+var_100] mov [rbp+var_B0], eax mov rax, [rbp+var_40] movsxd rcx, [rbp+var_A4] imul rcx, [rbp+var_A0] add rax, rcx movsxd rcx, [rbp+var_A8] imul rcx, [rbp+var_28] add rax, rcx movsxd rcx, [rbp+var_AC] imul rcx, [rbp+var_30] add rax, rcx movsxd rcx, [rbp+var_B0] imul rcx, [rbp+var_38] add rax, rcx mov [rbp+var_108], rax mov rdi, [rbp+var_10] call _ggml_nbytes mov rcx, rax mov rax, [rbp+var_108] cmp rax, rcx jbe short loc_2C43D lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1FE9h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOffsetIm0Nb0Im; "offset + im0*nb0 + im1*nb1 + im2*nb2 + "... mov al, 0 call _ggml_abort loc_2C43D: cmp [rbp+var_80], 4 jz short loc_2C465 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1FEBh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb10SizeofInt3; "nb10 == sizeof(int32_t)" mov al, 0 call _ggml_abort loc_2C465: mov eax, [rbp+var_50] add eax, [rbp+var_4C] sub eax, 1 cdq idiv [rbp+var_4C] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] imul eax, [rbp+var_48] mov [rbp+var_B8], eax mov eax, [rbp+var_B8] add eax, [rbp+var_B4] cmp eax, [rbp+var_50] jge short loc_2C4AD mov eax, [rbp+var_B8] add eax, [rbp+var_B4] mov [rbp+var_10C], eax jmp short loc_2C4B6 loc_2C4AD: mov eax, [rbp+var_50] mov [rbp+var_10C], eax loc_2C4B6: mov eax, [rbp+var_10C] mov [rbp+var_BC], eax mov eax, [rbp+var_B8] mov [rbp+var_C0], eax loc_2C4CE: mov eax, [rbp+var_C0] cmp eax, [rbp+var_BC] jge loc_2C5EB movsxd rax, [rbp+var_C0] mov rcx, [rbp+var_70] imul rcx, [rbp+var_68] cqo idiv rcx mov [rbp+var_C4], eax movsxd rax, [rbp+var_C0] movsxd rcx, [rbp+var_C4] imul rcx, [rbp+var_70] imul rcx, [rbp+var_68] sub rax, rcx cqo idiv [rbp+var_68] mov [rbp+var_C8], eax movsxd rax, [rbp+var_C0] movsxd rcx, [rbp+var_C4] imul rcx, [rbp+var_70] imul rcx, [rbp+var_68] sub rax, rcx movsxd rcx, [rbp+var_C8] imul rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_CC], eax mov edi, [rbp+var_54] mov rax, [rbp+var_10] mov rsi, [rax+0F8h] movsxd rax, [rbp+var_C4] imul rax, [rbp+var_38] add rsi, rax movsxd rax, [rbp+var_C8] imul rax, [rbp+var_30] add rsi, rax movsxd rax, [rbp+var_CC] imul rax, [rbp+var_28] add rsi, rax add rsi, [rbp+var_40] mov rax, [rbp+var_20] mov rdx, [rax+0F8h] movsxd rax, [rbp+var_C4] imul rax, [rbp+var_98] add rdx, rax movsxd rax, [rbp+var_C8] imul rax, [rbp+var_90] add rdx, rax movsxd rax, [rbp+var_CC] imul rax, [rbp+var_88] add rdx, rax call ggml_vec_cpy_i32 mov eax, [rbp+var_C0] add eax, 1 mov [rbp+var_C0], eax jmp loc_2C4CE loc_2C5EB: add rsp, 110h pop rbp retn
long long ggml_compute_forward_set_i32(int *a1, long long a2) { long long v2; // rax long long result; // rax int v4; // [rsp+4h] [rbp-10Ch] int v5; // [rsp+10h] [rbp-100h] int v6; // [rsp+18h] [rbp-F8h] int v7; // [rsp+20h] [rbp-F0h] int v8; // [rsp+28h] [rbp-E8h] long long v9; // [rsp+30h] [rbp-E0h] long long v10; // [rsp+38h] [rbp-D8h] int v11; // [rsp+44h] [rbp-CCh] int v12; // [rsp+48h] [rbp-C8h] int v13; // [rsp+4Ch] [rbp-C4h] int i; // [rsp+50h] [rbp-C0h] int v15; // [rsp+5Ch] [rbp-B4h] long long v16; // [rsp+70h] [rbp-A0h] long long v17; // [rsp+78h] [rbp-98h] long long v18; // [rsp+80h] [rbp-90h] long long v19; // [rsp+88h] [rbp-88h] long long v20; // [rsp+90h] [rbp-80h] long long v21; // [rsp+98h] [rbp-78h] long long v22; // [rsp+A0h] [rbp-70h] long long v23; // [rsp+A8h] [rbp-68h] long long v24; // [rsp+B0h] [rbp-60h] unsigned int v25; // [rsp+BCh] [rbp-54h] int v26; // [rsp+C0h] [rbp-50h] int v27; // [rsp+C4h] [rbp-4Ch] int v28; // [rsp+C8h] [rbp-48h] long long v29; // [rsp+D0h] [rbp-40h] long long v30; // [rsp+D8h] [rbp-38h] long long v31; // [rsp+E0h] [rbp-30h] long long v32; // [rsp+E8h] [rbp-28h] _QWORD *v33; // [rsp+F0h] [rbp-20h] long long v34; // [rsp+F8h] [rbp-18h] v34 = *(_QWORD *)(a2 + 152); v33 = *(_QWORD **)(a2 + 160); if ( (ggml_are_same_shape(v34, a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8129LL, "GGML_ASSERT(%s) failed", "ggml_are_same_shape(src0, dst)"); if ( (ggml_is_contiguous(a2) & 1) == 0 || (ggml_is_contiguous(v34) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8130LL, "GGML_ASSERT(%s) failed", "ggml_is_contiguous(dst) && ggml_is_contiguous(src0)"); v32 = *(int *)(a2 + 84); v31 = *(int *)(a2 + 88); v30 = *(int *)(a2 + 92); v29 = *(int *)(a2 + 96); if ( !*(_DWORD *)(a2 + 100) ) { if ( !*a1 ) { v9 = *(_QWORD *)(a2 + 248); v10 = *(_QWORD *)(v34 + 248); v2 = ggml_nbytes(a2); memcpy(v9, v10, v2); } ggml_barrier(*((_QWORD *)a1 + 3)); } v28 = *a1; v27 = a1[1]; v26 = ggml_nrows(v33); v25 = v33[2]; v24 = v33[2]; v23 = v33[3]; v22 = v33[4]; v21 = v33[5]; v20 = v33[6]; v19 = v33[7]; v18 = v33[8]; v17 = v33[9]; v16 = ggml_element_size(v34); if ( v24 ) v8 = v24 - 1; else v8 = 0; if ( v23 ) v7 = v23 - 1; else v7 = 0; if ( v22 ) v6 = v22 - 1; else v6 = 0; if ( v21 ) v5 = v21 - 1; else v5 = 0; if ( v30 * v5 + v31 * v6 + v32 * v7 + v16 * v8 + v29 > (unsigned long long)ggml_nbytes(a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8169LL, "GGML_ASSERT(%s) failed", "offset + im0*nb0 + im1*nb1 + im2*nb2 + im3*nb3 <= ggml_nbytes(dst)"); if ( v20 != 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8171LL, "GGML_ASSERT(%s) failed", "nb10 == sizeof(int32_t)"); v15 = (v27 + v26 - 1) / v27; if ( v15 + v28 * v15 >= v26 ) v4 = v26; else v4 = v15 + v28 * ((v27 + v26 - 1) / v27); for ( i = v28 * ((v27 + v26 - 1) / v27); ; ++i ) { result = (unsigned int)i; if ( i >= v4 ) break; v13 = i / (v23 * v22); v12 = (i - v23 * v22 * v13) / v23; v11 = (i - v23 * v22 * v13) % v23; ggml_vec_cpy_i32( v25, v29 + v32 * v11 + v31 * v12 + v30 * v13 + *(_QWORD *)(a2 + 248), v19 * v11 + v18 * v12 + v17 * v13 + v33[31]); } return result; }
ggml_compute_forward_set_i32: PUSH RBP MOV RBP,RSP SUB RSP,0x110 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 + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010e260 TEST AL,0x1 JNZ 0x0012c183 LEA RDI,[0x173b62] MOV ESI,0x1fc1 LEA RDX,[0x173bc1] LEA RCX,[0x1742ba] MOV AL,0x0 CALL 0x0010e270 LAB_0012c183: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d280 TEST AL,0x1 JNZ 0x0012c192 JMP 0x0012c19f LAB_0012c192: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010d280 TEST AL,0x1 JNZ 0x0012c1c0 LAB_0012c19f: LEA RDI,[0x173b62] MOV ESI,0x1fc2 LEA RDX,[0x173bc1] LEA RCX,[0x174267] MOV AL,0x0 CALL 0x0010e270 LAB_0012c1c0: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RAX,dword ptr [RAX + 0x54] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RAX,dword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RAX,dword ptr [RAX + 0x5c] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RAX,dword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x64],0x0 SETNZ AL AND AL,0x1 MOV byte ptr [RBP + -0x41],AL TEST byte ptr [RBP + -0x41],0x1 JNZ 0x0012c25f MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JNZ 0x0012c252 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0xd8],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d0d0 MOV RDI,qword ptr [RBP + -0xe0] MOV RSI,qword ptr [RBP + -0xd8] MOV RDX,RAX CALL 0x0010d8a0 LAB_0012c252: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0010d060 LAB_0012c25f: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x4c],EAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010dc20 MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010db50 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x60],0x0 JNZ 0x0012c314 XOR EAX,EAX MOV qword ptr [RBP + -0xe8],RAX JMP 0x0012c323 LAB_0012c314: MOV RAX,qword ptr [RBP + -0x60] SUB RAX,0x1 MOV qword ptr [RBP + -0xe8],RAX LAB_0012c323: MOV RAX,qword ptr [RBP + -0xe8] MOV dword ptr [RBP + -0xa4],EAX CMP qword ptr [RBP + -0x68],0x0 JNZ 0x0012c342 XOR EAX,EAX MOV qword ptr [RBP + -0xf0],RAX JMP 0x0012c351 LAB_0012c342: MOV RAX,qword ptr [RBP + -0x68] SUB RAX,0x1 MOV qword ptr [RBP + -0xf0],RAX LAB_0012c351: MOV RAX,qword ptr [RBP + -0xf0] MOV dword ptr [RBP + -0xa8],EAX CMP qword ptr [RBP + -0x70],0x0 JNZ 0x0012c370 XOR EAX,EAX MOV qword ptr [RBP + -0xf8],RAX JMP 0x0012c37f LAB_0012c370: MOV RAX,qword ptr [RBP + -0x70] SUB RAX,0x1 MOV qword ptr [RBP + -0xf8],RAX LAB_0012c37f: MOV RAX,qword ptr [RBP + -0xf8] MOV dword ptr [RBP + -0xac],EAX CMP qword ptr [RBP + -0x78],0x0 JNZ 0x0012c39e XOR EAX,EAX MOV qword ptr [RBP + -0x100],RAX JMP 0x0012c3ad LAB_0012c39e: MOV RAX,qword ptr [RBP + -0x78] SUB RAX,0x1 MOV qword ptr [RBP + -0x100],RAX LAB_0012c3ad: MOV RAX,qword ptr [RBP + -0x100] MOV dword ptr [RBP + -0xb0],EAX MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,dword ptr [RBP + -0xa4] IMUL RCX,qword ptr [RBP + -0xa0] ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0xac] IMUL RCX,qword ptr [RBP + -0x30] ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0xb0] IMUL RCX,qword ptr [RBP + -0x38] ADD RAX,RCX MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d0d0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x108] CMP RAX,RCX JBE 0x0012c43d LEA RDI,[0x173b62] MOV ESI,0x1fe9 LEA RDX,[0x173bc1] LEA RCX,[0x174fac] MOV AL,0x0 CALL 0x0010e270 LAB_0012c43d: CMP qword ptr [RBP + -0x80],0x4 JZ 0x0012c465 LEA RDI,[0x173b62] MOV ESI,0x1feb LEA RDX,[0x173bc1] LEA RCX,[0x174fef] MOV AL,0x0 CALL 0x0010e270 LAB_0012c465: MOV EAX,dword ptr [RBP + -0x50] ADD EAX,dword ptr [RBP + -0x4c] SUB EAX,0x1 CDQ IDIV dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] IMUL EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0xb8],EAX MOV EAX,dword ptr [RBP + -0xb8] ADD EAX,dword ptr [RBP + -0xb4] CMP EAX,dword ptr [RBP + -0x50] JGE 0x0012c4ad MOV EAX,dword ptr [RBP + -0xb8] ADD EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0x10c],EAX JMP 0x0012c4b6 LAB_0012c4ad: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x10c],EAX LAB_0012c4b6: MOV EAX,dword ptr [RBP + -0x10c] MOV dword ptr [RBP + -0xbc],EAX MOV EAX,dword ptr [RBP + -0xb8] MOV dword ptr [RBP + -0xc0],EAX LAB_0012c4ce: MOV EAX,dword ptr [RBP + -0xc0] CMP EAX,dword ptr [RBP + -0xbc] JGE 0x0012c5eb MOVSXD RAX,dword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] CQO IDIV RCX MOV dword ptr [RBP + -0xc4],EAX MOVSXD RAX,dword ptr [RBP + -0xc0] MOVSXD RCX,dword ptr [RBP + -0xc4] IMUL RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX CQO IDIV qword ptr [RBP + -0x68] MOV dword ptr [RBP + -0xc8],EAX MOVSXD RAX,dword ptr [RBP + -0xc0] MOVSXD RCX,dword ptr [RBP + -0xc4] IMUL RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOVSXD RCX,dword ptr [RBP + -0xc8] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV dword ptr [RBP + -0xcc],EAX MOV EDI,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0xc4] IMUL RAX,qword ptr [RBP + -0x38] ADD RSI,RAX MOVSXD RAX,dword ptr [RBP + -0xc8] IMUL RAX,qword ptr [RBP + -0x30] ADD RSI,RAX MOVSXD RAX,dword ptr [RBP + -0xcc] IMUL RAX,qword ptr [RBP + -0x28] ADD RSI,RAX ADD RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0xc4] IMUL RAX,qword ptr [RBP + -0x98] ADD RDX,RAX MOVSXD RAX,dword ptr [RBP + -0xc8] IMUL RAX,qword ptr [RBP + -0x90] ADD RDX,RAX MOVSXD RAX,dword ptr [RBP + -0xcc] IMUL RAX,qword ptr [RBP + -0x88] ADD RDX,RAX CALL 0x0012c600 MOV EAX,dword ptr [RBP + -0xc0] ADD EAX,0x1 MOV dword ptr [RBP + -0xc0],EAX JMP 0x0012c4ce LAB_0012c5eb: ADD RSP,0x110 POP RBP RET
void ggml_compute_forward_set_i32(int *param_1,long param_2) { int iVar1; int iVar2; int iVar3; int iVar4; long lVar5; void *__dest; void *__src; int8 uVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; int iVar15; int iVar16; int iVar17; int iVar18; ulong uVar19; size_t __n; long lVar20; int local_114; int local_108; int local_100; int local_f8; int local_f0; int local_c8; lVar20 = *(long *)(param_2 + 0x98); lVar5 = *(long *)(param_2 + 0xa0); uVar19 = ggml_are_same_shape(lVar20,param_2); if ((uVar19 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1fc1,"GGML_ASSERT(%s) failed","ggml_are_same_shape(src0, dst)"); } uVar19 = ggml_is_contiguous(param_2); if (((uVar19 & 1) == 0) || (uVar19 = ggml_is_contiguous(lVar20), (uVar19 & 1) == 0)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1fc2,"GGML_ASSERT(%s) failed", "ggml_is_contiguous(dst) && ggml_is_contiguous(src0)"); } iVar1 = *(int *)(param_2 + 0x54); iVar2 = *(int *)(param_2 + 0x58); iVar3 = *(int *)(param_2 + 0x5c); iVar4 = *(int *)(param_2 + 0x60); if (*(int *)(param_2 + 100) == 0) { if (*param_1 == 0) { __dest = *(void **)(param_2 + 0xf8); __src = *(void **)(lVar20 + 0xf8); __n = ggml_nbytes(param_2); memcpy(__dest,__src,__n); } ggml_barrier(*(int8 *)(param_1 + 6)); } local_c8 = *param_1; iVar16 = param_1[1]; local_114 = ggml_nrows(lVar5); uVar6 = *(int8 *)(lVar5 + 0x10); lVar7 = *(long *)(lVar5 + 0x10); lVar8 = *(long *)(lVar5 + 0x18); lVar9 = *(long *)(lVar5 + 0x20); lVar10 = *(long *)(lVar5 + 0x28); lVar11 = *(long *)(lVar5 + 0x30); lVar12 = *(long *)(lVar5 + 0x38); lVar13 = *(long *)(lVar5 + 0x40); lVar14 = *(long *)(lVar5 + 0x48); lVar20 = ggml_element_size(lVar20); if (lVar7 == 0) { local_f0 = 0; } else { local_f0 = (int)lVar7 + -1; } iVar15 = (int)lVar8; if (lVar8 == 0) { local_f8 = 0; } else { local_f8 = iVar15 + -1; } if (lVar9 == 0) { local_100 = 0; } else { local_100 = (int)lVar9 + -1; } if (lVar10 == 0) { local_108 = 0; } else { local_108 = (int)lVar10 + -1; } uVar19 = ggml_nbytes(param_2); if (uVar19 < (ulong)((long)iVar4 + local_f0 * lVar20 + (long)local_f8 * (long)iVar1 + (long)local_100 * (long)iVar2 + (long)local_108 * (long)iVar3)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1fe9,"GGML_ASSERT(%s) failed", "offset + im0*nb0 + im1*nb1 + im2*nb2 + im3*nb3 <= ggml_nbytes(dst)"); } if (lVar11 != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1feb,"GGML_ASSERT(%s) failed","nb10 == sizeof(int32_t)"); } iVar16 = (local_114 + iVar16 + -1) / iVar16; local_c8 = iVar16 * local_c8; if (local_c8 + iVar16 < local_114) { local_114 = local_c8 + iVar16; } for (; local_c8 < local_114; local_c8 = local_c8 + 1) { iVar16 = (int)((long)local_c8 / (lVar9 * lVar8)); iVar17 = (int)(((long)local_c8 - iVar16 * lVar9 * lVar8) / lVar8); iVar18 = (local_c8 - iVar16 * (int)lVar9 * iVar15) - iVar17 * iVar15; ggml_vec_cpy_i32((int)uVar6, *(long *)(param_2 + 0xf8) + (long)iVar16 * (long)iVar3 + (long)iVar17 * (long)iVar2 + (long)iVar18 * (long)iVar1 + (long)iVar4, *(long *)(lVar5 + 0xf8) + iVar16 * lVar14 + iVar17 * lVar13 + iVar18 * lVar12); } return; }
15,526
ssz_at
corpus-core[P]colibri-stateless/src/util/ssz.c
ssz_ob_t ssz_at(ssz_ob_t ob, uint32_t index) { ssz_ob_t res = {0}; if (!ob.bytes.data || !ob.bytes.len || !ob.def) return res; uint32_t len = ssz_len(ob); if (index >= len) return res; if (ssz_is_dynamic(ob.def->def.vector.type)) { uint32_t offset = uint32_from_le(ob.bytes.data + index * 4); uint32_t end_offset = index < len - 1 ? uint32_from_le(ob.bytes.data + (index + 1) * 4) : ob.bytes.len; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes(ob.bytes.data + offset, end_offset - offset)}; } size_t element_size = ssz_fixed_length(ob.def->def.vector.type); if (element_size * (index + 1) > ob.bytes.len) return res; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes( ob.bytes.data + index * element_size, element_size)}; }
O0
c
ssz_at: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x50(%rbp) movq %rdi, -0x48(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movl %esi, -0x4(%rbp) leaq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x5110 movq -0x40(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x1b11a movq -0x40(%rbp), %rax cmpl $0x0, (%rax) je 0x1b11a movq -0x40(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x1b13a movq -0x50(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rcx movq %rcx, 0x10(%rax) jmp 0x1b29e movq -0x40(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x1b380 movl %eax, -0x24(%rbp) movl -0x4(%rbp), %eax cmpl -0x24(%rbp), %eax jb 0x1b187 movq -0x50(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rcx movq %rcx, 0x10(%rax) jmp 0x1b29e movq -0x40(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rdi callq 0x1a170 testb $0x1, %al jne 0x1b1a1 jmp 0x1b224 movq -0x40(%rbp), %rax movq 0x8(%rax), %rdi movl -0x4(%rbp), %eax shll $0x2, %eax movl %eax, %eax addq %rax, %rdi callq 0x18760 movl %eax, -0x28(%rbp) movl -0x4(%rbp), %eax movl -0x24(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jae 0x1b1e9 movq -0x40(%rbp), %rax movq 0x8(%rax), %rdi movl -0x4(%rbp), %eax addl $0x1, %eax shll $0x2, %eax movl %eax, %eax addq %rax, %rdi callq 0x18760 movl %eax, -0x54(%rbp) jmp 0x1b1f2 movq -0x40(%rbp), %rax movl (%rax), %eax movl %eax, -0x54(%rbp) movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movl -0x54(%rbp), %edx movl %edx, -0x2c(%rbp) movl -0x2c(%rbp), %edx subl -0x28(%rbp), %edx movl %edx, (%rax) movq 0x8(%rcx), %rdx movl -0x28(%rbp), %esi addq %rsi, %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rcx movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) jmp 0x1b29e movq -0x40(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rdi callq 0x1a210 movq -0x40(%rbp), %rcx movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl -0x4(%rbp), %edx addl $0x1, %edx movl %edx, %edx imulq %rdx, %rax movl (%rcx), %ecx cmpq %rcx, %rax jbe 0x1b271 movq -0x50(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rcx movq %rcx, 0x10(%rax) jmp 0x1b29e movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rdx movl %edx, (%rax) movq 0x8(%rcx), %rdx movl -0x4(%rbp), %esi imulq -0x38(%rbp), %rsi addq %rsi, %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rcx movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) movq -0x48(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax,%rax)
ssz_at: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_50], rdi mov [rbp+var_48], rdi lea rax, [rbp+arg_0] mov [rbp+var_40], rax mov [rbp+var_4], esi lea rdi, [rbp+var_20] xor esi, esi mov edx, 18h call _memset mov rax, [rbp+var_40] cmp qword ptr [rax+8], 0 jz short loc_1B11A mov rax, [rbp+var_40] cmp dword ptr [rax], 0 jz short loc_1B11A mov rax, [rbp+var_40] cmp qword ptr [rax+10h], 0 jnz short loc_1B13A loc_1B11A: mov rax, [rbp+var_50] mov rcx, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_18] mov [rax+8], rcx mov rcx, [rbp+var_10] mov [rax+10h], rcx jmp loc_1B29E loc_1B13A: mov rax, [rbp+var_40] mov rcx, [rax] mov [rsp+70h+var_70], rcx mov rcx, [rax+8] mov [rsp+70h+var_68], rcx mov rax, [rax+10h] mov [rsp+70h+var_60], rax call ssz_len mov [rbp+var_24], eax mov eax, [rbp+var_4] cmp eax, [rbp+var_24] jb short loc_1B187 mov rax, [rbp+var_50] mov rcx, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_18] mov [rax+8], rcx mov rcx, [rbp+var_10] mov [rax+10h], rcx jmp loc_1B29E loc_1B187: mov rax, [rbp+var_40] mov rax, [rax+10h] mov rdi, [rax+10h] call ssz_is_dynamic test al, 1 jnz short loc_1B1A1 jmp loc_1B224 loc_1B1A1: mov rax, [rbp+var_40] mov rdi, [rax+8] mov eax, [rbp+var_4] shl eax, 2 mov eax, eax add rdi, rax call uint32_from_le mov [rbp+var_28], eax mov eax, [rbp+var_4] mov ecx, [rbp+var_24] sub ecx, 1 cmp eax, ecx jnb short loc_1B1E9 mov rax, [rbp+var_40] mov rdi, [rax+8] mov eax, [rbp+var_4] add eax, 1 shl eax, 2 mov eax, eax add rdi, rax call uint32_from_le mov [rbp+var_54], eax jmp short loc_1B1F2 loc_1B1E9: mov rax, [rbp+var_40] mov eax, [rax] mov [rbp+var_54], eax loc_1B1F2: mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov edx, [rbp+var_54] mov [rbp+var_2C], edx mov edx, [rbp+var_2C] sub edx, [rbp+var_28] mov [rax], edx mov rdx, [rcx+8] mov esi, [rbp+var_28] add rdx, rsi mov [rax+8], rdx mov rcx, [rcx+10h] mov rcx, [rcx+10h] mov [rax+10h], rcx jmp short loc_1B29E loc_1B224: mov rax, [rbp+var_40] mov rax, [rax+10h] mov rdi, [rax+10h] call ssz_fixed_length mov rcx, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov edx, [rbp+var_4] add edx, 1 mov edx, edx imul rax, rdx mov ecx, [rcx] cmp rax, rcx jbe short loc_1B271 mov rax, [rbp+var_50] mov rcx, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_18] mov [rax+8], rcx mov rcx, [rbp+var_10] mov [rax+10h], rcx jmp short loc_1B29E loc_1B271: mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rdx, [rbp+var_38] mov [rax], edx mov rdx, [rcx+8] mov esi, [rbp+var_4] imul rsi, [rbp+var_38] add rdx, rsi mov [rax+8], rdx mov rcx, [rcx+10h] mov rcx, [rcx+10h] mov [rax+10h], rcx loc_1B29E: mov rax, [rbp+var_48] add rsp, 70h pop rbp retn
long long ssz_at( long long a1, unsigned int a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, long long a8, long long a9) { int v9; // edx int v10; // r8d int v11; // r9d int v13; // [rsp+1Ch] [rbp-54h] long long v14; // [rsp+38h] [rbp-38h] unsigned int v15; // [rsp+48h] [rbp-28h] unsigned int v16; // [rsp+4Ch] [rbp-24h] long long v17; // [rsp+50h] [rbp-20h] BYREF long long v18; // [rsp+58h] [rbp-18h] long long v19; // [rsp+60h] [rbp-10h] unsigned int v20; // [rsp+6Ch] [rbp-4h] v20 = a2; memset(&v17, 0LL, 24LL); if ( a8 && (_DWORD)a7 && a9 ) { v16 = ssz_len((unsigned int)&v17, 0, v9, a8, v10, v11, a7, a8, a9); if ( v20 < v16 ) { if ( (ssz_is_dynamic(*(_QWORD *)(a9 + 16)) & 1) != 0 ) { v15 = uint32_from_le((unsigned __int8 *)(4 * v20 + a8)); if ( v20 >= v16 - 1 ) v13 = a7; else v13 = uint32_from_le((unsigned __int8 *)(4 * (v20 + 1) + a8)); *(_DWORD *)a1 = v13 - v15; *(_QWORD *)(a1 + 8) = v15 + a8; *(_QWORD *)(a1 + 16) = *(_QWORD *)(a9 + 16); } else { v14 = ssz_fixed_length(*(_DWORD **)(a9 + 16)); if ( (unsigned long long)(v20 + 1) * v14 <= (unsigned int)a7 ) { *(_DWORD *)a1 = v14; *(_QWORD *)(a1 + 8) = v14 * v20 + a8; *(_QWORD *)(a1 + 16) = *(_QWORD *)(a9 + 16); } else { *(_QWORD *)a1 = v17; *(_QWORD *)(a1 + 8) = v18; *(_QWORD *)(a1 + 16) = v19; } } } else { *(_QWORD *)a1 = v17; *(_QWORD *)(a1 + 8) = v18; *(_QWORD *)(a1 + 16) = v19; } } else { *(_QWORD *)a1 = v17; *(_QWORD *)(a1 + 8) = v18; *(_QWORD *)(a1 + 16) = v19; } return a1; }
ssz_at: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x50],RDI MOV qword ptr [RBP + -0x48],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x4],ESI LEA RDI,[RBP + -0x20] XOR ESI,ESI MOV EDX,0x18 CALL 0x00105110 MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011b11a MOV RAX,qword ptr [RBP + -0x40] CMP dword ptr [RAX],0x0 JZ 0x0011b11a MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0011b13a LAB_0011b11a: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0011b29e LAB_0011b13a: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0011b380 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x24] JC 0x0011b187 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0011b29e LAB_0011b187: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0011a170 TEST AL,0x1 JNZ 0x0011b1a1 JMP 0x0011b224 LAB_0011b1a1: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RBP + -0x4] SHL EAX,0x2 MOV EAX,EAX ADD RDI,RAX CALL 0x00118760 MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x4] MOV ECX,dword ptr [RBP + -0x24] SUB ECX,0x1 CMP EAX,ECX JNC 0x0011b1e9 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 SHL EAX,0x2 MOV EAX,EAX ADD RDI,RAX CALL 0x00118760 MOV dword ptr [RBP + -0x54],EAX JMP 0x0011b1f2 LAB_0011b1e9: MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x54],EAX LAB_0011b1f2: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x2c],EDX MOV EDX,dword ptr [RBP + -0x2c] SUB EDX,dword ptr [RBP + -0x28] MOV dword ptr [RAX],EDX MOV RDX,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0x28] ADD RDX,RSI MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0011b29e LAB_0011b224: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0011a210 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x4] ADD EDX,0x1 MOV EDX,EDX IMUL RAX,RDX MOV ECX,dword ptr [RCX] CMP RAX,RCX JBE 0x0011b271 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0011b29e LAB_0011b271: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],EDX MOV RDX,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0x4] IMUL RSI,qword ptr [RBP + -0x38] ADD RDX,RSI MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX LAB_0011b29e: MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x70 POP RBP RET
int * ssz_at(int *param_1,uint param_2) { uint uVar1; uint uVar2; ulong uVar3; long lVar4; uint in_stack_00000008; long in_stack_00000010; long in_stack_00000018; uint local_5c; int8 local_28; int8 local_20; int8 local_18; uint local_c; local_c = param_2; memset(&local_28,0,0x18); if (((in_stack_00000010 == 0) || (in_stack_00000008 == 0)) || (in_stack_00000018 == 0)) { *(int8 *)param_1 = local_28; *(int8 *)(param_1 + 2) = local_20; *(int8 *)(param_1 + 4) = local_18; } else { uVar1 = ssz_len(); if (local_c < uVar1) { uVar3 = ssz_is_dynamic(*(int8 *)(in_stack_00000018 + 0x10)); if ((uVar3 & 1) == 0) { lVar4 = ssz_fixed_length(*(int8 *)(in_stack_00000018 + 0x10)); uVar3 = lVar4 * (ulong)(local_c + 1); if (uVar3 < in_stack_00000008 || uVar3 - in_stack_00000008 == 0) { *param_1 = (int)lVar4; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)local_c * lVar4; *(int8 *)(param_1 + 4) = *(int8 *)(in_stack_00000018 + 0x10); } else { *(int8 *)param_1 = local_28; *(int8 *)(param_1 + 2) = local_20; *(int8 *)(param_1 + 4) = local_18; } } else { uVar2 = uint32_from_le(in_stack_00000010 + (ulong)(local_c << 2)); if (local_c < uVar1 - 1) { local_5c = uint32_from_le(in_stack_00000010 + (ulong)((local_c + 1) * 4)); } else { local_5c = in_stack_00000008; } *param_1 = local_5c - uVar2; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)uVar2; *(int8 *)(param_1 + 4) = *(int8 *)(in_stack_00000018 + 0x10); } } else { *(int8 *)param_1 = local_28; *(int8 *)(param_1 + 2) = local_20; *(int8 *)(param_1 + 4) = local_18; } } return param_1; }
15,527
ssz_at
corpus-core[P]colibri-stateless/src/util/ssz.c
ssz_ob_t ssz_at(ssz_ob_t ob, uint32_t index) { ssz_ob_t res = {0}; if (!ob.bytes.data || !ob.bytes.len || !ob.def) return res; uint32_t len = ssz_len(ob); if (index >= len) return res; if (ssz_is_dynamic(ob.def->def.vector.type)) { uint32_t offset = uint32_from_le(ob.bytes.data + index * 4); uint32_t end_offset = index < len - 1 ? uint32_from_le(ob.bytes.data + (index + 1) * 4) : ob.bytes.len; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes(ob.bytes.data + offset, end_offset - offset)}; } size_t element_size = ssz_fixed_length(ob.def->def.vector.type); if (element_size * (index + 1) > ob.bytes.len) return res; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes( ob.bytes.data + index * element_size, element_size)}; }
O1
c
ssz_at: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x68(%rsp), %r15 testq %r15, %r15 setne %al movl 0x60(%rsp), %ebp testl %ebp, %ebp setne %cl andb %al, %cl movq 0x70(%rsp), %r13 testq %r13, %r13 setne %al testb %al, %cl je 0x14222 movl %esi, %r14d leaq 0x60(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) callq 0x142c2 cmpl %r14d, %eax jbe 0x14222 movl %eax, %r12d movq 0x10(%r13), %rdi movq %rdi, 0x20(%rsp) callq 0x135f8 testb %al, %al je 0x14205 leal (,%r14,4), %eax movq %rax, 0x20(%rsp) leaq (%r15,%rax), %rdi callq 0x128bd decl %r12d cmpl %r14d, %r12d jbe 0x141ee movq 0x20(%rsp), %rdi addl $0x4, %edi addq %r15, %rdi movl %eax, %r14d callq 0x128bd movl %eax, %ebp movl %r14d, %eax subl %eax, %ebp movl %ebp, (%rbx) movl %eax, %eax addq %rax, %r15 movq %r15, 0x8(%rbx) movq 0x10(%r13), %rax movq %rax, 0x10(%rbx) jmp 0x14230 movl %ebp, %r12d movq 0x20(%rsp), %r13 movq %r13, %rdi callq 0x13690 leal 0x1(%r14), %ecx imulq %rax, %rcx cmpq %r12, %rcx jbe 0x14242 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, (%rbx) movl %r14d, %ecx imulq %rax, %rcx addq %rcx, %r15 movq %r15, 0x8(%rbx) movq %r13, 0x10(%rbx) jmp 0x14230
ssz_at: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r15, [rsp+58h+arg_8] test r15, r15 setnz al mov ebp, [rsp+58h+arg_0] test ebp, ebp setnz cl and cl, al mov r13, [rsp+58h+arg_10] test r13, r13 setnz al test cl, al jz loc_14222 mov r14d, esi lea rax, [rsp+58h+arg_0] mov rcx, [rax+10h] mov [rsp+58h+var_48], rcx movups xmm0, xmmword ptr [rax] movups [rsp+58h+var_58], xmm0 call ssz_len cmp eax, r14d jbe short loc_14222 mov r12d, eax mov rdi, [r13+10h] mov [rsp+58h+var_38], rdi call ssz_is_dynamic test al, al jz short loc_14205 lea eax, ds:0[r14*4] mov [rsp+58h+var_38], rax lea rdi, [r15+rax] call uint32_from_le dec r12d cmp r12d, r14d jbe short loc_141EE mov rdi, [rsp+58h+var_38] add edi, 4 add rdi, r15 mov r14d, eax call uint32_from_le mov ebp, eax mov eax, r14d loc_141EE: sub ebp, eax mov [rbx], ebp mov eax, eax add r15, rax mov [rbx+8], r15 mov rax, [r13+10h] mov [rbx+10h], rax jmp short loc_14230 loc_14205: mov r12d, ebp mov r13, [rsp+58h+var_38] mov rdi, r13 call ssz_fixed_length lea ecx, [r14+1] imul rcx, rax cmp rcx, r12 jbe short loc_14242 loc_14222: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_14230: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_14242: mov [rbx], eax mov ecx, r14d imul rcx, rax add r15, rcx mov [rbx+8], r15 mov [rbx+10h], r13 jmp short loc_14230
long long ssz_at( long long a1, unsigned int a2, int a3, long long a4, int a5, int a6, unsigned int a7, long long a8, long long a9) { int v9; // ebp unsigned int v10; // eax unsigned int v11; // r12d unsigned int v12; // eax unsigned int v13; // r14d long long v14; // rax long long v16; // [rsp+20h] [rbp-38h] long long v17; // [rsp+20h] [rbp-38h] v9 = a7; if ( a9 == 0 || a8 == 0 || a7 == 0 || (v10 = ssz_len(a1, a2, a3, a9, a5, a6, a7, a8, a9), v10 <= a2) ) { LABEL_8: *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; return a1; } v11 = v10; v16 = *(_QWORD *)(a9 + 16); if ( !(unsigned __int8)ssz_is_dynamic(v16) ) { v14 = ssz_fixed_length(v16); if ( v14 * (unsigned long long)(a2 + 1) <= a7 ) { *(_DWORD *)a1 = v14; *(_QWORD *)(a1 + 8) = v14 * a2 + a8; *(_QWORD *)(a1 + 16) = v16; return a1; } goto LABEL_8; } v17 = 4 * a2; v12 = uint32_from_le((unsigned int *)(a8 + v17)); if ( v11 - 1 > a2 ) { v13 = v12; v9 = uint32_from_le((unsigned int *)(a8 + (unsigned int)(v17 + 4))); v12 = v13; } *(_DWORD *)a1 = v9 - v12; *(_QWORD *)(a1 + 8) = v12 + a8; *(_QWORD *)(a1 + 16) = *(_QWORD *)(a9 + 16); return a1; }
ssz_at: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R15,qword ptr [RSP + 0x68] TEST R15,R15 SETNZ AL MOV EBP,dword ptr [RSP + 0x60] TEST EBP,EBP SETNZ CL AND CL,AL MOV R13,qword ptr [RSP + 0x70] TEST R13,R13 SETNZ AL TEST CL,AL JZ 0x00114222 MOV R14D,ESI LEA RAX,[RSP + 0x60] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001142c2 CMP EAX,R14D JBE 0x00114222 MOV R12D,EAX MOV RDI,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x20],RDI CALL 0x001135f8 TEST AL,AL JZ 0x00114205 LEA EAX,[R14*0x4] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[R15 + RAX*0x1] CALL 0x001128bd DEC R12D CMP R12D,R14D JBE 0x001141ee MOV RDI,qword ptr [RSP + 0x20] ADD EDI,0x4 ADD RDI,R15 MOV R14D,EAX CALL 0x001128bd MOV EBP,EAX MOV EAX,R14D LAB_001141ee: SUB EBP,EAX MOV dword ptr [RBX],EBP MOV EAX,EAX ADD R15,RAX MOV qword ptr [RBX + 0x8],R15 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RBX + 0x10],RAX JMP 0x00114230 LAB_00114205: MOV R12D,EBP MOV R13,qword ptr [RSP + 0x20] MOV RDI,R13 CALL 0x00113690 LEA ECX,[R14 + 0x1] IMUL RCX,RAX CMP RCX,R12 JBE 0x00114242 LAB_00114222: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_00114230: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00114242: MOV dword ptr [RBX],EAX MOV ECX,R14D IMUL RCX,RAX ADD R15,RCX MOV qword ptr [RBX + 0x8],R15 MOV qword ptr [RBX + 0x10],R13 JMP 0x00114230
int * ssz_at(int *param_1,uint param_2) { int8 uVar1; char cVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; uint in_stack_00000008; long in_stack_00000010; long in_stack_00000018; if (((in_stack_00000008 != 0 && in_stack_00000010 != 0) && in_stack_00000018 != 0) && (uVar3 = ssz_len(), param_2 < uVar3)) { uVar1 = *(int8 *)(in_stack_00000018 + 0x10); cVar2 = ssz_is_dynamic(); if (cVar2 != '\0') { uVar4 = uint32_from_le(in_stack_00000010 + (ulong)(param_2 * 4)); if (param_2 < uVar3 - 1) { in_stack_00000008 = uint32_from_le((ulong)(param_2 * 4 + 4) + in_stack_00000010); } *param_1 = in_stack_00000008 - uVar4; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)uVar4; *(int8 *)(param_1 + 4) = *(int8 *)(in_stack_00000018 + 0x10); return param_1; } lVar5 = ssz_fixed_length(uVar1); uVar6 = (ulong)(param_2 + 1) * lVar5; if (uVar6 < in_stack_00000008 || uVar6 - in_stack_00000008 == 0) { *param_1 = (int)lVar5; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)param_2 * lVar5; *(int8 *)(param_1 + 4) = uVar1; return param_1; } } param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; return param_1; }
15,528
ssz_at
corpus-core[P]colibri-stateless/src/util/ssz.c
ssz_ob_t ssz_at(ssz_ob_t ob, uint32_t index) { ssz_ob_t res = {0}; if (!ob.bytes.data || !ob.bytes.len || !ob.def) return res; uint32_t len = ssz_len(ob); if (index >= len) return res; if (ssz_is_dynamic(ob.def->def.vector.type)) { uint32_t offset = uint32_from_le(ob.bytes.data + index * 4); uint32_t end_offset = index < len - 1 ? uint32_from_le(ob.bytes.data + (index + 1) * 4) : ob.bytes.len; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes(ob.bytes.data + offset, end_offset - offset)}; } size_t element_size = ssz_fixed_length(ob.def->def.vector.type); if (element_size * (index + 1) > ob.bytes.len) return res; return (ssz_ob_t) { .def = ob.def->def.vector.type, .bytes = bytes( ob.bytes.data + index * element_size, element_size)}; }
O3
c
ssz_at: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x68(%rsp), %r15 testq %r15, %r15 setne %al movl 0x60(%rsp), %ebp testl %ebp, %ebp setne %cl andb %al, %cl movq 0x70(%rsp), %r13 testq %r13, %r13 setne %al testb %al, %cl je 0x13d40 movl %esi, %r14d leaq 0x60(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) callq 0x13de0 cmpl %r14d, %eax jbe 0x13d40 movl %eax, %r12d movq 0x10(%r13), %rdi movq %rdi, 0x20(%rsp) callq 0x132e8 testb %al, %al je 0x13d23 leal (,%r14,4), %eax movq %rax, 0x20(%rsp) leaq (%r15,%rax), %rdi callq 0x125c5 decl %r12d cmpl %r14d, %r12d jbe 0x13d0c movq 0x20(%rsp), %rdi addl $0x4, %edi addq %r15, %rdi movl %eax, %r14d callq 0x125c5 movl %eax, %ebp movl %r14d, %eax subl %eax, %ebp movl %ebp, (%rbx) movl %eax, %eax addq %rax, %r15 movq %r15, 0x8(%rbx) movq 0x10(%r13), %rax movq %rax, 0x10(%rbx) jmp 0x13d4e movl %ebp, %r12d movq 0x20(%rsp), %r13 movq %r13, %rdi callq 0x13330 leal 0x1(%r14), %ecx imulq %rax, %rcx cmpq %r12, %rcx jbe 0x13d60 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, (%rbx) movl %r14d, %ecx imulq %rax, %rcx addq %rcx, %r15 movq %r15, 0x8(%rbx) movq %r13, 0x10(%rbx) jmp 0x13d4e
ssz_at: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r15, [rsp+58h+arg_8] test r15, r15 setnz al mov ebp, [rsp+58h+arg_0] test ebp, ebp setnz cl and cl, al mov r13, [rsp+58h+arg_10] test r13, r13 setnz al test cl, al jz loc_13D40 mov r14d, esi lea rax, [rsp+58h+arg_0] mov rcx, [rax+10h] mov [rsp+58h+var_48], rcx movups xmm0, xmmword ptr [rax] movups [rsp+58h+var_58], xmm0 call ssz_len cmp eax, r14d jbe short loc_13D40 mov r12d, eax mov rdi, [r13+10h] mov [rsp+58h+var_38], rdi call ssz_is_dynamic test al, al jz short loc_13D23 lea eax, ds:0[r14*4] mov [rsp+58h+var_38], rax lea rdi, [r15+rax] call uint32_from_le dec r12d cmp r12d, r14d jbe short loc_13D0C mov rdi, [rsp+58h+var_38] add edi, 4 add rdi, r15 mov r14d, eax call uint32_from_le mov ebp, eax mov eax, r14d loc_13D0C: sub ebp, eax mov [rbx], ebp mov eax, eax add r15, rax mov [rbx+8], r15 mov rax, [r13+10h] mov [rbx+10h], rax jmp short loc_13D4E loc_13D23: mov r12d, ebp mov r13, [rsp+58h+var_38] mov rdi, r13 call ssz_fixed_length lea ecx, [r14+1] imul rcx, rax cmp rcx, r12 jbe short loc_13D60 loc_13D40: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_13D4E: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_13D60: mov [rbx], eax mov ecx, r14d imul rcx, rax add r15, rcx mov [rbx+8], r15 mov [rbx+10h], r13 jmp short loc_13D4E
long long ssz_at( long long a1, unsigned int a2, int a3, long long a4, int a5, int a6, unsigned int a7, long long a8, long long a9) { int v9; // ebp unsigned int v10; // eax unsigned int v11; // r12d unsigned int v12; // eax unsigned int v13; // r14d long long v14; // rax long long v16; // [rsp+20h] [rbp-38h] long long v17; // [rsp+20h] [rbp-38h] v9 = a7; if ( a9 == 0 || a8 == 0 || a7 == 0 || (v10 = ssz_len(a1, a2, a3, a9, a5, a6, a7, a8, a9), v10 <= a2) ) { LABEL_8: *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; return a1; } v11 = v10; v16 = *(_QWORD *)(a9 + 16); if ( !(unsigned __int8)ssz_is_dynamic(v16) ) { v14 = ssz_fixed_length(v16); if ( v14 * (unsigned long long)(a2 + 1) <= a7 ) { *(_DWORD *)a1 = v14; *(_QWORD *)(a1 + 8) = v14 * a2 + a8; *(_QWORD *)(a1 + 16) = v16; return a1; } goto LABEL_8; } v17 = 4 * a2; v12 = uint32_from_le((unsigned int *)(a8 + v17)); if ( v11 - 1 > a2 ) { v13 = v12; v9 = uint32_from_le((unsigned int *)(a8 + (unsigned int)(v17 + 4))); v12 = v13; } *(_DWORD *)a1 = v9 - v12; *(_QWORD *)(a1 + 8) = v12 + a8; *(_QWORD *)(a1 + 16) = *(_QWORD *)(a9 + 16); return a1; }
ssz_at: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R15,qword ptr [RSP + 0x68] TEST R15,R15 SETNZ AL MOV EBP,dword ptr [RSP + 0x60] TEST EBP,EBP SETNZ CL AND CL,AL MOV R13,qword ptr [RSP + 0x70] TEST R13,R13 SETNZ AL TEST CL,AL JZ 0x00113d40 MOV R14D,ESI LEA RAX,[RSP + 0x60] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00113de0 CMP EAX,R14D JBE 0x00113d40 MOV R12D,EAX MOV RDI,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x20],RDI CALL 0x001132e8 TEST AL,AL JZ 0x00113d23 LEA EAX,[R14*0x4] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[R15 + RAX*0x1] CALL 0x001125c5 DEC R12D CMP R12D,R14D JBE 0x00113d0c MOV RDI,qword ptr [RSP + 0x20] ADD EDI,0x4 ADD RDI,R15 MOV R14D,EAX CALL 0x001125c5 MOV EBP,EAX MOV EAX,R14D LAB_00113d0c: SUB EBP,EAX MOV dword ptr [RBX],EBP MOV EAX,EAX ADD R15,RAX MOV qword ptr [RBX + 0x8],R15 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RBX + 0x10],RAX JMP 0x00113d4e LAB_00113d23: MOV R12D,EBP MOV R13,qword ptr [RSP + 0x20] MOV RDI,R13 CALL 0x00113330 LEA ECX,[R14 + 0x1] IMUL RCX,RAX CMP RCX,R12 JBE 0x00113d60 LAB_00113d40: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_00113d4e: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00113d60: MOV dword ptr [RBX],EAX MOV ECX,R14D IMUL RCX,RAX ADD R15,RCX MOV qword ptr [RBX + 0x8],R15 MOV qword ptr [RBX + 0x10],R13 JMP 0x00113d4e
int * ssz_at(int *param_1,uint param_2) { int8 uVar1; char cVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; uint in_stack_00000008; long in_stack_00000010; long in_stack_00000018; if (((in_stack_00000008 != 0 && in_stack_00000010 != 0) && in_stack_00000018 != 0) && (uVar3 = ssz_len(), param_2 < uVar3)) { uVar1 = *(int8 *)(in_stack_00000018 + 0x10); cVar2 = ssz_is_dynamic(); if (cVar2 != '\0') { uVar4 = uint32_from_le(in_stack_00000010 + (ulong)(param_2 * 4)); if (param_2 < uVar3 - 1) { in_stack_00000008 = uint32_from_le((ulong)(param_2 * 4 + 4) + in_stack_00000010); } *param_1 = in_stack_00000008 - uVar4; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)uVar4; *(int8 *)(param_1 + 4) = *(int8 *)(in_stack_00000018 + 0x10); return param_1; } lVar5 = ssz_fixed_length(uVar1); uVar6 = (ulong)(param_2 + 1) * lVar5; if (uVar6 < in_stack_00000008 || uVar6 - in_stack_00000008 == 0) { *param_1 = (int)lVar5; *(ulong *)(param_1 + 2) = in_stack_00000010 + (ulong)param_2 * lVar5; *(int8 *)(param_1 + 4) = uVar1; return param_1; } } param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; return param_1; }
15,529
mi_split_page
eloqsql/storage/myisam/mi_write.c
int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, my_bool insert_last_key) { uint length,a_length,key_ref_length,t_length,nod_flag,key_length; uchar *key_pos,*pos, *UNINIT_VAR(after_key); my_off_t new_pos; MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ info->buff_used=1; nod_flag=mi_test_if_nod(buff); key_ref_length=2+nod_flag; if (insert_last_key) key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key); else key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length, &after_key); if (!key_pos) DBUG_RETURN(-1); length=(uint) (key_pos-buff); a_length=mi_getint(buff); mi_putint(buff,length,nod_flag); key_pos=after_key; if (nod_flag) { DBUG_PRINT("test",("Splitting nod")); pos=key_pos-nod_flag; memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag); } /* Move middle item to key and pointer to new page */ if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR) DBUG_RETURN(-1); _mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos); /* Store new page */ if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff)) DBUG_RETURN(-1); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0, (uchar*) 0, (uchar*) 0, key_buff, &s_temp); length=(uint) ((buff+a_length)-key_pos); memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos, (size_t) length); (*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp); mi_putint(info->buff,length+t_length+key_ref_length,nod_flag); if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ }
O3
c
mi_split_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x518, %rsp # imm = 0x518 movq %r8, %r13 movq %rdx, %r15 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rdx movslq 0x1d4(%rdi), %rax imulq $0x70, %rax, %rax addq 0x218(%rdx), %rax cmpq %rsi, %rax jne 0x8c507 movb $0x1, 0x33c(%r12) movb $0x1, 0x33d(%r12) movzbl (%rcx), %eax xorl %edi, %edi testb %al, %al jns 0x8c51f movl 0x17c(%rdx), %edi testb %r9b, %r9b movq %rsi, -0x518(%rbp) movq %rdi, -0x530(%rbp) movq %rcx, -0x528(%rbp) je 0x8c5d7 movq %r12, -0x508(%rbp) movzbl 0x1(%rcx), %edx andl $0x7f, %eax shll $0x8, %eax addl %edx, %eax addl $-0x2, %eax leaq 0x2(%rcx), %r12 movq %r12, -0x510(%rbp) testb $0x2e, 0xa(%rsi) je 0x8c5f5 movq %r15, -0x4f8(%rbp) movl %eax, %eax leaq (%r12,%rax), %r15 addq $-0x2, %r15 movq %r13, -0x500(%rbp) movb $0x0, (%r13) xorl %eax, %eax leaq -0x4f0(%rbp), %r14 movq %r12, %r13 movq %r13, %rbx movq %r12, %r13 movl %eax, %edx movq -0x500(%rbp), %rdi movq %r14, %rsi callq 0x29080 movq -0x518(%rbp), %rdi xorl %esi, %esi leaq -0x510(%rbp), %rdx movq %r14, %rcx callq *0x48(%rdi) testl %eax, %eax je 0x8c62b movq -0x510(%rbp), %r12 cmpq %r15, %r12 jb 0x8c591 movq %r13, -0x520(%rbp) jmp 0x8c653 leaq -0x534(%rbp), %r8 leaq -0x520(%rbp), %r9 movq %rcx, %rdx movq %r13, %rcx callq 0x8c84c movq %rax, %rbx jmp 0x8c668 movzwl 0x12(%rsi), %ecx xorl %edx, %edx divl %ecx addl $-0x2, %eax imull %ecx, %eax addq %rax, %r12 leaq (%r12,%rcx), %rax movq %rax, -0x520(%rbp) movq %r13, %rdi movq %r12, %rsi movq %rcx, %rdx callq 0x29080 movq %r12, %rbx movq -0x508(%rbp), %r12 jmp 0x8c668 movq -0x518(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7e1f6 callq 0xa4ab2 movl $0x7e, (%rax) xorl %ebx, %ebx movq -0x508(%rbp), %r12 movq -0x500(%rbp), %r13 movq -0x4f8(%rbp), %r15 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testq %rbx, %rbx je 0x8c824 movq -0x528(%rbp), %rcx subq %rcx, %rbx movzbl 0x1(%rcx), %eax movq %rax, -0x4f8(%rbp) movzbl (%rcx), %r14d xorl %eax, %eax movq -0x530(%rbp), %rdx testl %edx, %edx setne %al shll $0xf, %eax movq %rax, -0x508(%rbp) addl %ebx, %eax movb %bl, 0x1(%rcx) movb %ah, (%rcx) movq -0x520(%rbp), %rsi movq %rsi, -0x510(%rbp) testl %edx, %edx je 0x8c6d6 movl %edx, %edx subq %rdx, %rsi movq 0x100(%r12), %rdi addq $0x2, %rdi callq 0x29080 movq %r12, %rdi movq -0x518(%rbp), %rbx movq %rbx, %rsi movl $0x3, %edx callq 0x871de movq %rax, -0x500(%rbp) cmpq $-0x1, %rax je 0x8c81f movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x88fbf movq %r12, %rdi movq %rax, %rsi movq -0x500(%rbp), %rdx callq 0x88465 leaq -0x510(%rbp), %rdx movq %rbx, %rdi movq -0x530(%rbp), %r15 movl %r15d, %esi movq %r13, %rcx callq *0x48(%rbx) testl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF je 0x8c824 andl $0x7f, %r14d shll $0x8, %r14d addq -0x4f8(%rbp), %r14 leal 0x2(%r15), %eax movl %eax, -0x4f8(%rbp) leaq -0x4f0(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rdi movl %r15d, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d movq %r13, %r9 callq *0x50(%rbx) movl %eax, %r15d movq -0x528(%rbp), %r13 addq %r14, %r13 movq -0x510(%rbp), %rsi subq %rsi, %r13 movl -0x4f8(%rbp), %r14d movq 0x100(%r12), %rax addq %r14, %rax movl %r15d, %edi addq %rax, %rdi movl %r13d, %edx callq 0x29080 addq 0x100(%r12), %r14 movq %rbx, %rdi movq %r14, %rsi leaq -0x4f0(%rbp), %rdx callq *0x58(%rbx) addl -0x4f8(%rbp), %r15d addl %r13d, %r15d movq -0x508(%rbp), %rcx addl %r15d, %ecx movq 0x100(%r12), %rax movb %r15b, 0x1(%rax) movq 0x100(%r12), %rax movb %ch, (%rax) movq 0x100(%r12), %r8 movq %r12, %rdi movq %rbx, %rsi movq -0x500(%rbp), %rdx movl $0x3, %ecx callq 0x8702c xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl $0x2, %ecx jmp 0x8c824 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8c847 movl %ecx, %eax addq $0x518, %rsp # imm = 0x518 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29220
_mi_split_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 518h mov r13, r8 mov r15, rdx mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rdx, [rdi] movsxd rax, dword ptr [rdi+1D4h] imul rax, 70h ; 'p' add rax, [rdx+218h] cmp rax, rsi jnz short loc_8C507 mov byte ptr [r12+33Ch], 1 loc_8C507: mov byte ptr [r12+33Dh], 1 movzx eax, byte ptr [rcx] xor edi, edi test al, al jns short loc_8C51F mov edi, [rdx+17Ch] loc_8C51F: test r9b, r9b mov [rbp+var_518], rsi mov [rbp+var_530], rdi mov [rbp+var_528], rcx jz loc_8C5D7 mov [rbp+var_508], r12 movzx edx, byte ptr [rcx+1] and eax, 7Fh shl eax, 8 add eax, edx add eax, 0FFFFFFFEh lea r12, [rcx+2] mov [rbp+var_510], r12 test byte ptr [rsi+0Ah], 2Eh jz loc_8C5F5 mov [rbp+var_4F8], r15 mov eax, eax lea r15, [r12+rax] add r15, 0FFFFFFFFFFFFFFFEh mov [rbp+var_500], r13 mov byte ptr [r13+0], 0 xor eax, eax lea r14, [rbp+var_4F0] mov r13, r12 loc_8C591: mov rbx, r13 mov r13, r12 mov edx, eax mov rdi, [rbp+var_500] mov rsi, r14 call _memcpy mov rdi, [rbp+var_518] xor esi, esi lea rdx, [rbp+var_510] mov rcx, r14 call qword ptr [rdi+48h] test eax, eax jz short loc_8C62B mov r12, [rbp+var_510] cmp r12, r15 jb short loc_8C591 mov [rbp+var_520], r13 jmp short loc_8C653 loc_8C5D7: lea r8, [rbp+var_534] lea r9, [rbp+var_520] mov rdx, rcx mov rcx, r13 call _mi_find_half_pos mov rbx, rax jmp short loc_8C668 loc_8C5F5: movzx ecx, word ptr [rsi+12h] xor edx, edx div ecx add eax, 0FFFFFFFEh imul eax, ecx add r12, rax lea rax, [r12+rcx] mov [rbp+var_520], rax mov rdi, r13 mov rsi, r12 mov rdx, rcx call _memcpy mov rbx, r12 mov r12, [rbp+var_508] jmp short loc_8C668 loc_8C62B: mov rax, [rbp+var_518] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor ebx, ebx loc_8C653: mov r12, [rbp+var_508] mov r13, [rbp+var_500] mov r15, [rbp+var_4F8] loc_8C668: mov ecx, 0FFFFFFFFh test rbx, rbx jz loc_8C824 mov rcx, [rbp+var_528] sub rbx, rcx movzx eax, byte ptr [rcx+1] mov [rbp+var_4F8], rax movzx r14d, byte ptr [rcx] xor eax, eax mov rdx, [rbp+var_530] test edx, edx setnz al shl eax, 0Fh mov [rbp+var_508], rax add eax, ebx mov [rcx+1], bl mov [rcx], ah mov rsi, [rbp+var_520] mov [rbp+var_510], rsi test edx, edx jz short loc_8C6D6 mov edx, edx sub rsi, rdx mov rdi, [r12+100h] add rdi, 2 call _memcpy loc_8C6D6: mov rdi, r12 mov rbx, [rbp+var_518] mov rsi, rbx mov edx, 3 call _mi_new mov [rbp+var_500], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_8C81F mov rdi, rbx mov rsi, r15 mov rdx, r13 call _mi_move_key mov rdi, r12 mov rsi, rax mov rdx, [rbp+var_500] call _mi_kpointer lea rdx, [rbp+var_510] mov rdi, rbx mov r15, [rbp+var_530] mov esi, r15d mov rcx, r13 call qword ptr [rbx+48h] test eax, eax mov ecx, 0FFFFFFFFh jz loc_8C824 and r14d, 7Fh shl r14d, 8 add r14, [rbp+var_4F8] lea eax, [r15+2] mov dword ptr [rbp+var_4F8], eax lea rax, [rbp+var_4F0] mov [rsp+540h+var_540], rax mov rdi, rbx mov esi, r15d xor edx, edx xor ecx, ecx xor r8d, r8d mov r9, r13 call qword ptr [rbx+50h] mov r15d, eax mov r13, [rbp+var_528] add r13, r14 mov rsi, [rbp+var_510] sub r13, rsi mov r14d, dword ptr [rbp+var_4F8] mov rax, [r12+100h] add rax, r14 mov edi, r15d add rdi, rax mov edx, r13d call _memcpy add r14, [r12+100h] mov rdi, rbx mov rsi, r14 lea rdx, [rbp+var_4F0] call qword ptr [rbx+58h] add r15d, dword ptr [rbp+var_4F8] add r15d, r13d mov rcx, [rbp+var_508] add ecx, r15d mov rax, [r12+100h] mov [rax+1], r15b mov rax, [r12+100h] mov [rax], ch mov r8, [r12+100h] mov rdi, r12 mov rsi, rbx mov rdx, [rbp+var_500] mov ecx, 3 call _mi_write_keypage xor ecx, ecx neg eax sbb ecx, ecx or ecx, 2 jmp short loc_8C824 loc_8C81F: mov ecx, 0FFFFFFFFh loc_8C824: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_8C847 mov eax, ecx add rsp, 518h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8C847: call ___stack_chk_fail
long long mi_split_page(long long a1, unsigned __int16 *a2, long long a3, char *a4, unsigned __int8 *a5, char a6) { unsigned __int8 *v6; // r13 long long *v8; // r12 long long v9; // rdx char v10; // al long long v11; // rdi unsigned int v12; // eax char *v13; // r12 char *v14; // r15 unsigned int v15; // eax char *v16; // r13 long long half_pos; // rbx long long v18; // rcx long long v19; // r12 unsigned int v20; // ecx char *v21; // rcx __int16 v22; // bx char v23; // r14 unsigned int v24; // edx bool v25; // zf __int16 v26; // ax unsigned __int16 *v27; // rbx _BYTE *v28; // rax unsigned int v29; // r15d int v30; // eax int v31; // r14d long long v32; // r15 unsigned int v33; // r13d long long v34; // r14 __int16 v35; // cx char v37[4]; // [rsp+Ch] [rbp-534h] BYREF long long v38; // [rsp+10h] [rbp-530h] char *v39; // [rsp+18h] [rbp-528h] char *v40; // [rsp+20h] [rbp-520h] BYREF unsigned __int16 *v41; // [rsp+28h] [rbp-518h] char *v42; // [rsp+30h] [rbp-510h] BYREF long long *v43; // [rsp+38h] [rbp-508h] unsigned __int8 *v44; // [rsp+40h] [rbp-500h] long long v45; // [rsp+48h] [rbp-4F8h] _BYTE v46[1216]; // [rsp+50h] [rbp-4F0h] BYREF unsigned long long v47; // [rsp+510h] [rbp-30h] v6 = a5; v8 = (long long *)a1; v47 = __readfsqword(0x28u); v9 = *(_QWORD *)a1; if ( (unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * *(int *)(a1 + 468)) == a2 ) *(_BYTE *)(a1 + 828) = 1; *(_BYTE *)(a1 + 829) = 1; v10 = *a4; v11 = 0LL; if ( *a4 < 0 ) v11 = *(unsigned int *)(v9 + 380); v41 = a2; v38 = v11; v39 = a4; if ( a6 ) { v43 = v8; v12 = (unsigned __int8)a4[1] + ((v10 & 0x7F) << 8) - 2; v13 = a4 + 2; v42 = a4 + 2; if ( (a2[5] & 0x2E) != 0 ) { v45 = a3; v14 = &a4[v12]; v44 = a5; *a5 = 0; v15 = 0; v16 = a4 + 2; while ( 1 ) { half_pos = (long long)v16; v16 = v13; memcpy(v44, v46, v15); v15 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, _BYTE *))v41 + 9))(v41, 0LL, &v42, v46); if ( !v15 ) break; v13 = v42; if ( v42 >= v14 ) { v40 = v16; goto LABEL_14; } } mi_report_error(126, *(_QWORD *)(*(_QWORD *)v41 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; half_pos = 0LL; LABEL_14: v8 = v43; v6 = v44; a3 = v45; } else { v18 = a2[9]; v19 = (long long)&v13[(unsigned int)v18 * (v12 / a2[9] - 2)]; v40 = (char *)(v19 + v18); memcpy(a5, v19, v18); half_pos = v19; v8 = v43; } } else { half_pos = mi_find_half_pos(v11, a2, a4, a5, v37, &v40); } v20 = -1; if ( half_pos ) { v21 = v39; v22 = half_pos - (_WORD)v39; v45 = (unsigned __int8)v39[1]; v23 = *v39; v24 = v38; v25 = (_DWORD)v38 == 0; v43 = (long long *)((unsigned __int8)((_DWORD)v38 != 0) << 15); v26 = v22 + (((_DWORD)v38 != 0) << 15); v39[1] = v22; *v21 = HIBYTE(v26); v42 = v40; if ( !v25 ) memcpy(v8[32] + 2, &v40[-v24], v24); v27 = v41; v44 = (unsigned __int8 *)mi_new(v8, (long long)v41); if ( v44 == (unsigned __int8 *)-1LL ) { return (unsigned int)-1; } else { v28 = (_BYTE *)mi_move_key((long long)v27, a3, v6); mi_kpointer((long long)v8, v28, (unsigned long long)v44); v29 = v38; v30 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, unsigned __int8 *))v27 + 9))( v27, (unsigned int)v38, &v42, v6); v20 = -1; if ( v30 ) { v31 = v45 + ((v23 & 0x7F) << 8); LODWORD(v45) = v29 + 2; v32 = (*((unsigned int ( **)(unsigned __int16 *, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))v27 + 10))( v27, v29, 0LL, 0LL, 0LL, v6, v46); v33 = v31 + (_DWORD)v39 - (_DWORD)v42; v34 = (unsigned int)v45; memcpy((unsigned int)v45 + v8[32] + v32, v42, v33); (*((void ( **)(unsigned __int16 *, long long, _BYTE *))v27 + 11))(v27, v8[32] + v34, v46); LOWORD(v32) = v33 + v45 + v32; v35 = v32 + (_WORD)v43; *(_BYTE *)(v8[32] + 1) = v32; *(_BYTE *)v8[32] = HIBYTE(v35); return (unsigned int)mi_write_keypage(v8, (long long)v27, (unsigned long long)v44, 3u, (_BYTE *)v8[32]) != 0 ? -1 : 2; } } } return v20; }
_mi_split_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x518 MOV R13,R8 MOV R15,RDX MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RDI] MOVSXD RAX,dword ptr [RDI + 0x1d4] IMUL RAX,RAX,0x70 ADD RAX,qword ptr [RDX + 0x218] CMP RAX,RSI JNZ 0x0018c507 MOV byte ptr [R12 + 0x33c],0x1 LAB_0018c507: MOV byte ptr [R12 + 0x33d],0x1 MOVZX EAX,byte ptr [RCX] XOR EDI,EDI TEST AL,AL JNS 0x0018c51f MOV EDI,dword ptr [RDX + 0x17c] LAB_0018c51f: TEST R9B,R9B MOV qword ptr [RBP + -0x518],RSI MOV qword ptr [RBP + -0x530],RDI MOV qword ptr [RBP + -0x528],RCX JZ 0x0018c5d7 MOV qword ptr [RBP + -0x508],R12 MOVZX EDX,byte ptr [RCX + 0x1] AND EAX,0x7f SHL EAX,0x8 ADD EAX,EDX ADD EAX,-0x2 LEA R12,[RCX + 0x2] MOV qword ptr [RBP + -0x510],R12 TEST byte ptr [RSI + 0xa],0x2e JZ 0x0018c5f5 MOV qword ptr [RBP + -0x4f8],R15 MOV EAX,EAX LEA R15,[R12 + RAX*0x1] ADD R15,-0x2 MOV qword ptr [RBP + -0x500],R13 MOV byte ptr [R13],0x0 XOR EAX,EAX LEA R14,[RBP + -0x4f0] MOV R13,R12 LAB_0018c591: MOV RBX,R13 MOV R13,R12 MOV EDX,EAX MOV RDI,qword ptr [RBP + -0x500] MOV RSI,R14 CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x518] XOR ESI,ESI LEA RDX,[RBP + -0x510] MOV RCX,R14 CALL qword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x0018c62b MOV R12,qword ptr [RBP + -0x510] CMP R12,R15 JC 0x0018c591 MOV qword ptr [RBP + -0x520],R13 JMP 0x0018c653 LAB_0018c5d7: LEA R8,[RBP + -0x534] LEA R9,[RBP + -0x520] MOV RDX,RCX MOV RCX,R13 CALL 0x0018c84c MOV RBX,RAX JMP 0x0018c668 LAB_0018c5f5: MOVZX ECX,word ptr [RSI + 0x12] XOR EDX,EDX DIV ECX ADD EAX,-0x2 IMUL EAX,ECX ADD R12,RAX LEA RAX,[R12 + RCX*0x1] MOV qword ptr [RBP + -0x520],RAX MOV RDI,R13 MOV RSI,R12 MOV RDX,RCX CALL 0x00129080 MOV RBX,R12 MOV R12,qword ptr [RBP + -0x508] JMP 0x0018c668 LAB_0018c62b: MOV RAX,qword ptr [RBP + -0x518] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017e1f6 CALL 0x001a4ab2 MOV dword ptr [RAX],0x7e XOR EBX,EBX LAB_0018c653: MOV R12,qword ptr [RBP + -0x508] MOV R13,qword ptr [RBP + -0x500] MOV R15,qword ptr [RBP + -0x4f8] LAB_0018c668: MOV ECX,0xffffffff TEST RBX,RBX JZ 0x0018c824 MOV RCX,qword ptr [RBP + -0x528] SUB RBX,RCX MOVZX EAX,byte ptr [RCX + 0x1] MOV qword ptr [RBP + -0x4f8],RAX MOVZX R14D,byte ptr [RCX] XOR EAX,EAX MOV RDX,qword ptr [RBP + -0x530] TEST EDX,EDX SETNZ AL SHL EAX,0xf MOV qword ptr [RBP + -0x508],RAX ADD EAX,EBX MOV byte ptr [RCX + 0x1],BL MOV byte ptr [RCX],AH MOV RSI,qword ptr [RBP + -0x520] MOV qword ptr [RBP + -0x510],RSI TEST EDX,EDX JZ 0x0018c6d6 MOV EDX,EDX SUB RSI,RDX MOV RDI,qword ptr [R12 + 0x100] ADD RDI,0x2 CALL 0x00129080 LAB_0018c6d6: MOV RDI,R12 MOV RBX,qword ptr [RBP + -0x518] MOV RSI,RBX MOV EDX,0x3 CALL 0x001871de MOV qword ptr [RBP + -0x500],RAX CMP RAX,-0x1 JZ 0x0018c81f MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x00188fbf MOV RDI,R12 MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x500] CALL 0x00188465 LEA RDX,[RBP + -0x510] MOV RDI,RBX MOV R15,qword ptr [RBP + -0x530] MOV ESI,R15D MOV RCX,R13 CALL qword ptr [RBX + 0x48] TEST EAX,EAX MOV ECX,0xffffffff JZ 0x0018c824 AND R14D,0x7f SHL R14D,0x8 ADD R14,qword ptr [RBP + -0x4f8] LEA EAX,[R15 + 0x2] MOV dword ptr [RBP + -0x4f8],EAX LEA RAX,[RBP + -0x4f0] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV ESI,R15D XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D MOV R9,R13 CALL qword ptr [RBX + 0x50] MOV R15D,EAX MOV R13,qword ptr [RBP + -0x528] ADD R13,R14 MOV RSI,qword ptr [RBP + -0x510] SUB R13,RSI MOV R14D,dword ptr [RBP + -0x4f8] MOV RAX,qword ptr [R12 + 0x100] ADD RAX,R14 MOV EDI,R15D ADD RDI,RAX MOV EDX,R13D CALL 0x00129080 ADD R14,qword ptr [R12 + 0x100] MOV RDI,RBX MOV RSI,R14 LEA RDX,[RBP + -0x4f0] CALL qword ptr [RBX + 0x58] ADD R15D,dword ptr [RBP + -0x4f8] ADD R15D,R13D MOV RCX,qword ptr [RBP + -0x508] ADD ECX,R15D MOV RAX,qword ptr [R12 + 0x100] MOV byte ptr [RAX + 0x1],R15B MOV RAX,qword ptr [R12 + 0x100] MOV byte ptr [RAX],CH MOV R8,qword ptr [R12 + 0x100] MOV RDI,R12 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x500] MOV ECX,0x3 CALL 0x0018702c XOR ECX,ECX NEG EAX SBB ECX,ECX OR ECX,0x2 JMP 0x0018c824 LAB_0018c81f: MOV ECX,0xffffffff LAB_0018c824: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018c847 MOV EAX,ECX ADD RSP,0x518 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018c847: CALL 0x00129220
uint _mi_split_page(long *param_1,long *param_2,ulong param_3,byte *param_4,int1 *param_5, char param_6) { byte bVar1; ushort uVar2; long *plVar3; uint uVar4; int iVar5; int4 *puVar6; int8 uVar7; byte *__src; long *plVar8; byte *pbVar9; long lVar10; ulong uVar11; byte *pbVar12; long in_FS_OFFSET; int1 local_53c [4]; ulong local_538; byte *local_530; byte *local_528; long *local_520; byte *local_518; long *local_510; int1 *local_508; ulong local_500; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((long *)((long)*(int *)((long)param_1 + 0x1d4) * 0x70 + *(long *)(*param_1 + 0x218)) == param_2) { *(int1 *)((long)param_1 + 0x33c) = 1; } *(int1 *)((long)param_1 + 0x33d) = 1; local_538 = 0; if ((char)*param_4 < '\0') { local_538 = (ulong)*(uint *)(*param_1 + 0x17c); } local_530 = param_4; local_520 = param_2; if (param_6 == '\0') { __src = (byte *)_mi_find_half_pos(local_538,param_2,param_4,param_5,local_53c,&local_528); plVar8 = param_1; pbVar9 = local_528; } else { uVar4 = ((*param_4 & 0x7f) * 0x100 + (uint)param_4[1]) - 2; local_518 = param_4 + 2; local_510 = param_1; if ((*(byte *)((long)param_2 + 10) & 0x2e) == 0) { uVar2 = *(ushort *)((long)param_2 + 0x12); __src = local_518 + (uVar4 / uVar2 - 2) * (uint)uVar2; local_528 = __src + uVar2; memcpy(param_5,__src,(ulong)uVar2); plVar8 = local_510; pbVar9 = local_528; } else { pbVar12 = local_518 + ((ulong)uVar4 - 2); *param_5 = 0; uVar4 = 0; pbVar9 = local_518; local_508 = param_5; local_500 = param_3; do { __src = pbVar9; pbVar9 = local_518; memcpy(local_508,local_4f8,(ulong)uVar4); uVar4 = (*(code *)local_520[9])(local_520,0,&local_518,local_4f8); if (uVar4 == 0) { mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268)); puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7e; __src = (byte *)0x0; plVar8 = local_510; param_5 = local_508; param_3 = local_500; pbVar9 = local_528; break; } plVar8 = local_510; param_5 = local_508; param_3 = local_500; } while (local_518 < pbVar12); } } local_528 = pbVar9; uVar4 = 0xffffffff; if (__src != (byte *)0x0) { local_500 = (ulong)local_530[1]; bVar1 = *local_530; iVar5 = (int)local_538; local_510 = (long *)((ulong)(iVar5 != 0) << 0xf); local_530[1] = (byte)((long)__src - (long)local_530); *local_530 = (byte)((uint)(iVar5 != 0) * 0x8000 + (int)((long)__src - (long)local_530) >> 8); local_518 = local_528; if (iVar5 != 0) { memcpy((void *)(plVar8[0x20] + 2),local_528 + -(local_538 & 0xffffffff),local_538 & 0xffffffff ); } plVar3 = local_520; local_508 = (int1 *)_mi_new(plVar8,local_520,3); if (local_508 == (int1 *)0xffffffffffffffff) { uVar4 = 0xffffffff; } else { uVar7 = _mi_move_key(plVar3,param_3,param_5); _mi_kpointer(plVar8,uVar7,local_508); uVar11 = local_538; iVar5 = (*(code *)plVar3[9])(plVar3,local_538 & 0xffffffff,&local_518,param_5); uVar4 = 0xffffffff; if (iVar5 != 0) { lVar10 = ((bVar1 & 0x7f) << 8) + local_500; local_500 = CONCAT44(local_500._4_4_,(int)uVar11 + 2); uVar4 = (*(code *)plVar3[10])(plVar3,uVar11 & 0xffffffff,0,0,0,param_5,local_4f8); pbVar9 = local_530 + (lVar10 - (long)local_518); uVar11 = local_500 & 0xffffffff; memcpy((void *)((ulong)uVar4 + plVar8[0x20] + uVar11),local_518,(ulong)pbVar9 & 0xffffffff); (*(code *)plVar3[0xb])(plVar3,uVar11 + plVar8[0x20],local_4f8); iVar5 = uVar4 + (int)local_500 + (int)pbVar9; *(char *)(plVar8[0x20] + 1) = (char)iVar5; *(char *)plVar8[0x20] = (char)((uint)((int)local_510 + iVar5) >> 8); iVar5 = _mi_write_keypage(plVar8,plVar3,local_508,3,plVar8[0x20]); uVar4 = -(uint)(iVar5 != 0) | 2; } } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
15,530
decltype(fp(0)) fmt::v11::loc_value::visit<fmt::v11::detail::loc_writer<char>>(fmt::v11::detail::loc_writer<char>&&)
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h
auto visit(Visitor&& vis) -> decltype(vis(0)) { return value_.visit(vis); }
O0
c
decltype(fp(0)) fmt::v11::loc_value::visit<fmt::v11::detail::loc_writer<char>>(fmt::v11::detail::loc_writer<char>&&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rcx movq 0x48(%rsp), %rax movq %rcx, 0xf8(%rsp) movq %rax, 0xf0(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x38(%rsp) movl 0x10(%rax), %eax movq %rax, 0x40(%rsp) subq $0xf, %rax ja 0xa742e movq 0x40(%rsp), %rax leaq 0x52935e(%rip), %rcx # 0x5d0424 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xa742e movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movl (%rax), %esi callq 0xc5ba0 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movl (%rax), %esi callq 0xc5d10 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movq (%rax), %rsi callq 0xc5e80 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movq (%rax), %rsi callq 0xc6000 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rcx movq 0xf0(%rsp), %rax movq %rax, 0x30(%rsp) movq (%rcx), %rax movq 0x8(%rcx), %rcx movq %rcx, 0xe8(%rsp) movq %rax, 0xe0(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi callq 0xac360 movq 0x30(%rsp), %rdi movq %rax, 0xd0(%rsp) movq %rdx, 0xd8(%rsp) movq 0xd0(%rsp), %rax movq 0xd8(%rsp), %rcx movq %rcx, 0xc8(%rsp) movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0xc6180 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rcx movq 0xf0(%rsp), %rax movq %rax, 0x28(%rsp) movq (%rcx), %rax movq 0x8(%rcx), %rcx movq %rcx, 0xb8(%rsp) movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0xac410 movq 0x28(%rsp), %rdi movq %rax, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movq 0xa0(%rsp), %rax movq 0xa8(%rsp), %rcx movq %rcx, 0x98(%rsp) movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0xc6390 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movb (%rax), %al andb $0x1, %al movzbl %al, %esi callq 0xc65a0 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movsbl (%rax), %esi callq 0xc65c0 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movss (%rax), %xmm0 callq 0xc65e0 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movsd (%rax), %xmm0 callq 0xc65f0 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi fldt (%rax) movq %rsp, %rax fstpt (%rax) callq 0xc6600 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movq (%rax), %rsi callq 0xc6620 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rdi movq 0xf0(%rsp), %rax movq %rax, 0x20(%rsp) callq 0xac660 movq 0x20(%rsp), %rdi movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0xc6630 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rdi movq (%rax), %rsi callq 0xc6650 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0x38(%rsp), %rax movq 0xf0(%rsp), %rcx movq %rcx, 0x18(%rsp) movq (%rax), %rcx movq %rcx, 0x60(%rsp) movq 0x8(%rax), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx leaq 0x70(%rsp), %rdi callq 0xac790 movq 0x18(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0xc6660 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0xa7458 movq 0xf0(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x5f(%rsp), %rdi callq 0xac1e0 movq 0x10(%rsp), %rdi callq 0xc6680 andb $0x1, %al movb %al, 0x107(%rsp) movb 0x107(%rsp), %al andb $0x1, %al addq $0x108, %rsp # imm = 0x108 retq nopl (%rax)
_ZN3fmt3v119loc_value5visitINS0_6detail10loc_writerIcEEEEDTclfp_Li0EEEOT_: sub rsp, 108h mov [rsp+108h+var_B8], rdi mov [rsp+108h+var_C0], rsi mov rcx, [rsp+108h+var_B8] mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_10], rcx mov qword ptr [rsp+108h+var_20+8], rax mov rax, [rsp+108h+var_10] mov [rsp+108h+var_D0], rax mov eax, [rax+10h] mov [rsp+108h+var_C8], rax sub rax, 0Fh; switch 16 cases ja def_A70CD; jumptable 00000000000A70CD default case mov rax, [rsp+108h+var_C8] lea rcx, jpt_A70CD movsxd rax, ds:(jpt_A70CD - 5D0424h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A70CF: jmp def_A70CD; jumptable 00000000000A70CD case 0 loc_A70D4: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 1 mov rdi, qword ptr [rsp+108h+var_20+8] mov esi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A70F6: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 2 mov rdi, qword ptr [rsp+108h+var_20+8] mov esi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A7118: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 3 mov rdi, qword ptr [rsp+108h+var_20+8] mov rsi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A713B: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 4 mov rdi, qword ptr [rsp+108h+var_20+8] mov rsi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A715E: mov rcx, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 5 mov rax, qword ptr [rsp+108h+var_20+8] mov [rsp+108h+var_D8], rax mov rax, [rcx] mov rcx, [rcx+8] mov qword ptr [rsp+108h+var_20], rcx mov [rsp+108h+var_28], rax mov rdi, [rsp+108h+var_28]; this mov rsi, qword ptr [rsp+108h+var_20]; __int128 call _ZN3fmt3v116detail3mapEn; fmt::v11::detail::map(__int128) mov rdi, [rsp+108h+var_D8] mov [rsp+108h+var_38], rax mov [rsp+108h+var_30], rdx mov rax, [rsp+108h+var_38] mov rcx, [rsp+108h+var_30] mov [rsp+108h+var_40], rcx mov qword ptr [rsp+108h+var_50+8], rax mov rsi, qword ptr [rsp+108h+var_50+8] mov rdx, [rsp+108h+var_40] call _ZN3fmt3v116detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A71F4: mov rcx, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 6 mov rax, qword ptr [rsp+108h+var_20+8] mov [rsp+108h+var_E0], rax mov rax, [rcx] mov rcx, [rcx+8] mov qword ptr [rsp+108h+var_50], rcx mov [rsp+108h+var_58], rax mov rdi, [rsp+108h+var_58]; this mov rsi, qword ptr [rsp+108h+var_50]; unsigned __int128 call _ZN3fmt3v116detail3mapEo; fmt::v11::detail::map(unsigned __int128) mov rdi, [rsp+108h+var_E0] mov [rsp+108h+var_68], rax mov [rsp+108h+var_60], rdx mov rax, [rsp+108h+var_68] mov rcx, [rsp+108h+var_60] mov [rsp+108h+var_70], rcx mov [rsp+108h+var_78], rax mov rsi, [rsp+108h+var_78] mov rdx, [rsp+108h+var_70] call _ZN3fmt3v116detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A728A: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 7 mov rdi, qword ptr [rsp+108h+var_20+8] mov al, [rax] and al, 1 movzx esi, al call _ZN3fmt3v116detail10loc_writerIcEclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A72B1: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 8 mov rdi, qword ptr [rsp+108h+var_20+8] movsx esi, byte ptr [rax] call _ZN3fmt3v116detail10loc_writerIcEclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A72D4: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 9 mov rdi, qword ptr [rsp+108h+var_20+8] movss xmm0, dword ptr [rax] call _ZN3fmt3v116detail10loc_writerIcEclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A72F8: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 10 mov rdi, qword ptr [rsp+108h+var_20+8] movsd xmm0, qword ptr [rax] call _ZN3fmt3v116detail10loc_writerIcEclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A731C: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 11 mov rdi, qword ptr [rsp+108h+var_20+8] fld tbyte ptr [rax] mov rax, rsp fstp tbyte ptr [rax] call _ZN3fmt3v116detail10loc_writerIcEclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A7343: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 12 mov rdi, qword ptr [rsp+108h+var_20+8] mov rsi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A7366: mov rdi, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 13 mov rax, qword ptr [rsp+108h+var_20+8] mov [rsp+108h+var_E8], rax call _ZNK3fmt3v116detail12string_valueIcE3strEv; fmt::v11::detail::string_value<char>::str(void) mov rdi, [rsp+108h+var_E8] mov [rsp+108h+var_88], rax mov [rsp+108h+var_80], rdx mov rsi, [rsp+108h+var_88] mov rdx, [rsp+108h+var_80] call _ZN3fmt3v116detail10loc_writerIcEclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A73B5: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 14 mov rdi, qword ptr [rsp+108h+var_20+8] mov rsi, [rax] call _ZN3fmt3v116detail10loc_writerIcEclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ and al, 1 mov [rsp+108h+var_1], al jmp loc_A7458 loc_A73D8: mov rax, [rsp+108h+var_D0]; jumptable 00000000000A70CD case 15 mov rcx, qword ptr [rsp+108h+var_20+8] mov [rsp+108h+var_F0], rcx mov rcx, [rax] mov [rsp+108h+var_A8], rcx mov rax, [rax+8] mov [rsp+108h+var_A0], rax mov rsi, [rsp+108h+var_A8] mov rdx, [rsp+108h+var_A0] lea rdi, [rsp+108h+var_98] call _ZN3fmt3v1116basic_format_argINS0_7contextEE6handleC2ENS0_6detail12custom_valueIS2_EE; fmt::v11::basic_format_arg<fmt::v11::context>::handle::handle(fmt::v11::detail::custom_value<fmt::v11::context>) mov rdi, [rsp+108h+var_F0] mov rsi, [rsp+108h+var_98] mov rdx, [rsp+108h+var_90] call _ZN3fmt3v116detail10loc_writerIcEclINS0_16basic_format_argINS0_7contextEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbSA_ and al, 1 mov [rsp+108h+var_1], al jmp short loc_A7458 def_A70CD: mov rax, qword ptr [rsp+108h+var_20+8]; jumptable 00000000000A70CD default case mov [rsp+108h+var_F8], rax lea rdi, [rsp+108h+var_A9]; this call _ZN3fmt3v119monostateC2Ev; fmt::v11::monostate::monostate(void) mov rdi, [rsp+108h+var_F8] call _ZN3fmt3v116detail10loc_writerIcEclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS7_ and al, 1 mov [rsp+108h+var_1], al loc_A7458: mov al, [rsp+108h+var_1] and al, 1 add rsp, 108h retn
char fmt::v11::loc_value::visit<fmt::v11::detail::loc_writer<char>>( fmt::v11::detail **a1, long long a2, unsigned long long a3, long long a4, int a5, int a6) { fmt::v11::detail *v6; // rax long long v7; // rdx int v8; // r8d int v9; // r9d fmt::v11::detail *v10; // rax long long v11; // rdx int v12; // r8d int v13; // r9d long long v14; // rdx long double v16; // [rsp+0h] [rbp-108h] long long v17; // [rsp+10h] [rbp-F8h] long long v18; // [rsp+18h] [rbp-F0h] char v19; // [rsp+5Fh] [rbp-A9h] BYREF _QWORD v20[2]; // [rsp+70h] [rbp-98h] BYREF long long v21; // [rsp+80h] [rbp-88h] long long v22; // [rsp+88h] [rbp-80h] long long v23; // [rsp+90h] [rbp-78h] long long v24; // [rsp+98h] [rbp-70h] long long v25; // [rsp+A0h] [rbp-68h] long long v26; // [rsp+A8h] [rbp-60h] fmt::v11::detail *v27; // [rsp+B0h] [rbp-58h] fmt::v11::detail *v28; // [rsp+B8h] [rbp-50h] long long v29; // [rsp+C0h] [rbp-48h] long long v30; // [rsp+C8h] [rbp-40h] long long v31; // [rsp+D0h] [rbp-38h] long long v32; // [rsp+D8h] [rbp-30h] fmt::v11::detail *v33; // [rsp+E0h] [rbp-28h] fmt::v11::detail *v34; // [rsp+E8h] [rbp-20h] long long v35; // [rsp+F0h] [rbp-18h] fmt::v11::detail **v36; // [rsp+F8h] [rbp-10h] char v37; // [rsp+107h] [rbp-1h] v36 = a1; v35 = a2; switch ( *((_DWORD *)a1 + 4) ) { case 1: v37 = ZN3fmt3v116detail10loc_writerIcEclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, *(_DWORD *)a1, a3, (_DWORD)a1, a5, a6) & 1; break; case 2: v37 = ZN3fmt3v116detail10loc_writerIcEclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, *(_DWORD *)a1, a3, (_DWORD)a1, a5, a6) & 1; break; case 3: v37 = ZN3fmt3v116detail10loc_writerIcEclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, (unsigned int)*a1, a3, (_DWORD)a1, a5, a6) & 1; break; case 4: v37 = ZN3fmt3v116detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, (unsigned int)*a1, a3, (_DWORD)a1, a5, a6) & 1; break; case 5: v6 = *a1; v34 = a1[1]; v33 = v6; v31 = fmt::v11::detail::map(v6, __PAIR128__(a3, (unsigned long long)v34)); v32 = v7; v30 = v7; v29 = v31; v37 = ZN3fmt3v116detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, v31, v7, v7, v8, v9) & 1; break; case 6: v10 = *a1; v28 = a1[1]; v27 = v10; v25 = fmt::v11::detail::map(v10, __PAIR128__(a3, (unsigned long long)v28)); v26 = v11; v24 = v11; v23 = v25; v37 = ZN3fmt3v116detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, v25, v11, v11, v12, v13) & 1; break; case 7: v37 = ZN3fmt3v116detail10loc_writerIcEclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, *(_BYTE *)a1 & 1) & 1; break; case 8: v37 = ZN3fmt3v116detail10loc_writerIcEclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, (unsigned int)*(char *)a1) & 1; break; case 9: v37 = ZN3fmt3v116detail10loc_writerIcEclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, *(float *)a1) & 1; break; case 0xA: v37 = ZN3fmt3v116detail10loc_writerIcEclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( v35, *(double *)a1) & 1; break; case 0xB: v16 = *(long double *)a1; v37 = ZN3fmt3v116detail10loc_writerIcEclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_(*(_TBYTE *)&v16) & 1; break; case 0xC: v37 = ZN3fmt3v116detail10loc_writerIcEclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_( v35, *a1) & 1; break; case 0xD: v21 = fmt::v11::detail::string_value<char>::str(a1); v22 = v14; v37 = ZN3fmt3v116detail10loc_writerIcEclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_( v35, v21, v14) & 1; break; case 0xE: v37 = ZN3fmt3v116detail10loc_writerIcEclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_( v35, *a1) & 1; break; case 0xF: v18 = v35; fmt::v11::basic_format_arg<fmt::v11::context>::handle::handle(v20, *a1, a1[1]); v37 = ZN3fmt3v116detail10loc_writerIcEclINS0_16basic_format_argINS0_7contextEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbSA_( v18, v20[0], v20[1]) & 1; break; default: v17 = v35; fmt::v11::monostate::monostate((fmt::v11::monostate *)&v19); v37 = ZN3fmt3v116detail10loc_writerIcEclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS7_(v17) & 1; break; } return v37; }
visit<fmt::v11::detail::loc_writer<char>>: SUB RSP,0x108 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xf8],RCX MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x40],RAX SUB RAX,0xf JA 0x001a742e MOV RAX,qword ptr [RSP + 0x40] LEA RCX,[0x6d0424] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: JMP 0x001a742e caseD_1: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV ESI,dword ptr [RAX] CALL 0x001c5ba0 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_2: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV ESI,dword ptr [RAX] CALL 0x001c5d10 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_3: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RAX] CALL 0x001c5e80 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_4: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RAX] CALL 0x001c6000 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_5: MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0xe8],RCX MOV qword ptr [RSP + 0xe0],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] CALL 0x001ac360 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xd0],RAX MOV qword ptr [RSP + 0xd8],RDX MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0xc8],RCX MOV qword ptr [RSP + 0xc0],RAX MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x001c6180 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_6: MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0xb8],RCX MOV qword ptr [RSP + 0xb0],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001ac410 MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0xa8],RDX MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x98],RCX MOV qword ptr [RSP + 0x90],RAX MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001c6390 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_7: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV AL,byte ptr [RAX] AND AL,0x1 MOVZX ESI,AL CALL 0x001c65a0 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_8: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOVSX ESI,byte ptr [RAX] CALL 0x001c65c0 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_9: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOVSS XMM0,dword ptr [RAX] CALL 0x001c65e0 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_a: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOVSD XMM0,qword ptr [RAX] CALL 0x001c65f0 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_b: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] FLD tword ptr [RAX] MOV RAX,RSP FSTP tword ptr [RAX] CALL 0x001c6600 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_c: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RAX] CALL 0x001c6620 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_d: MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x20],RAX CALL 0x001ac660 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001c6630 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_e: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RAX] CALL 0x001c6650 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 caseD_f: MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x18],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x60],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x68],RAX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x70] CALL 0x001ac790 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x001c6660 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x001a7458 default: MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x5f] CALL 0x001ac1e0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x001c6680 AND AL,0x1 MOV byte ptr [RSP + 0x107],AL LAB_001a7458: MOV AL,byte ptr [RSP + 0x107] AND AL,0x1 ADD RSP,0x108 RET
/* decltype ({parm#1}(0)) fmt::v11::loc_value::visit<fmt::v11::detail::loc_writer<char> >(fmt::v11::detail::loc_writer<char>&&) */ int8 __thiscall fmt::v11::loc_value::visit<fmt::v11::detail::loc_writer<char>>(loc_value *this,loc_writer *param_1) { int1 auVar1 [16]; ulong uVar2; unkbyte10 in_stack_fffffffffffffef8; int6 in_stack_ffffffffffffff02; monostate local_a9; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int1 local_88 [16]; int1 local_78 [16]; int1 local_68 [16]; detail *local_58; int8 local_50; int1 local_48 [16]; int1 local_38 [16]; detail *local_28; int8 local_20; loc_writer *local_18; loc_value *local_10; int1 local_1; local_18 = param_1; local_10 = this; switch(*(int4 *)(this + 0x10)) { case 0: default: monostate::monostate(&local_a9); uVar2 = _ZN3fmt3v116detail10loc_writerIcEclINS0_9monostateETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS7_ (param_1); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 1: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIiTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,*(int4 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 2: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIjTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,*(int4 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 3: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIxTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,*(int8 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 4: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIyTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,*(int8 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 5: local_28 = *(detail **)this; local_20 = *(int8 *)(this + 8); auVar1._10_6_ = in_stack_ffffffffffffff02; auVar1._0_10_ = in_stack_fffffffffffffef8; local_48 = detail::map(local_28,(__int128)auVar1); local_38 = local_48; uVar2 = _ZN3fmt3v116detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,local_48._0_8_,local_48._8_8_); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 6: local_58 = *(detail **)this; local_50 = *(int8 *)(this + 8); local_78 = detail::map(local_58,(uint)local_50); local_68 = local_78; uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIoTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,local_78._0_8_,local_78._8_8_); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 7: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIbTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,(byte)*this & 1); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 8: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1,(int)(char)*this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 9: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIfTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (*(int4 *)this,param_1); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 10: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIdTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (*(int8 *)this,param_1); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 0xb: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIeTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (param_1); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 0xc: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIPKcTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ (param_1,*(int8 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 0xd: local_88 = detail::string_value<char>::str((string_value<char> *)this); uVar2 = _ZN3fmt3v116detail10loc_writerIcEclINS0_17basic_string_viewIcEETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ (param_1,local_88._0_8_,local_88._8_8_); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 0xe: uVar2 = _ZN3fmt3v116detail10loc_writerIcEclIPKvTnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbS8_ (param_1,*(int8 *)this); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; break; case 0xf: local_a8 = *(int8 *)this; local_a0 = *(int8 *)(this + 8); basic_format_arg<fmt::v11::context>::handle::handle((handle *)&local_98,local_a8,local_a0); uVar2 = _ZN3fmt3v116detail10loc_writerIcEclINS0_16basic_format_argINS0_7contextEE6handleETnNSt9enable_ifIXntsr10is_integerIT_EE5valueEiE4typeELi0EEEbSA_ (param_1,local_98,local_90); uVar2 = uVar2 & 0xffffffffffffff01; local_1 = (int1)uVar2; } return CONCAT71((int7)(uVar2 >> 8),local_1); }
15,531
testing::internal::GetCurrentExecutableName()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
FilePath GetCurrentExecutableName() { FilePath result; auto args = GetArgvs(); if (!args.empty()) { #if defined(GTEST_OS_WINDOWS) || defined(GTEST_OS_OS2) result.Set(FilePath(args[0]).RemoveExtension("exe")); #else result.Set(FilePath(args[0])); #endif // GTEST_OS_WINDOWS } return result.RemoveDirectoryName(); }
O0
cpp
testing::internal::GetCurrentExecutableName(): subq $0xa8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xa0(%rsp) leaq 0x80(%rsp), %rdi callq 0xebd50 leaq 0x68(%rsp), %rdi callq 0xc1d80 jmp 0xc65e5 leaq 0x68(%rsp), %rdi callq 0xed8b0 testb $0x1, %al jne 0xc66a6 xorl %eax, %eax movl %eax, %esi leaq 0x68(%rsp), %rdi callq 0xebaa0 movq %rax, %rsi leaq 0x18(%rsp), %rdi callq 0x2f810 jmp 0xc6614 leaq 0x38(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xebb10 jmp 0xc6625 leaq 0x80(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0xebdc0 jmp 0xc6639 leaq 0x38(%rsp), %rdi callq 0xebbf0 leaq 0x18(%rsp), %rdi callq 0x1dfd0 jmp 0xc66a6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xc66e8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xc66de movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xc669a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x38(%rsp), %rdi callq 0xebbf0 leaq 0x18(%rsp), %rdi callq 0x1dfd0 jmp 0xc66de movq 0x8(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0xbf0b0 jmp 0xc66ba leaq 0x68(%rsp), %rdi callq 0xeb700 leaq 0x80(%rsp), %rdi callq 0xebbf0 movq 0x10(%rsp), %rax addq $0xa8, %rsp retq leaq 0x68(%rsp), %rdi callq 0xeb700 leaq 0x80(%rsp), %rdi callq 0xebbf0 movq 0x60(%rsp), %rdi callq 0x16cf0 nop
_ZN7testing8internal24GetCurrentExecutableNameEv: sub rsp, 0A8h mov [rsp+0A8h+var_A0], rdi mov rax, rdi mov [rsp+0A8h+var_98], rax mov [rsp+0A8h+var_8], rdi lea rdi, [rsp+0A8h+var_28]; this call _ZN7testing8internal8FilePathC2Ev; testing::internal::FilePath::FilePath(void) lea rdi, [rsp+0A8h+var_40] call _ZN7testing8internal8GetArgvsB5cxx11Ev; testing::internal::GetArgvs(void) jmp short $+2 loc_C65E5: lea rdi, [rsp+0A8h+var_40] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz loc_C66A6 xor eax, eax mov esi, eax lea rdi, [rsp+0A8h+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+0A8h+var_90] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_C6614: lea rdi, [rsp+0A8h+var_70] lea rsi, [rsp+0A8h+var_90] call _ZN7testing8internal8FilePathC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::FilePath::FilePath(std::string) jmp short $+2 loc_C6625: lea rdi, [rsp+0A8h+var_28]; this lea rsi, [rsp+0A8h+var_70]; testing::internal::FilePath * call _ZN7testing8internal8FilePath3SetERKS1_; testing::internal::FilePath::Set(testing::internal::FilePath const&) jmp short $+2 loc_C6639: lea rdi, [rsp+0A8h+var_70]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() lea rdi, [rsp+0A8h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_C66A6 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp loc_C66E8 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_C66DE mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_C669A mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_30]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() loc_C669A: lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_C66DE loc_C66A6: mov rdi, [rsp+0A8h+var_A0]; this lea rsi, [rsp+0A8h+var_28] call _ZNK7testing8internal8FilePath19RemoveDirectoryNameEv; testing::internal::FilePath::RemoveDirectoryName(void) jmp short $+2 loc_C66BA: lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+0A8h+var_28]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() mov rax, [rsp+0A8h+var_98] add rsp, 0A8h retn loc_C66DE: lea rdi, [rsp+arg_60]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_C66E8: lea rdi, [rsp+arg_78]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() mov rdi, [rsp+arg_58] call __Unwind_Resume
testing::internal * testing::internal::GetCurrentExecutableName(testing::internal *this) { long long v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d _QWORD v7[4]; // [rsp+18h] [rbp-90h] BYREF _BYTE v8[48]; // [rsp+38h] [rbp-70h] BYREF _BYTE v9[24]; // [rsp+68h] [rbp-40h] BYREF _BYTE v10[32]; // [rsp+80h] [rbp-28h] BYREF testing::internal *v11; // [rsp+A0h] [rbp-8h] v11 = this; testing::internal::FilePath::FilePath((testing::internal::FilePath *)v10); testing::internal::GetArgvs[abi:cxx11](v9); if ( (std::vector<std::string>::empty(v9) & 1) == 0 ) { v1 = std::vector<std::string>::operator[](v9, 0LL); std::string::basic_string(v7, v1); testing::internal::FilePath::FilePath((unsigned int)v8, (unsigned int)v7, v2, v3, v4, v5); testing::internal::FilePath::Set((testing::internal::FilePath *)v10, (const testing::internal::FilePath *)v8); testing::internal::FilePath::~FilePath((testing::internal::FilePath *)v8); std::string::~string(v7); } testing::internal::FilePath::RemoveDirectoryName(this, (testing::internal::FilePath *)v10); std::vector<std::string>::~vector(v9); testing::internal::FilePath::~FilePath((testing::internal::FilePath *)v10); return this; }
GetCurrentExecutableName: SUB RSP,0xa8 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xa0],RDI LEA RDI,[RSP + 0x80] CALL 0x001ebd50 LAB_001c65d9: LEA RDI,[RSP + 0x68] CALL 0x001c1d80 JMP 0x001c65e5 LAB_001c65e5: LEA RDI,[RSP + 0x68] CALL 0x001ed8b0 TEST AL,0x1 JNZ 0x001c66a6 XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x68] CALL 0x001ebaa0 MOV RSI,RAX LAB_001c6608: LEA RDI,[RSP + 0x18] CALL 0x0012f810 JMP 0x001c6614 LAB_001c6614: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x18] CALL 0x001ebb10 JMP 0x001c6625 LAB_001c6625: LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x38] CALL 0x001ebdc0 JMP 0x001c6639 LAB_001c6639: LEA RDI,[RSP + 0x38] CALL 0x001ebbf0 LEA RDI,[RSP + 0x18] CALL 0x0011dfd0 JMP 0x001c66a6 LAB_001c66a6: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x80] CALL 0x001bf0b0 LAB_001c66b8: JMP 0x001c66ba LAB_001c66ba: LEA RDI,[RSP + 0x68] CALL 0x001eb700 LEA RDI,[RSP + 0x80] CALL 0x001ebbf0 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xa8 RET
/* testing::internal::GetCurrentExecutableName() */ internal * __thiscall testing::internal::GetCurrentExecutableName(internal *this) { ulong uVar1; string *psVar2; string local_90 [32]; FilePath local_70 [48]; internal local_40 [24]; FilePath local_28 [32]; internal *local_8; local_8 = this; FilePath::FilePath(local_28); /* try { // try from 001c65d9 to 001c65e2 has its CatchHandler @ 001c664f */ GetArgvs_abi_cxx11_(local_40); uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40); if ((uVar1 & 1) == 0) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_40,0); /* try { // try from 001c6608 to 001c6611 has its CatchHandler @ 001c6662 */ std::__cxx11::string::string(local_90,psVar2); /* try { // try from 001c6614 to 001c6622 has its CatchHandler @ 001c6672 */ FilePath::FilePath(local_70,local_90); /* try { // try from 001c6625 to 001c6636 has its CatchHandler @ 001c6682 */ FilePath::Set(local_28,local_70); FilePath::~FilePath(local_70); std::__cxx11::string::~string(local_90); } /* try { // try from 001c66a6 to 001c66b7 has its CatchHandler @ 001c6662 */ FilePath::RemoveDirectoryName(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40); FilePath::~FilePath(local_28); return this; }
15,532
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>)
llama.cpp/common/./json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x2ba54 movq %rdi, %rbx movq %r14, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x18(%rdi) movzbl (%r14), %eax cmpl $0x2, %eax je 0x2b9a0 cmpl $0x1, %eax jne 0x2b9b6 leaq 0x8(%rbx), %r13 movq 0x8(%r14), %r14 movq 0x8(%rdx), %r15 movq %r15, %rdi callq 0x1ddb0 movq %rax, %r12 movq %r14, %rdi movq %r15, %rsi callq 0x2cb02 movq %r12, (%r13) jmp 0x2ba42 movq 0x8(%r14), %rdi movq 0x10(%rdx), %rsi callq 0x2cb40 movq %rax, 0x10(%rbx) jmp 0x2ba42 movq $0x1, 0x18(%rbx) leal -0x3(%rax), %ecx cmpb $0x5, %cl ja 0x2bb0f cmpq $0x0, 0x18(%rdx) jne 0x2bab3 cmpl $0x8, %eax je 0x2ba0b cmpl $0x3, %eax jne 0x2ba3e leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax leaq 0x10(%rdi), %rcx cmpq %rcx, %rax je 0x2ba04 movq (%rcx), %rsi incq %rsi movq %rax, %rdi callq 0x1d160 movq (%r15), %rdi movl $0x20, %esi jmp 0x2ba32 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax testq %rax, %rax je 0x2ba2d movq 0x10(%rdi), %rsi subq %rax, %rsi movq %rax, %rdi callq 0x1d160 movq (%r15), %rdi movl $0x28, %esi callq 0x1d160 movq $0x0, (%r15) movb $0x0, (%r14) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1d520 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9f244(%rip), %rsi # 0xcacb5 leaq 0x9f260(%rip), %rdx # 0xcacd8 movq %rsp, %rdi callq 0x237c2 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x2c684 xorl %ebp, %ebp leaq 0xdd3e1(%rip), %rsi # 0x108e80 leaq -0x2788(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 jmp 0x2bb69 movl $0x20, %edi callq 0x1d520 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9f209(%rip), %rsi # 0xcacd9 leaq 0x9f217(%rip), %rdx # 0xcacee movq %rsp, %rdi callq 0x237c2 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0x2c684 xorl %ebp, %ebp leaq 0xdd382(%rip), %rsi # 0x108e80 leaq -0x27e7(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 jmp 0x2bb69 movl $0x20, %edi callq 0x1d520 movq %rax, %rbx movq %r14, %rdi callq 0x2cae2 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x9f1bc(%rip), %rsi # 0xcacef movq %rsp, %rdi callq 0x2ca5a movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x2c886 xorl %ebp, %ebp leaq 0xdd366(%rip), %rsi # 0x108ec0 leaq -0x2843(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x2bb8e jmp 0x2bb9b jmp 0x2bba2 jmp 0x2bb82 jmp 0x2bba2 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x2bb9b movq 0x10(%rsp), %rsi incq %rsi callq 0x1d160 testb %bpl, %bpl jne 0x2bba5 jmp 0x2bbad movq %rax, %r14 movq %rbx, %rdi callq 0x1dc90 movq %r14, %rdi callq 0x1d8e0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; __int64 push r15; int push r14; void * push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov r14, rsi cmp [rdx], rsi jnz loc_2BA54 mov rbx, rdi mov [rdi], r14 xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov rax, 8000000000000000h mov [rdi+18h], rax movzx eax, byte ptr [r14] cmp eax, 2 jz short loc_2B9A0 cmp eax, 1 jnz short loc_2B9B6 lea r13, [rbx+8] mov r14, [r14+8] mov r15, [rdx+8] mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r12, rax mov rdi, r14 mov rsi, r15 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE12_M_erase_auxESt23_Rb_tree_const_iteratorISH_E; std::_Rb_tree<std::string,std::pair<std::string const,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>>,std::_Select1st<std::pair<std::string const,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>>>,std::less<void>,std::allocator<std::pair<std::string const,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>>>>::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<std::string const,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 [r13+0], r12 jmp loc_2BA42 loc_2B9A0: mov rdi, [r14+8] mov rsi, [rdx+10h] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; 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>>::_M_erase(__gnu_cxx::__normal_iterator<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>*,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>>>) mov [rbx+10h], rax jmp loc_2BA42 loc_2B9B6: mov qword ptr [rbx+18h], 1 lea ecx, [rax-3] cmp cl, 5 ja loc_2BB0F cmp qword ptr [rdx+18h], 0 jnz loc_2BAB3 cmp eax, 8 jz short loc_2BA0B cmp eax, 3 jnz short loc_2BA3E lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] lea rcx, [rdi+10h] cmp rax, rcx jz short loc_2BA04 mov rsi, [rcx] inc rsi; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15] loc_2BA04: mov esi, 20h ; ' ' jmp short loc_2BA32 loc_2BA0B: lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] test rax, rax jz short loc_2BA2D mov rsi, [rdi+10h] sub rsi, rax; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15]; void * loc_2BA2D: mov esi, 28h ; '('; unsigned __int64 loc_2BA32: call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [r15], 0 loc_2BA3E: mov byte ptr [r14], 0 loc_2BA42: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2BA54: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_48] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" 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, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_2BB69 loc_2BAB3: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_48] mov [r15-10h], r15 lea rsi, aIteratorOutOfR; "iterator out of range" lea rdx, aIteratorOutOfR+15h; "" 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, rbx; this mov esi, 0CDh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_2BB69 loc_2BB0F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; 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>::type_name(void) lea rdx, [rsp+58h+var_38] mov [rdx], rax lea rsi, aCannotUseErase; "cannot use erase() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 133h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_2BB69: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_2BB8E jmp short loc_2BB9B jmp short loc_2BBA2 jmp short loc_2BB82 jmp short loc_2BBA2 loc_2BB82: mov r14, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r15 jz short loc_2BB9B loc_2BB8E: mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2BB9B: test bpl, bpl jnz short loc_2BBA5 jmp short loc_2BBAD loc_2BBA2: mov r14, rax loc_2BBA5: mov rdi, rbx; void * call ___cxa_free_exception loc_2BBAD: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x0012ba54 MOV RBX,RDI MOV qword ptr [RDI],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV RAX,-0x8000000000000000 MOV qword ptr [RDI + 0x18],RAX MOVZX EAX,byte ptr [R14] CMP EAX,0x2 JZ 0x0012b9a0 CMP EAX,0x1 JNZ 0x0012b9b6 LEA R13,[RBX + 0x8] MOV R14,qword ptr [R14 + 0x8] MOV R15,qword ptr [RDX + 0x8] MOV RDI,R15 CALL 0x0011ddb0 MOV R12,RAX MOV RDI,R14 MOV RSI,R15 CALL 0x0012cb02 MOV qword ptr [R13],R12 JMP 0x0012ba42 LAB_0012b9a0: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [RDX + 0x10] CALL 0x0012cb40 MOV qword ptr [RBX + 0x10],RAX JMP 0x0012ba42 LAB_0012b9b6: MOV qword ptr [RBX + 0x18],0x1 LEA ECX,[RAX + -0x3] CMP CL,0x5 JA 0x0012bb0f CMP qword ptr [RDX + 0x18],0x0 JNZ 0x0012bab3 CMP EAX,0x8 JZ 0x0012ba0b CMP EAX,0x3 JNZ 0x0012ba3e LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] LEA RCX,[RDI + 0x10] CMP RAX,RCX JZ 0x0012ba04 MOV RSI,qword ptr [RCX] INC RSI MOV RDI,RAX CALL 0x0011d160 MOV RDI,qword ptr [R15] LAB_0012ba04: MOV ESI,0x20 JMP 0x0012ba32 LAB_0012ba0b: LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0012ba2d MOV RSI,qword ptr [RDI + 0x10] SUB RSI,RAX MOV RDI,RAX CALL 0x0011d160 MOV RDI,qword ptr [R15] LAB_0012ba2d: MOV ESI,0x28 LAB_0012ba32: CALL 0x0011d160 MOV qword ptr [R15],0x0 LAB_0012ba3e: MOV byte ptr [R14],0x0 LAB_0012ba42: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012ba54: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_0012ba6a: LEA RSI,[0x1cacb5] LEA RDX,[0x1cacd8] MOV RDI,RSP CALL 0x001237c2 MOV BPL,0x1 LAB_0012ba83: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0012c684 XOR EBP,EBP LEA RSI,[0x208e80] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890 LAB_0012bab3: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_0012bac9: LEA RSI,[0x1cacd9] LEA RDX,[0x1cacee] MOV RDI,RSP CALL 0x001237c2 MOV BPL,0x1 LAB_0012bae2: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x0012c684 XOR EBP,EBP LEA RSI,[0x208e80] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890 LAB_0012bb0f: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX MOV RDI,R14 CALL 0x0012cae2 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_0012bb2c: LEA RSI,[0x1cacef] MOV RDI,RSP CALL 0x0012ca5a MOV BPL,0x1 LAB_0012bb3e: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x0012c886 XOR EBP,EBP LEA RSI,[0x208ec0] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890
int8 * _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (int8 *param_1, 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> *param_2,long *param_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> bVar1; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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::_Select1st<std::pair<std::__cxx11::string_const,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> *p_Var2; _Rb_tree_node_base *p_Var3; void *pvVar4; int8 uVar5; ulong uVar6; int8 *puVar7; int1 *local_58 [2]; int1 local_48 [16]; char *local_38; if ((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> *)*param_3 != param_2) { uVar5 = __cxa_allocate_exception(0x20); local_58[0] = local_48; /* try { // try from 0012ba6a to 0012ba7f has its CatchHandler @ 0012bba2 */ std::__cxx11::string::_M_construct<char_const*> (local_58,"iterator does not fit current value",""); /* try { // try from 0012ba83 to 0012baad has its CatchHandler @ 0012bb82 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0xca,local_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *param_1 = param_2; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0x8000000000000000; bVar1 = *param_2; if (bVar1 == (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> )0x2) { uVar5 = 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>>> ::_M_erase(*(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>>> **)(param_2 + 8),param_3[2]); param_1[2] = uVar5; return param_1; } if (bVar1 == (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> )0x1) { p_Var2 = *(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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::_Select1st<std::pair<std::__cxx11::string_const,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> **)(param_2 + 8); p_Var3 = (_Rb_tree_node_base *)param_3[1]; uVar5 = std::_Rb_tree_increment(p_Var3); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,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::_Select1st<std::pair<std::__cxx11::string_const,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>> ::_M_erase_aux(p_Var2,p_Var3); param_1[1] = uVar5; return param_1; } param_1[3] = 1; if (5 < (byte)((char)bVar1 - 3U)) { uVar5 = __cxa_allocate_exception(0x20); local_38 = (char *)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> ::type_name(param_2); /* try { // try from 0012bb2c to 0012bb3a has its CatchHandler @ 0012bb7c */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> ((detail *)local_58,"cannot use erase() with ",&local_38); /* try { // try from 0012bb3e to 0012bb68 has its CatchHandler @ 0012bb69 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0x133,local_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (param_3[3] != 0) { uVar5 = __cxa_allocate_exception(0x20); local_58[0] = local_48; /* try { // try from 0012bac9 to 0012bade has its CatchHandler @ 0012bb80 */ std::__cxx11::string::_M_construct<char_const*>(local_58,"iterator out of range",""); /* try { // try from 0012bae2 to 0012bb0c has its CatchHandler @ 0012bb7e */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0xcd,local_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (bVar1 == (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> )0x8) { puVar7 = *(int8 **)(param_2 + 8); pvVar4 = (void *)*puVar7; if (pvVar4 != (void *)0x0) { operator_delete(pvVar4,puVar7[2] - (long)pvVar4); puVar7 = *(int8 **)(param_2 + 8); } uVar6 = 0x28; } else { if (bVar1 != (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> )0x3) goto LAB_0012ba3e; puVar7 = *(int8 **)(param_2 + 8); if ((long *)*puVar7 != puVar7 + 2) { operator_delete((long *)*puVar7,puVar7[2] + 1); puVar7 = *(int8 **)(param_2 + 8); } uVar6 = 0x20; } operator_delete(puVar7,uVar6); *(int8 *)(param_2 + 8) = 0; LAB_0012ba3e: *param_2 = (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> )0x0; return param_1; }
15,533
test_bug6058
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_bug6058(MYSQL *mysql) { MYSQL_STMT *stmt; MYSQL_BIND my_bind[1]; MYSQL_RES *res; MYSQL_ROW row; const char *stmt_text; char buffer[30]; ulong length; int rc; stmt_text= "SELECT CAST('0000-00-00' AS DATE)"; rc= mysql_real_query(mysql, SL(stmt_text)); check_mysql_rc(rc, mysql); res= mysql_store_result(mysql); row= mysql_fetch_row(res); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(stmt_text)); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); memset(my_bind, '\0', sizeof(my_bind)); my_bind[0].buffer_type = MYSQL_TYPE_STRING; my_bind[0].buffer = &buffer; my_bind[0].buffer_length = sizeof(buffer); my_bind[0].length = &length; mysql_stmt_bind_result(stmt, my_bind); rc= mysql_stmt_fetch(stmt); check_stmt_rc(rc, stmt); FAIL_UNLESS(strcmp(row[0], buffer) == 0, "row[0] != buffer"); mysql_free_result(res); mysql_stmt_close(stmt); return OK; }
O0
c
test_bug6058: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) leaq 0x40e2d(%rip), %rax # 0x69bd0 movq %rax, -0xd8(%rbp) movq -0x40(%rbp), %rax movq %rax, -0xf8(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0xf0(%rbp) movq -0xd8(%rbp), %rdi callq 0x141a0 movq -0xf8(%rbp), %rdi movq -0xf0(%rbp), %rsi movq %rax, %rdx callq 0x377f0 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28e4f movl -0xe4(%rbp), %eax movl %eax, -0x104(%rbp) movq -0x40(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x100(%rbp) movq -0x40(%rbp), %rdi callq 0x3c3c0 movl -0x104(%rbp), %esi movq -0x100(%rbp), %rdx movl %eax, %ecx leaq 0x3c8a6(%rip), %rdi # 0x656d5 leaq 0x3d237(%rip), %r8 # 0x6606d movl $0xb69, %r9d # imm = 0xB69 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x29041 jmp 0x28e51 movq -0x40(%rbp), %rdi callq 0x3a0c0 movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rdi callq 0x3a400 movq %rax, -0xd0(%rbp) movq -0x40(%rbp), %rdi callq 0x44950 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x118(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0x110(%rbp) movq -0xd8(%rbp), %rdi callq 0x141a0 movq -0x118(%rbp), %rdi movq -0x110(%rbp), %rsi movq %rax, %rdx callq 0x45070 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28efd movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c6b2(%rip), %rdi # 0x65590 leaq 0x3d188(%rip), %rdx # 0x6606d movl $0xb6f, %ecx # imm = 0xB6F movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x29041 jmp 0x28eff movq -0x48(%rbp), %rdi callq 0x46580 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28f49 movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c666(%rip), %rdi # 0x65590 leaq 0x3d13c(%rip), %rdx # 0x6606d movl $0xb71, %ecx # imm = 0xB71 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x29041 jmp 0x28f4b leaq -0xc0(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x14260 movl $0xfe, -0x60(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0xb0(%rbp) movq $0x1e, -0x80(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x48(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0x43940 movq -0x48(%rbp), %rdi callq 0x44020 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28fdd movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c5cf(%rip), %rdi # 0x65590 leaq 0x3d0a5(%rip), %rdx # 0x6606d movl $0xb7a, %ecx # imm = 0xB7A movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x29041 jmp 0x28fdf jmp 0x28fe1 movq -0xd0(%rbp), %rax movq (%rax), %rdi leaq -0x30(%rbp), %rsi callq 0x14600 cmpl $0x0, %eax je 0x29023 leaq 0x3c590(%rip), %rdi # 0x65590 leaq 0x40bb8(%rip), %rsi # 0x69bbf leaq 0x3d05f(%rip), %rdx # 0x6606d movl $0xb7c, %ecx # imm = 0xB7C movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x29041 jmp 0x29025 movq -0xc8(%rbp), %rdi callq 0x31900 movq -0x48(%rbp), %rdi callq 0x43eb0 movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x11c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2906b movl -0x11c(%rbp), %eax addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x144c0
test_bug6058: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi lea rax, aSelectCast0000; "SELECT CAST('0000-00-00' AS DATE)" mov [rbp+var_D8], rax mov rax, [rbp+var_40] mov [rbp+var_F8], rax mov rax, [rbp+var_D8] mov [rbp+var_F0], rax mov rdi, [rbp+var_D8] call _strlen mov rdi, [rbp+var_F8] mov rsi, [rbp+var_F0] mov rdx, rax call mysql_real_query mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28E4F mov eax, [rbp+var_E4] mov [rbp+var_104], eax mov rdi, [rbp+var_40] call mysql_error mov [rbp+var_100], rax mov rdi, [rbp+var_40] call mysql_errno mov esi, [rbp+var_104] mov rdx, [rbp+var_100] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 0B69h mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_29041 loc_28E4F: jmp short $+2 loc_28E51: mov rdi, [rbp+var_40] call mysql_store_result mov [rbp+var_C8], rax mov rdi, [rbp+var_C8] call mysql_fetch_row mov [rbp+var_D0], rax mov rdi, [rbp+var_40] call mysql_stmt_init mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_118], rax mov rax, [rbp+var_D8] mov [rbp+var_110], rax mov rdi, [rbp+var_D8] call _strlen mov rdi, [rbp+var_118] mov rsi, [rbp+var_110] mov rdx, rax call mysql_stmt_prepare mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28EFD mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B6Fh mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_29041 loc_28EFD: jmp short $+2 loc_28EFF: mov rdi, [rbp+var_48] call mysql_stmt_execute mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28F49 mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B71h mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_29041 loc_28F49: jmp short $+2 loc_28F4B: lea rdi, [rbp+var_C0] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_60], 0FEh lea rax, [rbp+var_30] mov [rbp+var_B0], rax mov [rbp+var_80], 1Eh lea rax, [rbp+var_E0] mov [rbp+var_C0], rax mov rdi, [rbp+var_48] lea rsi, [rbp+var_C0] call mysql_stmt_bind_result mov rdi, [rbp+var_48] call mysql_stmt_fetch mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28FDD mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B7Ah mov al, 0 call diag mov [rbp+var_34], 1 jmp short loc_29041 loc_28FDD: jmp short $+2 loc_28FDF: jmp short $+2 loc_28FE1: mov rax, [rbp+var_D0] mov rdi, [rax] lea rsi, [rbp+var_30] call _strcmp cmp eax, 0 jz short loc_29023 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aRow0Buffer; "row[0] != buffer" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B7Ch mov al, 0 call diag mov [rbp+var_34], 1 jmp short loc_29041 loc_29023: jmp short $+2 loc_29025: mov rdi, [rbp+var_C8] call mysql_free_result mov rdi, [rbp+var_48] call mysql_stmt_close mov [rbp+var_34], 0 loc_29041: mov eax, [rbp+var_34] mov [rbp+var_11C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2906B mov eax, [rbp+var_11C] add rsp, 120h pop rbp retn loc_2906B: call ___stack_chk_fail
long long test_bug6058(long long a1) { long long v1; // rax int v2; // eax long long v3; // rax int v4; // eax int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d int v9; // r9d int v10; // eax int v11; // r8d int v12; // r9d int v13; // r8d int v14; // r9d int v16; // [rsp+20h] [rbp-100h] int v17; // [rsp+3Ch] [rbp-E4h] char v18; // [rsp+40h] [rbp-E0h] BYREF const char *v19; // [rsp+48h] [rbp-D8h] _QWORD *row; // [rsp+50h] [rbp-D0h] long long v21; // [rsp+58h] [rbp-C8h] _QWORD v22[12]; // [rsp+60h] [rbp-C0h] BYREF int v23; // [rsp+C0h] [rbp-60h] long long v24; // [rsp+D8h] [rbp-48h] long long v25; // [rsp+E0h] [rbp-40h] _BYTE v27[40]; // [rsp+F0h] [rbp-30h] BYREF unsigned long long v28; // [rsp+118h] [rbp-8h] v28 = __readfsqword(0x28u); v25 = a1; v19 = "SELECT CAST('0000-00-00' AS DATE)"; v1 = strlen("SELECT CAST('0000-00-00' AS DATE)"); v17 = mysql_real_query(a1, "SELECT CAST('0000-00-00' AS DATE)", v1); if ( v17 ) { v16 = mysql_error(v25); v2 = mysql_errno(v25); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v17, v16, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2921); return 1; } else { v21 = mysql_store_result(v25); row = (_QWORD *)mysql_fetch_row(v21); v24 = mysql_stmt_init(v25); v3 = strlen(v19); if ( (unsigned int)mysql_stmt_prepare(v24, v19, v3) ) { v4 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2927, v5, v6); return 1; } else if ( (unsigned int)mysql_stmt_execute(v24) ) { v7 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2929, v8, v9); return 1; } else { memset(v22, 0LL, 112LL); v23 = 254; v22[2] = v27; v22[8] = 30LL; v22[0] = &v18; mysql_stmt_bind_result(v24, v22); if ( (unsigned int)mysql_stmt_fetch(v24) ) { v10 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v10, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2938, v11, v12); return 1; } else if ( !(unsigned int)strcmp(*row, v27) ) { mysql_free_result(v21); mysql_stmt_close(v24); return 0; } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"row[0] != buffer", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2940, v13, v14); return 1; } } } }
test_bug6058: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI LEA RAX,[0x169bd0] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0xf0],RAX MOV RDI,qword ptr [RBP + -0xd8] CALL 0x001141a0 MOV RDI,qword ptr [RBP + -0xf8] MOV RSI,qword ptr [RBP + -0xf0] MOV RDX,RAX CALL 0x001377f0 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128e4f MOV EAX,dword ptr [RBP + -0xe4] MOV dword ptr [RBP + -0x104],EAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x100],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x104] MOV RDX,qword ptr [RBP + -0x100] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0xb69 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00129041 LAB_00128e4f: JMP 0x00128e51 LAB_00128e51: MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013a0c0 MOV qword ptr [RBP + -0xc8],RAX MOV RDI,qword ptr [RBP + -0xc8] CALL 0x0013a400 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00144950 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0x110],RAX MOV RDI,qword ptr [RBP + -0xd8] CALL 0x001141a0 MOV RDI,qword ptr [RBP + -0x118] MOV RSI,qword ptr [RBP + -0x110] MOV RDX,RAX CALL 0x00145070 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128efd MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb6f MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00129041 LAB_00128efd: JMP 0x00128eff LAB_00128eff: MOV RDI,qword ptr [RBP + -0x48] CALL 0x00146580 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128f49 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb71 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00129041 LAB_00128f49: JMP 0x00128f4b LAB_00128f4b: LEA RDI,[RBP + -0xc0] XOR ESI,ESI MOV EDX,0x70 CALL 0x00114260 MOV dword ptr [RBP + -0x60],0xfe LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0x80],0x1e LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0xc0] CALL 0x00143940 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00144020 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128fdd MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb7a MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00129041 LAB_00128fdd: JMP 0x00128fdf LAB_00128fdf: JMP 0x00128fe1 LAB_00128fe1: MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x30] CALL 0x00114600 CMP EAX,0x0 JZ 0x00129023 LEA RDI,[0x165590] LEA RSI,[0x169bbf] LEA RDX,[0x16606d] MOV ECX,0xb7c MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00129041 LAB_00129023: JMP 0x00129025 LAB_00129025: MOV RDI,qword ptr [RBP + -0xc8] CALL 0x00131900 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143eb0 MOV dword ptr [RBP + -0x34],0x0 LAB_00129041: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x11c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012906b MOV EAX,dword ptr [RBP + -0x11c] ADD RSP,0x120 POP RBP RET LAB_0012906b: CALL 0x001144c0
int4 test_bug6058(int8 param_1) { char *pcVar1; int iVar2; int4 uVar3; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_e8 [8]; char *local_e0; int8 *local_d8; int8 local_d0; int1 *local_c8 [2]; char *local_b8; int8 local_88; int4 local_68; int8 local_50; int8 local_48; int4 local_3c; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_e0 = "SELECT CAST(\'0000-00-00\' AS DATE)"; local_48 = param_1; sVar4 = strlen("SELECT CAST(\'0000-00-00\' AS DATE)"); iVar2 = mysql_real_query(param_1,"SELECT CAST(\'0000-00-00\' AS DATE)",sVar4); if (iVar2 == 0) { local_d0 = mysql_store_result(local_48); local_d8 = (int8 *)mysql_fetch_row(local_d0); uVar5 = mysql_stmt_init(local_48); pcVar1 = local_e0; local_50 = uVar5; sVar4 = strlen(local_e0); iVar2 = mysql_stmt_prepare(uVar5,pcVar1,sVar4); if (iVar2 == 0) { iVar2 = mysql_stmt_execute(local_50); if (iVar2 == 0) { memset(local_c8,0,0x70); local_68 = 0xfe; local_b8 = local_38; local_88 = 0x1e; local_c8[0] = local_e8; mysql_stmt_bind_result(local_50,local_c8); iVar2 = mysql_stmt_fetch(local_50); if (iVar2 == 0) { iVar2 = strcmp((char *)*local_d8,local_38); if (iVar2 == 0) { mysql_free_result(local_d0); mysql_stmt_close(local_50); local_3c = 0; } else { diag("Error: %s (%s: %d)","row[0] != buffer", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0xb7c); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0xb7a); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0xb71); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb6f ); local_3c = 1; } } else { uVar5 = mysql_error(local_48); uVar3 = mysql_errno(local_48); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb69); local_3c = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_3c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
15,534
ftxui::Event::Character(char)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/event.cpp
Event Event::Character(char c) { return Event::Character(std::string{c}); }
O1
cpp
ftxui::Event::Character(char): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movb %sil, (%r15) movq $0x1, -0x8(%r15) xorl %eax, %eax movb %al, 0x1(%r15) movq %rax, (%rdi) movabsq $0x300000000, %rcx # imm = 0x300000000 movq %rcx, 0x8(%rdi) movl $0x1, %ebp movl %ebp, 0x10(%rdi) movw $0x0, 0x14(%rdi) movb %al, 0x16(%rdi) movq %rax, 0x18(%rdi) addq $0x20, %rdi leaq 0x30(%rbx), %rcx movq %rcx, 0x20(%rbx) movq %rax, 0x28(%rbx) movb %al, 0x30(%rbx) leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0xb500 movl %ebp, 0x8(%rbx) movq (%r14), %rdi cmpq %r15, %rdi je 0x298d5 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN5ftxui5Event9CharacterEc: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, rdi lea r15, [rsp+48h+var_30] mov [r15-10h], r15 mov [r15], sil mov qword ptr [r15-8], 1 xor eax, eax mov [r15+1], al mov [rdi], rax mov rcx, 300000000h mov [rdi+8], rcx mov ebp, 1 mov [rdi+10h], ebp mov word ptr [rdi+14h], 0 mov [rdi+16h], al mov [rdi+18h], rax add rdi, 20h ; ' ' lea rcx, [rbx+30h] mov [rbx+20h], rcx mov [rbx+28h], rax mov [rbx+30h], al lea r14, [rsp+48h+var_40] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov [rbx+8], ebp mov rdi, [r14]; void * cmp rdi, r15 jz short loc_298D5 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_298D5: mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn
ftxui::Event * ftxui::Event::Character(ftxui::Event *this, unsigned __int8 a2) { void *v3[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[6]; // [rsp+18h] [rbp-30h] BYREF v3[0] = v4; LOWORD(v4[0]) = a2; v3[1] = &dword_0 + 1; *(_QWORD *)this = 0LL; *((_QWORD *)this + 1) = 0x300000000LL; *((_DWORD *)this + 4) = 1; *((_WORD *)this + 10) = 0; *((_BYTE *)this + 22) = 0; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 4) = (char *)this + 48; *((_QWORD *)this + 5) = 0LL; *((_BYTE *)this + 48) = 0; std::string::operator=((char *)this + 32, v3); *((_DWORD *)this + 2) = 1; if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); return this; }
Character: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV byte ptr [R15],SIL MOV qword ptr [R15 + -0x8],0x1 XOR EAX,EAX MOV byte ptr [R15 + 0x1],AL MOV qword ptr [RDI],RAX MOV RCX,0x300000000 MOV qword ptr [RDI + 0x8],RCX MOV EBP,0x1 MOV dword ptr [RDI + 0x10],EBP MOV word ptr [RDI + 0x14],0x0 MOV byte ptr [RDI + 0x16],AL MOV qword ptr [RDI + 0x18],RAX ADD RDI,0x20 LEA RCX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RCX MOV qword ptr [RBX + 0x28],RAX MOV byte ptr [RBX + 0x30],AL LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x0010b500 MOV dword ptr [RBX + 0x8],EBP MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001298d5 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_001298d5: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* ftxui::Event::Character(char) */ Event * __thiscall ftxui::Event::Character(Event *this,char param_1) { char *local_40; int8 local_38; char local_30; int1 uStack_2f; int6 uStack_2e; local_38 = 1; uStack_2f = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0x300000000; *(int4 *)(this + 0x10) = 1; *(int2 *)(this + 0x14) = 0; this[0x16] = (Event)0x0; *(int8 *)(this + 0x18) = 0; *(Event **)(this + 0x20) = this + 0x30; *(int8 *)(this + 0x28) = 0; this[0x30] = (Event)0x0; local_40 = &local_30; local_30 = param_1; std::__cxx11::string::operator=((string *)(this + 0x20),(string *)&local_40); *(int4 *)(this + 8) = 1; if (local_40 != &local_30) { operator_delete(local_40,CONCAT62(uStack_2e,CONCAT11(uStack_2f,local_30)) + 1); } return this; }
15,535
get_tty_password
eloqsql/mysys/get_password.c
char *get_tty_password(const char *opt_message) { #ifdef HAVE_GETPASS char *passbuff; #else /* ! HAVE_GETPASS */ TERMIO org,tmp; #endif /* HAVE_GETPASS */ char buff[80]; DBUG_ENTER("get_tty_password"); #ifdef HAVE_GETPASS passbuff = getpass(opt_message ? opt_message : "Enter password: "); /* copy the password to buff and clear original (static) buffer */ strnmov(buff, passbuff, sizeof(buff) - 1); #ifdef _PASSWORD_LEN memset(passbuff, 0, _PASSWORD_LEN); #endif #else if (isatty(fileno(stderr))) { fputs(opt_message ? opt_message : "Enter password: ",stderr); fflush(stderr); } #if defined(HAVE_TERMIOS_H) tcgetattr(fileno(stdin), &org); tmp = org; tmp.c_lflag &= ~(ECHO | ISIG | ICANON); tmp.c_cc[VMIN] = 1; tmp.c_cc[VTIME] = 0; tcsetattr(fileno(stdin), TCSADRAIN, &tmp); get_password(buff, sizeof(buff)-1, fileno(stdin), isatty(fileno(stderr))); tcsetattr(fileno(stdin), TCSADRAIN, &org); #elif defined(HAVE_TERMIO_H) ioctl(fileno(stdin), (int) TCGETA, &org); tmp=org; tmp.c_lflag &= ~(ECHO | ISIG | ICANON); tmp.c_cc[VMIN] = 1; tmp.c_cc[VTIME]= 0; ioctl(fileno(stdin),(int) TCSETA, &tmp); get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stderr))); ioctl(fileno(stdin),(int) TCSETA, &org); #else gtty(fileno(stdin), &org); tmp=org; tmp.sg_flags &= ~ECHO; tmp.sg_flags |= RAW; stty(fileno(stdin), &tmp); get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stderr))); stty(fileno(stdin), &org); #endif if (isatty(fileno(stderr))) fputc('\n',stderr); #endif /* HAVE_GETPASS */ DBUG_RETURN(my_strdup(PSI_INSTRUMENT_ME, buff, MYF(MY_FAE))); }
O3
c
get_tty_password: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x58, %rsp movq %fs:0x28, %rax movq %rax, -0x10(%rbp) testq %rdi, %rdi leaq 0x3bf9f(%rip), %rax # 0x975bb cmoveq %rax, %rdi callq 0x36680 leaq -0x60(%rbp), %rbx movl $0x4f, %edx movq %rbx, %rdi movq %rax, %rsi callq 0x90ee4 movl $0x8, %edx xorl %edi, %edi movq %rbx, %rsi callq 0x60fe8 movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x5b65e addq $0x58, %rsp popq %rbx popq %rbp retq callq 0x36290 nop
get_tty_password: push rbp mov rbp, rsp push rbx sub rsp, 58h mov rax, fs:28h mov [rbp+var_10], rax test rdi, rdi lea rax, aEnterPassword; "Enter password: " cmovz rdi, rax call _getpass lea rbx, [rbp+var_60] mov edx, 4Fh ; 'O' mov rdi, rbx mov rsi, rax call strnmov mov edx, 8 xor edi, edi mov rsi, rbx call my_strdup mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_5B65E add rsp, 58h pop rbx pop rbp retn loc_5B65E: call ___stack_chk_fail
long long get_tty_password(const char *a1) { long long v1; // rax _BYTE v3[80]; // [rsp+0h] [rbp-60h] BYREF unsigned long long v4; // [rsp+50h] [rbp-10h] v4 = __readfsqword(0x28u); if ( !a1 ) a1 = "Enter password: "; v1 = getpass(a1); strnmov(v3, v1, 79LL); return my_strdup(0LL, v3, 8LL); }
get_tty_password: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX TEST RDI,RDI LEA RAX,[0x1975bb] CMOVZ RDI,RAX CALL 0x00136680 LEA RBX,[RBP + -0x60] MOV EDX,0x4f MOV RDI,RBX MOV RSI,RAX CALL 0x00190ee4 MOV EDX,0x8 XOR EDI,EDI MOV RSI,RBX CALL 0x00160fe8 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x0015b65e ADD RSP,0x58 POP RBX POP RBP RET LAB_0015b65e: CALL 0x00136290
void get_tty_password(char *param_1) { char *pcVar1; long in_FS_OFFSET; int1 local_68 [80]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); if (param_1 == (char *)0x0) { param_1 = "Enter password: "; } pcVar1 = getpass(param_1); strnmov(local_68,pcVar1,0x4f); my_strdup(0,local_68,8); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
15,536
map_to_g2
corpus-core[P]colibri-stateless/build_O0/_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); }
O0
c
map_to_g2: pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rsi leaq -0x138(%rbp), %rdi callq 0x37280 cmpq $0x0, -0x18(%rbp) je 0x29175 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x37280 movq -0x8(%rbp), %rdx leaq -0x138(%rbp), %rsi leaq 0x2cb83(%rip), %rcx # 0x55cf0 movq %rsi, %rdi callq 0x273c0 leaq -0x138(%rbp), %rsi movq %rsi, %rdi callq 0x37610 movq -0x8(%rbp), %rdi leaq -0x138(%rbp), %rsi callq 0x37960 addq $0x140, %rsp # imm = 0x140 popq %rbp retq nopl (%rax)
map_to_g2: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_10] lea rdi, [rbp+var_138] call map_to_isogenous_E2 cmp [rbp+var_18], 0 jz short loc_29175 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call map_to_isogenous_E2 mov rdx, [rbp+var_8] lea rsi, [rbp+var_138] lea rcx, Aprime_E2 mov rdi, rsi call POINTonE2_dadd loc_29175: lea rsi, [rbp+var_138] mov rdi, rsi call isogeny_map_to_E2 mov rdi, [rbp+var_8] lea rsi, [rbp+var_138] call clear_cofactor add rsp, 140h pop rbp retn
long long map_to_g2(long long a1, long long a2, long long a3) { _BYTE v4[288]; // [rsp+8h] [rbp-138h] BYREF long long v5; // [rsp+128h] [rbp-18h] long long v6; // [rsp+130h] [rbp-10h] long long v7; // [rsp+138h] [rbp-8h] v7 = a1; v6 = a2; v5 = a3; map_to_isogenous_E2(v4, a2); if ( v5 ) { map_to_isogenous_E2(v7, v5); POINTonE2_dadd((long long)v4, (long long)v4, v7, (long long)&Aprime_E2); } isogeny_map_to_E2(v4); return clear_cofactor(v7, v4); }
map_to_g2: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x138] CALL 0x00137280 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00129175 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00137280 MOV RDX,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x138] LEA RCX,[0x155cf0] MOV RDI,RSI CALL 0x001273c0 LAB_00129175: LEA RSI,[RBP + -0x138] MOV RDI,RSI CALL 0x00137610 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x138] CALL 0x00137960 ADD RSP,0x140 POP RBP RET
void map_to_g2(int8 param_1,int8 param_2,long param_3) { int1 local_140 [288]; long local_20; int8 local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; map_to_isogenous_E2(local_140,param_2); if (local_20 != 0) { map_to_isogenous_E2(local_10,local_20); POINTonE2_dadd(local_140,local_140,local_10,Aprime_E2); } isogeny_map_to_E2(local_140); clear_cofactor(local_10,local_140); return; }
15,537
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x1e7830(%rip), %rax # 0x28e618 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xa6e82 leaq 0x1e77e2(%rip), %rax # 0x28e618 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xbb270 movl %eax, -0x34(%rbp) leaq 0x1e77b1(%rip), %rax # 0x28e618 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xa6e9b movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xbb270 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_A6E82 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_A6E9B loc_A6E82: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_A6E9B: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server + 41))(v7, a1, 2LL, a4, &v8); if ( v8 ) { (*((void ( **)(long long, long long, _QWORD))PSI_server + 62))(v8, v14, v13); v9 = my_open(v12, v11, v10); (*((void ( **)(long long, _QWORD))PSI_server + 64))(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x38e618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001a6e82 LEA RAX,[0x38e618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001bb270 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x38e618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a6e9b LAB_001a6e82: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001bb270 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001a6e9b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
15,538
my_xml_error_pos
eloqsql/strings/xml.c
size_t my_xml_error_pos(MY_XML_PARSER *p) { const char *beg=p->beg; const char *s; for ( s=p->beg ; s<p->cur; s++) { if (s[0] == '\n') beg=s; } return (size_t) (p->cur-beg); }
O3
c
my_xml_error_pos: movq 0x128(%rdi), %rcx movq 0x130(%rdi), %rax cmpq %rax, %rcx jae 0xd7f12 pushq %rbp movq %rsp, %rbp movq %rcx, %rdx cmpb $0xa, (%rcx) cmoveq %rcx, %rdx incq %rcx cmpq %rax, %rcx jne 0xd7f00 popq %rbp jmp 0xd7f15 movq %rcx, %rdx subq %rdx, %rax retq
my_xml_error_pos: mov rcx, [rdi+128h] mov rax, [rdi+130h] cmp rcx, rax jnb short loc_D7F12 push rbp mov rbp, rsp mov rdx, rcx loc_D7F00: cmp byte ptr [rcx], 0Ah cmovz rdx, rcx inc rcx cmp rcx, rax jnz short loc_D7F00 pop rbp jmp short loc_D7F15 loc_D7F12: mov rdx, rcx loc_D7F15: sub rax, rdx retn
long long my_xml_error_pos(long long a1) { _BYTE *v1; // rcx _BYTE *v2; // rax _BYTE *v3; // rdx v1 = *(_BYTE **)(a1 + 296); v2 = *(_BYTE **)(a1 + 304); if ( v1 >= v2 ) { v3 = *(_BYTE **)(a1 + 296); } else { v3 = *(_BYTE **)(a1 + 296); do { if ( *v1 == 10 ) v3 = v1; ++v1; } while ( v1 != v2 ); } return v2 - v3; }
my_xml_error_pos: MOV RCX,qword ptr [RDI + 0x128] MOV RAX,qword ptr [RDI + 0x130] CMP RCX,RAX JNC 0x001d7f12 PUSH RBP MOV RBP,RSP MOV RDX,RCX LAB_001d7f00: CMP byte ptr [RCX],0xa CMOVZ RDX,RCX INC RCX CMP RCX,RAX JNZ 0x001d7f00 POP RBP JMP 0x001d7f15 LAB_001d7f12: MOV RDX,RCX LAB_001d7f15: SUB RAX,RDX RET
long my_xml_error_pos(long param_1) { char *pcVar1; char *pcVar2; char *pcVar3; pcVar2 = *(char **)(param_1 + 0x128); pcVar1 = *(char **)(param_1 + 0x130); pcVar3 = pcVar2; if (pcVar2 < pcVar1) { do { if (*pcVar2 == '\n') { pcVar3 = pcVar2; } pcVar2 = pcVar2 + 1; } while (pcVar2 != pcVar1); } return (long)pcVar1 - (long)pcVar3; }
15,539
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O0
c
multadd: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x1c(%rbp) movslq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movslq -0xc(%rbp), %rcx imulq %rcx, %rax addq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax shrq $0x20, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x38(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) cmpl -0x20(%rbp), %eax jl 0x719da cmpq $0x0, -0x30(%rbp) je 0x71abb movl -0x20(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0xc(%rcx), %eax jl 0x71a93 movq -0x8(%rbp), %rax movl 0x8(%rax), %edi addl $0x1, %edi movq -0x18(%rbp), %rsi callq 0x70d10 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi addq $0x10, %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi movq -0x8(%rbp), %rax movslq 0x14(%rax), %rdx shlq $0x2, %rdx addq $0x8, %rdx callq 0x241f0 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x713c0 movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x30(%rbp), %rax movl %eax, %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, -0x20(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
multadd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_18], rcx mov rax, [rbp+var_8] mov eax, [rax+14h] mov [rbp+var_20], eax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_1C], 0 movsxd rax, [rbp+var_10] mov [rbp+var_30], rax loc_719DA: mov rax, [rbp+var_28] mov eax, [rax] movsxd rcx, [rbp+var_C] imul rax, rcx add rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_38] shr rax, 20h mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax cmp eax, [rbp+var_20] jl short loc_719DA cmp [rbp+var_30], 0 jz loc_71ABB mov eax, [rbp+var_20] mov rcx, [rbp+var_8] cmp eax, [rcx+0Ch] jl short loc_71A93 mov rax, [rbp+var_8] mov edi, [rax+8] add edi, 1 mov rsi, [rbp+var_18] call Balloc mov [rbp+var_40], rax mov rdi, [rbp+var_40] add rdi, 10h mov rsi, [rbp+var_8] add rsi, 10h mov rax, [rbp+var_8] movsxd rdx, dword ptr [rax+14h] shl rdx, 2 add rdx, 8 call _memcpy mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_71A93: mov rax, [rbp+var_30] mov edx, eax mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_20] mov esi, ecx add esi, 1 mov [rbp+var_20], esi movsxd rcx, ecx mov [rax+rcx*4], edx mov ecx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+14h], ecx loc_71ABB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned int *v4; // rax long long v6; // [rsp+0h] [rbp-40h] unsigned long long v7; // [rsp+8h] [rbp-38h] unsigned long long v8; // [rsp+10h] [rbp-30h] unsigned int *v9; // [rsp+18h] [rbp-28h] int v10; // [rsp+20h] [rbp-20h] int v11; // [rsp+24h] [rbp-1Ch] unsigned long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v10 = *(_DWORD *)(a1 + 20); v9 = *(unsigned int **)a1; v11 = 0; v8 = a3; do { v7 = v8 + a2 * (unsigned long long)*v9; v8 = HIDWORD(v7); v4 = v9++; *v4 = v7; ++v11; } while ( v11 < v10 ); if ( v8 ) { if ( v10 >= *(_DWORD *)(a1 + 12) ) { v6 = Balloc(*(_DWORD *)(a1 + 8) + 1, (long long)a4); memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8); Bfree(a1, a4); v13 = v6; } *(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7); *(_DWORD *)(v13 + 20) = v10 + 1; } return v13; }
multadd: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x1c],0x0 MOVSXD RAX,dword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LAB_001719da: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] IMUL RAX,RCX ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x20 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,dword ptr [RBP + -0x20] JL 0x001719da CMP qword ptr [RBP + -0x30],0x0 JZ 0x00171abb MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0xc] JL 0x00171a93 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x8] ADD EDI,0x1 MOV RSI,qword ptr [RBP + -0x18] CALL 0x00170d10 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RDX,dword ptr [RAX + 0x14] SHL RDX,0x2 ADD RDX,0x8 CALL 0x001241f0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001713c0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_00171a93: MOV RAX,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RBP + -0x20],ESI MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],EDX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX LAB_00171abb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; ulong uVar2; ulong local_38; uint *local_30; int local_24; long *local_10; iVar1 = *(int *)((long)param_1 + 0x14); local_24 = 0; local_38 = (ulong)param_3; local_30 = (uint *)*param_1; do { uVar2 = (ulong)*local_30 * (long)param_2 + local_38; local_38 = uVar2 >> 0x20; *local_30 = (uint)uVar2; local_24 = local_24 + 1; local_30 = local_30 + 1; } while (local_24 < iVar1); local_10 = param_1; if (local_38 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { local_10 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20); *(int *)((long)local_10 + 0x14) = iVar1 + 1; } return local_10; }
15,540
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %edx, %r13 movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0x57652 shrq $0x20, %rdi je 0x576bf cmpl 0xc(%rbx), %r12d jl 0x576b0 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0x56ff8 movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x24200 movq %rbx, %rdi movq %r14, %rsi callq 0x573f1 movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd r13, edx movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi loc_57652: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_57652 shr rdi, 20h jz short loc_576BF cmp r12d, [rbx+0Ch] jl short loc_576B0 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_576B0: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_576BF: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned long long v5; // rbx long long v6; // r12 long long v7; // rax unsigned long long v8; // r13 long long v9; // rcx int v10; // edx long long v11; // rsi unsigned long long v12; // rdi long long v13; // r15 v5 = a1; v6 = *(int *)(a1 + 20); v7 = *(_QWORD *)a1; v8 = a3; v9 = a2; v10 = 1; if ( (int)v6 >= 2 ) v10 = *(_DWORD *)(a1 + 20); v11 = 0LL; do { v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11); v8 = HIDWORD(v12); *(_DWORD *)(v7 + 4 * v11++) = v12; } while ( v10 != (_DWORD)v11 ); if ( HIDWORD(v12) ) { if ( (int)v6 >= *(_DWORD *)(v5 + 12) ) { v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4); memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8); Bfree(v5, a4); v5 = v13; } *(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12); *(_DWORD *)(v5 + 20) = v6 + 1; } return v5; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD R13,EDX MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI LAB_00157652: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x00157652 SHR RDI,0x20 JZ 0x001576bf CMP R12D,dword ptr [RBX + 0xc] JL 0x001576b0 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x00156ff8 MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x00124200 MOV RDI,RBX MOV RSI,R14 CALL 0x001573f1 MOV RBX,R15 LAB_001576b0: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_001576bf: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; uVar7 = (ulong)param_3; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
15,541
js_string_includes
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_includes(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue str, v = JS_UNDEFINED; int i, len, v_len, pos, start, stop, ret; JSString *p; JSString *p1; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; ret = js_is_regexp(ctx, argv[0]); if (ret) { if (ret > 0) JS_ThrowTypeError(ctx, "regexp not supported"); goto fail; } v = JS_ToString(ctx, argv[0]); if (JS_IsException(v)) goto fail; p = JS_VALUE_GET_STRING(str); p1 = JS_VALUE_GET_STRING(v); len = p->len; v_len = p1->len; pos = (magic == 2) ? len : 0; if (argc > 1 && !JS_IsUndefined(argv[1])) { if (JS_ToInt32Clamp(ctx, &pos, argv[1], 0, len, 0)) goto fail; } len -= v_len; ret = 0; if (magic == 0) { start = pos; stop = len; } else { if (magic == 1) { if (pos > len) goto done; } else { pos -= v_len; } start = stop = pos; } if (start >= 0 && start <= stop) { for (i = start;; i++) { if (!string_cmp(p, p1, i, 0, v_len)) { ret = 1; break; } if (i == stop) break; } } done: JS_FreeValue(ctx, str); JS_FreeValue(ctx, v); return js_bool(ret); fail: JS_FreeValue(ctx, str); JS_FreeValue(ctx, v); return JS_EXCEPTION; }
O2
c
js_string_includes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %ebp movq %r8, %r13 movl %ecx, %r12d movq %rdi, %rbx callq 0x3a290 movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d je 0x67b4e movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x41aa2 testl %eax, %eax je 0x67b07 pushq $0x3 popq %rbp jle 0x67b28 leaq 0x21604(%rip), %rsi # 0x890fc xorl %r12d, %r12d movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x67b2b movl %ebp, 0x10(%rsp) movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x1b03c movq %rdx, %rbp cmpl $0x6, %ebp jne 0x67b63 movq %rax, %r12 jmp 0x67b2b xorl %r12d, %r12d movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1801e pushq $0x6 popq %r14 xorl %r15d, %r15d movq %r15, %rax movq %r14, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, 0x20(%rsp) movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movl 0x4(%r15), %ebp andl %ecx, %ebp movq %rax, 0x18(%rsp) andl 0x4(%rax), %ecx movl %ecx, 0xc(%rsp) xorl %eax, %eax cmpl $0x2, 0x10(%rsp) cmovel %ebp, %eax movl %eax, 0x14(%rsp) cmpl $0x2, %r12d jl 0x67bca movq 0x18(%r13), %rcx cmpl $0x3, %ecx je 0x67bca movq 0x10(%r13), %rdx andl $0x0, (%rsp) leaq 0x14(%rsp), %rsi movq %rbx, %rdi xorl %r8d, %r8d movl %ebp, %r9d callq 0x213d5 testl %eax, %eax je 0x67bca movq 0x20(%rsp), %rbp movq 0x18(%rsp), %r12 jmp 0x67b2b subl 0xc(%rsp), %ebp movl 0x14(%rsp), %r12d movl 0x10(%rsp), %eax testl %eax, %eax je 0x67bf2 cmpl $0x1, %eax jne 0x67bea cmpl %ebp, %r12d movl %r12d, %ebp jle 0x67bf2 jmp 0x67c28 subl 0xc(%rsp), %r12d movl %r12d, %ebp xorl %r13d, %r13d testl %r12d, %r12d js 0x67c2b cmpl %ebp, %r12d jg 0x67c2b incl %ebp pushq $0x1 popq %r13 movq %r15, %rdi movq 0x18(%rsp), %rsi movl %r12d, %edx xorl %ecx, %ecx movl 0xc(%rsp), %r8d callq 0x6961a testl %eax, %eax je 0x67c2b incl %r12d cmpl %r12d, %ebp jne 0x67c05 xorl %r13d, %r13d pushq $0x1 popq %r12 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1801e movq %r13, %r15 movq %r12, %r14 jmp 0x67b4e
js_string_includes: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, r9d mov r13, r8 mov r12d, ecx mov rbx, rdi call JS_ToStringCheckObject mov r15, rax mov r14, rdx cmp r14d, 6 jz short loc_67B4E mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call js_is_regexp test eax, eax jz short loc_67B07 push 3 pop rbp jle short loc_67B28 lea rsi, aRegexpNotSuppo; "regexp not supported" xor r12d, r12d mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_67B2B loc_67B07: mov [rsp+58h+var_48], ebp mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call JS_ToString mov rbp, rdx cmp ebp, 6 jnz short loc_67B63 mov r12, rax jmp short loc_67B2B loc_67B28: xor r12d, r12d loc_67B2B: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rdi, rbx mov rsi, r12 mov rdx, rbp call JS_FreeValue push 6 pop r14 xor r15d, r15d loc_67B4E: mov rax, r15 mov rdx, r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67B63: mov [rsp+58h+var_38], rbp mov ecx, 7FFFFFFFh mov ebp, [r15+4] and ebp, ecx mov [rsp+58h+var_40], rax and ecx, [rax+4] mov [rsp+58h+var_4C], ecx xor eax, eax cmp [rsp+58h+var_48], 2 cmovz eax, ebp mov [rsp+58h+var_44], eax cmp r12d, 2 jl short loc_67BCA mov rcx, [r13+18h] cmp ecx, 3 jz short loc_67BCA mov rdx, [r13+10h] and [rsp+58h+var_58], 0 lea rsi, [rsp+58h+var_44] mov rdi, rbx xor r8d, r8d mov r9d, ebp call JS_ToInt32Clamp test eax, eax jz short loc_67BCA mov rbp, [rsp+58h+var_38] mov r12, [rsp+58h+var_40] jmp loc_67B2B loc_67BCA: sub ebp, [rsp+58h+var_4C] mov r12d, [rsp+58h+var_44] mov eax, [rsp+58h+var_48] test eax, eax jz short loc_67BF2 cmp eax, 1 jnz short loc_67BEA cmp r12d, ebp mov ebp, r12d jle short loc_67BF2 jmp short loc_67C28 loc_67BEA: sub r12d, [rsp+58h+var_4C] mov ebp, r12d loc_67BF2: xor r13d, r13d test r12d, r12d js short loc_67C2B cmp r12d, ebp jg short loc_67C2B inc ebp push 1 pop r13 loc_67C05: mov rdi, r15 mov rsi, [rsp+58h+var_40] mov edx, r12d xor ecx, ecx mov r8d, [rsp+58h+var_4C] call string_cmp test eax, eax jz short loc_67C2B inc r12d cmp ebp, r12d jnz short loc_67C05 loc_67C28: xor r13d, r13d loc_67C2B: push 1 pop r12 mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call JS_FreeValue mov r15, r13 mov r14, r12 jmp loc_67B4E
long long js_string_includes( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // ebp int v16; // r12d long long v17; // r15 long long v18; // rdx long long v19; // r14 int is_regexp; // eax long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rbp long long v28; // r12 long long v29; // rax long long v30; // rdx int v32; // ebp int v33; // eax long long v34; // rcx int v35; // ebp int v36; // r12d bool v37; // cc long long v38; // r13 int v39; // ebp char v40; // [rsp+0h] [rbp-58h] int v41; // [rsp+Ch] [rbp-4Ch] int v42; // [rsp+10h] [rbp-48h] int v43; // [rsp+14h] [rbp-44h] BYREF long long v44; // [rsp+18h] [rbp-40h] long long v45; // [rsp+20h] [rbp-38h] v14 = a6; v16 = a4; v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v19 = v18; if ( (_DWORD)v18 != 6 ) { is_regexp = js_is_regexp(a1, *(_QWORD *)a5, *(_QWORD *)(a5 + 8)); if ( is_regexp ) { v27 = 3LL; v28 = 0LL; if ( is_regexp > 0 ) JS_ThrowTypeError( a1, (long long)"regexp not supported", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v40); goto LABEL_7; } v42 = v14; v29 = JS_ToString(a1, *(_QWORD *)a5, *(_QWORD *)(a5 + 8)); v27 = v30; if ( (_DWORD)v30 == 6 ) { v28 = v29; LABEL_7: JS_FreeValue(a1, v17, v19); JS_FreeValue(a1, v28, v27); return 0LL; } v45 = v30; v32 = *(_DWORD *)(v17 + 4) & 0x7FFFFFFF; v44 = v29; v41 = *(_DWORD *)(v29 + 4) & 0x7FFFFFFF; v33 = 0; if ( v42 == 2 ) v33 = v32; v43 = v33; if ( v16 >= 2 ) { v34 = *(_QWORD *)(a5 + 24); if ( (_DWORD)v34 != 3 ) { if ( (unsigned int)JS_ToInt32Clamp(a1, &v43, *(_DWORD **)(a5 + 16), v34, 0, v32, 0) ) { v27 = v45; v28 = v44; goto LABEL_7; } } } v35 = v32 - v41; v36 = v43; if ( v42 ) { if ( v42 == 1 ) { v37 = v43 <= v35; v35 = v43; if ( !v37 ) { LABEL_25: v38 = 0LL; LABEL_26: JS_FreeValue(a1, v17, v19); JS_FreeValue(a1, v44, v45); return v38; } } else { v36 = v43 - v41; v35 = v43 - v41; } } v38 = 0LL; if ( v36 >= 0 && v36 <= v35 ) { v39 = v35 + 1; v38 = 1LL; while ( (unsigned int)string_cmp(v17, v44, (unsigned int)v36, 0LL) ) { if ( v39 == ++v36 ) goto LABEL_25; } } goto LABEL_26; } return v17; }
js_string_includes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R9D MOV R13,R8 MOV R12D,ECX MOV RBX,RDI CALL 0x0013a290 MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x00167b4e MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x00141aa2 TEST EAX,EAX JZ 0x00167b07 PUSH 0x3 POP RBP JLE 0x00167b28 LEA RSI,[0x1890fc] XOR R12D,R12D MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d JMP 0x00167b2b LAB_00167b07: MOV dword ptr [RSP + 0x10],EBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x0011b03c MOV RBP,RDX CMP EBP,0x6 JNZ 0x00167b63 MOV R12,RAX JMP 0x00167b2b LAB_00167b28: XOR R12D,R12D LAB_00167b2b: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV RDI,RBX MOV RSI,R12 MOV RDX,RBP CALL 0x0011801e PUSH 0x6 POP R14 XOR R15D,R15D LAB_00167b4e: MOV RAX,R15 MOV RDX,R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167b63: MOV qword ptr [RSP + 0x20],RBP MOV ECX,0x7fffffff MOV EBP,dword ptr [R15 + 0x4] AND EBP,ECX MOV qword ptr [RSP + 0x18],RAX AND ECX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0xc],ECX XOR EAX,EAX CMP dword ptr [RSP + 0x10],0x2 CMOVZ EAX,EBP MOV dword ptr [RSP + 0x14],EAX CMP R12D,0x2 JL 0x00167bca MOV RCX,qword ptr [R13 + 0x18] CMP ECX,0x3 JZ 0x00167bca MOV RDX,qword ptr [R13 + 0x10] AND dword ptr [RSP],0x0 LEA RSI,[RSP + 0x14] MOV RDI,RBX XOR R8D,R8D MOV R9D,EBP CALL 0x001213d5 TEST EAX,EAX JZ 0x00167bca MOV RBP,qword ptr [RSP + 0x20] MOV R12,qword ptr [RSP + 0x18] JMP 0x00167b2b LAB_00167bca: SUB EBP,dword ptr [RSP + 0xc] MOV R12D,dword ptr [RSP + 0x14] MOV EAX,dword ptr [RSP + 0x10] TEST EAX,EAX JZ 0x00167bf2 CMP EAX,0x1 JNZ 0x00167bea CMP R12D,EBP MOV EBP,R12D JLE 0x00167bf2 JMP 0x00167c28 LAB_00167bea: SUB R12D,dword ptr [RSP + 0xc] MOV EBP,R12D LAB_00167bf2: XOR R13D,R13D TEST R12D,R12D JS 0x00167c2b CMP R12D,EBP JG 0x00167c2b INC EBP PUSH 0x1 POP R13 LAB_00167c05: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x18] MOV EDX,R12D XOR ECX,ECX MOV R8D,dword ptr [RSP + 0xc] CALL 0x0016961a TEST EAX,EAX JZ 0x00167c2b INC R12D CMP EBP,R12D JNZ 0x00167c05 LAB_00167c28: XOR R13D,R13D LAB_00167c2b: PUSH 0x1 POP R12 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011801e MOV R15,R13 MOV R14,R12 JMP 0x00167b4e
int1 [16] js_string_includes(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,int param_6) { int iVar1; long lVar2; uint uVar3; uint uVar4; uint uVar5; uint uVar6; int8 uVar7; int1 auVar8 [16]; int1 auVar9 [16]; uint local_44; int1 local_40 [16]; auVar8 = JS_ToStringCheckObject(); lVar2 = auVar8._0_8_; if (auVar8._8_4_ == 6) { return auVar8; } iVar1 = js_is_regexp(param_1,*param_5,param_5[1]); if (iVar1 != 0) { if (iVar1 < 1) { auVar9 = ZEXT816(3) << 0x40; } else { JS_ThrowTypeError(param_1,"regexp not supported"); auVar9 = ZEXT816(3) << 0x40; } LAB_00167b2b: JS_FreeValue(param_1,lVar2,auVar8._8_8_); JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_); return ZEXT816(6) << 0x40; } auVar9 = JS_ToString(param_1,*param_5,param_5[1]); if (auVar9._8_4_ == 6) goto LAB_00167b2b; uVar4 = *(uint *)(lVar2 + 4) & 0x7fffffff; uVar3 = *(uint *)(auVar9._0_8_ + 4) & 0x7fffffff; local_44 = 0; if (param_6 == 2) { local_44 = uVar4; } local_40 = auVar9; if ((1 < param_4) && ((int)param_5[3] != 3)) { iVar1 = JS_ToInt32Clamp(param_1,&local_44,param_5[2],param_5[3],0,uVar4,0); auVar9 = local_40; if (iVar1 != 0) goto LAB_00167b2b; } uVar5 = uVar4 - uVar3; uVar6 = local_44; if (param_6 == 0) { LAB_00167bf2: uVar7 = 0; if (((int)uVar6 < 0) || ((int)uVar5 < (int)uVar6)) goto LAB_00167c2b; uVar7 = 1; do { iVar1 = string_cmp(lVar2,local_40._0_8_,uVar6,0,uVar3); if (iVar1 == 0) goto LAB_00167c2b; uVar6 = uVar6 + 1; } while (uVar5 + 1 != uVar6); } else { if (param_6 != 1) { uVar5 = local_44 - uVar3; uVar6 = uVar5; goto LAB_00167bf2; } uVar5 = local_44; if ((int)local_44 <= (int)(uVar4 - uVar3)) goto LAB_00167bf2; } uVar7 = 0; LAB_00167c2b: auVar9._8_8_ = 1; auVar9._0_8_ = uVar7; JS_FreeValue(param_1,lVar2,auVar8._8_8_); JS_FreeValue(param_1,local_40._0_8_,local_40._8_8_); return auVar9; }
15,542
ma_invalidate_stmts
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void ma_invalidate_stmts(MYSQL *mysql, const char *function_name) { if (mysql->stmts) { LIST *li_stmt= mysql->stmts; for (; li_stmt; li_stmt= li_stmt->next) { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; stmt->mysql= NULL; SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, function_name); } mysql->stmts= NULL; } }
O0
c
ma_invalidate_stmts: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x4c8(%rax) je 0x1af6c movq -0x8(%rbp), %rax movq 0x4c8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1af5d movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq $0x0, 0x38(%rax) movq -0x20(%rbp), %rax movl $0x808, 0x108(%rax) # imm = 0x808 movq -0x20(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x40efc(%rip), %rax # 0x5bde0 movq (%rax), %rsi movl $0x5, %edx callq 0x121f0 movq -0x20(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x20(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1af1b movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x1af2d leaq 0x40ece(%rip), %rax # 0x5bdf0 movq 0x1c0(%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x121f0 movq -0x20(%rbp), %rax movb $0x0, 0x30b(%rax) jmp 0x1af4c movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x1aea1 movq -0x8(%rbp), %rax movq $0x0, 0x4c8(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_invalidate_stmts: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] cmp qword ptr [rax+4C8h], 0 jz loc_1AF6C mov rax, [rbp+var_8] mov rax, [rax+4C8h] mov [rbp+var_18], rax loc_1AEA1: cmp [rbp+var_18], 0 jz loc_1AF5D mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov qword ptr [rax+38h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+108h], 808h mov rdi, [rbp+var_20] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_20] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_20] add rax, 10Ch mov [rbp+var_28], rax cmp [rbp+var_10], 0 jz short loc_1AF1B mov rax, [rbp+var_10] mov [rbp+var_30], rax jmp short loc_1AF2D loc_1AF1B: lea rax, client_errors mov rax, [rax+1C0h] mov [rbp+var_30], rax loc_1AF2D: mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov edx, 200h call _strncpy mov rax, [rbp+var_20] mov byte ptr [rax+30Bh], 0 jmp short $+2 loc_1AF4C: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_18], rax jmp loc_1AEA1 loc_1AF5D: mov rax, [rbp+var_8] mov qword ptr [rax+4C8h], 0 loc_1AF6C: add rsp, 30h pop rbp retn
long long ma_invalidate_stmts(long long a1, long long a2) { long long result; // rax long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long i; // [rsp+18h] [rbp-18h] result = a1; if ( *(_QWORD *)(a1 + 1224) ) { for ( i = *(_QWORD *)(a1 + 1224); i; i = *(_QWORD *)(i + 8) ) { v4 = *(_QWORD *)(i + 16); *(_QWORD *)(v4 + 56) = 0LL; *(_DWORD *)(v4 + 264) = 2056; strncpy(v4 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v4 + 786) = 0; v3 = v4 + 268; if ( a2 ) strncpy(v3, a2, 512LL); else strncpy(v3, client_errors[56], 512LL); *(_BYTE *)(v4 + 779) = 0; } result = a1; *(_QWORD *)(a1 + 1224) = 0LL; } return result; }
ma_invalidate_stmts: 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 + -0x8] CMP qword ptr [RAX + 0x4c8],0x0 JZ 0x0011af6c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4c8] MOV qword ptr [RBP + -0x18],RAX LAB_0011aea1: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0011af5d MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x108],0x808 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x30d LEA RAX,[0x15bde0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x10c MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011af1b MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX JMP 0x0011af2d LAB_0011af1b: LEA RAX,[0x15bdf0] MOV RAX,qword ptr [RAX + 0x1c0] MOV qword ptr [RBP + -0x30],RAX LAB_0011af2d: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV EDX,0x200 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x30b],0x0 JMP 0x0011af4c LAB_0011af4c: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x0011aea1 LAB_0011af5d: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x4c8],0x0 LAB_0011af6c: ADD RSP,0x30 POP RBP RET
void ma_invalidate_stmts(long param_1,char *param_2) { long lVar1; int8 local_38; int8 local_20; if (*(long *)(param_1 + 0x4c8) != 0) { for (local_20 = *(long *)(param_1 + 0x4c8); local_20 != 0; local_20 = *(long *)(local_20 + 8)) { lVar1 = *(long *)(local_20 + 0x10); *(int8 *)(lVar1 + 0x38) = 0; *(int4 *)(lVar1 + 0x108) = 0x808; strncpy((char *)(lVar1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(lVar1 + 0x312) = 0; local_38 = param_2; if (param_2 == (char *)0x0) { local_38 = PTR_s_Server_closed_statement_due_to_a_0015bfb0; } strncpy((char *)(lVar1 + 0x10c),local_38,0x200); *(int1 *)(lVar1 + 0x30b) = 0; } *(int8 *)(param_1 + 0x4c8) = 0; } return; }
15,543
main
eloqsql/libmariadb/unittest/libmariadb/features-10_2.c
int main(int argc, char **argv) { mysql_library_init(0,0,NULL); if (argc > 1) get_options(argc, argv); get_envvars(); run_tests(my_tests); mysql_server_end(); return(exit_status()); }
O3
c
main: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movl %edi, %r14d xorl %edi, %edi xorl %esi, %esi xorl %edx, %edx callq 0x18d43 cmpl $0x2, %r14d jl 0x15646 movl %r14d, %edi movq %rbx, %rsi callq 0x13e39 callq 0x142bd leaq 0x339be(%rip), %rdi # 0x49010 callq 0x144eb callq 0x1d06d popq %rbx popq %r14 popq %rbp jmp 0x15dbc
main: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14d, edi xor edi, edi xor esi, esi xor edx, edx call mysql_server_init cmp r14d, 2 jl short loc_15646 mov edi, r14d mov rsi, rbx call get_options loc_15646: call get_envvars lea rdi, my_tests call run_tests call mysql_server_end pop rbx pop r14 pop rbp jmp exit_status
int main(int argc, const char **argv, const char **envp) { long long v5; // rdi int v6; // esi v5 = 0LL; v6 = 0; mysql_server_init(0LL, 0LL, 0LL); if ( argc >= 2 ) { v5 = (unsigned int)argc; v6 = (int)argv; get_options((unsigned int)argc, (long long)argv); } get_envvars(v5, v6); run_tests((long long)&my_tests); mysql_server_end(); return exit_status(); }
main: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14D,EDI XOR EDI,EDI XOR ESI,ESI XOR EDX,EDX CALL 0x00118d43 CMP R14D,0x2 JL 0x00115646 MOV EDI,R14D MOV RSI,RBX CALL 0x00113e39 LAB_00115646: CALL 0x001142bd LEA RDI,[0x149010] CALL 0x001144eb CALL 0x0011d06d POP RBX POP R14 POP RBP JMP 0x00115dbc
void main(int param_1,int8 param_2) { mysql_server_init(0,0,0); if (1 < param_1) { get_options(param_1,param_2); } get_envvars(); run_tests(my_tests); mysql_server_end(); exit_status(); return; }
15,544
ggml_threadpool_params_from_cpu_params(cpu_params const&)
monkey531[P]llama/common/common.cpp
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) { struct ggml_threadpool_params tpp; ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults if (params.mask_valid) { std::memcpy(&tpp.cpumask, &params.cpumask, GGML_MAX_N_THREADS); } tpp.prio = params.priority; tpp.poll = params.poll; tpp.strict_cpu = params.strict_cpu; return tpp; }
O3
cpp
ggml_threadpool_params_from_cpu_params(cpu_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl (%rsi), %esi callq 0x1daa0 cmpb $0x1, 0x204(%r14) jne 0x9904b leaq 0x4(%r14), %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi callq 0x1d9e0 movl 0x208(%r14), %eax movl %eax, 0x204(%rbx) movl 0x210(%r14), %eax movl %eax, 0x208(%rbx) movb 0x20c(%r14), %al movb %al, 0x20c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov esi, [rsi] call _ggml_threadpool_params_init cmp byte ptr [r14+204h], 1 jnz short loc_9904B lea rsi, [r14+4] mov edx, 200h mov rdi, rbx call _memcpy loc_9904B: mov eax, [r14+208h] mov [rbx+204h], eax mov eax, [r14+210h] mov [rbx+208h], eax mov al, [r14+20Ch] mov [rbx+20Ch], al mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2) { ggml_threadpool_params_init(a1, *a2); if ( *((_BYTE *)a2 + 516) == 1 ) memcpy(a1, a2 + 1, 512LL); *(_DWORD *)(a1 + 516) = a2[130]; *(_DWORD *)(a1 + 520) = a2[132]; *(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524); return a1; }
ggml_threadpool_params_from_cpu_params: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI] CALL 0x0011daa0 CMP byte ptr [R14 + 0x204],0x1 JNZ 0x0019904b LEA RSI,[R14 + 0x4] MOV EDX,0x200 MOV RDI,RBX CALL 0x0011d9e0 LAB_0019904b: MOV EAX,dword ptr [R14 + 0x208] MOV dword ptr [RBX + 0x204],EAX MOV EAX,dword ptr [R14 + 0x210] MOV dword ptr [RBX + 0x208],EAX MOV AL,byte ptr [R14 + 0x20c] MOV byte ptr [RBX + 0x20c],AL MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */ cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1) { int4 *in_RSI; ggml_threadpool_params_init(param_1,*in_RSI); if (*(char *)(in_RSI + 0x81) == '\x01') { memcpy(param_1,in_RSI + 1,0x200); } *(int4 *)(param_1 + 0x204) = in_RSI[0x82]; *(int4 *)(param_1 + 0x208) = in_RSI[0x84]; param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83); return param_1; }
15,545
inline_mysql_file_create_with_symlink
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_create_with_symlink( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *linkname, const char *filename, int create_flags, int access_flags, myf flags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_create_with_symlink(linkname, filename, create_flags, access_flags, flags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_create_with_symlink(linkname, filename, create_flags, access_flags, flags); return file; }
O0
c
inline_mysql_file_create_with_symlink: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq 0x18(%rbp), %rax movl 0x10(%rbp), %eax movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) leaq 0x1e6059(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x80(%rbp), %rdi xorl %edx, %edx leaq -0x38(%rbp), %r8 callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%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 0xdb05a leaq 0x1e6011(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x2c(%rbp), %edx movl 0x10(%rbp), %ecx movq 0x18(%rbp), %r8 callq 0xf6ed0 movl %eax, -0x30(%rbp) leaq 0x1e5fd9(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi callq *%rax movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xdb07a movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x2c(%rbp), %edx movl 0x10(%rbp), %ecx movq 0x18(%rbp), %r8 callq 0xf6ed0 movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_create_with_symlink_0: push rbp mov rbp, rsp sub rsp, 80h mov rax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_28] lea rdi, [rbp+var_80] xor edx, edx lea r8, [rbp+var_38] call rax mov [rbp+var_38], rax cmp [rbp+var_38], 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_DB05A lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov edx, [rbp+var_2C] mov ecx, [rbp+arg_0] mov r8, [rbp+arg_8] call my_create_with_symlink mov [rbp+var_30], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_38] mov esi, [rbp+var_30] call rax mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp short loc_DB07A loc_DB05A: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov edx, [rbp+var_2C] mov ecx, [rbp+arg_0] mov r8, [rbp+arg_8] call my_create_with_symlink mov [rbp+var_30], eax mov eax, [rbp+var_30] mov [rbp+var_4], eax loc_DB07A: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_create_with_symlink_0( unsigned int a1, long long a2, unsigned int a3, long long a4, long long a5, unsigned int a6, unsigned int a7, long long a8) { _BYTE v9[72]; // [rsp+0h] [rbp-80h] BYREF long long v10; // [rsp+48h] [rbp-38h] BYREF unsigned int v11; // [rsp+50h] [rbp-30h] unsigned int v12; // [rsp+54h] [rbp-2Ch] long long v13; // [rsp+58h] [rbp-28h] long long v14; // [rsp+60h] [rbp-20h] unsigned int v15; // [rsp+6Ch] [rbp-14h] long long v16; // [rsp+70h] [rbp-10h] unsigned int v17; // [rsp+78h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v9, a1, 0LL, a5, &v10); if ( v10 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v10, v16, v15); v11 = my_create_with_symlink(v14, v13, v12, a7, a8); ((void ( *)(long long, _QWORD))PSI_server[64])(v10, v11); } else { return (unsigned int)my_create_with_symlink(v14, v13, v12, a7, a8); } return v11; }
inline_mysql_file_create_with_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x80] XOR EDX,EDX LEA R8,[RBP + -0x38] CALL RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],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 0x001db05a LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] MOV ECX,dword ptr [RBP + 0x10] MOV R8,qword ptr [RBP + 0x18] CALL 0x001f6ed0 MOV dword ptr [RBP + -0x30],EAX LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] CALL RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX JMP 0x001db07a LAB_001db05a: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] MOV ECX,dword ptr [RBP + 0x10] MOV R8,qword ptr [RBP + 0x18] CALL 0x001f6ed0 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX LAB_001db07a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_create_with_symlink (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int8 param_5,int4 param_6,int4 param_7,int8 param_8) { int1 local_88 [72]; long local_40; int4 local_38; int4 local_34; int8 local_30; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_34 = param_6; local_30 = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_5,&local_40); if (local_40 == 0) { local_c = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8); } else { (**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c); local_38 = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8); (**(code **)(PSI_server + 0x200))(local_40,local_38); local_c = local_38; } return local_c; }
15,546
bug30472_retrieve_charset_info
eloqsql/libmariadb/unittest/libmariadb/charset.c
static int bug30472_retrieve_charset_info(MYSQL *con, char *character_set_name, char *character_set_client, char *character_set_results, char *collation_connection) { MYSQL_RES *rs; MYSQL_ROW row; int rc; /* Get the cached client character set name. */ strcpy(character_set_name, mysql_character_set_name(con)); /* Retrieve server character set information. */ rc= mysql_query(con, "SHOW VARIABLES LIKE 'character_set_client'"); check_mysql_rc(rc, con); rs= mysql_store_result(con); FAIL_IF(!rs, "Invalid result set"); row= mysql_fetch_row(rs); FAIL_IF(!row, "Couldn't fetch row"); strcpy(character_set_client, row[1]); mysql_free_result(rs); rc= mysql_query(con, "SHOW VARIABLES LIKE 'character_set_results'"); check_mysql_rc(rc, con); rs= mysql_store_result(con); FAIL_IF(!rs, "Invalid result set"); row= mysql_fetch_row(rs); FAIL_IF(!row, "Couldn't fetch row"); strcpy(character_set_results, row[1]); mysql_free_result(rs); rc= mysql_query(con, "SHOW VARIABLES LIKE 'collation_connection'"); check_mysql_rc(rc, con); rs= mysql_store_result(con); FAIL_IF(!rs, "Invalid result set"); row= mysql_fetch_row(rs); FAIL_IF(!row, "Couldn't fetch row"); strcpy(collation_connection, row[1]); mysql_free_result(rs); return OK; }
O0
c
bug30472_retrieve_charset_info: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0x26950 movq -0x50(%rbp), %rdi movq %rax, %rsi callq 0x133c0 movq -0x10(%rbp), %rdi leaq 0x36bee(%rip), %rsi # 0x4efa5 callq 0x22f20 movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) je 0x18411 movl -0x44(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x10(%rbp), %rdi callq 0x268a0 movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rdi callq 0x26870 movl -0x5c(%rbp), %esi movq -0x58(%rbp), %rdx movl %eax, %ecx leaq 0x35e3a(%rip), %rdi # 0x4e22b leaq 0x36294(%rip), %r8 # 0x4e68c movl $0x1e5, %r9d # imm = 0x1E5 movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x18413 movq -0x10(%rbp), %rdi callq 0x24570 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x18454 leaq 0x35cb8(%rip), %rdi # 0x4e0e6 leaq 0x35e18(%rip), %rsi # 0x4e24d leaq 0x36250(%rip), %rdx # 0x4e68c movl $0x1e8, %ecx # imm = 0x1E8 movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x18456 movq -0x38(%rbp), %rdi callq 0x248b0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x18497 leaq 0x35c75(%rip), %rdi # 0x4e0e6 leaq 0x36b58(%rip), %rsi # 0x4efd0 leaq 0x3620d(%rip), %rdx # 0x4e68c movl $0x1ea, %ecx # imm = 0x1EA movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x18499 movq -0x20(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x133c0 movq -0x38(%rbp), %rdi callq 0x1bdb0 movq -0x10(%rbp), %rdi leaq 0x36b25(%rip), %rsi # 0x4efe3 callq 0x22f20 movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) je 0x18518 movl -0x44(%rbp), %eax movl %eax, -0x6c(%rbp) movq -0x10(%rbp), %rdi callq 0x268a0 movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi callq 0x26870 movl -0x6c(%rbp), %esi movq -0x68(%rbp), %rdx movl %eax, %ecx leaq 0x35d33(%rip), %rdi # 0x4e22b leaq 0x3618d(%rip), %r8 # 0x4e68c movl $0x1ef, %r9d # imm = 0x1EF movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x1851a movq -0x10(%rbp), %rdi callq 0x24570 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1855b leaq 0x35bb1(%rip), %rdi # 0x4e0e6 leaq 0x35d11(%rip), %rsi # 0x4e24d leaq 0x36149(%rip), %rdx # 0x4e68c movl $0x1f1, %ecx # imm = 0x1F1 movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x1855d movq -0x38(%rbp), %rdi callq 0x248b0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x1859e leaq 0x35b6e(%rip), %rdi # 0x4e0e6 leaq 0x36a51(%rip), %rsi # 0x4efd0 leaq 0x36106(%rip), %rdx # 0x4e68c movl $0x1f3, %ecx # imm = 0x1F3 movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x185a0 movq -0x28(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x133c0 movq -0x38(%rbp), %rdi callq 0x1bdb0 movq -0x10(%rbp), %rdi leaq 0x36a4a(%rip), %rsi # 0x4f00f callq 0x22f20 movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) je 0x1861f movl -0x44(%rbp), %eax movl %eax, -0x7c(%rbp) movq -0x10(%rbp), %rdi callq 0x268a0 movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rdi callq 0x26870 movl -0x7c(%rbp), %esi movq -0x78(%rbp), %rdx movl %eax, %ecx leaq 0x35c2c(%rip), %rdi # 0x4e22b leaq 0x36086(%rip), %r8 # 0x4e68c movl $0x1f8, %r9d # imm = 0x1F8 movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x18621 movq -0x10(%rbp), %rdi callq 0x24570 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1865f leaq 0x35aaa(%rip), %rdi # 0x4e0e6 leaq 0x35c0a(%rip), %rsi # 0x4e24d leaq 0x36042(%rip), %rdx # 0x4e68c movl $0x1fa, %ecx # imm = 0x1FA movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x18661 movq -0x38(%rbp), %rdi callq 0x248b0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x1869f leaq 0x35a6a(%rip), %rdi # 0x4e0e6 leaq 0x3694d(%rip), %rsi # 0x4efd0 leaq 0x36002(%rip), %rdx # 0x4e68c movl $0x1fc, %ecx # imm = 0x1FC movb $0x0, %al callq 0x187a0 movl $0x1, -0x4(%rbp) jmp 0x186c2 jmp 0x186a1 movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x133c0 movq -0x38(%rbp), %rdi callq 0x1bdb0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nop
bug30472_retrieve_charset_info: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rdi, [rbp+var_10] call mysql_character_set_name mov rdi, [rbp+var_50] mov rsi, rax call _strcpy mov rdi, [rbp+var_10] lea rsi, aShowVariablesL_0; "SHOW VARIABLES LIKE 'character_set_clie"... call mysql_query mov [rbp+var_44], eax cmp [rbp+var_44], 0 jz short loc_18411 mov eax, [rbp+var_44] mov [rbp+var_5C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_58], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_5C] mov rdx, [rbp+var_58] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 1E5h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_18411: jmp short $+2 loc_18413: mov rdi, [rbp+var_10] call mysql_store_result mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_18454 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvalidResultS; "Invalid result set" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1E8h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_18454: jmp short $+2 loc_18456: mov rdi, [rbp+var_38] call mysql_fetch_row mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_18497 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aCouldnTFetchRo; "Couldn't fetch row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1EAh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_18497: jmp short $+2 loc_18499: mov rdi, [rbp+var_20] mov rax, [rbp+var_40] mov rsi, [rax+8] call _strcpy mov rdi, [rbp+var_38] call mysql_free_result mov rdi, [rbp+var_10] lea rsi, aShowVariablesL_1; "SHOW VARIABLES LIKE 'character_set_resu"... call mysql_query mov [rbp+var_44], eax cmp [rbp+var_44], 0 jz short loc_18518 mov eax, [rbp+var_44] mov [rbp+var_6C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_68], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_6C] mov rdx, [rbp+var_68] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 1EFh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_18518: jmp short $+2 loc_1851A: mov rdi, [rbp+var_10] call mysql_store_result mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_1855B lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvalidResultS; "Invalid result set" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1F1h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_1855B: jmp short $+2 loc_1855D: mov rdi, [rbp+var_38] call mysql_fetch_row mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_1859E lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aCouldnTFetchRo; "Couldn't fetch row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1F3h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_1859E: jmp short $+2 loc_185A0: mov rdi, [rbp+var_28] mov rax, [rbp+var_40] mov rsi, [rax+8] call _strcpy mov rdi, [rbp+var_38] call mysql_free_result mov rdi, [rbp+var_10] lea rsi, aShowVariablesL_2; "SHOW VARIABLES LIKE 'collation_connecti"... call mysql_query mov [rbp+var_44], eax cmp [rbp+var_44], 0 jz short loc_1861F mov eax, [rbp+var_44] mov [rbp+var_7C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_78], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_7C] mov rdx, [rbp+var_78] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 1F8h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_186C2 loc_1861F: jmp short $+2 loc_18621: mov rdi, [rbp+var_10] call mysql_store_result mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_1865F lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvalidResultS; "Invalid result set" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1FAh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_186C2 loc_1865F: jmp short $+2 loc_18661: mov rdi, [rbp+var_38] call mysql_fetch_row mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_1869F lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aCouldnTFetchRo; "Couldn't fetch row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1FCh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_186C2 loc_1869F: jmp short $+2 loc_186A1: mov rdi, [rbp+var_30] mov rax, [rbp+var_40] mov rsi, [rax+8] call _strcpy mov rdi, [rbp+var_38] call mysql_free_result mov [rbp+var_4], 0 loc_186C2: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long bug30472_retrieve_charset_info(long long a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // rax int v6; // eax int v7; // r8d int v8; // r9d int v9; // r8d int v10; // r9d int v11; // eax int v12; // r8d int v13; // r9d int v14; // r8d int v15; // r9d int v16; // eax int v17; // r8d int v18; // r9d int v19; // r8d int v20; // r9d int v22; // [rsp+8h] [rbp-78h] int v23; // [rsp+18h] [rbp-68h] int v24; // [rsp+28h] [rbp-58h] int v25; // [rsp+3Ch] [rbp-44h] int v26; // [rsp+3Ch] [rbp-44h] int v27; // [rsp+3Ch] [rbp-44h] long long row; // [rsp+40h] [rbp-40h] long long v29; // [rsp+40h] [rbp-40h] long long v30; // [rsp+40h] [rbp-40h] long long v31; // [rsp+48h] [rbp-38h] long long v32; // [rsp+48h] [rbp-38h] long long v33; // [rsp+48h] [rbp-38h] v5 = mysql_character_set_name(a1); strcpy(a2, v5); v25 = mysql_query(a1, "SHOW VARIABLES LIKE 'character_set_client'"); if ( v25 ) { v24 = mysql_error(a1); v6 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v25, v24, v6, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 485); return 1; } else { v31 = mysql_store_result(a1); if ( v31 ) { row = mysql_fetch_row(v31); if ( row ) { strcpy(a3, *(_QWORD *)(row + 8)); mysql_free_result(v31); v26 = mysql_query(a1, "SHOW VARIABLES LIKE 'character_set_results'"); if ( v26 ) { v23 = mysql_error(a1); v11 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v26, v23, v11, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 495); return 1; } else { v32 = mysql_store_result(a1); if ( v32 ) { v29 = mysql_fetch_row(v32); if ( v29 ) { strcpy(a4, *(_QWORD *)(v29 + 8)); mysql_free_result(v32); v27 = mysql_query(a1, "SHOW VARIABLES LIKE 'collation_connection'"); if ( v27 ) { v22 = mysql_error(a1); v16 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v27, v22, v16, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 504); return 1; } else { v33 = mysql_store_result(a1); if ( v33 ) { v30 = mysql_fetch_row(v33); if ( v30 ) { strcpy(a5, *(_QWORD *)(v30 + 8)); mysql_free_result(v33); return 0; } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Couldn't fetch row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 508, v19, v20); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Invalid result set", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 506, v17, v18); return 1; } } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Couldn't fetch row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 499, v14, v15); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Invalid result set", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 497, v12, v13); return 1; } } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Couldn't fetch row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 490, v9, v10); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Invalid result set", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 488, v7, v8); return 1; } } }
bug30472_retrieve_charset_info: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126950 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,RAX CALL 0x001133c0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14efa5] CALL 0x00122f20 MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JZ 0x00118411 MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x5c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001268a0 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126870 MOV ESI,dword ptr [RBP + -0x5c] MOV RDX,qword ptr [RBP + -0x58] MOV ECX,EAX LEA RDI,[0x14e22b] LEA R8,[0x14e68c] MOV R9D,0x1e5 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_00118411: JMP 0x00118413 LAB_00118413: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00124570 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00118454 LEA RDI,[0x14e0e6] LEA RSI,[0x14e24d] LEA RDX,[0x14e68c] MOV ECX,0x1e8 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_00118454: JMP 0x00118456 LAB_00118456: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001248b0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x00118497 LEA RDI,[0x14e0e6] LEA RSI,[0x14efd0] LEA RDX,[0x14e68c] MOV ECX,0x1ea MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_00118497: JMP 0x00118499 LAB_00118499: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001133c0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0011bdb0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14efe3] CALL 0x00122f20 MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JZ 0x00118518 MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x6c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001268a0 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126870 MOV ESI,dword ptr [RBP + -0x6c] MOV RDX,qword ptr [RBP + -0x68] MOV ECX,EAX LEA RDI,[0x14e22b] LEA R8,[0x14e68c] MOV R9D,0x1ef MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_00118518: JMP 0x0011851a LAB_0011851a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00124570 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0011855b LEA RDI,[0x14e0e6] LEA RSI,[0x14e24d] LEA RDX,[0x14e68c] MOV ECX,0x1f1 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_0011855b: JMP 0x0011855d LAB_0011855d: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001248b0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0011859e LEA RDI,[0x14e0e6] LEA RSI,[0x14efd0] LEA RDX,[0x14e68c] MOV ECX,0x1f3 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_0011859e: JMP 0x001185a0 LAB_001185a0: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001133c0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0011bdb0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f00f] CALL 0x00122f20 MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JZ 0x0011861f MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x7c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001268a0 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126870 MOV ESI,dword ptr [RBP + -0x7c] MOV RDX,qword ptr [RBP + -0x78] MOV ECX,EAX LEA RDI,[0x14e22b] LEA R8,[0x14e68c] MOV R9D,0x1f8 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_0011861f: JMP 0x00118621 LAB_00118621: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00124570 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0011865f LEA RDI,[0x14e0e6] LEA RSI,[0x14e24d] LEA RDX,[0x14e68c] MOV ECX,0x1fa MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_0011865f: JMP 0x00118661 LAB_00118661: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001248b0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0011869f LEA RDI,[0x14e0e6] LEA RSI,[0x14efd0] LEA RDX,[0x14e68c] MOV ECX,0x1fc MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001186c2 LAB_0011869f: JMP 0x001186a1 LAB_001186a1: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001133c0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0011bdb0 MOV dword ptr [RBP + -0x4],0x0 LAB_001186c2: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 bug30472_retrieve_charset_info (int8 param_1,char *param_2,char *param_3,char *param_4,char *param_5) { int iVar1; int4 uVar2; char *__src; int8 uVar3; long lVar4; long lVar5; int4 local_c; __src = (char *)mysql_character_set_name(param_1); strcpy(param_2,__src); iVar1 = mysql_query(param_1,"SHOW VARIABLES LIKE \'character_set_client\'"); if (iVar1 == 0) { lVar4 = mysql_store_result(param_1); if (lVar4 == 0) { diag("Error: %s (%s: %d)","Invalid result set", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x1e8 ); local_c = 1; } else { lVar5 = mysql_fetch_row(lVar4); if (lVar5 == 0) { diag("Error: %s (%s: %d)","Couldn\'t fetch row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 0x1ea); local_c = 1; } else { strcpy(param_3,*(char **)(lVar5 + 8)); mysql_free_result(lVar4); iVar1 = mysql_query(param_1,"SHOW VARIABLES LIKE \'character_set_results\'"); if (iVar1 == 0) { lVar4 = mysql_store_result(param_1); if (lVar4 == 0) { diag("Error: %s (%s: %d)","Invalid result set", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c" ,0x1f1); local_c = 1; } else { lVar5 = mysql_fetch_row(lVar4); if (lVar5 == 0) { diag("Error: %s (%s: %d)","Couldn\'t fetch row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c" ,499); local_c = 1; } else { strcpy(param_4,*(char **)(lVar5 + 8)); mysql_free_result(lVar4); iVar1 = mysql_query(param_1,"SHOW VARIABLES LIKE \'collation_connection\'"); if (iVar1 == 0) { lVar4 = mysql_store_result(param_1); if (lVar4 == 0) { diag("Error: %s (%s: %d)","Invalid result set", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c" ,0x1fa); local_c = 1; } else { lVar5 = mysql_fetch_row(lVar4); if (lVar5 == 0) { diag("Error: %s (%s: %d)","Couldn\'t fetch row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c" ,0x1fc); local_c = 1; } else { strcpy(param_5,*(char **)(lVar5 + 8)); mysql_free_result(lVar4); local_c = 0; } } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c" ,0x1f8); local_c = 1; } } } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 0x1ef); local_c = 1; } } } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x1e5); local_c = 1; } return local_c; }
15,547
js_os_setReadHandler
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_setReadHandler(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSOSRWHandler *rh; int fd; JSValue func; if (JS_ToInt32(ctx, &fd, argv[0])) return JS_EXCEPTION; func = argv[1]; if (JS_IsNull(func)) { rh = find_rh(ts, fd); if (rh) { JS_FreeValue(ctx, rh->rw_func[magic]); rh->rw_func[magic] = JS_NULL; if (JS_IsNull(rh->rw_func[0]) && JS_IsNull(rh->rw_func[1])) { /* remove the entry */ free_rw_handler(JS_GetRuntime(ctx), rh); } } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); rh = find_rh(ts, fd); if (!rh) { rh = js_mallocz(ctx, sizeof(*rh)); if (!rh) return JS_EXCEPTION; rh->fd = fd; rh->rw_func[0] = JS_NULL; rh->rw_func[1] = JS_NULL; list_add_tail(&rh->link, &ts->os_rw_handlers); } JS_FreeValue(ctx, rh->rw_func[magic]); rh->rw_func[magic] = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O1
c
js_os_setReadHandler: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r12d movq %r8, %r15 movq %rdi, %rbx callq 0x1fd7e xorl %r13d, %r13d xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x3a5f3 movq %rax, %rbp movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x279b0 movl $0x6, %r14d testl %eax, %eax jne 0x18f91 movl %r12d, 0xc(%rsp) movq 0x18(%r15), %r12 cmpl $0x2, %r12d jne 0x18e2e movl 0x8(%rsp), %eax movq %rbp, %r15 movl 0xc(%rsp), %ecx movq 0x8(%r15), %r15 cmpq %rbp, %r15 je 0x18e67 cmpl %eax, 0x10(%r15) jne 0x18e1d jmp 0x18e6a movq 0x10(%r15), %r13 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x22dbe testl %eax, %eax je 0x18ed2 movl 0x8(%rsp), %eax movq %rbp, %r15 movq 0x8(%r15), %r15 cmpq %rbp, %r15 je 0x18efb cmpl %eax, 0x10(%r15) jne 0x18e4f jmp 0x18efe xorl %r15d, %r15d movl $0x3, %r14d testq %r15, %r15 je 0x18f8e movslq %ecx, %r12 shlq $0x4, %r12 movq 0x18(%r15,%r12), %rsi movq 0x20(%r15,%r12), %rdx movq %rbx, %rdi callq 0x1d8b3 movl $0x0, 0x18(%r15,%r12) movq $0x2, 0x20(%r15,%r12) cmpl $0x2, 0x20(%r15) jne 0x18f8e cmpl $0x2, 0x30(%r15) jne 0x18f8e movq %rbx, %rdi callq 0x1fd7e movq %rax, %rdi movq %r15, %rsi callq 0x1530d jmp 0x18f8e leaq 0x873f7(%rip), %rsi # 0xa02d0 movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movq %rdx, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r13d jmp 0x18f93 xorl %r15d, %r15d testq %r15, %r15 jne 0x18f55 movq %r13, 0x10(%rsp) movl $0x38, %esi movq %rbx, %rdi callq 0xee06 xorl %r13d, %r13d testq %rax, %rax je 0x18f91 movq %rax, %r15 movl 0x8(%rsp), %eax movl %eax, 0x10(%r15) movl %r13d, 0x18(%r15) movl $0x2, %eax movq %rax, 0x20(%r15) movl %r13d, 0x28(%r15) movq %rax, 0x30(%r15) movq (%rbp), %rax movq %r15, 0x8(%rax) movq %rax, (%r15) movq %rbp, 0x8(%r15) movq %r15, (%rbp) movq 0x10(%rsp), %r13 movslq 0xc(%rsp), %r14 shlq $0x4, %r14 movq 0x18(%r15,%r14), %rsi movq 0x20(%r15,%r14), %rdx movq %rbx, %rdi callq 0x1d8b3 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1ca5a movq %rax, 0x18(%r15,%r14) movq %rdx, 0x20(%r15,%r14) movl $0x3, %r14d xorl %r13d, %r13d xorl %ecx, %ecx orq %rcx, %r13 movq %r13, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_os_setReadHandler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, r9d mov r15, r8 mov rbx, rdi call JS_GetRuntime xor r13d, r13d xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov rbp, rax mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+48h+var_40] mov rdi, rbx call JS_ToInt32 mov r14d, 6 test eax, eax jnz loc_18F91 mov [rsp+48h+var_3C], r12d mov r12, [r15+18h] cmp r12d, 2 jnz short loc_18E2E mov eax, [rsp+48h+var_40] mov r15, rbp mov ecx, [rsp+48h+var_3C] loc_18E1D: mov r15, [r15+8] cmp r15, rbp jz short loc_18E67 cmp [r15+10h], eax jnz short loc_18E1D jmp short loc_18E6A loc_18E2E: mov r13, [r15+10h] mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_IsFunction test eax, eax jz loc_18ED2 mov eax, [rsp+48h+var_40] mov r15, rbp loc_18E4F: mov r15, [r15+8] cmp r15, rbp jz loc_18EFB cmp [r15+10h], eax jnz short loc_18E4F jmp loc_18EFE loc_18E67: xor r15d, r15d loc_18E6A: mov r14d, 3 test r15, r15 jz loc_18F8E movsxd r12, ecx shl r12, 4 mov rsi, [r15+r12+18h] mov rdx, [r15+r12+20h] mov rdi, rbx call JS_FreeValue mov dword ptr [r15+r12+18h], 0 mov qword ptr [r15+r12+20h], 2 cmp dword ptr [r15+20h], 2 jnz loc_18F8E cmp dword ptr [r15+30h], 2 jnz loc_18F8E mov rdi, rbx call JS_GetRuntime mov rdi, rax mov rsi, r15 call free_rw_handler jmp loc_18F8E loc_18ED2: lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r13d, eax jmp loc_18F93 loc_18EFB: xor r15d, r15d loc_18EFE: test r15, r15 jnz short loc_18F55 mov [rsp+48h+var_38], r13 mov esi, 38h ; '8' mov rdi, rbx call js_mallocz xor r13d, r13d test rax, rax jz short loc_18F91 mov r15, rax mov eax, [rsp+48h+var_40] mov [r15+10h], eax mov [r15+18h], r13d mov eax, 2 mov [r15+20h], rax mov [r15+28h], r13d mov [r15+30h], rax mov rax, [rbp+0] mov [rax+8], r15 mov [r15], rax mov [r15+8], rbp mov [rbp+0], r15 mov r13, [rsp+48h+var_38] loc_18F55: movsxd r14, [rsp+48h+var_3C] shl r14, 4 mov rsi, [r15+r14+18h] mov rdx, [r15+r14+20h] mov rdi, rbx call JS_FreeValue mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DupValue mov [r15+r14+18h], rax mov [r15+r14+20h], rdx mov r14d, 3 loc_18F8E: xor r13d, r13d loc_18F91: xor ecx, ecx loc_18F93: or r13, rcx mov rax, r13 mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_os_setReadHandler(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6) { int Runtime; // eax long long v9; // r13 int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d _QWORD *v14; // rbp long long v15; // r12 _QWORD *v16; // r15 long long v17; // r13 int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d _QWORD *v22; // r15 long long v23; // r12 long long v24; // rax long long v25; // rax unsigned long long v26; // rcx long long v27; // rax long long v28; // rax long long v29; // r14 long long v30; // rdx int v32; // [rsp+8h] [rbp-40h] BYREF int v33; // [rsp+Ch] [rbp-3Ch] long long v34; // [rsp+10h] [rbp-38h] Runtime = JS_GetRuntime(a1); v9 = 0LL; v14 = (_QWORD *)js_std_cmd(0, Runtime, v10, v11, v12, v13); if ( (unsigned int)JS_ToInt32(a1, &v32, *a5, a5[1]) ) goto LABEL_24; v33 = a6; v15 = a5[3]; if ( (_DWORD)v15 == 2 ) { v16 = v14; while ( 1 ) { v16 = (_QWORD *)v16[1]; if ( v16 == v14 ) break; if ( *((_DWORD *)v16 + 4) == v32 ) goto LABEL_13; } v16 = 0LL; LABEL_13: if ( v16 ) { v23 = 2LL * v33; JS_FreeValue(a1, v16[v23 + 3], v16[v23 + 4]); LODWORD(v16[v23 + 3]) = 0; v16[v23 + 4] = 2LL; if ( *((_DWORD *)v16 + 8) == 2 && *((_DWORD *)v16 + 12) == 2 ) { v24 = JS_GetRuntime(a1); free_rw_handler(v24, v16); } } goto LABEL_23; } v17 = a5[2]; if ( (unsigned int)JS_IsFunction(a1, v17, a5[3]) ) { v22 = v14; while ( 1 ) { v22 = (_QWORD *)v22[1]; if ( v22 == v14 ) break; if ( *((_DWORD *)v22 + 4) == v32 ) goto LABEL_19; } v22 = 0LL; LABEL_19: if ( !v22 ) { v34 = v17; v27 = js_mallocz(a1, 0x38uLL); v9 = 0LL; if ( !v27 ) { LABEL_24: v26 = 0LL; return v26 | v9; } v22 = (_QWORD *)v27; *(_DWORD *)(v27 + 16) = v32; *(_DWORD *)(v27 + 24) = 0; *(_QWORD *)(v27 + 32) = 2LL; *(_DWORD *)(v27 + 40) = 0; *(_QWORD *)(v27 + 48) = 2LL; v28 = *v14; *(_QWORD *)(v28 + 8) = v22; *v22 = v28; v22[1] = v14; *v14 = v22; v17 = v34; } v29 = 2LL * v33; JS_FreeValue(a1, v22[v29 + 3], v22[v29 + 4]); v22[v29 + 3] = JS_DupValue(a1, v17, v15); v22[v29 + 4] = v30; LABEL_23: v9 = 0LL; goto LABEL_24; } v25 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v18, v19, v20, v21); v26 = v25 & 0xFFFFFFFF00000000LL; v9 = (unsigned int)v25; return v26 | v9; }
15,548
js_os_setReadHandler
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_setReadHandler(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSOSRWHandler *rh; int fd; JSValue func; if (JS_ToInt32(ctx, &fd, argv[0])) return JS_EXCEPTION; func = argv[1]; if (JS_IsNull(func)) { rh = find_rh(ts, fd); if (rh) { JS_FreeValue(ctx, rh->rw_func[magic]); rh->rw_func[magic] = JS_NULL; if (JS_IsNull(rh->rw_func[0]) && JS_IsNull(rh->rw_func[1])) { /* remove the entry */ free_rw_handler(JS_GetRuntime(ctx), rh); } } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); rh = find_rh(ts, fd); if (!rh) { rh = js_mallocz(ctx, sizeof(*rh)); if (!rh) return JS_EXCEPTION; rh->fd = fd; rh->rw_func[0] = JS_NULL; rh->rw_func[1] = JS_NULL; list_add_tail(&rh->link, &ts->os_rw_handlers); } JS_FreeValue(ctx, rh->rw_func[magic]); rh->rw_func[magic] = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O2
c
js_os_setReadHandler: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %ebp movq %r8, %r13 movq %rdi, %r14 callq 0x1a185 movq %rax, %rdi callq 0x1028a movq %rax, %r15 movq (%r13), %rdx movq 0x8(%r13), %rcx leaq 0xc(%rsp), %rsi movq %r14, %rdi callq 0x215d7 pushq $0x6 popq %rbx testl %eax, %eax je 0x13a7a xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%r13), %r12 cmpl $0x2, %r12d jne 0x13ae9 movl 0xc(%rsp), %esi movq %r15, %rdi callq 0x15764 pushq $0x3 popq %rbx testq %rax, %rax je 0x13a61 movq %rax, %r15 movslq %ebp, %r12 shlq $0x4, %r12 movq 0x18(%rax,%r12), %rsi movq 0x20(%rax,%r12), %rdx movq %r14, %rdi callq 0x1801e andl $0x0, 0x18(%r15,%r12) movq $0x2, 0x20(%r15,%r12) cmpl $0x2, 0x20(%r15) jne 0x13a61 cmpl $0x2, 0x30(%r15) jne 0x13a61 movq %r14, %rdi callq 0x1a185 movq %rax, %rdi movq %r15, %rsi callq 0x10296 jmp 0x13a61 movq 0x10(%r13), %r13 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1ce7d testl %eax, %eax je 0x13b9d movq %r13, 0x10(%rsp) movl 0xc(%rsp), %esi movq %r15, %rdi callq 0x15764 movq %rax, %r13 testq %rax, %rax jne 0x13b62 pushq $0x38 popq %rsi movq %r14, %rdi callq 0x17241 testq %rax, %rax je 0x13a61 movq %rax, %r13 movl 0xc(%rsp), %eax movl %eax, 0x10(%r13) andl $0x0, 0x18(%r13) pushq $0x2 popq %rax movq %rax, 0x20(%r13) andl $0x0, 0x28(%r13) movq %rax, 0x30(%r13) movq (%r15), %rax movq %r13, 0x8(%rax) movq %rax, (%r13) movq %r15, 0x8(%r13) movq %r13, (%r15) movslq %ebp, %rbx shlq $0x4, %rbx movq 0x18(%r13,%rbx), %rsi movq 0x20(%r13,%rbx), %rdx movq %r14, %rdi callq 0x1801e movq %r14, %rdi movq 0x10(%rsp), %rsi movq %r12, %rdx callq 0x16ffb movq %rax, 0x18(%r13,%rbx) movq %rdx, 0x20(%r13,%rbx) pushq $0x3 popq %rbx jmp 0x13a61 leaq 0x73666(%rip), %rsi # 0x8720a movq %r14, %rdi xorl %eax, %eax callq 0x1c64d movq %rdx, %rbx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x13a65
js_os_setReadHandler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, r9d mov r13, r8 mov r14, rdi call JS_GetRuntime mov rdi, rax call js_get_thread_state mov r15, rax mov rdx, [r13+0] mov rcx, [r13+8] lea rsi, [rsp+48h+var_3C] mov rdi, r14 call JS_ToInt32 push 6 pop rbx test eax, eax jz short loc_13A7A loc_13A61: xor eax, eax xor ecx, ecx loc_13A65: or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_13A7A: mov r12, [r13+18h] cmp r12d, 2 jnz short loc_13AE9 mov esi, [rsp+48h+var_3C] mov rdi, r15 call find_rh push 3 pop rbx test rax, rax jz short loc_13A61 mov r15, rax movsxd r12, ebp shl r12, 4 mov rsi, [rax+r12+18h] mov rdx, [rax+r12+20h] mov rdi, r14 call JS_FreeValue and dword ptr [r15+r12+18h], 0 mov qword ptr [r15+r12+20h], 2 cmp dword ptr [r15+20h], 2 jnz short loc_13A61 cmp dword ptr [r15+30h], 2 jnz short loc_13A61 mov rdi, r14 call JS_GetRuntime mov rdi, rax mov rsi, r15 call free_rw_handler jmp loc_13A61 loc_13AE9: mov r13, [r13+10h] mov rdi, r14 mov rsi, r13 mov rdx, r12 call JS_IsFunction test eax, eax jz loc_13B9D mov [rsp+48h+var_38], r13 mov esi, [rsp+48h+var_3C] mov rdi, r15 call find_rh mov r13, rax test rax, rax jnz short loc_13B62 push 38h ; '8' pop rsi mov rdi, r14 call js_mallocz test rax, rax jz loc_13A61 mov r13, rax mov eax, [rsp+48h+var_3C] mov [r13+10h], eax and dword ptr [r13+18h], 0 push 2 pop rax mov [r13+20h], rax and dword ptr [r13+28h], 0 mov [r13+30h], rax mov rax, [r15] mov [rax+8], r13 mov [r13+0], rax mov [r13+8], r15 mov [r15], r13 loc_13B62: movsxd rbx, ebp shl rbx, 4 mov rsi, [r13+rbx+18h] mov rdx, [r13+rbx+20h] mov rdi, r14 call JS_FreeValue mov rdi, r14 mov rsi, [rsp+48h+var_38] mov rdx, r12 call JS_DupValue mov [r13+rbx+18h], rax mov [r13+rbx+20h], rdx push 3 pop rbx jmp loc_13A61 loc_13B9D: lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov rbx, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp loc_13A65
unsigned long long js_os_setReadHandler(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6) { int Runtime; // eax int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long *thread_state; // r15 long long v14; // rax unsigned long long v15; // rcx long long v17; // r12 long long rh; // rax long long v19; // r15 long long v20; // r12 long long v21; // rax long long v22; // r13 int v23; // edx int v24; // ecx int v25; // r8d int v26; // r9d _QWORD *v27; // r13 long long v28; // rax long long v29; // rax long long v30; // rbx long long v31; // rdx char v32; // [rsp+0h] [rbp-48h] unsigned int v33; // [rsp+Ch] [rbp-3Ch] BYREF long long v34; // [rsp+10h] [rbp-38h] Runtime = JS_GetRuntime(a1); thread_state = (long long *)js_get_thread_state(Runtime, a2, v9, v10, v11, v12, v32); if ( (unsigned int)JS_ToInt32(a1, &v33, *a5, a5[1]) ) goto LABEL_2; v17 = a5[3]; if ( (_DWORD)v17 == 2 ) { rh = find_rh(thread_state, v33); if ( rh ) { v19 = rh; v20 = 16LL * a6; JS_FreeValue(a1, *(_QWORD *)(rh + v20 + 24), *(_QWORD *)(rh + v20 + 32)); *(_DWORD *)(v19 + v20 + 24) = 0; *(_QWORD *)(v19 + v20 + 32) = 2LL; if ( *(_DWORD *)(v19 + 32) == 2 && *(_DWORD *)(v19 + 48) == 2 ) { v21 = JS_GetRuntime(a1); free_rw_handler(v21, (long long *)v19); } } goto LABEL_2; } v22 = a5[2]; if ( !(unsigned int)JS_IsFunction(a1, v22) ) { v14 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v23, v24, v25, v26); v15 = v14 & 0xFFFFFFFF00000000LL; v14 = (unsigned int)v14; return v15 | v14; } v34 = v22; v27 = (_QWORD *)find_rh(thread_state, v33); if ( v27 ) goto LABEL_13; v28 = js_mallocz(a1, 56LL); if ( v28 ) { v27 = (_QWORD *)v28; *(_DWORD *)(v28 + 16) = v33; *(_DWORD *)(v28 + 24) = 0; *(_QWORD *)(v28 + 32) = 2LL; *(_DWORD *)(v28 + 40) = 0; *(_QWORD *)(v28 + 48) = 2LL; v29 = *thread_state; *(_QWORD *)(v29 + 8) = v27; *v27 = v29; v27[1] = thread_state; *thread_state = (long long)v27; LABEL_13: v30 = 2LL * a6; JS_FreeValue(a1, v27[v30 + 3], v27[v30 + 4]); v27[v30 + 3] = JS_DupValue(a1, v34, v17); v27[v30 + 4] = v31; } LABEL_2: v14 = 0LL; v15 = 0LL; return v15 | v14; }
js_os_setReadHandler: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,R9D MOV R13,R8 MOV R14,RDI CALL 0x0011a185 MOV RDI,RAX CALL 0x0011028a MOV R15,RAX MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] LEA RSI,[RSP + 0xc] MOV RDI,R14 CALL 0x001215d7 PUSH 0x6 POP RBX TEST EAX,EAX JZ 0x00113a7a LAB_00113a61: XOR EAX,EAX XOR ECX,ECX LAB_00113a65: OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00113a7a: MOV R12,qword ptr [R13 + 0x18] CMP R12D,0x2 JNZ 0x00113ae9 MOV ESI,dword ptr [RSP + 0xc] MOV RDI,R15 CALL 0x00115764 PUSH 0x3 POP RBX TEST RAX,RAX JZ 0x00113a61 MOV R15,RAX MOVSXD R12,EBP SHL R12,0x4 MOV RSI,qword ptr [RAX + R12*0x1 + 0x18] MOV RDX,qword ptr [RAX + R12*0x1 + 0x20] MOV RDI,R14 CALL 0x0011801e AND dword ptr [R15 + R12*0x1 + 0x18],0x0 MOV qword ptr [R15 + R12*0x1 + 0x20],0x2 CMP dword ptr [R15 + 0x20],0x2 JNZ 0x00113a61 CMP dword ptr [R15 + 0x30],0x2 JNZ 0x00113a61 MOV RDI,R14 CALL 0x0011a185 MOV RDI,RAX MOV RSI,R15 CALL 0x00110296 JMP 0x00113a61 LAB_00113ae9: MOV R13,qword ptr [R13 + 0x10] MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 CALL 0x0011ce7d TEST EAX,EAX JZ 0x00113b9d MOV qword ptr [RSP + 0x10],R13 MOV ESI,dword ptr [RSP + 0xc] MOV RDI,R15 CALL 0x00115764 MOV R13,RAX TEST RAX,RAX JNZ 0x00113b62 PUSH 0x38 POP RSI MOV RDI,R14 CALL 0x00117241 TEST RAX,RAX JZ 0x00113a61 MOV R13,RAX MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [R13 + 0x10],EAX AND dword ptr [R13 + 0x18],0x0 PUSH 0x2 POP RAX MOV qword ptr [R13 + 0x20],RAX AND dword ptr [R13 + 0x28],0x0 MOV qword ptr [R13 + 0x30],RAX MOV RAX,qword ptr [R15] MOV qword ptr [RAX + 0x8],R13 MOV qword ptr [R13],RAX MOV qword ptr [R13 + 0x8],R15 MOV qword ptr [R15],R13 LAB_00113b62: MOVSXD RBX,EBP SHL RBX,0x4 MOV RSI,qword ptr [R13 + RBX*0x1 + 0x18] MOV RDX,qword ptr [R13 + RBX*0x1 + 0x20] MOV RDI,R14 CALL 0x0011801e MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R12 CALL 0x00116ffb MOV qword ptr [R13 + RBX*0x1 + 0x18],RAX MOV qword ptr [R13 + RBX*0x1 + 0x20],RDX PUSH 0x3 POP RBX JMP 0x00113a61 LAB_00113b9d: LEA RSI,[0x18720a] MOV RDI,R14 XOR EAX,EAX CALL 0x0011c64d MOV RBX,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x00113a65
int1 [16] js_os_setReadHandler(int8 param_1) { int8 uVar1; int iVar2; int8 uVar3; long *plVar4; ulong uVar5; long lVar6; long *plVar7; ulong uVar8; int8 *in_R8; int in_R9D; long lVar9; int1 auVar10 [16]; int8 uStack_50; int4 local_3c; int8 local_38; uVar3 = JS_GetRuntime(); plVar4 = (long *)js_get_thread_state(uVar3); iVar2 = JS_ToInt32(param_1,&local_3c,*in_R8,in_R8[1]); uStack_50 = 6; if (iVar2 == 0) { uVar3 = in_R8[3]; if ((int)uVar3 == 2) { lVar6 = find_rh(plVar4,local_3c); uStack_50 = 3; uVar3 = 3; if (lVar6 != 0) { lVar9 = (long)in_R9D * 0x10; JS_FreeValue(param_1,*(int8 *)(lVar6 + 0x18 + lVar9), *(int8 *)(lVar6 + 0x20 + lVar9)); *(int4 *)(lVar6 + 0x18 + lVar9) = 0; *(int8 *)(lVar6 + 0x20 + lVar9) = 2; uStack_50 = uVar3; if ((*(int *)(lVar6 + 0x20) == 2) && (*(int *)(lVar6 + 0x30) == 2)) { uVar3 = JS_GetRuntime(param_1); free_rw_handler(uVar3,lVar6); } } } else { uVar1 = in_R8[2]; iVar2 = JS_IsFunction(param_1,uVar1,uVar3); if (iVar2 == 0) { auVar10 = JS_ThrowTypeError(param_1,"not a function"); uStack_50 = auVar10._8_8_; uVar8 = auVar10._0_8_ & 0xffffffff00000000; uVar5 = auVar10._0_8_ & 0xffffffff; goto LAB_00113a65; } local_38 = uVar1; plVar7 = (long *)find_rh(plVar4,local_3c); if (plVar7 == (long *)0x0) { plVar7 = (long *)js_mallocz(param_1,0x38); if (plVar7 == (long *)0x0) goto LAB_00113a61; *(int4 *)(plVar7 + 2) = local_3c; *(int4 *)(plVar7 + 3) = 0; plVar7[4] = 2; *(int4 *)(plVar7 + 5) = 0; plVar7[6] = 2; lVar6 = *plVar4; *(long **)(lVar6 + 8) = plVar7; *plVar7 = lVar6; plVar7[1] = (long)plVar4; *plVar4 = (long)plVar7; } lVar6 = (long)in_R9D; JS_FreeValue(param_1,plVar7[lVar6 * 2 + 3],plVar7[lVar6 * 2 + 4]); auVar10 = JS_DupValue(param_1,local_38,uVar3); plVar7[lVar6 * 2 + 3] = auVar10._0_8_; plVar7[lVar6 * 2 + 4] = auVar10._8_8_; uStack_50 = 3; } } LAB_00113a61: uVar5 = 0; uVar8 = 0; LAB_00113a65: auVar10._0_8_ = uVar5 | uVar8; auVar10._8_8_ = uStack_50; return auVar10; }
15,549
func_uni_ksc5601_onechar
eloqsql/strings/ctype-euc_kr.c
static int func_uni_ksc5601_onechar(int code){ if ((code>=0x00A1)&&(code<=0x0167)) return(tab_uni_ksc56010[code-0x00A1]); if ((code>=0x02C7)&&(code<=0x0451)) return(tab_uni_ksc56011[code-0x02C7]); if ((code>=0x2015)&&(code<=0x2312)) return(tab_uni_ksc56012[code-0x2015]); if ((code>=0x2460)&&(code<=0x266D)) return(tab_uni_ksc56013[code-0x2460]); if ((code>=0x3000)&&(code<=0x327F)) return(tab_uni_ksc56014[code-0x3000]); if ((code>=0x3380)&&(code<=0x33DD)) return(tab_uni_ksc56015[code-0x3380]); if ((code>=0x4E00)&&(code<=0x947F)) return(tab_uni_ksc56016[code-0x4E00]); if ((code>=0x9577)&&(code<=0x9F9C)) return(tab_uni_ksc56017[code-0x9577]); if ((code>=0xAC00)&&(code<=0xD7A3)) return(tab_uni_ksc56018[code-0xAC00]); if ((code>=0xF900)&&(code<=0xFA0B)) return(tab_uni_ksc56019[code-0xF900]); if ((code>=0xFF01)&&(code<=0xFFE6)) return(tab_uni_ksc560110[code-0xFF01]); return(0); }
O0
c
func_uni_ksc5601_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xa1, -0x8(%rbp) jl 0x39cc7 cmpl $0x167, -0x8(%rbp) # imm = 0x167 jg 0x39cc7 movl -0x8(%rbp), %eax subl $0xa1, %eax movslq %eax, %rcx leaq 0xab1b5(%rip), %rax # 0xe4e70 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7 jl 0x39cf7 cmpl $0x451, -0x8(%rbp) # imm = 0x451 jg 0x39cf7 movl -0x8(%rbp), %eax subl $0x2c7, %eax # imm = 0x2C7 movslq %eax, %rcx leaq 0xab315(%rip), %rax # 0xe5000 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x2015, -0x8(%rbp) # imm = 0x2015 jl 0x39d27 cmpl $0x2312, -0x8(%rbp) # imm = 0x2312 jg 0x39d27 movl -0x8(%rbp), %eax subl $0x2015, %eax # imm = 0x2015 movslq %eax, %rcx leaq 0xab605(%rip), %rax # 0xe5320 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x2460, -0x8(%rbp) # imm = 0x2460 jl 0x39d57 cmpl $0x266d, -0x8(%rbp) # imm = 0x266D jg 0x39d57 movl -0x8(%rbp), %eax subl $0x2460, %eax # imm = 0x2460 movslq %eax, %rcx leaq 0xabbd5(%rip), %rax # 0xe5920 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x3000, -0x8(%rbp) # imm = 0x3000 jl 0x39d87 cmpl $0x327f, -0x8(%rbp) # imm = 0x327F jg 0x39d87 movl -0x8(%rbp), %eax subl $0x3000, %eax # imm = 0x3000 movslq %eax, %rcx leaq 0xabfc5(%rip), %rax # 0xe5d40 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x3380, -0x8(%rbp) # imm = 0x3380 jl 0x39db7 cmpl $0x33dd, -0x8(%rbp) # imm = 0x33DD jg 0x39db7 movl -0x8(%rbp), %eax subl $0x3380, %eax # imm = 0x3380 movslq %eax, %rcx leaq 0xac495(%rip), %rax # 0xe6240 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00 jl 0x39de7 cmpl $0x947f, -0x8(%rbp) # imm = 0x947F jg 0x39de7 movl -0x8(%rbp), %eax subl $0x4e00, %eax # imm = 0x4E00 movslq %eax, %rcx leaq 0xac525(%rip), %rax # 0xe6300 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0x9577, -0x8(%rbp) # imm = 0x9577 jl 0x39e17 cmpl $0x9f9c, -0x8(%rbp) # imm = 0x9F9C jg 0x39e17 movl -0x8(%rbp), %eax subl $0x9577, %eax # imm = 0x9577 movslq %eax, %rcx leaq 0xb51f5(%rip), %rax # 0xef000 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0xac00, -0x8(%rbp) # imm = 0xAC00 jl 0x39e44 cmpl $0xd7a3, -0x8(%rbp) # imm = 0xD7A3 jg 0x39e44 movl -0x8(%rbp), %eax subl $0xac00, %eax # imm = 0xAC00 movslq %eax, %rcx leaq 0xb6615(%rip), %rax # 0xf0450 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0xf900, -0x8(%rbp) # imm = 0xF900 jl 0x39e71 cmpl $0xfa0b, -0x8(%rbp) # imm = 0xFA0B jg 0x39e71 movl -0x8(%rbp), %eax subl $0xf900, %eax # imm = 0xF900 movslq %eax, %rcx leaq 0xbbd38(%rip), %rax # 0xf5ba0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 cmpl $0xff01, -0x8(%rbp) # imm = 0xFF01 jl 0x39e9e cmpl $0xffe6, -0x8(%rbp) # imm = 0xFFE6 jg 0x39e9e movl -0x8(%rbp), %eax subl $0xff01, %eax # imm = 0xFF01 movslq %eax, %rcx leaq 0xbbf2b(%rip), %rax # 0xf5dc0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x39ea5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_uni_ksc5601_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0A1h jl short loc_39CC7 cmp [rbp+var_8], 167h jg short loc_39CC7 mov eax, [rbp+var_8] sub eax, 0A1h movsxd rcx, eax lea rax, tab_uni_ksc56010 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39CC7: cmp [rbp+var_8], 2C7h jl short loc_39CF7 cmp [rbp+var_8], 451h jg short loc_39CF7 mov eax, [rbp+var_8] sub eax, 2C7h movsxd rcx, eax lea rax, tab_uni_ksc56011 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39CF7: cmp [rbp+var_8], 2015h jl short loc_39D27 cmp [rbp+var_8], 2312h jg short loc_39D27 mov eax, [rbp+var_8] sub eax, 2015h movsxd rcx, eax lea rax, tab_uni_ksc56012 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39D27: cmp [rbp+var_8], 2460h jl short loc_39D57 cmp [rbp+var_8], 266Dh jg short loc_39D57 mov eax, [rbp+var_8] sub eax, 2460h movsxd rcx, eax lea rax, tab_uni_ksc56013 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39D57: cmp [rbp+var_8], 3000h jl short loc_39D87 cmp [rbp+var_8], 327Fh jg short loc_39D87 mov eax, [rbp+var_8] sub eax, 3000h movsxd rcx, eax lea rax, tab_uni_ksc56014 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39D87: cmp [rbp+var_8], 3380h jl short loc_39DB7 cmp [rbp+var_8], 33DDh jg short loc_39DB7 mov eax, [rbp+var_8] sub eax, 3380h movsxd rcx, eax lea rax, tab_uni_ksc56015 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39DB7: cmp [rbp+var_8], 4E00h jl short loc_39DE7 cmp [rbp+var_8], 947Fh jg short loc_39DE7 mov eax, [rbp+var_8] sub eax, 4E00h movsxd rcx, eax lea rax, tab_uni_ksc56016 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39DE7: cmp [rbp+var_8], 9577h jl short loc_39E17 cmp [rbp+var_8], 9F9Ch jg short loc_39E17 mov eax, [rbp+var_8] sub eax, 9577h movsxd rcx, eax lea rax, tab_uni_ksc56017 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_39EA5 loc_39E17: cmp [rbp+var_8], 0AC00h jl short loc_39E44 cmp [rbp+var_8], 0D7A3h jg short loc_39E44 mov eax, [rbp+var_8] sub eax, 0AC00h movsxd rcx, eax lea rax, tab_uni_ksc56018 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_39EA5 loc_39E44: cmp [rbp+var_8], 0F900h jl short loc_39E71 cmp [rbp+var_8], 0FA0Bh jg short loc_39E71 mov eax, [rbp+var_8] sub eax, 0F900h movsxd rcx, eax lea rax, tab_uni_ksc56019 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_39EA5 loc_39E71: cmp [rbp+var_8], 0FF01h jl short loc_39E9E cmp [rbp+var_8], 0FFE6h jg short loc_39E9E mov eax, [rbp+var_8] sub eax, 0FF01h movsxd rcx, eax lea rax, tab_uni_ksc560110 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_39EA5 loc_39E9E: mov [rbp+var_4], 0 loc_39EA5: mov eax, [rbp+var_4] pop rbp retn
long long func_uni_ksc5601_onechar(int a1) { if ( a1 < 161 || a1 > 359 ) { if ( a1 < 711 || a1 > 1105 ) { if ( a1 < 8213 || a1 > 8978 ) { if ( a1 < 9312 || a1 > 9837 ) { if ( a1 < 12288 || a1 > 12927 ) { if ( a1 < 13184 || a1 > 13277 ) { if ( a1 < 19968 || a1 > 38015 ) { if ( a1 < 38263 || a1 > 40860 ) { if ( a1 < 44032 || a1 > 55203 ) { if ( a1 < 63744 || a1 > 64011 ) { if ( a1 < 65281 || a1 > 65510 ) return 0; else return tab_uni_ksc560110[a1 - 65281]; } else { return tab_uni_ksc56019[a1 - 63744]; } } else { return tab_uni_ksc56018[a1 - 44032]; } } else { return tab_uni_ksc56017[a1 - 38263]; } } else { return tab_uni_ksc56016[a1 - 19968]; } } else { return tab_uni_ksc56015[a1 - 13184]; } } else { return tab_uni_ksc56014[a1 - 12288]; } } else { return tab_uni_ksc56013[a1 - 9312]; } } else { return tab_uni_ksc56012[a1 - 8213]; } } else { return tab_uni_ksc56011[a1 - 711]; } } else { return tab_uni_ksc56010[a1 - 161]; } }
func_uni_ksc5601_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xa1 JL 0x00139cc7 CMP dword ptr [RBP + -0x8],0x167 JG 0x00139cc7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xa1 MOVSXD RCX,EAX LEA RAX,[0x1e4e70] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139cc7: CMP dword ptr [RBP + -0x8],0x2c7 JL 0x00139cf7 CMP dword ptr [RBP + -0x8],0x451 JG 0x00139cf7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2c7 MOVSXD RCX,EAX LEA RAX,[0x1e5000] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139cf7: CMP dword ptr [RBP + -0x8],0x2015 JL 0x00139d27 CMP dword ptr [RBP + -0x8],0x2312 JG 0x00139d27 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2015 MOVSXD RCX,EAX LEA RAX,[0x1e5320] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139d27: CMP dword ptr [RBP + -0x8],0x2460 JL 0x00139d57 CMP dword ptr [RBP + -0x8],0x266d JG 0x00139d57 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2460 MOVSXD RCX,EAX LEA RAX,[0x1e5920] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139d57: CMP dword ptr [RBP + -0x8],0x3000 JL 0x00139d87 CMP dword ptr [RBP + -0x8],0x327f JG 0x00139d87 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3000 MOVSXD RCX,EAX LEA RAX,[0x1e5d40] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139d87: CMP dword ptr [RBP + -0x8],0x3380 JL 0x00139db7 CMP dword ptr [RBP + -0x8],0x33dd JG 0x00139db7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3380 MOVSXD RCX,EAX LEA RAX,[0x1e6240] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139db7: CMP dword ptr [RBP + -0x8],0x4e00 JL 0x00139de7 CMP dword ptr [RBP + -0x8],0x947f JG 0x00139de7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x4e00 MOVSXD RCX,EAX LEA RAX,[0x1e6300] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139de7: CMP dword ptr [RBP + -0x8],0x9577 JL 0x00139e17 CMP dword ptr [RBP + -0x8],0x9f9c JG 0x00139e17 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x9577 MOVSXD RCX,EAX LEA RAX,[0x1ef000] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139e17: CMP dword ptr [RBP + -0x8],0xac00 JL 0x00139e44 CMP dword ptr [RBP + -0x8],0xd7a3 JG 0x00139e44 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xac00 MOVSXD RCX,EAX LEA RAX,[0x1f0450] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139e44: CMP dword ptr [RBP + -0x8],0xf900 JL 0x00139e71 CMP dword ptr [RBP + -0x8],0xfa0b JG 0x00139e71 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xf900 MOVSXD RCX,EAX LEA RAX,[0x1f5ba0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139e71: CMP dword ptr [RBP + -0x8],0xff01 JL 0x00139e9e CMP dword ptr [RBP + -0x8],0xffe6 JG 0x00139e9e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xff01 MOVSXD RCX,EAX LEA RAX,[0x1f5dc0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x00139ea5 LAB_00139e9e: MOV dword ptr [RBP + -0x4],0x0 LAB_00139ea5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_uni_ksc5601_onechar(int param_1) { int2 uVar1; if ((param_1 < 0xa1) || (0x167 < param_1)) { if ((param_1 < 0x2c7) || (0x451 < param_1)) { if ((param_1 < 0x2015) || (0x2312 < param_1)) { if ((param_1 < 0x2460) || (0x266d < param_1)) { if ((param_1 < 0x3000) || (0x327f < param_1)) { if ((param_1 < 0x3380) || (0x33dd < param_1)) { if ((param_1 < 0x4e00) || (0x947f < param_1)) { if ((param_1 < 0x9577) || (0x9f9c < param_1)) { if ((param_1 < 0xac00) || (0xd7a3 < param_1)) { if ((param_1 < 0xf900) || (0xfa0b < param_1)) { if ((param_1 < 0xff01) || (0xffe6 < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_uni_ksc560110 + (long)(param_1 + -0xff01) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56019 + (long)(param_1 + -0xf900) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56018 + (long)(param_1 + -0xac00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56017 + (long)(param_1 + -0x9577) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56016 + (long)(param_1 + -0x4e00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56015 + (long)(param_1 + -0x3380) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56014 + (long)(param_1 + -0x3000) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56013 + (long)(param_1 + -0x2460) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56012 + (long)(param_1 + -0x2015) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56011 + (long)(param_1 + -0x2c7) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56010 + (long)(param_1 + -0xa1) * 2); } return uVar1; }
15,550
ggml_compute_forward_map_unary
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_map_unary( const struct ggml_compute_params * params, struct ggml_tensor * dst, const ggml_unary_op_f32_t fun) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_map_unary_f32(params, dst, fun); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_map_unary: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x194d2 jmp 0x194bf movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x3c9f0 jmp 0x194ec leaq 0x5a689(%rip), %rdi # 0x73b62 movl $0x2fcb, %esi # imm = 0x2FCB leaq 0x5a8d8(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_map_unary: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax] test eax, eax jnz short loc_194D2 jmp short $+2 loc_194BF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call ggml_compute_forward_map_unary_f32 jmp short loc_194EC loc_194D2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2FCBh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_194EC: add rsp, 20h pop rbp retn
double ggml_compute_forward_map_unary(long long a1, long long a2, long long a3) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 12235LL, "fatal error"); ggml_compute_forward_map_unary_f32(a1, a2, a3); return result; }
ggml_compute_forward_map_unary: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x001194d2 JMP 0x001194bf LAB_001194bf: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0013c9f0 JMP 0x001194ec LAB_001194d2: LEA RDI,[0x173b62] MOV ESI,0x2fcb LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_001194ec: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_map_unary(int8 param_1,long param_2,int8 param_3) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_map_unary_f32(param_1,param_2,param_3); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2fcb,"fatal error"); } return; }
15,551
mi_store_bin_pack_key
eloqsql/storage/myisam/mi_search.c
void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { store_key_length_inc(key_pos,s_temp->ref_length); memcpy((char*) key_pos,(char*) s_temp->key+s_temp->ref_length, (size_t) s_temp->totlength-s_temp->ref_length); if (s_temp->next_key_pos) { key_pos+=(uint) (s_temp->totlength-s_temp->ref_length); store_key_length_inc(key_pos,s_temp->n_ref_length); if (s_temp->prev_length) /* If we must extend key */ { memcpy(key_pos,s_temp->prev_key,s_temp->prev_length); } } }
O0
c
mi_store_bin_pack_key: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, (%rax) jae 0xc34ab movq -0x18(%rbp), %rax movl (%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc34e2 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x1c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi movq -0x18(%rbp), %rax movl (%rax), %eax addq %rax, %rsi movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %edx movq -0x18(%rbp), %rax movl (%rax), %eax subq %rax, %rdx callq 0x2a090 movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0xc35be movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx movq -0x18(%rbp), %rax subl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, 0x8(%rax) jae 0xc3560 movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc3598 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x20(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0xc35bc movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi movq -0x18(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %edx callq 0x2a090 jmp 0xc35be addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_mi_store_bin_pack_key: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] cmp dword ptr [rax], 0FFh jnb short loc_C34AB mov rax, [rbp+var_18] mov eax, [rax] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C34E2 loc_C34AB: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_1C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C34E2: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+20h] mov rax, [rbp+var_18] mov eax, [rax] add rsi, rax mov rax, [rbp+var_18] mov eax, [rax+10h] mov edx, eax mov rax, [rbp+var_18] mov eax, [rax] sub rdx, rax call _memcpy mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz loc_C35BE mov rax, [rbp+var_18] mov ecx, [rax+10h] mov rax, [rbp+var_18] sub ecx, [rax] mov rax, [rbp+var_10] mov ecx, ecx add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_18] cmp dword ptr [rax+8], 0FFh jnb short loc_C3560 mov rax, [rbp+var_18] mov eax, [rax+8] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C3598 loc_C3560: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_20], eax mov eax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_20] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C3598: mov rax, [rbp+var_18] cmp dword ptr [rax+18h], 0 jz short loc_C35BC mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+28h] mov rax, [rbp+var_18] mov eax, [rax+18h] mov edx, eax call _memcpy loc_C35BC: jmp short $+2 loc_C35BE: add rsp, 20h pop rbp retn
long long mi_store_bin_pack_key(long long a1, _BYTE *a2, unsigned int *a3) { long long result; // rax _BYTE *v4; // rax unsigned int v5; // [rsp+0h] [rbp-20h] int v6; // [rsp+4h] [rbp-1Ch] _BYTE *v8; // [rsp+10h] [rbp-10h] _BYTE *v9; // [rsp+10h] [rbp-10h] _BYTE *v10; // [rsp+10h] [rbp-10h] if ( *a3 >= 0xFF ) { *a2 = -1; v6 = *a3; a2[2] = *a3; a2[1] = BYTE1(v6); v8 = a2 + 3; } else { v8 = a2 + 1; *a2 = *a3; } memcpy(v8, *a3 + *((_QWORD *)a3 + 4), a3[4] - (unsigned long long)*a3); result = (long long)a3; if ( *((_QWORD *)a3 + 6) ) { v9 = &v8[a3[4] - *a3]; if ( a3[2] >= 0xFF ) { *v9 = -1; v5 = a3[2]; v9[2] = v5; v9[1] = BYTE1(v5); v10 = v9 + 3; } else { v4 = v9; v10 = v9 + 1; *v4 = a3[2]; } result = (long long)a3; if ( a3[6] ) return memcpy(v10, *((_QWORD *)a3 + 5), a3[6]); } return result; }
_mi_store_bin_pack_key: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0xff JNC 0x001c34ab MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c34e2 LAB_001c34ab: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c34e2: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] SUB RDX,RAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x001c35be MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] SUB ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0xff JNC 0x001c3560 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c3598 LAB_001c3560: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c3598: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x18],0x0 JZ 0x001c35bc MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x18] MOV EDX,EAX CALL 0x0012a090 LAB_001c35bc: JMP 0x001c35be LAB_001c35be: ADD RSP,0x20 POP RBP RET
void _mi_store_bin_pack_key(int8 param_1,int1 *param_2,uint *param_3) { uint uVar1; int1 *puVar2; int1 *local_18; if (*param_3 < 0xff) { local_18 = param_2 + 1; *param_2 = (char)*param_3; } else { *param_2 = 0xff; uVar1 = *param_3; param_2[2] = (char)uVar1; param_2[1] = (char)(uVar1 >> 8); local_18 = param_2 + 3; } memcpy(local_18,(void *)(*(long *)(param_3 + 8) + (ulong)*param_3), (ulong)param_3[4] - (ulong)*param_3); if (*(long *)(param_3 + 0xc) != 0) { puVar2 = local_18 + (param_3[4] - *param_3); if (param_3[2] < 0xff) { local_18 = puVar2 + 1; *puVar2 = (char)param_3[2]; } else { *puVar2 = 0xff; uVar1 = param_3[2]; puVar2[2] = (char)uVar1; puVar2[1] = (char)(uVar1 >> 8); local_18 = puVar2 + 3; } if (param_3[6] != 0) { memcpy(local_18,*(void **)(param_3 + 10),(ulong)param_3[6]); } } return; }
15,552
ma_store_blob_length
eloqsql/storage/maria/ma_dynrec.c
void _ma_store_blob_length(uchar *pos,uint pack_length,uint length) { switch (pack_length) { case 1: *pos= (uchar) length; break; case 2: int2store(pos,length); break; case 3: int3store(pos,length); break; case 4: int4store(pos,length); default: break; } return; }
O0
c
ma_store_blob_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl -0xc(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x3, %eax ja 0x546ea movq -0x28(%rbp), %rax leaq 0x105dc7(%rip), %rcx # 0x15a440 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl -0x10(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) jmp 0x546ec jmp 0x54691 movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movl -0x10(%rbp), %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, (%rax) jmp 0x546ec jmp 0x546aa movl -0x10(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) movl -0x10(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x1(%rax) movl -0x10(%rbp), %eax shrl $0x10, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x2(%rax) jmp 0x546ec jmp 0x546d7 movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x10(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x546ea jmp 0x546ec popq %rbp retq nop
_ma_store_blob_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov eax, [rbp+var_C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 3 ja short def_54680; jumptable 0000000000054680 default case mov rax, [rbp+var_28] lea rcx, jpt_54680 movsxd rax, ds:(jpt_54680 - 15A440h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_54682: mov eax, [rbp+var_10]; jumptable 0000000000054680 case 1 mov cl, al mov rax, [rbp+var_8] mov [rax], cl jmp short loc_546EC loc_5468F: jmp short $+2; jumptable 0000000000054680 case 2 loc_54691: mov rax, [rbp+var_8] mov [rbp+var_18], rax mov eax, [rbp+var_10] mov cx, ax mov rax, [rbp+var_18] mov [rax], cx jmp short loc_546EC loc_546A8: jmp short $+2; jumptable 0000000000054680 case 3 loc_546AA: mov eax, [rbp+var_10] mov cl, al mov rax, [rbp+var_8] mov [rax], cl mov eax, [rbp+var_10] shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov [rax+1], cl mov eax, [rbp+var_10] shr eax, 10h mov cl, al mov rax, [rbp+var_8] mov [rax+2], cl jmp short loc_546EC loc_546D5: jmp short $+2; jumptable 0000000000054680 case 4 loc_546D7: mov rax, [rbp+var_8] mov [rbp+var_20], rax mov ecx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax], ecx jmp short $+2; jumptable 0000000000054680 default case def_54680: jmp short $+2; jumptable 0000000000054680 default case loc_546EC: pop rbp retn
unsigned long long ma_store_blob_length(_BYTE *a1, int a2, int a3) { unsigned long long result; // rax result = (unsigned int)(a2 - 1); switch ( a2 ) { case 1: result = (unsigned long long)a1; *a1 = a3; break; case 2: result = (unsigned long long)a1; *(_WORD *)a1 = a3; break; case 3: *(_WORD *)a1 = a3; result = (unsigned long long)a1; a1[2] = BYTE2(a3); break; case 4: result = (unsigned long long)a1; *(_DWORD *)a1 = a3; break; default: return result; } return result; }
_ma_store_blob_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV EAX,dword ptr [RBP + -0xc] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x3 JA 0x001546ea MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x25a440] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EAX,dword ptr [RBP + -0x10] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL JMP 0x001546ec caseD_2: JMP 0x00154691 LAB_00154691: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX],CX JMP 0x001546ec caseD_3: JMP 0x001546aa LAB_001546aa: MOV EAX,dword ptr [RBP + -0x10] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],CL JMP 0x001546ec caseD_4: JMP 0x001546d7 LAB_001546d7: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x001546ea LAB_001546ea: JMP 0x001546ec default: POP RBP RET
void _ma_store_blob_length(int4 *param_1,int4 param_2,int4 param_3) { switch(param_2) { case 1: *(char *)param_1 = (char)param_3; break; case 2: *(short *)param_1 = (short)param_3; break; case 3: *(char *)param_1 = (char)param_3; *(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8); *(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10); break; case 4: *param_1 = param_3; } return; }
15,553
stbi_load_16
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) { FILE *f = stbi__fopen(filename, "rb"); stbi__uint16 *result; if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); result = stbi_load_from_file_16(f,x,y,comp,req_comp); fclose(f); return result; }
O2
c
stbi_load_16: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %r8d, %ebx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 leaq 0x9b26a(%rip), %rsi # 0xc93e5 callq 0x26e80 testq %rax, %rax je 0x2e1ac movq %rax, %r13 movq %rax, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x2dfc9 movq %rax, %rbx movq %r13, %rdi callq 0x26c30 movq %rbx, %rax jmp 0x2e1c8 movq %fs:0x0, %rax leaq 0x983b9(%rip), %rcx # 0xc6578 movq %rcx, -0x20(%rax) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
stbi_load_16: push r15 push r14 push r13 push r12 push rbx mov ebx, r8d mov r14, rcx mov r15, rdx mov r12, rsi lea rsi, aCrb+2; "rb" call _fopen test rax, rax jz short loc_2E1AC mov r13, rax mov rdi, rax mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, ebx call stbi_load_from_file_16 mov rbx, rax mov rdi, r13 call _fclose mov rax, rbx jmp short loc_2E1C8 loc_2E1AC: mov rax, fs:0 lea rcx, aCanTFopen; "can't fopen" mov [rax-20h], rcx xor eax, eax loc_2E1C8: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long stbi_load_16(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v8; // rax long long v9; // r13 long long v10; // rbx v8 = fopen(a1, "rb"); if ( v8 ) { v9 = v8; v10 = stbi_load_from_file_16(v8, a2, a3, a4, a5); fclose(v9); return v10; } else { *(_QWORD *)(__readfsqword(0) - 32) = "can't fopen"; return 0LL; } }
stbi_load_16: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI LEA RSI,[0x1c93e5] CALL 0x00126e80 TEST RAX,RAX JZ 0x0012e1ac MOV R13,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,EBX CALL 0x0012dfc9 MOV RBX,RAX MOV RDI,R13 CALL 0x00126c30 MOV RAX,RBX JMP 0x0012e1c8 LAB_0012e1ac: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c6578] MOV qword ptr [RAX + -0x20],RCX XOR EAX,EAX LAB_0012e1c8: POP RBX POP R12 POP R13 POP R14 POP R15 RET
int8 stbi_load_16(char *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5) { FILE *__stream; int8 uVar1; long *in_FS_OFFSET; __stream = fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { *(char **)(*in_FS_OFFSET + -0x20) = "can\'t fopen"; uVar1 = 0; } else { uVar1 = stbi_load_from_file_16(__stream,param_2,param_3,param_4,param_5); fclose(__stream); } return uVar1; }
15,554
ma_dynstr_append_quoted
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_append_quoted(DYNAMIC_STRING *str, const char *append, size_t len, char quote) { size_t additional= str->alloc_increment; size_t lim= additional; uint i; if (ma_dynstr_realloc(str, len + additional + 2)) return TRUE; str->str[str->length++]= quote; for (i= 0; i < len; i++) { register char c= append[i]; if (c == quote || c == '\\') { if (!lim) { if (ma_dynstr_realloc(str, additional)) return TRUE; lim= additional; } lim--; str->str[str->length++]= '\\'; } str->str[str->length++]= c; } str->str[str->length++]= quote; return FALSE; }
O0
c
ma_dynstr_append_quoted: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq -0x30(%rbp), %rsi addq $0x2, %rsi callq 0x4c2f0 cmpb $0x0, %al je 0x4c4ff movb $0x1, -0x1(%rbp) jmp 0x4c5fa movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl $0x0, -0x3c(%rbp) movl -0x3c(%rbp), %eax cmpq -0x20(%rbp), %rax jae 0x4c5d6 movq -0x18(%rbp), %rax movl -0x3c(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x3d(%rbp) movsbl -0x3d(%rbp), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax je 0x4c555 movsbl -0x3d(%rbp), %eax cmpl $0x5c, %eax jne 0x4c5a8 cmpq $0x0, -0x38(%rbp) jne 0x4c57e movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0x4c2f0 cmpb $0x0, %al je 0x4c576 movb $0x1, -0x1(%rbp) jmp 0x4c5fa movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $-0x1, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rdx movq 0x8(%rdx), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x8(%rdx) movb $0x5c, (%rax,%rcx) movb -0x3d(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x4c526 movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_dynstr_append_quoted: push rbp mov rbp, rsp sub rsp, 40h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], al mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, [rbp+var_30] add rsi, 2 call ma_dynstr_realloc cmp al, 0 jz short loc_4C4FF mov [rbp+var_1], 1 jmp loc_4C5FA loc_4C4FF: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_3C], 0 loc_4C526: mov eax, [rbp+var_3C] cmp rax, [rbp+var_20] jnb loc_4C5D6 mov rax, [rbp+var_18] mov ecx, [rbp+var_3C] mov al, [rax+rcx] mov [rbp+var_3D], al movsx eax, [rbp+var_3D] movsx ecx, [rbp+var_21] cmp eax, ecx jz short loc_4C555 movsx eax, [rbp+var_3D] cmp eax, 5Ch ; '\' jnz short loc_4C5A8 loc_4C555: cmp [rbp+var_38], 0 jnz short loc_4C57E mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] call ma_dynstr_realloc cmp al, 0 jz short loc_4C576 mov [rbp+var_1], 1 jmp loc_4C5FA loc_4C576: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_4C57E: mov rax, [rbp+var_38] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rbp+var_10] mov rcx, [rdx+8] mov rsi, rcx add rsi, 1 mov [rdx+8], rsi mov byte ptr [rax+rcx], 5Ch ; '\' loc_4C5A8: mov dl, [rbp+var_3D] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp loc_4C526 loc_4C5D6: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_1], 0 loc_4C5FA: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_dynstr_append_quoted(long long *a1, long long a2, unsigned long long a3, char a4) { long long v4; // rax long long v5; // rcx long long v6; // rax long long v7; // rcx long long v8; // rax long long v9; // rcx long long v10; // rax long long v11; // rcx char v13; // [rsp+3h] [rbp-3Dh] unsigned int i; // [rsp+4h] [rbp-3Ch] long long v15; // [rsp+8h] [rbp-38h] long long v16; // [rsp+10h] [rbp-30h] v16 = a1[3]; v15 = v16; if ( ma_dynstr_realloc(a1, v16 + a3 + 2) ) return 1; v4 = *a1; v5 = a1[1]; a1[1] = v5 + 1; *(_BYTE *)(v4 + v5) = a4; for ( i = 0; i < a3; ++i ) { v13 = *(_BYTE *)(a2 + i); if ( v13 == a4 || v13 == 92 ) { if ( !v15 ) { if ( ma_dynstr_realloc(a1, v16) ) return 1; v15 = v16; } --v15; v6 = *a1; v7 = a1[1]; a1[1] = v7 + 1; *(_BYTE *)(v6 + v7) = 92; } v8 = *a1; v9 = a1[1]; a1[1] = v9 + 1; *(_BYTE *)(v8 + v9) = v13; } v10 = *a1; v11 = a1[1]; a1[1] = v11 + 1; *(_BYTE *)(v10 + v11) = a4; return 0; }
ma_dynstr_append_quoted: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,qword ptr [RBP + -0x30] ADD RSI,0x2 CALL 0x0014c2f0 CMP AL,0x0 JZ 0x0014c4ff MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c5fa LAB_0014c4ff: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV dword ptr [RBP + -0x3c],0x0 LAB_0014c526: MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014c5d6 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x3c] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x3d],AL MOVSX EAX,byte ptr [RBP + -0x3d] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JZ 0x0014c555 MOVSX EAX,byte ptr [RBP + -0x3d] CMP EAX,0x5c JNZ 0x0014c5a8 LAB_0014c555: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0014c57e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] CALL 0x0014c2f0 CMP AL,0x0 JZ 0x0014c576 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c5fa LAB_0014c576: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0014c57e: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,-0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RDX + 0x8] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RDX + 0x8],RSI MOV byte ptr [RAX + RCX*0x1],0x5c LAB_0014c5a8: MOV DL,byte ptr [RBP + -0x3d] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0014c526 LAB_0014c5d6: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV byte ptr [RBP + -0x1],0x0 LAB_0014c5fa: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_dynstr_append_quoted(long *param_1,long param_2,ulong param_3,char param_4) { long lVar1; long lVar2; char cVar3; char cVar4; uint local_44; long local_40; int1 local_9; lVar1 = param_1[3]; cVar3 = ma_dynstr_realloc(param_1,param_3 + lVar1 + 2); if (cVar3 == '\0') { lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = param_4; local_40 = lVar1; for (local_44 = 0; local_44 < param_3; local_44 = local_44 + 1) { cVar3 = *(char *)(param_2 + (ulong)local_44); if ((cVar3 == param_4) || (cVar3 == '\\')) { if ((local_40 == 0) && (cVar4 = ma_dynstr_realloc(param_1,lVar1), local_40 = lVar1, cVar4 != '\0')) { return 1; } local_40 = local_40 + -1; lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(int1 *)(*param_1 + lVar2) = 0x5c; } lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = cVar3; } lVar1 = param_1[1]; param_1[1] = lVar1 + 1; *(char *)(*param_1 + lVar1) = param_4; local_9 = 0; } else { local_9 = 1; } return local_9; }
15,555
s3_info_copy
eloqsql/storage/maria/s3_func.c
S3_INFO *s3_info_copy(S3_INFO *old) { S3_INFO *to, tmp; /* Copy lengths */ memcpy(&tmp, old, sizeof(tmp)); /* Allocate new buffers */ if (!my_multi_malloc(PSI_NOT_INSTRUMENTED, MY_WME, &to, sizeof(S3_INFO), &tmp.access_key.str, old->access_key.length+1, &tmp.secret_key.str, old->secret_key.length+1, &tmp.region.str, old->region.length+1, &tmp.bucket.str, old->bucket.length+1, &tmp.database.str, old->database.length+1, &tmp.table.str, old->table.length+1, &tmp.base_table.str, old->base_table.length+1, NullS)) return 0; /* Copy lengths and new pointers to to */ memcpy(to, &tmp, sizeof(tmp)); /* Copy data */ strmov((char*) to->access_key.str, old->access_key.str); strmov((char*) to->secret_key.str, old->secret_key.str); strmov((char*) to->region.str, old->region.str); strmov((char*) to->bucket.str, old->bucket.str); /* Database may not be null terminated */ strmake((char*) to->database.str, old->database.str, old->database.length); strmov((char*) to->table.str, old->table.str); strmov((char*) to->base_table.str, old->base_table.str); return to; }
O0
c
s3_info_copy: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movq %rdi, -0x38(%rbp) movq -0x38(%rbp), %rsi leaq -0xe0(%rbp), %rdi movl $0xa0, %edx callq 0xa4f0 leaq -0xe0(%rbp), %r8 movq -0x38(%rbp), %rax movq 0x8(%rax), %r9 addq $0x1, %r9 leaq -0xe0(%rbp), %rax addq $0x10, %rax movq %rax, -0x108(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax addq $0x1, %rax movq %rax, -0x100(%rbp) leaq -0xe0(%rbp), %rax addq $0x20, %rax movq %rax, -0xf8(%rbp) movq -0x38(%rbp), %rax movq 0x28(%rax), %rax addq $0x1, %rax movq %rax, -0xf0(%rbp) leaq -0xe0(%rbp), %r13 addq $0x30, %r13 movq -0x38(%rbp), %rax movq 0x38(%rax), %r12 addq $0x1, %r12 leaq -0xe0(%rbp), %r15 addq $0x58, %r15 movq -0x38(%rbp), %rax movq 0x60(%rax), %r14 addq $0x1, %r14 leaq -0xe0(%rbp), %rbx addq $0x68, %rbx movq -0x38(%rbp), %rax movq 0x70(%rax), %r11 addq $0x1, %r11 leaq -0xe0(%rbp), %r10 addq $0x78, %r10 movq -0x38(%rbp), %rax movq 0x80(%rax), %rax addq $0x1, %rax movq %rax, -0xe8(%rbp) xorl %edi, %edi movl $0x10, %esi leaq -0x40(%rbp), %rdx movl $0xa0, %ecx xorl %eax, %eax movq -0x108(%rbp), %rax movq %rax, (%rsp) movq -0x100(%rbp), %rax movq %rax, 0x8(%rsp) movq -0xf8(%rbp), %rax movq %rax, 0x10(%rsp) movq -0xf0(%rbp), %rax movq %rax, 0x18(%rsp) movq -0xe8(%rbp), %rax movq %r13, 0x20(%rsp) movq %r12, 0x28(%rsp) movq %r15, 0x30(%rsp) movq %r14, 0x38(%rsp) movq %rbx, 0x40(%rsp) movq %r11, 0x48(%rsp) movq %r10, 0x50(%rsp) movq %rax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movb $0x0, %al callq 0xa610 cmpq $0x0, %rax jne 0xe3e3 movq $0x0, -0x30(%rbp) jmp 0xe499 movq -0x40(%rbp), %rdi leaq -0xe0(%rbp), %rsi movl $0xa0, %edx callq 0xa4f0 movq -0x40(%rbp), %rax movq (%rax), %rdi movq -0x38(%rbp), %rax movq (%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq 0x10(%rax), %rdi movq -0x38(%rbp), %rax movq 0x10(%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq 0x20(%rax), %rdi movq -0x38(%rbp), %rax movq 0x20(%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq 0x30(%rax), %rdi movq -0x38(%rbp), %rax movq 0x30(%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq 0x58(%rax), %rdi movq -0x38(%rbp), %rax movq 0x58(%rax), %rsi movq -0x38(%rbp), %rax movq 0x60(%rax), %rdx callq 0xa5a0 movq -0x40(%rbp), %rax movq 0x68(%rax), %rdi movq -0x38(%rbp), %rax movq 0x68(%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq 0x78(%rax), %rdi movq -0x38(%rbp), %rax movq 0x78(%rax), %rsi callq 0xa5e0 movq -0x40(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
s3_info_copy: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov [rbp+var_38], rdi mov rsi, [rbp+var_38] lea rdi, [rbp+var_E0] mov edx, 0A0h call _memcpy lea r8, [rbp+var_E0] mov rax, [rbp+var_38] mov r9, [rax+8] add r9, 1 lea rax, [rbp+var_E0] add rax, 10h mov [rbp+var_108], rax mov rax, [rbp+var_38] mov rax, [rax+18h] add rax, 1 mov [rbp+var_100], rax lea rax, [rbp+var_E0] add rax, 20h ; ' ' mov [rbp+var_F8], rax mov rax, [rbp+var_38] mov rax, [rax+28h] add rax, 1 mov [rbp+var_F0], rax lea r13, [rbp+var_E0] add r13, 30h ; '0' mov rax, [rbp+var_38] mov r12, [rax+38h] add r12, 1 lea r15, [rbp+var_E0] add r15, 58h ; 'X' mov rax, [rbp+var_38] mov r14, [rax+60h] add r14, 1 lea rbx, [rbp+var_E0] add rbx, 68h ; 'h' mov rax, [rbp+var_38] mov r11, [rax+70h] add r11, 1 lea r10, [rbp+var_E0] add r10, 78h ; 'x' mov rax, [rbp+var_38] mov rax, [rax+80h] add rax, 1 mov [rbp+var_E8], rax xor edi, edi mov esi, 10h lea rdx, [rbp+var_40] mov ecx, 0A0h xor eax, eax mov rax, [rbp+var_108] mov [rsp+170h+var_170], rax mov rax, [rbp+var_100] mov [rsp+170h+var_168], rax mov rax, [rbp+var_F8] mov [rsp+170h+var_160], rax mov rax, [rbp+var_F0] mov [rsp+170h+var_158], rax mov rax, [rbp+var_E8] mov [rsp+170h+var_150], r13 mov [rsp+170h+var_148], r12 mov [rsp+170h+var_140], r15 mov [rsp+170h+var_138], r14 mov [rsp+170h+var_130], rbx mov [rsp+170h+var_128], r11 mov [rsp+170h+var_120], r10 mov [rsp+170h+var_118], rax mov [rsp+170h+var_110], 0 mov al, 0 call _my_multi_malloc cmp rax, 0 jnz short loc_E3E3 mov [rbp+var_30], 0 jmp loc_E499 loc_E3E3: mov rdi, [rbp+var_40] lea rsi, [rbp+var_E0] mov edx, 0A0h call _memcpy mov rax, [rbp+var_40] mov rdi, [rax] mov rax, [rbp+var_38] mov rsi, [rax] call _stpcpy mov rax, [rbp+var_40] mov rdi, [rax+10h] mov rax, [rbp+var_38] mov rsi, [rax+10h] call _stpcpy mov rax, [rbp+var_40] mov rdi, [rax+20h] mov rax, [rbp+var_38] mov rsi, [rax+20h] call _stpcpy mov rax, [rbp+var_40] mov rdi, [rax+30h] mov rax, [rbp+var_38] mov rsi, [rax+30h] call _stpcpy mov rax, [rbp+var_40] mov rdi, [rax+58h] mov rax, [rbp+var_38] mov rsi, [rax+58h] mov rax, [rbp+var_38] mov rdx, [rax+60h] call _strmake mov rax, [rbp+var_40] mov rdi, [rax+68h] mov rax, [rbp+var_38] mov rsi, [rax+68h] call _stpcpy mov rax, [rbp+var_40] mov rdi, [rax+78h] mov rax, [rbp+var_38] mov rsi, [rax+78h] call _stpcpy mov rax, [rbp+var_40] mov [rbp+var_30], rax loc_E499: mov rax, [rbp+var_30] add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * s3_info_copy(_QWORD *a1) { _BYTE v2[16]; // [rsp+90h] [rbp-E0h] BYREF _BYTE v3[16]; // [rsp+A0h] [rbp-D0h] BYREF _BYTE v4[16]; // [rsp+B0h] [rbp-C0h] BYREF long long v5; // [rsp+C0h] [rbp-B0h] BYREF long long v6; // [rsp+E8h] [rbp-88h] BYREF long long v7; // [rsp+F8h] [rbp-78h] BYREF long long v8; // [rsp+108h] [rbp-68h] BYREF _QWORD *v9; // [rsp+130h] [rbp-40h] BYREF _QWORD *v10; // [rsp+138h] [rbp-38h] v10 = a1; memcpy(v2, a1, 160LL); if ( !my_multi_malloc( 0LL, 16LL, &v9, 160LL, v2, v10[1] + 1LL, v3, v10[3] + 1LL, v4, v10[5] + 1LL, &v5, v10[7] + 1LL, &v6, v10[12] + 1LL, &v7, v10[14] + 1LL, &v8, v10[16] + 1LL, 0LL, v3, v10[3] + 1LL, v4, v10[5] + 1LL, v10[16] + 1LL) ) return 0LL; memcpy(v9, v2, 160LL); stpcpy(*v9, *v10); stpcpy(v9[2], v10[2]); stpcpy(v9[4], v10[4]); stpcpy(v9[6], v10[6]); strmake(v9[11], v10[11], v10[12]); stpcpy(v9[13], v10[13]); stpcpy(v9[15], v10[15]); return v9; }
s3_info_copy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV qword ptr [RBP + -0x38],RDI MOV RSI,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0xe0] MOV EDX,0xa0 CALL 0x0010a4f0 LEA R8,[RBP + -0xe0] MOV RAX,qword ptr [RBP + -0x38] MOV R9,qword ptr [RAX + 0x8] ADD R9,0x1 LEA RAX,[RBP + -0xe0] ADD RAX,0x10 MOV qword ptr [RBP + -0x108],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x100],RAX LEA RAX,[RBP + -0xe0] ADD RAX,0x20 MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0xf0],RAX LEA R13,[RBP + -0xe0] ADD R13,0x30 MOV RAX,qword ptr [RBP + -0x38] MOV R12,qword ptr [RAX + 0x38] ADD R12,0x1 LEA R15,[RBP + -0xe0] ADD R15,0x58 MOV RAX,qword ptr [RBP + -0x38] MOV R14,qword ptr [RAX + 0x60] ADD R14,0x1 LEA RBX,[RBP + -0xe0] ADD RBX,0x68 MOV RAX,qword ptr [RBP + -0x38] MOV R11,qword ptr [RAX + 0x70] ADD R11,0x1 LEA R10,[RBP + -0xe0] ADD R10,0x78 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0xe8],RAX XOR EDI,EDI MOV ESI,0x10 LEA RDX,[RBP + -0x40] MOV ECX,0xa0 XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x108] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RBP + -0x100] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RBP + -0xf8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RBP + -0xf0] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RBP + -0xe8] MOV qword ptr [RSP + 0x20],R13 MOV qword ptr [RSP + 0x28],R12 MOV qword ptr [RSP + 0x30],R15 MOV qword ptr [RSP + 0x38],R14 MOV qword ptr [RSP + 0x40],RBX MOV qword ptr [RSP + 0x48],R11 MOV qword ptr [RSP + 0x50],R10 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],0x0 MOV AL,0x0 CALL 0x0010a610 CMP RAX,0x0 JNZ 0x0010e3e3 MOV qword ptr [RBP + -0x30],0x0 JMP 0x0010e499 LAB_0010e3e3: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0xe0] MOV EDX,0xa0 CALL 0x0010a4f0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x10] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x20] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x30] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RAX + 0x60] CALL 0x0010a5a0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x68] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x78] CALL 0x0010a5e0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX LAB_0010e499: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * s3_info_copy(int8 *param_1) { long lVar1; int1 local_e8 [16]; int1 auStack_d8 [16]; int1 auStack_c8 [16]; int1 auStack_b8 [40]; int1 auStack_90 [16]; int1 auStack_80 [16]; int1 auStack_70 [40]; int8 *local_48; int8 *local_40; int8 *local_38; local_40 = param_1; memcpy(local_e8,param_1,0xa0); lVar1 = my_multi_malloc(0,0x10,&local_48,0xa0,local_e8,local_40[1] + 1,auStack_d8,local_40[3] + 1, auStack_c8,local_40[5] + 1,auStack_b8,local_40[7] + 1,auStack_90, local_40[0xc] + 1,auStack_80,local_40[0xe] + 1,auStack_70, local_40[0x10] + 1,0); if (lVar1 == 0) { local_38 = (int8 *)0x0; } else { memcpy(local_48,local_e8,0xa0); stpcpy((char *)*local_48,(char *)*local_40); stpcpy((char *)local_48[2],(char *)local_40[2]); stpcpy((char *)local_48[4],(char *)local_40[4]); stpcpy((char *)local_48[6],(char *)local_40[6]); strmake(local_48[0xb],local_40[0xb],local_40[0xc]); stpcpy((char *)local_48[0xd],(char *)local_40[0xd]); stpcpy((char *)local_48[0xf],(char *)local_40[0xf]); local_38 = local_48; } return local_38; }
15,556
s3_info_copy
eloqsql/storage/maria/s3_func.c
S3_INFO *s3_info_copy(S3_INFO *old) { S3_INFO *to, tmp; /* Copy lengths */ memcpy(&tmp, old, sizeof(tmp)); /* Allocate new buffers */ if (!my_multi_malloc(PSI_NOT_INSTRUMENTED, MY_WME, &to, sizeof(S3_INFO), &tmp.access_key.str, old->access_key.length+1, &tmp.secret_key.str, old->secret_key.length+1, &tmp.region.str, old->region.length+1, &tmp.bucket.str, old->bucket.length+1, &tmp.database.str, old->database.length+1, &tmp.table.str, old->table.length+1, &tmp.base_table.str, old->base_table.length+1, NullS)) return 0; /* Copy lengths and new pointers to to */ memcpy(to, &tmp, sizeof(tmp)); /* Copy data */ strmov((char*) to->access_key.str, old->access_key.str); strmov((char*) to->secret_key.str, old->secret_key.str); strmov((char*) to->region.str, old->region.str); strmov((char*) to->bucket.str, old->bucket.str); /* Database may not be null terminated */ strmake((char*) to->database.str, old->database.str, old->database.length); strmov((char*) to->table.str, old->table.str); strmov((char*) to->base_table.str, old->base_table.str); return to; }
O3
c
s3_info_copy: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdi, %rbx leaq -0xd0(%rbp), %rdi movl $0xa0, %edx movq %rbx, %rsi callq 0xa480 movq 0x8(%rbx), %r9 movq 0x18(%rbx), %r10 incq %r9 incq %r10 movq 0x28(%rbx), %r13 incq %r13 movq 0x38(%rbx), %r12 incq %r12 movq 0x60(%rbx), %r11 incq %r11 movq 0x70(%rbx), %r14 incq %r14 movq 0x80(%rbx), %r15 incq %r15 subq $0x8, %rsp leaq -0x30(%rbp), %rdx movl $0x10, %esi movl $0xa0, %ecx xorl %edi, %edi leaq -0xd0(%rbp), %r8 xorl %eax, %eax pushq $0x0 pushq %r15 leaq -0x58(%rbp), %r15 pushq %r15 pushq %r14 leaq -0x68(%rbp), %r14 pushq %r14 pushq %r11 leaq -0x78(%rbp), %r11 pushq %r11 pushq %r12 leaq -0xa0(%rbp), %r11 pushq %r11 pushq %r13 leaq -0xb0(%rbp), %r11 pushq %r11 pushq %r10 leaq -0xc0(%rbp), %r10 pushq %r10 callq 0xa5a0 addq $0x70, %rsp testq %rax, %rax je 0xc7f5 movq -0x30(%rbp), %r14 leaq -0xd0(%rbp), %rsi movl $0xa0, %edx movq %r14, %rdi callq 0xa480 movq (%r14), %rdi movq (%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax movq 0x10(%rax), %rdi movq 0x10(%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax movq 0x20(%rax), %rdi movq 0x20(%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax movq 0x30(%rax), %rdi movq 0x30(%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax movq 0x58(%rax), %rdi movq 0x58(%rbx), %rsi movq 0x60(%rbx), %rdx callq 0xa540 movq -0x30(%rbp), %rax movq 0x68(%rax), %rdi movq 0x68(%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax movq 0x78(%rax), %rdi movq 0x78(%rbx), %rsi callq 0xa520 movq -0x30(%rbp), %rax jmp 0xc7f7 xorl %eax, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
s3_info_copy: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, rdi lea rdi, [rbp+var_D0] mov edx, 0A0h mov rsi, rbx call _memcpy mov r9, [rbx+8] mov r10, [rbx+18h] inc r9 inc r10 mov r13, [rbx+28h] inc r13 mov r12, [rbx+38h] inc r12 mov r11, [rbx+60h] inc r11 mov r14, [rbx+70h] inc r14 mov r15, [rbx+80h] inc r15 sub rsp, 8 lea rdx, [rbp+var_30] mov esi, 10h mov ecx, 0A0h xor edi, edi lea r8, [rbp+var_D0] xor eax, eax push 0 push r15 lea r15, [rbp+var_58] push r15 push r14 lea r14, [rbp+var_68] push r14 push r11 lea r11, [rbp+var_78] push r11 push r12 lea r11, [rbp+var_A0] push r11 push r13 lea r11, [rbp+var_B0] push r11 push r10 lea r10, [rbp+var_C0] push r10 call _my_multi_malloc add rsp, 70h test rax, rax jz loc_C7F5 mov r14, [rbp+var_30] lea rsi, [rbp+var_D0] mov edx, 0A0h mov rdi, r14 call _memcpy mov rdi, [r14] mov rsi, [rbx] call _strcpy mov rax, [rbp+var_30] mov rdi, [rax+10h] mov rsi, [rbx+10h] call _strcpy mov rax, [rbp+var_30] mov rdi, [rax+20h] mov rsi, [rbx+20h] call _strcpy mov rax, [rbp+var_30] mov rdi, [rax+30h] mov rsi, [rbx+30h] call _strcpy mov rax, [rbp+var_30] mov rdi, [rax+58h] mov rsi, [rbx+58h] mov rdx, [rbx+60h] call _strmake mov rax, [rbp+var_30] mov rdi, [rax+68h] mov rsi, [rbx+68h] call _strcpy mov rax, [rbp+var_30] mov rdi, [rax+78h] mov rsi, [rbx+78h] call _strcpy mov rax, [rbp+var_30] jmp short loc_C7F7 loc_C7F5: xor eax, eax loc_C7F7: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * s3_info_copy(_QWORD *a1) { _QWORD *v1; // r14 _BYTE v3[16]; // [rsp+0h] [rbp-D0h] BYREF _BYTE v4[16]; // [rsp+10h] [rbp-C0h] BYREF _BYTE v5[16]; // [rsp+20h] [rbp-B0h] BYREF _BYTE v6[40]; // [rsp+30h] [rbp-A0h] BYREF _BYTE v7[16]; // [rsp+58h] [rbp-78h] BYREF _BYTE v8[16]; // [rsp+68h] [rbp-68h] BYREF _BYTE v9[40]; // [rsp+78h] [rbp-58h] BYREF _QWORD *v10; // [rsp+A0h] [rbp-30h] BYREF memcpy(v3, a1, 160LL); if ( !my_multi_malloc( 0LL, 16LL, &v10, 160LL, v3, a1[1] + 1LL, v4, a1[3] + 1LL, v5, a1[5] + 1LL, v6, a1[7] + 1LL, v7, a1[12] + 1LL, v8, a1[14] + 1LL, v9, a1[16] + 1LL, 0LL) ) return 0LL; v1 = v10; memcpy(v10, v3, 160LL); strcpy(*v1, *a1); strcpy(v10[2], a1[2]); strcpy(v10[4], a1[4]); strcpy(v10[6], a1[6]); strmake(v10[11], a1[11], a1[12]); strcpy(v10[13], a1[13]); strcpy(v10[15], a1[15]); return v10; }
s3_info_copy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBX,RDI LEA RDI,[RBP + -0xd0] MOV EDX,0xa0 MOV RSI,RBX CALL 0x0010a480 MOV R9,qword ptr [RBX + 0x8] MOV R10,qword ptr [RBX + 0x18] INC R9 INC R10 MOV R13,qword ptr [RBX + 0x28] INC R13 MOV R12,qword ptr [RBX + 0x38] INC R12 MOV R11,qword ptr [RBX + 0x60] INC R11 MOV R14,qword ptr [RBX + 0x70] INC R14 MOV R15,qword ptr [RBX + 0x80] INC R15 SUB RSP,0x8 LEA RDX,[RBP + -0x30] MOV ESI,0x10 MOV ECX,0xa0 XOR EDI,EDI LEA R8,[RBP + -0xd0] XOR EAX,EAX PUSH 0x0 PUSH R15 LEA R15,[RBP + -0x58] PUSH R15 PUSH R14 LEA R14,[RBP + -0x68] PUSH R14 PUSH R11 LEA R11,[RBP + -0x78] PUSH R11 PUSH R12 LEA R11,[RBP + -0xa0] PUSH R11 PUSH R13 LEA R11,[RBP + -0xb0] PUSH R11 PUSH R10 LEA R10,[RBP + -0xc0] PUSH R10 CALL 0x0010a5a0 ADD RSP,0x70 TEST RAX,RAX JZ 0x0010c7f5 MOV R14,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0xd0] MOV EDX,0xa0 MOV RDI,R14 CALL 0x0010a480 MOV RDI,qword ptr [R14] MOV RSI,qword ptr [RBX] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBX + 0x10] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RBX + 0x20] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RBX + 0x30] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x58] MOV RSI,qword ptr [RBX + 0x58] MOV RDX,qword ptr [RBX + 0x60] CALL 0x0010a540 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x68] MOV RSI,qword ptr [RBX + 0x68] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x78] MOV RSI,qword ptr [RBX + 0x78] CALL 0x0010a520 MOV RAX,qword ptr [RBP + -0x30] JMP 0x0010c7f7 LAB_0010c7f5: XOR EAX,EAX LAB_0010c7f7: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * s3_info_copy(int8 *param_1) { int8 *puVar1; long lVar2; int1 local_d8 [16]; int1 local_c8 [16]; int1 local_b8 [16]; int1 local_a8 [40]; int1 local_80 [16]; int1 local_70 [16]; int1 local_60 [40]; int8 *local_38; memcpy(local_d8,param_1,0xa0); lVar2 = my_multi_malloc(0,0x10,&local_38,0xa0,local_d8,param_1[1] + 1,local_c8,param_1[3] + 1, local_b8,param_1[5] + 1,local_a8,param_1[7] + 1,local_80,param_1[0xc] + 1, local_70,param_1[0xe] + 1,local_60,param_1[0x10] + 1,0); puVar1 = local_38; if (lVar2 == 0) { local_38 = (int8 *)0x0; } else { memcpy(local_38,local_d8,0xa0); strcpy((char *)*puVar1,(char *)*param_1); strcpy((char *)local_38[2],(char *)param_1[2]); strcpy((char *)local_38[4],(char *)param_1[4]); strcpy((char *)local_38[6],(char *)param_1[6]); strmake(local_38[0xb],param_1[0xb],param_1[0xc]); strcpy((char *)local_38[0xd],(char *)param_1[0xd]); strcpy((char *)local_38[0xf],(char *)param_1[0xf]); } return local_38; }
15,557
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O1
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r12 cmpq %r12, %r14 sete %bpl je 0xd33e1 movq (%rdx), %r15 movq 0x8(%rdx), %r13 movq 0x8(%r14), %rdx cmpq %r13, %rdx jne 0xd33bd testq %rdx, %rdx je 0xd33cc movq (%r14), %rdi movq %r15, %rsi callq 0x1dca0 testl %eax, %eax je 0xd33cc addq $0x70, %r14 cmpq %r12, %r14 sete %bpl jne 0xd33a0 jmp 0xd33e1 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xb2a06 testb $0x1, %bpl je 0xd341d leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x8974c movq %r14, %rdi movl $0x1, %esi callq 0x8974c movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r14, [rsi+18h] mov r12, [rsi+20h] cmp r14, r12 setz bpl jz short loc_D33E1 mov r15, [rdx] mov r13, [rdx+8] loc_D33A0: mov rdx, [r14+8] cmp rdx, r13 jnz short loc_D33BD test rdx, rdx jz short loc_D33CC mov rdi, [r14] mov rsi, r15 call _bcmp test eax, eax jz short loc_D33CC loc_D33BD: add r14, 70h ; 'p' cmp r14, r12 setz bpl jnz short loc_D33A0 jmp short loc_D33E1 loc_D33CC: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) test bpl, 1 jz short loc_D341D loc_D33E1: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_D341D: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, long long *a3) { _QWORD *v3; // r14 _QWORD *v4; // r12 bool v5; // bp long long v6; // r15 long long v7; // r13 long long v8; // rdx v3 = *(_QWORD **)(a2 + 24); v4 = *(_QWORD **)(a2 + 32); v5 = v3 == v4; if ( v3 == v4 ) goto LABEL_9; v6 = *a3; v7 = a3[1]; while ( 1 ) { v8 = v3[1]; if ( v8 == v7 && (!v8 || !(unsigned int)bcmp(*v3, v6)) ) break; v3 += 14; v5 = v3 == v4; if ( v3 == v4 ) goto LABEL_9; } minja::Value::Value(this, (const minja::Value *)(v3 + 4)); if ( v5 ) { LABEL_9: *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } return this; }
get_named: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R12,qword ptr [RSI + 0x20] CMP R14,R12 SETZ BPL JZ 0x001d33e1 MOV R15,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] LAB_001d33a0: MOV RDX,qword ptr [R14 + 0x8] CMP RDX,R13 JNZ 0x001d33bd TEST RDX,RDX JZ 0x001d33cc MOV RDI,qword ptr [R14] MOV RSI,R15 CALL 0x0011dca0 TEST EAX,EAX JZ 0x001d33cc LAB_001d33bd: ADD R14,0x70 CMP R14,R12 SETZ BPL JNZ 0x001d33a0 JMP 0x001d33e1 LAB_001d33cc: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x001b2a06 TEST BPL,0x1 JZ 0x001d341d LAB_001d33e1: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0018974c MOV RDI,R14 MOV ESI,0x1 CALL 0x0018974c LAB_001d341d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { int8 *puVar1; void *__s2; size_t sVar2; size_t __n; int iVar3; int8 *in_RDX; long in_RSI; int8 *puVar4; bool bVar5; puVar4 = *(int8 **)(in_RSI + 0x18); puVar1 = *(int8 **)(in_RSI + 0x20); bVar5 = puVar4 == puVar1; if (!bVar5) { __s2 = (void *)*in_RDX; sVar2 = in_RDX[1]; do { __n = puVar4[1]; if ((__n == sVar2) && ((__n == 0 || (iVar3 = bcmp((void *)*puVar4,__s2,__n), iVar3 == 0)))) { Value::Value((Value *)param_1,(Value *)(puVar4 + 4)); if (!bVar5) { return param_1; } break; } puVar4 = puVar4 + 0xe; bVar5 = puVar4 == puVar1; } while (!bVar5); } bVar5 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (string)0x0; 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(bVar5); 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(bVar5); return param_1; }
15,558
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O2
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r12 cmpq %r12, %r14 je 0x9cc98 movq %r14, %rdi movq %r15, %rsi callq 0x4349d testb %al, %al jne 0x9cca2 addq $0x70, %r14 jmp 0x9cc7e movq %rbx, %rdi callq 0x82a0e jmp 0x9ccb1 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x850a8 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov r15, rdx mov rbx, rdi mov r14, [rsi+18h] mov r12, [rsi+20h] loc_9CC7E: cmp r14, r12 jz short loc_9CC98 mov rdi, r14 mov rsi, r15 call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, al jnz short loc_9CCA2 add r14, 70h ; 'p' jmp short loc_9CC7E loc_9CC98: mov rdi, rbx; this call _ZN5minja5ValueC2Ev; minja::Value::Value(void) jmp short loc_9CCB1 loc_9CCA2: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_9CCB1: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, _QWORD *a3) { _QWORD *v4; // r14 _QWORD *v5; // r12 v4 = *(_QWORD **)(a2 + 24); v5 = *(_QWORD **)(a2 + 32); while ( 1 ) { if ( v4 == v5 ) { minja::Value::Value(this); return this; } if ( std::operator==<char>(v4, a3) ) break; v4 += 14; } minja::Value::Value(this, (const minja::Value *)(v4 + 4)); return this; }
get_named: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R12,qword ptr [RSI + 0x20] LAB_0019cc7e: CMP R14,R12 JZ 0x0019cc98 MOV RDI,R14 MOV RSI,R15 CALL 0x0014349d TEST AL,AL JNZ 0x0019cca2 ADD R14,0x70 JMP 0x0019cc7e LAB_0019cc98: MOV RDI,RBX CALL 0x00182a0e JMP 0x0019ccb1 LAB_0019cca2: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x001850a8 LAB_0019ccb1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { string *psVar1; char cVar2; string *in_RDX; long in_RSI; string *psVar3; psVar3 = *(string **)(in_RSI + 0x18); psVar1 = *(string **)(in_RSI + 0x20); while( true ) { if (psVar3 == psVar1) { Value::Value((Value *)param_1); return param_1; } cVar2 = std::operator==(psVar3,in_RDX); if (cVar2 != '\0') break; psVar3 = psVar3 + 0x70; } Value::Value((Value *)param_1,(Value *)(psVar3 + 0x20)); return param_1; }
15,559
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O3
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r13 cmpq %r13, %r14 je 0xd20ec movq (%rdx), %r15 movq 0x8(%rdx), %r12 cmpq %r12, 0x8(%r14) jne 0xd20e3 testq %r12, %r12 je 0xd212a movq (%r14), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1dcb0 testl %eax, %eax je 0xd212a addq $0x70, %r14 cmpq %r13, %r14 jne 0xd20c6 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x89876 movq %r14, %rdi movl $0x1, %esi callq 0x89876 jmp 0xd2139 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xb1a06 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov r14, [rsi+18h] mov r13, [rsi+20h] cmp r14, r13 jz short loc_D20EC mov r15, [rdx] mov r12, [rdx+8] loc_D20C6: cmp [r14+8], r12 jnz short loc_D20E3 test r12, r12 jz short loc_D212A mov rdi, [r14] mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_D212A loc_D20E3: add r14, 70h ; 'p' cmp r14, r13 jnz short loc_D20C6 loc_D20EC: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_D2139 loc_D212A: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_D2139: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, long long *a3) { _QWORD *v3; // r14 _QWORD *v4; // r13 long long v5; // r15 long long v6; // r12 v3 = *(_QWORD **)(a2 + 24); v4 = *(_QWORD **)(a2 + 32); if ( v3 == v4 ) { LABEL_7: *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } else { v5 = *a3; v6 = a3[1]; while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5, v6) ) { v3 += 14; if ( v3 == v4 ) goto LABEL_7; } minja::Value::Value(this, (const minja::Value *)(v3 + 4)); } return this; }
get_named: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] CMP R14,R13 JZ 0x001d20ec MOV R15,qword ptr [RDX] MOV R12,qword ptr [RDX + 0x8] LAB_001d20c6: CMP qword ptr [R14 + 0x8],R12 JNZ 0x001d20e3 TEST R12,R12 JZ 0x001d212a MOV RDI,qword ptr [R14] MOV RSI,R15 MOV RDX,R12 CALL 0x0011dcb0 TEST EAX,EAX JZ 0x001d212a LAB_001d20e3: ADD R14,0x70 CMP R14,R13 JNZ 0x001d20c6 LAB_001d20ec: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00189876 MOV RDI,R14 MOV ESI,0x1 CALL 0x00189876 JMP 0x001d2139 LAB_001d212a: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x001b1a06 LAB_001d2139: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 *in_RDX; long in_RSI; bool bVar3; int8 *puVar4; puVar4 = *(int8 **)(in_RSI + 0x18); puVar1 = *(int8 **)(in_RSI + 0x20); if (puVar4 != puVar1) { __s2 = (void *)*in_RDX; __n = in_RDX[1]; do { if ((puVar4[1] == __n) && ((__n == 0 || (iVar2 = bcmp((void *)*puVar4,__s2,__n), iVar2 == 0))) ) { Value::Value((Value *)param_1,(Value *)(puVar4 + 4)); return param_1; } puVar4 = puVar4 + 0xe; } while (puVar4 != puVar1); } bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (string)0x0; 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(bVar3); 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(bVar3); return param_1; }
15,560
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O3
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x1a660 movq 0x40(%r14), %r15 addq $0x30, %r14 cmpq %r14, %r15 je 0xbeeef leaq 0x10(%rsp), %r12 leaq 0x35ba7(%rip), %r13 # 0xf4a29 movq 0x20(%r15), %rsi movq 0x28(%r15), %rdx movq %r12, %rdi callq 0x1aa20 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi movq %r13, %rsi callq 0x1aa20 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %rbp, %rdi callq 0x1aa20 movq %rax, %rbp movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbp, %rdi movl $0xa, %esi callq 0x1a880 movsbl %al, %esi movq %rbp, %rdi callq 0x1a040 movq %rax, %rdi callq 0x1a630 movq %r15, %rdi callq 0x1a650 movq %rax, %r15 cmpq %r14, %rax jne 0xbee82 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x1ade0 movq 0x6d025(%rip), %rsi # 0x12bf28 movq %rsp, %rdi callq 0x1a6a0 leaq 0x80(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xbef2f movq %rax, %rbx movq 0x6cfef(%rip), %rsi # 0x12bf28 movq %rsp, %rdi callq 0x1a6a0 leaq 0x80(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rdi callq 0x1afd0
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov r14, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r15, [r14+40h] add r14, 30h ; '0' cmp r15, r14 jz short loc_BEEEF lea r12, [rsp+1B8h+var_1A8] lea r13, asc_F4A29; " ::= " loc_BEE82: mov rsi, [r15+20h] mov rdx, [r15+28h] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov edx, 5 mov rdi, rax mov rsi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15+40h] mov rdx, [r15+48h] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbp mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbp; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r15, rax cmp rax, r14 jnz short loc_BEE82 loc_BEEEF: lea rsi, [rsp+1B8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1B8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_BEF2F: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { _QWORD *i; // r15 long long v3; // rbp std::ostream *v4; // rbp char v5; // al std::ostream *v6; // rax _BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF _BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8); for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) ) { v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]); std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL); v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]); v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put(v4, v5); std::ostream::flush(v6); } std::stringbuf::str(a1, v10); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v8, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
format_grammar[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0011a660 MOV R15,qword ptr [R14 + 0x40] ADD R14,0x30 CMP R15,R14 JZ 0x001beeef LEA R12,[RSP + 0x10] LEA R13,[0x1f4a29] LAB_001bee82: MOV RSI,qword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] LAB_001bee8a: MOV RDI,R12 CALL 0x0011aa20 MOV RBP,RAX MOV EDX,0x5 MOV RDI,RAX MOV RSI,R13 CALL 0x0011aa20 MOV RSI,qword ptr [R15 + 0x40] MOV RDX,qword ptr [R15 + 0x48] MOV RDI,RBP CALL 0x0011aa20 MOV RBP,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBP MOV ESI,0xa CALL 0x0011a880 MOVSX ESI,AL MOV RDI,RBP CALL 0x0011a040 MOV RDI,RAX CALL 0x0011a630 MOV RDI,R15 CALL 0x0011a650 MOV R15,RAX CMP RAX,R14 JNZ 0x001bee82 LAB_001beeef: LEA RSI,[RSP + 0x18] LAB_001beef4: MOV RDI,RBX CALL 0x0011ade0 LAB_001beefc: MOV RSI,qword ptr [0x0022bf28] MOV RDI,RSP CALL 0x0011a6a0 LEA RDI,[RSP + 0x80] CALL 0x0011a2c0 MOV RAX,RBX ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::format_grammar[abi:cxx11]() */ void SchemaConverter::format_grammar_abi_cxx11_(void) { ostream *poVar1; _Rb_tree_node_base *p_Var2; long in_RSI; stringstream asStack_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::stringstream::stringstream(asStack_1b8); p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40); if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) { do { /* try { // try from 001bee8a to 001beede has its CatchHandler @ 001bef2f */ poVar1 = std::__ostream_insert<char,std::char_traits<char>> (local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28)); std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5); poVar1 = std::__ostream_insert<char,std::char_traits<char>> (poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48)); std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1); std::ostream::put((char)poVar1); std::ostream::flush(); p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2); } while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)); } /* try { // try from 001beef4 to 001beefb has its CatchHandler @ 001bef2d */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(asStack_1b8); std::ios_base::~ios_base(local_138); return; }
15,561
nglog::ErrnoLogMessage::~ErrnoLogMessage()
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::~ErrnoLogMessage() { // Don't access errno directly because it may have been altered // while streaming the message. stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno() << "]"; }
O3
cpp
nglog::ErrnoLogMessage::~ErrnoLogMessage(): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x7538, %r14d # imm = 0x7538 addq 0x8(%rdi), %r14 leaq 0x1792f(%rip), %rsi # 0x22964 movl $0x2, %edx movq %r14, %rdi callq 0x7600 movq 0x8(%rbx), %rax movl (%rax), %esi leaq 0x8(%rsp), %rdi callq 0xb105 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rdi callq 0x7600 movq %rax, %r14 leaq 0x175ef(%rip), %rsi # 0x2265d movl $0x2, %edx movq %rax, %rdi callq 0x7600 movq 0x8(%rbx), %rax movl (%rax), %esi movq %r14, %rdi callq 0x7950 leaq 0x178ed(%rip), %rsi # 0x2297d movl $0x1, %edx movq %rax, %rdi callq 0x7600 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0b8 movq 0x18(%rsp), %rsi incq %rsi callq 0x7530 movq %rbx, %rdi callq 0xa746 addq $0x28, %rsp popq %rbx popq %r14 retq jmp 0xb0ca movq %rax, %r14 jmp 0xb0ed movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0ed movq 0x18(%rsp), %rsi incq %rsi callq 0x7530 movq %rbx, %rdi callq 0xa746 movq %r14, %rdi callq 0x7970 movq %rax, %rdi callq 0x1032b
_ZN5nglog15ErrnoLogMessageD2Ev: push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()' push rbx sub rsp, 28h mov rbx, rdi mov r14d, 7538h add r14, [rdi+8] lea rsi, aRunningDuratio+1Ah; ": " mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] lea rdi, [rsp+38h+var_30] call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int) mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, asc_2265D; " [" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aLogLineFormatI+16h; "]" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0B8 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0B8: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() add rsp, 28h pop rbx pop r14 retn jmp short $+2 loc_B0CA: mov r14, rax jmp short loc_B0ED mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0ED mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0ED: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this) { long long v1; // r14 long long v2; // r14 long long v3; // rax void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF v1 = *((_QWORD *)this + 1) + 30008LL; std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL); nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1)); v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]); std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL); v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1)); std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); nglog::LogMessage::~LogMessage(this); }
~ErrnoLogMessage: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R14D,0x7538 ADD R14,qword ptr [RDI + 0x8] LAB_0010b02e: LEA RSI,[0x122964] MOV EDX,0x2 MOV RDI,R14 CALL 0x00107600 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] LAB_0010b048: LEA RDI,[RSP + 0x8] CALL 0x0010b105 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0010b05c: MOV RDI,R14 CALL 0x00107600 MOV R14,RAX LEA RSI,[0x12265d] MOV EDX,0x2 MOV RDI,RAX CALL 0x00107600 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x00107950 LEA RSI,[0x12297d] MOV EDX,0x1 MOV RDI,RAX CALL 0x00107600 LAB_0010b09d: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010b0b8 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107530 LAB_0010b0b8: MOV RDI,RBX CALL 0x0010a746 ADD RSP,0x28 POP RBX POP R14 RET
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */ void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this) { long lVar1; ostream *poVar2; long *local_30; long local_28; long local_20 [2]; lVar1 = *(long *)(this + 8); /* try { // try from 0010b02e to 0010b041 has its CatchHandler @ 0010b0ca */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2); /* try { // try from 0010b048 to 0010b051 has its CatchHandler @ 0010b0c8 */ StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8)); /* try { // try from 0010b05c to 0010b09c has its CatchHandler @ 0010b0cf */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28); std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2); poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } LogMessage::~LogMessage((LogMessage *)this); return; }
15,562
Config::get_ints[abi:cxx11]()
cosmotop/src/cosmotop_plugin.cpp
unordered_map<string, int>& get_ints() { static unordered_map<string, int> result; result = plugin->call<unordered_map<string, int>>("Config::get_ints"); return result; }
O0
cpp
Config::get_ints[abi:cxx11](): subq $0x98, %rsp cmpb $0x0, 0x3e2e4a(%rip) # 0x40c3c8 jne 0x295c3 leaq 0x3e2e41(%rip), %rdi # 0x40c3c8 callq 0x164b0 cmpl $0x0, %eax je 0x295c3 leaq 0x3e2df8(%rip), %rdi # 0x40c390 callq 0x34a20 leaq 0xb48c(%rip), %rdi # 0x34a30 leaq 0x3e2de5(%rip), %rsi # 0x40c390 leaq 0x3e2346(%rip), %rdx # 0x40b8f8 callq 0x16d00 leaq 0x3e2e0a(%rip), %rdi # 0x40c3c8 callq 0x167b0 movq 0x3e2dbe(%rip), %rax # 0x40c388 movq %rax, (%rsp) leaq 0x1f(%rsp), %rdx movq %rdx, 0x78(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x90(%rsp) leaq 0x2f0d93(%rip), %rsi # 0x31a37f leaq 0x20(%rsp), %rdi callq 0x33160 jmp 0x295f8 movq (%rsp), %rsi leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x34a40 jmp 0x2960d leaq 0x3e2d7c(%rip), %rdi # 0x40c390 leaq 0x40(%rsp), %rsi callq 0x34ec0 leaq 0x40(%rsp), %rdi callq 0x34a30 leaq 0x20(%rsp), %rdi callq 0x332b0 leaq 0x1f(%rsp), %rax movq %rax, 0x80(%rsp) leaq 0x3e2d4a(%rip), %rax # 0x40c390 addq $0x98, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x10(%rsp) movl %eax, 0xc(%rsp) jmp 0x29676 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x10(%rsp) movl %eax, 0xc(%rsp) leaq 0x20(%rsp), %rdi callq 0x332b0 leaq 0x1f(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x10(%rsp), %rdi callq 0x16950 nopl (%rax)
_ZN6Config8get_intsB5cxx11Ev: sub rsp, 98h cmp cs:_ZGVZN6Config8get_intsB5cxx11EvE6resultB5cxx11, 0; `guard variable for'Config::get_ints(void)::result jnz short loc_295C3 lea rdi, _ZGVZN6Config8get_intsB5cxx11EvE6resultB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_295C3 lea rdi, _ZZN6Config8get_intsB5cxx11EvE6resultB5cxx11; Config::get_ints(void)::result call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEC2Ev; std::unordered_map<std::string,int>::unordered_map(void) lea rdi, _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev; lpfunc lea rsi, _ZZN6Config8get_intsB5cxx11EvE6resultB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6Config8get_intsB5cxx11EvE6resultB5cxx11; __guard * call ___cxa_guard_release loc_295C3: mov rax, cs:plugin mov qword ptr [rsp+98h+var_98], rax; int lea rdx, [rsp+98h+var_79] mov qword ptr [rsp+98h+var_20], rdx; int mov rax, qword ptr [rsp+98h+var_20] mov qword ptr [rsp+98h+var_8], rax; int lea rsi, aConfigGetInts; "Config::get_ints" lea rdi, [rsp+98h+var_79+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_295F8: mov rsi, qword ptr [rsp+98h+var_98] lea rdi, [rsp+98h+var_58]; int lea rdx, [rsp+98h+var_79+1] call _ZN7RPCPeer4callISt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS7_ESt8equal_toIS7_ESaISt4pairIKS7_iEEEJEEET_RSD_DpOT0_; RPCPeer::call<std::unordered_map<std::string,int>>(std::string const&) jmp short $+2 loc_2960D: lea rdi, _ZZN6Config8get_intsB5cxx11EvE6resultB5cxx11; Config::get_ints(void)::result lea rsi, [rsp+98h+var_58] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEaSEOSE_; std::unordered_map<std::string,int>::operator=(std::unordered_map<std::string,int>&&) lea rdi, [rsp+98h+var_58]; void * call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev; std::unordered_map<std::string,int>::~unordered_map() lea rdi, [rsp+98h+var_79+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rax, [rsp+98h+var_79] mov [rsp+98h+var_18], rax lea rax, _ZZN6Config8get_intsB5cxx11EvE6resultB5cxx11; Config::get_ints(void)::result add rsp, 98h retn mov rcx, rax mov eax, edx mov [rsp+arg_8], rcx mov [rsp+arg_4], eax jmp short loc_29676 mov rcx, rax mov eax, edx mov [rsp+arg_8], rcx mov [rsp+arg_4], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29676: lea rax, [rsp+arg_17] mov [rsp+arg_80], rax mov rdi, [rsp+arg_8] call __Unwind_Resume
void * Config::get_ints[abi:cxx11](long long a1, long long a2, long long a3, int a4, int a5, int a6) { int v7[2]; // [rsp+0h] [rbp-98h] char v8; // [rsp+1Fh] [rbp-79h] BYREF _BYTE v9[32]; // [rsp+20h] [rbp-78h] BYREF int v10[14]; // [rsp+40h] [rbp-58h] BYREF int v11[2]; // [rsp+78h] [rbp-20h] int v12[2]; // [rsp+90h] [rbp-8h] if ( !(_BYTE)`guard variable for'Config::get_ints[abi:cxx11](void)::result[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'Config::get_ints[abi:cxx11](void)::result[abi:cxx11]) ) { std::unordered_map<std::string,int>::unordered_map(&Config::get_ints[abi:cxx11](void)::result[abi:cxx11]); __cxa_atexit( std::unordered_map<std::string,int>::~unordered_map, &Config::get_ints[abi:cxx11](void)::result[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Config::get_ints[abi:cxx11](void)::result[abi:cxx11]); } *(_QWORD *)v7 = *(_QWORD *)&plugin; *(_QWORD *)v11 = &v8; *(_QWORD *)v12 = &v8; std::string::basic_string<std::allocator<char>>( (unsigned int)v9, (unsigned int)"Config::get_ints", (unsigned int)&v8, a4, a5, a6); RPCPeer::call<std::unordered_map<std::string,int>>(v10, *(_QWORD *)v7, v9); std::unordered_map<std::string,int>::operator=(&Config::get_ints[abi:cxx11](void)::result[abi:cxx11], v10); std::unordered_map<std::string,int>::~unordered_map(v10); std::string::~string(v9); return &Config::get_ints[abi:cxx11](void)::result[abi:cxx11]; }
get_ints[abi:cxx11]: SUB RSP,0x98 CMP byte ptr [0x0050c3c8],0x0 JNZ 0x001295c3 LEA RDI,[0x50c3c8] CALL 0x001164b0 CMP EAX,0x0 JZ 0x001295c3 LEA RDI,[0x50c390] CALL 0x00134a20 LEA RDI,[0x134a30] LEA RSI,[0x50c390] LEA RDX,[0x50b8f8] CALL 0x00116d00 LEA RDI,[0x50c3c8] CALL 0x001167b0 LAB_001295c3: MOV RAX,qword ptr [0x0050c388] MOV qword ptr [RSP],RAX LEA RDX,[RSP + 0x1f] MOV qword ptr [RSP + 0x78],RDX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x90],RAX LAB_001295e5: LEA RSI,[0x41a37f] LEA RDI,[RSP + 0x20] CALL 0x00133160 JMP 0x001295f8 LAB_001295f8: MOV RSI,qword ptr [RSP] LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x20] CALL 0x00134a40 LAB_0012960b: JMP 0x0012960d LAB_0012960d: LEA RDI,[0x50c390] LEA RSI,[RSP + 0x40] CALL 0x00134ec0 LEA RDI,[RSP + 0x40] CALL 0x00134a30 LEA RDI,[RSP + 0x20] CALL 0x001332b0 LEA RAX,[RSP + 0x1f] MOV qword ptr [RSP + 0x80],RAX LEA RAX,[0x50c390] ADD RSP,0x98 RET
/* Config::get_ints[abi:cxx11]() */ int1 * Config::get_ints_abi_cxx11_(void) { int iVar1; allocator local_79; string local_78 [32]; string local_58 [56]; allocator *local_20; allocator *local_8; if (get_ints[abi:cxx11]()::result_abi_cxx11_ == '\0') { iVar1 = __cxa_guard_acquire(&get_ints[abi:cxx11]()::result_abi_cxx11_); if (iVar1 != 0) { std:: unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> ::unordered_map((unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> *)get_ints[abi:cxx11]()::result_abi_cxx11_); __cxa_atexit(std:: unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> ::~unordered_map,get_ints[abi:cxx11]()::result_abi_cxx11_,&__dso_handle); __cxa_guard_release(&get_ints[abi:cxx11]()::result_abi_cxx11_); } } local_20 = &local_79; /* try { // try from 001295e5 to 001295f5 has its CatchHandler @ 0012964e */ local_8 = local_20; std::__cxx11::string::string<std::allocator<char>>(local_78,"Config::get_ints",local_20); /* try { // try from 001295f8 to 0012960a has its CatchHandler @ 0012965e */ RPCPeer:: call<std::unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>>> (local_58); std:: unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> ::operator=((unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> *)get_ints[abi:cxx11]()::result_abi_cxx11_,local_58); std:: unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> ::~unordered_map((unordered_map<std::__cxx11::string,int,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,int>>> *)local_58); std::__cxx11::string::~string(local_78); return get_ints[abi:cxx11]()::result_abi_cxx11_; }
15,563
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_object()
monkey531[P]llama/common/json.hpp
bool end_object() { if (ref_stack.back()) { if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) { // discard object *ref_stack.back() = discarded; } else { ref_stack.back()->set_parents(); } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) { // remove discarded value for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) { if (it->is_discarded()) { ref_stack.back()->erase(it); break; } } } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_object(): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rsi movq -0x8(%rsi), %rcx testq %rcx, %rcx je 0x41388 leaq 0x80(%rbx), %rdi subq 0x8(%rbx), %rsi shrq $0x3, %rsi decl %esi pushq $0x1 popq %rdx callq 0x419dc testb %al, %al jne 0x41388 leaq 0xa8(%rbx), %rsi leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x4228c movq 0x10(%rbx), %rax movq -0x8(%rax), %rdi movq %r14, %rsi callq 0x400ba movq %r14, %rdi callq 0x3d534 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x4145c movq 0x20(%rbx), %rcx cmpq 0x30(%rbx), %rcx jne 0x413aa cmpl $0x0, 0x38(%rbx) je 0x41478 leaq 0x30(%rbx), %rdi addq $-0x8, %rax movq %rax, 0x10(%rbx) callq 0x41014 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x41450 movq -0x8(%rax), %rsi testq %rsi, %rsi je 0x41450 movb (%rsi), %al decb %al cmpb $0x1, %al ja 0x41450 movq %rsp, %r14 movq %r14, %rdi callq 0x4232c leaq 0x20(%rsp), %r15 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq %r15, %rdi callq 0x4235c movq %r14, %rdi movq %r15, %rsi callq 0x42352 testb %al, %al je 0x41450 movq %r14, %rdi callq 0x42382 cmpb $0x9, (%rax) je 0x41420 movq %r14, %rdi callq 0x426a2 jmp 0x413ea movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq (%rsp), %rax leaq 0x50(%rsp), %rdx movq %rax, (%rdx) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rdx) movq 0x18(%rsp), %rax movq %rax, 0x18(%rdx) leaq 0x20(%rsp), %rdi callq 0x424b0 movb $0x1, %al addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x70783(%rip), %rdi # 0xb1be6 leaq 0x6acd6(%rip), %rdx # 0xac140 leaq 0x7176f(%rip), %rcx # 0xb2be0 movl $0x1bbd, %esi # imm = 0x1BBD jmp 0x41492 leaq 0x70767(%rip), %rdi # 0xb1be6 leaq 0x6acba(%rip), %rdx # 0xac140 leaq 0x716cd(%rip), %rcx # 0xb2b5a movl $0x1bbe, %esi # imm = 0x1BBE xorl %eax, %eax callq 0x24e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push r15 push r14 push rbx sub rsp, 70h mov rbx, rdi mov rsi, [rdi+10h] mov rcx, [rsi-8] test rcx, rcx jz short loc_41388 lea rdi, [rbx+80h] sub rsi, [rbx+8] shr rsi, 3 dec esi push 1 pop rdx call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &) test al, al jnz short loc_41388 lea rsi, [rbx+0A8h] lea r14, [rsp+88h+var_48] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rdi, [rax-8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_41388: mov rax, [rbx+10h] cmp [rbx+8], rax jz loc_4145C mov rcx, [rbx+20h] cmp rcx, [rbx+30h] jnz short loc_413AA cmp dword ptr [rbx+38h], 0 jz loc_41478 loc_413AA: lea rdi, [rbx+30h]; this add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+10h], rax call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void) mov rax, [rbx+10h] cmp [rbx+8], rax jz loc_41450 mov rsi, [rax-8] test rsi, rsi jz short loc_41450 mov al, [rsi] dec al cmp al, 1 ja short loc_41450 mov r14, rsp mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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) lea r15, [rsp+88h+var_68] loc_413EA: mov rax, [rbx+10h] mov rsi, [rax-8] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; 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 rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jz short loc_41450 mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void) cmp byte ptr [rax], 9 jz short loc_41420 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void) jmp short loc_413EA loc_41420: mov rax, [rbx+10h] mov rsi, [rax-8] mov rax, [rsp+88h+var_88] lea rdx, [rsp+88h+var_38] mov [rdx], rax movups xmm0, [rsp+88h+var_80] movups xmmword ptr [rdx+8], xmm0 mov rax, [rsp+88h+var_70] mov [rdx+18h], rax lea rdi, [rsp+88h+var_68] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ loc_41450: mov al, 1 add rsp, 70h pop rbx pop r14 pop r15 retn loc_4145C: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1BBDh jmp short loc_41492 loc_41478: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1BBEh loc_41492: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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_object( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, int a8, char a9) { long long v9; // rsi long long v10; // rcx long long v11; // rax long long v12; // rax _BYTE *v13; // rsi long long v14; // rsi int v16; // esi int v17; // edx int v18; // ecx int v19; // r8d int v20; // r9d long long v21; // [rsp+0h] [rbp-88h] BYREF __int128 v22; // [rsp+8h] [rbp-80h] long long v23; // [rsp+18h] [rbp-70h] _BYTE v24[32]; // [rsp+20h] [rbp-68h] BYREF _BYTE v25[16]; // [rsp+40h] [rbp-48h] BYREF long long v26; // [rsp+50h] [rbp-38h] __int128 v27; // [rsp+58h] [rbp-30h] long long v28; // [rsp+68h] [rbp-20h] v9 = *(_QWORD *)(a1 + 16); v10 = *(_QWORD *)(v9 - 8); if ( v10 && !(unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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()( a1 + 128, (unsigned int)((unsigned long long)(v9 - *(_QWORD *)(a1 + 8)) >> 3) - 1, 1LL, v10) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v25, a1 + 168); 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=( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL), (long long)v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v25); } v11 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v11 ) { v16 = 7101; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7101LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::key( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v16, v17, v18, v19, v20, a7, a8, a9); } if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) ) { v16 = 7102; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7102LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::key( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v16, v17, v18, v19, v20, a7, a8, a9); } *(_QWORD *)(a1 + 16) = v11 - 8; std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 48)); v12 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) != v12 ) { v13 = *(_BYTE **)(v12 - 8); if ( v13 ) { if ( (unsigned __int8)(*v13 - 1) <= 1u ) { 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(&v21); while ( 1 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( v24, *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL)); if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v21, v24) ) break; if ( *(_BYTE *)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>>::operator->(&v21) == 9 ) { v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v26 = v21; v27 = v22; v28 = v23; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( v24, v14); return 1; } 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>>::operator++(&v21); } } } } return 1; }
end_object: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RSI + -0x8] TEST RCX,RCX JZ 0x00141388 LEA RDI,[RBX + 0x80] SUB RSI,qword ptr [RBX + 0x8] SHR RSI,0x3 DEC ESI PUSH 0x1 POP RDX CALL 0x001419dc TEST AL,AL JNZ 0x00141388 LEA RSI,[RBX + 0xa8] LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x0014228c MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,R14 CALL 0x001400ba MOV RDI,R14 CALL 0x0013d534 LAB_00141388: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x0014145c MOV RCX,qword ptr [RBX + 0x20] CMP RCX,qword ptr [RBX + 0x30] JNZ 0x001413aa CMP dword ptr [RBX + 0x38],0x0 JZ 0x00141478 LAB_001413aa: LEA RDI,[RBX + 0x30] ADD RAX,-0x8 MOV qword ptr [RBX + 0x10],RAX CALL 0x00141014 MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x00141450 MOV RSI,qword ptr [RAX + -0x8] TEST RSI,RSI JZ 0x00141450 MOV AL,byte ptr [RSI] DEC AL CMP AL,0x1 JA 0x00141450 MOV R14,RSP MOV RDI,R14 CALL 0x0014232c LEA R15,[RSP + 0x20] LAB_001413ea: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RDI,R15 CALL 0x0014235c MOV RDI,R14 MOV RSI,R15 CALL 0x00142352 TEST AL,AL JZ 0x00141450 MOV RDI,R14 CALL 0x00142382 CMP byte ptr [RAX],0x9 JZ 0x00141420 MOV RDI,R14 CALL 0x001426a2 JMP 0x001413ea LAB_00141420: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RSP] LEA RDX,[RSP + 0x50] MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RDX + 0x8],XMM0 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RDX + 0x18],RAX LEA RDI,[RSP + 0x20] CALL 0x001424b0 LAB_00141450: MOV AL,0x1 ADD RSP,0x70 POP RBX POP R14 POP R15 RET LAB_0014145c: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b2be0] MOV ESI,0x1bbd JMP 0x00141492 LAB_00141478: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b2b5a] MOV ESI,0x1bbe LAB_00141492: XOR EAX,EAX CALL 0x00124e90
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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> >::end_object() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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>> ::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { char cVar1; char *pcVar2; int8 uVar3; int8 local_88; int4 local_80; int4 uStack_7c; int4 uStack_78; int4 uStack_74; int8 local_70; int1 local_68 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_48 [16]; int8 local_38; int4 local_30; int4 uStack_2c; int4 uStack_28; int4 uStack_24; int8 local_20; if ((*(long *)(*(long *)(this + 0x10) + -8) != 0) && (cVar1 = std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::operator()(this + 0x80, (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1,1) , cVar1 == '\0')) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_48,this + 0xa8); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(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> **)(*(long *)(this + 0x10) + -8),local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_48); } if (*(long *)(this + 8) == *(long *)(this + 0x10)) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1bbd; } else { if ((*(long *)(this + 0x20) != *(long *)(this + 0x30)) || (*(int *)(this + 0x38) != 0)) { *(long *)(this + 0x10) = *(long *)(this + 0x10) + -8; std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x30)); if ((*(long *)(this + 8) != *(long *)(this + 0x10)) && ((pcVar2 = *(char **)(*(long *)(this + 0x10) + -8), pcVar2 != (char *)0x0 && ((byte)(*pcVar2 - 1U) < 2)))) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::begin(); while( true ) { 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> ::end(); cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (&local_88,local_68); if (cVar1 == '\0') break; pcVar2 = (char *)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>> ::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_88); if (*pcVar2 == '\t') { local_38 = local_88; local_30 = local_80; uStack_2c = uStack_7c; uStack_28 = uStack_78; uStack_24 = uStack_74; local_20 = local_70; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (local_68,*(int8 *)(*(long *)(this + 0x10) + -8)); return 1; } 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>> ::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_88); } } return 1; } pcVar2 = "!keep_stack.empty()"; uVar3 = 0x1bbe; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
15,564
testing::internal::StreamingListener::StreamingListener(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&)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
StreamingListener(const std::string& host, const std::string& port) : socket_writer_(new SocketWriter(host, port)) { Start(); }
O3
c
testing::internal::StreamingListener::StreamingListener(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx leaq 0x3d030(%rip), %rax # 0xb3928 addq $0x10, %rax movq %rax, (%rdi) movl $0x50, %edi callq 0x11190 movq %rax, %r15 movq %rax, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x7970a movq %r15, 0x8(%rbx) movq %rbx, %rdi callq 0x797c0 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x76944 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rbx) jmp 0x7695e movq %rax, %r14 movl $0x50, %esi movq %r15, %rdi callq 0x11120 movq %r14, %rdi callq 0x11760
_ZN7testing8internal17StreamingListenerC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r12, rsi mov rbx, rdi lea rax, _ZTVN7testing8internal17StreamingListenerE; `vtable for'testing::internal::StreamingListener add rax, 10h mov [rdi], rax mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r12 mov rdx, r14 call _ZN7testing8internal17StreamingListener12SocketWriterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_; testing::internal::StreamingListener::SocketWriter::SocketWriter(std::string const&,std::string const&) mov [rbx+8], r15 mov rdi, rbx; this call _ZN7testing8internal17StreamingListener5StartEv; testing::internal::StreamingListener::Start(void) add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx+8] test rdi, rdi jz short loc_76944 mov rax, [rdi] call qword ptr [rax+8] loc_76944: mov qword ptr [rbx+8], 0 jmp short loc_7695E mov r14, rax mov esi, 50h ; 'P'; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_7695E: mov rdi, r14 call __Unwind_Resume
long long testing::internal::StreamingListener::StreamingListener(testing::internal::StreamingListener *this) { testing::internal::StreamingListener::SocketWriter *v1; // r15 *(_QWORD *)this = &`vtable for'testing::internal::StreamingListener + 2; v1 = (testing::internal::StreamingListener::SocketWriter *)operator new(0x50uLL); testing::internal::StreamingListener::SocketWriter::SocketWriter(v1); *((_QWORD *)this + 1) = v1; return testing::internal::StreamingListener::Start(this); }
StreamingListener: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R12,RSI MOV RBX,RDI LEA RAX,[0x1b3928] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV EDI,0x50 CALL 0x00111190 MOV R15,RAX LAB_0017690c: MOV RDI,RAX MOV RSI,R12 MOV RDX,R14 CALL 0x0017970a MOV qword ptr [RBX + 0x8],R15 LAB_0017691e: MOV RDI,RBX CALL 0x001797c0 LAB_00176926: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::StreamingListener::StreamingListener(std::__cxx11::string const&, std::__cxx11::string const&) */ void __thiscall testing::internal::StreamingListener::StreamingListener (StreamingListener *this,string *param_1,string *param_2) { SocketWriter *this_00; *(int ***)this = &PTR__StreamingListener_001b3938; this_00 = (SocketWriter *)operator_new(0x50); /* try { // try from 0017690c to 00176919 has its CatchHandler @ 0017694e */ SocketWriter::SocketWriter(this_00,param_1,param_2); *(SocketWriter **)(this + 8) = this_00; /* try { // try from 0017691e to 00176925 has its CatchHandler @ 00176932 */ Start(this); return; }
15,565
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 0x414b2 pushq %rbp movq %rsp, %rbp movq (%rdx), %rax movq 0xd8(%rax), %r10 cmpq %r9, %r10 jae 0x4153b movq %r10, 0x610(%rax) movq %r10, 0x3e8(%rdx) movq 0x18(%r8), %r9 movq %r9, 0xd8(%rax) jmp 0x4154f cmpq 0x610(%rax), %r9 jbe 0x4154f movq $-0x1, 0x610(%rax) popq %rbp jmp 0x414b2
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_4153B mov [rax+610h], r10 mov [rdx+3E8h], r10 mov r9, [r8+18h] mov [rax+0D8h], r9 jmp short loc_4154F loc_4153B: cmp r9, [rax+610h] jbe short loc_4154F mov qword ptr [rax+610h], 0FFFFFFFFFFFFFFFFh loc_4154F: 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 0x001414b2 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX] MOV R10,qword ptr [RAX + 0xd8] CMP R10,R9 JNC 0x0014153b 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 0x0014154f LAB_0014153b: CMP R9,qword ptr [RAX + 0x610] JBE 0x0014154f MOV qword ptr [RAX + 0x610],-0x1 LAB_0014154f: POP RBP JMP 0x001414b2
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; }
15,566
sp_get_geometry_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims, double *mbr, int top) { int res; uchar byte_order; uint wkb_type; byte_order = *(*wkb); ++(*wkb); wkb_type = uint4korr((*wkb)); (*wkb) += 4; switch ((enum wkbType) wkb_type) { case wkbPoint: res = sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbLineString: res = sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbPolygon: res = sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbMultiPoint: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiLineString: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiPolygon: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbGeometryCollection: { uint n_items; if (!top) return -1; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { if (sp_get_geometry_mbr(wkb, end, n_dims, mbr, 0)) return -1; } res = 0; break; } default: res = -1; } return res; }
O0
c
sp_get_geometry_mbr: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx incq %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movl -0x38(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x6, %eax ja 0xdb5b7 movq -0x50(%rbp), %rax leaq 0x8a7cf(%rip), %rcx # 0x165b0c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb5d0 movl %eax, -0x30(%rbp) jmp 0xdb5be movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb610 movl %eax, -0x30(%rbp) jmp 0xdb5be movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb6a0 movl %eax, -0x30(%rbp) jmp 0xdb5be movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x3c(%rbp) jbe 0xdb42c movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb5d0 cmpl $0x0, %eax je 0xdb41f movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xdb5c4 jmp 0xdb421 movl -0x3c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x3c(%rbp) jmp 0xdb3c6 movl $0x0, -0x30(%rbp) jmp 0xdb5be movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x40(%rbp) jbe 0xdb4b8 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb610 cmpl $0x0, %eax je 0xdb4ab movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xdb5c4 jmp 0xdb4ad movl -0x40(%rbp), %eax addl $-0x1, %eax movl %eax, -0x40(%rbp) jmp 0xdb452 movl $0x0, -0x30(%rbp) jmp 0xdb5be movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x44(%rbp) jbe 0xdb544 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xdb6a0 cmpl $0x0, %eax je 0xdb537 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xdb5c4 jmp 0xdb539 movl -0x44(%rbp), %eax addl $-0x1, %eax movl %eax, -0x44(%rbp) jmp 0xdb4de movl $0x0, -0x30(%rbp) jmp 0xdb5be cmpl $0x0, -0x2c(%rbp) jne 0xdb55c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xdb5c4 movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x48(%rbp) jbe 0xdb5ae movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movq -0x28(%rbp), %rcx xorl %r8d, %r8d callq 0xdb2d0 cmpl $0x0, %eax je 0xdb5a1 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xdb5c4 jmp 0xdb5a3 movl -0x48(%rbp), %eax addl $-0x1, %eax movl %eax, -0x48(%rbp) jmp 0xdb576 movl $0x0, -0x30(%rbp) jmp 0xdb5be movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
sp_get_geometry_mbr_0: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] inc rcx mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov eax, [rbp+var_38] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 6 ja def_DB344; jumptable 00000000000DB344 default case mov rax, [rbp+var_50] lea rcx, jpt_DB344 movsxd rax, ds:(jpt_DB344 - 165B0Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_DB346: mov rdi, [rbp+var_10]; jumptable 00000000000DB344 case 1 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr_0 mov [rbp+var_30], eax jmp loc_DB5BE loc_DB368: mov rdi, [rbp+var_10]; jumptable 00000000000DB344 case 2 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr_0 mov [rbp+var_30], eax jmp loc_DB5BE loc_DB38A: mov rdi, [rbp+var_10]; jumptable 00000000000DB344 case 3 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr_0 mov [rbp+var_30], eax jmp loc_DB5BE loc_DB3AC: mov rax, [rbp+var_10]; jumptable 00000000000DB344 case 4 mov rax, [rax] mov eax, [rax] mov [rbp+var_3C], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_DB3C6: cmp [rbp+var_3C], 0 jbe short loc_DB42C mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr_0 cmp eax, 0 jz short loc_DB41F mov [rbp+var_4], 0FFFFFFFFh jmp loc_DB5C4 loc_DB41F: jmp short $+2 loc_DB421: mov eax, [rbp+var_3C] add eax, 0FFFFFFFFh mov [rbp+var_3C], eax jmp short loc_DB3C6 loc_DB42C: mov [rbp+var_30], 0 jmp loc_DB5BE loc_DB438: mov rax, [rbp+var_10]; jumptable 00000000000DB344 case 5 mov rax, [rax] mov eax, [rax] mov [rbp+var_40], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_DB452: cmp [rbp+var_40], 0 jbe short loc_DB4B8 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr_0 cmp eax, 0 jz short loc_DB4AB mov [rbp+var_4], 0FFFFFFFFh jmp loc_DB5C4 loc_DB4AB: jmp short $+2 loc_DB4AD: mov eax, [rbp+var_40] add eax, 0FFFFFFFFh mov [rbp+var_40], eax jmp short loc_DB452 loc_DB4B8: mov [rbp+var_30], 0 jmp loc_DB5BE loc_DB4C4: mov rax, [rbp+var_10]; jumptable 00000000000DB344 case 6 mov rax, [rax] mov eax, [rax] mov [rbp+var_44], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_DB4DE: cmp [rbp+var_44], 0 jbe short loc_DB544 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr_0 cmp eax, 0 jz short loc_DB537 mov [rbp+var_4], 0FFFFFFFFh jmp loc_DB5C4 loc_DB537: jmp short $+2 loc_DB539: mov eax, [rbp+var_44] add eax, 0FFFFFFFFh mov [rbp+var_44], eax jmp short loc_DB4DE loc_DB544: mov [rbp+var_30], 0 jmp short loc_DB5BE loc_DB54D: cmp [rbp+var_2C], 0; jumptable 00000000000DB344 case 7 jnz short loc_DB55C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_DB5C4 loc_DB55C: mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_48], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_DB576: cmp [rbp+var_48], 0 jbe short loc_DB5AE mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov rcx, [rbp+var_28] xor r8d, r8d call sp_get_geometry_mbr_0 cmp eax, 0 jz short loc_DB5A1 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_DB5C4 loc_DB5A1: jmp short $+2 loc_DB5A3: mov eax, [rbp+var_48] add eax, 0FFFFFFFFh mov [rbp+var_48], eax jmp short loc_DB576 loc_DB5AE: mov [rbp+var_30], 0 jmp short loc_DB5BE def_DB344: mov [rbp+var_30], 0FFFFFFFFh; jumptable 00000000000DB344 default case loc_DB5BE: mov eax, [rbp+var_30] mov [rbp+var_4], eax loc_DB5C4: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long sp_get_geometry_mbr_0(unsigned __int8 **a1, long long a2, unsigned int a3, long long a4, int a5) { int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] int v8; // [rsp+10h] [rbp-40h] int v9; // [rsp+14h] [rbp-3Ch] int v10; // [rsp+18h] [rbp-38h] unsigned __int8 v11; // [rsp+1Fh] [rbp-31h] unsigned __int8 v12; // [rsp+1Fh] [rbp-31h] unsigned __int8 v13; // [rsp+1Fh] [rbp-31h] unsigned __int8 v14; // [rsp+1Fh] [rbp-31h] v11 = *(*a1)++; v10 = *(_DWORD *)*a1; *a1 += 4; switch ( v10 ) { case 1: return (unsigned int)sp_get_point_mbr_0(a1, a2, a3, v11, a4); case 2: return (unsigned int)sp_get_linestring_mbr_0(a1, a2, a3, v11, a4); case 3: return (unsigned int)sp_get_polygon_mbr_0(a1, a2, a3, v11, a4); case 4: v9 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v9 ) return 0; v12 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_point_mbr_0(a1, a2, a3, v12, a4) ) { --v9; continue; } return (unsigned int)-1; } case 5: v8 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v8 ) return 0; v13 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_linestring_mbr_0(a1, a2, a3, v13, a4) ) { --v8; continue; } return (unsigned int)-1; } case 6: v7 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v7 ) return 0; v14 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_polygon_mbr_0(a1, a2, a3, v14, a4) ) { --v7; continue; } break; } return (unsigned int)-1; case 7: if ( !a5 ) return (unsigned int)-1; v6 = *(_DWORD *)*a1; *a1 += 4; break; default: return (unsigned int)-1; } while ( v6 ) { if ( (unsigned int)sp_get_geometry_mbr_0(a1, a2, a3, a4, 0LL) ) return (unsigned int)-1; --v6; } return 0; }
sp_get_geometry_mbr: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 dword ptr [RBP + -0x2c],R8D MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] INC RCX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x38] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x6 JA 0x001db5b7 MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x265b0c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db5d0 MOV dword ptr [RBP + -0x30],EAX JMP 0x001db5be caseD_2: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db610 MOV dword ptr [RBP + -0x30],EAX JMP 0x001db5be caseD_3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db6a0 MOV dword ptr [RBP + -0x30],EAX JMP 0x001db5be caseD_4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001db3c6: CMP dword ptr [RBP + -0x3c],0x0 JBE 0x001db42c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db5d0 CMP EAX,0x0 JZ 0x001db41f MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001db5c4 LAB_001db41f: JMP 0x001db421 LAB_001db421: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x001db3c6 LAB_001db42c: MOV dword ptr [RBP + -0x30],0x0 JMP 0x001db5be caseD_5: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001db452: CMP dword ptr [RBP + -0x40],0x0 JBE 0x001db4b8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db610 CMP EAX,0x0 JZ 0x001db4ab MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001db5c4 LAB_001db4ab: JMP 0x001db4ad LAB_001db4ad: MOV EAX,dword ptr [RBP + -0x40] ADD EAX,-0x1 MOV dword ptr [RBP + -0x40],EAX JMP 0x001db452 LAB_001db4b8: MOV dword ptr [RBP + -0x30],0x0 JMP 0x001db5be caseD_6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001db4de: CMP dword ptr [RBP + -0x44],0x0 JBE 0x001db544 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001db6a0 CMP EAX,0x0 JZ 0x001db537 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001db5c4 LAB_001db537: JMP 0x001db539 LAB_001db539: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,-0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x001db4de LAB_001db544: MOV dword ptr [RBP + -0x30],0x0 JMP 0x001db5be caseD_7: CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x001db55c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001db5c4 LAB_001db55c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001db576: CMP dword ptr [RBP + -0x48],0x0 JBE 0x001db5ae MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x28] XOR R8D,R8D CALL 0x001db2d0 CMP EAX,0x0 JZ 0x001db5a1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001db5c4 LAB_001db5a1: JMP 0x001db5a3 LAB_001db5a3: MOV EAX,dword ptr [RBP + -0x48] ADD EAX,-0x1 MOV dword ptr [RBP + -0x48],EAX JMP 0x001db576 LAB_001db5ae: MOV dword ptr [RBP + -0x30],0x0 JMP 0x001db5be default: MOV dword ptr [RBP + -0x30],0xffffffff LAB_001db5be: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX LAB_001db5c4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 sp_get_geometry_mbr(long *param_1,int8 param_2,int4 param_3,int8 param_4, int param_5) { int1 uVar1; int4 uVar2; int iVar3; int local_50; int local_4c; int local_48; int local_44; int4 local_38; uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; uVar2 = *(int4 *)*param_1; *param_1 = *param_1 + 4; switch(uVar2) { case 1: local_38 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 2: local_38 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 3: local_38 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 4: local_44 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_44 != 0; local_44 = local_44 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 5: local_48 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_48 != 0; local_48 = local_48 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 6: local_4c = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_4c != 0; local_4c = local_4c + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 7: if (param_5 == 0) { return 0xffffffff; } local_50 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_50 != 0; local_50 = local_50 + -1) { iVar3 = sp_get_geometry_mbr(param_1,param_2,param_3,param_4,0); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; default: local_38 = 0xffffffff; } return local_38; }
15,567
psi_rwlock_tryrdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_TRYREADLOCK, file, line); int result= rw_tryrdlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O3
c
psi_rwlock_tryrdlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x360aa8(%rip), %r15 # 0x390b18 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x2 popq %rdx callq *0x1a0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xab7a2 movl %eax, %r14d testq %rbx, %rbx je 0x300a9 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1a8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_tryrdlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+90h] lea rdi, [rbp+var_48] push 2 pop rdx call qword ptr [rax+1A0h] mov rbx, rax mov rdi, r14 call my_rw_tryrdlock mov r14d, eax test rbx, rbx jz short loc_300A9 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1A8h] loc_300A9: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_tryrdlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[52])( v6, *(_QWORD *)(a1 + 144), 2LL, a2, a3); v4 = my_rw_tryrdlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4); return v4; }
psi_rwlock_tryrdlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x490b18] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x2 POP RDX CALL qword ptr [RAX + 0x1a0] MOV RBX,RAX MOV RDI,R14 CALL 0x001ab7a2 MOV R14D,EAX TEST RBX,RBX JZ 0x001300a9 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1a8] LAB_001300a9: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_tryrdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x90),2,param_2,param_3); uVar1 = my_rw_tryrdlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
15,568
check_mb_utf8mb3_sequence
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf8mb3_sequence(const char *start, const char *end) { uchar c; if (start >= end) { return 0; } c = (uchar) start[0]; if (c < 0x80) { return 1; /* single byte character */ } if (c < 0xC2) { return 0; /* invalid mb character */ } if (c < 0xE0) { if (start + 2 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40)) { return 0; } return 2; } if (c < 0xF0) { if (start + 3 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 && (c >= 0xE1 || (uchar)start[1] >= 0xA0))) { return 0; /* invalid utf8 character */ } return 3; } return 0; }
O0
c
check_mb_utf8mb3_sequence: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0x46892 movl $0x0, -0x4(%rbp) jmp 0x4698e movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x80, %eax jge 0x468b2 movl $0x1, -0x4(%rbp) jmp 0x4698e movzbl -0x19(%rbp), %eax cmpl $0xc2, %eax jge 0x468c9 movl $0x0, -0x4(%rbp) jmp 0x4698e movzbl -0x19(%rbp), %eax cmpl $0xe0, %eax jge 0x46915 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0x468ee movl $0x0, -0x4(%rbp) jmp 0x4698e movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x4690c movl $0x0, -0x4(%rbp) jmp 0x4698e movl $0x2, -0x4(%rbp) jmp 0x4698e movzbl -0x19(%rbp), %eax cmpl $0xf0, %eax jge 0x46987 movq -0x10(%rbp), %rax addq $0x3, %rax cmpq -0x18(%rbp), %rax jbe 0x46937 movl $0x0, -0x4(%rbp) jmp 0x4698e movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x46975 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x46975 movzbl -0x19(%rbp), %eax cmpl $0xe1, %eax jge 0x4697e movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x4697e movl $0x0, -0x4(%rbp) jmp 0x4698e movl $0x3, -0x4(%rbp) jmp 0x4698e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
check_mb_utf8mb3_sequence: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_46892 mov [rbp+var_4], 0 jmp loc_4698E loc_46892: mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 80h jge short loc_468B2 mov [rbp+var_4], 1 jmp loc_4698E loc_468B2: movzx eax, [rbp+var_19] cmp eax, 0C2h jge short loc_468C9 mov [rbp+var_4], 0 jmp loc_4698E loc_468C9: movzx eax, [rbp+var_19] cmp eax, 0E0h jge short loc_46915 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_468EE mov [rbp+var_4], 0 jmp loc_4698E loc_468EE: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_4690C mov [rbp+var_4], 0 jmp loc_4698E loc_4690C: mov [rbp+var_4], 2 jmp short loc_4698E loc_46915: movzx eax, [rbp+var_19] cmp eax, 0F0h jge short loc_46987 mov rax, [rbp+var_10] add rax, 3 cmp rax, [rbp+var_18] jbe short loc_46937 mov [rbp+var_4], 0 jmp short loc_4698E loc_46937: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_46975 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_46975 movzx eax, [rbp+var_19] cmp eax, 0E1h jge short loc_4697E mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_4697E loc_46975: mov [rbp+var_4], 0 jmp short loc_4698E loc_4697E: mov [rbp+var_4], 3 jmp short loc_4698E loc_46987: mov [rbp+var_4], 0 loc_4698E: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_utf8mb3_sequence(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v3; // [rsp+1h] [rbp-19h] if ( (unsigned long long)a1 < a2 ) { v3 = *a1; if ( *a1 >= 0x80u ) { if ( v3 >= 0xC2u ) { if ( v3 >= 0xE0u ) { if ( v3 >= 0xF0u ) { return 0; } else if ( (unsigned long long)(a1 + 3) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) ) return 3; else return 0; } else { return 0; } } else if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 ) return 2; else return 0; } else { return 0; } } else { return 0; } } else { return 1; } } else { return 0; } }
check_mb_utf8mb3_sequence: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x00146892 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_00146892: MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x80 JGE 0x001468b2 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014698e LAB_001468b2: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xc2 JGE 0x001468c9 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_001468c9: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe0 JGE 0x00146915 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001468ee MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_001468ee: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0014690c MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_0014690c: MOV dword ptr [RBP + -0x4],0x2 JMP 0x0014698e LAB_00146915: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf0 JGE 0x00146987 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x18] JBE 0x00146937 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_00146937: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00146975 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00146975 MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe1 JGE 0x0014697e MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x0014697e LAB_00146975: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014698e LAB_0014697e: MOV dword ptr [RBP + -0x4],0x3 JMP 0x0014698e LAB_00146987: MOV dword ptr [RBP + -0x4],0x0 LAB_0014698e: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_utf8mb3_sequence(byte *param_1,byte *param_2) { byte bVar1; int4 local_c; if (param_1 < param_2) { bVar1 = *param_1; if (bVar1 < 0x80) { local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_2 < param_1 + 2) { local_c = 0; } else if ((param_1[1] ^ 0x80) < 0x40) { local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_2 < param_1 + 3) { local_c = 0; } else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_1[1])))) { local_c = 3; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0; } return local_c; }
15,569
get_record_position
eloqsql/storage/maria/ma_blockrec.c
static uchar *get_record_position(MARIA_SHARE *share, uchar *buff, uint record_number, uchar **end_of_data) { uint block_size= share->block_size; uint number_of_records= (uint) buff[DIR_COUNT_OFFSET]; uchar *dir; uchar *data; uint offset, length; #ifdef SANITY_CHECKS if (record_number >= number_of_records || record_number > ((block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE)) { DBUG_PRINT("error", ("Wrong row number: record_number: %u number_of_records: %u", record_number, number_of_records)); return 0; } #endif dir= dir_entry_pos(buff, block_size, record_number); offset= uint2korr(dir); length= uint2korr(dir + 2); #ifdef SANITY_CHECKS if (offset < PAGE_HEADER_SIZE(share) || offset + length > (block_size - number_of_records * DIR_ENTRY_SIZE - PAGE_SUFFIX_SIZE)) { DBUG_PRINT("error", ("Wrong row position: record_number: %u offset: %u " "length: %u number_of_records: %u", record_number, offset, length, number_of_records)); return 0; } #endif data= buff + offset; *end_of_data= data + length; return data; }
O3
c
get_record_position: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movzbl 0x8(%rsi), %esi cmpl %edx, %esi jbe 0x4d967 movl 0x7bc(%rdi), %r8d movl 0xc18(%rdi), %edi movl %r8d, %r9d subl %edi, %r9d addl $-0x10, %r9d shrl $0x2, %r9d cmpl %edx, %r9d jb 0x4d967 addl $0xc, %edi leaq (%rax,%r8), %r9 shll $0x2, %edx subq %rdx, %r9 movzwl -0x8(%r9), %edx cmpl %edx, %edi ja 0x4d967 movzwl -0x6(%r9), %edi leal (%rdi,%rdx), %r9d shll $0x2, %esi subl %esi, %r8d addl $-0x4, %r8d cmpl %r8d, %r9d jbe 0x4d96b xorl %eax, %eax popq %rbp retq movl %edx, %edx addq %rdx, %rax movl %edi, %edx addq %rax, %rdx movq %rdx, (%rcx) jmp 0x4d969
get_record_position: push rbp mov rbp, rsp mov rax, rsi movzx esi, byte ptr [rsi+8] cmp esi, edx jbe short loc_4D967 mov r8d, [rdi+7BCh] mov edi, [rdi+0C18h] mov r9d, r8d sub r9d, edi add r9d, 0FFFFFFF0h shr r9d, 2 cmp r9d, edx jb short loc_4D967 add edi, 0Ch lea r9, [rax+r8] shl edx, 2 sub r9, rdx movzx edx, word ptr [r9-8] cmp edi, edx ja short loc_4D967 movzx edi, word ptr [r9-6] lea r9d, [rdi+rdx] shl esi, 2 sub r8d, esi add r8d, 0FFFFFFFCh cmp r9d, r8d jbe short loc_4D96B loc_4D967: xor eax, eax loc_4D969: pop rbp retn loc_4D96B: mov edx, edx add rax, rdx mov edx, edi add rdx, rax mov [rcx], rdx jmp short loc_4D969
long long get_record_position(long long a1, long long a2, unsigned int a3, _QWORD *a4) { unsigned int v5; // esi long long v6; // r8 int v7; // edi long long v8; // r9 unsigned int v9; // edx long long result; // rax v5 = *(unsigned __int8 *)(a2 + 8); if ( v5 <= a3 ) return 0LL; v6 = *(unsigned int *)(a1 + 1980); v7 = *(_DWORD *)(a1 + 3096); if ( (unsigned int)(v6 - v7 - 16) >> 2 < a3 ) return 0LL; v8 = a2 + v6 - 4 * a3; v9 = *(unsigned __int16 *)(v8 - 8); if ( v7 + 12 > v9 || *(unsigned __int16 *)(v8 - 6) + v9 > (unsigned int)v6 - 4 * v5 - 4 ) return 0LL; result = *(unsigned __int16 *)(v8 - 8) + a2; *a4 = result + *(unsigned __int16 *)(v8 - 6); return result; }
get_record_position: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOVZX ESI,byte ptr [RSI + 0x8] CMP ESI,EDX JBE 0x0014d967 MOV R8D,dword ptr [RDI + 0x7bc] MOV EDI,dword ptr [RDI + 0xc18] MOV R9D,R8D SUB R9D,EDI ADD R9D,-0x10 SHR R9D,0x2 CMP R9D,EDX JC 0x0014d967 ADD EDI,0xc LEA R9,[RAX + R8*0x1] SHL EDX,0x2 SUB R9,RDX MOVZX EDX,word ptr [R9 + -0x8] CMP EDI,EDX JA 0x0014d967 MOVZX EDI,word ptr [R9 + -0x6] LEA R9D,[RDI + RDX*0x1] SHL ESI,0x2 SUB R8D,ESI ADD R8D,-0x4 CMP R9D,R8D JBE 0x0014d96b LAB_0014d967: XOR EAX,EAX LAB_0014d969: POP RBP RET LAB_0014d96b: MOV EDX,EDX ADD RAX,RDX MOV EDX,EDI ADD RDX,RAX MOV qword ptr [RCX],RDX JMP 0x0014d969
long get_record_position(long param_1,long param_2,uint param_3,long *param_4) { ushort uVar1; ushort uVar2; uint uVar3; long lVar4; if (param_3 < *(byte *)(param_2 + 8)) { uVar3 = *(uint *)(param_1 + 0x7bc); if (param_3 <= (uVar3 - *(int *)(param_1 + 0xc18)) - 0x10 >> 2) { lVar4 = (param_2 + (ulong)uVar3) - (ulong)(param_3 << 2); uVar1 = *(ushort *)(lVar4 + -8); if ((*(int *)(param_1 + 0xc18) + 0xcU <= (uint)uVar1) && (uVar2 = *(ushort *)(lVar4 + -6), (uint)uVar2 + (uint)uVar1 <= (uVar3 + (uint)*(byte *)(param_2 + 8) * -4) - 4)) { *param_4 = (ulong)uVar2 + param_2 + (ulong)uVar1; return param_2 + (ulong)uVar1; } } } return 0; }
15,570
linenoiseEditStop
llama.cpp/examples/run/linenoise.cpp/linenoise.cpp
void linenoiseEditStop(struct linenoiseState *l) { if (!isatty(l->ifd)) return; disableRawMode(l->ifd); printf("\n"); }
O3
cpp
linenoiseEditStop: pushq %rbx movq %rdi, %rbx movl 0x10(%rdi), %edi callq 0x1dd20 testl %eax, %eax je 0x33486 cmpb $0x1, 0xd89ab(%rip) # 0x10be04 jne 0x3347b movl 0x10(%rbx), %edi leaq 0xd8963(%rip), %rdx # 0x10bdc8 movl $0x2, %esi callq 0x1d760 cmpl $-0x1, %eax je 0x3347b movb $0x0, 0xd8989(%rip) # 0x10be04 movl $0xa, %edi popq %rbx jmp 0x1e010 popq %rbx retq
linenoiseEditStop: push rbx mov rbx, rdi mov edi, [rdi+10h] call _isatty test eax, eax jz short loc_33486 cmp cs:_ZL7rawmode, 1; rawmode jnz short loc_3347B mov edi, [rbx+10h] lea rdx, _ZL12orig_termios; orig_termios mov esi, 2 call _tcsetattr cmp eax, 0FFFFFFFFh jz short loc_3347B mov cs:_ZL7rawmode, 0; rawmode loc_3347B: mov edi, 0Ah pop rbx jmp _putchar loc_33486: pop rbx retn
linenoiseEditStop: PUSH RBX MOV RBX,RDI MOV EDI,dword ptr [RDI + 0x10] CALL 0x0011dd20 TEST EAX,EAX JZ 0x00133486 CMP byte ptr [0x0020be04],0x1 JNZ 0x0013347b MOV EDI,dword ptr [RBX + 0x10] LEA RDX,[0x20bdc8] MOV ESI,0x2 CALL 0x0011d760 CMP EAX,-0x1 JZ 0x0013347b MOV byte ptr [0x0020be04],0x0 LAB_0013347b: MOV EDI,0xa POP RBX JMP 0x0011e010 LAB_00133486: POP RBX RET
void linenoiseEditStop(long param_1) { int iVar1; iVar1 = isatty(*(int *)(param_1 + 0x10)); if (iVar1 != 0) { if (rawmode == '\x01') { iVar1 = tcsetattr(*(int *)(param_1 + 0x10),2,(termios *)orig_termios); if (iVar1 != -1) { rawmode = '\0'; } } putchar(10); return; } return; }
15,571
my_thread_destroy_common_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_common_mutex(void) { mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_destroy(&THR_LOCK_net); mysql_mutex_destroy(&THR_LOCK_charset); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_destroy(&LOCK_localtime_r); #endif }
O0
c
my_thread_destroy_common_mutex: pushq %rbp movq %rsp, %rbp leaq 0x376b35(%rip), %rdi # 0x3f8bd0 callq 0x820f0 leaq 0x376b71(%rip), %rdi # 0x3f8c18 callq 0x820f0 leaq 0x376bad(%rip), %rdi # 0x3f8c60 callq 0x820f0 leaq 0x376be9(%rip), %rdi # 0x3f8ca8 callq 0x820f0 leaq 0x376c25(%rip), %rdi # 0x3f8cf0 callq 0x820f0 leaq 0x376c61(%rip), %rdi # 0x3f8d38 callq 0x820f0 leaq 0x376c9d(%rip), %rdi # 0x3f8d80 callq 0x820f0 popq %rbp retq nopw (%rax,%rax)
my_thread_destroy_common_mutex: push rbp mov rbp, rsp lea rdi, THR_LOCK_open call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_lock call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_myisam call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_heap call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_net call inline_mysql_mutex_destroy_2 lea rdi, THR_LOCK_charset call inline_mysql_mutex_destroy_2 pop rbp retn
long long my_thread_destroy_common_mutex() { inline_mysql_mutex_destroy_2(&THR_LOCK_open); inline_mysql_mutex_destroy_2(&THR_LOCK_lock); inline_mysql_mutex_destroy_2(&THR_LOCK_myisam); inline_mysql_mutex_destroy_2(&THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy_2(&THR_LOCK_heap); inline_mysql_mutex_destroy_2(&THR_LOCK_net); return inline_mysql_mutex_destroy_2(&THR_LOCK_charset); }
my_thread_destroy_common_mutex: PUSH RBP MOV RBP,RSP LEA RDI,[0x4f8bd0] CALL 0x001820f0 LEA RDI,[0x4f8c18] CALL 0x001820f0 LEA RDI,[0x4f8c60] CALL 0x001820f0 LEA RDI,[0x4f8ca8] CALL 0x001820f0 LEA RDI,[0x4f8cf0] CALL 0x001820f0 LEA RDI,[0x4f8d38] CALL 0x001820f0 LEA RDI,[0x4f8d80] CALL 0x001820f0 POP RBP RET
void my_thread_destroy_common_mutex(void) { inline_mysql_mutex_destroy(THR_LOCK_open); inline_mysql_mutex_destroy(THR_LOCK_lock); inline_mysql_mutex_destroy(THR_LOCK_myisam); inline_mysql_mutex_destroy(THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy(THR_LOCK_heap); inline_mysql_mutex_destroy(THR_LOCK_net); inline_mysql_mutex_destroy(THR_LOCK_charset); return; }
15,572
minja::Parser::parseDictionary()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseDictionary() { if (consumeToken("{").empty()) return nullptr; std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements; if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } auto parseKeyValuePair = [&]() { auto key = parseExpression(); if (!key) throw std::runtime_error("Expected key in dictionary"); if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary"); auto value = parseExpression(); if (!value) throw std::runtime_error("Expected value in dictionary"); elements.emplace_back(std::pair(std::move(key), std::move(value))); }; parseKeyValuePair(); while (it != end) { if (!consumeToken(",").empty()) { parseKeyValuePair(); } else if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } else { throw std::runtime_error("Expected comma or closing brace in dictionary"); } } throw std::runtime_error("Expected closing brace"); }
O2
cpp
minja::Parser::parseDictionary(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x4d9fb(%rip), %rsi # 0x8e8a5 leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %r15 movq %r15, %rdx callq 0x22a2a movq %rbx, 0x38(%rsp) leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x31022 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x20d98 leaq 0x10(%rsp), %rdi callq 0x20d98 xorps %xmm0, %xmm0 testq %rbx, %rbx je 0x40f74 movaps %xmm0, 0x60(%rsp) andq $0x0, 0x70(%rsp) leaq 0x55867(%rip), %rsi # 0x9676f leaq 0x10(%rsp), %rdi leaq 0x78(%rsp), %rdx callq 0x22a2a leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x31022 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x20d98 leaq 0x10(%rsp), %rdi callq 0x20d98 testq %rbx, %rbx je 0x40f81 leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x305c6 movq 0x38(%rsp), %rbx leaq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x4b53b jmp 0x4106c movq 0x38(%rsp), %rbx movups %xmm0, (%rbx) jmp 0x4109a leaq 0x78(%rsp), %rdi movq %r14, (%rdi) movq %r15, 0x8(%rdi) callq 0x4b55c leaq 0x10(%rsp), %r12 leaq 0x40(%rsp), %rbp pushq $0x1 popq %rbx leaq 0x78(%rsp), %r15 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x410af movq %r12, %rdi leaq 0x4ef2c(%rip), %rsi # 0x8fee8 leaq 0xf(%rsp), %rdx callq 0x22a2a movq %rbp, %rdi movq %r14, %rsi movq %r12, %rdx movl %ebx, %ecx callq 0x31022 movq 0x48(%rsp), %r13 movq %rbp, %rdi callq 0x20d98 movq %r12, %rdi callq 0x20d98 testq %r13, %r13 je 0x40ffa movq %r15, %rdi callq 0x4b55c jmp 0x40fa4 leaq 0x5576e(%rip), %rsi # 0x9676f leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x22a2a leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x31022 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x20d98 leaq 0x10(%rsp), %rdi callq 0x20d98 testq %rbx, %rbx je 0x410df leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x305c6 movq 0x38(%rsp), %rbx leaq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x4b53b leaq 0x18(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x304ca leaq 0x48(%rsp), %rdi callq 0x304ca leaq 0x60(%rsp), %rdi callq 0x4b736 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x20380 movq %rax, %r14 leaq 0x4ef5b(%rip), %rsi # 0x9001c movq %rax, %rdi callq 0x20270 movq 0x8ef20(%rip), %rsi # 0xcfff0 movq 0x8ee99(%rip), %rdx # 0xcff70 movq %r14, %rdi callq 0x20b30 pushq $0x10 popq %rdi callq 0x20380 movq %rax, %r14 leaq 0x4eefd(%rip), %rsi # 0x8ffee movq %rax, %rdi callq 0x20270 jmp 0x410c9 jmp 0x4112e jmp 0x41105 jmp 0x4113f jmp 0x41144 jmp 0x4113f movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x304ca jmp 0x41151 jmp 0x4113f jmp 0x41144 jmp 0x4113f movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x20d98 jmp 0x4115b movq %rax, %rbx jmp 0x4115b movq %rax, %rbx movq %r14, %rdi callq 0x20510 jmp 0x41151 jmp 0x4113f jmp 0x4113f movq %rax, %rbx jmp 0x41151 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x20d98 leaq 0x60(%rsp), %rdi callq 0x4b736 movq %rbx, %rdi callq 0x20bb0 nop
_ZN5minja6Parser15parseDictionaryEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov rbx, rdi lea rsi, asc_8E8A5; "{" lea rdi, [rsp+0B8h+var_A8] lea r15, [rsp+0B8h+var_58] mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov [rsp+0B8h+var_80], rbx lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() xorps xmm0, xmm0 test rbx, rbx jz short loc_40F74 movaps [rsp+0B8h+var_58], xmm0 and [rsp+0B8h+var_48], 0 lea rsi, aNT020+17h; "}" lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz short loc_40F81 lea rdi, [rsp+0B8h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov rbx, [rsp+0B8h+var_80] lea rdi, [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_58] call _ZSt11make_sharedIN5minja8DictExprEJNS0_8LocationESt6vectorISt4pairISt10shared_ptrINS0_10ExpressionEES7_ESaIS8_EEEES5_IT_EDpOT0_; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>(minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>> &&) jmp loc_4106C loc_40F74: mov rbx, [rsp+0B8h+var_80] movups xmmword ptr [rbx], xmm0 jmp loc_4109A loc_40F81: lea rdi, [rsp+0B8h+var_40] mov [rdi], r14 mov [rdi+8], r15 call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) lea r12, [rsp+0B8h+var_A8] lea rbp, [rsp+0B8h+var_78] push 1 pop rbx lea r15, [rsp+0B8h+var_40] loc_40FA4: mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_410AF mov rdi, r12 lea rsi, asc_8FEE8; "," lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbp mov rsi, r14 mov rdx, r12 mov ecx, ebx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov r13, [rsp+0B8h+var_70] mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r13, r13 jz short loc_40FFA mov rdi, r15 call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) jmp short loc_40FA4 loc_40FFA: lea rsi, aNT020+17h; "}" lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz loc_410DF lea rdi, [rsp+0B8h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov rbx, [rsp+0B8h+var_80] lea rdi, [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_58] call _ZSt11make_sharedIN5minja8DictExprEJNS0_8LocationESt6vectorISt4pairISt10shared_ptrINS0_10ExpressionEES7_ESaIS8_EEEES5_IT_EDpOT0_; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>(minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>> &&) loc_4106C: lea rdi, [rsp+0B8h+var_A0] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0B8h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0B8h+var_58] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_4109A: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_410AF: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_5; "Expected closing brace" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_410C9: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_410DF: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_410C9 jmp short loc_4112E jmp short loc_41105 jmp short loc_4113F jmp short loc_41144 jmp short loc_4113F loc_41105: mov rbx, rax lea rdi, [rsp+arg_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_41151 jmp short loc_4113F jmp short loc_41144 jmp short loc_4113F mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4115B mov rbx, rax jmp short loc_4115B loc_4112E: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_41151 jmp short loc_4113F jmp short $+2 loc_4113F: mov rbx, rax jmp short loc_41151 loc_41144: mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_41151: lea rdi, [rsp+arg_58] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_4115B: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, _QWORD *a2) { long long v2; // rbx long long v3; // rbx minja::Parser *v4; // rbx long long v5; // r13 long long v6; // rbx __int128 v7; // xmm0 std::runtime_error *exception; // r14 _OWORD v10[2]; // [rsp+10h] [rbp-A8h] BYREF minja::Parser *v11; // [rsp+38h] [rbp-80h] long long v12; // [rsp+40h] [rbp-78h] BYREF _QWORD v13[3]; // [rsp+48h] [rbp-70h] BYREF __int128 v14; // [rsp+60h] [rbp-58h] BYREF long long v15; // [rsp+70h] [rbp-48h] _QWORD *v16; // [rsp+78h] [rbp-40h] __int128 *v17; // [rsp+80h] [rbp-38h] std::string::basic_string<std::allocator<char>>(v10, (long long)"{"); v11 = this; minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v2 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( v2 ) { v14 = 0LL; v15 = 0LL; std::string::basic_string<std::allocator<char>>(v10, (long long)"}"); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v3 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( !v3 ) { v16 = a2; v17 = &v14; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); while ( a2[4] != a2[3] ) { std::string::basic_string<std::allocator<char>>(v10, (long long)","); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v5 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( !v5 ) { std::string::basic_string<std::allocator<char>>(v10, (long long)"}"); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v6 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( v6 ) goto LABEL_10; exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary"); LABEL_13: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected closing brace"); goto LABEL_13; } LABEL_10: minja::Parser::get_location((minja::Parser *)&v12, a2); v4 = v11; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>( v10, &v12, &v14); v7 = v10[0]; *((_QWORD *)&v10[0] + 1) = 0LL; *(_OWORD *)v4 = v7; *(_QWORD *)&v10[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v10 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v13); std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v14); } else { v4 = v11; *(_OWORD *)v11 = 0LL; } return v4; }
parseDictionary: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RSI MOV RBX,RDI LAB_00140ea3: LEA RSI,[0x18e8a5] LEA RDI,[RSP + 0x10] LEA R15,[RSP + 0x60] MOV RDX,R15 CALL 0x00122a2a LAB_00140ebc: MOV qword ptr [RSP + 0x38],RBX LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00131022 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00120d98 LEA RDI,[RSP + 0x10] CALL 0x00120d98 XORPS XMM0,XMM0 TEST RBX,RBX JZ 0x00140f74 MOVAPS xmmword ptr [RSP + 0x60],XMM0 AND qword ptr [RSP + 0x70],0x0 LAB_00140f01: LEA RSI,[0x19676f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x78] CALL 0x00122a2a LAB_00140f17: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00131022 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00120d98 LEA RDI,[RSP + 0x10] CALL 0x00120d98 TEST RBX,RBX JZ 0x00140f81 LAB_00140f49: LEA RDI,[RSP + 0x40] MOV RSI,R14 CALL 0x001305c6 MOV RBX,qword ptr [RSP + 0x38] LAB_00140f5b: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x40] LEA RDX,[RSP + 0x60] CALL 0x0014b53b JMP 0x0014106c LAB_00140f74: MOV RBX,qword ptr [RSP + 0x38] MOVUPS xmmword ptr [RBX],XMM0 JMP 0x0014109a LAB_00140f81: LEA RDI,[RSP + 0x78] MOV qword ptr [RDI],R14 MOV qword ptr [RDI + 0x8],R15 LAB_00140f8d: CALL 0x0014b55c LEA R12,[RSP + 0x10] LEA RBP,[RSP + 0x40] PUSH 0x1 POP RBX LEA R15,[RSP + 0x78] LAB_00140fa4: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x001410af LAB_00140fb2: MOV RDI,R12 LEA RSI,[0x18fee8] LEA RDX,[RSP + 0xf] CALL 0x00122a2a LAB_00140fc6: MOV RDI,RBP MOV RSI,R14 MOV RDX,R12 MOV ECX,EBX CALL 0x00131022 MOV R13,qword ptr [RSP + 0x48] MOV RDI,RBP CALL 0x00120d98 MOV RDI,R12 CALL 0x00120d98 TEST R13,R13 JZ 0x00140ffa LAB_00140ff0: MOV RDI,R15 CALL 0x0014b55c JMP 0x00140fa4 LAB_00140ffa: LEA RSI,[0x19676f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00122a2a LAB_00141010: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00131022 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00120d98 LEA RDI,[RSP + 0x10] CALL 0x00120d98 TEST RBX,RBX JZ 0x001410df LAB_00141046: LEA RDI,[RSP + 0x40] MOV RSI,R14 CALL 0x001305c6 MOV RBX,qword ptr [RSP + 0x38] LAB_00141058: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x40] LEA RDX,[RSP + 0x60] CALL 0x0014b53b LAB_0014106c: LEA RDI,[RSP + 0x18] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x001304ca LEA RDI,[RSP + 0x48] CALL 0x001304ca LEA RDI,[RSP + 0x60] CALL 0x0014b736 LAB_0014109a: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001410af: PUSH 0x10 POP RDI CALL 0x00120380 MOV R14,RAX LAB_001410ba: LEA RSI,[0x19001c] MOV RDI,RAX CALL 0x00120270 LAB_001410c9: MOV RSI,qword ptr [0x001cfff0] MOV RDX,qword ptr [0x001cff70] MOV RDI,R14 CALL 0x00120b30 LAB_001410df: PUSH 0x10 POP RDI CALL 0x00120380 MOV R14,RAX LAB_001410ea: LEA RSI,[0x18ffee] MOV RDI,RAX CALL 0x00120270 LAB_001410f9: JMP 0x001410c9
/* minja::Parser::parseDictionary() */ int8 * minja::Parser::parseDictionary(void) { int8 uVar1; long lVar2; runtime_error *this; long in_RSI; int8 *in_RDI; allocator local_a9; int8 local_a8; int8 auStack_a0 [4]; int8 *local_80; string local_78 [8]; long local_70 [3]; int8 local_58; int8 uStack_50; int8 local_48; allocator local_40 [8]; allocator *local_38; /* try { // try from 00140ea3 to 00140ebb has its CatchHandler @ 00141129 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"{",(allocator *)&local_58) ; /* try { // try from 00140ebc to 00140ed5 has its CatchHandler @ 0014111a */ local_80 = in_RDI; consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { *local_80 = 0; local_80[1] = 0; } else { local_58 = 0; uStack_50 = 0; local_48 = 0; /* try { // try from 00140f01 to 00140f16 has its CatchHandler @ 00141118 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"}",local_40); /* try { // try from 00140f17 to 00140f2b has its CatchHandler @ 00141116 */ consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { local_38 = (allocator *)&local_58; /* try { // try from 00140f8d to 00140f91 has its CatchHandler @ 0014113b */ parseDictionary()::{lambda()#1}::operator()((_lambda___1_ *)local_40); do { if (*(long *)(in_RSI + 0x20) == *(long *)(in_RSI + 0x18)) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001410ba to 001410c8 has its CatchHandler @ 0014112e */ std::runtime_error::runtime_error(this,"Expected closing brace"); LAB_001410c9: /* try { // try from 001410c9 to 001410de has its CatchHandler @ 0014113b */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001cfff0,PTR__runtime_error_001cff70); } /* try { // try from 00140fb2 to 00140fc5 has its CatchHandler @ 0014113f */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,",",&local_a9); /* try { // try from 00140fc6 to 00140fd5 has its CatchHandler @ 00141144 */ consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { /* try { // try from 00140ffa to 0014100f has its CatchHandler @ 00141103 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"}",&local_a9); /* try { // try from 00141010 to 00141024 has its CatchHandler @ 00141101 */ consumeToken(local_78); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (local_70[0] != 0) { /* try { // try from 00141046 to 00141052 has its CatchHandler @ 001410ff */ get_location(); /* try { // try from 00141058 to 0014106b has its CatchHandler @ 001410fd */ std:: make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>> ((Location *)&local_a8,(vector *)local_78); goto LAB_0014106c; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001410ea to 001410f8 has its CatchHandler @ 001410fb */ std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary"); goto LAB_001410c9; } /* try { // try from 00140ff0 to 00140ff7 has its CatchHandler @ 0014113d */ parseDictionary()::{lambda()#1}::operator()((_lambda___1_ *)local_40); } while( true ); } /* try { // try from 00140f49 to 00140f55 has its CatchHandler @ 00141114 */ get_location(); /* try { // try from 00140f5b to 00140f6e has its CatchHandler @ 00141105 */ std:: make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>> ((Location *)&local_a8,(vector *)local_78); LAB_0014106c: uVar1 = auStack_a0[0]; auStack_a0[0] = 0; *local_80 = local_a8; local_80[1] = uVar1; local_a8 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_a0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_70); std:: vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> ::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> *)&local_58); } return local_80; }
15,573
google::protobuf::compiler::cpp::EnumFieldGenerator::GeneratePrivateMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/enum_field.cc
void EnumFieldGenerator::GeneratePrivateMembers(io::Printer* printer) const { Formatter format(printer, variables_); format("int $name$_;\n"); }
O3
cpp
google::protobuf::compiler::cpp::EnumFieldGenerator::GeneratePrivateMembers(google::protobuf::io::Printer*) const: pushq %r14 pushq %rbx subq $0x38, %rsp leaq 0x18(%rdi), %rax leaq 0x8(%rsp), %rbx movq %rsi, -0x8(%rbx) movq %rbx, %rdi movq %rax, %rsi callq 0x7e61e leaq 0xf7f98(%rip), %rsi # 0x1ea462 movq %rsp, %rdi callq 0x39938 movq %rbx, %rdi callq 0x2e5e0 addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x2e5e0 movq %r14, %rdi callq 0x1f860 nop
_ZNK6google8protobuf8compiler3cpp18EnumFieldGenerator22GeneratePrivateMembersEPNS0_2io7PrinterE: push r14 push rbx sub rsp, 38h lea rax, [rdi+18h] lea rbx, [rsp+48h+var_40] mov [rbx-8], rsi mov rdi, rbx mov rsi, rax call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; 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(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>>> const&) lea rsi, aPrivateIntName_2+8; "int $name$_;\n" mov rdi, rsp call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 38h pop rbx pop r14 retn mov r14, rax mov rdi, rbx 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, r14 call __Unwind_Resume
long long google::protobuf::compiler::cpp::EnumFieldGenerator::GeneratePrivateMembers( google::protobuf::compiler::cpp::EnumFieldGenerator *this, google::protobuf::io::Printer *a2) { long long result; // rax google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF _BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF v3 = a2; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree( (long long)v4, (long long)this + 24); result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v3, "int $name$_;\n"); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4); return result; }
GeneratePrivateMembers: PUSH R14 PUSH RBX SUB RSP,0x38 LEA RAX,[RDI + 0x18] LEA RBX,[RSP + 0x8] MOV qword ptr [RBX + -0x8],RSI MOV RDI,RBX MOV RSI,RAX CALL 0x0017e61e LAB_001f24c3: LEA RSI,[0x2ea462] MOV RDI,RSP CALL 0x00139938 LAB_001f24d2: MOV RDI,RBX CALL 0x0012e5e0 ADD RSP,0x38 POP RBX POP R14 RET
/* google::protobuf::compiler::cpp::EnumFieldGenerator::GeneratePrivateMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::cpp::EnumFieldGenerator::GeneratePrivateMembers (EnumFieldGenerator *this,Printer *param_1) { Printer *local_48; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_40 [48]; local_48 = param_1; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18)); /* try { // try from 001f24c3 to 001f24d1 has its CatchHandler @ 001f24e2 */ Formatter::operator()<>((Formatter *)&local_48,"int $name$_;\n"); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_40); return; }
15,574
ma_apply_redo_insert_row_blobs
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, LSN lsn, const uchar *header, LSN redo_lsn, uint * const number_of_blobs, uint * const number_of_ranges, pgcache_page_no_t * const first_page, pgcache_page_no_t * const last_page) { MARIA_SHARE *share= info->s; const uchar *data; uint data_size= FULL_PAGE_SIZE(share); uint blob_count, ranges; uint16 sid; pgcache_page_no_t first_page2= ULONGLONG_MAX, last_page2= 0; DBUG_ENTER("_ma_apply_redo_insert_row_blobs"); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); sid= fileid_korr(header); header+= FILEID_STORE_SIZE; *number_of_ranges= ranges= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; *number_of_blobs= blob_count= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; DBUG_ASSERT(ranges >= blob_count); data= (header + ranges * ROW_EXTENT_SIZE + blob_count * (SUB_RANGE_SIZE + BLOCK_FILLER_SIZE)); while (blob_count--) { uint sub_ranges, empty_space; sub_ranges= uint2korr(header); header+= SUB_RANGE_SIZE; empty_space= uint2korr(header); header+= BLOCK_FILLER_SIZE; DBUG_ASSERT(sub_ranges <= ranges && empty_space < data_size); ranges-= sub_ranges; while (sub_ranges--) { uint i; uint res; uint page_range; pgcache_page_no_t page; uchar *buff; uint data_on_page= data_size; page= page_korr(header); header+= PAGE_STORE_SIZE; page_range= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; for (i= page_range; i-- > 0 ; page++, data+= data_on_page) { MARIA_PINNED_PAGE page_link; enum pagecache_page_lock unlock_method; enum pagecache_page_pin unpin_method; set_if_smaller(first_page2, page); set_if_bigger(last_page2, page); if (i == 0 && sub_ranges == 0) data_on_page= data_size - empty_space; /* data on last page */ if (_ma_redo_not_needed_for_page(sid, redo_lsn, page, FALSE)) continue; if (((page + 1) * share->block_size) > share->state.state.data_file_length) { /* New page or half written page at end of file */ DBUG_PRINT("info", ("Enlarging data file from %lu to %lu", (ulong) share->state.state.data_file_length, (ulong) ((page + 1 ) * share->block_size))); share->state.state.data_file_length= (page + 1) * share->block_size; buff= info->keyread_buff; info->keyread_buff_used= 1; make_empty_page(info, buff, BLOB_PAGE, 0); unlock_method= PAGECACHE_LOCK_LEFT_UNLOCKED; unpin_method= PAGECACHE_PIN_LEFT_UNPINNED; } else { share->pagecache->readwrite_flags&= ~MY_WME; share->silence_encryption_errors= 1; buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link); share->pagecache->readwrite_flags= share->pagecache-> org_readwrite_flags; share->silence_encryption_errors= 0; if (!buff) { if (my_errno != HA_ERR_FILE_TOO_SHORT && my_errno != HA_ERR_WRONG_CRC && my_errno != HA_ERR_DECRYPTION_FAILED) { /* If not read outside of file */ pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto err; } /* Physical file was too short, create new page. It can be that recovery started with a file with N pages, wrote page N+2 into pagecache (increased data_file_length but not physical file length), now reads page N+1: the read fails. */ buff= pagecache_block_link_to_buffer(page_link.link); make_empty_page(info, buff, BLOB_PAGE, 0); } else { #ifdef DBUG_ASSERT_EXISTS uchar found_page_type= (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK); #endif if (lsn_korr(buff) >= lsn) { /* Already applied */ check_skipped_lsn(info, lsn_korr(buff), 1, page); pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto fix_bitmap; } DBUG_ASSERT((found_page_type == (uchar) BLOB_PAGE) || (found_page_type == (uchar) UNALLOCATED_PAGE)); } unlock_method= PAGECACHE_LOCK_WRITE_UNLOCK; unpin_method= PAGECACHE_UNPIN; } /* Blob pages are never updated twice in same redo-undo chain, so it's safe to update lsn for them here */ lsn_store(buff, lsn); buff[PAGE_TYPE_OFFSET]= BLOB_PAGE; bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE, FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE)); if (data_on_page != data_size) { /* Last page may be only partly filled. We zero the rest, like write_full_pages() does. */ bzero(buff + share->block_size - PAGE_SUFFIX_SIZE - empty_space, empty_space); } memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, data_on_page); if (pagecache_write(share->pagecache, &info->dfile, page, 0, buff, PAGECACHE_PLAIN_PAGE, unlock_method, unpin_method, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE)) goto err; fix_bitmap: /** @todo leave bitmap lock to the bitmap code... */ mysql_mutex_lock(&share->bitmap.bitmap_lock); res= _ma_bitmap_set_full_page_bits(info, &share->bitmap, page, 1); mysql_mutex_unlock(&share->bitmap.bitmap_lock); if (res) goto err; } } } *first_page= first_page2; *last_page= last_page2; DBUG_RETURN(0); err: _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN(1); }
O3
c
ma_apply_redo_insert_row_blobs: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq (%rdi), %r12 movl 0x7bc(%r12), %r10d subl 0xc18(%r12), %r10d orl $0x181, 0x170(%r12) # imm = 0x181 movzwl (%rdx), %eax movzwl 0x2(%rdx), %ecx movl %ecx, (%r9) movzwl 0x4(%rdx), %r9d movl %r9d, (%r8) testl %r9d, %r9d je 0x4fcf5 addl $-0xc, %r10d leaq (,%rcx,8), %r8 subq %rcx, %r8 leaq (%rdx,%r8), %rcx addq $0x6, %rcx addq $0x6, %rdx leaq (%rcx,%r9,4), %rcx movq %rcx, -0x78(%rbp) leaq 0x470(%rdi), %rcx movq %rcx, -0x70(%rbp) movq %rsi, %rcx shrq $0x20, %rcx movq %rcx, -0xb0(%rbp) movq %rsi, %rcx shrq $0x28, %rcx movq %rcx, -0xa8(%rbp) movq %rsi, %rcx shrq $0x30, %rcx movq %rcx, -0xa0(%rbp) leaq 0xa10(%r12), %rcx movq %rcx, -0xb8(%rbp) leaq 0xa98(%r12), %rcx movq %rcx, -0x50(%rbp) movq $-0x1, %r8 movzwl %ax, %eax movl %eax, -0x54(%rbp) xorl %r11d, %r11d movq %r12, -0x48(%rbp) movq %rbx, -0xc8(%rbp) movl %r10d, -0x38(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x68(%rbp) movq %r9, -0x80(%rbp) movzwl (%rdx), %esi leaq 0x4(%rdx), %rcx testl %esi, %esi je 0x4fce3 movzwl 0x2(%rdx), %eax movl %r10d, %edx subl %eax, %edx movl %edx, -0x58(%rbp) movq %rax, -0x98(%rbp) negq %rax movq %rax, -0x90(%rbp) decl %esi movzwl 0x5(%rcx), %ebx testl %ebx, %ebx movq %rcx, -0x88(%rbp) je 0x4fccc movzbl 0x4(%rcx), %eax shlq $0x20, %rax movl (%rcx), %r15d orq %rax, %r15 decl %ebx movl %r10d, -0x34(%rbp) movl %esi, -0x5c(%rbp) cmpq %r15, %r8 cmovaeq %r15, %r8 movq %r8, -0xd8(%rbp) cmpq %r15, %r11 cmovbeq %r15, %r11 movq %r11, -0xd0(%rbp) movl %ebx, %eax orl %esi, %eax movl -0x34(%rbp), %r14d cmovel -0x58(%rbp), %r14d movl -0x54(%rbp), %edi movq -0xc8(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x3f7c3 leaq 0x1(%r15), %rcx movl %r14d, -0x34(%rbp) movl %r14d, %r13d testb %al, %al jne 0x4fc34 movl 0x7bc(%r12), %eax movq %rcx, -0xc0(%rbp) imulq %rcx, %rax cmpq 0x40(%r12), %rax jbe 0x4f9d0 movq %rax, 0x40(%r12) movq -0x40(%rbp), %rax movq 0x380(%rax), %r12 movb $0x1, 0x685(%rax) movl $0x1, -0x30(%rbp) movl $0x0, -0x2c(%rbp) jmp 0x4fac8 movq 0x600(%r12), %rax movl $0xffffffef, %ecx # imm = 0xFFFFFFEF andq %rcx, 0x198(%rax) movb $0x1, 0x7ec(%r12) movq 0x600(%r12), %rdi movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx xorl %r8d, %r8d movl $0x1, %r9d leaq -0xf0(%rbp), %rax pushq %rax pushq $0x4 callq 0x3c546 addq $0x10, %rsp movq %r12, %rdx movq %rax, %r12 movq 0x600(%rdx), %rax movq 0x1a0(%rax), %rcx movq %rcx, 0x198(%rax) movb $0x0, 0x7ec(%rdx) testq %r12, %r12 je 0x4fa7c movzwl (%r12), %eax shlq $0x20, %rax movzbl 0x2(%r12), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x3(%r12), %esi orq %rcx, %rsi movq -0x68(%rbp), %rax cmpq %rax, %rsi jge 0x4fc57 movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) jmp 0x4faf0 callq 0xa2f56 cmpl $0xaf, (%rax) je 0x4faa7 callq 0xa2f56 cmpl $0xb0, (%rax) je 0x4faa7 callq 0xa2f56 cmpl $0xc0, (%rax) jne 0x4fd11 movq -0xf0(%rbp), %rdi callq 0x3ea29 movq %rax, %r12 movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) movq -0x40(%rbp), %rax movq (%rax), %rax movl 0xc18(%rax), %edx addl $0xc, %edx movq %r12, %rdi xorl %esi, %esi callq 0x292a0 movw $0x3, 0x7(%r12) movb $-0x1, 0x9(%r12) movq -0x68(%rbp), %rax movq -0xb0(%rbp), %rcx movb %cl, (%r12) movq -0xa8(%rbp), %rcx movb %cl, 0x1(%r12) movq -0xa0(%rbp), %rcx movb %cl, 0x2(%r12) movl %eax, 0x3(%r12) movb $0x3, 0x7(%r12) leaq 0x8(%r12), %rdi movq -0x48(%rbp), %r14 movl 0xc18(%r14), %edx xorl %esi, %esi callq 0x292a0 movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax je 0x4fb64 movl 0x7bc(%r14), %eax addq %r12, %rax movq -0x90(%rbp), %rcx leaq (%rcx,%rax), %rdi addq $-0x4, %rdi xorl %esi, %esi movq -0x98(%rbp), %rdx callq 0x292a0 movl 0xc18(%r14), %edi addl $0x8, %edi addq %r12, %rdi movq -0x78(%rbp), %rsi movq %r13, %rdx callq 0x29080 movq 0x600(%r14), %rdi movl 0x80(%rdi), %eax subq $0x40, %rsp movl %eax, 0x30(%rsp) xorl %eax, %eax movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movl -0x30(%rbp), %eax movl %eax, 0x8(%rsp) movl -0x2c(%rbp), %eax movl %eax, (%rsp) movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r12, %r8 movl $0x1, %r9d callq 0x3d9aa addq $0x40, %rsp testb %al, %al movq %r14, %r12 jne 0x4fd41 cmpq $0x0, 0xad8(%r12) jne 0x4fc9d movq -0x50(%rbp), %rdi callq 0x29200 movq -0x40(%rbp), %rdi movq -0xb8(%rbp), %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x55528 movl %eax, %r15d movq 0xad8(%r12), %rdi testq %rdi, %rdi jne 0x4fcb7 movq -0x50(%rbp), %rdi callq 0x291c0 testb %r15b, %r15b movq -0xc0(%rbp), %rcx jne 0x4fd41 addq %r13, -0x78(%rbp) movq %rcx, %r15 addl $-0x1, %ebx movq -0xd8(%rbp), %r8 movq -0xd0(%rbp), %r11 movl -0x5c(%rbp), %esi jb 0x4f93c jmp 0x4fccc movq -0x40(%rbp), %rdi movl $0x1, %edx movq %r15, %rcx callq 0x37155 movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rax pushq %rax callq 0x3c261 addq $0x10, %rsp jmp 0x4fbd7 movq -0x50(%rbp), %rdi leaq 0x8c09c(%rip), %rsi # 0xdbd44 movl $0x1b5a, %edx # imm = 0x1B5A callq 0x2eb7f jmp 0x4fbef leaq 0x338352(%rip), %rax # 0x388010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4fc1b movq -0x88(%rbp), %rcx addq $0x7, %rcx testl %esi, %esi movl -0x38(%rbp), %r10d jne 0x4f910 movq %rcx, %rdx movq -0x80(%rbp), %r9 decl %r9d jne 0x4f8e0 jmp 0x4fcff movq $-0x1, %r8 xorl %r11d, %r11d movq 0x18(%rbp), %rax movq 0x10(%rbp), %rcx movq %r8, (%rcx) movq %r11, (%rax) xorl %eax, %eax jmp 0x4fd4e movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi xorl %eax, %eax movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x3c261 addq $0x10, %rsp movq %r12, %rdi callq 0x44066 movl $0x1, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_apply_redo_insert_row_blobs: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov r12, [rdi] mov r10d, [r12+7BCh] sub r10d, [r12+0C18h] or dword ptr [r12+170h], 181h movzx eax, word ptr [rdx] movzx ecx, word ptr [rdx+2] mov [r9], ecx movzx r9d, word ptr [rdx+4] mov [r8], r9d test r9d, r9d jz loc_4FCF5 add r10d, 0FFFFFFF4h lea r8, ds:0[rcx*8] sub r8, rcx lea rcx, [rdx+r8] add rcx, 6 add rdx, 6 lea rcx, [rcx+r9*4] mov [rbp+var_78], rcx lea rcx, [rdi+470h] mov [rbp+var_70], rcx mov rcx, rsi shr rcx, 20h mov [rbp+var_B0], rcx mov rcx, rsi shr rcx, 28h mov [rbp+var_A8], rcx mov rcx, rsi shr rcx, 30h mov [rbp+var_A0], rcx lea rcx, [r12+0A10h] mov [rbp+var_B8], rcx lea rcx, [r12+0A98h] mov [rbp+var_50], rcx mov r8, 0FFFFFFFFFFFFFFFFh movzx eax, ax mov [rbp+var_54], eax xor r11d, r11d mov [rbp+var_48], r12 mov [rbp+var_C8], rbx mov [rbp+var_38], r10d mov [rbp+var_40], rdi mov [rbp+var_68], rsi loc_4F8E0: mov [rbp+var_80], r9 movzx esi, word ptr [rdx] lea rcx, [rdx+4] test esi, esi jz loc_4FCE3 movzx eax, word ptr [rdx+2] mov edx, r10d sub edx, eax mov [rbp+var_58], edx mov [rbp+var_98], rax neg rax mov [rbp+var_90], rax loc_4F910: dec esi movzx ebx, word ptr [rcx+5] test ebx, ebx mov [rbp+var_88], rcx jz loc_4FCCC movzx eax, byte ptr [rcx+4] shl rax, 20h mov r15d, [rcx] or r15, rax dec ebx mov [rbp+var_34], r10d mov [rbp+var_5C], esi loc_4F93C: cmp r8, r15 cmovnb r8, r15 mov [rbp+var_D8], r8 cmp r11, r15 cmovbe r11, r15 mov [rbp+var_D0], r11 mov eax, ebx or eax, esi mov r14d, [rbp+var_34] cmovz r14d, [rbp+var_58] mov edi, [rbp+var_54] mov rsi, [rbp+var_C8] mov rdx, r15 xor ecx, ecx call _ma_redo_not_needed_for_page lea rcx, [r15+1] mov [rbp+var_34], r14d mov r13d, r14d test al, al jnz loc_4FC34 mov eax, [r12+7BCh] mov [rbp+var_C0], rcx imul rax, rcx cmp rax, [r12+40h] jbe short loc_4F9D0 mov [r12+40h], rax mov rax, [rbp+var_40] mov r12, [rax+380h] mov byte ptr [rax+685h], 1 mov [rbp+var_30], 1 mov [rbp+var_2C], 0 jmp loc_4FAC8 loc_4F9D0: mov rax, [r12+600h] mov ecx, 0FFFFFFEFh and [rax+198h], rcx mov byte ptr [r12+7ECh], 1 mov rdi, [r12+600h] mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx xor r8d, r8d mov r9d, 1 lea rax, [rbp+var_F0] push rax push 4 call pagecache_read add rsp, 10h mov rdx, r12 mov r12, rax mov rax, [rdx+600h] mov rcx, [rax+1A0h] mov [rax+198h], rcx mov byte ptr [rdx+7ECh], 0 test r12, r12 jz short loc_4FA7C movzx eax, word ptr [r12] shl rax, 20h movzx ecx, byte ptr [r12+2] shl rcx, 30h or rcx, rax mov esi, [r12+3] or rsi, rcx mov rax, [rbp+var_68] cmp rsi, rax jge loc_4FC57 mov [rbp+var_30], 3 mov [rbp+var_2C], 6 jmp short loc_4FAF0 loc_4FA7C: call _my_thread_var cmp dword ptr [rax], 0AFh jz short loc_4FAA7 call _my_thread_var cmp dword ptr [rax], 0B0h jz short loc_4FAA7 call _my_thread_var cmp dword ptr [rax], 0C0h jnz loc_4FD11 loc_4FAA7: mov rdi, [rbp+var_F0] call pagecache_block_link_to_buffer mov r12, rax mov [rbp+var_30], 3 mov [rbp+var_2C], 6 mov rax, [rbp+var_40] loc_4FAC8: mov rax, [rax] mov edx, [rax+0C18h] add edx, 0Ch mov rdi, r12 xor esi, esi call _memset mov word ptr [r12+7], 3 mov byte ptr [r12+9], 0FFh mov rax, [rbp+var_68] loc_4FAF0: mov rcx, [rbp+var_B0] mov [r12], cl mov rcx, [rbp+var_A8] mov [r12+1], cl mov rcx, [rbp+var_A0] mov [r12+2], cl mov [r12+3], eax mov byte ptr [r12+7], 3 lea rdi, [r12+8] mov r14, [rbp+var_48] mov edx, [r14+0C18h] xor esi, esi call _memset mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jz short loc_4FB64 mov eax, [r14+7BCh] add rax, r12 mov rcx, [rbp+var_90] lea rdi, [rcx+rax] add rdi, 0FFFFFFFFFFFFFFFCh xor esi, esi mov rdx, [rbp+var_98] call _memset loc_4FB64: mov edi, [r14+0C18h] add edi, 8 add rdi, r12 mov rsi, [rbp+var_78] mov rdx, r13 call _memcpy mov rdi, [r14+600h] mov eax, [rdi+80h] sub rsp, 40h mov [rsp+130h+var_100], eax xor eax, eax mov [rsp+130h+var_108], eax xorps xmm0, xmm0 movups [rsp+130h+var_118], xmm0 mov [rsp+130h+var_120], eax mov eax, [rbp+var_30] mov [rsp+130h+var_128], eax mov eax, [rbp+var_2C] mov [rsp+130h+var_130], eax mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx mov r8, r12 mov r9d, 1 call pagecache_write_part add rsp, 40h test al, al mov r12, r14 jnz loc_4FD41 loc_4FBD7: cmp qword ptr [r12+0AD8h], 0 jnz loc_4FC9D mov rdi, [rbp+var_50] call _pthread_mutex_lock loc_4FBEF: mov rdi, [rbp+var_40] mov rsi, [rbp+var_B8] mov rdx, r15 mov ecx, 1 call _ma_bitmap_set_full_page_bits mov r15d, eax mov rdi, [r12+0AD8h] test rdi, rdi jnz loc_4FCB7 loc_4FC1B: mov rdi, [rbp+var_50] call _pthread_mutex_unlock test r15b, r15b mov rcx, [rbp+var_C0] jnz loc_4FD41 loc_4FC34: add [rbp+var_78], r13 mov r15, rcx add ebx, 0FFFFFFFFh mov r8, [rbp+var_D8] mov r11, [rbp+var_D0] mov esi, [rbp+var_5C] jb loc_4F93C jmp short loc_4FCCC loc_4FC57: mov rdi, [rbp+var_40] mov edx, 1 mov rcx, r15 call check_skipped_lsn mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d xor eax, eax push rax push rax call pagecache_unlock_by_link add rsp, 10h jmp loc_4FBD7 loc_4FC9D: mov rdi, [rbp+var_50] lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1B5Ah call psi_mutex_lock jmp loc_4FBEF loc_4FCB7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4FC1B loc_4FCCC: mov rcx, [rbp+var_88] add rcx, 7 test esi, esi mov r10d, [rbp+var_38] jnz loc_4F910 loc_4FCE3: mov rdx, rcx mov r9, [rbp+var_80] dec r9d jnz loc_4F8E0 jmp short loc_4FCFF loc_4FCF5: mov r8, 0FFFFFFFFFFFFFFFFh xor r11d, r11d loc_4FCFF: mov rax, [rbp+arg_8] mov rcx, [rbp+arg_0] mov [rcx], r8 mov [rax], r11 xor eax, eax jmp short loc_4FD4E loc_4FD11: mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] xor eax, eax mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h loc_4FD41: mov rdi, r12 call _ma_mark_file_crashed mov eax, 1 loc_4FD4E: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_apply_redo_insert_row_blobs( char *a1, unsigned long long a2, unsigned __int16 *a3, long long a4, _DWORD *a5, _DWORD *a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned long long *a15, unsigned long long *a16) { long long v17; // r12 int v18; // r10d unsigned __int16 v19; // ax long long v20; // rcx long long v21; // r9 int v22; // r10d long long v23; // rcx unsigned __int16 *v24; // rdx unsigned long long v25; // r8 unsigned long long v26; // r11 int v27; // esi unsigned __int16 *v28; // rcx long long v29; // rax int v30; // ebx unsigned long long v31; // r15 int v32; // ebx unsigned int v33; // r14d char v34; // al unsigned long long v35; // rcx long long v36; // r13 long long v37; // rax unsigned long long v38; // rax long long v39; // rax long long v40; // r12 long long v41; // rdi unsigned __int16 *v42; // rax long long v43; // rdx signed long long v44; // rsi int v45; // eax long long v46; // r14 char v47; // al char v48; // r15 bool v49; // cf long long v51[3]; // [rsp+40h] [rbp-F0h] BYREF unsigned long long v52; // [rsp+58h] [rbp-D8h] unsigned long long v53; // [rsp+60h] [rbp-D0h] long long v54; // [rsp+68h] [rbp-C8h] unsigned long long v55; // [rsp+70h] [rbp-C0h] long long v56; // [rsp+78h] [rbp-B8h] unsigned long long v57; // [rsp+80h] [rbp-B0h] unsigned long long v58; // [rsp+88h] [rbp-A8h] unsigned long long v59; // [rsp+90h] [rbp-A0h] long long v60; // [rsp+98h] [rbp-98h] long long v61; // [rsp+A0h] [rbp-90h] unsigned __int16 *v62; // [rsp+A8h] [rbp-88h] long long v63; // [rsp+B0h] [rbp-80h] long long v64; // [rsp+B8h] [rbp-78h] char *v65; // [rsp+C0h] [rbp-70h] signed long long v66; // [rsp+C8h] [rbp-68h] int v67; // [rsp+D4h] [rbp-5Ch] unsigned int v68; // [rsp+D8h] [rbp-58h] int v69; // [rsp+DCh] [rbp-54h] long long v70; // [rsp+E0h] [rbp-50h] long long v71; // [rsp+E8h] [rbp-48h] char *v72; // [rsp+F0h] [rbp-40h] int v73; // [rsp+F8h] [rbp-38h] int v74; // [rsp+FCh] [rbp-34h] unsigned int v75; // [rsp+100h] [rbp-30h] unsigned int v76; // [rsp+104h] [rbp-2Ch] v17 = *(_QWORD *)a1; v18 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL) - *(_DWORD *)(*(_QWORD *)a1 + 3096LL); *(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x181u; v19 = *a3; v20 = a3[1]; *a6 = v20; v21 = a3[2]; *a5 = v21; if ( !(_DWORD)v21 ) { v25 = -1LL; v26 = 0LL; LABEL_40: *a15 = v25; *a16 = v26; return 0LL; } v22 = v18 - 12; v23 = (long long)a3 + 7 * v20 + 6; v24 = a3 + 3; v64 = v23 + 4 * v21; v65 = a1 + 1136; v57 = HIDWORD(a2); v58 = a2 >> 40; v59 = HIWORD(a2); v56 = v17 + 2576; v70 = v17 + 2712; v25 = -1LL; v69 = v19; v26 = 0LL; v71 = v17; v54 = a4; v73 = v22; v72 = a1; v66 = a2; while ( 1 ) { v63 = v21; v27 = *v24; v28 = v24 + 2; if ( *v24 ) break; LABEL_37: v24 = v28; v21 = (unsigned int)(v63 - 1); if ( (_DWORD)v63 == 1 ) goto LABEL_40; } v29 = v24[1]; v68 = v22 - v29; v60 = v29; v61 = -v29; while ( 1 ) { --v27; v30 = *(unsigned __int16 *)((char *)v28 + 5); v62 = v28; if ( v30 ) break; LABEL_36: v28 = (unsigned __int16 *)((char *)v62 + 7); v22 = v73; if ( !v27 ) goto LABEL_37; } v31 = ((unsigned long long)*((unsigned __int8 *)v28 + 4) << 32) | *(unsigned int *)v28; v32 = v30 - 1; v74 = v22; v67 = v27; while ( 1 ) { if ( v25 >= v31 ) v25 = v31; v52 = v25; if ( v26 <= v31 ) v26 = v31; v53 = v26; v33 = v74; if ( !(v27 | v32) ) v33 = v68; v34 = ma_redo_not_needed_for_page(v69, v54, v31, 0, a7, a8, a9, a10, a11, a12, a13, a14); v35 = v31 + 1; v74 = v33; v36 = v33; if ( v34 ) goto LABEL_32; v37 = *(unsigned int *)(v17 + 1980); v55 = v31 + 1; v38 = v35 * v37; if ( v38 > *(_QWORD *)(v17 + 64) ) { *(_QWORD *)(v17 + 64) = v38; v39 = (long long)v72; v40 = *((_QWORD *)v72 + 112); v72[1669] = 1; v75 = 1; v76 = 0; LABEL_23: memset(v40, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)v39 + 3096LL) + 12)); *(_WORD *)(v40 + 7) = 3; *(_BYTE *)(v40 + 9) = -1; v45 = v66; LABEL_24: *(_BYTE *)v40 = v57; *(_BYTE *)(v40 + 1) = v58; *(_BYTE *)(v40 + 2) = v59; *(_DWORD *)(v40 + 3) = v45; *(_BYTE *)(v40 + 7) = 3; v46 = v71; memset(v40 + 8, 0LL, *(unsigned int *)(v71 + 3096)); if ( v74 != v73 ) memset(v61 + v40 + *(unsigned int *)(v46 + 1980) - 4, 0LL, v60); memcpy(v40 + (unsigned int)(*(_DWORD *)(v46 + 3096) + 8), v64, v36); a7 = 0LL; v47 = pagecache_write_part( *(__m128i **)(v46 + 1536), v65, v31, 0, (char *)v40, 1, v76, v75, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v46 + 1536) + 128LL)); v17 = v46; if ( v47 ) goto LABEL_42; goto LABEL_27; } *(_QWORD *)(*(_QWORD *)(v17 + 1536) + 408LL) &= 0xFFFFFFEFuLL; *(_BYTE *)(v17 + 2028) = 1; v41 = *(_QWORD *)(v17 + 1536); v42 = (unsigned __int16 *)pagecache_read(v41, (long long)v65, v31, 0, 0LL, 1, 4u, v51); v43 = v17; v40 = (long long)v42; *(_QWORD *)(*(_QWORD *)(v43 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v43 + 1536) + 416LL); *(_BYTE *)(v43 + 2028) = 0; if ( !v42 ) break; v44 = ((unsigned long long)*v42 << 32) | ((unsigned long long)*((unsigned __int8 *)v42 + 2) << 48) | *(unsigned int *)((char *)v42 + 3); v45 = v66; if ( v44 < v66 ) { v75 = 3; v76 = 6; goto LABEL_24; } check_skipped_lsn((long long)v72, v44, 1, v31); v17 = v71; pagecache_unlock_by_link(*(_QWORD *)(v71 + 1536), v51[0], 6, 3, 0LL, 0LL, 0); LABEL_27: if ( *(_QWORD *)(v17 + 2776) ) psi_mutex_lock(v70, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1B5Au); else pthread_mutex_lock(v70); v48 = ma_bitmap_set_full_page_bits(v72, v56, v31, 1LL); if ( *(_QWORD *)(v17 + 2776) ) PSI_server[44](); pthread_mutex_unlock(v70); v35 = v55; if ( v48 ) goto LABEL_42; LABEL_32: v64 += v36; v31 = v35; v49 = v32-- != 0; v25 = v52; v26 = v53; v27 = v67; if ( !v49 ) goto LABEL_36; } if ( *(_DWORD *)my_thread_var(v41) == 175 || *(_DWORD *)my_thread_var(v41) == 176 || *(_DWORD *)my_thread_var(v41) == 192 ) { v40 = pagecache_block_link_to_buffer(v51[0]); v75 = 3; v76 = 6; v39 = (long long)v72; goto LABEL_23; } v17 = v71; pagecache_unlock_by_link(*(_QWORD *)(v71 + 1536), v51[0], 6, 3, 0LL, 0LL, 0); LABEL_42: ma_mark_file_crashed(v17); return 1LL; }
_ma_apply_redo_insert_row_blobs: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV R12,qword ptr [RDI] MOV R10D,dword ptr [R12 + 0x7bc] SUB R10D,dword ptr [R12 + 0xc18] OR dword ptr [R12 + 0x170],0x181 MOVZX EAX,word ptr [RDX] MOVZX ECX,word ptr [RDX + 0x2] MOV dword ptr [R9],ECX MOVZX R9D,word ptr [RDX + 0x4] MOV dword ptr [R8],R9D TEST R9D,R9D JZ 0x0014fcf5 ADD R10D,-0xc LEA R8,[RCX*0x8] SUB R8,RCX LEA RCX,[RDX + R8*0x1] ADD RCX,0x6 ADD RDX,0x6 LEA RCX,[RCX + R9*0x4] MOV qword ptr [RBP + -0x78],RCX LEA RCX,[RDI + 0x470] MOV qword ptr [RBP + -0x70],RCX MOV RCX,RSI SHR RCX,0x20 MOV qword ptr [RBP + -0xb0],RCX MOV RCX,RSI SHR RCX,0x28 MOV qword ptr [RBP + -0xa8],RCX MOV RCX,RSI SHR RCX,0x30 MOV qword ptr [RBP + -0xa0],RCX LEA RCX,[R12 + 0xa10] MOV qword ptr [RBP + -0xb8],RCX LEA RCX,[R12 + 0xa98] MOV qword ptr [RBP + -0x50],RCX MOV R8,-0x1 MOVZX EAX,AX MOV dword ptr [RBP + -0x54],EAX XOR R11D,R11D MOV qword ptr [RBP + -0x48],R12 MOV qword ptr [RBP + -0xc8],RBX MOV dword ptr [RBP + -0x38],R10D MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x68],RSI LAB_0014f8e0: MOV qword ptr [RBP + -0x80],R9 MOVZX ESI,word ptr [RDX] LEA RCX,[RDX + 0x4] TEST ESI,ESI JZ 0x0014fce3 MOVZX EAX,word ptr [RDX + 0x2] MOV EDX,R10D SUB EDX,EAX MOV dword ptr [RBP + -0x58],EDX MOV qword ptr [RBP + -0x98],RAX NEG RAX MOV qword ptr [RBP + -0x90],RAX LAB_0014f910: DEC ESI MOVZX EBX,word ptr [RCX + 0x5] TEST EBX,EBX MOV qword ptr [RBP + -0x88],RCX JZ 0x0014fccc MOVZX EAX,byte ptr [RCX + 0x4] SHL RAX,0x20 MOV R15D,dword ptr [RCX] OR R15,RAX DEC EBX MOV dword ptr [RBP + -0x34],R10D MOV dword ptr [RBP + -0x5c],ESI LAB_0014f93c: CMP R8,R15 CMOVNC R8,R15 MOV qword ptr [RBP + -0xd8],R8 CMP R11,R15 CMOVBE R11,R15 MOV qword ptr [RBP + -0xd0],R11 MOV EAX,EBX OR EAX,ESI MOV R14D,dword ptr [RBP + -0x34] CMOVZ R14D,dword ptr [RBP + -0x58] MOV EDI,dword ptr [RBP + -0x54] MOV RSI,qword ptr [RBP + -0xc8] MOV RDX,R15 XOR ECX,ECX CALL 0x0013f7c3 LEA RCX,[R15 + 0x1] MOV dword ptr [RBP + -0x34],R14D MOV R13D,R14D TEST AL,AL JNZ 0x0014fc34 MOV EAX,dword ptr [R12 + 0x7bc] MOV qword ptr [RBP + -0xc0],RCX IMUL RAX,RCX CMP RAX,qword ptr [R12 + 0x40] JBE 0x0014f9d0 MOV qword ptr [R12 + 0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV R12,qword ptr [RAX + 0x380] MOV byte ptr [RAX + 0x685],0x1 MOV dword ptr [RBP + -0x30],0x1 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x0014fac8 LAB_0014f9d0: MOV RAX,qword ptr [R12 + 0x600] MOV ECX,0xffffffef AND qword ptr [RAX + 0x198],RCX MOV byte ptr [R12 + 0x7ec],0x1 MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX XOR R8D,R8D MOV R9D,0x1 LEA RAX,[RBP + -0xf0] PUSH RAX PUSH 0x4 CALL 0x0013c546 ADD RSP,0x10 MOV RDX,R12 MOV R12,RAX MOV RAX,qword ptr [RDX + 0x600] MOV RCX,qword ptr [RAX + 0x1a0] MOV qword ptr [RAX + 0x198],RCX MOV byte ptr [RDX + 0x7ec],0x0 TEST R12,R12 JZ 0x0014fa7c MOVZX EAX,word ptr [R12] SHL RAX,0x20 MOVZX ECX,byte ptr [R12 + 0x2] SHL RCX,0x30 OR RCX,RAX MOV ESI,dword ptr [R12 + 0x3] OR RSI,RCX MOV RAX,qword ptr [RBP + -0x68] CMP RSI,RAX JGE 0x0014fc57 MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 JMP 0x0014faf0 LAB_0014fa7c: CALL 0x001a2f56 CMP dword ptr [RAX],0xaf JZ 0x0014faa7 CALL 0x001a2f56 CMP dword ptr [RAX],0xb0 JZ 0x0014faa7 CALL 0x001a2f56 CMP dword ptr [RAX],0xc0 JNZ 0x0014fd11 LAB_0014faa7: MOV RDI,qword ptr [RBP + -0xf0] CALL 0x0013ea29 MOV R12,RAX MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 MOV RAX,qword ptr [RBP + -0x40] LAB_0014fac8: MOV RAX,qword ptr [RAX] MOV EDX,dword ptr [RAX + 0xc18] ADD EDX,0xc MOV RDI,R12 XOR ESI,ESI CALL 0x001292a0 MOV word ptr [R12 + 0x7],0x3 MOV byte ptr [R12 + 0x9],0xff MOV RAX,qword ptr [RBP + -0x68] LAB_0014faf0: MOV RCX,qword ptr [RBP + -0xb0] MOV byte ptr [R12],CL MOV RCX,qword ptr [RBP + -0xa8] MOV byte ptr [R12 + 0x1],CL MOV RCX,qword ptr [RBP + -0xa0] MOV byte ptr [R12 + 0x2],CL MOV dword ptr [R12 + 0x3],EAX MOV byte ptr [R12 + 0x7],0x3 LEA RDI,[R12 + 0x8] MOV R14,qword ptr [RBP + -0x48] MOV EDX,dword ptr [R14 + 0xc18] XOR ESI,ESI CALL 0x001292a0 MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JZ 0x0014fb64 MOV EAX,dword ptr [R14 + 0x7bc] ADD RAX,R12 MOV RCX,qword ptr [RBP + -0x90] LEA RDI,[RCX + RAX*0x1] ADD RDI,-0x4 XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x98] CALL 0x001292a0 LAB_0014fb64: MOV EDI,dword ptr [R14 + 0xc18] ADD EDI,0x8 ADD RDI,R12 MOV RSI,qword ptr [RBP + -0x78] MOV RDX,R13 CALL 0x00129080 MOV RDI,qword ptr [R14 + 0x600] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x40 MOV dword ptr [RSP + 0x30],EAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RSP],EAX MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX MOV R8,R12 MOV R9D,0x1 CALL 0x0013d9aa ADD RSP,0x40 TEST AL,AL MOV R12,R14 JNZ 0x0014fd41 LAB_0014fbd7: CMP qword ptr [R12 + 0xad8],0x0 JNZ 0x0014fc9d MOV RDI,qword ptr [RBP + -0x50] CALL 0x00129200 LAB_0014fbef: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0xb8] MOV RDX,R15 MOV ECX,0x1 CALL 0x00155528 MOV R15D,EAX MOV RDI,qword ptr [R12 + 0xad8] TEST RDI,RDI JNZ 0x0014fcb7 LAB_0014fc1b: MOV RDI,qword ptr [RBP + -0x50] CALL 0x001291c0 TEST R15B,R15B MOV RCX,qword ptr [RBP + -0xc0] JNZ 0x0014fd41 LAB_0014fc34: ADD qword ptr [RBP + -0x78],R13 MOV R15,RCX ADD EBX,-0x1 MOV R8,qword ptr [RBP + -0xd8] MOV R11,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RBP + -0x5c] JC 0x0014f93c JMP 0x0014fccc LAB_0014fc57: MOV RDI,qword ptr [RBP + -0x40] MOV EDX,0x1 MOV RCX,R15 CALL 0x00137155 MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D XOR EAX,EAX PUSH RAX PUSH RAX CALL 0x0013c261 ADD RSP,0x10 JMP 0x0014fbd7 LAB_0014fc9d: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[0x1dbd44] MOV EDX,0x1b5a CALL 0x0012eb7f JMP 0x0014fbef LAB_0014fcb7: LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014fc1b LAB_0014fccc: MOV RCX,qword ptr [RBP + -0x88] ADD RCX,0x7 TEST ESI,ESI MOV R10D,dword ptr [RBP + -0x38] JNZ 0x0014f910 LAB_0014fce3: MOV RDX,RCX MOV R9,qword ptr [RBP + -0x80] DEC R9D JNZ 0x0014f8e0 JMP 0x0014fcff LAB_0014fcf5: MOV R8,-0x1 XOR R11D,R11D LAB_0014fcff: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + 0x10] MOV qword ptr [RCX],R8 MOV qword ptr [RAX],R11 XOR EAX,EAX JMP 0x0014fd4e LAB_0014fd11: MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] XOR EAX,EAX MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x0013c261 ADD RSP,0x10 LAB_0014fd41: MOV RDI,R12 CALL 0x00144066 MOV EAX,0x1 LAB_0014fd4e: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_apply_redo_insert_row_blobs (long *param_1,ulong param_2,ushort *param_3,int8 param_4,uint *param_5, uint *param_6,ulong *param_7,ulong *param_8) { ulong *puVar1; ushort uVar2; ushort uVar3; ushort uVar4; int iVar5; int iVar6; uint uVar7; char cVar8; ulong uVar9; ushort *__s; int *piVar10; uint5 *puVar11; uint uVar12; ulong uVar13; long lVar14; ulong uVar15; ulong in_stack_fffffffffffffef0; int8 local_f8 [3]; ulong local_e0; ulong local_d8; int8 local_d0; ulong local_c8; long local_c0; ulong local_b8; ulong local_b0; ulong local_a8; ulong local_a0; long local_98; uint5 *local_90; ulong local_88; void *local_80; long *local_78; ulong local_70; uint local_64; uint local_60; uint local_5c; pthread_mutex_t *local_58; long local_50; long *local_48; uint local_40; uint local_3c; int4 local_38; int4 local_34; lVar14 = *param_1; iVar5 = *(int *)(lVar14 + 0x7bc); iVar6 = *(int *)(lVar14 + 0xc18); *(uint *)(lVar14 + 0x170) = *(uint *)(lVar14 + 0x170) | 0x181; uVar2 = *param_3; uVar3 = param_3[1]; *param_6 = (uint)uVar3; uVar4 = param_3[2]; local_88 = (ulong)uVar4; *param_5 = (uint)uVar4; if (uVar4 == 0) { local_e0 = 0xffffffffffffffff; local_d8 = 0; } else { local_3c = (iVar5 - iVar6) - 0xc; local_80 = (void *)((long)param_3 + local_88 * 4 + (ulong)uVar3 * 7 + 6); local_78 = param_1 + 0x8e; local_b8 = param_2 >> 0x20; local_b0 = param_2 >> 0x28; local_a8 = param_2 >> 0x30; local_c0 = lVar14 + 0xa10; local_58 = (pthread_mutex_t *)(lVar14 + 0xa98); local_e0 = 0xffffffffffffffff; local_5c = (uint)uVar2; local_d8 = 0; puVar11 = (uint5 *)(param_3 + 3); local_d0 = param_4; local_70 = param_2; local_50 = lVar14; local_48 = param_1; local_40 = local_3c; do { local_64 = (uint)(ushort)*puVar11; local_90 = (uint5 *)((long)puVar11 + 4); if ((ushort)*puVar11 != 0) { local_a0 = (ulong)*(ushort *)((long)puVar11 + 2); local_60 = local_3c - *(ushort *)((long)puVar11 + 2); local_98 = -local_a0; do { local_64 = local_64 - 1; if (*(ushort *)((long)local_90 + 5) != 0) { uVar12 = (uint)*(ushort *)((long)local_90 + 5); uVar15 = (ulong)*local_90; do { uVar12 = uVar12 - 1; if (uVar15 <= local_e0) { local_e0 = uVar15; } if (local_d8 <= uVar15) { local_d8 = uVar15; } uVar7 = local_3c; if (uVar12 == 0 && local_64 == 0) { uVar7 = local_60; } cVar8 = _ma_redo_not_needed_for_page(local_5c,local_d0,uVar15,0); uVar13 = uVar15 + 1; local_3c = uVar7; if (cVar8 == '\0') { uVar9 = *(uint *)(lVar14 + 0x7bc) * uVar13; local_c8 = uVar13; if (uVar9 < *(ulong *)(lVar14 + 0x40) || uVar9 - *(ulong *)(lVar14 + 0x40) == 0) { puVar1 = (ulong *)(*(long *)(lVar14 + 0x600) + 0x198); *puVar1 = *puVar1 & 0xffffffef; *(int1 *)(lVar14 + 0x7ec) = 1; in_stack_fffffffffffffef0 = 0; __s = (ushort *) pagecache_read(*(int8 *)(lVar14 + 0x600),local_78,uVar15,0,0,1,4, local_f8); *(int8 *)(*(long *)(lVar14 + 0x600) + 0x198) = *(int8 *)(*(long *)(lVar14 + 0x600) + 0x1a0); *(int1 *)(lVar14 + 0x7ec) = 0; if (__s == (ushort *)0x0) { piVar10 = (int *)_my_thread_var(); if (((*piVar10 != 0xaf) && (piVar10 = (int *)_my_thread_var(), *piVar10 != 0xb0) ) && (piVar10 = (int *)_my_thread_var(), lVar14 = local_50, *piVar10 != 0xc0 )) { pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); goto LAB_0014fd41; } __s = (ushort *)pagecache_block_link_to_buffer(local_f8[0]); local_38 = 3; local_34 = 6; goto LAB_0014fac8; } uVar13 = (ulong)*(uint *)((long)__s + 3) | (ulong)(byte)__s[1] << 0x30 | (ulong)*__s << 0x20; if ((long)uVar13 < (long)local_70) { local_38 = 3; local_34 = 6; goto LAB_0014faf0; } check_skipped_lsn(local_48,uVar13,1,uVar15); lVar14 = local_50; in_stack_fffffffffffffef0 = 0; pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); } else { *(ulong *)(lVar14 + 0x40) = uVar9; __s = (ushort *)local_48[0x70]; *(int1 *)((long)local_48 + 0x685) = 1; local_38 = 1; local_34 = 0; LAB_0014fac8: memset(__s,0,(ulong)(*(int *)(*local_48 + 0xc18) + 0xc)); *(int2 *)((long)__s + 7) = 3; *(int1 *)((long)__s + 9) = 0xff; LAB_0014faf0: lVar14 = local_50; *(char *)__s = (char)local_b8; *(char *)((long)__s + 1) = (char)local_b0; *(char *)(__s + 1) = (char)local_a8; *(int *)((long)__s + 3) = (int)local_70; *(int1 *)((long)__s + 7) = 3; memset(__s + 4,0,(ulong)*(uint *)(local_50 + 0xc18)); if (local_3c != local_40) { memset((void *)((long)__s + local_98 + (ulong)*(uint *)(lVar14 + 0x7bc) + -4),0, local_a0); } memcpy((void *)((ulong)(*(int *)(lVar14 + 0xc18) + 8) + (long)__s),local_80, (ulong)uVar7); in_stack_fffffffffffffef0 = in_stack_fffffffffffffef0 & 0xffffffff00000000; cVar8 = pagecache_write_part (*(long *)(lVar14 + 0x600),local_78,uVar15,0,__s,1,local_34, local_38,0,0,0,in_stack_fffffffffffffef0, *(int4 *)(*(long *)(lVar14 + 0x600) + 0x80)); if (cVar8 != '\0') goto LAB_0014fd41; } if (*(long *)(lVar14 + 0xad8) == 0) { pthread_mutex_lock(local_58); } else { psi_mutex_lock(local_58, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c" ,0x1b5a); } cVar8 = _ma_bitmap_set_full_page_bits(local_48,local_c0,uVar15,1); if (*(long *)(lVar14 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_58); uVar13 = local_c8; if (cVar8 != '\0') { LAB_0014fd41: _ma_mark_file_crashed(lVar14); return 1; } } local_80 = (void *)((long)local_80 + (ulong)uVar7); uVar15 = uVar13; } while (uVar12 != 0); } local_90 = (uint5 *)((long)local_90 + 7); local_3c = local_40; } while (local_64 != 0); } uVar12 = (int)local_88 - 1; local_88 = (ulong)uVar12; puVar11 = local_90; } while (uVar12 != 0); } *param_7 = local_e0; *param_8 = local_d8; return 0; }
15,575
void fmt::v10::detail::ignore_unused<bool, char [20]>(bool const&, char const (&) [20])
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h
constexpr FMT_INLINE auto is_constant_evaluated( bool default_value = false) noexcept -> bool { // Workaround for incompatibility between libstdc++ consteval-based // std::is_constant_evaluated() implementation and clang-14. // https://github.com/fmtlib/fmt/issues/3247 #if FMT_CPLUSPLUS >= 202002L && defined(_GLIBCXX_RELEASE) && \ _GLIBCXX_RELEASE >= 12 && \ (FMT_CLANG_VERSION >= 1400 && FMT_CLANG_VERSION < 1500) ignore_unused(default_value); return __builtin_is_constant_evaluated(); #elif defined(__cpp_lib_is_constant_evaluated) ignore_unused(default_value); return std::is_constant_evaluated(); #else return default_value; #endif }
O0
c
void fmt::v10::detail::ignore_unused<bool, char [20]>(bool const&, char const (&) [20]): movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) retq nopl (%rax,%rax)
_ZN3fmt3v106detail13ignore_unusedIJbA13_cEEEvDpRKT_: mov [rsp+var_8], rdi mov [rsp+var_10], rsi retn
void fmt::v10::detail::ignore_unused<bool,char [13]>() { ; }
ignore_unused<bool,char[13]>: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI RET
/* void fmt::v10::detail::ignore_unused<bool, char [13]>(bool const&, char const (&) [13]) */ void fmt::v10::detail::ignore_unused<bool,char[13]>(bool *param_1,char *param_2) { return; }
15,576
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_unicode: movq %rdi, %rax cmpq %rsi, %rdi jae 0xcb700 pushq %rbp movq %rsp, %rbp movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0xcb6f7 movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax movq %rax, %rcx cmpq %rsi, %rax jb 0xcb6e0 popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_unicode: mov rax, rdi cmp rdi, rsi jnb short loc_CB700 push rbp mov rbp, rsp mov rcx, rdi loc_CB6E0: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_CB6F7 mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_CB6F7: mov rcx, rax cmp rax, rsi jb short loc_CB6E0 pop rbp loc_CB700: sub rax, rdi retn
long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rcx v2 = a1; if ( (unsigned long long)a1 < a2 ) { v3 = a1; do { v2 = v3 + 1; *v3 = 0; if ( (unsigned long long)(v3 + 1) < a2 ) { v3[1] = 32; v2 = v3 + 2; } v3 = v2; } while ( (unsigned long long)v2 < a2 ); } return v2 - a1; }
my_strxfrm_pad_unicode: MOV RAX,RDI CMP RDI,RSI JNC 0x001cb700 PUSH RBP MOV RBP,RSP MOV RCX,RDI LAB_001cb6e0: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x001cb6f7 MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_001cb6f7: MOV RCX,RAX CMP RAX,RSI JC 0x001cb6e0 POP RBP LAB_001cb700: SUB RAX,RDI RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *puVar2; puVar2 = param_1; puVar1 = param_1; if (param_1 < param_2) { do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } puVar1 = puVar2; } while (puVar2 < param_2); } return (long)puVar2 - (long)param_1; }
15,577
mysql_list_dbs_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_dbs_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_dbs, (parms->mysql, parms->wild), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_list_dbs_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movq %rax, %rdi callq 0x1b959 movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_list_dbs_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov rdi, rax call mysql_list_dbs mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_list_dbs_start_internal(long long a1) { long long v1; // rbx long long result; // rax v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); result = mysql_list_dbs(*(_QWORD *)a1, *(const char **)(a1 + 8)); *(_QWORD *)(v1 + 8) = result; *(_DWORD *)v1 = 0; return result; }
mysql_list_dbs_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDI,RAX CALL 0x0011b959 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_list_dbs_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_dbs(*param_1,param_1[1]); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
15,578
my_strnxfrm_latin1_de
eloqsql/strings/ctype-latin1.c
static size_t my_strnxfrm_latin1_de(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar* src, size_t srclen, uint flags) { uchar *de= dst + dstlen; const uchar *se= src + srclen; uchar *d0= dst; for ( ; src < se && dst < de && nweights; src++, nweights--) { uchar chr= combo1map[*src]; *dst++= chr; if ((chr= combo2map[*src]) && dst < de && nweights > 1) { *dst++= chr; nweights--; } } return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); }
O0
c
my_strnxfrm_latin1_de: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x4a(%rbp) jae 0x2924a movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x38(%rbp), %rcx movb %al, -0x4a(%rbp) jae 0x2924a cmpl $0x0, -0x1c(%rbp) setne %al movb %al, -0x4a(%rbp) movb -0x4a(%rbp), %al testb $0x1, %al jne 0x29256 jmp 0x292e7 movq -0x28(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x55dba(%rip), %rax # 0x7f020 movb (%rax,%rcx), %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movq -0x28(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x55e90(%rip), %rax # 0x7f120 movb (%rax,%rcx), %al movb %al, -0x49(%rbp) movzbl %al, %eax cmpl $0x0, %eax je 0x292cb movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x292cb cmpl $0x1, -0x1c(%rbp) jbe 0x292cb movb -0x49(%rbp), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x292cd movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x29222 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rcx movl -0x1c(%rbp), %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x29510 addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_strnxfrm_latin1_de: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov [rbp+var_48], rax loc_29222: mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_4A], al jnb short loc_2924A mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_38] mov [rbp+var_4A], al jnb short loc_2924A cmp [rbp+var_1C], 0 setnz al mov [rbp+var_4A], al loc_2924A: mov al, [rbp+var_4A] test al, 1 jnz short loc_29256 jmp loc_292E7 loc_29256: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_49], al mov cl, [rbp+var_49] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_49], al movzx eax, al cmp eax, 0 jz short loc_292CB mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_292CB cmp [rbp+var_1C], 1 jbe short loc_292CB mov cl, [rbp+var_49] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax loc_292CB: jmp short $+2 loc_292CD: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp loc_29222 loc_292E7: mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov rdx, [rbp+var_10] mov rcx, [rbp+var_38] mov r8d, [rbp+var_1C] mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse add rsp, 60h pop rbp retn
long long my_strnxfrm_latin1_de( int a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 *a5, long long a6, int a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax bool v10; // [rsp+16h] [rbp-4Ah] unsigned __int8 v11; // [rsp+17h] [rbp-49h] unsigned long long v12; // [rsp+28h] [rbp-38h] unsigned __int8 *v13; // [rsp+38h] [rbp-28h] unsigned __int8 *v15; // [rsp+50h] [rbp-10h] v15 = a2; v13 = a5; v12 = (unsigned long long)&a2[a3]; while ( 1 ) { v10 = 0; if ( v13 < &a5[a6] ) { v10 = 0; if ( (unsigned long long)v15 < v12 ) v10 = a4 != 0; } if ( !v10 ) break; v7 = v15++; *v7 = combo1map[*v13]; v11 = combo2map[*v13]; if ( v11 && (unsigned long long)v15 < v12 && a4 > 1 ) { v8 = v15++; *v8 = v11; --a4; } ++v13; --a4; } return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v15, v12, a4, a7, 0); }
my_strnxfrm_latin1_de: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX LAB_00129222: MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x4a],AL JNC 0x0012924a MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x38] MOV byte ptr [RBP + -0x4a],AL JNC 0x0012924a CMP dword ptr [RBP + -0x1c],0x0 SETNZ AL MOV byte ptr [RBP + -0x4a],AL LAB_0012924a: MOV AL,byte ptr [RBP + -0x4a] TEST AL,0x1 JNZ 0x00129256 JMP 0x001292e7 LAB_00129256: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x17f020] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x49],AL MOV CL,byte ptr [RBP + -0x49] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x17f120] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x49],AL MOVZX EAX,AL CMP EAX,0x0 JZ 0x001292cb MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001292cb CMP dword ptr [RBP + -0x1c],0x1 JBE 0x001292cb MOV CL,byte ptr [RBP + -0x49] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001292cb: JMP 0x001292cd LAB_001292cd: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00129222 LAB_001292e7: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] MOV R8D,dword ptr [RBP + -0x1c] MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x00129510 ADD RSP,0x60 POP RBP RET
void my_strnxfrm_latin1_de (int8 param_1,char *param_2,long param_3,uint param_4,byte *param_5, long param_6,int4 param_7) { char *pcVar1; char *pcVar2; bool bVar3; byte *local_30; uint local_24; char *local_18; pcVar1 = param_2 + param_3; local_30 = param_5; local_24 = param_4; local_18 = param_2; while( true ) { bVar3 = false; if ((local_30 < param_5 + param_6) && (bVar3 = false, local_18 < pcVar1)) { bVar3 = local_24 != 0; } if (!bVar3) break; pcVar2 = local_18 + 1; *local_18 = combo1map[*local_30]; if (((combo2map[*local_30] != '\0') && (pcVar2 < pcVar1)) && (1 < local_24)) { *pcVar2 = combo2map[*local_30]; local_24 = local_24 - 1; pcVar2 = local_18 + 2; } local_18 = pcVar2; local_30 = local_30 + 1; local_24 = local_24 - 1; } my_strxfrm_pad_desc_and_reverse(param_1,param_2,local_18,pcVar1,local_24,param_7,0); return; }
15,579
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
static string ShellEscape(const string& src) { string result; if (!src.empty() && // empty string needs quotes src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) { // only contains chars that don't need quotes; it's fine result.assign(src); } else if (src.find_first_of('\'') == string::npos) { // no single quotes; just wrap it in single quotes result.assign("'"); result.append(src); result.append("'"); } else { // needs double quote escaping result.assign("\""); for (size_t i = 0; i < src.size(); ++i) { switch (src[i]) { case '\\': case '$': case '"': case '`': result.append("\\"); } result.append(src, i, 1); } result.append("\""); } return result; }
O3
cpp
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpq $0x0, 0x8(%rsi) je 0x101f7 leaq 0x122d2(%rip), %rsi # 0x224b0 movl $0x47, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x7920 cmpq $-0x1, %rax je 0x102ca movq %r14, %rdi movl $0x27, %esi xorl %edx, %edx callq 0x7700 movq 0x8(%rbx), %rdx cmpq $-0x1, %rax je 0x10294 leaq 0x13315(%rip), %r15 # 0x23530 movl $0x1, %r8d movq %rbx, %rdi xorl %esi, %esi movq %r15, %rcx callq 0x7870 cmpq $0x0, 0x8(%r14) je 0x102bd movq %r12, (%rsp) xorl %r12d, %r12d movabsq $0x4400000000000005, %rbp # imm = 0x4400000000000005 leaq 0x132e1(%rip), %r13 # 0x23532 movq (%r14), %rax movzbl (%rax,%r12), %eax addl $-0x22, %eax cmpl $0x3e, %eax ja 0x10272 btq %rax, %rbp jae 0x10272 movq %rbx, %rdi movq %r13, %rsi callq 0x7a00 movl $0x1, %ecx movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x7760 incq %r12 cmpq 0x8(%r14), %r12 jb 0x10251 movq (%rsp), %r12 jmp 0x102bd leaq 0x12363(%rip), %r15 # 0x225fe movl $0x1, %r8d movq %rbx, %rdi xorl %esi, %esi movq %r15, %rcx callq 0x7870 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x7140 movq %rbx, %rdi movq %r15, %rsi callq 0x7a00 jmp 0x102d5 movq %rbx, %rdi movq %r14, %rsi callq 0x72a0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, (%rsp) jmp 0x102ea movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x10305 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x7530 movq %r14, %rdi callq 0x7970 nop
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp qword ptr [rsi+8], 0 jz short loc_101F7 lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"... mov ecx, 47h ; 'G' mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_102CA loc_101F7: mov rdi, r14 mov esi, 27h ; ''' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov rdx, [rbx+8] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_10294 lea r15, asc_23530; "\"" mov r8d, 1 mov rdi, rbx xor esi, esi mov rcx, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) cmp qword ptr [r14+8], 0 jz loc_102BD mov [rsp+38h+var_38], r12 xor r12d, r12d mov rbp, 4400000000000005h lea r13, asc_23532; "\\" loc_10251: mov rax, [r14] movzx eax, byte ptr [rax+r12] add eax, 0FFFFFFDEh cmp eax, 3Eh ; '>' ja short loc_10272 bt rbp, rax jnb short loc_10272 mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_10272: mov ecx, 1 mov rdi, rbx mov rsi, r14 mov rdx, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong) inc r12 cmp r12, [r14+8] jb short loc_10251 mov r12, [rsp+38h+var_38] jmp short loc_102BD loc_10294: lea r15, aDataNumCharsTo+59h; "'" mov r8d, 1 mov rdi, rbx xor esi, esi mov rcx, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) loc_102BD: mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_102D5 loc_102CA: mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_102D5: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+0], r12 jmp short $+2 loc_102EA: mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_10305 mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10305: mov rdi, r14 call __Unwind_Resume
long long nglog::ShellEscape(long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rdx char *v4; // r15 unsigned long long v5; // r12 long long v6; // rbp unsigned long long v7; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a2[1] && std::string::find_first_not_of( a2, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@", 0LL, 71LL) == -1 ) { return std::string::_M_assign(a1, a2); } v2 = std::string::find(a2, 39LL, 0LL); v3 = *(_QWORD *)(a1 + 8); if ( v2 == -1 ) { v4 = "'"; std::string::_M_replace(a1, 0LL, v3, "'", 1LL); std::string::_M_append(a1, *a2); } else { v4 = "\""; std::string::_M_replace(a1, 0LL, v3, "\"", 1LL); if ( a2[1] ) { v5 = 0LL; v6 = 0x4400000000000005LL; do { v7 = (unsigned int)*(unsigned __int8 *)(*a2 + v5) - 34; if ( (unsigned int)v7 <= 0x3E ) { if ( _bittest64(&v6, v7) ) std::string::append(a1, "\\"); } std::string::append(a1, a2, v5++, 1LL); } while ( v5 < a2[1] ); } } return std::string::append(a1, v4); }
ShellEscape: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 JZ 0x001101f7 LEA RSI,[0x1224b0] MOV ECX,0x47 MOV RDI,R14 XOR EDX,EDX CALL 0x00107920 CMP RAX,-0x1 JZ 0x001102ca LAB_001101f7: MOV RDI,R14 MOV ESI,0x27 XOR EDX,EDX CALL 0x00107700 MOV RDX,qword ptr [RBX + 0x8] CMP RAX,-0x1 JZ 0x00110294 LAB_00110214: LEA R15,[0x123530] MOV R8D,0x1 MOV RDI,RBX XOR ESI,ESI MOV RCX,R15 CALL 0x00107870 CMP qword ptr [R14 + 0x8],0x0 JZ 0x001102bd MOV qword ptr [RSP],R12 XOR R12D,R12D MOV RBP,0x4400000000000005 LEA R13,[0x123532] LAB_00110251: MOV RAX,qword ptr [R14] MOVZX EAX,byte ptr [RAX + R12*0x1] ADD EAX,-0x22 CMP EAX,0x3e JA 0x00110272 BT RBP,RAX JNC 0x00110272 LAB_00110267: MOV RDI,RBX MOV RSI,R13 CALL 0x00107a00 LAB_00110272: MOV ECX,0x1 MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 CALL 0x00107760 INC R12 CMP R12,qword ptr [R14 + 0x8] JC 0x00110251 MOV R12,qword ptr [RSP] JMP 0x001102bd LAB_00110294: LEA R15,[0x1225fe] MOV R8D,0x1 MOV RDI,RBX XOR ESI,ESI MOV RCX,R15 CALL 0x00107870 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00107140 LAB_001102bd: MOV RDI,RBX MOV RSI,R15 CALL 0x00107a00 JMP 0x001102d5 LAB_001102ca: MOV RDI,RBX MOV RSI,R14 CALL 0x001072a0 LAB_001102d5: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::ShellEscape(std::__cxx11::string const&) */ void __thiscall nglog::ShellEscape(nglog *this,string *param_1) { uint uVar1; long lVar2; ulong uVar3; *(nglog **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (nglog)0x0; if ((*(long *)(param_1 + 8) == 0) || (lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1224b0,0), lVar2 != -1)) { lVar2 = std::__cxx11::string::find((char)param_1,0x27); if (lVar2 == -1) { /* try { // try from 00110294 to 001102d4 has its CatchHandler @ 001102e4 */ std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x1225fe); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_1); } else { /* try { // try from 00110214 to 0011022d has its CatchHandler @ 001102e4 */ std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x123530); if (*(long *)(param_1 + 8) != 0) { uVar3 = 0; do { uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22; if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) { /* try { // try from 00110267 to 00110284 has its CatchHandler @ 001102ea */ std::__cxx11::string::append((char *)this); } std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3); uVar3 = uVar3 + 1; } while (uVar3 < *(ulong *)(param_1 + 8)); } } std::__cxx11::string::append((char *)this); } else { std::__cxx11::string::_M_assign((string *)this); } return; }
15,580
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O3
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movb $0x1, %r14b testq %rsi, %rsi je 0x2f58f movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rax xorl %ecx, %ecx cmpl $0x0, 0x358(%rax) setne %cl leal 0x1(,%rcx,2), %edx movl 0x1c0(%rdi), %r8d xorl %edi, %edi movl $0x4001, %ecx # imm = 0x4001 xorl %r9d, %r9d callq 0x28340 movq (%rbx), %rcx movq %rax, 0x270(%rcx) movq (%rbx), %rax movq 0x270(%rax), %rdi cmpq $-0x1, %rdi je 0x2f584 movq %r15, %rsi movl $0x1, %edx callq 0x28450 movq (%rbx), %rax movq %r15, 0x4d0(%rax) movq (%rbx), %rax leaq 0x36(%rip), %rcx # 0x2f59d movq %rcx, 0x2e0(%rax) movq (%rbx), %rax leaq 0x1f3(%rip), %rcx # 0x2f76b movq %rcx, 0x2e8(%rax) xorl %r14d, %r14d jmp 0x2f58f movq $0x0, 0x270(%rax) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mi_dynmap_file: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14b, 1 test rsi, rsi jz loc_2F58F mov r15, rsi mov rbx, rdi mov rax, [rdi] xor ecx, ecx cmp dword ptr [rax+358h], 0 setnz cl lea edx, ds:1[rcx*2] mov r8d, [rdi+1C0h] xor edi, edi mov ecx, 4001h xor r9d, r9d call _mmap64 mov rcx, [rbx] mov [rcx+270h], rax mov rax, [rbx] mov rdi, [rax+270h] cmp rdi, 0FFFFFFFFFFFFFFFFh jz short loc_2F584 mov rsi, r15 mov edx, 1 call _madvise mov rax, [rbx] mov [rax+4D0h], r15 mov rax, [rbx] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbx] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx xor r14d, r14d jmp short loc_2F58F loc_2F584: mov qword ptr [rax+270h], 0 loc_2F58F: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rax unsigned int v3; // r14d long long v5; // rax long long v6; // rdi LOBYTE(v3) = 1; if ( a2 ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64( 0LL, a2, 2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 856LL) != 0) + 1, 16385LL, a1[112], 0LL, v2); v5 = *(_QWORD *)a1; v6 = *(_QWORD *)(*(_QWORD *)a1 + 624LL); if ( v6 == -1 ) { *(_QWORD *)(v5 + 624) = 0LL; } else { madvise(v6, a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } } return v3; }
mi_dynmap_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14B,0x1 TEST RSI,RSI JZ 0x0012f58f MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] XOR ECX,ECX CMP dword ptr [RAX + 0x358],0x0 SETNZ CL LEA EDX,[0x1 + RCX*0x2] MOV R8D,dword ptr [RDI + 0x1c0] XOR EDI,EDI MOV ECX,0x4001 XOR R9D,R9D CALL 0x00128340 MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0x270],RAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x270] CMP RDI,-0x1 JZ 0x0012f584 MOV RSI,R15 MOV EDX,0x1 CALL 0x00128450 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x4d0],R15 MOV RAX,qword ptr [RBX] LEA RCX,[0x12f59d] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBX] LEA RCX,[0x12f76b] MOV qword ptr [RAX + 0x2e8],RCX XOR R14D,R14D JMP 0x0012f58f LAB_0012f584: MOV qword ptr [RAX + 0x270],0x0 LAB_0012f58f: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int8 unaff_R14; ulong uVar2; uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_2 != 0) { pvVar1 = mmap64((void *)0x0,param_2,(uint)(*(int *)(*param_1 + 0x358) != 0) * 2 + 1,0x4001, (int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; pvVar1 = *(void **)(*param_1 + 0x270); if (pvVar1 == (void *)0xffffffffffffffff) { *(int8 *)(*param_1 + 0x270) = 0; } else { madvise(pvVar1,param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; uVar2 = 0; } } return uVar2 & 0xffffffff; }
15,581
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::populateEdgeTagVectors() { _child->_edgeTags.resize(_child->getNumEdges()); populateEdgeTagsFromParentFaces(); populateEdgeTagsFromParentEdges(); }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors(): pushq %rbx movq %rdi, %rbx movq 0x10(%rdi), %rdi movslq 0x4(%rdi), %rsi addq $0xf0, %rdi callq 0x39da0 movslq 0x2c(%rbx), %rax testq %rax, %rax jle 0x49c7d movslq 0x44(%rbx), %rcx addq %rcx, %rax movq 0x10(%rbx), %rdx movq 0xf0(%rdx), %rdx movb $0x0, (%rdx,%rcx) incq %rcx cmpq %rax, %rcx jl 0x49c66 movq %rbx, %rdi popq %rbx jmp 0x3a4e0
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22populateEdgeTagVectorsEv: push rbx mov rbx, rdi mov rdi, [rdi+10h] movsxd rsi, dword ptr [rdi+4] add rdi, 0F0h call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal5Level4ETagESaIS5_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>::resize(ulong) movsxd rax, dword ptr [rbx+2Ch] test rax, rax jle short loc_49C7D movsxd rcx, dword ptr [rbx+44h] add rax, rcx loc_49C66: mov rdx, [rbx+10h] mov rdx, [rdx+0F0h] mov byte ptr [rdx+rcx], 0 inc rcx cmp rcx, rax jl short loc_49C66 loc_49C7D: mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement31populateEdgeTagsFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(void)
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long v1; // rax long long v2; // rcx long long v3; // rax std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>::resize( *((_QWORD *)this + 2) + 240LL, *(int *)(*((_QWORD *)this + 2) + 4LL)); v1 = *((int *)this + 11); if ( v1 > 0 ) { v2 = *((int *)this + 17); v3 = v2 + v1; do *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 240LL) + v2++) = 0; while ( v2 < v3 ); } return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(this); }
populateEdgeTagVectors: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] MOVSXD RSI,dword ptr [RDI + 0x4] ADD RDI,0xf0 CALL 0x00139da0 MOVSXD RAX,dword ptr [RBX + 0x2c] TEST RAX,RAX JLE 0x00149c7d MOVSXD RCX,dword ptr [RBX + 0x44] ADD RAX,RCX LAB_00149c66: MOV RDX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RDX + 0xf0] MOV byte ptr [RDX + RCX*0x1],0x0 INC RCX CMP RCX,RAX JL 0x00149c66 LAB_00149c7d: MOV RDI,RBX POP RBX JMP 0x0013a4e0
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors(Refinement *this) { long lVar1; long lVar2; std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>> ::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>> *)(*(long *)(this + 0x10) + 0xf0),(long)*(int *)(*(long *)(this + 0x10) + 4)); if (0 < (long)*(int *)(this + 0x2c)) { lVar2 = (long)*(int *)(this + 0x44); lVar1 = *(int *)(this + 0x2c) + lVar2; do { *(int1 *)(*(long *)(*(long *)(this + 0x10) + 0xf0) + lVar2) = 0; lVar2 = lVar2 + 1; } while (lVar2 < lVar1); } populateEdgeTagsFromParentEdges(this); return; }
15,582
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::populateEdgeTagVectors() { _child->_edgeTags.resize(_child->getNumEdges()); populateEdgeTagsFromParentFaces(); populateEdgeTagsFromParentEdges(); }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors(): pushq %rbx movq %rdi, %rbx movq 0x10(%rdi), %rdi movslq 0x4(%rdi), %rsi addq $0xf0, %rdi callq 0x39d80 movslq 0x2c(%rbx), %rax testq %rax, %rax jle 0x4bedb movslq 0x44(%rbx), %rcx addq %rcx, %rax movq 0x10(%rbx), %rdx movq 0xf0(%rdx), %rdx movb $0x0, (%rdx,%rcx) incq %rcx cmpq %rax, %rcx jl 0x4bec4 movq %rbx, %rdi popq %rbx jmp 0x3a4c0
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22populateEdgeTagVectorsEv: push rbx mov rbx, rdi mov rdi, [rdi+10h] movsxd rsi, dword ptr [rdi+4] add rdi, 0F0h call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal5Level4ETagESaIS5_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>::resize(ulong) movsxd rax, dword ptr [rbx+2Ch] test rax, rax jle short loc_4BEDB movsxd rcx, dword ptr [rbx+44h] add rax, rcx loc_4BEC4: mov rdx, [rbx+10h] mov rdx, [rdx+0F0h] mov byte ptr [rdx+rcx], 0 inc rcx cmp rcx, rax jl short loc_4BEC4 loc_4BEDB: mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement31populateEdgeTagsFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(void)
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long v1; // rax long long v2; // rcx long long v3; // rax std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>::resize( *((_QWORD *)this + 2) + 240LL, *(int *)(*((_QWORD *)this + 2) + 4LL)); v1 = *((int *)this + 11); if ( v1 > 0 ) { v2 = *((int *)this + 17); v3 = v2 + v1; do *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 240LL) + v2++) = 0; while ( v2 < v3 ); } return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(this); }
populateEdgeTagVectors: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] MOVSXD RSI,dword ptr [RDI + 0x4] ADD RDI,0xf0 CALL 0x00139d80 MOVSXD RAX,dword ptr [RBX + 0x2c] TEST RAX,RAX JLE 0x0014bedb MOVSXD RCX,dword ptr [RBX + 0x44] ADD RAX,RCX LAB_0014bec4: MOV RDX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RDX + 0xf0] MOV byte ptr [RDX + RCX*0x1],0x0 INC RCX CMP RCX,RAX JL 0x0014bec4 LAB_0014bedb: MOV RDI,RBX POP RBX JMP 0x0013a4c0
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagVectors(Refinement *this) { long lVar1; long lVar2; std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>> ::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag>> *)(*(long *)(this + 0x10) + 0xf0),(long)*(int *)(*(long *)(this + 0x10) + 4)); if (0 < (long)*(int *)(this + 0x2c)) { lVar2 = (long)*(int *)(this + 0x44); lVar1 = *(int *)(this + 0x2c) + lVar2; do { *(int1 *)(*(long *)(*(long *)(this + 0x10) + 0xf0) + lVar2) = 0; lVar2 = lVar2 + 1; } while (lVar2 < lVar1); } populateEdgeTagsFromParentEdges(this); return; }
15,583
my_uca_context_weight_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc, size_t max_char_length) { const MY_CONTRACTION *cnt; DBUG_ASSERT(scanner->level->contractions.nitems); /* If we have scanned a character which can have previous context, and there were some more characters already before, then reconstruct codepoint of the previous character from "page" and "code" into w[1], and verify that {wc[1], wc[0]} together form a real previous context pair. Note, we support only 2-character long sequences with previous context at the moment. CLDR does not have longer sequences. */ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions, wc[0]) && scanner->wbeg != nochar && /* if not the very first character */ my_uca_can_be_previous_context_head(&scanner->level->contractions, (wc[1]= ((scanner->page << 8) + scanner->code))) && (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0]))) { scanner->page= scanner->code= 0; /* Clear for the next character */ return cnt; } else if (my_uca_can_be_contraction_head(&scanner->level->contractions, wc[0])) { /* Check if w[0] starts a contraction */ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length))) return cnt; } return NULL; }
O3
c
my_uca_context_weight_find: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, -0x30(%rbp) movq %rsi, %r14 movq 0x18(%rdi), %rcx movq (%rsi), %rdx movq 0x28(%rcx), %rsi movl %edx, %eax andl $0xfff, %eax # imm = 0xFFF cmpb $0x0, (%rsi,%rax) js 0x417c4 movq 0x28(%rcx), %rcx testb $0x1, (%rcx,%rax) je 0x41910 movq %rdi, -0x40(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, -0x60(%rbp) movaps %xmm0, -0x70(%rbp) movaps %xmm0, -0x80(%rbp) cmpq $0x2, -0x30(%rbp) jb 0x41910 movq -0x40(%rbp), %r13 movq 0x8(%r13), %r12 movb $0x4, %r15b movl $0x1, %edx movl $0x8, %ebx movq %rdx, -0x38(%rbp) movq 0x10(%r13), %rcx movq 0x30(%r13), %rdi movq 0xb8(%rdi), %rax leaq (%r14,%rbx), %rsi movq %r12, %rdx callq *0x28(%rax) testl %eax, %eax jle 0x41844 movl %eax, %eax addq %rax, %r12 movq -0x38(%rbp), %rdx movq %r12, -0x80(%rbp,%rdx,8) movq 0x18(%r13), %rcx movq (%r14,%rdx,8), %rax movq 0x28(%rcx), %rsi andl $0xfff, %eax # imm = 0xFFF testb %r15b, (%rsi,%rax) je 0x41860 incq %rdx addb %r15b, %r15b addq $0x8, %rbx cmpq %rdx, -0x30(%rbp) jne 0x4175d movq -0x30(%rbp), %rdx jmp 0x41848 leaq 0x211db5(%rip), %rsi # 0x253580 cmpq %rsi, (%rdi) je 0x4171c movl 0x24(%rdi), %esi shll $0x8, %esi movslq 0x28(%rdi), %r8 movslq %esi, %rsi addq %r8, %rsi movq %rsi, 0x8(%r14) movq 0x28(%rcx), %rcx movl %esi, %r8d andl $0xfff, %r8d # imm = 0xFFF testb $0x40, (%rcx,%r8) movq 0x18(%rdi), %rcx je 0x4171c movq 0x18(%rcx), %r8 testq %r8, %r8 jle 0x4171c movq 0x20(%rcx), %r12 imulq $0x58, %r8, %r8 addq %r12, %r8 cmpb $0x0, 0x52(%r12) je 0x41836 cmpq %rsi, (%r12) jne 0x41836 cmpq %rdx, 0x8(%r12) je 0x4193c addq $0x58, %r12 cmpq %r8, %r12 jb 0x4181d jmp 0x4171c movq -0x38(%rbp), %rdx cmpq $0x2, %rdx jb 0x41910 movq -0x40(%rbp), %rax movq 0x18(%rax), %rcx movq 0x28(%rcx), %rsi jmp 0x41863 incq %rdx leaq (,%rdx,8), %rdi movq %rsi, -0x48(%rbp) movq %rdx, %r8 decq %rdx movq -0x8(%r14,%r8,8), %rax andl $0xfff, %eax # imm = 0xFFF testb $0x2, (%rsi,%rax) je 0x418fe movq 0x18(%rcx), %rax testq %rax, %rax jle 0x418fe movq 0x20(%rcx), %r12 imulq $0x58, %rax, %rax addq %r12, %rax leaq (,%r8,8), %rsi movq %rsi, -0x50(%rbp) movq %rdi, -0x38(%rbp) movq %rax, -0x30(%rbp) cmpq $0x5, %r8 ja 0x418ba cmpq $0x0, (%r12,%rdi) jne 0x418f5 cmpb $0x0, 0x52(%r12) jne 0x418f5 movq %r12, %rdi movq %r14, %rsi movq %rdx, %r15 movq -0x50(%rbp), %rdx movq %r14, %r13 movq %rcx, %rbx movq %r8, %r14 callq 0x24330 movq %r14, %r8 movq -0x38(%rbp), %rdi movq %rbx, %rcx movq %r15, %rdx movq %r13, %r14 testl %eax, %eax movq -0x30(%rbp), %rax je 0x41925 addq $0x58, %r12 cmpq %rax, %r12 jb 0x418ad addq $-0x8, %rdi cmpq $0x1, %rdx movq -0x48(%rbp), %rsi ja 0x4186f xorl %r12d, %r12d movq %r12, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x32(%r12), %rax movq -0x40(%rbp), %rcx movq %rax, (%rcx) movq -0x80(%rbp,%rdx,8), %rax movq %rax, 0x8(%rcx) jmp 0x41913 leaq 0x32(%r12), %rax movq %rax, (%rdi) movq $0x0, 0x24(%rdi) jmp 0x41913
my_uca_context_weight_find: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], rdx mov r14, rsi mov rcx, [rdi+18h] mov rdx, [rsi] mov rsi, [rcx+28h] mov eax, edx and eax, 0FFFh cmp byte ptr [rsi+rax], 0 js loc_417C4 loc_4171C: mov rcx, [rcx+28h] test byte ptr [rcx+rax], 1 jz loc_41910 mov [rbp+var_40], rdi xorps xmm0, xmm0 movaps [rbp+var_60], xmm0 movaps [rbp+var_70], xmm0 movaps [rbp+var_80], xmm0 cmp [rbp+var_30], 2 jb loc_41910 mov r13, [rbp+var_40] mov r12, [r13+8] mov r15b, 4 mov edx, 1 mov ebx, 8 loc_4175D: mov [rbp+var_38], rdx mov rcx, [r13+10h] mov rdi, [r13+30h] mov rax, [rdi+0B8h] lea rsi, [r14+rbx] mov rdx, r12 call qword ptr [rax+28h] test eax, eax jle loc_41844 mov eax, eax add r12, rax mov rdx, [rbp+var_38] mov qword ptr [rbp+rdx*8+var_80], r12 mov rcx, [r13+18h] mov rax, [r14+rdx*8] mov rsi, [rcx+28h] and eax, 0FFFh test [rsi+rax], r15b jz loc_41860 inc rdx add r15b, r15b add rbx, 8 cmp [rbp+var_30], rdx jnz short loc_4175D mov rdx, [rbp+var_30] jmp loc_41848 loc_417C4: lea rsi, nochar cmp [rdi], rsi jz loc_4171C mov esi, [rdi+24h] shl esi, 8 movsxd r8, dword ptr [rdi+28h] movsxd rsi, esi add rsi, r8 mov [r14+8], rsi mov rcx, [rcx+28h] mov r8d, esi and r8d, 0FFFh test byte ptr [rcx+r8], 40h mov rcx, [rdi+18h] jz loc_4171C mov r8, [rcx+18h] test r8, r8 jle loc_4171C mov r12, [rcx+20h] imul r8, 58h ; 'X' add r8, r12 loc_4181D: cmp byte ptr [r12+52h], 0 jz short loc_41836 cmp [r12], rsi jnz short loc_41836 cmp [r12+8], rdx jz loc_4193C loc_41836: add r12, 58h ; 'X' cmp r12, r8 jb short loc_4181D jmp loc_4171C loc_41844: mov rdx, [rbp+var_38] loc_41848: cmp rdx, 2 jb loc_41910 mov rax, [rbp+var_40] mov rcx, [rax+18h] mov rsi, [rcx+28h] jmp short loc_41863 loc_41860: inc rdx loc_41863: lea rdi, ds:0[rdx*8] mov [rbp+var_48], rsi loc_4186F: mov r8, rdx dec rdx mov rax, [r14+r8*8-8] and eax, 0FFFh test byte ptr [rsi+rax], 2 jz short loc_418FE mov rax, [rcx+18h] test rax, rax jle short loc_418FE mov r12, [rcx+20h] imul rax, 58h ; 'X' add rax, r12 lea rsi, ds:0[r8*8] mov [rbp+var_50], rsi mov [rbp+var_38], rdi mov [rbp+var_30], rax loc_418AD: cmp r8, 5 ja short loc_418BA cmp qword ptr [r12+rdi], 0 jnz short loc_418F5 loc_418BA: cmp byte ptr [r12+52h], 0 jnz short loc_418F5 mov rdi, r12 mov rsi, r14 mov r15, rdx mov rdx, [rbp+var_50] mov r13, r14 mov rbx, rcx mov r14, r8 call _bcmp mov r8, r14 mov rdi, [rbp+var_38] mov rcx, rbx mov rdx, r15 mov r14, r13 test eax, eax mov rax, [rbp+var_30] jz short loc_41925 loc_418F5: add r12, 58h ; 'X' cmp r12, rax jb short loc_418AD loc_418FE: add rdi, 0FFFFFFFFFFFFFFF8h cmp rdx, 1 mov rsi, [rbp+var_48] ja loc_4186F loc_41910: xor r12d, r12d loc_41913: mov rax, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_41925: lea rax, [r12+32h] mov rcx, [rbp+var_40] mov [rcx], rax mov rax, qword ptr [rbp+rdx*8+var_80] mov [rcx+8], rax jmp short loc_41913 loc_4193C: lea rax, [r12+32h] mov [rdi], rax mov qword ptr [rdi+24h], 0 jmp short loc_41913
unsigned long long my_uca_context_weight_find( long long a1, _QWORD *a2, unsigned long long a3, long long a4, long long a5, long long a6) { _QWORD *v6; // r14 _QWORD *v7; // rcx long long v8; // rdx long long v9; // rax _QWORD *v10; // r13 long long v11; // r12 char v12; // r15 long long v13; // rdx long long v14; // rbx int v15; // eax long long v16; // rdx _QWORD *v17; // rcx long long v18; // rsi unsigned long long v19; // rdx long long v20; // rsi bool v21; // zf unsigned long long v22; // r12 long long v23; // rdi unsigned long long v24; // r8 long long v25; // rax unsigned long long v26; // rax _QWORD *v27; // rsi unsigned long long v28; // r15 _QWORD *v29; // r13 _QWORD *v30; // rbx unsigned long long v31; // r14 int v32; // eax _QWORD *v34; // rcx __int128 v35; // [rsp+0h] [rbp-80h] __int128 v36; // [rsp+10h] [rbp-70h] __int128 v37; // [rsp+20h] [rbp-60h] long long v38; // [rsp+30h] [rbp-50h] long long v39; // [rsp+38h] [rbp-48h] _QWORD *v40; // [rsp+40h] [rbp-40h] long long v41; // [rsp+48h] [rbp-38h] unsigned long long v42; // [rsp+50h] [rbp-30h] v42 = a3; v6 = a2; v7 = *(_QWORD **)(a1 + 24); v8 = *a2; v9 = *a2 & 0xFFFLL; if ( *(char *)(v7[5] + v9) >= 0 || *(_UNKNOWN **)a1 == &nochar || (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8), v6[1] = v20, a5 = v20 & 0xFFF, v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0, v7 = *(_QWORD **)(a1 + 24), v21) || (a5 = v7[3], a5 <= 0) ) { LABEL_2: if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) ) { v10 = v40; v11 = v40[1]; v12 = 4; v13 = 1LL; v14 = 1LL; while ( 1 ) { v41 = v13; v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))( v10[6], &v6[v14], v11, v10[2], a5, a6, v35, *((_QWORD *)&v35 + 1), v36, *((_QWORD *)&v36 + 1), v37, *((_QWORD *)&v37 + 1)); if ( v15 <= 0 ) break; v11 += (unsigned int)v15; v16 = v41; *((_QWORD *)&v35 + v41) = v11; v17 = (_QWORD *)v10[3]; v18 = v17[5]; if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 ) { v19 = v16 + 1; goto LABEL_22; } v13 = v16 + 1; v12 *= 2; ++v14; if ( v42 == v13 ) { v19 = v42; goto LABEL_19; } } v19 = v41; LABEL_19: if ( v19 < 2 ) return 0LL; v17 = (_QWORD *)v40[3]; v18 = v17[5]; LABEL_22: v23 = 8 * v19; v39 = v18; while ( 1 ) { v24 = v19--; if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 ) { v25 = v17[3]; if ( v25 > 0 ) break; } LABEL_31: v23 -= 8LL; v18 = v39; if ( v19 <= 1 ) return 0LL; } v22 = v17[4]; v26 = v22 + 88 * v25; v38 = 8 * v24; v41 = v23; v42 = v26; while ( 1 ) { if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) ) { v27 = v6; v28 = v19; v29 = v6; v30 = v17; v31 = v24; v32 = bcmp(v22, v27, v38); v24 = v31; v23 = v41; v17 = v30; v19 = v28; v6 = v29; v21 = v32 == 0; v26 = v42; if ( v21 ) break; } v22 += 88LL; if ( v22 >= v26 ) goto LABEL_31; } v34 = v40; *v40 = v22 + 50; v34[1] = *((_QWORD *)&v35 + v28); } else { return 0LL; } } else { v22 = v7[4]; a5 = v22 + 88 * a5; while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 ) { v22 += 88LL; if ( v22 >= a5 ) goto LABEL_2; } *(_QWORD *)a1 = v22 + 50; *(_QWORD *)(a1 + 36) = 0LL; } return v22; }
my_uca_context_weight_find: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],RDX MOV R14,RSI MOV RCX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RSI] MOV RSI,qword ptr [RCX + 0x28] MOV EAX,EDX AND EAX,0xfff CMP byte ptr [RSI + RAX*0x1],0x0 JS 0x001417c4 LAB_0014171c: MOV RCX,qword ptr [RCX + 0x28] TEST byte ptr [RCX + RAX*0x1],0x1 JZ 0x00141910 MOV qword ptr [RBP + -0x40],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOVAPS xmmword ptr [RBP + -0x80],XMM0 CMP qword ptr [RBP + -0x30],0x2 JC 0x00141910 MOV R13,qword ptr [RBP + -0x40] MOV R12,qword ptr [R13 + 0x8] MOV R15B,0x4 MOV EDX,0x1 MOV EBX,0x8 LAB_0014175d: MOV qword ptr [RBP + -0x38],RDX MOV RCX,qword ptr [R13 + 0x10] MOV RDI,qword ptr [R13 + 0x30] MOV RAX,qword ptr [RDI + 0xb8] LEA RSI,[R14 + RBX*0x1] MOV RDX,R12 CALL qword ptr [RAX + 0x28] TEST EAX,EAX JLE 0x00141844 MOV EAX,EAX ADD R12,RAX MOV RDX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + RDX*0x8 + -0x80],R12 MOV RCX,qword ptr [R13 + 0x18] MOV RAX,qword ptr [R14 + RDX*0x8] MOV RSI,qword ptr [RCX + 0x28] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],R15B JZ 0x00141860 INC RDX ADD R15B,R15B ADD RBX,0x8 CMP qword ptr [RBP + -0x30],RDX JNZ 0x0014175d MOV RDX,qword ptr [RBP + -0x30] JMP 0x00141848 LAB_001417c4: LEA RSI,[0x353580] CMP qword ptr [RDI],RSI JZ 0x0014171c MOV ESI,dword ptr [RDI + 0x24] SHL ESI,0x8 MOVSXD R8,dword ptr [RDI + 0x28] MOVSXD RSI,ESI ADD RSI,R8 MOV qword ptr [R14 + 0x8],RSI MOV RCX,qword ptr [RCX + 0x28] MOV R8D,ESI AND R8D,0xfff TEST byte ptr [RCX + R8*0x1],0x40 MOV RCX,qword ptr [RDI + 0x18] JZ 0x0014171c MOV R8,qword ptr [RCX + 0x18] TEST R8,R8 JLE 0x0014171c MOV R12,qword ptr [RCX + 0x20] IMUL R8,R8,0x58 ADD R8,R12 LAB_0014181d: CMP byte ptr [R12 + 0x52],0x0 JZ 0x00141836 CMP qword ptr [R12],RSI JNZ 0x00141836 CMP qword ptr [R12 + 0x8],RDX JZ 0x0014193c LAB_00141836: ADD R12,0x58 CMP R12,R8 JC 0x0014181d JMP 0x0014171c LAB_00141844: MOV RDX,qword ptr [RBP + -0x38] LAB_00141848: CMP RDX,0x2 JC 0x00141910 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RCX + 0x28] JMP 0x00141863 LAB_00141860: INC RDX LAB_00141863: LEA RDI,[RDX*0x8] MOV qword ptr [RBP + -0x48],RSI LAB_0014186f: MOV R8,RDX DEC RDX MOV RAX,qword ptr [R14 + R8*0x8 + -0x8] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],0x2 JZ 0x001418fe MOV RAX,qword ptr [RCX + 0x18] TEST RAX,RAX JLE 0x001418fe MOV R12,qword ptr [RCX + 0x20] IMUL RAX,RAX,0x58 ADD RAX,R12 LEA RSI,[R8*0x8] MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RAX LAB_001418ad: CMP R8,0x5 JA 0x001418ba CMP qword ptr [R12 + RDI*0x1],0x0 JNZ 0x001418f5 LAB_001418ba: CMP byte ptr [R12 + 0x52],0x0 JNZ 0x001418f5 MOV RDI,R12 MOV RSI,R14 MOV R15,RDX MOV RDX,qword ptr [RBP + -0x50] MOV R13,R14 MOV RBX,RCX MOV R14,R8 CALL 0x00124330 MOV R8,R14 MOV RDI,qword ptr [RBP + -0x38] MOV RCX,RBX MOV RDX,R15 MOV R14,R13 TEST EAX,EAX MOV RAX,qword ptr [RBP + -0x30] JZ 0x00141925 LAB_001418f5: ADD R12,0x58 CMP R12,RAX JC 0x001418ad LAB_001418fe: ADD RDI,-0x8 CMP RDX,0x1 MOV RSI,qword ptr [RBP + -0x48] JA 0x0014186f LAB_00141910: XOR R12D,R12D LAB_00141913: MOV RAX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00141925: LEA RAX,[R12 + 0x32] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80] MOV qword ptr [RCX + 0x8],RAX JMP 0x00141913 LAB_0014193c: LEA RAX,[R12 + 0x32] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x24],0x0 JMP 0x00141913
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3) { uint uVar1; int iVar2; long *plVar3; long lVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; long lVar9; long *plVar10; byte bVar11; long local_88 [7]; long local_50; long *local_48; ulong local_40; long *local_38; lVar9 = param_1[3]; uVar5 = (ulong)((uint)*param_2 & 0xfff); if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) { lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5]; param_2[1] = lVar8; plVar10 = (long *)(lVar9 + 0x28); lVar9 = param_1[3]; if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) && (0 < *(long *)(lVar9 + 0x18))) { plVar10 = *(long **)(lVar9 + 0x20); plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb; do { if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) && (plVar10[1] == *param_2)) { *param_1 = (long)plVar10 + 0x32; *(int8 *)((long)param_1 + 0x24) = 0; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } } if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) { local_88[4] = 0; local_88[5] = 0; local_88[2] = 0; local_88[3] = 0; local_88[0] = 0; local_88[1] = 0; if (1 < param_3) { lVar9 = param_1[1]; bVar11 = 4; uVar5 = 1; lVar8 = 8; local_48 = param_1; local_38 = (long *)param_3; do { local_40 = uVar5; uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28)) (param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]); if ((int)uVar1 < 1) break; lVar9 = lVar9 + (ulong)uVar1; local_88[local_40] = lVar9; lVar4 = param_1[3]; local_50 = *(long *)(lVar4 + 0x28); if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) { local_40 = local_40 + 1; goto LAB_00141863; } uVar5 = local_40 + 1; bVar11 = bVar11 * '\x02'; lVar8 = lVar8 + 8; local_40 = (ulong)local_38; } while (local_38 != (long *)uVar5); if (1 < local_40) { lVar4 = local_48[3]; local_50 = *(long *)(lVar4 + 0x28); LAB_00141863: uVar5 = local_40 * 8; uVar6 = local_40; do { uVar7 = uVar6 - 1; if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) && (0 < *(long *)(lVar4 + 0x18))) { plVar10 = *(long **)(lVar4 + 0x20); plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb; local_88[6] = uVar6 * 8; local_40 = uVar5; local_38 = plVar3; do { if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) && ((*(char *)((long)plVar10 + 0x52) == '\0' && (iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40, iVar2 == 0)))) { *local_48 = (long)plVar10 + 0x32; local_48[1] = local_88[uVar7]; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } uVar5 = uVar5 + -8; uVar6 = uVar7; } while (1 < uVar7); } } } return (long *)0x0; }
15,584
google::protobuf::compiler::python::Generator::SetMessagePbInterval(google::protobuf::Descriptor const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::SetMessagePbInterval(const Descriptor& descriptor) const { DescriptorProto message_proto; PrintSerializedPbInterval(descriptor, message_proto, ModuleLevelDescriptorName(descriptor)); // Nested messages. for (int i = 0; i < descriptor.nested_type_count(); ++i) { SetMessagePbInterval(*descriptor.nested_type(i)); } for (int i = 0; i < descriptor.enum_type_count(); ++i) { EnumDescriptorProto proto; const EnumDescriptor& enum_des = *descriptor.enum_type(i); PrintSerializedPbInterval(enum_des, proto, ModuleLevelDescriptorName(enum_des)); } }
O0
cpp
google::protobuf::compiler::python::Generator::SetMessagePbInterval(google::protobuf::Descriptor const&) const: subq $0x208, %rsp # imm = 0x208 movq %rdi, 0x200(%rsp) movq %rsi, 0x1f8(%rsp) movq 0x200(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0x110(%rsp), %rdi callq 0xc0810 movq 0x30(%rsp), %rsi movq 0x1f8(%rsp), %rdx movq %rdx, 0x38(%rsp) leaq 0xf0(%rsp), %rdi callq 0xbf960 jmp 0xbddb2 movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdi leaq 0x110(%rsp), %rdx leaq 0xf0(%rsp), %rcx callq 0xc0830 jmp 0xbddd3 leaq 0xf0(%rsp), %rdi callq 0x21cc8 movl $0x0, 0xe0(%rsp) movl 0xe0(%rsp), %eax movl %eax, 0x28(%rsp) movq 0x1f8(%rsp), %rdi callq 0x3cb40 movl %eax, 0x2c(%rsp) jmp 0xbde09 movl 0x28(%rsp), %eax movl 0x2c(%rsp), %ecx cmpl %ecx, %eax jge 0xbde99 movq 0x1f8(%rsp), %rdi movl 0xe0(%rsp), %esi callq 0x3cb50 movq %rax, 0x20(%rsp) jmp 0xbde34 movq 0x20(%rsp), %rsi movq 0x30(%rsp), %rdi callq 0xbdd60 jmp 0xbde45 jmp 0xbde47 movl 0xe0(%rsp), %eax addl $0x1, %eax movl %eax, 0xe0(%rsp) jmp 0xbddeb movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0xbdfb8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0xf0(%rsp), %rdi callq 0x21cc8 jmp 0xbdfb8 movl $0x0, 0xdc(%rsp) movl 0xdc(%rsp), %eax movl %eax, 0x18(%rsp) movq 0x1f8(%rsp), %rdi callq 0x5ad50 movl %eax, 0x1c(%rsp) jmp 0xbdec2 movl 0x18(%rsp), %eax movl 0x1c(%rsp), %ecx cmpl %ecx, %eax jge 0xbdfa3 leaq 0x68(%rsp), %rdi callq 0xbf800 jmp 0xbdede movq 0x1f8(%rsp), %rdi movl 0xdc(%rsp), %esi callq 0x6eea0 movq %rax, 0x10(%rsp) jmp 0xbdef9 movq 0x30(%rsp), %rsi movq 0x10(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rdx movq %rdx, 0x8(%rsp) leaq 0x40(%rsp), %rdi callq 0xbf4c0 jmp 0xbdf1e movq 0x8(%rsp), %rsi movq 0x30(%rsp), %rdi leaq 0x68(%rsp), %rdx leaq 0x40(%rsp), %rcx callq 0xc0290 jmp 0xbdf39 leaq 0x40(%rsp), %rdi callq 0x21cc8 leaq 0x68(%rsp), %rdi callq 0x2bc640 movl 0xdc(%rsp), %eax addl $0x1, %eax movl %eax, 0xdc(%rsp) jmp 0xbdea4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0xbdf97 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0x40(%rsp), %rdi callq 0x21cc8 leaq 0x68(%rsp), %rdi callq 0x2bc640 jmp 0xbdfb8 leaq 0x110(%rsp), %rdi callq 0x2b46e0 addq $0x208, %rsp # imm = 0x208 retq leaq 0x110(%rsp), %rdi callq 0x2b46e0 movq 0xe8(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf8compiler6python9Generator20SetMessagePbIntervalERKNS0_10DescriptorE: sub rsp, 208h mov qword ptr [rsp+208h+var_8], rdi mov [rsp+208h+var_10], rsi mov rax, qword ptr [rsp+208h+var_8] mov [rsp+208h+var_1D8], rax; int lea rdi, [rsp+208h+var_F8]; this call _ZN6google8protobuf15DescriptorProtoC2Ev; google::protobuf::DescriptorProto::DescriptorProto(void) mov rsi, [rsp+208h+var_1D8] mov rdx, [rsp+208h+var_10] mov qword ptr [rsp+208h+var_1D0], rdx; char lea rdi, [rsp+208h+var_118]; int call _ZNK6google8protobuf8compiler6python9Generator25ModuleLevelDescriptorNameINS0_10DescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>(google::protobuf::Descriptor const&) jmp short $+2 loc_BDDB2: mov rsi, qword ptr [rsp+208h+var_1D0] mov rdi, [rsp+208h+var_1D8] lea rdx, [rsp+208h+var_F8] lea rcx, [rsp+208h+var_118] call _ZNK6google8protobuf8compiler6python9Generator25PrintSerializedPbIntervalINS0_10DescriptorENS0_15DescriptorProtoEEEvRKT_RT0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto>(google::protobuf::Descriptor const&,google::protobuf::DescriptorProto &,std::string const&) jmp short $+2 loc_BDDD3: lea rdi, [rsp+208h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov dword ptr [rsp+208h+var_128], 0 loc_BDDEB: mov eax, dword ptr [rsp+208h+var_128] mov dword ptr [rsp+208h+var_1E0], eax; int mov rdi, [rsp+208h+var_10]; this call _ZNK6google8protobuf10Descriptor17nested_type_countEv; google::protobuf::Descriptor::nested_type_count(void) mov [rsp+208h+var_1DC], eax jmp short $+2 loc_BDE09: mov eax, dword ptr [rsp+208h+var_1E0] mov ecx, [rsp+208h+var_1DC] cmp eax, ecx jge loc_BDE99 mov rdi, [rsp+208h+var_10]; this mov esi, dword ptr [rsp+208h+var_128]; int call _ZNK6google8protobuf10Descriptor11nested_typeEi; google::protobuf::Descriptor::nested_type(int) mov [rsp+208h+var_1E8], rax; int jmp short $+2 loc_BDE34: mov rsi, [rsp+208h+var_1E8]; google::protobuf::Descriptor * mov rdi, [rsp+208h+var_1D8]; this call _ZNK6google8protobuf8compiler6python9Generator20SetMessagePbIntervalERKNS0_10DescriptorE; google::protobuf::compiler::python::Generator::SetMessagePbInterval(google::protobuf::Descriptor const&) jmp short $+2 loc_BDE45: jmp short $+2 loc_BDE47: mov eax, dword ptr [rsp+208h+var_128] add eax, 1 mov dword ptr [rsp+208h+var_128], eax jmp short loc_BDDEB mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax jmp loc_BDFB8 mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax lea rdi, [rsp+arg_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_BDFB8 loc_BDE99: mov [rsp+208h+var_12C], 0 loc_BDEA4: mov eax, [rsp+208h+var_12C] mov [rsp+208h+var_1F0], eax; int mov rdi, [rsp+208h+var_10]; this call _ZNK6google8protobuf10Descriptor15enum_type_countEv; google::protobuf::Descriptor::enum_type_count(void) mov [rsp+208h+var_1EC], eax jmp short $+2 loc_BDEC2: mov eax, [rsp+208h+var_1F0] mov ecx, [rsp+208h+var_1EC] cmp eax, ecx jge loc_BDFA3 lea rdi, [rsp+208h+var_1A0]; this call _ZN6google8protobuf19EnumDescriptorProtoC2Ev; google::protobuf::EnumDescriptorProto::EnumDescriptorProto(void) jmp short $+2 loc_BDEDE: mov rdi, [rsp+208h+var_10]; this mov esi, [rsp+208h+var_12C]; int call _ZNK6google8protobuf10Descriptor9enum_typeEi; google::protobuf::Descriptor::enum_type(int) mov [rsp+208h+var_1F8], rax; void * jmp short $+2 loc_BDEF9: mov rsi, [rsp+208h+var_1D8] mov rax, [rsp+208h+var_1F8] mov qword ptr [rsp+208h+var_1A8], rax; int mov rdx, qword ptr [rsp+208h+var_1A8] mov qword ptr [rsp+208h+var_200], rdx; int lea rdi, [rsp+208h+var_1C8]; int call _ZNK6google8protobuf8compiler6python9Generator25ModuleLevelDescriptorNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const&) jmp short $+2 loc_BDF1E: mov rsi, qword ptr [rsp+208h+var_200] mov rdi, [rsp+208h+var_1D8] lea rdx, [rsp+208h+var_1A0] lea rcx, [rsp+208h+var_1C8] call _ZNK6google8protobuf8compiler6python9Generator25PrintSerializedPbIntervalINS0_14EnumDescriptorENS0_19EnumDescriptorProtoEEEvRKT_RT0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::EnumDescriptor,google::protobuf::EnumDescriptorProto>(google::protobuf::EnumDescriptor const&,google::protobuf::EnumDescriptorProto &,std::string const&) jmp short $+2 loc_BDF39: lea rdi, [rsp+208h+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+208h+var_1A0]; this call _ZN6google8protobuf19EnumDescriptorProtoD2Ev; google::protobuf::EnumDescriptorProto::~EnumDescriptorProto() mov eax, [rsp+208h+var_12C] add eax, 1 mov [rsp+208h+var_12C], eax jmp loc_BDEA4 mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax jmp short loc_BDF97 mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BDF97: lea rdi, [rsp+arg_60]; this call _ZN6google8protobuf19EnumDescriptorProtoD2Ev; google::protobuf::EnumDescriptorProto::~EnumDescriptorProto() jmp short loc_BDFB8 loc_BDFA3: lea rdi, [rsp+208h+var_F8]; this call _ZN6google8protobuf15DescriptorProtoD2Ev; google::protobuf::DescriptorProto::~DescriptorProto() add rsp, 208h retn loc_BDFB8: lea rdi, [rsp+arg_108]; this call _ZN6google8protobuf15DescriptorProtoD2Ev; google::protobuf::DescriptorProto::~DescriptorProto() mov rdi, [rsp+arg_E0] call __Unwind_Resume
void google::protobuf::compiler::python::Generator::SetMessagePbInterval( google::protobuf::compiler::python::Generator *this, const google::protobuf::Descriptor *a2) { int v2; // r8d int v3; // r9d int v4; // r8d int v5; // r9d void *v6; // [rsp+0h] [rbp-208h] int v7; // [rsp+0h] [rbp-208h] int v8; // [rsp+0h] [rbp-208h] int v9; // [rsp+0h] [rbp-208h] int v10; // [rsp+8h] [rbp-200h] int v11; // [rsp+8h] [rbp-200h] int v12; // [rsp+8h] [rbp-200h] int v13; // [rsp+10h] [rbp-1F8h] int v14; // [rsp+10h] [rbp-1F8h] void *v15; // [rsp+10h] [rbp-1F8h] int v16; // [rsp+10h] [rbp-1F8h] int v17; // [rsp+18h] [rbp-1F0h] int v18; // [rsp+18h] [rbp-1F0h] int v19; // [rsp+18h] [rbp-1F0h] int v20; // [rsp+18h] [rbp-1F0h] int v21; // [rsp+20h] [rbp-1E8h] int v22; // [rsp+20h] [rbp-1E8h] google::protobuf::Descriptor *v23; // [rsp+20h] [rbp-1E8h] int v24; // [rsp+20h] [rbp-1E8h] char v25; // [rsp+28h] [rbp-1E0h] char v26[4]; // [rsp+28h] [rbp-1E0h] int v27; // [rsp+28h] [rbp-1E0h] char v28[4]; // [rsp+28h] [rbp-1E0h] int v29; // [rsp+30h] [rbp-1D8h] google::protobuf::compiler::python::Generator *v30; // [rsp+30h] [rbp-1D8h] int v31; // [rsp+30h] [rbp-1D8h] int v32; // [rsp+38h] [rbp-1D0h] char v33; // [rsp+38h] [rbp-1D0h] int v34; // [rsp+38h] [rbp-1D0h] int v35; // [rsp+40h] [rbp-1C8h] BYREF int v36; // [rsp+48h] [rbp-1C0h] int v37; // [rsp+50h] [rbp-1B8h] int v38; // [rsp+58h] [rbp-1B0h] int v39[2]; // [rsp+60h] [rbp-1A8h] int v40; // [rsp+68h] [rbp-1A0h] BYREF int v41; // [rsp+70h] [rbp-198h] int v42; // [rsp+78h] [rbp-190h] int v43; // [rsp+80h] [rbp-188h] int v44; // [rsp+88h] [rbp-180h] int v45; // [rsp+90h] [rbp-178h] int v46; // [rsp+98h] [rbp-170h] int v47; // [rsp+A0h] [rbp-168h] int v48; // [rsp+A8h] [rbp-160h] long long v49; // [rsp+B0h] [rbp-158h] int v50; // [rsp+B8h] [rbp-150h] long long v51; // [rsp+C0h] [rbp-148h] int v52; // [rsp+C8h] [rbp-140h] int v53; // [rsp+D0h] [rbp-138h] int v54; // [rsp+D8h] [rbp-130h] int i; // [rsp+DCh] [rbp-12Ch] char v56[4]; // [rsp+E0h] [rbp-128h] char v57; // [rsp+E8h] [rbp-120h] int v58; // [rsp+F0h] [rbp-118h] BYREF int v59; // [rsp+F8h] [rbp-110h] int v60; // [rsp+100h] [rbp-108h] int v61; // [rsp+108h] [rbp-100h] int v62; // [rsp+110h] [rbp-F8h] BYREF int v63; // [rsp+118h] [rbp-F0h] int v64; // [rsp+120h] [rbp-E8h] long long v65; // [rsp+128h] [rbp-E0h] char v66; // [rsp+130h] [rbp-D8h] google::protobuf::Descriptor *v67; // [rsp+1F8h] [rbp-10h] int v68[2]; // [rsp+200h] [rbp-8h] *(_QWORD *)v68 = this; v67 = a2; google::protobuf::DescriptorProto::DescriptorProto((google::protobuf::DescriptorProto *)&v62); google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::Descriptor>( (int)&v58, v6, v10, v13, v17, v21, v25, (int)this, (int)v67, v35, v36, v37, v38, v39[0], v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51); google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto>( v29, v32, (unsigned int)&v62, (unsigned int)&v58, v2, v3, v7, v11, v14, v18, v22, *(_DWORD *)v26, v29, v32, v35, v36, v37, v38, v39[0], v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, *(_DWORD *)v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66); std::string::~string(&v58); for ( *(_DWORD *)v56 = 0; ; ++*(_DWORD *)v56 ) { v27 = *(_DWORD *)v56; if ( *(int *)v56 >= (int)google::protobuf::Descriptor::nested_type_count(v67) ) break; v23 = (google::protobuf::Descriptor *)google::protobuf::Descriptor::nested_type(v67, *(int *)v56); google::protobuf::compiler::python::Generator::SetMessagePbInterval(v30, v23); } for ( i = 0; ; ++i ) { v19 = i; if ( v19 >= (int)google::protobuf::Descriptor::enum_type_count(v67) ) break; google::protobuf::EnumDescriptorProto::EnumDescriptorProto((google::protobuf::EnumDescriptorProto *)&v40); v15 = (void *)google::protobuf::Descriptor::enum_type(v67, i); google::protobuf::compiler::python::Generator::ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>( (int)&v35, v8, (int)v15, v15, v19, (int)v23, v27, (int)v30, v33, v35, v36, v37, v38, (int)v15, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53); google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::EnumDescriptor,google::protobuf::EnumDescriptorProto>( v31, v12, (unsigned int)&v40, (unsigned int)&v35, v4, v5, v9, v12, v16, v20, v24, *(_DWORD *)v28, v31, v34, v35, v36, v37, v38, v39[0], v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, *(_DWORD *)v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66); std::string::~string(&v35); google::protobuf::EnumDescriptorProto::~EnumDescriptorProto((google::protobuf::EnumDescriptorProto *)&v40); } google::protobuf::DescriptorProto::~DescriptorProto((google::protobuf::DescriptorProto *)&v62); }
SetMessagePbInterval: SUB RSP,0x208 MOV qword ptr [RSP + 0x200],RDI MOV qword ptr [RSP + 0x1f8],RSI MOV RAX,qword ptr [RSP + 0x200] MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x110] CALL 0x001c0810 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x1f8] MOV qword ptr [RSP + 0x38],RDX LAB_001bdda3: LEA RDI,[RSP + 0xf0] CALL 0x001bf960 JMP 0x001bddb2 LAB_001bddb2: MOV RSI,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x30] LEA RDX,[RSP + 0x110] LEA RCX,[RSP + 0xf0] CALL 0x001c0830 JMP 0x001bddd3 LAB_001bddd3: LEA RDI,[RSP + 0xf0] CALL 0x00121cc8 MOV dword ptr [RSP + 0xe0],0x0 LAB_001bddeb: MOV EAX,dword ptr [RSP + 0xe0] MOV dword ptr [RSP + 0x28],EAX MOV RDI,qword ptr [RSP + 0x1f8] LAB_001bddfe: CALL 0x0013cb40 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001bde09 LAB_001bde09: MOV EAX,dword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x2c] CMP EAX,ECX JGE 0x001bde99 MOV RDI,qword ptr [RSP + 0x1f8] MOV ESI,dword ptr [RSP + 0xe0] CALL 0x0013cb50 MOV qword ptr [RSP + 0x20],RAX JMP 0x001bde34 LAB_001bde34: MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x30] CALL 0x001bdd60 JMP 0x001bde45 LAB_001bde45: JMP 0x001bde47 LAB_001bde47: MOV EAX,dword ptr [RSP + 0xe0] ADD EAX,0x1 MOV dword ptr [RSP + 0xe0],EAX JMP 0x001bddeb LAB_001bde99: MOV dword ptr [RSP + 0xdc],0x0 LAB_001bdea4: MOV EAX,dword ptr [RSP + 0xdc] MOV dword ptr [RSP + 0x18],EAX MOV RDI,qword ptr [RSP + 0x1f8] CALL 0x0015ad50 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001bdec2 LAB_001bdec2: MOV EAX,dword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0x1c] CMP EAX,ECX JGE 0x001bdfa3 LEA RDI,[RSP + 0x68] CALL 0x001bf800 JMP 0x001bdede LAB_001bdede: MOV RDI,qword ptr [RSP + 0x1f8] MOV ESI,dword ptr [RSP + 0xdc] LAB_001bdeed: CALL 0x0016eea0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001bdef9 LAB_001bdef9: MOV RSI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x60],RAX MOV RDX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x8],RDX LEA RDI,[RSP + 0x40] CALL 0x001bf4c0 JMP 0x001bdf1e LAB_001bdf1e: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x30] LEA RDX,[RSP + 0x68] LEA RCX,[RSP + 0x40] CALL 0x001c0290 LAB_001bdf37: JMP 0x001bdf39 LAB_001bdf39: LEA RDI,[RSP + 0x40] CALL 0x00121cc8 LEA RDI,[RSP + 0x68] CALL 0x003bc640 MOV EAX,dword ptr [RSP + 0xdc] ADD EAX,0x1 MOV dword ptr [RSP + 0xdc],EAX JMP 0x001bdea4 LAB_001bdfa3: LEA RDI,[RSP + 0x110] CALL 0x003b46e0 ADD RSP,0x208 RET
/* google::protobuf::compiler::python::Generator::SetMessagePbInterval(google::protobuf::Descriptor const&) const */ void __thiscall google::protobuf::compiler::python::Generator::SetMessagePbInterval (Generator *this,Descriptor *param_1) { int iVar1; int iVar2; Descriptor *pDVar3; EnumDescriptor *pEVar4; EnumDescriptor local_1c8 [32]; EnumDescriptor *local_1a8; EnumDescriptorProto local_1a0 [116]; int local_12c; int local_128; Descriptor local_118 [32]; DescriptorProto local_f8 [232]; Descriptor *local_10; Generator *local_8; local_10 = param_1; local_8 = this; DescriptorProto::DescriptorProto(local_f8); pDVar3 = local_10; /* try { // try from 001bdda3 to 001bddaf has its CatchHandler @ 001bde5a */ ModuleLevelDescriptorName<google::protobuf::Descriptor>(local_118); /* try { // try from 001bddb2 to 001bddd0 has its CatchHandler @ 001bde73 */ PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto> (this,pDVar3,local_f8,(string *)local_118); std::__cxx11::string::~string((string *)local_118); local_128 = 0; while( true ) { iVar1 = local_128; /* try { // try from 001bddfe to 001bdedb has its CatchHandler @ 001bde5a */ iVar2 = Descriptor::nested_type_count(local_10); if (iVar2 <= iVar1) break; pDVar3 = (Descriptor *)Descriptor::nested_type(local_10,local_128); SetMessagePbInterval(this,pDVar3); local_128 = local_128 + 1; } local_12c = 0; while( true ) { iVar1 = local_12c; iVar2 = Descriptor::enum_type_count(local_10); if (iVar2 <= iVar1) break; EnumDescriptorProto::EnumDescriptorProto(local_1a0); /* try { // try from 001bdeed to 001bdf1b has its CatchHandler @ 001bdf63 */ pEVar4 = (EnumDescriptor *)Descriptor::enum_type(local_10,local_12c); local_1a8 = pEVar4; ModuleLevelDescriptorName<google::protobuf::EnumDescriptor>(local_1c8); /* try { // try from 001bdf1e to 001bdf36 has its CatchHandler @ 001bdf79 */ PrintSerializedPbInterval<google::protobuf::EnumDescriptor,google::protobuf::EnumDescriptorProto> (this,pEVar4,local_1a0,(string *)local_1c8); std::__cxx11::string::~string((string *)local_1c8); EnumDescriptorProto::~EnumDescriptorProto(local_1a0); local_12c = local_12c + 1; } DescriptorProto::~DescriptorProto(local_f8); return; }
15,585
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<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<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, minja::Value>>>::count(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const
monkey531[P]llama/common/json.hpp
size_type count(const key_type& key) const { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return 1; } } return 0; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<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<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, minja::Value>>>::count(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rcx movq %rcx, %r15 movq 0x8(%r14), %r12 cmpq %r12, %rcx je 0x6e7f4 movq %r15, %rdi movq %rbx, %rsi callq 0x684bc leaq 0x60(%r15), %rcx testb %al, %al je 0x6e7d5 xorl %eax, %eax cmpq %r12, %r15 setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZNK8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5countERSJ_: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov rcx, [rdi] loc_6E7D5: mov r15, rcx mov r12, [r14+8] cmp rcx, r12 jz short loc_6E7F4 mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,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&) lea rcx, [r15+60h] test al, al jz short loc_6E7D5 loc_6E7F4: xor eax, eax cmp r15, r12 setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
_BOOL8 nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::count( unsigned __int8 **a1, unsigned __int8 *a2, __m128d a3) { unsigned __int8 *v3; // rcx unsigned __int8 *v4; // r15 unsigned __int8 *v5; // r12 char v6; // al v3 = *a1; do { v4 = v3; v5 = a1[1]; if ( v3 == v5 ) break; v6 = nlohmann::json_abi_v3_11_3::operator==(v3, a2, a3); v3 = v4 + 96; } while ( !v6 ); return v4 != v5; }
count: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RCX,qword ptr [RDI] LAB_0016e7d5: MOV R15,RCX MOV R12,qword ptr [R14 + 0x8] CMP RCX,R12 JZ 0x0016e7f4 MOV RDI,R15 MOV RSI,RBX CALL 0x001684bc LEA RCX,[R15 + 0x60] TEST AL,AL JZ 0x0016e7d5 LAB_0016e7f4: XOR EAX,EAX CMP R15,R12 SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::count(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) const */ bool __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::count(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { basic_json *pbVar1; basic_json *pbVar2; char cVar3; basic_json *pbVar4; pbVar2 = *(basic_json **)this; do { pbVar4 = pbVar2; pbVar1 = *(basic_json **)(this + 8); if (pbVar4 == pbVar1) break; cVar3 = json_abi_v3_11_3::operator==(pbVar4,param_1); pbVar2 = pbVar4 + 0x60; } while (cVar3 == '\0'); return pbVar4 != pbVar1; }
15,586
my_error_unregister
eloqsql/mysys/my_error.c
my_bool my_error_unregister(uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Search for the registration in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if (((*search_meh_pp)->meh_first == first) && ((*search_meh_pp)->meh_last == last)) break; } if (! *search_meh_pp) return TRUE; /* Remove header from the chain. */ meh_p= *search_meh_pp; *search_meh_pp= meh_p->meh_next; my_free(meh_p); return FALSE; }
O3
c
my_error_unregister: movq 0x2cd519(%rip), %r8 # 0x31a058 movb $0x1, %al testq %r8, %r8 je 0x4cb7d pushq %rbp movq %rsp, %rbp leaq 0x2cd507(%rip), %rdx # 0x31a058 movq %r8, %rcx cmpl %edi, 0x10(%r8) jne 0x4cb5f cmpl %esi, 0x14(%rcx) je 0x4cb6c movq (%rcx), %r8 movq %rcx, %rdx testq %r8, %r8 jne 0x4cb51 jmp 0x4cb7c movq (%rcx), %rax movq %rax, (%rdx) movq %rcx, %rdi callq 0x468ee xorl %eax, %eax popq %rbp retq
my_error_unregister: mov r8, cs:my_errmsgs_list mov al, 1 test r8, r8 jz short locret_4CB7D push rbp mov rbp, rsp lea rdx, my_errmsgs_list loc_4CB51: mov rcx, r8 cmp [r8+10h], edi jnz short loc_4CB5F cmp [rcx+14h], esi jz short loc_4CB6C loc_4CB5F: mov r8, [rcx] mov rdx, rcx test r8, r8 jnz short loc_4CB51 jmp short loc_4CB7C loc_4CB6C: mov rax, [rcx] mov [rdx], rax mov rdi, rcx call my_free xor eax, eax loc_4CB7C: pop rbp locret_4CB7D: retn
char my_error_unregister(int a1, int a2) { long long *v2; // r8 char result; // al long long **v4; // rdx long long *v5; // rcx v2 = my_errmsgs_list; result = 1; if ( my_errmsgs_list ) { v4 = &my_errmsgs_list; while ( 1 ) { v5 = v2; if ( *((_DWORD *)v2 + 4) == a1 && *((_DWORD *)v2 + 5) == a2 ) break; v2 = (long long *)*v2; v4 = (long long **)v5; if ( !*v5 ) return result; } *v4 = (long long *)*v2; my_free((long long)v2); return 0; } return result; }
my_error_unregister: MOV R8,qword ptr [0x0041a058] MOV AL,0x1 TEST R8,R8 JZ 0x0014cb7d PUSH RBP MOV RBP,RSP LEA RDX,[0x41a058] LAB_0014cb51: MOV RCX,R8 CMP dword ptr [R8 + 0x10],EDI JNZ 0x0014cb5f CMP dword ptr [RCX + 0x14],ESI JZ 0x0014cb6c LAB_0014cb5f: MOV R8,qword ptr [RCX] MOV RDX,RCX TEST R8,R8 JNZ 0x0014cb51 JMP 0x0014cb7c LAB_0014cb6c: MOV RAX,qword ptr [RCX] MOV qword ptr [RDX],RAX MOV RDI,RCX CALL 0x001468ee XOR EAX,EAX LAB_0014cb7c: POP RBP LAB_0014cb7d: RET
int8 my_error_unregister(int param_1,int param_2) { int **ppuVar1; int **ppuVar2; int **ppuVar3; if (my_errmsgs_list != (int *)0x0) { ppuVar2 = &my_errmsgs_list; ppuVar3 = (int **)my_errmsgs_list; do { if ((*(int *)(ppuVar3 + 2) == param_1) && (*(int *)((long)ppuVar3 + 0x14) == param_2)) { *ppuVar2 = *ppuVar3; my_free(ppuVar3); return 0; } ppuVar1 = (int **)*ppuVar3; ppuVar2 = ppuVar3; ppuVar3 = ppuVar1; } while (ppuVar1 != (int **)0x0); } return 1; }
15,587
js_date_parse_isostring
bluesky950520[P]quickjs/quickjs.c
static BOOL js_date_parse_isostring(const uint8_t *sp, int fields[9], BOOL *is_local) { int sgn, i, p = 0; /* initialize fields to the beginning of the Epoch */ for (i = 0; i < 9; i++) { fields[i] = (i == 2); } *is_local = FALSE; /* year is either yyyy digits or [+-]yyyyyy */ sgn = sp[p]; if (sgn == '-' || sgn == '+') { p++; if (!string_get_digits(sp, &p, &fields[0], 6, 6)) return FALSE; if (sgn == '-') { if (fields[0] == 0) return FALSE; // reject -000000 fields[0] = -fields[0]; } } else { if (!string_get_digits(sp, &p, &fields[0], 4, 4)) return FALSE; } if (string_skip_char(sp, &p, '-')) { if (!string_get_digits(sp, &p, &fields[1], 2, 2)) /* month */ return FALSE; if (fields[1] < 1) return FALSE; fields[1] -= 1; if (string_skip_char(sp, &p, '-')) { if (!string_get_digits(sp, &p, &fields[2], 2, 2)) /* day */ return FALSE; if (fields[2] < 1) return FALSE; } } if (string_skip_char(sp, &p, 'T')) { *is_local = TRUE; if (!string_get_digits(sp, &p, &fields[3], 2, 2) /* hour */ || !string_skip_char(sp, &p, ':') || !string_get_digits(sp, &p, &fields[4], 2, 2)) { /* minute */ fields[3] = 100; // reject unconditionally return TRUE; } if (string_skip_char(sp, &p, ':')) { if (!string_get_digits(sp, &p, &fields[5], 2, 2)) /* second */ return FALSE; string_get_milliseconds(sp, &p, &fields[6]); } } /* parse the time zone offset if present: [+-]HH:mm or [+-]HHmm */ if (sp[p]) { *is_local = FALSE; if (!string_get_tzoffset(sp, &p, &fields[8], TRUE)) return FALSE; } /* error if extraneous characters */ return sp[p] == '\0'; }
O0
c
js_date_parse_isostring: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movl $0x0, 0xc(%rsp) movl $0x0, 0x10(%rsp) cmpl $0x9, 0x10(%rsp) jge 0x99bf1 cmpl $0x2, 0x10(%rsp) sete %al andb $0x1, %al movzbl %al, %edx movq 0x20(%rsp), %rax movslq 0x10(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0x99bc3 movq 0x18(%rsp), %rax movl $0x0, (%rax) movq 0x28(%rsp), %rax movslq 0xc(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, 0x14(%rsp) cmpl $0x2d, 0x14(%rsp) je 0x99c1c cmpl $0x2b, 0x14(%rsp) jne 0x99c86 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0xc(%rsp), %rsi movl $0x6, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99c56 movl $0x0, 0x34(%rsp) jmp 0x99f07 cmpl $0x2d, 0x14(%rsp) jne 0x99c84 movq 0x20(%rsp), %rax cmpl $0x0, (%rax) jne 0x99c74 movl $0x0, 0x34(%rsp) jmp 0x99f07 movq 0x20(%rsp), %rax xorl %ecx, %ecx subl (%rax), %ecx movq 0x20(%rsp), %rax movl %ecx, (%rax) jmp 0x99cb7 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0xc(%rsp), %rsi movl $0x4, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99cb5 movl $0x0, 0x34(%rsp) jmp 0x99f07 jmp 0x99cb7 movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rsi movl $0x2d, %edx callq 0x9a6c0 cmpl $0x0, %eax je 0x99d95 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x4, %rdx leaq 0xc(%rsp), %rsi movl $0x2, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99d07 movl $0x0, 0x34(%rsp) jmp 0x99f07 movq 0x20(%rsp), %rax cmpl $0x1, 0x4(%rax) jge 0x99d1f movl $0x0, 0x34(%rsp) jmp 0x99f07 movq 0x20(%rsp), %rax movl 0x4(%rax), %ecx subl $0x1, %ecx movl %ecx, 0x4(%rax) movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rsi movl $0x2d, %edx callq 0x9a6c0 cmpl $0x0, %eax je 0x99d93 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x8, %rdx leaq 0xc(%rsp), %rsi movl $0x2, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99d79 movl $0x0, 0x34(%rsp) jmp 0x99f07 movq 0x20(%rsp), %rax cmpl $0x1, 0x8(%rax) jge 0x99d91 movl $0x0, 0x34(%rsp) jmp 0x99f07 jmp 0x99d93 jmp 0x99d95 movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rsi movl $0x54, %edx callq 0x9a6c0 cmpl $0x0, %eax je 0x99ea1 movq 0x18(%rsp), %rax movl $0x1, (%rax) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0xc, %rdx leaq 0xc(%rsp), %rsi movl $0x2, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax je 0x99e22 movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rsi movl $0x3a, %edx callq 0x9a6c0 cmpl $0x0, %eax je 0x99e22 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x10, %rdx leaq 0xc(%rsp), %rsi movl $0x2, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99e3b movq 0x20(%rsp), %rax movl $0x64, 0xc(%rax) movl $0x1, 0x34(%rsp) jmp 0x99f07 movq 0x28(%rsp), %rdi leaq 0xc(%rsp), %rsi movl $0x3a, %edx callq 0x9a6c0 cmpl $0x0, %eax je 0x99e9f movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x14, %rdx leaq 0xc(%rsp), %rsi movl $0x2, %r8d movl %r8d, %ecx callq 0x9a5f0 cmpl $0x0, %eax jne 0x99e87 movl $0x0, 0x34(%rsp) jmp 0x99f07 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x18, %rdx leaq 0xc(%rsp), %rsi callq 0x9a710 jmp 0x99ea1 movq 0x28(%rsp), %rax movslq 0xc(%rsp), %rcx cmpb $0x0, (%rax,%rcx) je 0x99eea movq 0x18(%rsp), %rax movl $0x0, (%rax) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx addq $0x20, %rdx leaq 0xc(%rsp), %rsi movl $0x1, %ecx callq 0x9a810 cmpl $0x0, %eax jne 0x99ee8 movl $0x0, 0x34(%rsp) jmp 0x99f07 jmp 0x99eea movq 0x28(%rsp), %rax movslq 0xc(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x0, %eax sete %al andb $0x1, %al movzbl %al, %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq
js_date_parse_isostring: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov [rsp+38h+var_2C], 0 mov [rsp+38h+var_28], 0 loc_99BC3: cmp [rsp+38h+var_28], 9 jge short loc_99BF1 cmp [rsp+38h+var_28], 2 setz al and al, 1 movzx edx, al mov rax, [rsp+38h+var_18] movsxd rcx, [rsp+38h+var_28] mov [rax+rcx*4], edx mov eax, [rsp+38h+var_28] add eax, 1 mov [rsp+38h+var_28], eax jmp short loc_99BC3 loc_99BF1: mov rax, [rsp+38h+var_20] mov dword ptr [rax], 0 mov rax, [rsp+38h+var_10] movsxd rcx, [rsp+38h+var_2C] movzx eax, byte ptr [rax+rcx] mov [rsp+38h+var_24], eax cmp [rsp+38h+var_24], 2Dh ; '-' jz short loc_99C1C cmp [rsp+38h+var_24], 2Bh ; '+' jnz short loc_99C86 loc_99C1C: mov eax, [rsp+38h+var_2C] add eax, 1 mov [rsp+38h+var_2C], eax mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] lea rsi, [rsp+38h+var_2C] mov r8d, 6 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99C56 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99C56: cmp [rsp+38h+var_24], 2Dh ; '-' jnz short loc_99C84 mov rax, [rsp+38h+var_18] cmp dword ptr [rax], 0 jnz short loc_99C74 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99C74: mov rax, [rsp+38h+var_18] xor ecx, ecx sub ecx, [rax] mov rax, [rsp+38h+var_18] mov [rax], ecx loc_99C84: jmp short loc_99CB7 loc_99C86: mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] lea rsi, [rsp+38h+var_2C] mov r8d, 4 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99CB5 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99CB5: jmp short $+2 loc_99CB7: mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_2C] mov edx, 2Dh ; '-' call string_skip_char cmp eax, 0 jz loc_99D95 mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 4 lea rsi, [rsp+38h+var_2C] mov r8d, 2 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99D07 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99D07: mov rax, [rsp+38h+var_18] cmp dword ptr [rax+4], 1 jge short loc_99D1F mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99D1F: mov rax, [rsp+38h+var_18] mov ecx, [rax+4] sub ecx, 1 mov [rax+4], ecx mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_2C] mov edx, 2Dh ; '-' call string_skip_char cmp eax, 0 jz short loc_99D93 mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 8 lea rsi, [rsp+38h+var_2C] mov r8d, 2 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99D79 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99D79: mov rax, [rsp+38h+var_18] cmp dword ptr [rax+8], 1 jge short loc_99D91 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99D91: jmp short $+2 loc_99D93: jmp short $+2 loc_99D95: mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_2C] mov edx, 54h ; 'T' call string_skip_char cmp eax, 0 jz loc_99EA1 mov rax, [rsp+38h+var_20] mov dword ptr [rax], 1 mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 0Ch lea rsi, [rsp+38h+var_2C] mov r8d, 2 mov ecx, r8d call string_get_digits cmp eax, 0 jz short loc_99E22 mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_2C] mov edx, 3Ah ; ':' call string_skip_char cmp eax, 0 jz short loc_99E22 mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 10h lea rsi, [rsp+38h+var_2C] mov r8d, 2 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99E3B loc_99E22: mov rax, [rsp+38h+var_18] mov dword ptr [rax+0Ch], 64h ; 'd' mov [rsp+38h+var_4], 1 jmp loc_99F07 loc_99E3B: mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_2C] mov edx, 3Ah ; ':' call string_skip_char cmp eax, 0 jz short loc_99E9F mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 14h lea rsi, [rsp+38h+var_2C] mov r8d, 2 mov ecx, r8d call string_get_digits cmp eax, 0 jnz short loc_99E87 mov [rsp+38h+var_4], 0 jmp loc_99F07 loc_99E87: mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 18h lea rsi, [rsp+38h+var_2C] call string_get_milliseconds loc_99E9F: jmp short $+2 loc_99EA1: mov rax, [rsp+38h+var_10] movsxd rcx, [rsp+38h+var_2C] cmp byte ptr [rax+rcx], 0 jz short loc_99EEA mov rax, [rsp+38h+var_20] mov dword ptr [rax], 0 mov rdi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] add rdx, 20h ; ' ' lea rsi, [rsp+38h+var_2C] mov ecx, 1 call string_get_tzoffset cmp eax, 0 jnz short loc_99EE8 mov [rsp+38h+var_4], 0 jmp short loc_99F07 loc_99EE8: jmp short $+2 loc_99EEA: mov rax, [rsp+38h+var_10] movsxd rcx, [rsp+38h+var_2C] movzx eax, byte ptr [rax+rcx] cmp eax, 0 setz al and al, 1 movzx eax, al mov [rsp+38h+var_4], eax loc_99F07: mov eax, [rsp+38h+var_4] add rsp, 38h retn
_BOOL8 js_date_parse_isostring(long long a1, _DWORD *a2, _DWORD *a3) { int v4; // [rsp+Ch] [rbp-2Ch] BYREF int i; // [rsp+10h] [rbp-28h] int v6; // [rsp+14h] [rbp-24h] _DWORD *v7; // [rsp+18h] [rbp-20h] _DWORD *v8; // [rsp+20h] [rbp-18h] long long v9; // [rsp+28h] [rbp-10h] v9 = a1; v8 = a2; v7 = a3; v4 = 0; for ( i = 0; i < 9; ++i ) v8[i] = i == 2; *v7 = 0; v6 = *(unsigned __int8 *)(v9 + v4); if ( v6 == 45 || v6 == 43 ) { ++v4; if ( !(unsigned int)string_get_digits(v9, &v4, v8, 6LL) ) return 0; if ( v6 == 45 ) { if ( !*v8 ) return 0; *v8 = -*v8; } } else if ( !(unsigned int)string_get_digits(v9, &v4, v8, 4LL) ) { return 0; } if ( (unsigned int)string_skip_char(v9, &v4, 45LL) ) { if ( !(unsigned int)string_get_digits(v9, &v4, v8 + 1, 2LL) ) return 0; if ( (int)v8[1] < 1 ) return 0; --v8[1]; if ( (unsigned int)string_skip_char(v9, &v4, 45LL) ) { if ( !(unsigned int)string_get_digits(v9, &v4, v8 + 2, 2LL) ) return 0; if ( (int)v8[2] < 1 ) return 0; } } if ( (unsigned int)string_skip_char(v9, &v4, 84LL) ) { *v7 = 1; if ( !(unsigned int)string_get_digits(v9, &v4, v8 + 3, 2LL) || !(unsigned int)string_skip_char(v9, &v4, 58LL) || !(unsigned int)string_get_digits(v9, &v4, v8 + 4, 2LL) ) { v8[3] = 100; return 1; } if ( (unsigned int)string_skip_char(v9, &v4, 58LL) ) { if ( !(unsigned int)string_get_digits(v9, &v4, v8 + 5, 2LL) ) return 0; string_get_milliseconds(v9, &v4, v8 + 6); } } if ( !*(_BYTE *)(v9 + v4) ) return *(unsigned __int8 *)(v9 + v4) == 0; *v7 = 0; return (unsigned int)string_get_tzoffset(v9, &v4, v8 + 8, 1LL) && *(unsigned __int8 *)(v9 + v4) == 0; }
js_date_parse_isostring: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0xc],0x0 MOV dword ptr [RSP + 0x10],0x0 LAB_00199bc3: CMP dword ptr [RSP + 0x10],0x9 JGE 0x00199bf1 CMP dword ptr [RSP + 0x10],0x2 SETZ AL AND AL,0x1 MOVZX EDX,AL MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x10] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x10] ADD EAX,0x1 MOV dword ptr [RSP + 0x10],EAX JMP 0x00199bc3 LAB_00199bf1: MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x14],0x2d JZ 0x00199c1c CMP dword ptr [RSP + 0x14],0x2b JNZ 0x00199c86 LAB_00199c1c: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0xc] MOV R8D,0x6 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199c56 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199c56: CMP dword ptr [RSP + 0x14],0x2d JNZ 0x00199c84 MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX],0x0 JNZ 0x00199c74 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199c74: MOV RAX,qword ptr [RSP + 0x20] XOR ECX,ECX SUB ECX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],ECX LAB_00199c84: JMP 0x00199cb7 LAB_00199c86: MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0xc] MOV R8D,0x4 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199cb5 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199cb5: JMP 0x00199cb7 LAB_00199cb7: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xc] MOV EDX,0x2d CALL 0x0019a6c0 CMP EAX,0x0 JZ 0x00199d95 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x4 LEA RSI,[RSP + 0xc] MOV R8D,0x2 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199d07 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199d07: MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x4],0x1 JGE 0x00199d1f MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199d1f: MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RAX + 0x4] SUB ECX,0x1 MOV dword ptr [RAX + 0x4],ECX MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xc] MOV EDX,0x2d CALL 0x0019a6c0 CMP EAX,0x0 JZ 0x00199d93 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x8 LEA RSI,[RSP + 0xc] MOV R8D,0x2 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199d79 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199d79: MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x8],0x1 JGE 0x00199d91 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199d91: JMP 0x00199d93 LAB_00199d93: JMP 0x00199d95 LAB_00199d95: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xc] MOV EDX,0x54 CALL 0x0019a6c0 CMP EAX,0x0 JZ 0x00199ea1 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],0x1 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0xc LEA RSI,[RSP + 0xc] MOV R8D,0x2 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JZ 0x00199e22 MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xc] MOV EDX,0x3a CALL 0x0019a6c0 CMP EAX,0x0 JZ 0x00199e22 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x10 LEA RSI,[RSP + 0xc] MOV R8D,0x2 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199e3b LAB_00199e22: MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0xc],0x64 MOV dword ptr [RSP + 0x34],0x1 JMP 0x00199f07 LAB_00199e3b: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xc] MOV EDX,0x3a CALL 0x0019a6c0 CMP EAX,0x0 JZ 0x00199e9f MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x14 LEA RSI,[RSP + 0xc] MOV R8D,0x2 MOV ECX,R8D CALL 0x0019a5f0 CMP EAX,0x0 JNZ 0x00199e87 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199e87: MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x18 LEA RSI,[RSP + 0xc] CALL 0x0019a710 LAB_00199e9f: JMP 0x00199ea1 LAB_00199ea1: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0xc] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x00199eea MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] ADD RDX,0x20 LEA RSI,[RSP + 0xc] MOV ECX,0x1 CALL 0x0019a810 CMP EAX,0x0 JNZ 0x00199ee8 MOV dword ptr [RSP + 0x34],0x0 JMP 0x00199f07 LAB_00199ee8: JMP 0x00199eea LAB_00199eea: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x34],EAX LAB_00199f07: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
bool js_date_parse_isostring(byte *param_1,int *param_2,int4 *param_3) { int iVar1; int local_2c; int local_28; uint local_24; int4 *local_20; int *local_18; byte *local_10; local_2c = 0; for (local_28 = 0; local_28 < 9; local_28 = local_28 + 1) { param_2[local_28] = (uint)(local_28 == 2); } *param_3 = 0; local_24 = (uint)*param_1; local_20 = param_3; local_18 = param_2; local_10 = param_1; if ((local_24 == 0x2d) || (local_24 == 0x2b)) { local_2c = 1; iVar1 = string_get_digits(param_1,&local_2c,param_2); if (iVar1 == 0) { return false; } if (local_24 == 0x2d) { if (*local_18 == 0) { return false; } *local_18 = -*local_18; } } else { iVar1 = string_get_digits(param_1,&local_2c,param_2,4); if (iVar1 == 0) { return false; } } iVar1 = string_skip_char(local_10,&local_2c,0x2d); if (iVar1 != 0) { iVar1 = string_get_digits(local_10,&local_2c,local_18 + 1,2); if (iVar1 == 0) { return false; } if (local_18[1] < 1) { return false; } local_18[1] = local_18[1] + -1; iVar1 = string_skip_char(local_10,&local_2c,0x2d); if (iVar1 != 0) { iVar1 = string_get_digits(local_10,&local_2c,local_18 + 2,2); if (iVar1 == 0) { return false; } if (local_18[2] < 1) { return false; } } } iVar1 = string_skip_char(local_10,&local_2c,0x54); if (iVar1 != 0) { *local_20 = 1; iVar1 = string_get_digits(local_10,&local_2c,local_18 + 3,2); if (((iVar1 == 0) || (iVar1 = string_skip_char(local_10,&local_2c,0x3a), iVar1 == 0)) || (iVar1 = string_get_digits(local_10,&local_2c,local_18 + 4,2), iVar1 == 0)) { local_18[3] = 100; return true; } iVar1 = string_skip_char(local_10,&local_2c,0x3a); if (iVar1 != 0) { iVar1 = string_get_digits(local_10,&local_2c,local_18 + 5,2); if (iVar1 == 0) { return false; } string_get_milliseconds(local_10,&local_2c,local_18 + 6); } } if (local_10[local_2c] != 0) { *local_20 = 0; iVar1 = string_get_tzoffset(local_10,&local_2c,local_18 + 8,1); if (iVar1 == 0) { return false; } } return local_10[local_2c] == 0; }
15,588
lshift
eloqsql/strings/dtoa.c
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) { int i, k1, n, n1; Bigint *b1; ULong *x, *x1, *xe, z; n= k >> 5; k1= b->k; n1= n + b->wds + 1; for (i= b->maxwds; n1 > i; i<<= 1) k1++; b1= Balloc(k1, alloc); x1= b1->p.x; for (i= 0; i < n; i++) *x1++= 0; x= b->p.x; xe= x + b->wds; if (k&= 0x1f) { k1= 32 - k; z= 0; do { *x1++= *x << k | z; z= *x++ >> k1; } while (x < xe); if ((*x1= z)) ++n1; } else do *x1++= *x++; while (x < xe); b1->wds= n1 - 1; Bfree(b, alloc); return b1; }
O3
c
lshift: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r15d movq %rdi, %r14 movl %esi, %r12d shrl $0x5, %r12d movl 0x8(%rdi), %edi movl 0xc(%r14), %eax movl 0x14(%r14), %ebx addl %r12d, %ebx cmpl %eax, %ebx jl 0xd67b5 incl %edi addl %eax, %eax jmp 0xd67ab movq %rdx, -0x38(%rbp) movq %rdx, %rsi callq 0xd6358 movq (%rax), %r13 cmpl $0x20, %r15d jb 0xd67ec decl %r12d leaq 0x4(,%r12,4), %rdx movq %r13, %rdi xorl %esi, %esi movq %rax, -0x30(%rbp) callq 0x29270 movq -0x30(%rbp), %rax leaq 0x4(%r13,%r12,4), %r13 movq (%r14), %rdx movslq 0x14(%r14), %rcx leaq (%rdx,%rcx,4), %rsi andl $0x1f, %r15d je 0xd6838 movl $0x20, %r9d subl %r15d, %r9d xorl %edi, %edi movl (%rdx), %r8d movl %r15d, %ecx shll %cl, %r8d orl %edi, %r8d movl %r8d, (%r13) addq $0x4, %r13 movl (%rdx), %edi addq $0x4, %rdx movl %r9d, %ecx shrl %cl, %edi cmpq %rsi, %rdx jb 0xd6808 movl %edi, (%r13) cmpl $0x1, %edi sbbl $-0x1, %ebx jmp 0xd684b movl (%rdx), %ecx addq $0x4, %rdx movl %ecx, (%r13) addq $0x4, %r13 cmpq %rsi, %rdx jb 0xd6838 movl %ebx, 0x14(%rax) movq %r14, %rdi movq -0x38(%rbp), %rsi movq %rax, %rbx callq 0xd6751 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
lshift: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, esi mov r14, rdi mov r12d, esi shr r12d, 5 mov edi, [rdi+8] mov eax, [r14+0Ch] mov ebx, [r14+14h] add ebx, r12d loc_D67AB: cmp ebx, eax jl short loc_D67B5 inc edi add eax, eax jmp short loc_D67AB loc_D67B5: mov [rbp+var_38], rdx mov rsi, rdx call Balloc mov r13, [rax] cmp r15d, 20h ; ' ' jb short loc_D67EC dec r12d lea rdx, ds:4[r12*4] mov rdi, r13 xor esi, esi mov [rbp+var_30], rax call _memset mov rax, [rbp+var_30] lea r13, [r13+r12*4+4] loc_D67EC: mov rdx, [r14] movsxd rcx, dword ptr [r14+14h] lea rsi, [rdx+rcx*4] and r15d, 1Fh jz short loc_D6838 mov r9d, 20h ; ' ' sub r9d, r15d xor edi, edi loc_D6808: mov r8d, [rdx] mov ecx, r15d shl r8d, cl or r8d, edi mov [r13+0], r8d add r13, 4 mov edi, [rdx] add rdx, 4 mov ecx, r9d shr edi, cl cmp rdx, rsi jb short loc_D6808 mov [r13+0], edi cmp edi, 1 sbb ebx, 0FFFFFFFFh jmp short loc_D684B loc_D6838: mov ecx, [rdx] add rdx, 4 mov [r13+0], ecx add r13, 4 cmp rdx, rsi jb short loc_D6838 loc_D684B: mov [rax+14h], ebx mov rdi, r14 mov rsi, [rbp+var_38] mov rbx, rax call Bfree mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3) { char v3; // r15 int v5; // edi int v6; // eax int v7; // ebx long long v8; // rax int *v9; // r13 long long v10; // r12 int *v11; // rdx unsigned long long v12; // rsi int v13; // r15d int v14; // edi unsigned int v15; // edi int v16; // ecx long long v17; // rbx long long v20; // [rsp+10h] [rbp-30h] v3 = a2; v5 = *(_DWORD *)(a1 + 8); v6 = *(_DWORD *)(a1 + 12); v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20); while ( v7 >= v6 ) { ++v5; v6 *= 2; } v8 = Balloc(v5, (long long)a3); v9 = *(int **)v8; if ( a2 >= 0x20 ) { v10 = (a2 >> 5) - 1; v20 = v8; memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4); v8 = v20; v9 += v10 + 1; } v11 = *(int **)a1; v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20); v13 = v3 & 0x1F; if ( v13 ) { v14 = 0; do { *v9++ = v14 | (*v11 << v13); v15 = *v11++; v14 = v15 >> (32 - v13); } while ( (unsigned long long)v11 < v12 ); *v9 = v14; v7 -= (v14 == 0) - 1; } else { do { v16 = *v11++; *v9++ = v16; } while ( (unsigned long long)v11 < v12 ); } *(_DWORD *)(v8 + 20) = v7; v17 = v8; Bfree(a1, a3); return v17; }
lshift: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,ESI MOV R14,RDI MOV R12D,ESI SHR R12D,0x5 MOV EDI,dword ptr [RDI + 0x8] MOV EAX,dword ptr [R14 + 0xc] MOV EBX,dword ptr [R14 + 0x14] ADD EBX,R12D LAB_001d67ab: CMP EBX,EAX JL 0x001d67b5 INC EDI ADD EAX,EAX JMP 0x001d67ab LAB_001d67b5: MOV qword ptr [RBP + -0x38],RDX MOV RSI,RDX CALL 0x001d6358 MOV R13,qword ptr [RAX] CMP R15D,0x20 JC 0x001d67ec DEC R12D LEA RDX,[0x4 + R12*0x4] MOV RDI,R13 XOR ESI,ESI MOV qword ptr [RBP + -0x30],RAX CALL 0x00129270 MOV RAX,qword ptr [RBP + -0x30] LEA R13,[R13 + R12*0x4 + 0x4] LAB_001d67ec: MOV RDX,qword ptr [R14] MOVSXD RCX,dword ptr [R14 + 0x14] LEA RSI,[RDX + RCX*0x4] AND R15D,0x1f JZ 0x001d6838 MOV R9D,0x20 SUB R9D,R15D XOR EDI,EDI LAB_001d6808: MOV R8D,dword ptr [RDX] MOV ECX,R15D SHL R8D,CL OR R8D,EDI MOV dword ptr [R13],R8D ADD R13,0x4 MOV EDI,dword ptr [RDX] ADD RDX,0x4 MOV ECX,R9D SHR EDI,CL CMP RDX,RSI JC 0x001d6808 MOV dword ptr [R13],EDI CMP EDI,0x1 SBB EBX,-0x1 JMP 0x001d684b LAB_001d6838: MOV ECX,dword ptr [RDX] ADD RDX,0x4 MOV dword ptr [R13],ECX ADD R13,0x4 CMP RDX,RSI JC 0x001d6838 LAB_001d684b: MOV dword ptr [RAX + 0x14],EBX MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x38] MOV RBX,RAX CALL 0x001d6751 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * lshift(int8 *param_1,uint param_2,int8 param_3) { uint *puVar1; sbyte sVar2; int iVar3; int8 *puVar4; uint *puVar5; int iVar6; uint uVar7; ulong uVar8; uint *__s; iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5); for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) { } puVar4 = (int8 *)Balloc(); __s = (uint *)*puVar4; if (0x1f < param_2) { uVar8 = (ulong)((param_2 >> 5) - 1); memset(__s,0,uVar8 * 4 + 4); __s = __s + uVar8 + 1; } puVar5 = (uint *)*param_1; puVar1 = puVar5 + *(int *)((long)param_1 + 0x14); if ((param_2 & 0x1f) == 0) { do { uVar7 = *puVar5; puVar5 = puVar5 + 1; *__s = uVar7; __s = __s + 1; } while (puVar5 < puVar1); } else { sVar2 = (sbyte)(param_2 & 0x1f); uVar7 = 0; do { *__s = *puVar5 << sVar2 | uVar7; __s = __s + 1; uVar7 = *puVar5; puVar5 = puVar5 + 1; uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f); } while (puVar5 < puVar1); *__s = uVar7; iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0); } *(int *)((long)puVar4 + 0x14) = iVar6; Bfree(param_1,param_3); return puVar4; }
15,589
minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const
monkey531[P]llama/common/minja.hpp
void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const { auto print_indent = [&](int level) { if (indent > 0) { out << "\n"; for (int i = 0, n = level * indent; i < n; ++i) out << ' '; } }; auto print_sub_sep = [&]() { out << ','; if (indent < 0) out << ' '; else print_indent(level + 1); }; auto string_quote = to_json ? '"' : '\''; if (is_null()) out << "null"; else if (array_) { out << "["; print_indent(level + 1); for (size_t i = 0; i < array_->size(); ++i) { if (i) print_sub_sep(); (*array_)[i].dump(out, indent, level + 1, to_json); } print_indent(level); out << "]"; } else if (object_) { out << "{"; print_indent(level + 1); for (auto begin = object_->begin(), it = begin; it != object_->end(); ++it) { if (it != begin) print_sub_sep(); if (it->first.is_string()) { dump_string(it->first, out, string_quote); } else { out << string_quote << it->first.dump() << string_quote; } out << ": "; it->second.dump(out, indent, level + 1, to_json); } print_indent(level); out << "}"; } else if (callable_) { throw std::runtime_error("Cannot dump callable to JSON"); } else if (is_boolean() && !to_json) { out << (this->to_bool() ? "True" : "False"); } else if (is_string() && !to_json) { dump_string(primitive_, out, string_quote); } else { out << primitive_.dump(); } }
O2
cpp
minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const: pushq %rbp pushq %r14 pushq %rbx movq (%rdi), %rax cmpl $0x0, (%rax) jle 0x64db6 movl %esi, %ebp movq %rdi, %rbx movq 0x8(%rdi), %rdi leaq 0x46846(%rip), %rsi # 0xab5d2 callq 0x238b0 movq (%rbx), %rax imull (%rax), %ebp xorl %r14d, %r14d testl %ebp, %ebp cmovgl %ebp, %r14d pushq $0x20 popq %rbp subl $0x1, %r14d jb 0x64db6 movq 0x8(%rbx), %rdi movl %ebp, %esi callq 0x23a60 jmp 0x64da3 popq %rbx popq %r14 popq %rbp retq nop
_ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi: push rbp push r14 push rbx mov rax, [rdi] cmp dword ptr [rax], 0 jle short loc_64DB6 mov ebp, esi mov rbx, rdi mov rdi, [rdi+8] lea rsi, aInfillMode+1Bh; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rax, [rbx] imul ebp, [rax] xor r14d, r14d test ebp, ebp cmovg r14d, ebp push 20h ; ' ' pop rbp loc_64DA3: sub r14d, 1 jb short loc_64DB6 mov rdi, [rbx+8] mov esi, ebp call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short loc_64DA3 loc_64DB6: pop rbx pop r14 pop rbp retn
int * minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()( int **a1, int a2) { int *result; // rax int v3; // r14d result = *a1; if ( **a1 > 0 ) { std::operator<<<std::char_traits<char>>(a1[1], "\n"); result = *a1; v3 = 0; if ( **a1 * a2 > 0 ) v3 = **a1 * a2; while ( v3-- != 0 ) result = (int *)std::operator<<<std::char_traits<char>>(a1[1], 32LL); } return result; }
operator(): PUSH RBP PUSH R14 PUSH RBX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX],0x0 JLE 0x00164db6 MOV EBP,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] LEA RSI,[0x1ab5d2] CALL 0x001238b0 MOV RAX,qword ptr [RBX] IMUL EBP,dword ptr [RAX] XOR R14D,R14D TEST EBP,EBP CMOVG R14D,EBP PUSH 0x20 POP RBP LAB_00164da3: SUB R14D,0x1 JC 0x00164db6 MOV RDI,qword ptr [RBX + 0x8] MOV ESI,EBP CALL 0x00123a60 JMP 0x00164da3 LAB_00164db6: POP RBX POP R14 POP RBP RET
/* minja::Value::dump(std::__cxx11::ostringstream&, int, int, bool) const::{lambda(int)#1}::TEMPNAMEPLACEHOLDERVALUE(int) const */ _func_dump_ostringstream_ptr_int_int_bool * __thiscall const::{lambda(int)#1}::operator()(_lambda_int__1_ *this,int param_1) { ostream *poVar1; int iVar2; poVar1 = *(ostream **)this; if (0 < *(int *)poVar1) { std::operator<<(*(ostream **)(this + 8),"\n"); poVar1 = *(ostream **)this; iVar2 = 0; if (0 < param_1 * *(int *)poVar1) { iVar2 = param_1 * *(int *)poVar1; } while (iVar2 != 0) { poVar1 = std::operator<<(*(ostream **)(this + 8),' '); iVar2 = iVar2 + -1; } } return (_func_dump_ostringstream_ptr_int_int_bool *)poVar1; }
15,590
evmone::TermResult evmone::instr::core::return_impl<(evmc_status_code)0>(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline TermResult return_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto& offset = stack[0]; const auto& size = stack[1]; if (!check_memory(gas_left, state.memory, offset, size)) return {EVMC_OUT_OF_GAS, gas_left}; state.output_size = static_cast<size_t>(size); if (state.output_size != 0) state.output_offset = static_cast<size_t>(offset); return {StatusCode, gas_left}; }
O0
cpp
evmone::TermResult evmone::instr::core::return_impl<(evmc_status_code)0>(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) leaq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x61a10 movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi movl $0x1, %esi callq 0x61a10 movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rsi addq $0x8, %rsi movq -0x30(%rbp), %rdx movq -0x38(%rbp), %rcx leaq -0x20(%rbp), %rdi callq 0x68460 testb $0x1, %al jne 0x716c3 movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x7170e movq -0x38(%rbp), %rdi callq 0x68550 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x28(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x716ff movq -0x30(%rbp), %rdi callq 0x68550 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x80(%rax) movl $0x2, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN6evmone5instr4core11return_implIL16evmc_status_code2EEENS_10TermResultENS_8StackTopElRNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx lea rdi, [rbp+var_18] xor esi, esi call _ZN6evmone8StackTopixEi; evmone::StackTop::operator[](int) mov [rbp+var_30], rax lea rdi, [rbp+var_18] mov esi, 1 call _ZN6evmone8StackTopixEi; evmone::StackTop::operator[](int) mov [rbp+var_38], rax mov rsi, [rbp+var_28] add rsi, 8 mov rdx, [rbp+var_30] mov rcx, [rbp+var_38] lea rdi, [rbp+var_20] call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, 1 jnz short loc_716C3 mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_7170E loc_716C3: mov rdi, [rbp+var_38] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov rcx, rax mov rax, [rbp+var_28] mov [rax+88h], rcx mov rax, [rbp+var_28] cmp qword ptr [rax+88h], 0 jz short loc_716FF mov rdi, [rbp+var_30] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov rcx, rax mov rax, [rbp+var_28] mov [rax+80h], rcx loc_716FF: mov [rbp+var_10], 2 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_7170E: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 40h pop rbp retn
long long evmone::instr::core::return_impl<(evmc_status_code)2>(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-38h] long long v5; // [rsp+10h] [rbp-30h] long long v7; // [rsp+20h] [rbp-20h] BYREF long long v8; // [rsp+28h] [rbp-18h] BYREF unsigned int v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v8 = a1; v7 = a2; v5 = evmone::StackTop::operator[](&v8, 0); v4 = evmone::StackTop::operator[](&v8, 1); if ( (evmone::check_memory((long long)&v7, a3 + 8, v5, v4) & 1) != 0 ) { *(_QWORD *)(a3 + 136) = intx::uint<256u>::operator unsigned long<unsigned long,void>(v4); if ( *(_QWORD *)(a3 + 136) ) *(_QWORD *)(a3 + 128) = intx::uint<256u>::operator unsigned long<unsigned long,void>(v5); v9 = 2; v10 = v7; } else { v9 = 3; v10 = v7; } return v9; }
return_impl<(evmc_status_code)2>: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x18] XOR ESI,ESI CALL 0x00161a10 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] MOV ESI,0x1 CALL 0x00161a10 MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x8 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0x20] CALL 0x00168460 TEST AL,0x1 JNZ 0x001716c3 MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017170e LAB_001716c3: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00168550 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x88],0x0 JZ 0x001716ff MOV RDI,qword ptr [RBP + -0x30] CALL 0x00168550 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x80],RCX LAB_001716ff: MOV dword ptr [RBP + -0x10],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0017170e: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* evmone::TermResult evmone::instr::core::return_impl<(evmc_status_code)2>(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::return_impl<(evmc_status_code)2>(int8 param_1,long param_2,long param_3) { uint *this; uint *this_00; ulong uVar1; int1 auVar2 [16]; long local_28; int8 local_20; uint local_18; long local_10; local_28 = param_2; local_20 = param_1; this = (uint *)StackTop::operator[]((StackTop *)&local_20,0); this_00 = (uint *)StackTop::operator[]((StackTop *)&local_20,1); uVar1 = check_memory(&local_28,(Memory *)(param_3 + 8),this,this_00); if ((uVar1 & 1) == 0) { local_18 = 3; local_10 = local_28; } else { uVar1 = intx::uint::operator_cast_to_unsigned_long(this_00); *(ulong *)(param_3 + 0x88) = uVar1; if (*(long *)(param_3 + 0x88) != 0) { uVar1 = intx::uint::operator_cast_to_unsigned_long(this); *(ulong *)(param_3 + 0x80) = uVar1; } local_18 = 2; local_10 = local_28; } auVar2._4_4_ = 0; auVar2._0_4_ = local_18; auVar2._8_8_ = local_10; return auVar2; }
15,591
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O0
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) jmp 0x28128 leaq -0x210(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x220(%rbp), %rax movq %rax, -0x238(%rbp) movb $0x2f, -0xd(%rbp) leaq -0xd(%rbp), %rdi addq $0x1, %rdi leaq 0x5ab98(%rip), %rsi # 0x82cef callq 0x25330 leaq -0xd(%rbp), %rcx subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x238(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x238(%rbp) movb (%rax), %al movq -0x230(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x28571 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x281bd movq -0x230(%rbp), %rax movb $0x2f, (%rax) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x28558 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq -0x228(%rbp), %rax jbe 0x28474 movq -0x230(%rbp), %rdi xorl %eax, %eax subq -0x228(%rbp), %rax addq %rax, %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x25160 cmpl $0x0, %eax jne 0x28474 movq -0x228(%rbp), %rdx movq -0x230(%rbp), %rax xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x2846f movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x282ff movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x28290 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x282ff leaq 0x368ee1(%rip), %rax # 0x391178 cmpq $0x0, (%rax) jne 0x282bb movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x2855a leaq -0x210(%rbp), %rdi leaq 0x368eaf(%rip), %rax # 0x391178 movq (%rax), %rsi callq 0x25330 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x282fd movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x282ff movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x283ab movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x28332 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x283ab leaq 0x368e57(%rip), %rdi # 0x391190 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x2cf00 cmpl $0x0, %eax je 0x2836a movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x2855a leaq -0x210(%rbp), %rdi leaq 0x368e18(%rip), %rsi # 0x391190 callq 0x25330 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x283a9 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x283ab movq -0x230(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x230(%rbp), %rcx xorl %eax, %eax cmpq -0x240(%rbp), %rcx movb %al, -0x249(%rbp) jb 0x283e7 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0x283f3 jmp 0x28407 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x283b9 movq -0x230(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x7e, %eax je 0x28443 movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax jb 0x2846d movq -0x230(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x25160 cmpl $0x0, %eax jne 0x2846d movq -0x248(%rbp), %rdi addq $0x1, %rdi leaq -0xd(%rbp), %rsi callq 0x25330 movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movb $0x2f, (%rax) jmp 0x2855a jmp 0x2846f jmp 0x28556 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax movq -0x228(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jne 0x284cc movq -0x240(%rbp), %rdi leaq -0xd(%rbp), %rsi addq $0x1, %rsi movq -0x228(%rbp), %rdx subq $0x1, %rdx callq 0x25160 cmpl $0x0, %eax jne 0x284cc movq -0x230(%rbp), %rax movq %rax, -0x240(%rbp) jmp 0x28554 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x0, %rax jle 0x28507 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x28507 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x28552 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x28550 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2e, %eax jne 0x28550 movq -0x230(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x2f, %eax jne 0x28550 movq -0x230(%rbp), %rax addq $-0x2, %rax movq %rax, -0x230(%rbp) jmp 0x28552 jmp 0x28554 jmp 0x28556 jmp 0x28558 jmp 0x2855a movq -0x230(%rbp), %rax addq $0x1, %rax movq %rax, -0x230(%rbp) jmp 0x28178 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x25330 jmp 0x28586 jmp 0x28588 movq -0x230(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x285c2 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x25390 nopw (%rax,%rax)
cleanup_dirname: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi jmp short $+2 loc_28128: lea rax, [rbp+var_210] mov [rbp+var_240], rax mov rax, [rbp+var_220] mov [rbp+var_238], rax mov [rbp+var_D], 2Fh ; '/' lea rdi, [rbp+var_D] add rdi, 1 lea rsi, asc_82CEF; ".." call _stpcpy lea rcx, [rbp+var_D] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_240] mov [rbp+var_230], rax loc_28178: mov rax, [rbp+var_238] mov rcx, rax add rcx, 1 mov [rbp+var_238], rcx mov al, [rax] mov rcx, [rbp+var_230] mov [rcx], al movsx eax, al cmp eax, 0 jz loc_28571 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_281BD mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' loc_281BD: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz loc_28558 mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, [rbp+var_228] jbe loc_28474 mov rdi, [rbp+var_230] xor eax, eax sub rax, [rbp+var_228] add rdi, rax lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz loc_28474 mov rdx, [rbp+var_228] mov rax, [rbp+var_230] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz loc_2846F mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz loc_282FF mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_28290 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_282FF loc_28290: lea rax, home_dir cmp qword ptr [rax], 0 jnz short loc_282BB mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_2855A loc_282BB: lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_282FD mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_282FD: jmp short $+2 loc_282FF: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_283AB mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_28332 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_283AB loc_28332: lea rdi, curr_dir mov esi, 200h xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jz short loc_2836A mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_2855A loc_2836A: lea rdi, [rbp+var_210] lea rsi, curr_dir call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_283A9 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_283A9: jmp short $+2 loc_283AB: mov rax, [rbp+var_230] mov [rbp+var_248], rax loc_283B9: mov rcx, [rbp+var_230] xor eax, eax cmp rcx, [rbp+var_240] mov [rbp+var_249], al jb short loc_283E7 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_283E7: mov al, [rbp+var_249] test al, 1 jnz short loc_283F3 jmp short loc_28407 loc_283F3: mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_283B9 loc_28407: mov rax, [rbp+var_230] movsx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jz short loc_28443 mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jb short loc_2846D mov rdi, [rbp+var_230] lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz short loc_2846D loc_28443: mov rdi, [rbp+var_248] add rdi, 1 lea rsi, [rbp+var_D] call _stpcpy mov [rbp+var_230], rax mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' jmp loc_2855A loc_2846D: jmp short $+2 loc_2846F: jmp loc_28556 loc_28474: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx mov rcx, [rbp+var_228] sub rcx, 1 cmp rax, rcx jnz short loc_284CC mov rdi, [rbp+var_240] lea rsi, [rbp+var_D] add rsi, 1 mov rdx, [rbp+var_228] sub rdx, 1 call _memcmp cmp eax, 0 jnz short loc_284CC mov rax, [rbp+var_230] mov [rbp+var_240], rax jmp loc_28554 loc_284CC: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 0 jle short loc_28507 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_28507 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_28552 loc_28507: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 1 jle short loc_28550 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Eh ; '.' jnz short loc_28550 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-2] cmp eax, 2Fh ; '/' jnz short loc_28550 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_230], rax loc_28550: jmp short $+2 loc_28552: jmp short $+2 loc_28554: jmp short $+2 loc_28556: jmp short $+2 loc_28558: jmp short $+2 loc_2855A: mov rax, [rbp+var_230] add rax, 1 mov [rbp+var_230], rax jmp loc_28178 loc_28571: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call _stpcpy jmp short $+2 loc_28586: jmp short $+2 loc_28588: mov rax, [rbp+var_230] lea rcx, [rbp+var_210] sub rax, rcx mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_285C2 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_285C2: call ___stack_chk_fail
long long cleanup_dirname(long long a1, _BYTE *a2) { _BYTE *v2; // rax bool v4; // [rsp+17h] [rbp-249h] _BYTE *v5; // [rsp+18h] [rbp-248h] _BYTE *v6; // [rsp+20h] [rbp-240h] _BYTE *i; // [rsp+30h] [rbp-230h] unsigned long long v9; // [rsp+38h] [rbp-228h] long long v10; // [rsp+48h] [rbp-218h] _BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF char v12; // [rsp+253h] [rbp-Dh] BYREF _BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF *(_QWORD *)&v13[4] = __readfsqword(0x28u); v10 = a1; v6 = v11; v12 = 47; v9 = stpcpy(v13, "..") - (_QWORD)&v12; for ( i = v11; ; ++i ) { v2 = a2++; LOBYTE(v2) = *v2; *i = (_BYTE)v2; if ( !(_BYTE)v2 ) break; if ( *i == 47 ) *i = 47; if ( *i == 47 ) { if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) ) { i -= v9; if ( i != v6 ) { if ( *--i == 126 && (i == v6 || *(i - 1) == 47) ) { if ( !home_dir ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, home_dir) - 1); if ( *i == 47 ) --i; } if ( *i == 46 && (i == v6 || *(i - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1); if ( *i == 47 ) --i; } v5 = i; while ( 1 ) { v4 = 0; if ( i >= v6 ) v4 = *i != 47; if ( !v4 ) break; --i; } if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) ) { i = (_BYTE *)stpcpy(v5 + 1, &v12); *i = 47; } } } else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) ) { v6 = i; } else if ( i - v6 > 0 && *(i - 1) == 47 ) { --i; } else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 ) { i -= 2; } } } stpcpy(v10, v11); return i - v11; }
cleanup_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI JMP 0x00128128 LAB_00128128: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x238],RAX MOV byte ptr [RBP + -0xd],0x2f LEA RDI,[RBP + -0xd] ADD RDI,0x1 LEA RSI,[0x182cef] CALL 0x00125330 LEA RCX,[RBP + -0xd] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x230],RAX LAB_00128178: MOV RAX,qword ptr [RBP + -0x238] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x238],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x230] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x00128571 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001281bd MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f LAB_001281bd: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00128558 MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,qword ptr [RBP + -0x228] JBE 0x00128474 MOV RDI,qword ptr [RBP + -0x230] XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x228] ADD RDI,RAX LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00125160 CMP EAX,0x0 JNZ 0x00128474 MOV RDX,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x230] XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x0012846f MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x001282ff MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x00128290 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x001282ff LAB_00128290: LEA RAX,[0x491178] CMP qword ptr [RAX],0x0 JNZ 0x001282bb MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x0012855a LAB_001282bb: LEA RDI,[RBP + -0x210] LEA RAX,[0x491178] MOV RSI,qword ptr [RAX] CALL 0x00125330 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001282fd MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_001282fd: JMP 0x001282ff LAB_001282ff: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x001283ab MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x00128332 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x001283ab LAB_00128332: LEA RDI,[0x491190] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x0012cf00 CMP EAX,0x0 JZ 0x0012836a MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x0012855a LAB_0012836a: LEA RDI,[RBP + -0x210] LEA RSI,[0x491190] CALL 0x00125330 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001283a9 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_001283a9: JMP 0x001283ab LAB_001283ab: MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x248],RAX LAB_001283b9: MOV RCX,qword ptr [RBP + -0x230] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x240] MOV byte ptr [RBP + -0x249],AL JC 0x001283e7 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_001283e7: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x001283f3 JMP 0x00128407 LAB_001283f3: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x001283b9 LAB_00128407: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JZ 0x00128443 MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JC 0x0012846d MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00125160 CMP EAX,0x0 JNZ 0x0012846d LAB_00128443: MOV RDI,qword ptr [RBP + -0x248] ADD RDI,0x1 LEA RSI,[RBP + -0xd] CALL 0x00125330 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f JMP 0x0012855a LAB_0012846d: JMP 0x0012846f LAB_0012846f: JMP 0x00128556 LAB_00128474: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x228] SUB RCX,0x1 CMP RAX,RCX JNZ 0x001284cc MOV RDI,qword ptr [RBP + -0x240] LEA RSI,[RBP + -0xd] ADD RSI,0x1 MOV RDX,qword ptr [RBP + -0x228] SUB RDX,0x1 CALL 0x00125160 CMP EAX,0x0 JNZ 0x001284cc MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x240],RAX JMP 0x00128554 LAB_001284cc: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x0 JLE 0x00128507 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x00128507 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x00128552 LAB_00128507: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x1 JLE 0x00128550 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2e JNZ 0x00128550 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x2f JNZ 0x00128550 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x2 MOV qword ptr [RBP + -0x230],RAX LAB_00128550: JMP 0x00128552 LAB_00128552: JMP 0x00128554 LAB_00128554: JMP 0x00128556 LAB_00128556: JMP 0x00128558 LAB_00128558: JMP 0x0012855a LAB_0012855a: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x00128178 LAB_00128571: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x00125330 JMP 0x00128586 LAB_00128586: JMP 0x00128588 LAB_00128588: MOV RAX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x210] SUB RAX,RCX MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001285c2 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_001285c2: CALL 0x00125390
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; char *pcVar3; ulong __n; char *pcVar4; long in_FS_OFFSET; bool bVar5; char *local_248; char *local_240; char *local_238; char local_218 [515]; char local_15; char acStack_14 [4]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_248 = local_218; local_15 = '/'; pcVar3 = stpcpy(acStack_14,".."); __n = (long)pcVar3 - (long)&local_15; local_240 = param_2; local_238 = local_248; do { cVar1 = *local_240; *local_238 = cVar1; if (cVar1 == '\0') { stpcpy(param_1,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_238 - (long)local_218; } if (*local_238 == '/') { *local_238 = '/'; } if (*local_238 == '/') { if ((__n < (ulong)((long)local_238 - (long)local_248)) && (iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) { local_238 = local_238 + -__n; if (local_238 != local_248) { pcVar3 = local_238 + -1; if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) { if (home_dir == (char *)0x0) { local_238 = pcVar3 + __n + 1; goto LAB_0012855a; } pcVar4 = stpcpy(local_218,home_dir); pcVar3 = pcVar4 + -1; if (pcVar4[-1] == '/') { pcVar3 = pcVar4 + -2; } } local_238 = pcVar3; pcVar3 = local_238; if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { local_238 = local_238 + __n + 1; goto LAB_0012855a; } pcVar4 = stpcpy(local_218,&curr_dir); local_238 = pcVar4 + -1; pcVar3 = local_238; if (*local_238 == '/') { local_238 = pcVar4 + -2; pcVar3 = local_238; } } while( true ) { bVar5 = false; if (local_248 <= local_238) { bVar5 = *local_238 != '/'; } if (!bVar5) break; local_238 = local_238 + -1; } if ((local_238[1] == '~') || ((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) { local_238 = stpcpy(pcVar3 + 1,&local_15); *local_238 = '/'; } } } else if (((long)local_238 - (long)local_248 == __n - 1) && (iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) { local_248 = local_238; } else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) { if ((1 < (long)local_238 - (long)local_248) && ((local_238[-1] == '.' && (local_238[-2] == '/')))) { local_238 = local_238 + -2; } } else { local_238 = local_238 + -1; } } LAB_0012855a: local_238 = local_238 + 1; local_240 = local_240 + 1; } while( true ); }
15,592
my_coll_lexem_next
eloqsql/strings/ctype-uca.c
static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem) { const char *beg; my_coll_lexem_num rc; for (beg= lexem->beg ; beg < lexem->end ; beg++) { switch (*beg) { case ' ': case '\t': case '\r': case '\n': continue; case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */ { size_t nbrackets; /* Indicates nested recursion level */ for (beg++, nbrackets= 1 ; beg < lexem->end; beg++) { if (*beg == '[') /* Enter nested bracket expression */ nbrackets++; else if (*beg == ']') { if (--nbrackets == 0) { rc= MY_COLL_LEXEM_OPTION; beg++; goto ex; } } } rc= MY_COLL_LEXEM_ERROR; goto ex; } case '&': beg++; rc= MY_COLL_LEXEM_RESET; goto ex; case '=': beg++; lexem->diff= 0; rc= MY_COLL_LEXEM_SHIFT; goto ex; case '/': beg++; rc= MY_COLL_LEXEM_EXTEND; goto ex; case '|': beg++; rc= MY_COLL_LEXEM_CONTEXT; goto ex; case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */ { /* Scan up to 3 additional '<' characters */ for (beg++, lexem->diff= 1; (beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3); beg++, lexem->diff++); rc= MY_COLL_LEXEM_SHIFT; goto ex; } default: break; } /* Escaped character, e.g. \u1234 */ if ((*beg == '\\') && (beg + 2 < lexem->end) && (beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2])) { int ch; beg+= 2; lexem->code= 0; while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0)) { lexem->code= (lexem->code << 4) + ch; beg++; } rc= MY_COLL_LEXEM_CHAR; goto ex; } /* Unescaped single byte character: allow printable ASCII range except SPACE and special characters parsed above []<&/|= */ if (*beg >= 0x21 && *beg <= 0x7E) { lexem->code= *beg++; rc= MY_COLL_LEXEM_CHAR; goto ex; } if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */ { CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci; my_wc_t wc; int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end); if (nbytes > 0) { rc= MY_COLL_LEXEM_CHAR; beg+= nbytes; lexem->code= (int) wc; goto ex; } } rc= MY_COLL_LEXEM_ERROR; goto ex; } rc= MY_COLL_LEXEM_EOF; ex: lexem->prev= lexem->beg; lexem->beg= beg; lexem->term= rc; return rc; }
O0
c
my_coll_lexem_next: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x5108b movq -0x10(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x40(%rbp) addl $-0x9, %eax subl $0x2, %eax jb 0x50d75 jmp 0x50d0e movl -0x40(%rbp), %eax subl $0xd, %eax je 0x50d75 jmp 0x50d18 movl -0x40(%rbp), %eax subl $0x20, %eax je 0x50d75 jmp 0x50d22 movl -0x40(%rbp), %eax subl $0x26, %eax je 0x50e0c jmp 0x50d30 movl -0x40(%rbp), %eax subl $0x2f, %eax je 0x50e47 jmp 0x50d3e movl -0x40(%rbp), %eax subl $0x3c, %eax je 0x50e77 jmp 0x50d4c movl -0x40(%rbp), %eax subl $0x3d, %eax je 0x50e24 jmp 0x50d5a movl -0x40(%rbp), %eax subl $0x5b, %eax je 0x50d7a jmp 0x50d64 movl -0x40(%rbp), %eax subl $0x7c, %eax je 0x50e5f jmp 0x50ef2 jmp 0x5107a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq $0x1, -0x20(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x50e00 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5b, %eax jne 0x50db6 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x50df0 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5d, %eax jne 0x50dee movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x50dec movl $0x7, -0x14(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x51092 jmp 0x50dee jmp 0x50df0 jmp 0x50df2 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x50d8e movl $0x6, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x4, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x20(%rax) movl $0x1, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x8, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x9, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl $0x1, 0x20(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x10(%rdx), %rcx movb %al, -0x41(%rbp) jae 0x50ec0 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x3c, %ecx movb %al, -0x41(%rbp) jne 0x50ec0 movq -0x8(%rbp), %rax cmpl $0x3, 0x20(%rax) setle %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x50ec9 jmp 0x50ee6 jmp 0x50ecb movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl 0x20(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x20(%rax) jmp 0x50e8e movl $0x1, -0x14(%rbp) jmp 0x51092 jmp 0x50ef4 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5c, %eax jne 0x50fc6 movq -0x10(%rbp), %rax addq $0x2, %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x50fc6 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x75, %eax jne 0x50fc6 leaq 0x332b4e(%rip), %rax # 0x383a80 movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x50fc6 movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x10(%rdx), %rcx movb %al, -0x42(%rbp) jae 0x50f8f movq -0x10(%rbp), %rax movsbl (%rax), %edi callq 0x510e0 movl %eax, -0x24(%rbp) cmpl $0x0, %eax setge %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x50f98 jmp 0x50fba movq -0x8(%rbp), %rax movl 0x24(%rax), %ecx shll $0x4, %ecx addl -0x24(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x50f64 movl $0x5, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x21, %eax jl 0x51003 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jg 0x51003 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movsbl (%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x24(%rax) movl $0x5, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x51071 leaq 0x332a6a(%rip), %rax # 0x383a80 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x8(%rbp), %rcx movq 0x10(%rcx), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jle 0x5106f movl $0x5, -0x14(%rbp) movl -0x3c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x51092 jmp 0x51071 movl $0x6, -0x14(%rbp) jmp 0x51092 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x50ce8 movl $0x0, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x14(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movl -0x14(%rbp), %eax addq $0x50, %rsp popq %rbp retq
my_coll_lexem_next: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_10], rax loc_50CE8: mov rax, [rbp+var_10] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_5108B mov rax, [rbp+var_10] movsx eax, byte ptr [rax] mov [rbp+var_40], eax add eax, 0FFFFFFF7h sub eax, 2 jb short loc_50D75 jmp short $+2 loc_50D0E: mov eax, [rbp+var_40] sub eax, 0Dh jz short loc_50D75 jmp short $+2 loc_50D18: mov eax, [rbp+var_40] sub eax, 20h ; ' ' jz short loc_50D75 jmp short $+2 loc_50D22: mov eax, [rbp+var_40] sub eax, 26h ; '&' jz loc_50E0C jmp short $+2 loc_50D30: mov eax, [rbp+var_40] sub eax, 2Fh ; '/' jz loc_50E47 jmp short $+2 loc_50D3E: mov eax, [rbp+var_40] sub eax, 3Ch ; '<' jz loc_50E77 jmp short $+2 loc_50D4C: mov eax, [rbp+var_40] sub eax, 3Dh ; '=' jz loc_50E24 jmp short $+2 loc_50D5A: mov eax, [rbp+var_40] sub eax, 5Bh ; '[' jz short loc_50D7A jmp short $+2 loc_50D64: mov eax, [rbp+var_40] sub eax, 7Ch ; '|' jz loc_50E5F jmp loc_50EF2 loc_50D75: jmp loc_5107A loc_50D7A: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_20], 1 loc_50D8E: mov rax, [rbp+var_10] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb short loc_50E00 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Bh ; '[' jnz short loc_50DB6 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_50DF0 loc_50DB6: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Dh ; ']' jnz short loc_50DEE mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax cmp rax, 0 jnz short loc_50DEC mov [rbp+var_14], 7 mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_51092 loc_50DEC: jmp short $+2 loc_50DEE: jmp short $+2 loc_50DF0: jmp short $+2 loc_50DF2: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_50D8E loc_50E00: mov [rbp+var_14], 6 jmp loc_51092 loc_50E0C: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_14], 4 jmp loc_51092 loc_50E24: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_8] mov dword ptr [rax+20h], 0 mov [rbp+var_14], 1 jmp loc_51092 loc_50E47: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_14], 8 jmp loc_51092 loc_50E5F: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_14], 9 jmp loc_51092 loc_50E77: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_8] mov dword ptr [rax+20h], 1 loc_50E8E: mov rcx, [rbp+var_10] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+10h] mov [rbp+var_41], al jnb short loc_50EC0 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 3Ch ; '<' mov [rbp+var_41], al jnz short loc_50EC0 mov rax, [rbp+var_8] cmp dword ptr [rax+20h], 3 setle al mov [rbp+var_41], al loc_50EC0: mov al, [rbp+var_41] test al, 1 jnz short loc_50EC9 jmp short loc_50EE6 loc_50EC9: jmp short $+2 loc_50ECB: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_8] mov ecx, [rax+20h] add ecx, 1 mov [rax+20h], ecx jmp short loc_50E8E loc_50EE6: mov [rbp+var_14], 1 jmp loc_51092 loc_50EF2: jmp short $+2 loc_50EF4: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz loc_50FC6 mov rax, [rbp+var_10] add rax, 2 mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_50FC6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 75h ; 'u' jnz loc_50FC6 lea rax, my_charset_utf8mb3_general_ci mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+2] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 jz short loc_50FC6 mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_8] mov dword ptr [rax+24h], 0 loc_50F64: mov rcx, [rbp+var_10] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+10h] mov [rbp+var_42], al jnb short loc_50F8F mov rax, [rbp+var_10] movsx edi, byte ptr [rax] call ch2x mov [rbp+var_24], eax cmp eax, 0 setnl al mov [rbp+var_42], al loc_50F8F: mov al, [rbp+var_42] test al, 1 jnz short loc_50F98 jmp short loc_50FBA loc_50F98: mov rax, [rbp+var_8] mov ecx, [rax+24h] shl ecx, 4 add ecx, [rbp+var_24] mov rax, [rbp+var_8] mov [rax+24h], ecx mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_50F64 loc_50FBA: mov [rbp+var_14], 5 jmp loc_51092 loc_50FC6: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 21h ; '!' jl short loc_51003 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jg short loc_51003 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movsx ecx, byte ptr [rax] mov rax, [rbp+var_8] mov [rax+24h], ecx mov [rbp+var_14], 5 jmp loc_51092 loc_51003: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_51071 lea rax, my_charset_utf8mb3_general_ci mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov rcx, [rbp+var_8] mov rcx, [rcx+10h] lea rsi, [rbp+var_38] call rax mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jle short loc_5106F mov [rbp+var_14], 5 mov ecx, [rbp+var_3C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_8] mov [rax+24h], ecx jmp short loc_51092 loc_5106F: jmp short $+2 loc_51071: mov [rbp+var_14], 6 jmp short loc_51092 loc_5107A: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_50CE8 loc_5108B: mov [rbp+var_14], 0 loc_51092: mov rax, [rbp+var_8] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+18h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+8], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_8] mov [rax], ecx mov eax, [rbp+var_14] add rsp, 50h pop rbp retn
long long my_coll_lexem_next(long long a1) { char *v1; // rax bool v3; // [rsp+Eh] [rbp-42h] bool v4; // [rsp+Fh] [rbp-41h] int v5; // [rsp+10h] [rbp-40h] int v6; // [rsp+14h] [rbp-3Ch] _QWORD v7[2]; // [rsp+18h] [rbp-38h] BYREF int v8; // [rsp+2Ch] [rbp-24h] long long v9; // [rsp+30h] [rbp-20h] unsigned int v10; // [rsp+3Ch] [rbp-14h] unsigned __int8 *i; // [rsp+40h] [rbp-10h] long long v12; // [rsp+48h] [rbp-8h] v12 = a1; for ( i = *(unsigned __int8 **)(a1 + 8); ; ++i ) { if ( (unsigned long long)i >= *(_QWORD *)(v12 + 16) ) { v10 = 0; goto LABEL_52; } v5 = (char)*i; if ( (unsigned int)(v5 - 9) >= 2 && v5 != 13 && v5 != 32 ) break; } switch ( v5 ) { case '&': ++i; v10 = 4; break; case '/': ++i; v10 = 8; break; case '<': ++i; for ( *(_DWORD *)(v12 + 32) = 1; ; ++*(_DWORD *)(v12 + 32) ) { v4 = 0; if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) ) { v4 = 0; if ( *i == 60 ) v4 = *(_DWORD *)(v12 + 32) <= 3; } if ( !v4 ) break; ++i; } v10 = 1; break; case '=': ++i; *(_DWORD *)(v12 + 32) = 0; v10 = 1; break; case '[': ++i; v9 = 1LL; while ( (unsigned long long)i < *(_QWORD *)(v12 + 16) ) { if ( *i == 91 ) { ++v9; } else if ( *i == 93 && !--v9 ) { v10 = 7; ++i; goto LABEL_52; } ++i; } v10 = 6; break; case '|': ++i; v10 = 9; break; default: if ( *i == 92 && (unsigned long long)(i + 2) < *(_QWORD *)(v12 + 16) && i[1] == 117 && (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + i[2] + 1LL) & 0x80) != 0 ) { i += 2; *(_DWORD *)(v12 + 36) = 0; while ( 1 ) { v3 = 0; if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) ) { v8 = ch2x((unsigned int)(char)*i); v3 = v8 >= 0; } if ( !v3 ) break; *(_DWORD *)(v12 + 36) = v8 + 16 * *(_DWORD *)(v12 + 36); ++i; } v10 = 5; } else if ( (char)*i < 33 || *i == 127 ) { if ( *i <= 0x7Fu || (v7[1] = my_charset_utf8mb3_general_ci, v6 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *, _QWORD))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46] + 40LL))( my_charset_utf8mb3_general_ci, v7, i, *(_QWORD *)(v12 + 16)), v6 <= 0) ) { v10 = 6; } else { v10 = 5; i += v6; *(_DWORD *)(v12 + 36) = v7[0]; } } else { v1 = (char *)i++; *(_DWORD *)(v12 + 36) = *v1; v10 = 5; } break; } LABEL_52: *(_QWORD *)(v12 + 24) = *(_QWORD *)(v12 + 8); *(_QWORD *)(v12 + 8) = i; *(_DWORD *)v12 = v10; return v10; }
my_coll_lexem_next: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x10],RAX LAB_00150ce8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0015108b MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x40],EAX ADD EAX,-0x9 SUB EAX,0x2 JC 0x00150d75 JMP 0x00150d0e LAB_00150d0e: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0xd JZ 0x00150d75 JMP 0x00150d18 LAB_00150d18: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x20 JZ 0x00150d75 JMP 0x00150d22 LAB_00150d22: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x26 JZ 0x00150e0c JMP 0x00150d30 LAB_00150d30: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x2f JZ 0x00150e47 JMP 0x00150d3e LAB_00150d3e: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x3c JZ 0x00150e77 JMP 0x00150d4c LAB_00150d4c: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x3d JZ 0x00150e24 JMP 0x00150d5a LAB_00150d5a: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x5b JZ 0x00150d7a JMP 0x00150d64 LAB_00150d64: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x7c JZ 0x00150e5f JMP 0x00150ef2 LAB_00150d75: JMP 0x0015107a LAB_00150d7a: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV qword ptr [RBP + -0x20],0x1 LAB_00150d8e: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x00150e00 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5b JNZ 0x00150db6 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00150df0 LAB_00150db6: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5d JNZ 0x00150dee MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00150dec MOV dword ptr [RBP + -0x14],0x7 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00151092 LAB_00150dec: JMP 0x00150dee LAB_00150dee: JMP 0x00150df0 LAB_00150df0: JMP 0x00150df2 LAB_00150df2: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00150d8e LAB_00150e00: MOV dword ptr [RBP + -0x14],0x6 JMP 0x00151092 LAB_00150e0c: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x14],0x4 JMP 0x00151092 LAB_00150e24: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x0 MOV dword ptr [RBP + -0x14],0x1 JMP 0x00151092 LAB_00150e47: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x14],0x8 JMP 0x00151092 LAB_00150e5f: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x14],0x9 JMP 0x00151092 LAB_00150e77: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x1 LAB_00150e8e: MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x10] MOV byte ptr [RBP + -0x41],AL JNC 0x00150ec0 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x3c MOV byte ptr [RBP + -0x41],AL JNZ 0x00150ec0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x20],0x3 SETLE AL MOV byte ptr [RBP + -0x41],AL LAB_00150ec0: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00150ec9 JMP 0x00150ee6 LAB_00150ec9: JMP 0x00150ecb LAB_00150ecb: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x20] ADD ECX,0x1 MOV dword ptr [RAX + 0x20],ECX JMP 0x00150e8e LAB_00150ee6: MOV dword ptr [RBP + -0x14],0x1 JMP 0x00151092 LAB_00150ef2: JMP 0x00150ef4 LAB_00150ef4: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x00150fc6 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x00150fc6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x75 JNZ 0x00150fc6 LEA RAX,[0x483a80] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 JZ 0x00150fc6 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x0 LAB_00150f64: MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x10] MOV byte ptr [RBP + -0x42],AL JNC 0x00150f8f MOV RAX,qword ptr [RBP + -0x10] MOVSX EDI,byte ptr [RAX] CALL 0x001510e0 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 SETGE AL MOV byte ptr [RBP + -0x42],AL LAB_00150f8f: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x00150f98 JMP 0x00150fba LAB_00150f98: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x24] SHL ECX,0x4 ADD ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00150f64 LAB_00150fba: MOV dword ptr [RBP + -0x14],0x5 JMP 0x00151092 LAB_00150fc6: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x21 JL 0x00151003 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JG 0x00151003 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVSX ECX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],ECX MOV dword ptr [RBP + -0x14],0x5 JMP 0x00151092 LAB_00151003: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x00151071 LEA RAX,[0x483a80] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x10] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JLE 0x0015106f MOV dword ptr [RBP + -0x14],0x5 MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],ECX JMP 0x00151092 LAB_0015106f: JMP 0x00151071 LAB_00151071: MOV dword ptr [RBP + -0x14],0x6 JMP 0x00151092 LAB_0015107a: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00150ce8 LAB_0015108b: MOV dword ptr [RBP + -0x14],0x0 LAB_00151092: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x50 POP RBP RET
int4 my_coll_lexem_next(int4 *param_1) { byte *pbVar1; int iVar2; bool bVar3; int4 local_40 [2]; int1 *local_38; int local_2c; long local_28; int4 local_1c; byte *local_18; int4 *local_10; local_18 = *(byte **)(param_1 + 2); while( true ) { local_10 = param_1; if (*(byte **)(param_1 + 4) <= local_18) goto LAB_0015108b; iVar2 = (int)(char)*local_18; if (((1 < iVar2 - 9U) && (iVar2 != 0xd)) && (iVar2 != 0x20)) break; local_18 = local_18 + 1; } if (iVar2 == 0x26) { local_18 = local_18 + 1; local_1c = 4; goto LAB_00151092; } if (iVar2 == 0x2f) { local_18 = local_18 + 1; local_1c = 8; goto LAB_00151092; } if (iVar2 != 0x3c) { if (iVar2 == 0x3d) { local_18 = local_18 + 1; param_1[8] = 0; local_1c = 1; goto LAB_00151092; } if (iVar2 == 0x5b) { local_28 = 1; goto LAB_00150d8e; } if (iVar2 == 0x7c) { local_18 = local_18 + 1; local_1c = 9; goto LAB_00151092; } if ((((*local_18 == 0x5c) && (local_18 + 2 < *(byte **)(param_1 + 4))) && (local_18[1] == 0x75)) && ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)local_18[2]) & 0x80) != 0)) { local_18 = local_18 + 2; param_1[9] = 0; while( true ) { bVar3 = false; if (local_18 < *(byte **)(local_10 + 4)) { local_2c = ch2x((int)(char)*local_18); bVar3 = -1 < local_2c; } if (!bVar3) break; local_10[9] = local_10[9] * 0x10 + local_2c; local_18 = local_18 + 1; } local_1c = 5; goto LAB_00151092; } if ((' ' < (char)*local_18) && ((char)*local_18 < '\x7f')) { param_1[9] = (int)(char)*local_18; local_1c = 5; local_18 = local_18 + 1; goto LAB_00151092; } if (0x7f < *local_18) { local_38 = my_charset_utf8mb3_general_ci; iVar2 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28)) (my_charset_utf8mb3_general_ci,local_40,local_18, *(int8 *)(param_1 + 4)); if (0 < iVar2) { local_1c = 5; local_18 = local_18 + iVar2; local_10[9] = local_40[0]; goto LAB_00151092; } } local_1c = 6; goto LAB_00151092; } param_1[8] = 1; while( true ) { local_18 = local_18 + 1; bVar3 = false; if ((local_18 < *(byte **)(param_1 + 4)) && (bVar3 = false, *local_18 == 0x3c)) { bVar3 = (int)param_1[8] < 4; } if (!bVar3) break; param_1[8] = param_1[8] + 1; } local_1c = 1; goto LAB_00151092; LAB_0015108b: local_1c = 0; goto LAB_00151092; while ((*local_18 != 0x5d || (local_28 = local_28 + -1, local_28 != 0))) { LAB_00150d8e: pbVar1 = local_18; local_18 = pbVar1 + 1; if (*(byte **)(param_1 + 4) <= local_18) { local_1c = 6; goto LAB_00151092; } if (*local_18 == 0x5b) { local_28 = local_28 + 1; goto LAB_00150d8e; } } local_1c = 7; local_18 = pbVar1 + 2; LAB_00151092: *(int8 *)(local_10 + 6) = *(int8 *)(local_10 + 2); *(byte **)(local_10 + 2) = local_18; *local_10 = local_1c; return local_1c; }
15,593
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
monkey531[P]llama/common/json.hpp
inline cached_power get_cached_power_for_binary_exponent(int e) { // Now // // alpha <= e_c + e + q <= gamma (1) // ==> f_c * 2^alpha <= c * 2^e * 2^q // // and since the c's are normalized, 2^(q-1) <= f_c, // // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) // // From the paper: // "In theory the result of the procedure could be wrong since c is rounded, // and the computation itself is approximated [...]. In practice, however, // this simple function is sufficient." // // For IEEE double precision floating-point numbers converted into // normalized diyfp's w = f * 2^e, with q = 64, // // e >= -1022 (min IEEE exponent) // -52 (p - 1) // -52 (p - 1, possibly normalize denormal IEEE numbers) // -11 (normalize the diyfp) // = -1137 // // and // // e <= +1023 (max IEEE exponent) // -52 (p - 1) // -11 (normalize the diyfp) // = 960 // // This binary exponent range [-1137,960] results in a decimal exponent // range [-307,324]. One does not need to store a cached power for each // k in this range. For each such k it suffices to find a cached power // such that the exponent of the product lies in [alpha,gamma]. // This implies that the difference of the decimal exponents of adjacent // table entries must be less than or equal to // // floor( (gamma - alpha) * log_10(2) ) = 8. // // (A smaller distance gamma-alpha would require a larger table.) // NB: // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. constexpr int kCachedPowersMinDecExp = -300; constexpr int kCachedPowersDecStep = 8; static constexpr std::array<cached_power, 79> kCachedPowers = { { { 0xAB70FE17C79AC6CA, -1060, -300 }, { 0xFF77B1FCBEBCDC4F, -1034, -292 }, { 0xBE5691EF416BD60C, -1007, -284 }, { 0x8DD01FAD907FFC3C, -980, -276 }, { 0xD3515C2831559A83, -954, -268 }, { 0x9D71AC8FADA6C9B5, -927, -260 }, { 0xEA9C227723EE8BCB, -901, -252 }, { 0xAECC49914078536D, -874, -244 }, { 0x823C12795DB6CE57, -847, -236 }, { 0xC21094364DFB5637, -821, -228 }, { 0x9096EA6F3848984F, -794, -220 }, { 0xD77485CB25823AC7, -768, -212 }, { 0xA086CFCD97BF97F4, -741, -204 }, { 0xEF340A98172AACE5, -715, -196 }, { 0xB23867FB2A35B28E, -688, -188 }, { 0x84C8D4DFD2C63F3B, -661, -180 }, { 0xC5DD44271AD3CDBA, -635, -172 }, { 0x936B9FCEBB25C996, -608, -164 }, { 0xDBAC6C247D62A584, -582, -156 }, { 0xA3AB66580D5FDAF6, -555, -148 }, { 0xF3E2F893DEC3F126, -529, -140 }, { 0xB5B5ADA8AAFF80B8, -502, -132 }, { 0x87625F056C7C4A8B, -475, -124 }, { 0xC9BCFF6034C13053, -449, -116 }, { 0x964E858C91BA2655, -422, -108 }, { 0xDFF9772470297EBD, -396, -100 }, { 0xA6DFBD9FB8E5B88F, -369, -92 }, { 0xF8A95FCF88747D94, -343, -84 }, { 0xB94470938FA89BCF, -316, -76 }, { 0x8A08F0F8BF0F156B, -289, -68 }, { 0xCDB02555653131B6, -263, -60 }, { 0x993FE2C6D07B7FAC, -236, -52 }, { 0xE45C10C42A2B3B06, -210, -44 }, { 0xAA242499697392D3, -183, -36 }, { 0xFD87B5F28300CA0E, -157, -28 }, { 0xBCE5086492111AEB, -130, -20 }, { 0x8CBCCC096F5088CC, -103, -12 }, { 0xD1B71758E219652C, -77, -4 }, { 0x9C40000000000000, -50, 4 }, { 0xE8D4A51000000000, -24, 12 }, { 0xAD78EBC5AC620000, 3, 20 }, { 0x813F3978F8940984, 30, 28 }, { 0xC097CE7BC90715B3, 56, 36 }, { 0x8F7E32CE7BEA5C70, 83, 44 }, { 0xD5D238A4ABE98068, 109, 52 }, { 0x9F4F2726179A2245, 136, 60 }, { 0xED63A231D4C4FB27, 162, 68 }, { 0xB0DE65388CC8ADA8, 189, 76 }, { 0x83C7088E1AAB65DB, 216, 84 }, { 0xC45D1DF942711D9A, 242, 92 }, { 0x924D692CA61BE758, 269, 100 }, { 0xDA01EE641A708DEA, 295, 108 }, { 0xA26DA3999AEF774A, 322, 116 }, { 0xF209787BB47D6B85, 348, 124 }, { 0xB454E4A179DD1877, 375, 132 }, { 0x865B86925B9BC5C2, 402, 140 }, { 0xC83553C5C8965D3D, 428, 148 }, { 0x952AB45CFA97A0B3, 455, 156 }, { 0xDE469FBD99A05FE3, 481, 164 }, { 0xA59BC234DB398C25, 508, 172 }, { 0xF6C69A72A3989F5C, 534, 180 }, { 0xB7DCBF5354E9BECE, 561, 188 }, { 0x88FCF317F22241E2, 588, 196 }, { 0xCC20CE9BD35C78A5, 614, 204 }, { 0x98165AF37B2153DF, 641, 212 }, { 0xE2A0B5DC971F303A, 667, 220 }, { 0xA8D9D1535CE3B396, 694, 228 }, { 0xFB9B7CD9A4A7443C, 720, 236 }, { 0xBB764C4CA7A44410, 747, 244 }, { 0x8BAB8EEFB6409C1A, 774, 252 }, { 0xD01FEF10A657842C, 800, 260 }, { 0x9B10A4E5E9913129, 827, 268 }, { 0xE7109BFBA19C0C9D, 853, 276 }, { 0xAC2820D9623BF429, 880, 284 }, { 0x80444B5E7AA7CF85, 907, 292 }, { 0xBF21E44003ACDD2D, 933, 300 }, { 0x8E679C2F5E44FF8F, 960, 308 }, { 0xD433179D9C8CB841, 986, 316 }, { 0x9E19DB92B4E31BA9, 1013, 324 }, } }; // This computation gives exactly the same results for k as // k = ceil((kAlpha - e - 1) * 0.30102999566398114) // for |e| <= 1500, but doesn't require floating-point operations. // NB: log_10(2) ~= 78913 / 2^18 JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; JSON_ASSERT(kAlpha <= cached.e + e + 64); JSON_ASSERT(kGamma >= cached.e + e + 64); return cached; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int): pushq %rax cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23 jle 0x88241 cmpl $0x5dd, %edi # imm = 0x5DD jge 0x88260 xorl %ecx, %ecx movl %edi, %eax subl $-0x3d, %eax setl %cl negl %eax imull $0x13441, %eax, %eax # imm = 0x13441 movl $0x40000, %esi # imm = 0x40000 cltd idivl %esi addl %eax, %ecx cmpl $0xfffffec5, %ecx # imm = 0xFFFFFEC5 jle 0x8827c addl $0x133, %ecx # imm = 0x133 movl %ecx, %eax cwtd movw $0x8, %cx idivw %cx cmpw $0x4f, %ax jae 0x88298 movzwl %ax, %eax shll $0x4, %eax leaq 0x31766(%rip), %rcx # 0xb9988 movq 0x8(%rcx,%rax), %rdx addl %edx, %edi cmpl $-0x7d, %edi jle 0x882b4 cmpl $-0x5f, %edi jge 0x882d0 movq (%rcx,%rax), %rax popq %rcx retq leaq 0x2999e(%rip), %rdi # 0xb1be6 leaq 0x23ef1(%rip), %rdx # 0xac140 leaq 0x2f1d5(%rip), %rcx # 0xb742b movl $0x43e4, %esi # imm = 0x43E4 jmp 0x882ea leaq 0x2997f(%rip), %rdi # 0xb1be6 leaq 0x23ed2(%rip), %rdx # 0xac140 leaq 0x2f1c1(%rip), %rcx # 0xb7436 movl $0x43e5, %esi # imm = 0x43E5 jmp 0x882ea leaq 0x29963(%rip), %rdi # 0xb1be6 leaq 0x23eb6(%rip), %rdx # 0xac140 leaq 0x2f1af(%rip), %rcx # 0xb7440 movl $0x43ea, %esi # imm = 0x43EA jmp 0x882ea leaq 0x29947(%rip), %rdi # 0xb1be6 leaq 0x23e9a(%rip), %rdx # 0xac140 leaq 0x2f19e(%rip), %rcx # 0xb744b movl $0x43eb, %esi # imm = 0x43EB jmp 0x882ea leaq 0x2992b(%rip), %rdi # 0xb1be6 leaq 0x23e7e(%rip), %rdx # 0xac140 leaq 0x2f1b9(%rip), %rcx # 0xb7482 movl $0x43ee, %esi # imm = 0x43EE jmp 0x882ea leaq 0x2990f(%rip), %rdi # 0xb1be6 leaq 0x23e62(%rip), %rdx # 0xac140 leaq 0x2f1b9(%rip), %rcx # 0xb749e movl $0x43ef, %esi # imm = 0x43EF xorl %eax, %eax callq 0x24e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi: push rax cmp edi, 0FFFFFA23h jle short loc_88241 cmp edi, 5DDh jge loc_88260 xor ecx, ecx mov eax, edi sub eax, 0FFFFFFC3h setl cl neg eax imul eax, 13441h mov esi, offset loc_40000 cdq idiv esi add ecx, eax cmp ecx, 0FFFFFEC5h jle loc_8827C add ecx, 133h mov eax, ecx cwd mov cx, 8 idiv cx cmp ax, 4Fh ; 'O' jnb loc_88298 movzx eax, ax shl eax, 4 lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers mov rdx, [rcx+rax+8] add edi, edx cmp edi, 0FFFFFF83h jle loc_882B4 cmp edi, 0FFFFFFA1h jge loc_882D0 mov rax, [rcx+rax] pop rcx retn loc_88241: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500; "e >= -1500" mov esi, 43E4h jmp loc_882EA loc_88260: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500_0; "e <= 1500" mov esi, 43E5h jmp short loc_882EA loc_8827C: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndex0; "index >= 0" mov esi, 43EAh jmp short loc_882EA loc_88298: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"... mov esi, 43EBh jmp short loc_882EA loc_882B4: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64" mov esi, 43EEh jmp short loc_882EA loc_882D0: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64" mov esi, 43EFh loc_882EA: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this) { int v1; // ecx unsigned __int16 v2; // ax long long v3; // rax int v4; // edi long long v6; // rsi if ( (int)this <= -1501 ) { v6 = 17380LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17380LL, "GGML_ASSERT(%s) failed", "e >= -1500"); } else if ( (int)this >= 1501 ) { v6 = 17381LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17381LL, "GGML_ASSERT(%s) failed", "e <= 1500"); } else { v1 = -78913 * ((int)this + 61) / (int)&loc_40000 + ((int)this < -61); if ( v1 <= -315 ) { v6 = 17386LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17386LL, "GGML_ASSERT(%s) failed", "index >= 0"); } else { v2 = (__int16)(v1 + 307) / 8; if ( v2 >= 0x4Fu ) { v6 = 17387LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17387LL, "GGML_ASSERT(%s) failed", "static_cast<std::size_t>(index) < kCachedPowers.size()"); } else { v3 = 16 * (unsigned int)v2; v4 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3 + 8) + (_DWORD)this; if ( v4 <= -125 ) { v6 = 17390LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17390LL, "GGML_ASSERT(%s) failed", "kAlpha <= cached.e + e + 64"); } else { if ( v4 < -95 ) return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3); v6 = 17391LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17391LL, "GGML_ASSERT(%s) failed", "kGamma >= cached.e + e + 64"); } } } } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v6); }
get_cached_power_for_binary_exponent: PUSH RAX CMP EDI,0xfffffa23 JLE 0x00188241 CMP EDI,0x5dd JGE 0x00188260 XOR ECX,ECX MOV EAX,EDI SUB EAX,-0x3d SETL CL NEG EAX IMUL EAX,EAX,0x13441 MOV ESI,0x40000 CDQ IDIV ESI ADD ECX,EAX CMP ECX,0xfffffec5 JLE 0x0018827c ADD ECX,0x133 MOV EAX,ECX CWD MOV CX,0x8 IDIV CX CMP AX,0x4f JNC 0x00188298 MOVZX EAX,AX SHL EAX,0x4 LEA RCX,[0x1b9988] MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8] ADD EDI,EDX CMP EDI,-0x7d JLE 0x001882b4 CMP EDI,-0x5f JGE 0x001882d0 MOV RAX,qword ptr [RCX + RAX*0x1] POP RCX RET LAB_00188241: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b742b] MOV ESI,0x43e4 JMP 0x001882ea LAB_00188260: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b7436] MOV ESI,0x43e5 JMP 0x001882ea LAB_0018827c: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b7440] MOV ESI,0x43ea JMP 0x001882ea LAB_00188298: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b744b] MOV ESI,0x43eb JMP 0x001882ea LAB_001882b4: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b7482] MOV ESI,0x43ee JMP 0x001882ea LAB_001882d0: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b749e] MOV ESI,0x43ef LAB_001882ea: XOR EAX,EAX CALL 0x00124e90
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */ int8 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1) { ulong uVar1; int iVar2; uint uVar3; char *pcVar4; int8 uVar5; if (param_1 < -0x5dc) { pcVar4 = "e >= -1500"; uVar5 = 0x43e4; } else if (param_1 < 0x5dd) { iVar2 = (uint)(param_1 < -0x3d) + ((param_1 + 0x3d) * -0x13441) / 0x40000; if (iVar2 < -0x13a) { pcVar4 = "index >= 0"; uVar5 = 0x43ea; } else { uVar3 = iVar2 + 0x133; uVar3 = (int)((uint)(ushort)((short)uVar3 >> 0xf) << 0x10 | uVar3 & 0xffff) / 8; if ((ushort)uVar3 < 0x4f) { uVar1 = (ulong)((uVar3 & 0xffff) << 4); iVar2 = param_1 + (int)*(int8 *) (get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1 + 8); if (iVar2 < -0x7c) { pcVar4 = "kAlpha <= cached.e + e + 64"; uVar5 = 0x43ee; } else { if (iVar2 < -0x5f) { return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1) ; } pcVar4 = "kGamma >= cached.e + e + 64"; uVar5 = 0x43ef; } } else { pcVar4 = "static_cast<std::size_t>(index) < kCachedPowers.size()"; uVar5 = 0x43eb; } } } else { pcVar4 = "e <= 1500"; uVar5 = 0x43e5; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
15,594
composition_solid_xor
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_solid_xor(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha) { if(const_alpha != 255) color = BYTE_MUL(color, const_alpha); uint32_t sia = plutovg_alpha(~color); for(int i = 0; i < length; i++) { uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(color, plutovg_alpha(~d), d, sia); } }
O1
c
composition_solid_xor: cmpl $0xff, %ecx je 0x412e9 movl $0xff00ff, %r8d # imm = 0xFF00FF movl %edx, %eax andl %r8d, %eax imull %ecx, %eax movl %eax, %r9d shrl $0x8, %r9d andl %r8d, %r9d movl $0x800080, %r10d # imm = 0x800080 addl %r10d, %eax addl %r9d, %eax shrl $0x8, %eax andl %r8d, %eax shrl $0x8, %edx andl %r8d, %edx imull %ecx, %edx movl %edx, %ecx shrl $0x8, %ecx andl %r8d, %ecx addl %r10d, %edx addl %ecx, %edx andl $0xff00ff00, %edx # imm = 0xFF00FF00 orl %eax, %edx testl %esi, %esi jle 0x41383 pushq %rbp pushq %r14 pushq %rbx movl %edx, %eax notl %eax shrl $0x18, %eax movl $0xff00ff, %ecx # imm = 0xFF00FF movl %edx, %r8d andl %ecx, %r8d shrl $0x8, %edx andl %ecx, %edx movl %esi, %esi xorl %r9d, %r9d movl $0x800080, %r10d # imm = 0x800080 movl (%rdi,%r9,4), %r11d movl %r11d, %ebp notl %ebp shrl $0x18, %ebp movl %ebp, %r14d imull %r8d, %r14d movl %r11d, %ebx andl %ecx, %ebx imull %eax, %ebx addl %r14d, %ebx movl %ebx, %r14d shrl $0x8, %r14d andl %ecx, %r14d addl %r10d, %ebx addl %r14d, %ebx shrl $0x8, %ebx andl %ecx, %ebx imull %edx, %ebp shrl $0x8, %r11d andl %ecx, %r11d imull %eax, %r11d addl %ebp, %r11d movl %r11d, %ebp shrl $0x8, %ebp andl %ecx, %ebp addl %r10d, %r11d addl %ebp, %r11d andl $0xff00ff00, %r11d # imm = 0xFF00FF00 orl %ebx, %r11d movl %r11d, (%rdi,%r9,4) incq %r9 cmpq %r9, %rsi jne 0x41317 popq %rbx popq %r14 popq %rbp retq
composition_solid_xor: cmp ecx, 0FFh jz short loc_412E9 mov r8d, 0FF00FFh mov eax, edx and eax, r8d imul eax, ecx mov r9d, eax shr r9d, 8 and r9d, r8d mov r10d, 800080h add eax, r10d add eax, r9d shr eax, 8 and eax, r8d shr edx, 8 and edx, r8d imul edx, ecx mov ecx, edx shr ecx, 8 and ecx, r8d add edx, r10d add edx, ecx and edx, 0FF00FF00h or edx, eax loc_412E9: test esi, esi jle locret_41383 push rbp push r14 push rbx mov eax, edx not eax shr eax, 18h mov ecx, 0FF00FFh mov r8d, edx and r8d, ecx shr edx, 8 and edx, ecx mov esi, esi xor r9d, r9d mov r10d, 800080h loc_41317: mov r11d, [rdi+r9*4] mov ebp, r11d not ebp shr ebp, 18h mov r14d, ebp imul r14d, r8d mov ebx, r11d and ebx, ecx imul ebx, eax add ebx, r14d mov r14d, ebx shr r14d, 8 and r14d, ecx add ebx, r10d add ebx, r14d shr ebx, 8 and ebx, ecx imul ebp, edx shr r11d, 8 and r11d, ecx imul r11d, eax add r11d, ebp mov ebp, r11d shr ebp, 8 and ebp, ecx add r11d, r10d add r11d, ebp and r11d, 0FF00FF00h or r11d, ebx mov [rdi+r9*4], r11d inc r9 cmp rsi, r9 jnz short loc_41317 pop rbx pop r14 pop rbp locret_41383: retn
void composition_solid_xor(long long a1, int a2, unsigned int a3, int a4) { unsigned int v4; // eax int v5; // r8d int v6; // edx long long i; // r9 if ( a4 != 255 ) a3 = (((((a4 * (a3 & 0xFF00FF)) >> 8) & 0xFF00FF) + a4 * (a3 & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((a4 * ((a3 >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + a4 * ((a3 >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; if ( a2 > 0 ) { v4 = ~a3 >> 24; v5 = a3 & 0xFF00FF; v6 = (a3 >> 8) & 0xFF00FF; for ( i = 0LL; i != a2; ++i ) *(_DWORD *)(a1 + 4 * i) = (((((v5 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v6 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v6 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } }
composition_solid_xor: CMP ECX,0xff JZ 0x001412e9 MOV R8D,0xff00ff MOV EAX,EDX AND EAX,R8D IMUL EAX,ECX MOV R9D,EAX SHR R9D,0x8 AND R9D,R8D MOV R10D,0x800080 ADD EAX,R10D ADD EAX,R9D SHR EAX,0x8 AND EAX,R8D SHR EDX,0x8 AND EDX,R8D IMUL EDX,ECX MOV ECX,EDX SHR ECX,0x8 AND ECX,R8D ADD EDX,R10D ADD EDX,ECX AND EDX,0xff00ff00 OR EDX,EAX LAB_001412e9: TEST ESI,ESI JLE 0x00141383 PUSH RBP PUSH R14 PUSH RBX MOV EAX,EDX NOT EAX SHR EAX,0x18 MOV ECX,0xff00ff MOV R8D,EDX AND R8D,ECX SHR EDX,0x8 AND EDX,ECX MOV ESI,ESI XOR R9D,R9D MOV R10D,0x800080 LAB_00141317: MOV R11D,dword ptr [RDI + R9*0x4] MOV EBP,R11D NOT EBP SHR EBP,0x18 MOV R14D,EBP IMUL R14D,R8D MOV EBX,R11D AND EBX,ECX IMUL EBX,EAX ADD EBX,R14D MOV R14D,EBX SHR R14D,0x8 AND R14D,ECX ADD EBX,R10D ADD EBX,R14D SHR EBX,0x8 AND EBX,ECX IMUL EBP,EDX SHR R11D,0x8 AND R11D,ECX IMUL R11D,EAX ADD R11D,EBP MOV EBP,R11D SHR EBP,0x8 AND EBP,ECX ADD R11D,R10D ADD R11D,EBP AND R11D,0xff00ff00 OR R11D,EBX MOV dword ptr [RDI + R9*0x4],R11D INC R9 CMP RSI,R9 JNZ 0x00141317 POP RBX POP R14 POP RBP LAB_00141383: RET
void composition_solid_xor(long param_1,uint param_2,uint param_3,int param_4) { uint uVar1; uint uVar2; ulong uVar3; if (param_4 != 0xff) { uVar1 = (param_3 & 0xff00ff) * param_4; uVar2 = (param_3 >> 8 & 0xff00ff) * param_4; param_3 = uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 | uVar1 + 0x800080 + (uVar1 >> 8 & 0xff00ff) >> 8 & 0xff00ff; } if (0 < (int)param_2) { uVar3 = 0; do { uVar1 = *(uint *)(param_1 + uVar3 * 4); uVar2 = (uVar1 & 0xff00ff) * (~param_3 >> 0x18) + (~uVar1 >> 0x18) * (param_3 & 0xff00ff); uVar1 = (uVar1 >> 8 & 0xff00ff) * (~param_3 >> 0x18) + (~uVar1 >> 0x18) * (param_3 >> 8 & 0xff00ff); *(uint *)(param_1 + uVar3 * 4) = uVar1 + 0x800080 + (uVar1 >> 8 & 0xff00ff) & 0xff00ff00 | uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar3 = uVar3 + 1; } while (param_2 != uVar3); } return; }
15,595
composition_solid_xor
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_solid_xor(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha) { if(const_alpha != 255) color = BYTE_MUL(color, const_alpha); uint32_t sia = plutovg_alpha(~color); for(int i = 0; i < length; i++) { uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(color, plutovg_alpha(~d), d, sia); } }
O2
c
composition_solid_xor: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebp movl %esi, %ebx movq %rdi, %r14 cmpl $0xff, %ecx je 0x38d3e movl %ebp, %edi movl %ecx, %esi callq 0x38d7d movl %eax, %ebp movl %ebp, %r15d notl %r15d shrl $0x18, %r15d xorl %r12d, %r12d testl %ebx, %ebx cmovlel %r12d, %ebx cmpq %r12, %rbx je 0x38d74 movl (%r14,%r12,4), %edx movl %edx, %esi notl %esi shrl $0x18, %esi movl %ebp, %edi movl %r15d, %ecx callq 0x38dbb movl %eax, (%r14,%r12,4) incq %r12 jmp 0x38d51 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
composition_solid_xor: push rbp push r15 push r14 push r12 push rbx mov ebp, edx mov ebx, esi mov r14, rdi cmp ecx, 0FFh jz short loc_38D3E mov edi, ebp mov esi, ecx call BYTE_MUL mov ebp, eax loc_38D3E: mov r15d, ebp not r15d shr r15d, 18h xor r12d, r12d test ebx, ebx cmovle ebx, r12d loc_38D51: cmp rbx, r12 jz short loc_38D74 mov edx, [r14+r12*4] mov esi, edx not esi shr esi, 18h mov edi, ebp mov ecx, r15d call INTERPOLATE_PIXEL mov [r14+r12*4], eax inc r12 jmp short loc_38D51 loc_38D74: pop rbx pop r12 pop r14 pop r15 pop rbp retn
void composition_solid_xor(long long a1, int a2, unsigned int a3, unsigned int a4) { unsigned int v4; // ebp long long v5; // rbx long long v6; // r12 v4 = a3; v5 = (unsigned int)a2; if ( a4 != 255 ) v4 = BYTE_MUL(a3, a4); v6 = 0LL; if ( a2 <= 0 ) v5 = 0LL; while ( v5 != v6 ) { *(_DWORD *)(a1 + 4 * v6) = INTERPOLATE_PIXEL( v4, (unsigned int)~*(_DWORD *)(a1 + 4 * v6) >> 24, *(unsigned int *)(a1 + 4 * v6)); ++v6; } }
composition_solid_xor: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,EDX MOV EBX,ESI MOV R14,RDI CMP ECX,0xff JZ 0x00138d3e MOV EDI,EBP MOV ESI,ECX CALL 0x00138d7d MOV EBP,EAX LAB_00138d3e: MOV R15D,EBP NOT R15D SHR R15D,0x18 XOR R12D,R12D TEST EBX,EBX CMOVLE EBX,R12D LAB_00138d51: CMP RBX,R12 JZ 0x00138d74 MOV EDX,dword ptr [R14 + R12*0x4] MOV ESI,EDX NOT ESI SHR ESI,0x18 MOV EDI,EBP MOV ECX,R15D CALL 0x00138dbb MOV dword ptr [R14 + R12*0x4],EAX INC R12 JMP 0x00138d51 LAB_00138d74: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void composition_solid_xor(long param_1,uint param_2,uint param_3,int param_4) { uint uVar1; int4 uVar2; ulong uVar3; ulong uVar4; if (param_4 != 0xff) { param_3 = BYTE_MUL(param_3,param_4); } uVar4 = 0; uVar3 = (ulong)param_2; if ((int)param_2 < 1) { uVar3 = uVar4; } for (; uVar3 != uVar4; uVar4 = uVar4 + 1) { uVar1 = *(uint *)(param_1 + uVar4 * 4); uVar2 = INTERPOLATE_PIXEL(param_3,~uVar1 >> 0x18,uVar1,~param_3 >> 0x18); *(int4 *)(param_1 + uVar4 * 4) = uVar2; } return; }
15,596
composition_solid_xor
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_solid_xor(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha) { if(const_alpha != 255) color = BYTE_MUL(color, const_alpha); uint32_t sia = plutovg_alpha(~color); for(int i = 0; i < length; i++) { uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(color, plutovg_alpha(~d), d, sia); } }
O3
c
composition_solid_xor: cmpl $0xff, %ecx je 0x4103c movl $0xff00ff, %r8d # imm = 0xFF00FF movl %edx, %eax andl %r8d, %eax imull %ecx, %eax movl %eax, %r9d shrl $0x8, %r9d andl %r8d, %r9d movl $0x800080, %r10d # imm = 0x800080 addl %r10d, %eax addl %r9d, %eax shrl $0x8, %eax andl %r8d, %eax shrl $0x8, %edx andl %r8d, %edx imull %ecx, %edx movl %edx, %ecx shrl $0x8, %ecx andl %r8d, %ecx addl %r10d, %edx addl %ecx, %edx andl $0xff00ff00, %edx # imm = 0xFF00FF00 orl %eax, %edx testl %esi, %esi jle 0x410d6 pushq %rbp pushq %r14 pushq %rbx movl %edx, %eax notl %eax shrl $0x18, %eax movl $0xff00ff, %ecx # imm = 0xFF00FF movl %edx, %r8d andl %ecx, %r8d shrl $0x8, %edx andl %ecx, %edx movl %esi, %esi xorl %r9d, %r9d movl $0x800080, %r10d # imm = 0x800080 movl (%rdi,%r9,4), %r11d movl %r11d, %ebp notl %ebp shrl $0x18, %ebp movl %ebp, %r14d imull %r8d, %r14d movl %r11d, %ebx andl %ecx, %ebx imull %eax, %ebx addl %r14d, %ebx movl %ebx, %r14d shrl $0x8, %r14d andl %ecx, %r14d addl %r10d, %ebx addl %r14d, %ebx shrl $0x8, %ebx andl %ecx, %ebx imull %edx, %ebp shrl $0x8, %r11d andl %ecx, %r11d imull %eax, %r11d addl %ebp, %r11d movl %r11d, %ebp shrl $0x8, %ebp andl %ecx, %ebp addl %r10d, %r11d addl %ebp, %r11d andl $0xff00ff00, %r11d # imm = 0xFF00FF00 orl %ebx, %r11d movl %r11d, (%rdi,%r9,4) incq %r9 cmpq %r9, %rsi jne 0x4106a popq %rbx popq %r14 popq %rbp retq
composition_solid_xor: cmp ecx, 0FFh jz short loc_4103C mov r8d, 0FF00FFh mov eax, edx and eax, r8d imul eax, ecx mov r9d, eax shr r9d, 8 and r9d, r8d mov r10d, 800080h add eax, r10d add eax, r9d shr eax, 8 and eax, r8d shr edx, 8 and edx, r8d imul edx, ecx mov ecx, edx shr ecx, 8 and ecx, r8d add edx, r10d add edx, ecx and edx, 0FF00FF00h or edx, eax loc_4103C: test esi, esi jle locret_410D6 push rbp push r14 push rbx mov eax, edx not eax shr eax, 18h mov ecx, 0FF00FFh mov r8d, edx and r8d, ecx shr edx, 8 and edx, ecx mov esi, esi xor r9d, r9d mov r10d, 800080h loc_4106A: mov r11d, [rdi+r9*4] mov ebp, r11d not ebp shr ebp, 18h mov r14d, ebp imul r14d, r8d mov ebx, r11d and ebx, ecx imul ebx, eax add ebx, r14d mov r14d, ebx shr r14d, 8 and r14d, ecx add ebx, r10d add ebx, r14d shr ebx, 8 and ebx, ecx imul ebp, edx shr r11d, 8 and r11d, ecx imul r11d, eax add r11d, ebp mov ebp, r11d shr ebp, 8 and ebp, ecx add r11d, r10d add r11d, ebp and r11d, 0FF00FF00h or r11d, ebx mov [rdi+r9*4], r11d inc r9 cmp rsi, r9 jnz short loc_4106A pop rbx pop r14 pop rbp locret_410D6: retn
void composition_solid_xor(long long a1, int a2, unsigned int a3, int a4) { unsigned int v4; // eax int v5; // r8d int v6; // edx long long i; // r9 if ( a4 != 255 ) a3 = (((((a4 * (a3 & 0xFF00FF)) >> 8) & 0xFF00FF) + a4 * (a3 & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((a4 * ((a3 >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + a4 * ((a3 >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; if ( a2 > 0 ) { v4 = ~a3 >> 24; v5 = a3 & 0xFF00FF; v6 = (a3 >> 8) & 0xFF00FF; for ( i = 0LL; i != a2; ++i ) *(_DWORD *)(a1 + 4 * i) = (((((v5 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v6 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v6 * ((unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24) + v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } }
composition_solid_xor: CMP ECX,0xff JZ 0x0014103c MOV R8D,0xff00ff MOV EAX,EDX AND EAX,R8D IMUL EAX,ECX MOV R9D,EAX SHR R9D,0x8 AND R9D,R8D MOV R10D,0x800080 ADD EAX,R10D ADD EAX,R9D SHR EAX,0x8 AND EAX,R8D SHR EDX,0x8 AND EDX,R8D IMUL EDX,ECX MOV ECX,EDX SHR ECX,0x8 AND ECX,R8D ADD EDX,R10D ADD EDX,ECX AND EDX,0xff00ff00 OR EDX,EAX LAB_0014103c: TEST ESI,ESI JLE 0x001410d6 PUSH RBP PUSH R14 PUSH RBX MOV EAX,EDX NOT EAX SHR EAX,0x18 MOV ECX,0xff00ff MOV R8D,EDX AND R8D,ECX SHR EDX,0x8 AND EDX,ECX MOV ESI,ESI XOR R9D,R9D MOV R10D,0x800080 LAB_0014106a: MOV R11D,dword ptr [RDI + R9*0x4] MOV EBP,R11D NOT EBP SHR EBP,0x18 MOV R14D,EBP IMUL R14D,R8D MOV EBX,R11D AND EBX,ECX IMUL EBX,EAX ADD EBX,R14D MOV R14D,EBX SHR R14D,0x8 AND R14D,ECX ADD EBX,R10D ADD EBX,R14D SHR EBX,0x8 AND EBX,ECX IMUL EBP,EDX SHR R11D,0x8 AND R11D,ECX IMUL R11D,EAX ADD R11D,EBP MOV EBP,R11D SHR EBP,0x8 AND EBP,ECX ADD R11D,R10D ADD R11D,EBP AND R11D,0xff00ff00 OR R11D,EBX MOV dword ptr [RDI + R9*0x4],R11D INC R9 CMP RSI,R9 JNZ 0x0014106a POP RBX POP R14 POP RBP LAB_001410d6: RET
void composition_solid_xor(long param_1,uint param_2,uint param_3,int param_4) { uint uVar1; uint uVar2; ulong uVar3; if (param_4 != 0xff) { uVar1 = (param_3 & 0xff00ff) * param_4; uVar2 = (param_3 >> 8 & 0xff00ff) * param_4; param_3 = uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 | uVar1 + 0x800080 + (uVar1 >> 8 & 0xff00ff) >> 8 & 0xff00ff; } if (0 < (int)param_2) { uVar3 = 0; do { uVar1 = *(uint *)(param_1 + uVar3 * 4); uVar2 = (uVar1 & 0xff00ff) * (~param_3 >> 0x18) + (~uVar1 >> 0x18) * (param_3 & 0xff00ff); uVar1 = (uVar1 >> 8 & 0xff00ff) * (~param_3 >> 0x18) + (~uVar1 >> 0x18) * (param_3 >> 8 & 0xff00ff); *(uint *)(param_1 + uVar3 * 4) = uVar1 + 0x800080 + (uVar1 >> 8 & 0xff00ff) & 0xff00ff00 | uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar3 = uVar3 + 1; } while (param_2 != uVar3); } return; }
15,597
ma_hashtbl_free
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void ma_hashtbl_free(MA_HASHTBL *hash) { if (hash->free) { uint i,records; MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); for (i=0,records=hash->records ; i < records ; i++) (*hash->free)(data[i].data); hash->free=0; } ma_delete_dynamic(&hash->array); hash->records=0; return; }
O0
c
ma_hashtbl_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x6894f movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x18(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) movl -0xc(%rbp), %eax cmpl -0x10(%rbp), %eax jae 0x68943 movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rcx movl -0xc(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdi callq *%rax movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x68914 movq -0x8(%rbp), %rax movq $0x0, 0x38(%rax) movq -0x8(%rbp), %rdi addq $0x18, %rdi callq 0x66c80 movq -0x8(%rbp), %rax movl $0x0, 0x8(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_hashtbl_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+38h], 0 jz short loc_6894F mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_18], rax mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax loc_68914: mov eax, [rbp+var_C] cmp eax, [rbp+var_10] jnb short loc_68943 mov rax, [rbp+var_8] mov rax, [rax+38h] mov rcx, [rbp+var_18] mov edx, [rbp+var_C] shl rdx, 4 add rcx, rdx mov rdi, [rcx+8] call rax mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_68914 loc_68943: mov rax, [rbp+var_8] mov qword ptr [rax+38h], 0 loc_6894F: mov rdi, [rbp+var_8] add rdi, 18h call ma_delete_dynamic mov rax, [rbp+var_8] mov dword ptr [rax+8], 0 add rsp, 20h pop rbp retn
long long ma_hashtbl_free(long long a1) { long long result; // rax long long v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+10h] [rbp-10h] unsigned int v4; // [rsp+14h] [rbp-Ch] if ( *(_QWORD *)(a1 + 56) ) { v2 = *(_QWORD *)(a1 + 24); v4 = 0; v3 = *(_DWORD *)(a1 + 8); while ( v4 < v3 ) (*(void ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(16LL * v4++ + v2 + 8)); *(_QWORD *)(a1 + 56) = 0LL; } ma_delete_dynamic(a1 + 24); result = a1; *(_DWORD *)(a1 + 8) = 0; return result; }
ma_hashtbl_free: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0016894f MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX LAB_00168914: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x10] JNC 0x00168943 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0xc] SHL RDX,0x4 ADD RCX,RDX MOV RDI,qword ptr [RCX + 0x8] CALL RAX MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00168914 LAB_00168943: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x38],0x0 LAB_0016894f: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 CALL 0x00166c80 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x0 ADD RSP,0x20 POP RBP RET
void ma_hashtbl_free(long param_1) { uint uVar1; long lVar2; int4 local_14; if (*(long *)(param_1 + 0x38) != 0) { lVar2 = *(long *)(param_1 + 0x18); local_14 = 0; uVar1 = *(uint *)(param_1 + 8); for (; local_14 < uVar1; local_14 = local_14 + 1) { (**(code **)(param_1 + 0x38))(*(int8 *)(lVar2 + (ulong)local_14 * 0x10 + 8)); } *(int8 *)(param_1 + 0x38) = 0; } ma_delete_dynamic(param_1 + 0x18); *(int4 *)(param_1 + 8) = 0; return; }
15,598
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O0
c
init_state_maps: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0xfc710 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx movq %rax, 0x80(%rcx) cmpq $0x0, %rax jne 0xe20a9 movb $0x1, -0x1(%rbp) jmp 0xe22d6 movq -0x20(%rbp), %rcx addq $0x100, %rcx # imm = 0x100 movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0xe2193 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x3, %eax cmpl $0x0, %eax je 0xe2102 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0xe2183 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xe212a movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0xe, (%rax,%rcx) jmp 0xe2181 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movzbl %al, %esi callq 0xe23b0 cmpb $0x0, %al je 0xe214a movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0xe217f movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xe2172 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1a, (%rax,%rcx) jmp 0xe217d movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1, (%rax,%rcx) jmp 0xe217f jmp 0xe2181 jmp 0xe2183 jmp 0xe2185 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xe20ca movq -0x20(%rbp), %rax movb $0x2, 0x24(%rax) movq -0x20(%rbp), %rax movb $0x2, 0x5f(%rax) movq -0x20(%rbp), %rax movb $0xa, 0x27(%rax) movq -0x20(%rbp), %rax movb $0x10, 0x2e(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x21(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3d(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3e(%rax) movq -0x20(%rbp), %rax movb $0x9, 0x3c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x7c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x26(%rax) movq -0x20(%rbp), %rax movb $0xb, 0x23(%rax) movq -0x20(%rbp), %rax movb $0x16, 0x3b(%rax) movq -0x20(%rbp), %rax movb $0x17, 0x3a(%rax) movq -0x20(%rbp), %rax movb $0x12, (%rax) movq -0x20(%rbp), %rax movb $0x13, 0x5c(%rax) movq -0x20(%rbp), %rax movb $0x14, 0x2f(%rax) movq -0x20(%rbp), %rax movb $0x15, 0x2a(%rax) movq -0x20(%rbp), %rax movb $0x18, 0x40(%rax) movq -0x20(%rbp), %rax movb $0x1b, 0x60(%rax) movq -0x20(%rbp), %rax movb $0x21, 0x22(%rax) movq -0x20(%rbp), %rax movb $0x22, 0x2d(%rax) movq -0x20(%rbp), %rax movb $0x24, 0x2c(%rax) movq -0x20(%rbp), %rax movb $0x23, 0x3f(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0xe22a2 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %ecx movb $0x1, %al cmpl $0x2, %ecx movb %al, -0x29(%rbp) je 0xe2283 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0xe, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %dl movq -0x28(%rbp), %rax movl -0x14(%rbp), %ecx movb %dl, (%rax,%rcx) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xe2251 movq -0x20(%rbp), %rax movb $0x1e, 0x58(%rax) movq -0x20(%rbp), %rax movb $0x1e, 0x78(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x42(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x62(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x4e(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x6e(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
init_state_maps: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [rbp+var_20], rax mov rcx, [rbp+var_10] mov [rcx+80h], rax cmp rax, 0 jnz short loc_E20A9 mov [rbp+var_1], 1 jmp loc_E22D6 loc_E20A9: mov rcx, [rbp+var_20] add rcx, 100h mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rax+88h], rcx mov [rbp+var_14], 0 loc_E20CA: cmp [rbp+var_14], 100h jnb loc_E2193 mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 3 cmp eax, 0 jz short loc_E2102 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp loc_E2183 loc_E2102: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_E212A mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 0Eh jmp short loc_E2181 loc_E212A: mov rdi, [rbp+var_10] mov eax, [rbp+var_14] movzx esi, al call is_multi_byte_ident cmp al, 0 jz short loc_E214A mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp short loc_E217F loc_E214A: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_E2172 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1Ah jmp short loc_E217D loc_E2172: mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1 loc_E217D: jmp short $+2 loc_E217F: jmp short $+2 loc_E2181: jmp short $+2 loc_E2183: jmp short $+2 loc_E2185: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_E20CA loc_E2193: mov rax, [rbp+var_20] mov byte ptr [rax+24h], 2 mov rax, [rbp+var_20] mov byte ptr [rax+5Fh], 2 mov rax, [rbp+var_20] mov byte ptr [rax+27h], 0Ah mov rax, [rbp+var_20] mov byte ptr [rax+2Eh], 10h mov rax, [rbp+var_20] mov byte ptr [rax+21h], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Dh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Eh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Ch], 9 mov rax, [rbp+var_20] mov byte ptr [rax+7Ch], 11h mov rax, [rbp+var_20] mov byte ptr [rax+26h], 11h mov rax, [rbp+var_20] mov byte ptr [rax+23h], 0Bh mov rax, [rbp+var_20] mov byte ptr [rax+3Bh], 16h mov rax, [rbp+var_20] mov byte ptr [rax+3Ah], 17h mov rax, [rbp+var_20] mov byte ptr [rax], 12h mov rax, [rbp+var_20] mov byte ptr [rax+5Ch], 13h mov rax, [rbp+var_20] mov byte ptr [rax+2Fh], 14h mov rax, [rbp+var_20] mov byte ptr [rax+2Ah], 15h mov rax, [rbp+var_20] mov byte ptr [rax+40h], 18h mov rax, [rbp+var_20] mov byte ptr [rax+60h], 1Bh mov rax, [rbp+var_20] mov byte ptr [rax+22h], 21h ; '!' mov rax, [rbp+var_20] mov byte ptr [rax+2Dh], 22h ; '"' mov rax, [rbp+var_20] mov byte ptr [rax+2Ch], 24h ; '$' mov rax, [rbp+var_20] mov byte ptr [rax+3Fh], 23h ; '#' mov [rbp+var_14], 0 loc_E2251: cmp [rbp+var_14], 100h jnb short loc_E22A2 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx ecx, byte ptr [rax+rcx] mov al, 1 cmp ecx, 2 mov [rbp+var_29], al jz short loc_E2283 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx eax, byte ptr [rax+rcx] cmp eax, 0Eh setz al mov [rbp+var_29], al loc_E2283: mov al, [rbp+var_29] and al, 1 movzx eax, al mov dl, al mov rax, [rbp+var_28] mov ecx, [rbp+var_14] mov [rax+rcx], dl mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_E2251 loc_E22A2: mov rax, [rbp+var_20] mov byte ptr [rax+58h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+78h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+42h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+62h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+4Eh], 20h ; ' ' mov rax, [rbp+var_20] mov byte ptr [rax+6Eh], 20h ; ' ' mov [rbp+var_1], 0 loc_E22D6: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char init_state_maps(_QWORD *a1) { bool v2; // [rsp+7h] [rbp-29h] _BYTE *v3; // [rsp+10h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-14h] unsigned int j; // [rsp+1Ch] [rbp-14h] v3 = (_BYTE *)my_once_alloc(512LL, 16LL); a1[16] = v3; if ( !v3 ) return 1; a1[17] = v3 + 256; for ( i = 0; i < 0x100; ++i ) { if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 ) { v3[i] = 14; } else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 ) { v3[i] = 26; } else { v3[i] = 1; } } v3[36] = 2; v3[95] = 2; v3[39] = 10; v3[46] = 16; v3[33] = 8; v3[61] = 8; v3[62] = 8; v3[60] = 9; v3[124] = 17; v3[38] = 17; v3[35] = 11; v3[59] = 22; v3[58] = 23; *v3 = 18; v3[92] = 19; v3[47] = 20; v3[42] = 21; v3[64] = 24; v3[96] = 27; v3[34] = 33; v3[45] = 34; v3[44] = 36; v3[63] = 35; for ( j = 0; j < 0x100; ++j ) { v2 = 1; if ( v3[j] != 2 ) v2 = v3[j] == 14; v3[j + 256] = v2; } v3[88] = 30; v3[120] = 30; v3[66] = 31; v3[98] = 31; v3[78] = 32; v3[110] = 32; return 0; }
init_state_maps: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x001fc710 MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x80],RAX CMP RAX,0x0 JNZ 0x001e20a9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001e22d6 LAB_001e20a9: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x100 MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV dword ptr [RBP + -0x14],0x0 LAB_001e20ca: CMP dword ptr [RBP + -0x14],0x100 JNC 0x001e2193 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x3 CMP EAX,0x0 JZ 0x001e2102 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x001e2183 LAB_001e2102: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x001e212a MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0xe JMP 0x001e2181 LAB_001e212a: MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOVZX ESI,AL CALL 0x001e23b0 CMP AL,0x0 JZ 0x001e214a MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x001e217f LAB_001e214a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JZ 0x001e2172 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1a JMP 0x001e217d LAB_001e2172: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1 LAB_001e217d: JMP 0x001e217f LAB_001e217f: JMP 0x001e2181 LAB_001e2181: JMP 0x001e2183 LAB_001e2183: JMP 0x001e2185 LAB_001e2185: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001e20ca LAB_001e2193: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x24],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5f],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x27],0xa MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2e],0x10 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x21],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3d],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3e],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3c],0x9 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x7c],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x26],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x23],0xb MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3b],0x16 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3a],0x17 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x12 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5c],0x13 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2f],0x14 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2a],0x15 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x40],0x18 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x60],0x1b MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x22],0x21 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2d],0x22 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2c],0x24 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3f],0x23 MOV dword ptr [RBP + -0x14],0x0 LAB_001e2251: CMP dword ptr [RBP + -0x14],0x100 JNC 0x001e22a2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV AL,0x1 CMP ECX,0x2 MOV byte ptr [RBP + -0x29],AL JZ 0x001e2283 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xe SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001e2283: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EAX,AL MOV DL,AL MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001e2251 LAB_001e22a2: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x58],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x78],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x42],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x62],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x4e],0x20 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x6e],0x20 MOV byte ptr [RBP + -0x1],0x0 LAB_001e22d6: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 init_state_maps(long param_1) { char cVar1; int1 *puVar2; bool local_31; uint local_1c; int1 local_9; puVar2 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar2; if (puVar2 == (int1 *)0x0) { local_9 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar2 + 0x100; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) { cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff); if (cVar1 == '\0') { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) { puVar2[local_1c] = 1; } else { puVar2[local_1c] = 0x1a; } } else { puVar2[local_1c] = 2; } } else { puVar2[local_1c] = 0xe; } } else { puVar2[local_1c] = 2; } } puVar2[0x24] = 2; puVar2[0x5f] = 2; puVar2[0x27] = 10; puVar2[0x2e] = 0x10; puVar2[0x21] = 8; puVar2[0x3d] = 8; puVar2[0x3e] = 8; puVar2[0x3c] = 9; puVar2[0x7c] = 0x11; puVar2[0x26] = 0x11; puVar2[0x23] = 0xb; puVar2[0x3b] = 0x16; puVar2[0x3a] = 0x17; *puVar2 = 0x12; puVar2[0x5c] = 0x13; puVar2[0x2f] = 0x14; puVar2[0x2a] = 0x15; puVar2[0x40] = 0x18; puVar2[0x60] = 0x1b; puVar2[0x22] = 0x21; puVar2[0x2d] = 0x22; puVar2[0x2c] = 0x24; puVar2[0x3f] = 0x23; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { local_31 = true; if (puVar2[local_1c] != '\x02') { local_31 = puVar2[local_1c] == '\x0e'; } (puVar2 + 0x100)[local_1c] = local_31; } puVar2[0x58] = 0x1e; puVar2[0x78] = 0x1e; puVar2[0x42] = 0x1f; puVar2[0x62] = 0x1f; puVar2[0x4e] = 0x20; puVar2[0x6e] = 0x20; local_9 = 0; } return local_9; }
15,599
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out, size_t out_size, uint64_t symbol_offset, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab) { if (symtab == nullptr) { return false; } const size_t num_symbols = symtab->sh_size / symtab->sh_entsize; for (unsigned i = 0; i < num_symbols;) { size_t offset = symtab->sh_offset + i * symtab->sh_entsize; // If we are reading Elf64_Sym's, we want to limit this array to // 32 elements (to keep stack consumption low), otherwise we can // have a 64 element Elf32_Sym array. # if defined(__WORDSIZE) && __WORDSIZE == 64 const size_t NUM_SYMBOLS = 32U; # else const size_t NUM_SYMBOLS = 64U; # endif // Read at most NUM_SYMBOLS symbols at once to save read() calls. ElfW(Sym) buf[NUM_SYMBOLS]; size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i); const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset); NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read); for (unsigned j = 0; j < num_symbols_in_buf; ++j) { const ElfW(Sym)& symbol = buf[j]; uint64_t start_address = symbol.st_value; start_address += symbol_offset; uint64_t end_address = start_address + symbol.st_size; if (symbol.st_value != 0 && // Skip null value symbols. symbol.st_shndx != 0 && // Skip undefined symbols. start_address <= pc && pc < end_address) { ssize_t len1 = ReadFromOffset(fd, out, out_size, strtab->sh_offset + symbol.st_name); if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) { memset(out, 0, out_size); return false; } return true; // Obtained the symbol name. } } i += num_symbols_in_buf; } return false; }
O0
cpp
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*): pushq %rbp movq %rsp, %rbp subq $0x3b0, %rsp # imm = 0x3B0 movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) cmpq $0x0, 0x10(%rbp) jne 0x4c206 movb $0x0, -0x1(%rbp) jmp 0x4c434 movq 0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rbp), %rcx xorl %edx, %edx divq 0x38(%rcx) movq %rax, -0x40(%rbp) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax cmpq -0x40(%rbp), %rax jae 0x4c430 movq 0x10(%rbp), %rax movq 0x18(%rax), %rax movl -0x44(%rbp), %ecx movq 0x10(%rbp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x20, -0x58(%rbp) movq -0x40(%rbp), %rax movl -0x44(%rbp), %ecx subq %rcx, %rax movq %rax, -0x370(%rbp) leaq -0x58(%rbp), %rdi leaq -0x370(%rbp), %rsi callq 0xdc10 movq (%rax), %rax movq %rax, -0x368(%rbp) movl -0x14(%rbp), %edi imulq $0x18, -0x368(%rbp), %rdx movq -0x50(%rbp), %rcx leaq -0x360(%rbp), %rsi callq 0x4ab20 movq %rax, -0x378(%rbp) movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx cmpq $0x0, %rdx jne 0x4c2b9 jmp 0x4c2be callq 0x93a0 movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x380(%rbp) movq -0x380(%rbp), %rax cmpq -0x368(%rbp), %rax ja 0x4c2e8 jmp 0x4c2ed callq 0x93a0 movl $0x0, -0x384(%rbp) movl -0x384(%rbp), %eax cmpq -0x380(%rbp), %rax jae 0x4c41b movl -0x384(%rbp), %eax movl %eax, %ecx leaq -0x360(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x390(%rbp) movq -0x390(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x398(%rbp) movq -0x30(%rbp), %rax addq -0x398(%rbp), %rax movq %rax, -0x398(%rbp) movq -0x398(%rbp), %rax movq -0x390(%rbp), %rcx addq 0x10(%rcx), %rax movq %rax, -0x3a0(%rbp) movq -0x390(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x4c405 movq -0x390(%rbp), %rax movzwl 0x6(%rax), %eax cmpl $0x0, %eax je 0x4c405 movq -0x398(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x4c405 movq -0x10(%rbp), %rax cmpq -0x3a0(%rbp), %rax jae 0x4c405 movl -0x14(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x18(%rax), %rcx movq -0x390(%rbp), %rax movl (%rax), %eax addq %rax, %rcx callq 0x4ab20 movq %rax, -0x3a8(%rbp) cmpq $0x0, -0x3a8(%rbp) jle 0x4c3ea movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x9800 cmpq $0x0, %rax jne 0x4c3ff movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x9390 movb $0x0, -0x1(%rbp) jmp 0x4c434 movb $0x1, -0x1(%rbp) jmp 0x4c434 jmp 0x4c407 movl -0x384(%rbp), %eax addl $0x1, %eax movl %eax, -0x384(%rbp) jmp 0x4c2f7 movq -0x380(%rbp), %rcx movl -0x44(%rbp), %eax addq %rcx, %rax movl %eax, -0x44(%rbp) jmp 0x4c223 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x3b0, %rsp # imm = 0x3B0 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_: push rbp mov rbp, rsp sub rsp, 3B0h mov rax, [rbp+arg_0] mov [rbp+var_14+4], rdi mov dword ptr [rbp+var_14], esi mov qword ptr [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 cmp [rbp+arg_0], 0 jnz short loc_4C206 mov [rbp+var_1], 0 jmp loc_4C434 loc_4C206: mov rax, [rbp+arg_0] mov rax, [rax+20h] mov rcx, [rbp+arg_0] xor edx, edx div qword ptr [rcx+38h] mov [rbp+var_40], rax mov [rbp+var_44], 0 loc_4C223: mov eax, [rbp+var_44] cmp rax, [rbp+var_40] jnb loc_4C430 mov rax, [rbp+arg_0] mov rax, [rax+18h] mov ecx, [rbp+var_44] mov rdx, [rbp+arg_0] imul rcx, [rdx+38h] add rax, rcx mov [rbp+var_50], rax mov [rbp+var_58], 20h ; ' ' mov rax, [rbp+var_40] mov ecx, [rbp+var_44] sub rax, rcx mov [rbp+var_370], rax lea rdi, [rbp+var_58] lea rsi, [rbp+var_370] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_368], rax mov edi, dword ptr [rbp+var_14]; this imul rdx, [rbp+var_368], 18h; void * mov rcx, [rbp+var_50]; unsigned __int64 lea rsi, [rbp+var_360]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_378], rax mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx cmp rdx, 0 jnz short loc_4C2B9 jmp short loc_4C2BE loc_4C2B9: call _abort loc_4C2BE: mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx mov [rbp+var_380], rax mov rax, [rbp+var_380] cmp rax, [rbp+var_368] ja short loc_4C2E8 jmp short loc_4C2ED loc_4C2E8: call _abort loc_4C2ED: mov [rbp+var_384], 0 loc_4C2F7: mov eax, [rbp+var_384] cmp rax, [rbp+var_380] jnb loc_4C41B mov eax, [rbp+var_384] mov ecx, eax lea rax, [rbp+var_360] imul rcx, 18h add rax, rcx mov [rbp+var_390], rax mov rax, [rbp+var_390] mov rax, [rax+8] mov [rbp+var_398], rax mov rax, [rbp+var_30] add rax, [rbp+var_398] mov [rbp+var_398], rax mov rax, [rbp+var_398] mov rcx, [rbp+var_390] add rax, [rcx+10h] mov [rbp+var_3A0], rax mov rax, [rbp+var_390] cmp qword ptr [rax+8], 0 jz loc_4C405 mov rax, [rbp+var_390] movzx eax, word ptr [rax+6] cmp eax, 0 jz short loc_4C405 mov rax, [rbp+var_398] cmp rax, [rbp+var_14+4] ja short loc_4C405 mov rax, [rbp+var_14+4] cmp rax, [rbp+var_3A0] jnb short loc_4C405 mov edi, dword ptr [rbp+var_14]; this mov rsi, qword ptr [rbp+var_20]; int mov rdx, [rbp+var_28]; void * mov rax, [rbp+var_38] mov rcx, [rax+18h] mov rax, [rbp+var_390] mov eax, [rax] add rcx, rax; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_3A8], rax cmp [rbp+var_3A8], 0 jle short loc_4C3EA mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memchr cmp rax, 0 jnz short loc_4C3FF loc_4C3EA: mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memset mov [rbp+var_1], 0 jmp short loc_4C434 loc_4C3FF: mov [rbp+var_1], 1 jmp short loc_4C434 loc_4C405: jmp short $+2 loc_4C407: mov eax, [rbp+var_384] add eax, 1 mov [rbp+var_384], eax jmp loc_4C2F7 loc_4C41B: mov rcx, [rbp+var_380] mov eax, [rbp+var_44] add rax, rcx mov [rbp+var_44], eax jmp loc_4C223 loc_4C430: mov [rbp+var_1], 0 loc_4C434: mov al, [rbp+var_1] and al, 1 add rsp, 3B0h pop rbp retn
char nglog::tools::FindSymbol(long long a1, int a2, long long a3, void *a4, long long a5, long long a6, _QWORD *a7) { long long v7; // rdi unsigned long long v9; // [rsp+18h] [rbp-398h] unsigned int *v10; // [rsp+20h] [rbp-390h] unsigned int i; // [rsp+2Ch] [rbp-384h] unsigned long long v12; // [rsp+30h] [rbp-380h] unsigned long long v13; // [rsp+38h] [rbp-378h] unsigned long long v14; // [rsp+40h] [rbp-370h] BYREF unsigned long long v15; // [rsp+48h] [rbp-368h] _QWORD v16[97]; // [rsp+50h] [rbp-360h] BYREF long long v17; // [rsp+358h] [rbp-58h] BYREF unsigned long long v18; // [rsp+360h] [rbp-50h] unsigned int v19; // [rsp+36Ch] [rbp-44h] unsigned long long v20; // [rsp+370h] [rbp-40h] long long v21; // [rsp+378h] [rbp-38h] long long v22; // [rsp+380h] [rbp-30h] void *v23; // [rsp+388h] [rbp-28h] int v24[2]; // [rsp+390h] [rbp-20h] _DWORD v25[4]; // [rsp+39Ch] [rbp-14h] *(_QWORD *)&v25[1] = a1; v25[0] = a2; *(_QWORD *)v24 = a3; v23 = a4; v22 = a5; v21 = a6; if ( !a7 ) return 0; v20 = a7[4] / a7[7]; v19 = 0; LABEL_4: if ( v19 >= v20 ) return 0; v18 = a7[7] * v19 + a7[3]; v17 = 32LL; v14 = v20 - v19; v15 = *std::min<unsigned long>(&v17, &v14); v7 = v25[0]; v13 = nglog::tools::ReadFromOffset((nglog::tools *)v25[0], (long long)v16, (char *)(24 * v15), v18); if ( v13 % 0x18 ) abort(v7, v16); v12 = v13 / 0x18; if ( v13 / 0x18 > v15 ) abort(v7, v16); for ( i = 0; ; ++i ) { if ( i >= v12 ) { v19 += v12; goto LABEL_4; } v10 = (unsigned int *)&v16[3 * i]; v9 = *((_QWORD *)v10 + 1) + v22; if ( *((_QWORD *)v10 + 1) ) { if ( *((_WORD *)v10 + 3) && v9 <= *(_QWORD *)&v25[1] && *(_QWORD *)&v25[1] < v16[3 * i + 2] + v9 ) break; } } if ( (long long)nglog::tools::ReadFromOffset( (nglog::tools *)v25[0], *(long long *)v24, (char *)v23, *v10 + *(_QWORD *)(v21 + 24)) > 0 && memchr(*(_QWORD *)v24, 0LL, v23) ) { return 1; } memset(*(_QWORD *)v24, 0LL, v23); return 0; }
FindSymbol: PUSH RBP MOV RBP,RSP SUB RSP,0x3b0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 CMP qword ptr [RBP + 0x10],0x0 JNZ 0x0014c206 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014c434 LAB_0014c206: MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + 0x10] XOR EDX,EDX DIV qword ptr [RCX + 0x38] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x44],0x0 LAB_0014c223: MOV EAX,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0014c430 MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + 0x10] IMUL RCX,qword ptr [RDX + 0x38] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x58],0x20 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x44] SUB RAX,RCX MOV qword ptr [RBP + -0x370],RAX LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x370] CALL 0x0010dc10 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x368],RAX MOV EDI,dword ptr [RBP + -0x14] IMUL RDX,qword ptr [RBP + -0x368],0x18 MOV RCX,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x360] CALL 0x0014ab20 MOV qword ptr [RBP + -0x378],RAX MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX CMP RDX,0x0 JNZ 0x0014c2b9 JMP 0x0014c2be LAB_0014c2b9: CALL 0x001093a0 LAB_0014c2be: MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x380],RAX MOV RAX,qword ptr [RBP + -0x380] CMP RAX,qword ptr [RBP + -0x368] JA 0x0014c2e8 JMP 0x0014c2ed LAB_0014c2e8: CALL 0x001093a0 LAB_0014c2ed: MOV dword ptr [RBP + -0x384],0x0 LAB_0014c2f7: MOV EAX,dword ptr [RBP + -0x384] CMP RAX,qword ptr [RBP + -0x380] JNC 0x0014c41b MOV EAX,dword ptr [RBP + -0x384] MOV ECX,EAX LEA RAX,[RBP + -0x360] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x390],RAX MOV RAX,qword ptr [RBP + -0x390] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x398] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x398] MOV RCX,qword ptr [RBP + -0x390] ADD RAX,qword ptr [RCX + 0x10] MOV qword ptr [RBP + -0x3a0],RAX MOV RAX,qword ptr [RBP + -0x390] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0014c405 MOV RAX,qword ptr [RBP + -0x390] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x0 JZ 0x0014c405 MOV RAX,qword ptr [RBP + -0x398] CMP RAX,qword ptr [RBP + -0x10] JA 0x0014c405 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x3a0] JNC 0x0014c405 MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x390] MOV EAX,dword ptr [RAX] ADD RCX,RAX CALL 0x0014ab20 MOV qword ptr [RBP + -0x3a8],RAX CMP qword ptr [RBP + -0x3a8],0x0 JLE 0x0014c3ea MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00109800 CMP RAX,0x0 JNZ 0x0014c3ff LAB_0014c3ea: MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00109390 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014c434 LAB_0014c3ff: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c434 LAB_0014c405: JMP 0x0014c407 LAB_0014c407: MOV EAX,dword ptr [RBP + -0x384] ADD EAX,0x1 MOV dword ptr [RBP + -0x384],EAX JMP 0x0014c2f7 LAB_0014c41b: MOV RCX,qword ptr [RBP + -0x380] MOV EAX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV dword ptr [RBP + -0x44],EAX JMP 0x0014c223 LAB_0014c430: MOV byte ptr [RBP + -0x1],0x0 LAB_0014c434: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x3b0 POP RBP RET
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*) */ int1 nglog::tools::FindSymbol (ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5,Elf64_Shdr *param_6, Elf64_Shdr *param_7) { ulong *puVar1; ulong uVar2; long lVar3; void *pvVar4; ulong uVar5; uint local_38c; ulong local_378; ulong local_370; uint local_368; short sStack_362; long alStack_360 [96]; ulong local_60; ulong local_58; uint local_4c; ulong local_48; Elf64_Shdr *local_40; ulong local_38; ulong local_30; char *local_28; int local_1c; ulong local_18; if (param_7 != (Elf64_Shdr *)0x0) { local_48 = param_7->sh_size / param_7->sh_entsize; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; for (local_4c = 0; local_4c < local_48; local_4c = local_4c + (int)uVar2) { local_58 = param_7->sh_offset + (ulong)local_4c * param_7->sh_entsize; local_60 = 0x20; local_378 = local_48 - local_4c; puVar1 = std::min<unsigned_long>(&local_60,&local_378); local_370 = *puVar1; uVar2 = ReadFromOffset(local_1c,&local_368,local_370 * 0x18,local_58); if (uVar2 % 0x18 != 0) { /* WARNING: Subroutine does not return */ abort(); } uVar2 = uVar2 / 0x18; if (local_370 < uVar2) { /* WARNING: Subroutine does not return */ abort(); } for (local_38c = 0; local_38c < uVar2; local_38c = local_38c + 1) { uVar5 = (ulong)local_38c; if ((((alStack_360[uVar5 * 3] != 0) && ((&sStack_362)[uVar5 * 0xc] != 0)) && (local_38 + alStack_360[uVar5 * 3] <= local_18)) && (local_18 < local_38 + alStack_360[uVar5 * 3] + alStack_360[uVar5 * 3 + 1])) { lVar3 = ReadFromOffset(local_1c,local_28,local_30, local_40->sh_offset + (ulong)(&local_368)[uVar5 * 6]); if ((0 < lVar3) && (pvVar4 = memchr(local_28,0,local_30), pvVar4 != (void *)0x0)) { return 1; } memset(local_28,0,local_30); return 0; } } } } return 0; }