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
55,300
Irq::SetIoIrqControl(unsigned short)
sp1187[P]veesem/src/core/spg200/irq.cc
void Irq::SetIoIrqControl(word_t value) { io_irq_ctrl_.raw = value; UpdateIrq2(); UpdateIrq3(); UpdateIrq5(); UpdateIrq6(); UpdateIrq7(); }
O3
cpp
Irq::SetIoIrqControl(unsigned short): pushq %rbx movq %rdi, %rbx movw %si, 0x8(%rdi) andw 0xa(%rdi), %si movq (%rdi), %rdi xorl %edx, %edx testl $0xc00, %esi # imm = 0xC00 setne %dl movl $0x2, %esi callq 0xe966 movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testl $0x2100, %eax # imm = 0x2100 setne %dl movl $0x3, %esi callq 0xe966 movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testl $0x1200, %eax # imm = 0x1200 setne %dl movl $0x5, %esi callq 0xe966 movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testb $0x70, %al setne %dl movl $0x6, %esi callq 0xe966 movzwl 0x8(%rbx), %eax movq (%rbx), %rdi andw 0xa(%rbx), %ax xorl %edx, %edx testb $-0x75, %al setne %dl movl $0x7, %esi popq %rbx jmp 0xe966 nop
_ZN3Irq15SetIoIrqControlEt: push rbx mov rbx, rdi mov [rdi+8], si and si, [rdi+0Ah] mov rdi, [rdi]; this xor edx, edx test esi, 0C00h setnz dl; bool mov esi, 2; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test eax, 2100h setnz dl; bool mov esi, 3; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test eax, 1200h setnz dl; bool mov esi, 5; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test al, 70h setnz dl; bool mov esi, 6; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] mov rdi, [rbx]; this and ax, [rbx+0Ah] xor edx, edx test al, 8Bh setnz dl; bool mov esi, 7; int pop rbx jmp _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool)
long long Irq::SetIoIrqControl(Irq *this, unsigned __int16 a2) { *((_WORD *)this + 4) = a2; Cpu::SetIrq(*(Cpu **)this, 2, (*((_WORD *)this + 5) & a2 & 0xC00) != 0); Cpu::SetIrq(*(Cpu **)this, 3, (*((_WORD *)this + 5) & *((_WORD *)this + 4) & 0x2100) != 0); Cpu::SetIrq(*(Cpu **)this, 5, (*((_WORD *)this + 5) & *((_WORD *)this + 4) & 0x1200) != 0); Cpu::SetIrq(*(Cpu **)this, 6, (*((_BYTE *)this + 10) & *((_BYTE *)this + 8) & 0x70) != 0); return Cpu::SetIrq(*(Cpu **)this, 7, (*((_BYTE *)this + 10) & *((_BYTE *)this + 8) & 0x8B) != 0); }
SetIoIrqControl: PUSH RBX MOV RBX,RDI MOV word ptr [RDI + 0x8],SI AND SI,word ptr [RDI + 0xa] MOV RDI,qword ptr [RDI] XOR EDX,EDX TEST ESI,0xc00 SETNZ DL MOV ESI,0x2 CALL 0x0010e966 MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST EAX,0x2100 SETNZ DL MOV ESI,0x3 CALL 0x0010e966 MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST EAX,0x1200 SETNZ DL MOV ESI,0x5 CALL 0x0010e966 MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST AL,0x70 SETNZ DL MOV ESI,0x6 CALL 0x0010e966 MOVZX EAX,word ptr [RBX + 0x8] MOV RDI,qword ptr [RBX] AND AX,word ptr [RBX + 0xa] XOR EDX,EDX TEST AL,0x8b SETNZ DL MOV ESI,0x7 POP RBX JMP 0x0010e966
/* Irq::SetIoIrqControl(unsigned short) */ void __thiscall Irq::SetIoIrqControl(Irq *this,ushort param_1) { *(ushort *)(this + 8) = param_1; Cpu::SetIrq(*(Cpu **)this,2,(param_1 & *(ushort *)(this + 10) & 0xc00) != 0); Cpu::SetIrq(*(Cpu **)this,3,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x2100) != 0); Cpu::SetIrq(*(Cpu **)this,5,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x1200) != 0); Cpu::SetIrq(*(Cpu **)this,6,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x70) != 0); Cpu::SetIrq(*(Cpu **)this,7,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x8b) != 0); return; }
55,301
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<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<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<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<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<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<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>>>&)
monkey531[P]llama/common/json.hpp
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) -> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), j.template get<typename ConstructibleArrayType::value_type>(), void()) { if (JSON_HEDLEY_UNLIKELY(!j.is_array())) { JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); } from_json_array_impl(j, arr, priority_tag<3> {}); }
O2
cpp
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<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<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<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<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x925e7 movq %r14, %rdi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x926c8 pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x43bae leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2669e(%rip), %rsi # 0xb8ca7 leaq 0x10(%rsp), %rdi callq 0x9266a movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63b70 xorl %ebp, %ebp leaq 0x69914(%rip), %rsi # 0xfbf48 leaq -0x51efd(%rip), %rdx # 0x4073e movq %rbx, %rdi callq 0x23ea0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x9265a jmp 0x92662 movq %rax, %r14 movq %rbx, %rdi callq 0x23670 movq %r14, %rdi callq 0x23f20
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_925E7 mov rdi, r14 add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_36detail20from_json_array_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_7array_tENS1_12priority_tagILj3EEE; nlohmann::json_abi_v3_11_3::detail::from_json_array_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>>(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>::array_t &,nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>) loc_925E7: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeArra; "type must be array, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(char const(&)[28],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_9265A jmp short loc_92662 mov r14, rax loc_9265A: mov rdi, rbx; void * call ___cxa_free_exception loc_92662: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_( unsigned __int8 *a1) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v3[56]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( v3, "type must be array, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return nlohmann::json_abi_v3_11_3::detail::from_json_array_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>>(a1); }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001925e7 MOV RDI,R14 ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001926c8 LAB_001925e7: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00143bae LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00192602: LEA RSI,[0x1b8ca7] LEA RDI,[RSP + 0x10] CALL 0x0019266a MOV BPL,0x1 LAB_00192616: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163b70 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x14073e] MOV RDI,RBX CALL 0x00123ea0
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_ (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) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { nlohmann::json_abi_v3_11_3::detail:: from_json_array_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>> (param_1); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00192602 to 00192612 has its CatchHandler @ 00192657 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (local_38,"type must be array, but is ",&local_40); /* try { // try from 00192616 to 00192642 has its CatchHandler @ 00192643 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
55,302
my_numcells_cp932
eloqsql/strings/ctype-cp932.c
static size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen= 0; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_cp932: cmpq %rdx, %rsi jae 0xadb07 pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xadae0 popq %rbp retq xorl %eax, %eax retq
my_numcells_cp932: cmp rsi, rdx jnb short loc_ADB07 push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_ADAE0: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_ADAE0 pop rbp retn loc_ADB07: xor eax, eax retn
long long my_numcells_cp932(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_cp932: CMP RSI,RDX JNC 0x001adb07 PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001adae0: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001adae0 POP RBP RET LAB_001adb07: XOR EAX,EAX RET
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
55,303
pvio_socket_write
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) { ssize_t r; struct st_pvio_socket *csock; int timeout; int send_flags= MSG_DONTWAIT; #ifdef MSG_NOSIGNAL send_flags|= MSG_NOSIGNAL; #endif if (!pvio || !pvio->data) return -1; csock= (struct st_pvio_socket *)pvio->data; timeout = pvio->timeout[PVIO_WRITE_TIMEOUT]; while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1) { int err = socket_errno; if ((err != SOCKET_EAGAIN #ifdef HAVE_SOCKET_EWOULDBLOCK && err != SOCKET_EWOULDBLOCK #endif )|| timeout == 0) return r; if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1) return -1; } return r; }
O0
c
pvio_socket_write: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x40, -0x38(%rbp) movl -0x38(%rbp), %eax orl $0x4000, %eax # imm = 0x4000 movl %eax, -0x38(%rbp) cmpq $0x0, -0x10(%rbp) je 0x19857 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x19861 movq $-0x1, -0x8(%rbp) jmp 0x198dd movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x34(%rbp) movq -0x30(%rbp), %rax movl (%rax), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movl -0x38(%rbp), %ecx callq 0x1adb0 movq %rax, -0x28(%rbp) cmpq $-0x1, %rax jne 0x198d5 callq 0x17050 movl (%rax), %eax movl %eax, -0x3c(%rbp) cmpl $0xb, -0x3c(%rbp) jne 0x198ac cmpl $0x0, -0x34(%rbp) jne 0x198b6 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x198dd movq -0x10(%rbp), %rdi movl -0x34(%rbp), %edx xorl %esi, %esi callq 0x19980 cmpl $0x1, %eax jge 0x198d3 movq $-0x1, -0x8(%rbp) jmp 0x198dd jmp 0x19876 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
pvio_socket_write: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_38], 40h ; '@' mov eax, [rbp+var_38] or eax, 4000h mov [rbp+var_38], eax cmp [rbp+var_10], 0 jz short loc_19857 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_19861 loc_19857: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_198DD loc_19861: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_34], eax loc_19876: mov rax, [rbp+var_30] mov edi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov ecx, [rbp+var_38] call ma_send mov [rbp+var_28], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_198D5 call ___errno_location mov eax, [rax] mov [rbp+var_3C], eax cmp [rbp+var_3C], 0Bh jnz short loc_198AC cmp [rbp+var_34], 0 jnz short loc_198B6 loc_198AC: mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_198DD loc_198B6: mov rdi, [rbp+var_10] mov edx, [rbp+var_34] xor esi, esi call pvio_socket_wait_io_or_timeout cmp eax, 1 jge short loc_198D3 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_198DD loc_198D3: jmp short loc_19876 loc_198D5: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_198DD: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long pvio_socket_write(unsigned int **a1, long long a2, long long a3) { long long v3; // rdi unsigned int v5; // [rsp+Ch] [rbp-34h] unsigned int *v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] if ( !a1 || !*a1 ) return -1LL; v6 = *a1; v5 = *((_DWORD *)a1 + 11); while ( 1 ) { v3 = *v6; v7 = ma_send(v3, a2, a3, "mysql_get_socket"); if ( v7 != -1 ) break; if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 ) return -1LL; if ( (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v5) < 1 ) return -1LL; } return v7; }
pvio_socket_write: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x38],0x40 MOV EAX,dword ptr [RBP + -0x38] OR EAX,0x4000 MOV dword ptr [RBP + -0x38],EAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00119857 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00119861 LAB_00119857: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001198dd LAB_00119861: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x34],EAX LAB_00119876: MOV RAX,qword ptr [RBP + -0x30] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x38] CALL 0x0011adb0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,-0x1 JNZ 0x001198d5 CALL 0x00117050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0xb JNZ 0x001198ac CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001198b6 LAB_001198ac: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001198dd LAB_001198b6: MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x34] XOR ESI,ESI CALL 0x00119980 CMP EAX,0x1 JGE 0x001198d3 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001198dd LAB_001198d3: JMP 0x00119876 LAB_001198d5: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_001198dd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long pvio_socket_write(long *param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; int iVar3; long lVar4; int *piVar5; if ((param_1 != (long *)0x0) && (*param_1 != 0)) { puVar2 = (int4 *)*param_1; iVar1 = *(int *)((long)param_1 + 0x2c); do { lVar4 = ma_send(*puVar2,param_2,param_3,0x4040); if (lVar4 != -1) { return lVar4; } piVar5 = __errno_location(); if (*piVar5 != 0xb) { return -1; } if (iVar1 == 0) { return -1; } iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1); } while (0 < iVar3); } return -1; }
55,304
my_strnncoll_binary
eloqsql/strings/ctype-bin.c
static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len=MY_MIN(slen,tlen); int cmp= memcmp(s,t,len); return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); }
O0
c
my_strnncoll_binary: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %r9b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x38ba6 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x38bae movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x24130 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) je 0x38bd8 movl -0x3c(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x38bfe movsbl -0x29(%rbp), %eax cmpl $0x0, %eax je 0x38beb movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x38bf3 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax subq -0x28(%rbp), %rax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
my_strnncoll_binary: push rbp mov rbp, rsp sub rsp, 60h mov al, r9b 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_29], al mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_38BA6 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short loc_38BAE loc_38BA6: mov rax, [rbp+var_28] mov [rbp+var_48], rax loc_38BAE: mov rax, [rbp+var_48] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_38] call _memcmp mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jz short loc_38BD8 mov eax, [rbp+var_3C] mov [rbp+var_4C], eax jmp short loc_38BFE loc_38BD8: movsx eax, [rbp+var_29] cmp eax, 0 jz short loc_38BEB mov rax, [rbp+var_38] mov [rbp+var_58], rax jmp short loc_38BF3 loc_38BEB: mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_38BF3: mov rax, [rbp+var_58] sub rax, [rbp+var_28] mov [rbp+var_4C], eax loc_38BFE: mov eax, [rbp+var_4C] add rsp, 60h pop rbp retn
long long my_strnncoll_binary( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { int v7; // [rsp+8h] [rbp-58h] unsigned long long v9; // [rsp+18h] [rbp-48h] unsigned int v10; // [rsp+24h] [rbp-3Ch] int v12; // [rsp+38h] [rbp-28h] int v13; // [rsp+48h] [rbp-18h] v13 = a3; v12 = a5; if ( a3 >= a5 ) v9 = a5; else v9 = a3; v10 = memcmp(a2, a4, v9); if ( v10 ) { return v10; } else { if ( a6 ) v7 = v9; else v7 = v13; return (unsigned int)(v7 - v12); } }
my_strnncoll_binary: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,R9B 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 byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x00138ba6 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x00138bae LAB_00138ba6: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX LAB_00138bae: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00124130 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00138bd8 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x00138bfe LAB_00138bd8: MOVSX EAX,byte ptr [RBP + -0x29] CMP EAX,0x0 JZ 0x00138beb MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX JMP 0x00138bf3 LAB_00138beb: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX LAB_00138bf3: MOV RAX,qword ptr [RBP + -0x58] SUB RAX,qword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4c],EAX LAB_00138bfe: MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x60 POP RBP RET
int my_strnncoll_binary(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, char param_6) { ulong local_60; int local_54; size_t local_50; local_50 = param_5; if (param_3 < param_5) { local_50 = param_3; } local_54 = memcmp(param_2,param_4,local_50); if (local_54 == 0) { local_60 = param_3; if (param_6 != '\0') { local_60 = local_50; } local_54 = (int)local_60 - (int)param_5; } return local_54; }
55,305
ma_enlarge_root
eloqsql/storage/maria/ma_write.c
my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root) { uint t_length, nod_flag; MARIA_KEY_PARAM s_temp; MARIA_SHARE *share= info->s; MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_PAGE page; my_bool res= 0; DBUG_ENTER("_ma_enlarge_root"); page.info= info; page.keyinfo= keyinfo; page.buff= info->buff; page.flag= 0; nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0; /* Store pointer to prev page if nod */ _ma_kpointer(info, page.buff + share->keypage_header, *root); t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0, (uchar*) 0, (uchar*) 0, &s_temp); page.size= share->keypage_header + t_length + nod_flag; bzero(page.buff, share->keypage_header); _ma_store_keynr(share, page.buff, keyinfo->key_nr); if (nod_flag) page.flag|= KEYPAGE_FLAG_ISNOD; if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID)) page.flag|= KEYPAGE_FLAG_HAS_TRANSID; (*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header + nod_flag, &s_temp); /* Mark that info->buff was used */ info->keyread_buff_used= info->page_changed= 1; if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) == HA_OFFSET_ERROR) DBUG_RETURN(1); *root= page.pos; page_store_info(share, &page); /* Clear unitialized part of page to avoid valgrind/purify warnings and to get a clean page that is easier to compress and compare with pages generated with redo */ bzero(page.buff + page.size, share->block_size - page.size); if (share->now_transactional && _ma_log_new(&page, 1)) res= 1; if (_ma_write_keypage(&page, page_link->write_lock, PAGECACHE_PRIORITY_HIGH)) res= 1; DBUG_RETURN(res); }
O3
c
ma_enlarge_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rsi, %r15 movq (%rdi), %rbx leaq -0xa8(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x8(%rsi), %rax movq %rdi, -0x90(%rbp) movq %rax, -0x38(%rbp) movq %rax, -0x88(%rbp) movq 0x378(%rdi), %r12 movq %r12, -0x80(%rbp) movl $0x0, -0x64(%rbp) movq %rdx, -0x48(%rbp) movq (%rdx), %rdx movq $0x0, -0x30(%rbp) movl $0x0, %r14d cmpq $-0x1, %rdx je 0x64aaf movl 0x3e4(%rbx), %r14d movl 0x744(%rbx), %esi addq %r12, %rsi movq %rdi, -0x58(%rbp) callq 0x56b0d leaq -0xf8(%rbp), %r9 movq %r15, -0x50(%rbp) movq %r15, %rdi movl %r14d, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d movq %rbx, %r15 movq -0x38(%rbp), %r13 callq *0xf0(%r13) movl %eax, %ebx movl 0x744(%r15), %edx addl %r14d, %ebx addl %edx, %ebx movl %ebx, -0x70(%rbp) movq %r12, %rdi xorl %esi, %esi callq 0x292c0 movb 0xa5(%r13), %al movl 0x744(%r15), %ecx addl $-0x4, %ecx movb %al, (%r12,%rcx) testl %r14d, %r14d je 0x64b2c movl $0x1, -0x64(%rbp) movl $0x1, %eax movq %rax, -0x30(%rbp) movq -0x50(%rbp), %rax testb $0x18, 0x1a(%rax) je 0x64b44 movq -0x30(%rbp), %rax orl $0x2, %eax movq %rax, -0x30(%rbp) movl %eax, -0x64(%rbp) movl 0x744(%r15), %eax movl %r14d, %esi addq %r12, %rsi addq %rax, %rsi leaq -0xf8(%rbp), %rdx movq -0x38(%rbp), %rdi callq *0xf8(%rdi) movq -0x58(%rbp), %rdi movw $0x101, 0x684(%rdi) # imm = 0x101 leaq -0x40(%rbp), %rdx movl $0x6, %esi callq 0x58e77 movq %rax, -0x78(%rbp) cmpq $-0x1, %rax je 0x64c1c movq -0x48(%rbp), %rcx movq %rax, (%rcx) movl 0x744(%r15), %eax addl $-0x3, %eax movq -0x30(%rbp), %rcx movq %r12, %rdx movb %cl, (%r12,%rax) movl 0x744(%r15), %eax movb %bl, -0x1(%r12,%rax) movl 0x744(%r15), %eax movb %bh, -0x2(%rdx,%rax) movl %ebx, %edi addq %r12, %rdi movl 0x7bc(%r15), %edx subl %ebx, %edx xorl %ebx, %ebx xorl %esi, %esi callq 0x292c0 cmpb $0x0, 0x7e7(%r15) je 0x64bf5 leaq -0x90(%rbp), %rdi movl $0x1, %esi callq 0x64c30 movl %eax, %ebx movq -0x40(%rbp), %rax movl 0xc(%rax), %esi leaq -0x90(%rbp), %rdi movl $0x6, %edx callq 0x58b8d testb %al, %al movzbl %bl, %ecx movl $0x1, %eax cmovel %ecx, %eax jmp 0x64c1e movb $0x1, %al addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_enlarge_root: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov r15, rsi mov rbx, [rdi] lea rax, [rbp+var_A8] mov [rbp+var_40], rax mov rax, [rsi+8] mov [rbp+var_90], rdi mov [rbp+var_38], rax mov [rbp+var_88], rax mov r12, [rdi+378h] mov [rbp+var_80], r12 mov [rbp+var_64], 0 mov [rbp+var_48], rdx mov rdx, [rdx] mov [rbp+var_30], 0 mov r14d, 0 cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_64AAF mov r14d, [rbx+3E4h] loc_64AAF: mov esi, [rbx+744h] add rsi, r12 mov [rbp+var_58], rdi call _ma_kpointer lea r9, [rbp+var_F8] mov [rbp+var_50], r15 mov rdi, r15 mov esi, r14d xor edx, edx xor ecx, ecx xor r8d, r8d mov r15, rbx mov r13, [rbp+var_38] call qword ptr [r13+0F0h] mov ebx, eax mov edx, [r15+744h] add ebx, r14d add ebx, edx mov [rbp+var_70], ebx mov rdi, r12 xor esi, esi call _memset mov al, [r13+0A5h] mov ecx, [r15+744h] add ecx, 0FFFFFFFCh mov [r12+rcx], al test r14d, r14d jz short loc_64B2C mov [rbp+var_64], 1 mov eax, 1 mov [rbp+var_30], rax loc_64B2C: mov rax, [rbp+var_50] test byte ptr [rax+1Ah], 18h jz short loc_64B44 mov rax, [rbp+var_30] or eax, 2 mov [rbp+var_30], rax mov [rbp+var_64], eax loc_64B44: mov eax, [r15+744h] mov esi, r14d add rsi, r12 add rsi, rax lea rdx, [rbp+var_F8] mov rdi, [rbp+var_38] call qword ptr [rdi+0F8h] mov rdi, [rbp+var_58] mov word ptr [rdi+684h], 101h lea rdx, [rbp+var_40] mov esi, 6 call _ma_new mov [rbp+var_78], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_64C1C mov rcx, [rbp+var_48] mov [rcx], rax mov eax, [r15+744h] add eax, 0FFFFFFFDh mov rcx, [rbp+var_30] mov rdx, r12 mov [r12+rax], cl mov eax, [r15+744h] mov [r12+rax-1], bl mov eax, [r15+744h] mov [rdx+rax-2], bh mov edi, ebx add rdi, r12 mov edx, [r15+7BCh] sub edx, ebx xor ebx, ebx xor esi, esi call _memset cmp byte ptr [r15+7E7h], 0 jz short loc_64BF5 lea rdi, [rbp+var_90] mov esi, 1 call _ma_log_new mov ebx, eax loc_64BF5: mov rax, [rbp+var_40] mov esi, [rax+0Ch] lea rdi, [rbp+var_90] mov edx, 6 call _ma_write_keypage test al, al movzx ecx, bl mov eax, 1 cmovz eax, ecx jmp short loc_64C1E loc_64C1C: mov al, 1 loc_64C1E: add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char ma_enlarge_root(long long *a1, long long a2, unsigned long long *a3) { long long v4; // rbx long long *v5; // rax long long *v6; // r12 unsigned long long v7; // rdx unsigned int v8; // r14d long long v9; // rsi long long v10; // rdi long long v11; // r15 long long *v12; // r13 int v13; // eax long long v14; // rdx unsigned int v15; // ebx long long *v16; // rdi long long *v17; // rax char *v18; // rdi long long v19; // rdx char v20; // bl bool v21; // zf char result; // al _BYTE v23[80]; // [rsp+8h] [rbp-F8h] BYREF char v24; // [rsp+58h] [rbp-A8h] BYREF long long *v25[4]; // [rsp+70h] [rbp-90h] BYREF unsigned int v26; // [rsp+90h] [rbp-70h] int v27; // [rsp+9Ch] [rbp-64h] long long *v28; // [rsp+A8h] [rbp-58h] long long v29; // [rsp+B0h] [rbp-50h] _QWORD *v30; // [rsp+B8h] [rbp-48h] char *v31; // [rsp+C0h] [rbp-40h] BYREF long long *v32; // [rsp+C8h] [rbp-38h] long long v33; // [rsp+D0h] [rbp-30h] v4 = *a1; v31 = &v24; v5 = *(long long **)(a2 + 8); v25[0] = a1; v32 = v5; v25[1] = v5; v6 = (long long *)a1[111]; v25[2] = v6; v27 = 0; v30 = a3; v7 = *a3; v33 = 0LL; v8 = 0; if ( v7 != -1LL ) v8 = *(_DWORD *)(v4 + 996); v9 = (long long)v6 + *(unsigned int *)(v4 + 1860); v28 = a1; ma_kpointer((long long)a1, v9, v7); v29 = a2; v10 = a2; v11 = v4; v12 = v32; v13 = ((long long ( *)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))v32[30])(v10, v8, 0LL, 0LL, 0LL, v23); v14 = *(unsigned int *)(v4 + 1860); v15 = v14 + v8 + v13; v26 = v15; memset(v6, 0LL, v14); *((_BYTE *)v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 4)) = *((_BYTE *)v12 + 165); if ( v8 ) { v27 = 1; v33 = 1LL; } if ( (*(_BYTE *)(v29 + 26) & 0x18) != 0 ) { v33 = (unsigned int)v33 | 2; v27 = v33; } ((void ( *)(long long *, char *, _BYTE *))v32[31])(v32, (char *)v6 + v8 + *(unsigned int *)(v11 + 1860), v23); v16 = v28; *((_WORD *)v28 + 834) = 257; v17 = (long long *)ma_new(v16, 6, &v31); v25[3] = v17; if ( v17 == (long long *)-1LL ) return 1; *v30 = v17; *((_BYTE *)v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 3)) = v33; *((_BYTE *)v6 + *(unsigned int *)(v11 + 1860) - 1) = v15; *((_BYTE *)v6 + *(unsigned int *)(v11 + 1860) - 2) = BYTE1(v15); v18 = (char *)v6 + v15; v19 = *(_DWORD *)(v11 + 1980) - v15; v20 = 0; memset(v18, 0LL, v19); if ( *(_BYTE *)(v11 + 2023) ) v20 = ma_log_new(v25, 1LL); v21 = (unsigned __int8)ma_write_keypage(v25, *((_DWORD *)v31 + 3), 6) == 0; result = 1; if ( v21 ) return v20; return result; }
_ma_enlarge_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV R15,RSI MOV RBX,qword ptr [RDI] LEA RAX,[RBP + -0xa8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x90],RDI MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x88],RAX MOV R12,qword ptr [RDI + 0x378] MOV qword ptr [RBP + -0x80],R12 MOV dword ptr [RBP + -0x64],0x0 MOV qword ptr [RBP + -0x48],RDX MOV RDX,qword ptr [RDX] MOV qword ptr [RBP + -0x30],0x0 MOV R14D,0x0 CMP RDX,-0x1 JZ 0x00164aaf MOV R14D,dword ptr [RBX + 0x3e4] LAB_00164aaf: MOV ESI,dword ptr [RBX + 0x744] ADD RSI,R12 MOV qword ptr [RBP + -0x58],RDI CALL 0x00156b0d LEA R9,[RBP + -0xf8] MOV qword ptr [RBP + -0x50],R15 MOV RDI,R15 MOV ESI,R14D XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D MOV R15,RBX MOV R13,qword ptr [RBP + -0x38] CALL qword ptr [R13 + 0xf0] MOV EBX,EAX MOV EDX,dword ptr [R15 + 0x744] ADD EBX,R14D ADD EBX,EDX MOV dword ptr [RBP + -0x70],EBX MOV RDI,R12 XOR ESI,ESI CALL 0x001292c0 MOV AL,byte ptr [R13 + 0xa5] MOV ECX,dword ptr [R15 + 0x744] ADD ECX,-0x4 MOV byte ptr [R12 + RCX*0x1],AL TEST R14D,R14D JZ 0x00164b2c MOV dword ptr [RBP + -0x64],0x1 MOV EAX,0x1 MOV qword ptr [RBP + -0x30],RAX LAB_00164b2c: MOV RAX,qword ptr [RBP + -0x50] TEST byte ptr [RAX + 0x1a],0x18 JZ 0x00164b44 MOV RAX,qword ptr [RBP + -0x30] OR EAX,0x2 MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x64],EAX LAB_00164b44: MOV EAX,dword ptr [R15 + 0x744] MOV ESI,R14D ADD RSI,R12 ADD RSI,RAX LEA RDX,[RBP + -0xf8] MOV RDI,qword ptr [RBP + -0x38] CALL qword ptr [RDI + 0xf8] MOV RDI,qword ptr [RBP + -0x58] MOV word ptr [RDI + 0x684],0x101 LEA RDX,[RBP + -0x40] MOV ESI,0x6 CALL 0x00158e77 MOV qword ptr [RBP + -0x78],RAX CMP RAX,-0x1 JZ 0x00164c1c MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],RAX MOV EAX,dword ptr [R15 + 0x744] ADD EAX,-0x3 MOV RCX,qword ptr [RBP + -0x30] MOV RDX,R12 MOV byte ptr [R12 + RAX*0x1],CL MOV EAX,dword ptr [R15 + 0x744] MOV byte ptr [R12 + RAX*0x1 + -0x1],BL MOV EAX,dword ptr [R15 + 0x744] MOV byte ptr [RDX + RAX*0x1 + -0x2],BH MOV EDI,EBX ADD RDI,R12 MOV EDX,dword ptr [R15 + 0x7bc] SUB EDX,EBX XOR EBX,EBX XOR ESI,ESI CALL 0x001292c0 CMP byte ptr [R15 + 0x7e7],0x0 JZ 0x00164bf5 LEA RDI,[RBP + -0x90] MOV ESI,0x1 CALL 0x00164c30 MOV EBX,EAX LAB_00164bf5: MOV RAX,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RAX + 0xc] LEA RDI,[RBP + -0x90] MOV EDX,0x6 CALL 0x00158b8d TEST AL,AL MOVZX ECX,BL MOV EAX,0x1 CMOVZ EAX,ECX JMP 0x00164c1e LAB_00164c1c: MOV AL,0x1 LAB_00164c1e: ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong _ma_enlarge_root(long *param_1,long param_2,long *param_3) { long lVar1; void *__s; long lVar2; char cVar3; int iVar4; ulong uVar5; uint uVar6; uint uVar7; int1 local_100 [80]; int1 local_b0 [24]; long *local_98; long local_90; void *local_88; long local_80; uint local_78; uint local_6c; long *local_60; long local_58; long *local_50; int1 *local_48; long local_40; ulong local_38; lVar1 = *param_1; local_48 = local_b0; local_90 = *(long *)(param_2 + 8); __s = (void *)param_1[0x6f]; local_6c = 0; local_38 = 0; uVar7 = 0; if (*param_3 != -1) { uVar7 = *(uint *)(lVar1 + 0x3e4); } local_98 = param_1; local_88 = __s; local_60 = param_1; local_50 = param_3; local_40 = local_90; _ma_kpointer(param_1,(ulong)*(uint *)(lVar1 + 0x744) + (long)__s); lVar2 = local_40; local_58 = param_2; iVar4 = (**(code **)(local_40 + 0xf0))(param_2,uVar7,0,0,0,local_100); uVar6 = iVar4 + uVar7 + *(uint *)(lVar1 + 0x744); local_78 = uVar6; memset(__s,0,(ulong)*(uint *)(lVar1 + 0x744)); *(int1 *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = *(int1 *)(lVar2 + 0xa5); if (uVar7 != 0) { local_6c = 1; local_38 = 1; } if ((*(byte *)(local_58 + 0x1a) & 0x18) != 0) { local_6c = (uint)local_38 | 2; local_38 = (ulong)local_6c; } (**(code **)(local_40 + 0xf8)) (local_40,(long)__s + (ulong)*(uint *)(lVar1 + 0x744) + (ulong)uVar7,local_100); *(int2 *)((long)local_60 + 0x684) = 0x101; local_80 = _ma_new(local_60,6,&local_48); if (local_80 == -1) { uVar5 = 0xffffffffffffff01; } else { *local_50 = local_80; *(char *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 3)) = (char)local_38; *(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)uVar6; *(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)(uVar6 >> 8); uVar7 = 0; memset((void *)((ulong)uVar6 + (long)__s),0,(ulong)(*(int *)(lVar1 + 0x7bc) - uVar6)); if (*(char *)(lVar1 + 0x7e7) != '\0') { uVar7 = _ma_log_new(&local_98,1); } cVar3 = _ma_write_keypage(&local_98,*(int4 *)(local_48 + 0xc),6); uVar5 = 1; if (cVar3 == '\0') { uVar5 = (ulong)(uVar7 & 0xff); } } return uVar5; }
55,306
simple_key_cache_insert
eloqsql/mysys/mf_keycache.c
static int simple_key_cache_insert(SIMPLE_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { int error= 0; DBUG_ENTER("key_cache_insert"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); if (keycache->key_cache_inited) { /* Key cache is used */ reg1 BLOCK_LINK *block; uint read_length; uint offset; int page_st; my_bool locked_and_incremented= FALSE; /* When the keycache is once initialized, we use the cache_lock to reliably distinguish the cases of normal operation, resizing, and disabled cache. We always increment and decrement 'cnt_for_resize_op' so that a resizer can wait for pending I/O. */ keycache_pthread_mutex_lock(&keycache->cache_lock); /* We do not load index data into a disabled cache nor into an ongoing resize. */ if (!keycache->can_be_used || keycache->in_resize) goto no_key_cache; /* Register the pseudo I/O for the next resize. */ inc_counter_for_resize_op(keycache); locked_and_incremented= TRUE; /* Loaded data may not always be aligned to cache blocks. */ offset= (uint) (filepos % keycache->key_cache_block_size); /* Load data in key_cache_block_size increments. */ do { /* Cache could be disabled or resizing in a later iteration. */ if (!keycache->can_be_used || keycache->in_resize) goto no_key_cache; /* Start loading at the beginning of the cache block. */ filepos-= offset; /* Do not load beyond the end of the cache block. */ read_length= length; set_if_smaller(read_length, keycache->key_cache_block_size-offset); KEYCACHE_DBUG_ASSERT(read_length > 0); /* The block has been read by the caller already. */ keycache->global_cache_read++; /* Request the cache block that matches file/pos. */ keycache->global_cache_r_requests++; block= find_key_block(keycache, file, filepos, level, 0, &page_st); if (!block) { /* This happens only for requests submitted during key cache resize. The block is not in the cache and shall not go in. Stop loading index data. */ goto no_key_cache; } if (!(block->status & BLOCK_ERROR)) { if (page_st == PAGE_WAIT_TO_BE_READ) { /* this is a secondary request for a block to be read into the cache. The block is in eviction. It is not yet assigned to the requested file block (It does not point to the right hash_link). So we cannot call remove_reader() on the block. And we cannot access the hash_link directly here. We need to wait until the assignment is complete. read_block_secondary() executes the correct wait. */ read_block_secondary(keycache, block); /* A secondary request must now have the block assigned to the requested file block. */ DBUG_ASSERT(block->hash_link->file == file); DBUG_ASSERT(block->hash_link->diskpos == filepos); } else if (page_st == PAGE_TO_BE_READ && (offset || (read_length < keycache->key_cache_block_size))) { /* this is a primary request for a block to be read into the cache and the supplied data does not fill the whole block. This function is called on behalf of a LOAD INDEX INTO CACHE statement, which is a read-only task and allows other readers. It is possible that a parallel running reader tries to access this block. If it needs more data than has been supplied here, it would report an error. To be sure that we have all data in the block that is available in the file, we read the block ourselves. Though reading again what the caller did read already is an expensive operation, we need to do this for correctness. */ read_block_primary(keycache, block, keycache->key_cache_block_size, read_length + offset); } else if (page_st == PAGE_TO_BE_READ) { /* This is a new block in the cache. If we come here, we have data for the whole block. */ DBUG_ASSERT(block->hash_link->requests); DBUG_ASSERT(block->status & BLOCK_IN_USE); DBUG_ASSERT((page_st == PAGE_TO_BE_READ) || (block->status & BLOCK_READ)); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_unlock(&keycache->cache_lock); /* Here other threads may step in and register as secondary readers. They will register in block->wqueue[COND_FOR_REQUESTED]. */ #endif /* Copy data from buff */ memcpy(block->buffer+offset, buff, (size_t) read_length); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_lock(&keycache->cache_lock); DBUG_ASSERT(block->status & BLOCK_IN_USE); DBUG_ASSERT((page_st == PAGE_TO_BE_READ) || (block->status & BLOCK_READ)); #endif /* After the data is in the buffer, we can declare the block valid. Now other threads do not need to register as secondary readers any more. They can immediately access the block. */ block->status|= BLOCK_READ; block->length= read_length+offset; /* Do not set block->offset here. If this block is marked BLOCK_CHANGED later, we want to flush only the modified part. So only a writer may set block->offset down from keycache->key_cache_block_size. */ KEYCACHE_DBUG_PRINT("key_cache_insert", ("primary request: new page in cache")); /* Signal all pending requests. */ release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); } else { /* page_st == PAGE_READ. The block is in the buffer. All data must already be present. Blocks are always read with all data available on file. Assert that the block does not have less contents than the preloader supplies. If the caller has data beyond block->length, it means that a file write has been done while this block was in cache and not extended with the new data. If the condition is met, we can simply ignore the block. */ DBUG_ASSERT((page_st == PAGE_READ) && (read_length + offset <= block->length)); } /* A secondary request must now have the block assigned to the requested file block. It does not hurt to check it for primary requests too. */ DBUG_ASSERT(block->hash_link->file == file); DBUG_ASSERT(block->hash_link->diskpos == filepos); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); } /* end of if (!(block->status & BLOCK_ERROR)) */ remove_reader(block); /* Error injection for coverage testing. */ DBUG_EXECUTE_IF("key_cache_insert_block_error", block->status|= BLOCK_ERROR; errno=EIO;); /* Do not link erroneous blocks into the LRU ring, but free them. */ if (!(block->status & BLOCK_ERROR)) { /* Link the block into the LRU ring if it's the last submitted request for the block. This enables eviction for the block. */ unreg_request(keycache, block, 1); } else { free_block(keycache, block); error= 1; break; } buff+= read_length; filepos+= read_length+offset; offset= 0; } while ((length-= read_length)); no_key_cache: if (locked_and_incremented) dec_counter_for_resize_op(keycache); keycache_pthread_mutex_unlock(&keycache->cache_lock); } DBUG_RETURN(error); }
O0
c
simple_key_cache_insert: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movl $0x0, -0x30(%rbp) jmp 0xe5ea7 movq -0x8(%rbp), %rax cmpb $0x0, (%rax) je 0xe616d movb $0x0, -0x45(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x6e112(%rip), %rsi # 0x153fdc movl $0xbe2, %edx # imm = 0xBE2 callq 0xe3360 movq -0x8(%rbp), %rax cmpb $0x0, 0x3(%rax) je 0xe5eeb movq -0x8(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x0, %eax je 0xe5ef0 jmp 0xe614e movq -0x8(%rbp), %rdi callq 0xe3480 movb $0x1, -0x45(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx movl 0x18(%rcx), %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x40(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x3(%rax) je 0xe5f29 movq -0x8(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x0, %eax je 0xe5f2e jmp 0xe614e movl -0x40(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax movq -0x8(%rbp), %rcx movl 0x18(%rcx), %ecx subl -0x40(%rbp), %ecx cmpl %ecx, %eax jbe 0xe5f62 movq -0x8(%rbp), %rax movl 0x18(%rax), %eax subl -0x40(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xe5f64 jmp 0xe5f66 jmp 0xe5f68 movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x158(%rax) movq -0x8(%rbp), %rax movq 0x150(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x150(%rax) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx xorl %r8d, %r8d leaq -0x44(%rbp), %r9 callq 0xe34a0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0xe5fbe jmp 0xe614e movq -0x38(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe60cd cmpl $0x2, -0x44(%rbp) jne 0xe5fef movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0xe3ee0 jmp 0xe5fe6 jmp 0xe5fe8 jmp 0xe5fea jmp 0xe60bf cmpl $0x1, -0x44(%rbp) jne 0xe6026 cmpl $0x0, -0x40(%rbp) jne 0xe6007 movl -0x3c(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0xe6026 movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x18(%rax), %edx movl -0x3c(%rbp), %ecx addl -0x40(%rbp), %ecx callq 0xe3de0 jmp 0xe60bd cmpl $0x1, -0x44(%rbp) jne 0xe60b5 jmp 0xe6032 jmp 0xe6034 jmp 0xe6036 jmp 0xe6038 jmp 0xe603a jmp 0xe603c movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe3d80 movq -0x38(%rbp), %rax movq 0x40(%rax), %rdi movl -0x40(%rbp), %eax addq %rax, %rdi movq -0x28(%rbp), %rsi movl -0x3c(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x6df62(%rip), %rsi # 0x153fdc movl $0xc4b, %edx # imm = 0xC4B callq 0xe3360 jmp 0xe6086 jmp 0xe6088 jmp 0xe608a movq -0x38(%rbp), %rax movl 0x50(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x50(%rax) movl -0x3c(%rbp), %ecx addl -0x40(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x4c(%rax) jmp 0xe60a6 movq -0x38(%rbp), %rdi addq $0x28, %rdi callq 0xe5180 jmp 0xe60bb jmp 0xe60b7 jmp 0xe60b9 jmp 0xe60bb jmp 0xe60bd jmp 0xe60bf jmp 0xe60c1 jmp 0xe60c3 jmp 0xe60c5 jmp 0xe60c7 jmp 0xe60c9 jmp 0xe60cb jmp 0xe60cd movq -0x38(%rbp), %rdi callq 0xe3f20 jmp 0xe60d8 movq -0x38(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe60fb movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x1, %edx callq 0xe3f80 jmp 0xe6111 movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0xe4110 movl $0x1, -0x30(%rbp) jmp 0xe614c movl -0x3c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x3c(%rbp), %eax addl -0x40(%rbp), %eax movl %eax, %eax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x40(%rbp) movl -0x3c(%rbp), %ecx movl -0x2c(%rbp), %eax subl %ecx, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xe5f12 jmp 0xe614e cmpb $0x0, -0x45(%rbp) je 0xe615d movq -0x8(%rbp), %rdi callq 0xe4280 movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe3d80 jmp 0xe616f movl -0x30(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
simple_key_cache_insert: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov [rbp+var_30], 0 jmp short $+2 loc_E5EA7: mov rax, [rbp+var_8] cmp byte ptr [rax], 0 jz loc_E616D mov [rbp+var_45], 0 mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0BE2h call inline_mysql_mutex_lock_24 mov rax, [rbp+var_8] cmp byte ptr [rax+3], 0 jz short loc_E5EEB mov rax, [rbp+var_8] movsx eax, byte ptr [rax+1] cmp eax, 0 jz short loc_E5EF0 loc_E5EEB: jmp loc_E614E loc_E5EF0: mov rdi, [rbp+var_8] call inc_counter_for_resize_op_0 mov [rbp+var_45], 1 mov rax, [rbp+var_18] mov rcx, [rbp+var_8] mov ecx, [rcx+18h] xor edx, edx div rcx mov eax, edx mov [rbp+var_40], eax loc_E5F12: mov rax, [rbp+var_8] cmp byte ptr [rax+3], 0 jz short loc_E5F29 mov rax, [rbp+var_8] movsx eax, byte ptr [rax+1] cmp eax, 0 jz short loc_E5F2E loc_E5F29: jmp loc_E614E loc_E5F2E: mov eax, [rbp+var_40] mov ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_2C] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] mov rcx, [rbp+var_8] mov ecx, [rcx+18h] sub ecx, [rbp+var_40] cmp eax, ecx jbe short loc_E5F62 mov rax, [rbp+var_8] mov eax, [rax+18h] sub eax, [rbp+var_40] mov [rbp+var_3C], eax loc_E5F62: jmp short $+2 loc_E5F64: jmp short $+2 loc_E5F66: jmp short $+2 loc_E5F68: mov rax, [rbp+var_8] mov rcx, [rax+158h] add rcx, 1 mov [rax+158h], rcx mov rax, [rbp+var_8] mov rcx, [rax+150h] add rcx, 1 mov [rax+150h], rcx mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] xor r8d, r8d lea r9, [rbp+var_44] call find_key_block mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_E5FBE jmp loc_E614E loc_E5FBE: mov rax, [rbp+var_38] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz loc_E60CD cmp [rbp+var_44], 2 jnz short loc_E5FEF mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] call read_block_secondary jmp short $+2 loc_E5FE6: jmp short $+2 loc_E5FE8: jmp short $+2 loc_E5FEA: jmp loc_E60BF loc_E5FEF: cmp [rbp+var_44], 1 jnz short loc_E6026 cmp [rbp+var_40], 0 jnz short loc_E6007 mov eax, [rbp+var_3C] mov rcx, [rbp+var_8] cmp eax, [rcx+18h] jnb short loc_E6026 loc_E6007: mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov rax, [rbp+var_8] mov edx, [rax+18h] mov ecx, [rbp+var_3C] add ecx, [rbp+var_40] call read_block_primary jmp loc_E60BD loc_E6026: cmp [rbp+var_44], 1 jnz loc_E60B5 jmp short $+2 loc_E6032: jmp short $+2 loc_E6034: jmp short $+2 loc_E6036: jmp short $+2 loc_E6038: jmp short $+2 loc_E603A: jmp short $+2 loc_E603C: mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 mov rax, [rbp+var_38] mov rdi, [rax+40h] mov eax, [rbp+var_40] add rdi, rax mov rsi, [rbp+var_28] mov eax, [rbp+var_3C] mov edx, eax call _memcpy mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0C4Bh call inline_mysql_mutex_lock_24 jmp short $+2 loc_E6086: jmp short $+2 loc_E6088: jmp short $+2 loc_E608A: mov rax, [rbp+var_38] mov ecx, [rax+50h] or ecx, 2 mov [rax+50h], ecx mov ecx, [rbp+var_3C] add ecx, [rbp+var_40] mov rax, [rbp+var_38] mov [rax+4Ch], ecx jmp short $+2 loc_E60A6: mov rdi, [rbp+var_38] add rdi, 28h ; '(' call release_whole_queue jmp short loc_E60BB loc_E60B5: jmp short $+2 loc_E60B7: jmp short $+2 loc_E60B9: jmp short $+2 loc_E60BB: jmp short $+2 loc_E60BD: jmp short $+2 loc_E60BF: jmp short $+2 loc_E60C1: jmp short $+2 loc_E60C3: jmp short $+2 loc_E60C5: jmp short $+2 loc_E60C7: jmp short $+2 loc_E60C9: jmp short $+2 loc_E60CB: jmp short $+2 loc_E60CD: mov rdi, [rbp+var_38] call remove_reader_0 jmp short $+2 loc_E60D8: mov rax, [rbp+var_38] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_E60FB mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov edx, 1 call unreg_request_0 jmp short loc_E6111 loc_E60FB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] call free_block_0 mov [rbp+var_30], 1 jmp short loc_E614C loc_E6111: mov ecx, [rbp+var_3C] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax mov eax, [rbp+var_3C] add eax, [rbp+var_40] mov eax, eax add rax, [rbp+var_18] mov [rbp+var_18], rax mov [rbp+var_40], 0 mov ecx, [rbp+var_3C] mov eax, [rbp+var_2C] sub eax, ecx mov [rbp+var_2C], eax cmp eax, 0 jnz loc_E5F12 loc_E614C: jmp short $+2 loc_E614E: cmp [rbp+var_45], 0 jz short loc_E615D mov rdi, [rbp+var_8] call dec_counter_for_resize_op_0 loc_E615D: mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 loc_E616D: jmp short $+2 loc_E616F: mov eax, [rbp+var_30] mov [rbp+var_4C], eax mov eax, [rbp+var_4C] add rsp, 50h pop rbp retn
long long simple_key_cache_insert( _QWORD *a1, unsigned int a2, unsigned long long a3, int a4, long long a5, unsigned int a6) { char v7; // [rsp+Bh] [rbp-45h] int v8; // [rsp+Ch] [rbp-44h] BYREF unsigned int v9; // [rsp+10h] [rbp-40h] unsigned int v10; // [rsp+14h] [rbp-3Ch] long long key_block; // [rsp+18h] [rbp-38h] unsigned int v12; // [rsp+20h] [rbp-30h] unsigned int v13; // [rsp+24h] [rbp-2Ch] long long v14; // [rsp+28h] [rbp-28h] int v15; // [rsp+34h] [rbp-1Ch] unsigned long long v16; // [rsp+38h] [rbp-18h] unsigned int v17; // [rsp+44h] [rbp-Ch] _QWORD *v18; // [rsp+48h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v12 = 0; if ( *(_BYTE *)a1 ) { v7 = 0; inline_mysql_mutex_lock_24( (long long)(v18 + 24), (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xBE2u); if ( *((_BYTE *)v18 + 3) && !*((_BYTE *)v18 + 1) ) { inc_counter_for_resize_op_0((long long)v18); v7 = 1; v9 = v16 % *((unsigned int *)v18 + 6); do { if ( !*((_BYTE *)v18 + 3) || *((_BYTE *)v18 + 1) ) break; v16 -= v9; v10 = v13; if ( v13 > *((_DWORD *)v18 + 6) - v9 ) v10 = *((_DWORD *)v18 + 6) - v9; ++v18[43]; ++v18[42]; key_block = find_key_block((long long)v18, v17, v16, v15, 0, &v8); if ( !key_block ) break; if ( (*(_DWORD *)(key_block + 80) & 1) == 0 ) { if ( v8 == 2 ) { read_block_secondary((long long)v18, key_block); } else if ( v8 == 1 && (v9 || v10 < *((_DWORD *)v18 + 6)) ) { read_block_primary((long long)v18, key_block, *((_DWORD *)v18 + 6), v9 + v10); } else if ( v8 == 1 ) { inline_mysql_mutex_unlock_25((long long)(v18 + 24)); memcpy(v9 + *(_QWORD *)(key_block + 64), v14, v10); inline_mysql_mutex_lock_24( (long long)(v18 + 24), (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xC4Bu); *(_DWORD *)(key_block + 80) |= 2u; *(_DWORD *)(key_block + 76) = v9 + v10; release_whole_queue((_QWORD *)(key_block + 40)); } } remove_reader_0(key_block); if ( (*(_DWORD *)(key_block + 80) & 1) != 0 ) { free_block_0((long long)v18, key_block); v12 = 1; break; } unreg_request_0(v18, key_block, 1); v14 += v10; v16 += v9 + v10; v9 = 0; v13 -= v10; } while ( v13 ); } if ( v7 ) dec_counter_for_resize_op_0((long long)v18); inline_mysql_mutex_unlock_25((long long)(v18 + 24)); } return v12; }
simple_key_cache_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOV dword ptr [RBP + -0x30],0x0 JMP 0x001e5ea7 LAB_001e5ea7: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX],0x0 JZ 0x001e616d MOV byte ptr [RBP + -0x45],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x253fdc] MOV EDX,0xbe2 CALL 0x001e3360 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x3],0x0 JZ 0x001e5eeb MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x0 JZ 0x001e5ef0 LAB_001e5eeb: JMP 0x001e614e LAB_001e5ef0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e3480 MOV byte ptr [RBP + -0x45],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x18] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x40],EAX LAB_001e5f12: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x3],0x0 JZ 0x001e5f29 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x0 JZ 0x001e5f2e LAB_001e5f29: JMP 0x001e614e LAB_001e5f2e: MOV EAX,dword ptr [RBP + -0x40] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,dword ptr [RBP + -0x40] CMP EAX,ECX JBE 0x001e5f62 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] SUB EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x3c],EAX LAB_001e5f62: JMP 0x001e5f64 LAB_001e5f64: JMP 0x001e5f66 LAB_001e5f66: JMP 0x001e5f68 LAB_001e5f68: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] ADD RCX,0x1 MOV qword ptr [RAX + 0x158],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x150] ADD RCX,0x1 MOV qword ptr [RAX + 0x150],RCX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] XOR R8D,R8D LEA R9,[RBP + -0x44] CALL 0x001e34a0 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001e5fbe JMP 0x001e614e LAB_001e5fbe: MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e60cd CMP dword ptr [RBP + -0x44],0x2 JNZ 0x001e5fef MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001e3ee0 JMP 0x001e5fe6 LAB_001e5fe6: JMP 0x001e5fe8 LAB_001e5fe8: JMP 0x001e5fea LAB_001e5fea: JMP 0x001e60bf LAB_001e5fef: CMP dword ptr [RBP + -0x44],0x1 JNZ 0x001e6026 CMP dword ptr [RBP + -0x40],0x0 JNZ 0x001e6007 MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x18] JNC 0x001e6026 LAB_001e6007: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,dword ptr [RBP + -0x40] CALL 0x001e3de0 JMP 0x001e60bd LAB_001e6026: CMP dword ptr [RBP + -0x44],0x1 JNZ 0x001e60b5 JMP 0x001e6032 LAB_001e6032: JMP 0x001e6034 LAB_001e6034: JMP 0x001e6036 LAB_001e6036: JMP 0x001e6038 LAB_001e6038: JMP 0x001e603a LAB_001e603a: JMP 0x001e603c LAB_001e603c: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e3d80 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x40] MOV EAX,dword ptr [RBP + -0x40] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x3c] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x253fdc] MOV EDX,0xc4b CALL 0x001e3360 JMP 0x001e6086 LAB_001e6086: JMP 0x001e6088 LAB_001e6088: JMP 0x001e608a LAB_001e608a: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x2 MOV dword ptr [RAX + 0x50],ECX MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4c],ECX JMP 0x001e60a6 LAB_001e60a6: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x28 CALL 0x001e5180 JMP 0x001e60bb LAB_001e60b5: JMP 0x001e60b7 LAB_001e60b7: JMP 0x001e60b9 LAB_001e60b9: JMP 0x001e60bb LAB_001e60bb: JMP 0x001e60bd LAB_001e60bd: JMP 0x001e60bf LAB_001e60bf: JMP 0x001e60c1 LAB_001e60c1: JMP 0x001e60c3 LAB_001e60c3: JMP 0x001e60c5 LAB_001e60c5: JMP 0x001e60c7 LAB_001e60c7: JMP 0x001e60c9 LAB_001e60c9: JMP 0x001e60cb LAB_001e60cb: JMP 0x001e60cd LAB_001e60cd: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001e3f20 JMP 0x001e60d8 LAB_001e60d8: MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e60fb MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x001e3f80 JMP 0x001e6111 LAB_001e60fb: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001e4110 MOV dword ptr [RBP + -0x30],0x1 JMP 0x001e614c LAB_001e6111: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x40],0x0 MOV ECX,dword ptr [RBP + -0x3c] MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,ECX MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001e5f12 LAB_001e614c: JMP 0x001e614e LAB_001e614e: CMP byte ptr [RBP + -0x45],0x0 JZ 0x001e615d MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e4280 LAB_001e615d: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e3d80 LAB_001e616d: JMP 0x001e616f LAB_001e616f: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x50 POP RBP RET
int4 simple_key_cache_insert (char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5, uint param_6) { bool bVar1; int local_4c; uint local_48; uint local_44; long local_40; int4 local_38; uint local_34; void *local_30; int4 local_24; ulong local_20; int4 local_14; char *local_10; local_38 = 0; if (*param_1 != '\0') { bVar1 = false; local_34 = param_6; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xbe2); if ((local_10[3] != '\0') && (local_10[1] == '\0')) { inc_counter_for_resize_op(local_10); bVar1 = true; local_48 = (uint)(local_20 % (ulong)*(uint *)(local_10 + 0x18)); do { if ((local_10[3] == '\0') || (local_10[1] != '\0')) break; local_20 = local_20 - local_48; local_44 = local_34; if (*(int *)(local_10 + 0x18) - local_48 < local_34) { local_44 = *(int *)(local_10 + 0x18) - local_48; } *(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1; *(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1; local_40 = find_key_block(local_10,local_14,local_20,local_24,0,&local_4c); if (local_40 == 0) break; if ((*(uint *)(local_40 + 0x50) & 1) == 0) { if (local_4c == 2) { read_block_secondary(local_10,local_40); } else if ((local_4c == 1) && ((local_48 != 0 || (local_44 < *(uint *)(local_10 + 0x18))))) { read_block_primary(local_10,local_40,*(int4 *)(local_10 + 0x18), local_44 + local_48); } else if (local_4c == 1) { inline_mysql_mutex_unlock(local_10 + 0xc0); memcpy((void *)(*(long *)(local_40 + 0x40) + (ulong)local_48),local_30,(ulong)local_44); inline_mysql_mutex_lock (local_10 + 0xc0, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xc4b); *(uint *)(local_40 + 0x50) = *(uint *)(local_40 + 0x50) | 2; *(uint *)(local_40 + 0x4c) = local_44 + local_48; release_whole_queue(local_40 + 0x28); } } remove_reader(local_40); if ((*(uint *)(local_40 + 0x50) & 1) != 0) { free_block(local_10,local_40); local_38 = 1; break; } unreg_request(local_10,local_40,1); local_30 = (void *)((long)local_30 + (ulong)local_44); local_20 = (local_44 + local_48) + local_20; local_48 = 0; local_34 = local_34 - local_44; } while (local_34 != 0); } if (bVar1) { dec_counter_for_resize_op(local_10); } inline_mysql_mutex_unlock(local_10 + 0xc0); } return local_38; }
55,307
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 0x88c8a 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_88C8A 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_88C8A: 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 0x00188c8a 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_00188c8a: 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; }
55,308
js_function_proto_caller
bluesky950520[P]quickjs/quickjs.c
static JSFunctionBytecode *JS_GetFunctionBytecode(JSValue val) { JSObject *p; if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT) return NULL; p = JS_VALUE_GET_OBJ(val); if (!js_class_has_bytecode(p->class_id)) return NULL; return p->u.func.function_bytecode; }
O3
c
js_function_proto_caller: cmpl $-0x1, %edx jne 0x38540 movzwl 0x6(%rsi), %eax cmpq $0x38, %rax ja 0x38540 movabsq $0x110000000012000, %rcx # imm = 0x110000000012000 btq %rax, %rcx jae 0x38540 movq 0x30(%rsi), %rax testq %rax, %rax je 0x38540 movzwl 0x18(%rax), %eax andl $0x3, %eax movl $0x3, %edx cmpw $0x2, %ax je 0x38558 pushq %rax leaq 0x6ac13(%rip), %rsi # 0xa315b xorl %eax, %eax callq 0x2214f movl $0x6, %edx addq $0x8, %rsp xorl %eax, %eax retq
js_function_proto_caller: cmp edx, 0FFFFFFFFh jnz short loc_38540 movzx eax, word ptr [rsi+6] cmp rax, 38h ; '8' ja short loc_38540 mov rcx, 110000000012000h bt rcx, rax jnb short loc_38540 mov rax, [rsi+30h] test rax, rax jz short loc_38540 movzx eax, word ptr [rax+18h] and eax, 3 mov edx, 3 cmp ax, 2 jz short loc_38558 loc_38540: push rax lea rsi, aInvalidPropert; "invalid property access" xor eax, eax call JS_ThrowTypeError mov edx, 6 add rsp, 8 loc_38558: xor eax, eax retn
long long js_function_proto_caller( 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) { unsigned long long v14; // rax if ( (_DWORD)a3 != -1 || (v14 = *(unsigned __int16 *)(a2 + 6), v14 > 0x38) || (a4 = 0x110000000012000LL, !_bittest64(&a4, v14)) || (v14 = *(_QWORD *)(a2 + 48)) == 0 || (LOWORD(v14) = *(_WORD *)(v14 + 24) & 3, a3 = 3LL, (_WORD)v14 != 2) ) { JS_ThrowTypeError(a1, (long long)"invalid property access", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); } return 0LL; }
js_function_proto_caller: CMP EDX,-0x1 JNZ 0x00138540 MOVZX EAX,word ptr [RSI + 0x6] CMP RAX,0x38 JA 0x00138540 MOV RCX,0x110000000012000 BT RCX,RAX JNC 0x00138540 MOV RAX,qword ptr [RSI + 0x30] TEST RAX,RAX JZ 0x00138540 MOVZX EAX,word ptr [RAX + 0x18] AND EAX,0x3 MOV EDX,0x3 CMP AX,0x2 JZ 0x00138558 LAB_00138540: PUSH RAX LEA RSI,[0x1a315b] XOR EAX,EAX CALL 0x0012214f MOV EDX,0x6 ADD RSP,0x8 LAB_00138558: XOR EAX,EAX RET
int1 [16] js_function_proto_caller(int8 param_1,long param_2,ulong param_3) { int1 auVar1 [16]; if (((((int)param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) && ((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) && (*(long *)(param_2 + 0x30) != 0)) { param_3 = 3; if ((*(ushort *)(*(long *)(param_2 + 0x30) + 0x18) & 3) == 2) goto LAB_00138558; } JS_ThrowTypeError(param_1,"invalid property access",param_3); param_3 = 6; LAB_00138558: auVar1._8_8_ = 0; auVar1._0_8_ = param_3; return auVar1 << 0x40; }
55,309
list_del
bluesky950520[P]quickjs/list.h
static inline void list_del(struct list_head *el) { struct list_head *prev, *next; prev = el->prev; next = el->next; prev->next = next; next->prev = prev; el->prev = NULL; /* fail safe */ el->next = NULL; /* fail safe */ }
O0
c
list_del: movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq (%rax), %rax movq %rax, -0x10(%rsp) movq -0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rsp) movq -0x18(%rsp), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rsp), %rcx movq -0x18(%rsp), %rax movq %rcx, (%rax) movq -0x8(%rsp), %rax movq $0x0, (%rax) movq -0x8(%rsp), %rax movq $0x0, 0x8(%rax) retq nopw %cs:(%rax,%rax)
list_del: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov rax, [rax] mov [rsp+var_10], rax mov rax, [rsp+var_8] mov rax, [rax+8] mov [rsp+var_18], rax mov rcx, [rsp+var_18] mov rax, [rsp+var_10] mov [rax+8], rcx mov rcx, [rsp+var_10] mov rax, [rsp+var_18] mov [rax], rcx mov rax, [rsp+var_8] mov qword ptr [rax], 0 mov rax, [rsp+var_8] mov qword ptr [rax+8], 0 retn
_QWORD * list_del(_QWORD *a1) { _QWORD *result; // rax _QWORD *v2; // [rsp+0h] [rbp-18h] long long v3; // [rsp+8h] [rbp-10h] v3 = *a1; v2 = (_QWORD *)a1[1]; *(_QWORD *)(v3 + 8) = v2; *v2 = v3; *a1 = 0LL; result = a1; a1[1] = 0LL; return result; }
list_del: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + -0x10],RAX MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + -0x18],RAX MOV RCX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX + 0x8],0x0 RET
void list_del(long *param_1) { long lVar1; long *plVar2; lVar1 = *param_1; plVar2 = (long *)param_1[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_1 = 0; param_1[1] = 0; return; }
55,310
unlock_io_cache
eloqsql/mysys/mf_iocache.c
static void unlock_io_cache(IO_CACHE *cache) { IO_CACHE_SHARE *cshare= cache->share; DBUG_ENTER("unlock_io_cache"); DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u", (cache == cshare->source_cache) ? "writer" : "reader", cache, (ulong) cshare->pos_in_file, cshare->total_threads)); cshare->running_threads= cshare->total_threads; mysql_cond_broadcast(&cshare->cond); mysql_mutex_unlock(&cshare->mutex); DBUG_VOID_RETURN; }
O3
c
unlock_io_cache: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movl 0xdc(%rdi), %eax movl %eax, 0xd8(%rdi) leaq 0x48(%rdi), %r14 movq 0x78(%rdi), %rdi testq %rdi, %rdi jne 0x2cc77 movq %r14, %rdi callq 0x24110 movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x2cc89 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x24260 leaq 0x2cdf0a(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x178(%rax) jmp 0x2cc5a leaq 0x2cdef8(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x160(%rax) jmp 0x2cc6b nop
unlock_io_cache: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov eax, [rdi+0DCh] mov [rdi+0D8h], eax lea r14, [rdi+48h] mov rdi, [rdi+78h] test rdi, rdi jnz short loc_2CC77 loc_2CC5A: mov rdi, r14 call _pthread_cond_broadcast mov rdi, [rbx+40h] test rdi, rdi jnz short loc_2CC89 loc_2CC6B: mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_2CC77: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+178h] jmp short loc_2CC5A loc_2CC89: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_2CC6B
long long unlock_io_cache(long long a1) { *(_DWORD *)(a1 + 216) = *(_DWORD *)(a1 + 220); if ( *(_QWORD *)(a1 + 120) ) (*((void (**)(void))PSI_server + 47))(); pthread_cond_broadcast(a1 + 72); if ( *(_QWORD *)(a1 + 64) ) (*((void (**)(void))PSI_server + 44))(); return pthread_mutex_unlock(a1); }
unlock_io_cache: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0xdc] MOV dword ptr [RDI + 0xd8],EAX LEA R14,[RDI + 0x48] MOV RDI,qword ptr [RDI + 0x78] TEST RDI,RDI JNZ 0x0012cc77 LAB_0012cc5a: MOV RDI,R14 CALL 0x00124110 MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x0012cc89 LAB_0012cc6b: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00124260 LAB_0012cc77: LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x178] JMP 0x0012cc5a LAB_0012cc89: LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012cc6b
void unlock_io_cache(pthread_mutex_t *param_1) { *(int4 *)((long)param_1 + 0xd8) = *(int4 *)((long)param_1 + 0xdc); if (param_1[3].__align != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)((long)param_1 + 0x48)); if (*(long *)((long)param_1 + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(param_1); return; }
55,311
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O3
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x20ce1 movl %ebx, %eax leaq 0x8a36e(%rip), %rcx # 0xab02c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x20d37 movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x20ce3 movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x20ce3 movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x20ce3 xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x18180 testl %eax, %eax setne %bpl jne 0x20d37 leaq 0xc1355(%rip), %rax # 0xe2050 cmpl $0x0, (%rax) js 0x20d37 callq 0x8261f movq %rax, %r14 callq 0x18060 movq %rax, %r15 movl (%rax), %edi callq 0x18220 movl (%r15), %r9d leaq 0x8ad81(%rip), %rdx # 0xabaa2 xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0x826bc movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_20CC5; jumptable 0000000000020CC5 default case mov eax, ebx lea rcx, jpt_20CC5 movsxd rax, ds:(jpt_20CC5 - 0AB02Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_20CC7: mov bpl, 1; jumptable 0000000000020CC5 case 0 jmp short loc_20D37 loc_20CCC: mov edx, 0FFFFFFF6h; jumptable 0000000000020CC5 case 2 jmp short loc_20CE3 loc_20CD3: mov edx, 0FFFFFFECh; jumptable 0000000000020CC5 case 3 jmp short loc_20CE3 loc_20CDA: mov edx, 0FFFFFFFBh; jumptable 0000000000020CC5 case 1 jmp short loc_20CE3 def_20CC5: xor edx, edx; jumptable 0000000000020CC5 default case loc_20CE3: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_20D37 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_20D37 call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_20D37: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1) { char v1; // al unsigned int v2; // ebp long long v3; // rdx int v4; // eax int v5; // r14d unsigned int *v6; // r15 int v7; // eax char v9; // [rsp-8h] [rbp-28h] v9 = v1; switch ( a1 ) { case 0: LOBYTE(v2) = 1; return v2; case 1: v3 = 4294967291LL; goto LABEL_7; case 2: v3 = 4294967286LL; goto LABEL_7; case 3: v3 = 4294967276LL; goto LABEL_7; default: v3 = 0LL; LABEL_7: v4 = setpriority(0LL, 0LL, v3); LOBYTE(v2) = v4 != 0; if ( !v4 && common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v6 = (unsigned int *)__errno_location(); v7 = strerror(*v6); v2 = 0; common_log_add(v5, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v7, *v6, v9); } return v2; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x00120ce1 MOV EAX,EBX LEA RCX,[0x1ab02c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x00120d37 caseD_2: MOV EDX,0xfffffff6 JMP 0x00120ce3 caseD_3: MOV EDX,0xffffffec JMP 0x00120ce3 caseD_1: MOV EDX,0xfffffffb JMP 0x00120ce3 default: XOR EDX,EDX LAB_00120ce3: XOR EDI,EDI XOR ESI,ESI CALL 0x00118180 TEST EAX,EAX SETNZ BPL JNZ 0x00120d37 LEA RAX,[0x1e2050] CMP dword ptr [RAX],0x0 JS 0x00120d37 CALL 0x0018261f MOV R14,RAX CALL 0x00118060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x00118220 MOV R9D,dword ptr [R15] LEA RDX,[0x1abaa2] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001826bc LAB_00120d37: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_00120d37; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_00120d37: return uVar5 & 0xffffffff; }
55,312
ma_pvio_tls_check_fp
eloqsql/libmariadb/libmariadb/ma_tls.c
my_bool ma_pvio_tls_check_fp(MARIADB_TLS *ctls, const char *fp, const char *fp_list) { unsigned int cert_fp_len= 64; char *cert_fp= NULL; my_bool rc=1; MYSQL *mysql= ctls->pvio->mysql; cert_fp= (char *)malloc(cert_fp_len); if ((cert_fp_len= ma_tls_get_finger_print(ctls, cert_fp, cert_fp_len)) < 1) goto end; if (fp) rc= ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, fp, (unsigned int)strlen(fp)); else if (fp_list) { MA_FILE *fp; char buff[255]; if (!(fp = ma_open(fp_list, "r", mysql))) goto end; while (ma_gets(buff, sizeof(buff)-1, fp)) { /* remove trailing new line character */ char *pos= strchr(buff, '\r'); if (!pos) pos= strchr(buff, '\n'); if (pos) *pos= '\0'; if (!ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, buff, (unsigned int)strlen(buff))) { /* finger print is valid: close file and exit */ ma_close(fp); rc= 0; goto end; } } /* No finger print matched - close file and return error */ ma_close(fp); } end: if (cert_fp) free(cert_fp); if (rc) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Fingerprint verification of server certificate failed"); } return rc; }
O3
c
ma_pvio_tls_check_fp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rdi), %rax movq 0x40(%rax), %rax movq %rax, -0x138(%rbp) movl $0x40, %edi callq 0x36950 movq %rax, %r14 movq %r15, %rdi movq %rax, %rsi movl $0x40, %edx callq 0x4c4c7 movb $0x1, %r13b testl %eax, %eax je 0x416f0 movl %eax, %r15d testq %r12, %r12 je 0x4175c movq %r12, %rdi callq 0x36400 movq %r14, %rdi movl %r15d, %esi movq %r12, %rdx movl %eax, %ecx callq 0x41800 movl %eax, %r13d testq %r14, %r14 je 0x416fd movq %r14, %rdi callq 0x36190 testb %r13b, %r13b je 0x41734 leaq 0x2f86a7(%rip), %rax # 0x339db0 movq (%rax), %rdx leaq 0x2f86ad(%rip), %rax # 0x339dc0 movq 0xd0(%rax), %rcx leaq 0x51e8c(%rip), %r8 # 0x935ad movq -0x138(%rbp), %rdi movl $0x7ea, %esi # imm = 0x7EA xorl %eax, %eax callq 0x393bd movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x417fb movl %r13d, %eax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %rbx, %rbx je 0x416f0 leaq 0x52335(%rip), %rsi # 0x93a9d movq %rbx, %rdi movq -0x138(%rbp), %rdx callq 0x4b76c testq %rax, %rax je 0x417e3 movq %rax, %r12 leaq -0x130(%rbp), %r13 movl $0xfe, %esi movq %r13, %rdi movq %r12, %rdx callq 0x4b943 testq %rax, %rax je 0x417eb movq %r13, %rdi movl $0xd, %esi callq 0x36500 testq %rax, %rax jne 0x417bf movq %r13, %rdi movl $0xa, %esi callq 0x36500 testq %rax, %rax je 0x417c2 movb $0x0, (%rax) movq %r13, %rdi callq 0x36400 movq %r14, %rdi movl %r15d, %esi movq %r13, %rdx movl %eax, %ecx callq 0x41800 testb %al, %al jne 0x41786 xorl %r13d, %r13d jmp 0x417ee movb $0x1, %r13b jmp 0x416f0 movb $0x1, %r13b movq %r12, %rdi callq 0x4b878 jmp 0x416f0 callq 0x362a0
ma_pvio_tls_check_fp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, rdx mov r12, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+8] mov rax, [rax+40h] mov [rbp+var_138], rax mov edi, 40h ; '@' call _malloc mov r14, rax mov rdi, r15 mov rsi, rax mov edx, 40h ; '@' call ma_tls_get_finger_print mov r13b, 1 test eax, eax jz short loc_416F0 mov r15d, eax test r12, r12 jz loc_4175C mov rdi, r12 call _strlen mov rdi, r14 mov esi, r15d mov rdx, r12 mov ecx, eax call ma_pvio_tls_compare_fp mov r13d, eax loc_416F0: test r14, r14 jz short loc_416FD mov rdi, r14 call _free loc_416FD: test r13b, r13b jz short loc_41734 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] lea r8, aFingerprintVer; "Fingerprint verification of server cert"... mov rdi, [rbp+var_138] mov esi, 7EAh xor eax, eax call my_set_error loc_41734: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_417FB mov eax, r13d add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4175C: test rbx, rbx jz short loc_416F0 lea rsi, aKoi8r+4; "r" mov rdi, rbx mov rdx, [rbp+var_138] call ma_open test rax, rax jz short loc_417E3 mov r12, rax lea r13, [rbp+var_130] loc_41786: mov esi, 0FEh mov rdi, r13 mov rdx, r12 call ma_gets test rax, rax jz short loc_417EB mov rdi, r13 mov esi, 0Dh call _strchr test rax, rax jnz short loc_417BF mov rdi, r13 mov esi, 0Ah call _strchr test rax, rax jz short loc_417C2 loc_417BF: mov byte ptr [rax], 0 loc_417C2: mov rdi, r13 call _strlen mov rdi, r14 mov esi, r15d mov rdx, r13 mov ecx, eax call ma_pvio_tls_compare_fp test al, al jnz short loc_41786 xor r13d, r13d jmp short loc_417EE loc_417E3: mov r13b, 1 jmp loc_416F0 loc_417EB: mov r13b, 1 loc_417EE: mov rdi, r12 call ma_close jmp loc_416F0 loc_417FB: call ___stack_chk_fail
long long ma_pvio_tls_check_fp(long long a1, long long a2, long long a3) { _BYTE *v3; // r13 long long v5; // r14 unsigned int finger_print; // eax unsigned int v7; // r15d unsigned int v8; // eax long long v10; // rax long long v11; // r12 long long v12; // rdx long long v13; // rcx _BYTE *v14; // rax long long v15; // rdx long long v16; // rcx unsigned int v17; // eax long long v18; // [rsp+8h] [rbp-138h] _BYTE v19[256]; // [rsp+10h] [rbp-130h] BYREF unsigned long long v20; // [rsp+110h] [rbp-30h] v20 = __readfsqword(0x28u); v18 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 64LL); v5 = malloc(64LL); finger_print = ma_tls_get_finger_print(a1, v5, 64LL); LOBYTE(v3) = 1; if ( finger_print ) { v7 = finger_print; if ( a2 ) { v8 = strlen(a2); LODWORD(v3) = ma_pvio_tls_compare_fp(v5, v7, a2, v8); } else if ( a3 ) { v10 = ma_open(a3, "r", v18); if ( v10 ) { v11 = v10; v3 = v19; while ( ma_gets(v19, 254LL, v11) ) { v14 = (_BYTE *)strchr(v19, 13LL, v12, v13); if ( v14 || (v14 = (_BYTE *)strchr(v19, 10LL, v15, v16)) != 0LL ) *v14 = 0; v17 = strlen(v19); if ( !(unsigned __int8)ma_pvio_tls_compare_fp(v5, v7, v19, v17) ) { LODWORD(v3) = 0; goto LABEL_20; } } LOBYTE(v3) = 1; LABEL_20: ma_close(v11); } else { LOBYTE(v3) = 1; } } } if ( v5 ) free(v5); if ( (_BYTE)v3 ) my_set_error( v18, 2026, (long long)SQLSTATE_UNKNOWN, client_errors[26], "Fingerprint verification of server certificate failed"); return (unsigned int)v3; }
ma_pvio_tls_check_fp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x138],RAX MOV EDI,0x40 CALL 0x00136950 MOV R14,RAX MOV RDI,R15 MOV RSI,RAX MOV EDX,0x40 CALL 0x0014c4c7 MOV R13B,0x1 TEST EAX,EAX JZ 0x001416f0 MOV R15D,EAX TEST R12,R12 JZ 0x0014175c MOV RDI,R12 CALL 0x00136400 MOV RDI,R14 MOV ESI,R15D MOV RDX,R12 MOV ECX,EAX CALL 0x00141800 MOV R13D,EAX LAB_001416f0: TEST R14,R14 JZ 0x001416fd MOV RDI,R14 CALL 0x00136190 LAB_001416fd: TEST R13B,R13B JZ 0x00141734 LEA RAX,[0x439db0] MOV RDX,qword ptr [RAX] LEA RAX,[0x439dc0] MOV RCX,qword ptr [RAX + 0xd0] LEA R8,[0x1935ad] MOV RDI,qword ptr [RBP + -0x138] MOV ESI,0x7ea XOR EAX,EAX CALL 0x001393bd LAB_00141734: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001417fb MOV EAX,R13D ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014175c: TEST RBX,RBX JZ 0x001416f0 LEA RSI,[0x193a9d] MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x138] CALL 0x0014b76c TEST RAX,RAX JZ 0x001417e3 MOV R12,RAX LEA R13,[RBP + -0x130] LAB_00141786: MOV ESI,0xfe MOV RDI,R13 MOV RDX,R12 CALL 0x0014b943 TEST RAX,RAX JZ 0x001417eb MOV RDI,R13 MOV ESI,0xd CALL 0x00136500 TEST RAX,RAX JNZ 0x001417bf MOV RDI,R13 MOV ESI,0xa CALL 0x00136500 TEST RAX,RAX JZ 0x001417c2 LAB_001417bf: MOV byte ptr [RAX],0x0 LAB_001417c2: MOV RDI,R13 CALL 0x00136400 MOV RDI,R14 MOV ESI,R15D MOV RDX,R13 MOV ECX,EAX CALL 0x00141800 TEST AL,AL JNZ 0x00141786 XOR R13D,R13D JMP 0x001417ee LAB_001417e3: MOV R13B,0x1 JMP 0x001416f0 LAB_001417eb: MOV R13B,0x1 LAB_001417ee: MOV RDI,R12 CALL 0x0014b878 JMP 0x001416f0 LAB_001417fb: CALL 0x001362a0
int4 ma_pvio_tls_check_fp(long param_1,char *param_2,long param_3) { int8 uVar1; char cVar2; int iVar3; int4 uVar4; void *__ptr; size_t sVar5; long lVar6; long lVar7; char *pcVar8; int8 unaff_R13; int7 uVar9; long in_FS_OFFSET; char local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = *(int8 *)(*(long *)(param_1 + 8) + 0x40); __ptr = malloc(0x40); iVar3 = ma_tls_get_finger_print(param_1,__ptr,0x40); uVar9 = (int7)((ulong)unaff_R13 >> 8); uVar4 = (int4)CONCAT71(uVar9,1); if (iVar3 != 0) { if (param_2 == (char *)0x0) { if (param_3 != 0) { lVar6 = ma_open(param_3,&DAT_00193a9d,uVar1); if (lVar6 == 0) { uVar4 = (int4)CONCAT71(uVar9,1); } else { do { lVar7 = ma_gets(local_138,0xfe,lVar6); if (lVar7 == 0) { uVar4 = (int4)CONCAT71((int7)((ulong)local_138 >> 8),1); goto LAB_001417ee; } pcVar8 = strchr(local_138,0xd); if (pcVar8 == (char *)0x0) { pcVar8 = strchr(local_138,10); if (pcVar8 != (char *)0x0) goto LAB_001417bf; } else { LAB_001417bf: *pcVar8 = '\0'; } sVar5 = strlen(local_138); cVar2 = ma_pvio_tls_compare_fp(__ptr,iVar3,local_138,sVar5 & 0xffffffff); } while (cVar2 != '\0'); uVar4 = 0; LAB_001417ee: ma_close(lVar6); } } } else { sVar5 = strlen(param_2); uVar4 = ma_pvio_tls_compare_fp(__ptr,iVar3,param_2,sVar5 & 0xffffffff); } } if (__ptr != (void *)0x0) { free(__ptr); } if ((char)uVar4 != '\0') { my_set_error(uVar1,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00439e90, "Fingerprint verification of server certificate failed"); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
55,313
PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long)
eloqsql/storage/perfschema/pfs_digest.cc
void PFS_statements_digest_stat::reset_data(unsigned char *token_array, size_t length) { pfs_dirty_state dirty_state; m_lock.set_dirty(& dirty_state); m_digest_storage.reset(token_array, length); m_stat.reset(); m_first_seen= 0; m_last_seen= 0; m_lock.dirty_to_free(& dirty_state); }
O3
cpp
PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long): pushq %rbp movq %rsp, %rbp movl (%rdi), %eax andl $-0x4, %eax addl $0x5, %eax movl %eax, %ecx xchgl %ecx, (%rdi) movq %rsi, 0xf8(%rdi) movl %edx, 0x100(%rdi) movb $0x0, 0xd8(%rdi) xorl %ecx, %ecx movl %ecx, 0xdc(%rdi) movl %ecx, 0xf0(%rdi) xorps %xmm0, %xmm0 movaps %xmm0, 0xe0(%rdi) movq $0x0, 0x108(%rdi) andl $-0x4, %eax movaps %xmm0, 0x1c0(%rdi) xchgl %eax, (%rdi) popq %rbp retq
_ZN26PFS_statements_digest_stat10reset_dataEPhm: push rbp mov rbp, rsp mov eax, [rdi] and eax, 0FFFFFFFCh add eax, 5 mov ecx, eax xchg ecx, [rdi] mov [rdi+0F8h], rsi mov [rdi+100h], edx mov byte ptr [rdi+0D8h], 0 xor ecx, ecx mov [rdi+0DCh], ecx mov [rdi+0F0h], ecx xorps xmm0, xmm0 movaps xmmword ptr [rdi+0E0h], xmm0 mov qword ptr [rdi+108h], 0 and eax, 0FFFFFFFCh movaps xmmword ptr [rdi+1C0h], xmm0 xchg eax, [rdi] pop rbp retn
long long PFS_statements_digest_stat::reset_data( PFS_statements_digest_stat *this, unsigned __int8 *a2, int a3) { __int32 v3; // eax v3 = (*(_DWORD *)this & 0xFFFFFFFC) + 5; _InterlockedExchange((volatile __int32 *)this, v3); *((_QWORD *)this + 31) = a2; *((_DWORD *)this + 64) = a3; *((_BYTE *)this + 216) = 0; *((_DWORD *)this + 55) = 0; *((_DWORD *)this + 60) = 0; *((_OWORD *)this + 14) = 0LL; *((_QWORD *)this + 33) = 0LL; *((_OWORD *)this + 28) = 0LL; return (unsigned int)_InterlockedExchange((volatile __int32 *)this, v3 & 0xFFFFFFFC); }
reset_data: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI] AND EAX,0xfffffffc ADD EAX,0x5 MOV ECX,EAX XCHG dword ptr [RDI],ECX MOV qword ptr [RDI + 0xf8],RSI MOV dword ptr [RDI + 0x100],EDX MOV byte ptr [RDI + 0xd8],0x0 XOR ECX,ECX MOV dword ptr [RDI + 0xdc],ECX MOV dword ptr [RDI + 0xf0],ECX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI + 0xe0],XMM0 MOV qword ptr [RDI + 0x108],0x0 AND EAX,0xfffffffc MOVAPS xmmword ptr [RDI + 0x1c0],XMM0 XCHG dword ptr [RDI],EAX POP RBP RET
/* PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long) */ int4 __thiscall PFS_statements_digest_stat::reset_data (PFS_statements_digest_stat *this,uchar *param_1,ulong param_2) { int4 uVar1; uint uVar2; uVar2 = *(uint *)this; LOCK(); *(uint *)this = (uVar2 & 0xfffffffc) + 5; UNLOCK(); *(uchar **)(this + 0xf8) = param_1; *(int *)(this + 0x100) = (int)param_2; this[0xd8] = (PFS_statements_digest_stat)0x0; *(int4 *)(this + 0xdc) = 0; *(int4 *)(this + 0xf0) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; LOCK(); uVar1 = *(int4 *)this; *(uint *)this = (uVar2 & 0xfffffffc) + 4; UNLOCK(); return uVar1; }
55,314
RealmList::LoadBuildInfo()
SylCore-WoTLK/src/server/shared/Realms/RealmList.cpp
void RealmList::LoadBuildInfo() { // 0 1 2 3 4 5 6 if (auto result = LoginDatabase.Query("SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, winChecksumSeed, macChecksumSeed FROM build_info ORDER BY build ASC")) { for (auto const& fields : *result) { RealmBuildInfo& build = _builds.emplace_back(); build.MajorVersion = fields[0].Get<uint32>(); build.MinorVersion = fields[1].Get<uint32>(); build.BugfixVersion = fields[2].Get<uint32>(); std::string hotfixVersion = fields[3].Get<std::string>(); if (hotfixVersion.length() < build.HotfixVersion.size()) { std::copy(hotfixVersion.begin(), hotfixVersion.end(), build.HotfixVersion.begin()); } else { std::fill(hotfixVersion.begin(), hotfixVersion.end(), '\0'); } build.Build = fields[4].Get<uint32>(); std::string windowsHash = fields[5].Get<std::string>(); if (windowsHash.length() == build.WindowsHash.size() * 2) { HexStrToByteArray(windowsHash, build.WindowsHash); } std::string macHash = fields[6].Get<std::string>(); if (macHash.length() == build.MacHash.size() * 2) { HexStrToByteArray(macHash, build.MacHash); } } } }
O3
cpp
RealmList::LoadBuildInfo(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx leaq 0x11fc0e(%rip), %rsi # 0x16d6e8 leaq 0xadf64(%rip), %rcx # 0xfba45 leaq 0x68(%rsp), %r14 movl $0x8b, %edx movq %r14, %rdi callq 0x5cc32 movq (%r14), %r14 testq %r14, %r14 je 0x4dcda leaq 0x48(%rsp), %r15 leaq 0x28(%rsp), %r12 leaq 0x8(%rsp), %r13 movq 0x8(%rbx), %rax cmpq 0x10(%rbx), %rax je 0x4db38 xorps %xmm0, %xmm0 movups %xmm0, 0x2c(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, (%rax) movq 0x8(%rbx), %rbp addq $0x3c, %rbp movq %rbp, 0x8(%rbx) jmp 0x4db44 movq %rbx, %rdi callq 0x506e8 movq 0x8(%rbx), %rbp movq %r14, %rdi xorl %esi, %esi callq 0x7a33a movq %rax, %rdi callq 0x67206 movl %eax, -0x38(%rbp) movl $0x1, %esi movq %r14, %rdi callq 0x7a33a movq %rax, %rdi callq 0x67206 movl %eax, -0x34(%rbp) movl $0x2, %esi movq %r14, %rdi callq 0x7a33a movq %rax, %rdi callq 0x67206 movl %eax, -0x30(%rbp) movl $0x3, %esi movq %r14, %rdi callq 0x7a33a movq %r15, %rdi movq %rax, %rsi callq 0x63480 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx cmpq $0x3, %rdx ja 0x4dbc6 leaq -0x2c(%rbp), %rdi cmpq $0x2, %rdx jb 0x4dcc7 callq 0x1b270 jmp 0x4dbd0 movq %rsi, %rdi xorl %esi, %esi callq 0x1b560 movl $0x4, %esi movq %r14, %rdi callq 0x7a33a movq %rax, %rdi callq 0x67206 movl %eax, -0x3c(%rbp) movl $0x5, %esi movq %r14, %rdi callq 0x7a33a movq %r12, %rdi movq %rax, %rsi callq 0x63480 cmpq $0x28, 0x30(%rsp) jne 0x4dc23 leaq -0x28(%rbp), %rdx movq 0x28(%rsp), %rsi movl $0x28, %edi movl $0x14, %ecx xorl %r8d, %r8d callq 0xc5f3f movl $0x6, %esi movq %r14, %rdi callq 0x7a33a movq %r13, %rdi movq %rax, %rsi callq 0x63480 cmpq $0x28, 0x10(%rsp) jne 0x4dc61 addq $-0x14, %rbp movq 0x8(%rsp), %rsi movl $0x28, %edi movl $0x14, %ecx movq %rbp, %rdx xorl %r8d, %r8d callq 0xc5f3f movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4dc7d movq 0x18(%rsp), %rsi incq %rsi callq 0xd32e8 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x4dc99 movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x4dcb5 movq 0x58(%rsp), %rsi incq %rsi callq 0xd32e8 movq %r14, %rdi callq 0x79f7c testb %al, %al jne 0x4db0e jmp 0x4dcda cmpq $0x1, %rdx jne 0x4dbd0 movb (%rsi), %al movb %al, (%rdi) jmp 0x4dbd0 leaq 0x70(%rsp), %rdi callq 0x2b998 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4dd22 movq 0x18(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x4dd22 jmp 0x4dd1f jmp 0x4dd5e jmp 0x4dd1a movq %rax, %rbx jmp 0x4dd3e movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x4dd3e movq 0x38(%rsp), %rsi incq %rsi callq 0xd32e8 movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x4dd61 movq 0x58(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x4dd61 jmp 0x4dd5e movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x2b998 movq %rbx, %rdi callq 0x1bba0 nop
_ZN9RealmList13LoadBuildInfoEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rdi lea rsi, LoginDatabase lea rcx, aSelectMajorver; "SELECT majorVersion, minorVersion, bugf"... lea r14, [rsp+0A8h+var_40] mov edx, 8Bh mov rdi, r14 call _ZN18DatabaseWorkerPoolI23LoginDatabaseConnectionE5QueryESt17basic_string_viewIcSt11char_traitsIcEE; DatabaseWorkerPool<LoginDatabaseConnection>::Query(std::string_view) mov r14, [r14] test r14, r14 jz loc_4DCDA lea r15, [rsp+0A8h+var_60] lea r12, [rsp+0A8h+var_80] lea r13, [rsp+0A8h+var_A0] loc_4DB0E: mov rax, [rbx+8] cmp rax, [rbx+10h] jz short loc_4DB38 xorps xmm0, xmm0 movups xmmword ptr [rax+2Ch], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax], xmm0 mov rbp, [rbx+8] add rbp, 3Ch ; '<' mov [rbx+8], rbp jmp short loc_4DB44 loc_4DB38: mov rdi, rbx call _ZNSt6vectorI14RealmBuildInfoSaIS0_EE17_M_realloc_appendIJEEEvDpOT_; std::vector<RealmBuildInfo>::_M_realloc_append<>() mov rbp, [rbx+8] loc_4DB44: mov rdi, r14 xor esi, esi call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, rax call _ZNK5Field7GetDataIjEET_v; Field::GetData<uint>(void) mov [rbp-38h], eax mov esi, 1 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, rax call _ZNK5Field7GetDataIjEET_v; Field::GetData<uint>(void) mov [rbp-34h], eax mov esi, 2 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, rax call _ZNK5Field7GetDataIjEET_v; Field::GetData<uint>(void) mov [rbp-30h], eax mov esi, 3 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, r15 mov rsi, rax call _ZNK5Field13GetDataStringB5cxx11Ev; Field::GetDataString(void) mov rsi, [rsp+0A8h+var_60] mov rdx, [rsp+0A8h+var_58] cmp rdx, 3 ja short loc_4DBC6 lea rdi, [rbp-2Ch] cmp rdx, 2 jb loc_4DCC7 call _memmove jmp short loc_4DBD0 loc_4DBC6: mov rdi, rsi xor esi, esi call _memset loc_4DBD0: mov esi, 4 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, rax call _ZNK5Field7GetDataIjEET_v; Field::GetData<uint>(void) mov [rbp-3Ch], eax mov esi, 5 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, r12 mov rsi, rax call _ZNK5Field13GetDataStringB5cxx11Ev; Field::GetDataString(void) cmp [rsp+0A8h+var_78], 28h ; '(' jnz short loc_4DC23 lea rdx, [rbp-28h] mov rsi, [rsp+0A8h+var_80] mov edi, 28h ; '(' mov ecx, 14h xor r8d, r8d call _ZN5Acore4Impl17HexStrToByteArrayESt17basic_string_viewIcSt11char_traitsIcEEPhmb; Acore::Impl::HexStrToByteArray(std::string_view,uchar *,ulong,bool) loc_4DC23: mov esi, 6 mov rdi, r14 call _ZNK9ResultSetixEm; ResultSet::operator[](ulong) mov rdi, r13 mov rsi, rax call _ZNK5Field13GetDataStringB5cxx11Ev; Field::GetDataString(void) cmp [rsp+0A8h+var_98], 28h ; '(' jnz short loc_4DC61 add rbp, 0FFFFFFFFFFFFFFECh mov rsi, [rsp+0A8h+var_A0] mov edi, 28h ; '(' mov ecx, 14h mov rdx, rbp xor r8d, r8d call _ZN5Acore4Impl17HexStrToByteArrayESt17basic_string_viewIcSt11char_traitsIcEEPhmb; Acore::Impl::HexStrToByteArray(std::string_view,uchar *,ulong,bool) loc_4DC61: mov rdi, [rsp+0A8h+var_A0]; void * lea rax, [rsp+0A8h+var_90] cmp rdi, rax jz short loc_4DC7D mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_4DC7D: mov rdi, [rsp+0A8h+var_80]; void * lea rax, [rsp+0A8h+var_70] cmp rdi, rax jz short loc_4DC99 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_4DC99: mov rdi, [rsp+0A8h+var_60]; void * lea rax, [rsp+0A8h+var_50] cmp rdi, rax jz short loc_4DCB5 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_4DCB5: mov rdi, r14; this call _ZN9ResultSet7NextRowEv; ResultSet::NextRow(void) test al, al jnz loc_4DB0E jmp short loc_4DCDA loc_4DCC7: cmp rdx, 1 jnz loc_4DBD0 mov al, [rsi] mov [rdi], al jmp loc_4DBD0 loc_4DCDA: lea rdi, [rsp+0A8h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_4DD22 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_4DD22 jmp short loc_4DD1F jmp short loc_4DD5E jmp short $+2 loc_4DD1A: mov rbx, rax jmp short loc_4DD3E loc_4DD1F: mov rbx, rax loc_4DD22: mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_4DD3E mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_4DD3E: mov rdi, [rsp+arg_40]; void * lea rax, [rsp+arg_50] cmp rdi, rax jz short loc_4DD61 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_4DD61 jmp short $+2 loc_4DD5E: mov rbx, rax loc_4DD61: lea rdi, [rsp+arg_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
void RealmList::LoadBuildInfo(RealmList *this) { ResultSet *v2; // r14 _OWORD *v3; // rax long long v4; // rbp Log *v5; // rax Log *v6; // rax Log *v7; // rax long long v8; // rax _BYTE *v9; // rdi Log *v10; // rax long long v11; // rax long long v12; // rsi void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF long long v14; // [rsp+18h] [rbp-90h] BYREF void *v15[2]; // [rsp+28h] [rbp-80h] BYREF long long v16; // [rsp+38h] [rbp-70h] BYREF void *v17; // [rsp+48h] [rbp-60h] BYREF unsigned long long v18; // [rsp+50h] [rbp-58h] long long v19; // [rsp+58h] [rbp-50h] BYREF ResultSet *v20; // [rsp+68h] [rbp-40h] BYREF volatile signed __int32 *v21; // [rsp+70h] [rbp-38h] BYREF DatabaseWorkerPool<LoginDatabaseConnection>::Query( &v20, &LoginDatabase, 139LL, "SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, winChecksumSeed, macChecksumSeed FROM build_" "info ORDER BY build ASC"); v2 = v20; if ( v20 ) { do { v3 = (_OWORD *)*((_QWORD *)this + 1); if ( v3 == *((_OWORD **)this + 2) ) { std::vector<RealmBuildInfo>::_M_realloc_append<>(this); v4 = *((_QWORD *)this + 1); } else { *(_OWORD *)((char *)v3 + 44) = 0LL; v3[2] = 0LL; v3[1] = 0LL; *v3 = 0LL; v4 = *((_QWORD *)this + 1) + 60LL; *((_QWORD *)this + 1) = v4; } v5 = (Log *)ResultSet::operator[](v2, 0LL); *(_DWORD *)(v4 - 56) = Field::GetData<unsigned int>(v5); v6 = (Log *)ResultSet::operator[](v2, 1LL); *(_DWORD *)(v4 - 52) = Field::GetData<unsigned int>(v6); v7 = (Log *)ResultSet::operator[](v2, 2LL); *(_DWORD *)(v4 - 48) = Field::GetData<unsigned int>(v7); v8 = ResultSet::operator[](v2, 3LL); Field::GetDataString[abi:cxx11](&v17, v8); if ( v18 > 3 ) { memset(v17, 0LL, v18); } else { v9 = (_BYTE *)(v4 - 44); if ( v18 < 2 ) { if ( v18 == 1 ) *v9 = *(_BYTE *)v17; } else { memmove(v9, v17, v18); } } v10 = (Log *)ResultSet::operator[](v2, 4LL); *(_DWORD *)(v4 - 60) = Field::GetData<unsigned int>(v10); v11 = ResultSet::operator[](v2, 5LL); Field::GetDataString[abi:cxx11](v15, v11); if ( v15[1] == &qword_28 ) Acore::Impl::HexStrToByteArray(40LL, v15[0], v4 - 40, 20LL, 0LL); v12 = ResultSet::operator[](v2, 6LL); Field::GetDataString[abi:cxx11](v13, v12); if ( v13[1] == &qword_28 ) Acore::Impl::HexStrToByteArray(40LL, v13[0], v4 - 20, 20LL, 0LL); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( v15[0] != &v16 ) operator delete(v15[0], v16 + 1); if ( v17 != &v19 ) operator delete(v17, v19 + 1); } while ( (unsigned __int8)ResultSet::NextRow(v2) ); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21); }
LoadBuildInfo: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDI LEA RSI,[0x26d6e8] LEA RCX,[0x1fba45] LEA R14,[RSP + 0x68] MOV EDX,0x8b MOV RDI,R14 CALL 0x0015cc32 MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x0014dcda LEA R15,[RSP + 0x48] LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x8] LAB_0014db0e: MOV RAX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RBX + 0x10] JZ 0x0014db38 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x2c],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV RBP,qword ptr [RBX + 0x8] ADD RBP,0x3c MOV qword ptr [RBX + 0x8],RBP JMP 0x0014db44 LAB_0014db38: MOV RDI,RBX CALL 0x001506e8 MOV RBP,qword ptr [RBX + 0x8] LAB_0014db44: MOV RDI,R14 XOR ESI,ESI CALL 0x0017a33a MOV RDI,RAX CALL 0x00167206 MOV dword ptr [RBP + -0x38],EAX MOV ESI,0x1 MOV RDI,R14 CALL 0x0017a33a MOV RDI,RAX CALL 0x00167206 MOV dword ptr [RBP + -0x34],EAX MOV ESI,0x2 MOV RDI,R14 CALL 0x0017a33a MOV RDI,RAX CALL 0x00167206 MOV dword ptr [RBP + -0x30],EAX LAB_0014db89: MOV ESI,0x3 MOV RDI,R14 CALL 0x0017a33a MOV RDI,R15 MOV RSI,RAX CALL 0x00163480 LAB_0014dba1: MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CMP RDX,0x3 JA 0x0014dbc6 LEA RDI,[RBP + -0x2c] CMP RDX,0x2 JC 0x0014dcc7 CALL 0x0011b270 JMP 0x0014dbd0 LAB_0014dbc6: MOV RDI,RSI XOR ESI,ESI CALL 0x0011b560 LAB_0014dbd0: MOV ESI,0x4 MOV RDI,R14 CALL 0x0017a33a MOV RDI,RAX CALL 0x00167206 MOV dword ptr [RBP + -0x3c],EAX LAB_0014dbe8: MOV ESI,0x5 MOV RDI,R14 CALL 0x0017a33a MOV RDI,R12 MOV RSI,RAX CALL 0x00163480 CMP qword ptr [RSP + 0x30],0x28 JNZ 0x0014dc23 LEA RDX,[RBP + -0x28] MOV RSI,qword ptr [RSP + 0x28] LAB_0014dc11: MOV EDI,0x28 MOV ECX,0x14 XOR R8D,R8D CALL 0x001c5f3f LAB_0014dc23: MOV ESI,0x6 MOV RDI,R14 CALL 0x0017a33a MOV RDI,R13 MOV RSI,RAX CALL 0x00163480 CMP qword ptr [RSP + 0x10],0x28 JNZ 0x0014dc61 ADD RBP,-0x14 MOV RSI,qword ptr [RSP + 0x8] LAB_0014dc4c: MOV EDI,0x28 MOV ECX,0x14 MOV RDX,RBP XOR R8D,R8D CALL 0x001c5f3f LAB_0014dc61: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0014dc7d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001d32e8 LAB_0014dc7d: MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x0014dc99 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001d32e8 LAB_0014dc99: MOV RDI,qword ptr [RSP + 0x48] LEA RAX,[RSP + 0x58] CMP RDI,RAX JZ 0x0014dcb5 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001d32e8 LAB_0014dcb5: MOV RDI,R14 CALL 0x00179f7c LAB_0014dcbd: TEST AL,AL JNZ 0x0014db0e JMP 0x0014dcda LAB_0014dcc7: CMP RDX,0x1 JNZ 0x0014dbd0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL JMP 0x0014dbd0 LAB_0014dcda: LEA RDI,[RSP + 0x70] CALL 0x0012b998 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* RealmList::LoadBuildInfo() */ void __thiscall RealmList::LoadBuildInfo(RealmList *this) { int8 *puVar1; char cVar2; uint uVar3; Field *pFVar4; long lVar5; long *local_a0; long local_98; long local_90 [2]; long *local_80; long local_78; long local_70 [2]; long *local_60; ulong local_58; long local_50 [2]; ResultSet *local_40; __shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8]; DatabaseWorkerPool<LoginDatabaseConnection>::Query (&local_40,LoginDatabase,0x8b, "SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, winChecksumSeed, macChecksumSeed FROM build_info ORDER BY build ASC" ); if (local_40 != (ResultSet *)0x0) { do { puVar1 = *(int8 **)(this + 8); if (puVar1 == *(int8 **)(this + 0x10)) { /* try { // try from 0014db38 to 0014db85 has its CatchHandler @ 0014dd5e */ std::vector<RealmBuildInfo,std::allocator<RealmBuildInfo>>::_M_realloc_append<> ((vector<RealmBuildInfo,std::allocator<RealmBuildInfo>> *)this); lVar5 = *(long *)(this + 8); } else { *(int8 *)((long)puVar1 + 0x2c) = 0; *(int8 *)((long)puVar1 + 0x34) = 0; puVar1[4] = 0; puVar1[5] = 0; puVar1[2] = 0; puVar1[3] = 0; *puVar1 = 0; puVar1[1] = 0; lVar5 = *(long *)(this + 8) + 0x3c; *(long *)(this + 8) = lVar5; } pFVar4 = (Field *)ResultSet::operator[](local_40,0); uVar3 = Field::GetData<unsigned_int>(pFVar4); *(uint *)(lVar5 + -0x38) = uVar3; pFVar4 = (Field *)ResultSet::operator[](local_40,1); uVar3 = Field::GetData<unsigned_int>(pFVar4); *(uint *)(lVar5 + -0x34) = uVar3; pFVar4 = (Field *)ResultSet::operator[](local_40,2); uVar3 = Field::GetData<unsigned_int>(pFVar4); *(uint *)(lVar5 + -0x30) = uVar3; /* try { // try from 0014db89 to 0014dba0 has its CatchHandler @ 0014dd5c */ ResultSet::operator[](local_40,3); Field::GetDataString_abi_cxx11_(); if (local_58 < 4) { if (local_58 < 2) { if (local_58 == 1) { *(int1 *)(lVar5 + -0x2c) = (char)*local_60; } } else { memmove((int1 *)(lVar5 + -0x2c),local_60,local_58); } } else { memset(local_60,0,local_58); } /* try { // try from 0014dbd0 to 0014dbe4 has its CatchHandler @ 0014dd18 */ pFVar4 = (Field *)ResultSet::operator[](local_40,4); uVar3 = Field::GetData<unsigned_int>(pFVar4); *(uint *)(lVar5 + -0x3c) = uVar3; /* try { // try from 0014dbe8 to 0014dbff has its CatchHandler @ 0014dd1a */ ResultSet::operator[](local_40,5); Field::GetDataString_abi_cxx11_(); if (local_78 == 0x28) { /* try { // try from 0014dc11 to 0014dc22 has its CatchHandler @ 0014dd14 */ Acore::Impl::HexStrToByteArray(0x28,local_80,lVar5 + -0x28,0x14,0); } /* try { // try from 0014dc23 to 0014dc3a has its CatchHandler @ 0014dd1f */ ResultSet::operator[](local_40,6); Field::GetDataString_abi_cxx11_(); if (local_98 == 0x28) { /* try { // try from 0014dc4c to 0014dc60 has its CatchHandler @ 0014dcf3 */ Acore::Impl::HexStrToByteArray(0x28,local_a0,lVar5 + -0x14,0x14,0); } if (local_a0 != local_90) { operator_delete(local_a0,local_90[0] + 1); } if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } /* try { // try from 0014dcb5 to 0014dcbc has its CatchHandler @ 0014dd16 */ cVar2 = ResultSet::NextRow(local_40); } while (cVar2 != '\0'); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38); return; }
55,315
js_proxy_isArray
bluesky950520[P]quickjs/quickjs.c
static int js_proxy_isArray(JSContext *ctx, JSValue obj) { JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); if (!s) return FALSE; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return -1; } if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return -1; } return JS_IsArray(ctx, s->target); }
O0
c
js_proxy_isArray: subq $0x48, %rsp movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi movl $0x30, %edx callq 0x38350 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x39c6e movl $0x0, 0x44(%rsp) jmp 0x39ce5 movq 0x28(%rsp), %rax movq 0x18(%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4dce0 cmpl $0x0, %eax je 0x39ca3 movq 0x28(%rsp), %rdi callq 0x601e0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x39ce5 movq 0x20(%rsp), %rax cmpb $0x0, 0x21(%rax) je 0x39ccb movq 0x28(%rsp), %rdi callq 0x60220 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x39ce5 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x39ba0 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nop
js_proxy_isArray: sub rsp, 48h mov [rsp+48h+var_18], rsi mov [rsp+48h+var_10], rdx mov [rsp+48h+var_20], rdi mov rdi, [rsp+48h+var_18] mov rsi, [rsp+48h+var_10] mov edx, 30h ; '0' call JS_GetOpaque mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_39C6E mov [rsp+48h+var_4], 0 jmp short loc_39CE5 loc_39C6E: mov rax, [rsp+48h+var_20] mov rdi, [rax+18h] xor eax, eax mov esi, eax call js_check_stack_overflow cmp eax, 0 jz short loc_39CA3 mov rdi, [rsp+48h+var_20] call JS_ThrowStackOverflow mov [rsp+48h+var_38], rax mov [rsp+48h+var_30], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_39CE5 loc_39CA3: mov rax, [rsp+48h+var_28] cmp byte ptr [rax+21h], 0 jz short loc_39CCB mov rdi, [rsp+48h+var_20] call JS_ThrowTypeErrorRevokedProxy mov [rsp+48h+var_48], rax mov [rsp+48h+var_40], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_39CE5 loc_39CCB: mov rdi, [rsp+48h+var_20] mov rax, [rsp+48h+var_28] mov rsi, [rax] mov rdx, [rax+8] call JS_IsArray mov [rsp+48h+var_4], eax loc_39CE5: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long js_proxy_isArray(long long a1, long long a2, int a3) { long long Opaque; // [rsp+20h] [rbp-28h] Opaque = JS_GetOpaque(a2, a3, 48); if ( Opaque ) { if ( (unsigned int)js_check_stack_overflow(*(_QWORD *)(a1 + 24), 0LL) ) { JS_ThrowStackOverflow(a1); return (unsigned int)-1; } else if ( *(_BYTE *)(Opaque + 33) ) { JS_ThrowTypeErrorRevokedProxy(a1); return (unsigned int)-1; } else { return (unsigned int)JS_IsArray(a1, *(_QWORD *)Opaque, *(_QWORD *)(Opaque + 8)); } } else { return 0; } }
js_proxy_isArray: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x28],RDI MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV EDX,0x30 CALL 0x00138350 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x00139c6e MOV dword ptr [RSP + 0x44],0x0 JMP 0x00139ce5 LAB_00139c6e: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x0014dce0 CMP EAX,0x0 JZ 0x00139ca3 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001601e0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x00139ce5 LAB_00139ca3: MOV RAX,qword ptr [RSP + 0x20] CMP byte ptr [RAX + 0x21],0x0 JZ 0x00139ccb MOV RDI,qword ptr [RSP + 0x28] CALL 0x00160220 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x00139ce5 LAB_00139ccb: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00139ba0 MOV dword ptr [RSP + 0x44],EAX LAB_00139ce5: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 js_proxy_isArray(long param_1,int8 param_2,int8 param_3) { int iVar1; int8 *puVar2; int4 local_4; puVar2 = (int8 *)JS_GetOpaque(param_2,param_3,0x30); if (puVar2 == (int8 *)0x0) { local_4 = 0; } else { iVar1 = js_check_stack_overflow(*(int8 *)(param_1 + 0x18),0); if (iVar1 == 0) { if (*(char *)((long)puVar2 + 0x21) == '\0') { local_4 = JS_IsArray(param_1,*puVar2,puVar2[1]); } else { JS_ThrowTypeErrorRevokedProxy(param_1); local_4 = 0xffffffff; } } else { JS_ThrowStackOverflow(param_1); local_4 = 0xffffffff; } } return local_4; }
55,316
js_proxy_isArray
bluesky950520[P]quickjs/quickjs.c
static int js_proxy_isArray(JSContext *ctx, JSValue obj) { JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); if (!s) return FALSE; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return -1; } if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return -1; } return JS_IsArray(ctx, s->target); }
O1
c
js_proxy_isArray: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rsi, -0x8(%rbp) xorl %eax, %eax cmpl $-0x1, %edx jne 0x28322 movq -0x8(%rbp), %rcx cmpw $0x30, 0x6(%rcx) jne 0x28322 movq 0x30(%rcx), %rcx jmp 0x28324 xorl %ecx, %ecx testq %rcx, %rcx je 0x2835f movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x28346 leaq 0x76c99(%rip), %rsi # 0x9efd6 xorl %eax, %eax callq 0x20add jmp 0x2835a cmpb $0x0, 0x21(%rcx) je 0x28365 leaq 0x76ca4(%rip), %rsi # 0x9eff7 xorl %eax, %eax callq 0x22567 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbp retq movq (%rcx), %rsi movq 0x8(%rcx), %rdx addq $0x10, %rsp popq %rbp jmp 0x282d2
js_proxy_isArray: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rsi xor eax, eax cmp edx, 0FFFFFFFFh jnz short loc_28322 mov rcx, [rbp+var_8] cmp word ptr [rcx+6], 30h ; '0' jnz short loc_28322 mov rcx, [rcx+30h] jmp short loc_28324 loc_28322: xor ecx, ecx loc_28324: test rcx, rcx jz short loc_2835F mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_28346 lea rsi, aMaximumCallSta; "Maximum call stack size exceeded" xor eax, eax call JS_ThrowRangeError jmp short loc_2835A loc_28346: cmp byte ptr [rcx+21h], 0 jz short loc_28365 lea rsi, aRevokedProxy; "revoked proxy" xor eax, eax call JS_ThrowTypeError loc_2835A: mov eax, 0FFFFFFFFh loc_2835F: add rsp, 10h pop rbp retn loc_28365: mov rsi, [rcx] mov rdx, [rcx+8] add rsp, 10h pop rbp jmp JS_IsArray
long long js_proxy_isArray( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { long long result; // rax long long v15; // rcx char v16; // [rsp+0h] [rbp-10h] long long savedregs; // [rsp+10h] [rbp+0h] BYREF result = 0LL; if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 48 ) v15 = *(_QWORD *)(a2 + 48); else v15 = 0LL; if ( v15 ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs ) { if ( !*(_BYTE *)(v15 + 33) ) return JS_IsArray(a1, *(_QWORD *)v15, *(_QWORD *)(v15 + 8)); JS_ThrowTypeError(a1, (long long)"revoked proxy", a3, v15, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v16); } else { JS_ThrowRangeError( a1, (long long)"Maximum call stack size exceeded", a3, v15, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v16); } return 0xFFFFFFFFLL; } return result; }
js_proxy_isArray: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RSI XOR EAX,EAX CMP EDX,-0x1 JNZ 0x00128322 MOV RCX,qword ptr [RBP + -0x8] CMP word ptr [RCX + 0x6],0x30 JNZ 0x00128322 MOV RCX,qword ptr [RCX + 0x30] JMP 0x00128324 LAB_00128322: XOR ECX,ECX LAB_00128324: TEST RCX,RCX JZ 0x0012835f MOV RAX,qword ptr [RDI + 0x18] CMP qword ptr [RAX + 0xe8],RBP JBE 0x00128346 LEA RSI,[0x19efd6] XOR EAX,EAX CALL 0x00120add JMP 0x0012835a LAB_00128346: CMP byte ptr [RCX + 0x21],0x0 JZ 0x00128365 LEA RSI,[0x19eff7] XOR EAX,EAX CALL 0x00122567 LAB_0012835a: MOV EAX,0xffffffff LAB_0012835f: ADD RSP,0x10 POP RBP RET LAB_00128365: MOV RSI,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] ADD RSP,0x10 POP RBP JMP 0x001282d2
int8 js_proxy_isArray(long param_1,long param_2,int param_3) { int8 uVar1; int8 *puVar2; uVar1 = 0; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x30)) { puVar2 = *(int8 **)(param_2 + 0x30); } else { puVar2 = (int8 *)0x0; } if (puVar2 != (int8 *)0x0) { if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) { JS_ThrowRangeError(param_1,"Maximum call stack size exceeded"); } else { if (*(char *)((long)puVar2 + 0x21) == '\0') { uVar1 = JS_IsArray(param_1,*puVar2,puVar2[1]); return uVar1; } JS_ThrowTypeError(param_1,"revoked proxy"); } uVar1 = 0xffffffff; } return uVar1; }
55,317
update_exclude_dirs
bluesky950520[P]quickjs/run-test262.c
void update_exclude_dirs(void) { namelist_t *lp = &test_list; namelist_t *ep = &exclude_list; namelist_t *dp = &exclude_dir_list; char *name; int i, j, count; /* split directpries from exclude_list */ for (count = i = 0; i < ep->count; i++) { name = ep->array[i]; if (js__has_suffix(name, "/")) { namelist_add(dp, NULL, name); free(name); } else { ep->array[count++] = name; } } ep->count = count; namelist_sort(dp); /* filter out excluded directories */ for (count = i = 0; i < lp->count; i++) { name = lp->array[i]; for (j = 0; j < dp->count; j++) { if (has_prefix(name, dp->array[j])) { test_excluded++; free(name); name = NULL; break; } } if (name) { lp->array[count++] = name; } } lp->count = count; }
O0
c
update_exclude_dirs: subq $0x38, %rsp leaq 0x12db4d(%rip), %rax # 0x13d618 movq %rax, 0x30(%rsp) leaq 0x12db51(%rip), %rax # 0x13d628 movq %rax, 0x28(%rsp) leaq 0x12db55(%rip), %rax # 0x13d638 movq %rax, 0x20(%rsp) movl $0x0, 0x14(%rsp) movl $0x0, 0xc(%rsp) movl 0x14(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0xfb84 movq 0x28(%rsp), %rax movq (%rax), %rax movslq 0x14(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi leaq 0x10022c(%rip), %rsi # 0x10fd54 callq 0x245b0 cmpl $0x0, %eax je 0xfb51 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rdx xorl %eax, %eax movl %eax, %esi callq 0xf570 movq 0x18(%rsp), %rdi callq 0xe060 jmp 0xfb72 movq 0x18(%rsp), %rdx movq 0x28(%rsp), %rax movq (%rax), %rax movl 0xc(%rsp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0xc(%rsp) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) jmp 0xfb74 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0xfaf8 movl 0xc(%rsp), %ecx movq 0x28(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x20(%rsp), %rdi callq 0xf3b0 movl $0x0, 0x14(%rsp) movl $0x0, 0xc(%rsp) movl 0x14(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0xfc76 movq 0x30(%rsp), %rax movq (%rax), %rax movslq 0x14(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x10(%rsp) movl 0x10(%rsp), %eax movq 0x20(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0xfc3b movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movq (%rax), %rax movslq 0x10(%rsp), %rcx movq (%rax,%rcx,8), %rsi callq 0xefc0 cmpl $0x0, %eax je 0xfc2c movl 0x12da3a(%rip), %eax # 0x13d648 addl $0x1, %eax movl %eax, 0x12da31(%rip) # 0x13d648 movq 0x18(%rsp), %rdi callq 0xe060 movq $0x0, 0x18(%rsp) jmp 0xfc3b jmp 0xfc2e movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0xfbda cmpq $0x0, 0x18(%rsp) je 0xfc64 movq 0x18(%rsp), %rdx movq 0x30(%rsp), %rax movq (%rax), %rax movl 0xc(%rsp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0xc(%rsp) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) jmp 0xfc66 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0xfbaa movl 0xc(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x8(%rax) addq $0x38, %rsp retq nopw (%rax,%rax)
update_exclude_dirs: sub rsp, 38h lea rax, test_list mov [rsp+38h+var_8], rax lea rax, exclude_list mov [rsp+38h+var_10], rax lea rax, exclude_dir_list mov [rsp+38h+var_18], rax mov [rsp+38h+var_24], 0 mov [rsp+38h+var_2C], 0 loc_FAF8: mov eax, [rsp+38h+var_24] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+8] jge short loc_FB84 mov rax, [rsp+38h+var_10] mov rax, [rax] movsxd rcx, [rsp+38h+var_24] mov rax, [rax+rcx*8] mov [rsp+38h+var_20], rax mov rdi, [rsp+38h+var_20] lea rsi, asc_10FD53+1; "/" call js__has_suffix cmp eax, 0 jz short loc_FB51 mov rdi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] xor eax, eax mov esi, eax call namelist_add mov rdi, [rsp+38h+var_20] call _free jmp short loc_FB72 loc_FB51: mov rdx, [rsp+38h+var_20] mov rax, [rsp+38h+var_10] mov rax, [rax] mov ecx, [rsp+38h+var_2C] mov esi, ecx add esi, 1 mov [rsp+38h+var_2C], esi movsxd rcx, ecx mov [rax+rcx*8], rdx loc_FB72: jmp short $+2 loc_FB74: mov eax, [rsp+38h+var_24] add eax, 1 mov [rsp+38h+var_24], eax jmp loc_FAF8 loc_FB84: mov ecx, [rsp+38h+var_2C] mov rax, [rsp+38h+var_10] mov [rax+8], ecx mov rdi, [rsp+38h+var_18] call namelist_sort mov [rsp+38h+var_24], 0 mov [rsp+38h+var_2C], 0 loc_FBAA: mov eax, [rsp+38h+var_24] mov rcx, [rsp+38h+var_8] cmp eax, [rcx+8] jge loc_FC76 mov rax, [rsp+38h+var_8] mov rax, [rax] movsxd rcx, [rsp+38h+var_24] mov rax, [rax+rcx*8] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], 0 loc_FBDA: mov eax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_18] cmp eax, [rcx+8] jge short loc_FC3B mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov rax, [rax] movsxd rcx, [rsp+38h+var_28] mov rsi, [rax+rcx*8] call has_prefix cmp eax, 0 jz short loc_FC2C mov eax, cs:test_excluded add eax, 1 mov cs:test_excluded, eax mov rdi, [rsp+38h+var_20] call _free mov [rsp+38h+var_20], 0 jmp short loc_FC3B loc_FC2C: jmp short $+2 loc_FC2E: mov eax, [rsp+38h+var_28] add eax, 1 mov [rsp+38h+var_28], eax jmp short loc_FBDA loc_FC3B: cmp [rsp+38h+var_20], 0 jz short loc_FC64 mov rdx, [rsp+38h+var_20] mov rax, [rsp+38h+var_8] mov rax, [rax] mov ecx, [rsp+38h+var_2C] mov esi, ecx add esi, 1 mov [rsp+38h+var_2C], esi movsxd rcx, ecx mov [rax+rcx*8], rdx loc_FC64: jmp short $+2 loc_FC66: mov eax, [rsp+38h+var_24] add eax, 1 mov [rsp+38h+var_24], eax jmp loc_FBAA loc_FC76: mov ecx, [rsp+38h+var_2C] mov rax, [rsp+38h+var_8] mov [rax+8], ecx add rsp, 38h retn
long long *update_exclude_dirs() { int v0; // ecx int v1; // ecx long long *result; // rax int v3; // [rsp+Ch] [rbp-2Ch] int v4; // [rsp+Ch] [rbp-2Ch] int i; // [rsp+10h] [rbp-28h] int v6; // [rsp+14h] [rbp-24h] int v7; // [rsp+14h] [rbp-24h] _BYTE *v8; // [rsp+18h] [rbp-20h] long long v9; // [rsp+18h] [rbp-20h] v6 = 0; v3 = 0; while ( v6 < *((_DWORD *)&exclude_list + 2) ) { v8 = *(_BYTE **)(exclude_list + 8LL * v6); if ( (unsigned int)js__has_suffix(v8, "/") ) { namelist_add((long long)&exclude_dir_list, 0LL, v8); free(v8); } else { v0 = v3++; *(_QWORD *)(exclude_list + 8LL * v0) = v8; } ++v6; } *((_DWORD *)&exclude_list + 2) = v3; namelist_sort((long long)&exclude_dir_list); v7 = 0; v4 = 0; while ( v7 < *((_DWORD *)&test_list + 2) ) { v9 = *(_QWORD *)(test_list + 8LL * v7); for ( i = 0; i < *((_DWORD *)&exclude_dir_list + 2); ++i ) { if ( has_prefix(v9, *(_QWORD *)(exclude_dir_list + 8LL * i)) ) { ++test_excluded; free(v9); v9 = 0LL; break; } } if ( v9 ) { v1 = v4++; *(_QWORD *)(test_list + 8LL * v1) = v9; } ++v7; } result = &test_list; *((_DWORD *)&test_list + 2) = v4; return result; }
update_exclude_dirs: SUB RSP,0x38 LEA RAX,[0x23d618] MOV qword ptr [RSP + 0x30],RAX LEA RAX,[0x23d628] MOV qword ptr [RSP + 0x28],RAX LEA RAX,[0x23d638] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x14],0x0 MOV dword ptr [RSP + 0xc],0x0 LAB_0010faf8: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x8] JGE 0x0010fb84 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x20fd54] CALL 0x001245b0 CMP EAX,0x0 JZ 0x0010fb51 MOV RDI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x0010f570 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010e060 JMP 0x0010fb72 LAB_0010fb51: MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0xc] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RSP + 0xc],ESI MOVSXD RCX,ECX MOV qword ptr [RAX + RCX*0x8],RDX LAB_0010fb72: JMP 0x0010fb74 LAB_0010fb74: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x0010faf8 LAB_0010fb84: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x8],ECX MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010f3b0 MOV dword ptr [RSP + 0x14],0x0 MOV dword ptr [RSP + 0xc],0x0 LAB_0010fbaa: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0x8] JGE 0x0010fc76 MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x10],0x0 LAB_0010fbda: MOV EAX,dword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x20] CMP EAX,dword ptr [RCX + 0x8] JGE 0x0010fc3b MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX + RCX*0x8] CALL 0x0010efc0 CMP EAX,0x0 JZ 0x0010fc2c MOV EAX,dword ptr [0x0023d648] ADD EAX,0x1 MOV dword ptr [0x0023d648],EAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010e060 MOV qword ptr [RSP + 0x18],0x0 JMP 0x0010fc3b LAB_0010fc2c: JMP 0x0010fc2e LAB_0010fc2e: MOV EAX,dword ptr [RSP + 0x10] ADD EAX,0x1 MOV dword ptr [RSP + 0x10],EAX JMP 0x0010fbda LAB_0010fc3b: CMP qword ptr [RSP + 0x18],0x0 JZ 0x0010fc64 MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0xc] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RSP + 0xc],ESI MOVSXD RCX,ECX MOV qword ptr [RAX + RCX*0x8],RDX LAB_0010fc64: JMP 0x0010fc66 LAB_0010fc66: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x0010fbaa LAB_0010fc76: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x8],ECX ADD RSP,0x38 RET
void update_exclude_dirs(void) { void *__ptr; int iVar1; int local_2c; int local_28; int local_24; void *local_20; local_2c = 0; for (local_24 = 0; local_24 < DAT_0023d630; local_24 = local_24 + 1) { __ptr = *(void **)(exclude_list + (long)local_24 * 8); iVar1 = js__has_suffix(__ptr,&DAT_0020fd54); if (iVar1 == 0) { *(void **)(exclude_list + (long)local_2c * 8) = __ptr; local_2c = local_2c + 1; } else { namelist_add(&exclude_dir_list,0,__ptr); free(__ptr); } } DAT_0023d630 = local_2c; namelist_sort(&exclude_dir_list); local_24 = 0; local_2c = 0; do { if (DAT_0023d620 <= local_24) { DAT_0023d620 = local_2c; return; } local_20 = *(void **)(test_list + (long)local_24 * 8); for (local_28 = 0; local_28 < DAT_0023d640; local_28 = local_28 + 1) { iVar1 = has_prefix(local_20,*(int8 *)(exclude_dir_list + (long)local_28 * 8)); if (iVar1 != 0) { test_excluded = test_excluded + 1; free(local_20); local_20 = (void *)0x0; break; } } if (local_20 != (void *)0x0) { *(void **)(test_list + (long)local_2c * 8) = local_20; local_2c = local_2c + 1; } local_24 = local_24 + 1; } while( true ); }
55,318
update_exclude_dirs
bluesky950520[P]quickjs/run-test262.c
void update_exclude_dirs(void) { namelist_t *lp = &test_list; namelist_t *ep = &exclude_list; namelist_t *dp = &exclude_dir_list; char *name; int i, j, count; /* split directpries from exclude_list */ for (count = i = 0; i < ep->count; i++) { name = ep->array[i]; if (js__has_suffix(name, "/")) { namelist_add(dp, NULL, name); free(name); } else { ep->array[count++] = name; } } ep->count = count; namelist_sort(dp); /* filter out excluded directories */ for (count = i = 0; i < lp->count; i++) { name = lp->array[i]; for (j = 0; j < dp->count; j++) { if (has_prefix(name, dp->array[j])) { test_excluded++; free(name); name = NULL; break; } } if (name) { lp->array[count++] = name; } } lp->count = count; }
O1
c
update_exclude_dirs: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax xorl %ebp, %ebp cmpl $0x0, 0xbdeeb(%rip) # 0xd25e0 movl $0x0, %r13d jle 0x14762 xorl %r12d, %r12d leaq 0x8b5a1(%rip), %rbx # 0x9fca8 leaq 0xbdeda(%rip), %r14 # 0xd25e8 xorl %r13d, %r13d movq 0xbdec0(%rip), %rax # 0xd25d8 movq (%rax,%r12,8), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x1f342 testl %eax, %eax je 0x14742 movq %r14, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x14308 movq %r15, %rdi callq 0xe060 jmp 0x14753 movq 0xbde8f(%rip), %rax # 0xd25d8 movslq %r13d, %rcx incl %r13d movq %r15, (%rax,%rcx,8) incq %r12 movslq 0xbde83(%rip), %rax # 0xd25e0 cmpq %rax, %r12 jl 0x14711 movl %r13d, 0xbde77(%rip) # 0xd25e0 leaq 0xbde78(%rip), %rdi # 0xd25e8 callq 0x1421c cmpl $0x0, 0xbde54(%rip) # 0xd25d0 jle 0x14810 xorl %r15d, %r15d xorl %ebp, %ebp movq 0xbde3a(%rip), %rax # 0xd25c8 movq (%rax,%r15,8), %rbx movslq 0xbde57(%rip), %r12 # 0xd25f0 testq %r12, %r12 jle 0x147e8 movl %ebp, 0x4(%rsp) movq 0xbde3f(%rip), %r13 # 0xd25e8 xorl %ebp, %ebp movq (%r13,%rbp,8), %r14 movq %r14, %rdi callq 0xe270 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xe0e0 testl %eax, %eax je 0x147d4 incq %rbp cmpq %rbp, %r12 jne 0x147ab jmp 0x147e4 incl 0xbde1e(%rip) # 0xd25f8 movq %rbx, %rdi callq 0xe060 xorl %ebx, %ebx movl 0x4(%rsp), %ebp testq %rbx, %rbx je 0x147fd movq 0xbddd4(%rip), %rax # 0xd25c8 movslq %ebp, %rcx incl %ebp movq %rbx, (%rax,%rcx,8) incq %r15 movslq 0xbddc9(%rip), %rax # 0xd25d0 cmpq %rax, %r15 jl 0x14787 movl %ebp, 0xbddba(%rip) # 0xd25d0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
update_exclude_dirs: push rbp push r15 push r14 push r13 push r12 push rbx push rax xor ebp, ebp cmp cs:dword_D25E0, 0 mov r13d, 0 jle short loc_14762 xor r12d, r12d lea rbx, asc_9FCA7+1; "/" lea r14, exclude_dir_list xor r13d, r13d loc_14711: mov rax, cs:exclude_list mov r15, [rax+r12*8] mov rdi, r15 mov rsi, rbx call js__has_suffix test eax, eax jz short loc_14742 mov rdi, r14 xor esi, esi mov rdx, r15 call namelist_add mov rdi, r15 call _free jmp short loc_14753 loc_14742: mov rax, cs:exclude_list movsxd rcx, r13d inc r13d mov [rax+rcx*8], r15 loc_14753: inc r12 movsxd rax, cs:dword_D25E0 cmp r12, rax jl short loc_14711 loc_14762: mov cs:dword_D25E0, r13d lea rdi, exclude_dir_list call namelist_sort cmp cs:dword_D25D0, 0 jle loc_14810 xor r15d, r15d xor ebp, ebp loc_14787: mov rax, cs:test_list mov rbx, [rax+r15*8] movsxd r12, cs:dword_D25F0 test r12, r12 jle short loc_147E8 mov [rsp+38h+var_34], ebp mov r13, cs:exclude_dir_list xor ebp, ebp loc_147AB: mov r14, [r13+rbp*8+0] mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax call _strncmp test eax, eax jz short loc_147D4 inc rbp cmp r12, rbp jnz short loc_147AB jmp short loc_147E4 loc_147D4: inc cs:test_excluded mov rdi, rbx call _free xor ebx, ebx loc_147E4: mov ebp, [rsp+38h+var_34] loc_147E8: test rbx, rbx jz short loc_147FD mov rax, cs:test_list movsxd rcx, ebp inc ebp mov [rax+rcx*8], rbx loc_147FD: inc r15 movsxd rax, cs:dword_D25D0 cmp r15, rax jl loc_14787 loc_14810: mov cs:dword_D25D0, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long update_exclude_dirs( __m128 a1, __m128 a2, __m128 a3, __m128 a4, double a5, double a6, __m128 a7, __m128 a8) { int v8; // ebp int v9; // r13d long long v10; // r12 _BYTE *v11; // r15 double v12; // xmm4_8 double v13; // xmm5_8 long long v14; // rcx long long result; // rax long long v16; // r15 long long v17; // rbx long long v18; // r12 long long v19; // r13 long long v20; // rbp long long v21; // r14 long long v22; // rax long long v23; // rcx int v24; // [rsp+0h] [rbp-34h] v8 = 0; v9 = 0; if ( dword_D25E0 > 0 ) { v10 = 0LL; v9 = 0; do { v11 = *(_BYTE **)(exclude_list + 8 * v10); if ( (unsigned int)js__has_suffix(v11, "/") ) { namelist_add((long long)&exclude_dir_list, 0LL, v11, a1, a2, a3, a4, v12, v13, a7, a8); free(v11); } else { v14 = v9++; *(_QWORD *)(exclude_list + 8 * v14) = v11; } ++v10; } while ( v10 < dword_D25E0 ); } dword_D25E0 = v9; result = namelist_sort((int *)&exclude_dir_list); if ( dword_D25D0 > 0 ) { v16 = 0LL; v8 = 0; do { v17 = *(_QWORD *)(test_list + 8 * v16); v18 = dword_D25F0; if ( dword_D25F0 > 0 ) { v24 = v8; v19 = exclude_dir_list; v20 = 0LL; while ( 1 ) { v21 = *(_QWORD *)(v19 + 8 * v20); v22 = strlen(v21); if ( !(unsigned int)strncmp(v17, v21, v22) ) break; if ( v18 == ++v20 ) goto LABEL_15; } ++test_excluded; free(v17); v17 = 0LL; LABEL_15: v8 = v24; } if ( v17 ) { v23 = v8++; *(_QWORD *)(test_list + 8 * v23) = v17; } ++v16; result = dword_D25D0; } while ( v16 < dword_D25D0 ); } dword_D25D0 = v8; return result; }
update_exclude_dirs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX XOR EBP,EBP CMP dword ptr [0x001d25e0],0x0 MOV R13D,0x0 JLE 0x00114762 XOR R12D,R12D LEA RBX,[0x19fca8] LEA R14,[0x1d25e8] XOR R13D,R13D LAB_00114711: MOV RAX,qword ptr [0x001d25d8] MOV R15,qword ptr [RAX + R12*0x8] MOV RDI,R15 MOV RSI,RBX CALL 0x0011f342 TEST EAX,EAX JZ 0x00114742 MOV RDI,R14 XOR ESI,ESI MOV RDX,R15 CALL 0x00114308 MOV RDI,R15 CALL 0x0010e060 JMP 0x00114753 LAB_00114742: MOV RAX,qword ptr [0x001d25d8] MOVSXD RCX,R13D INC R13D MOV qword ptr [RAX + RCX*0x8],R15 LAB_00114753: INC R12 MOVSXD RAX,dword ptr [0x001d25e0] CMP R12,RAX JL 0x00114711 LAB_00114762: MOV dword ptr [0x001d25e0],R13D LEA RDI,[0x1d25e8] CALL 0x0011421c CMP dword ptr [0x001d25d0],0x0 JLE 0x00114810 XOR R15D,R15D XOR EBP,EBP LAB_00114787: MOV RAX,qword ptr [0x001d25c8] MOV RBX,qword ptr [RAX + R15*0x8] MOVSXD R12,dword ptr [0x001d25f0] TEST R12,R12 JLE 0x001147e8 MOV dword ptr [RSP + 0x4],EBP MOV R13,qword ptr [0x001d25e8] XOR EBP,EBP LAB_001147ab: MOV R14,qword ptr [R13 + RBP*0x8] MOV RDI,R14 CALL 0x0010e270 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x0010e0e0 TEST EAX,EAX JZ 0x001147d4 INC RBP CMP R12,RBP JNZ 0x001147ab JMP 0x001147e4 LAB_001147d4: INC dword ptr [0x001d25f8] MOV RDI,RBX CALL 0x0010e060 XOR EBX,EBX LAB_001147e4: MOV EBP,dword ptr [RSP + 0x4] LAB_001147e8: TEST RBX,RBX JZ 0x001147fd MOV RAX,qword ptr [0x001d25c8] MOVSXD RCX,EBP INC EBP MOV qword ptr [RAX + RCX*0x8],RBX LAB_001147fd: INC R15 MOVSXD RAX,dword ptr [0x001d25d0] CMP R15,RAX JL 0x00114787 LAB_00114810: MOV dword ptr [0x001d25d0],EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void update_exclude_dirs(void) { void *__ptr; char *__s; int iVar1; int iVar2; size_t __n; long lVar3; char *__s1; int iVar4; long lVar5; long lVar6; long lVar7; iVar4 = 0; iVar2 = 0; if (0 < DAT_001d25e0) { lVar6 = 0; iVar2 = 0; do { __ptr = *(void **)(exclude_list + lVar6 * 8); iVar1 = js__has_suffix(__ptr,&DAT_0019fca8); if (iVar1 == 0) { lVar3 = (long)iVar2; iVar2 = iVar2 + 1; *(void **)(exclude_list + lVar3 * 8) = __ptr; } else { namelist_add(&exclude_dir_list,0,__ptr); free(__ptr); } lVar6 = lVar6 + 1; } while (lVar6 < DAT_001d25e0); } DAT_001d25e0 = iVar2; namelist_sort(&exclude_dir_list); if (0 < DAT_001d25d0) { lVar6 = 0; iVar4 = 0; do { lVar3 = exclude_dir_list; __s1 = *(char **)(test_list + lVar6 * 8); lVar7 = (long)DAT_001d25f0; if (0 < lVar7) { lVar5 = 0; do { __s = *(char **)(lVar3 + lVar5 * 8); __n = strlen(__s); iVar2 = strncmp(__s1,__s,__n); if (iVar2 == 0) { test_excluded = test_excluded + 1; free(__s1); __s1 = (char *)0x0; break; } lVar5 = lVar5 + 1; } while (lVar7 != lVar5); } if (__s1 != (char *)0x0) { lVar3 = (long)iVar4; iVar4 = iVar4 + 1; *(char **)(test_list + lVar3 * 8) = __s1; } lVar6 = lVar6 + 1; } while (lVar6 < DAT_001d25d0); } DAT_001d25d0 = iVar4; return; }
55,319
update_exclude_dirs
bluesky950520[P]quickjs/run-test262.c
void update_exclude_dirs(void) { namelist_t *lp = &test_list; namelist_t *ep = &exclude_list; namelist_t *dp = &exclude_dir_list; char *name; int i, j, count; /* split directpries from exclude_list */ for (count = i = 0; i < ep->count; i++) { name = ep->array[i]; if (js__has_suffix(name, "/")) { namelist_add(dp, NULL, name); free(name); } else { ep->array[count++] = name; } } ep->count = count; namelist_sort(dp); /* filter out excluded directories */ for (count = i = 0; i < lp->count; i++) { name = lp->array[i]; for (j = 0; j < dp->count; j++) { if (has_prefix(name, dp->array[j])) { test_excluded++; free(name); name = NULL; break; } } if (name) { lp->array[count++] = name; } } lp->count = count; }
O2
c
update_exclude_dirs: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax xorl %r12d, %r12d leaq 0x767b3(%rip), %rbx # 0x85c48 leaq 0xb015c(%rip), %r14 # 0xbf5f8 xorl %ebp, %ebp movslq 0xb014b(%rip), %rax # 0xbf5f0 cmpq %rax, %r12 jge 0xf4f0 movq 0xb0137(%rip), %rax # 0xbf5e8 movq (%rax,%r12,8), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x19703 testl %eax, %eax je 0xf4db movq %r14, %rdi xorl %esi, %esi movq %r15, %rdx callq 0xf188 movq %r15, %rdi callq 0xe060 jmp 0xf4eb movq 0xb0106(%rip), %rax # 0xbf5e8 movslq %ebp, %rcx incl %ebp movq %r15, (%rax,%rcx,8) incq %r12 jmp 0xf49e movl %ebp, 0xb00fa(%rip) # 0xbf5f0 leaq 0xb00fb(%rip), %rdi # 0xbf5f8 callq 0xf0a7 movl 0xb00d8(%rip), %ecx # 0xbf5e0 xorl %r15d, %r15d movl $0x0, (%rsp) movslq %ecx, %rax cmpq %rax, %r15 jge 0xf597 movl %ecx, 0x4(%rsp) movq 0xb00b3(%rip), %r13 # 0xbf5d8 movq (%r13,%r15,8), %rbx movl 0xb00cf(%rip), %r14d # 0xbf600 movq 0xb00c0(%rip), %rbp # 0xbf5f8 testl %r14d, %r14d movl $0x0, %eax cmovlel %eax, %r14d xorl %r12d, %r12d cmpq %r12, %r14 je 0xf576 movq (%rbp,%r12,8), %rsi movq %rbx, %rdi callq 0xeeaf incq %r12 testl %eax, %eax je 0xf547 incl 0xb00a2(%rip) # 0xbf608 movq %rbx, %rdi callq 0xe060 movl 0xb006c(%rip), %ecx # 0xbf5e0 jmp 0xf58f testq %rbx, %rbx je 0xf58b movl (%rsp), %ecx movslq %ecx, %rax incl %ecx movl %ecx, (%rsp) movq %rbx, (%r13,%rax,8) movl 0x4(%rsp), %ecx incq %r15 jmp 0xf512 movl (%rsp), %eax movl %eax, 0xb0040(%rip) # 0xbf5e0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
update_exclude_dirs: push rbp push r15 push r14 push r13 push r12 push rbx push rax xor r12d, r12d lea rbx, asc_85C47+1; "/" lea r14, exclude_dir_list xor ebp, ebp loc_F49E: movsxd rax, cs:dword_BF5F0 cmp r12, rax jge short loc_F4F0 mov rax, cs:exclude_list mov r15, [rax+r12*8] mov rdi, r15 mov rsi, rbx call js__has_suffix test eax, eax jz short loc_F4DB mov rdi, r14 xor esi, esi mov rdx, r15 call namelist_add mov rdi, r15 call _free jmp short loc_F4EB loc_F4DB: mov rax, cs:exclude_list movsxd rcx, ebp inc ebp mov [rax+rcx*8], r15 loc_F4EB: inc r12 jmp short loc_F49E loc_F4F0: mov cs:dword_BF5F0, ebp lea rdi, exclude_dir_list call namelist_sort mov ecx, cs:dword_BF5E0 xor r15d, r15d mov [rsp+38h+var_38], 0 loc_F512: movsxd rax, ecx cmp r15, rax jge short loc_F597 mov [rsp+38h+var_34], ecx mov r13, cs:test_list mov rbx, [r13+r15*8+0] mov r14d, cs:dword_BF600 mov rbp, cs:exclude_dir_list test r14d, r14d mov eax, 0 cmovle r14d, eax xor r12d, r12d loc_F547: cmp r14, r12 jz short loc_F576 mov rsi, [rbp+r12*8+0] mov rdi, rbx call has_prefix inc r12 test eax, eax jz short loc_F547 inc cs:test_excluded mov rdi, rbx call _free mov ecx, cs:dword_BF5E0 jmp short loc_F58F loc_F576: test rbx, rbx jz short loc_F58B mov ecx, [rsp+38h+var_38] movsxd rax, ecx inc ecx mov [rsp+38h+var_38], ecx mov [r13+rax*8+0], rbx loc_F58B: mov ecx, [rsp+38h+var_34] loc_F58F: inc r15 jmp loc_F512 loc_F597: mov eax, [rsp+38h+var_38] mov cs:dword_BF5E0, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long update_exclude_dirs( __m128 a1, __m128 a2, __m128 a3, __m128 a4, double a5, double a6, __m128 a7, __m128 a8) { long long v8; // r12 int v9; // ebp _BYTE *v10; // r15 double v11; // xmm4_8 double v12; // xmm5_8 long long v13; // rcx int v14; // ecx long long v15; // r15 long long v16; // r13 long long v17; // rbx long long v18; // r14 long long v19; // rbp long long v20; // r12 long long v22; // rax long long result; // rax int v24; // [rsp+0h] [rbp-38h] int v25; // [rsp+4h] [rbp-34h] v8 = 0LL; v9 = 0; while ( v8 < dword_BF5F0 ) { v10 = *(_BYTE **)(exclude_list + 8 * v8); if ( (unsigned int)js__has_suffix(v10, "/") ) { namelist_add(&exclude_dir_list, 0LL, v10, a1, a2, a3, a4, v11, v12, a7, a8); free(v10); } else { v13 = v9++; *(_QWORD *)(exclude_list + 8 * v13) = v10; } ++v8; } dword_BF5F0 = v9; namelist_sort(&exclude_dir_list); v14 = dword_BF5E0; v15 = 0LL; v24 = 0; while ( v15 < v14 ) { v25 = v14; v16 = test_list; v17 = *(_QWORD *)(test_list + 8 * v15); v18 = (unsigned int)dword_BF600; v19 = exclude_dir_list; if ( dword_BF600 <= 0 ) v18 = 0LL; v20 = 0LL; while ( v18 != v20 ) { if ( has_prefix(v17, *(_QWORD *)(v19 + 8 * v20++)) ) { ++test_excluded; free(v17); v14 = dword_BF5E0; goto LABEL_18; } } if ( v17 ) { v22 = v24++; *(_QWORD *)(v16 + 8 * v22) = v17; } v14 = v25; LABEL_18: ++v15; } result = (unsigned int)v24; dword_BF5E0 = v24; return result; }
update_exclude_dirs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX XOR R12D,R12D LEA RBX,[0x185c48] LEA R14,[0x1bf5f8] XOR EBP,EBP LAB_0010f49e: MOVSXD RAX,dword ptr [0x001bf5f0] CMP R12,RAX JGE 0x0010f4f0 MOV RAX,qword ptr [0x001bf5e8] MOV R15,qword ptr [RAX + R12*0x8] MOV RDI,R15 MOV RSI,RBX CALL 0x00119703 TEST EAX,EAX JZ 0x0010f4db MOV RDI,R14 XOR ESI,ESI MOV RDX,R15 CALL 0x0010f188 MOV RDI,R15 CALL 0x0010e060 JMP 0x0010f4eb LAB_0010f4db: MOV RAX,qword ptr [0x001bf5e8] MOVSXD RCX,EBP INC EBP MOV qword ptr [RAX + RCX*0x8],R15 LAB_0010f4eb: INC R12 JMP 0x0010f49e LAB_0010f4f0: MOV dword ptr [0x001bf5f0],EBP LEA RDI,[0x1bf5f8] CALL 0x0010f0a7 MOV ECX,dword ptr [0x001bf5e0] XOR R15D,R15D MOV dword ptr [RSP],0x0 LAB_0010f512: MOVSXD RAX,ECX CMP R15,RAX JGE 0x0010f597 MOV dword ptr [RSP + 0x4],ECX MOV R13,qword ptr [0x001bf5d8] MOV RBX,qword ptr [R13 + R15*0x8] MOV R14D,dword ptr [0x001bf600] MOV RBP,qword ptr [0x001bf5f8] TEST R14D,R14D MOV EAX,0x0 CMOVLE R14D,EAX XOR R12D,R12D LAB_0010f547: CMP R14,R12 JZ 0x0010f576 MOV RSI,qword ptr [RBP + R12*0x8] MOV RDI,RBX CALL 0x0010eeaf INC R12 TEST EAX,EAX JZ 0x0010f547 INC dword ptr [0x001bf608] MOV RDI,RBX CALL 0x0010e060 MOV ECX,dword ptr [0x001bf5e0] JMP 0x0010f58f LAB_0010f576: TEST RBX,RBX JZ 0x0010f58b MOV ECX,dword ptr [RSP] MOVSXD RAX,ECX INC ECX MOV dword ptr [RSP],ECX MOV qword ptr [R13 + RAX*0x8],RBX LAB_0010f58b: MOV ECX,dword ptr [RSP + 0x4] LAB_0010f58f: INC R15 JMP 0x0010f512 LAB_0010f597: MOV EAX,dword ptr [RSP] MOV dword ptr [0x001bf5e0],EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void update_exclude_dirs(void) { void *pvVar1; uint uVar2; int iVar3; long lVar4; long lVar5; int iVar6; long lVar7; ulong uVar8; int local_38; iVar6 = 0; for (lVar7 = 0; lVar7 < DAT_001bf5f0; lVar7 = lVar7 + 1) { pvVar1 = *(void **)(exclude_list + lVar7 * 8); iVar3 = js__has_suffix(pvVar1,&DAT_00185c48); if (iVar3 == 0) { lVar5 = (long)iVar6; iVar6 = iVar6 + 1; *(void **)(exclude_list + lVar5 * 8) = pvVar1; } else { namelist_add(&exclude_dir_list,0,pvVar1); free(pvVar1); } } DAT_001bf5f0 = iVar6; namelist_sort(&exclude_dir_list); lVar7 = 0; local_38 = 0; iVar6 = DAT_001bf5e0; do { lVar4 = exclude_dir_list; lVar5 = test_list; if (iVar6 <= lVar7) { DAT_001bf5e0 = local_38; return; } pvVar1 = *(void **)(test_list + lVar7 * 8); uVar2 = DAT_001bf600; if ((int)DAT_001bf600 < 1) { uVar2 = 0; } uVar8 = 0; do { if (uVar2 == uVar8) { if (pvVar1 != (void *)0x0) { lVar4 = (long)local_38; local_38 = local_38 + 1; *(void **)(lVar5 + lVar4 * 8) = pvVar1; } goto LAB_0010f58f; } iVar3 = has_prefix(pvVar1,*(int8 *)(lVar4 + uVar8 * 8)); uVar8 = uVar8 + 1; } while (iVar3 == 0); test_excluded = test_excluded + 1; free(pvVar1); iVar6 = DAT_001bf5e0; LAB_0010f58f: lVar7 = lVar7 + 1; } while( true ); }
55,320
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x22c92e(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x29300 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init_4: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init_4(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00129300 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
55,321
fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
static auto compute_right_endpoint_for_shorter_interval_case( const cache_entry_type& cache, int beta) noexcept -> carrier_uint { return (cache.high() + (cache.high() >> (num_significand_bits<double>() + 1))) >> (64 - num_significand_bits<double>() - 1 - beta); }
O0
c
fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movq 0x20(%rsp), %rdi callq 0xcbe10 movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi callq 0xcbe10 movq %rax, (%rsp) callq 0xcb020 movq (%rsp), %rdx movl %eax, %ecx movq 0x8(%rsp), %rax addl $0x1, %ecx movl %ecx, %ecx shrq %cl, %rdx movq %rdx, %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) callq 0xcb020 movl %eax, %edx movq 0x10(%rsp), %rax movl $0x40, %ecx subl %edx, %ecx subl $0x1, %ecx subl 0x1c(%rsp), %ecx movl %ecx, %ecx shrq %cl, %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN3fmt3v106detail9dragonbox14cache_accessorIdE48compute_right_endpoint_for_shorter_interval_caseERKNS1_16uint128_fallbackEi: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov rdi, [rsp+28h+var_8]; this call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void) mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_8]; this call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void) mov [rsp+28h+var_28], rax call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void) mov rdx, [rsp+28h+var_28] mov ecx, eax mov rax, [rsp+28h+var_20] add ecx, 1 mov ecx, ecx shr rdx, cl mov rcx, rdx add rax, rcx mov [rsp+28h+var_18], rax call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void) mov edx, eax mov rax, [rsp+28h+var_18] mov ecx, 40h ; '@' sub ecx, edx sub ecx, 1 sub ecx, [rsp+28h+var_C] mov ecx, ecx shr rax, cl add rsp, 28h retn
unsigned long long fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case( fmt::v10::detail::uint128_fallback *a1, char a2) { unsigned long long v3; // [rsp+0h] [rbp-28h] long long v4; // [rsp+8h] [rbp-20h] unsigned long long v5; // [rsp+10h] [rbp-18h] v4 = fmt::v10::detail::uint128_fallback::high(a1); v3 = fmt::v10::detail::uint128_fallback::high(a1); v5 = (v3 >> ((unsigned __int8)fmt::v10::detail::num_significand_bits<double>() + 1)) + v4; return v5 >> (64 - (unsigned __int8)fmt::v10::detail::num_significand_bits<double>() - 1 - a2); }
compute_right_endpoint_for_shorter_interval_case: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV RDI,qword ptr [RSP + 0x20] CALL 0x001cbe10 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001cbe10 MOV qword ptr [RSP],RAX CALL 0x001cb020 MOV RDX,qword ptr [RSP] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x8] ADD ECX,0x1 MOV ECX,ECX SHR RDX,CL MOV RCX,RDX ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX CALL 0x001cb020 MOV EDX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV ECX,0x40 SUB ECX,EDX SUB ECX,0x1 SUB ECX,dword ptr [RSP + 0x1c] MOV ECX,ECX SHR RAX,CL ADD RSP,0x28 RET
/* fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int) */ ulong fmt::v10::detail::dragonbox::cache_accessor<double>:: compute_right_endpoint_for_shorter_interval_case(uint128_fallback *param_1,int param_2) { int iVar1; int iVar2; long lVar3; ulong uVar4; lVar3 = uint128_fallback::high(param_1); uVar4 = uint128_fallback::high(param_1); iVar1 = num_significand_bits<double>(); iVar2 = num_significand_bits<double>(); return lVar3 + (uVar4 >> ((char)iVar1 + 1U & 0x3f)) >> (('?' - (char)iVar2) - (char)param_2 & 0x3fU); }
55,322
c4_state_add_request
corpus-core[P]colibri-stateless/src/util/state.c
void c4_state_add_request(c4_state_t* state, data_request_t* data_request) { if (bytes_all_zero(bytes(data_request->id, 32))) { if (data_request->payload.len) sha256(data_request->payload, data_request->id); else sha256(bytes(data_request->url, strlen(data_request->url)), data_request->id); } data_request->next = state->requests; state->requests = data_request; }
O3
c
c4_state_add_request: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x58(%rsi), %r15 movl $0x20, %edi movq %r15, %rsi xorl %edx, %edx callq 0x531b1 testb %al, %al je 0x58998 movl 0x20(%rbx), %edi testl %edi, %edi je 0x5897f movq 0x28(%rbx), %rsi jmp 0x58990 movq 0x10(%rbx), %r12 movq %r12, %rdi callq 0x22200 movl %eax, %edi movq %r12, %rsi movq %r15, %rdx callq 0x56d1c movq (%r14), %rax movq %rax, 0x50(%rbx) movq %rbx, (%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
c4_state_add_request: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, [rsi+58h] mov edi, 20h ; ' ' mov rsi, r15 xor edx, edx call bytes_all_equal test al, al jz short loc_58998 mov edi, [rbx+20h] test edi, edi jz short loc_5897F mov rsi, [rbx+28h] jmp short loc_58990 loc_5897F: mov r12, [rbx+10h] mov rdi, r12 call _strlen mov edi, eax mov rsi, r12 loc_58990: mov rdx, r15 call sha256 loc_58998: mov rax, [r14] mov [rbx+50h], rax mov [r14], rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long c4_state_add_request(long long *a1, long long a2) { long long v4; // r15 unsigned int v5; // edi long long v6; // rsi long long v7; // r12 long long result; // rax v4 = a2 + 88; if ( bytes_all_equal(0x20u, (_BYTE *)(a2 + 88), 0) ) { v5 = *(_DWORD *)(a2 + 32); if ( v5 ) { v6 = *(_QWORD *)(a2 + 40); } else { v7 = *(_QWORD *)(a2 + 16); v5 = strlen(v7); v6 = v7; } sha256(v5, v6, v4); } result = *a1; *(_QWORD *)(a2 + 80) = *a1; *a1 = a2; return result; }
c4_state_add_request: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[RSI + 0x58] MOV EDI,0x20 MOV RSI,R15 XOR EDX,EDX CALL 0x001531b1 TEST AL,AL JZ 0x00158998 MOV EDI,dword ptr [RBX + 0x20] TEST EDI,EDI JZ 0x0015897f MOV RSI,qword ptr [RBX + 0x28] JMP 0x00158990 LAB_0015897f: MOV R12,qword ptr [RBX + 0x10] MOV RDI,R12 CALL 0x00122200 MOV EDI,EAX MOV RSI,R12 LAB_00158990: MOV RDX,R15 CALL 0x00156d1c LAB_00158998: MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [R14],RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void c4_state_add_request(long *param_1,long param_2) { char cVar1; size_t sVar2; char *__s; ulong uVar3; cVar1 = bytes_all_equal(0x20,param_2 + 0x58,0); if (cVar1 != '\0') { uVar3 = (ulong)*(uint *)(param_2 + 0x20); if (*(uint *)(param_2 + 0x20) == 0) { __s = *(char **)(param_2 + 0x10); sVar2 = strlen(__s); uVar3 = sVar2 & 0xffffffff; } else { __s = *(char **)(param_2 + 0x28); } sha256(uVar3,__s,param_2 + 0x58); } *(long *)(param_2 + 0x50) = *param_1; *param_1 = param_2; return; }
55,323
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString(google::protobuf::compiler::cpp::Formatter&, google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/parse_function_generator.cc
void ParseFunctionGenerator::GenerateArenaString(Formatter& format, const FieldDescriptor* field) { if (HasHasbit(field)) { format("_Internal::set_has_$1$(&$has_bits$);\n", FieldName(field)); } format( "if (arena != nullptr) {\n" " ptr = ctx->ReadArenaString(ptr, &$msg$$field$, arena"); if (IsStringInlined(field, options_)) { GOOGLE_DCHECK(!inlined_string_indices_.empty()); int inlined_string_index = inlined_string_indices_[field->index()]; GOOGLE_DCHECK_GT(inlined_string_index, 0); format(", &$msg$$inlined_string_donated_array$[0], $1$, $this$", inlined_string_index); } else { GOOGLE_DCHECK(field->default_value_string().empty()); } format( ");\n" "} else {\n" " ptr = ::_pbi::InlineGreedyStringParser(" "$msg$$field$.MutableNoCopy(nullptr), ptr, ctx);\n" "}\n" "const std::string* str = &$msg$$field$.Get(); (void)str;\n"); }
O3
cpp
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString(google::protobuf::compiler::cpp::Formatter&, google::protobuf::FieldDescriptor const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movb 0x1(%rdx), %al testb $0x2, %al jne 0x9854f movl %eax, %ecx andb $0x60, %cl cmpb $0x20, %cl jne 0x9854a movq 0x10(%r14), %rdx cmpb $0x2, 0x3(%rdx) jne 0x9854a testb $0x10, %al je 0x9854f cmpq $0x0, 0x28(%r14) jne 0x9858e jmp 0x9854f cmpb $0x40, %cl jne 0x9858e movq 0x38(%r14), %rax cmpb $0x0, 0x54(%rax) jne 0x9858e leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x35cdf leaq 0x11d6de(%rip), %rsi # 0x1b5c4e movq %rbx, %rdi movq %r12, %rdx callq 0x39a78 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9858e callq 0x1f4a0 leaq 0x11d6df(%rip), %rsi # 0x1b5c74 movq %rbx, %rdi callq 0x39938 movq 0x10(%r15), %rsi movq %r14, %rdi callq 0x373d6 testb %al, %al je 0x98602 testb $0x8, 0x1(%r14) jne 0x985be movq 0x20(%r14), %rax addq $0x28, %rax jmp 0x985d5 movq 0x28(%r14), %rax testq %rax, %rax je 0x985cd addq $0x50, %rax jmp 0x985d5 movq 0x10(%r14), %rax addq $0x70, %rax subq (%rax), %r14 shrq $0x3, %r14 imull $0x38e38e39, %r14d, %eax # imm = 0x38E38E39 movq 0x50(%r15), %rcx cltq movl (%rcx,%rax,4), %eax leaq 0x8(%rsp), %rdx movl %eax, (%rdx) leaq 0x11d6c9(%rip), %rsi # 0x1b5cc3 movq %rbx, %rdi callq 0x7d7f4 leaq 0x11d6f1(%rip), %rsi # 0x1b5cfa movq %rbx, %rdi callq 0x39938 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98633 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860 nop
_ZN6google8protobuf8compiler3cpp22ParseFunctionGenerator19GenerateArenaStringERNS2_9FormatterEPKNS0_15FieldDescriptorE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rdx mov rbx, rsi mov r15, rdi mov al, [rdx+1] test al, 2 jnz short loc_9854F mov ecx, eax and cl, 60h cmp cl, 20h ; ' ' jnz short loc_9854A mov rdx, [r14+10h] cmp byte ptr [rdx+3], 2 jnz short loc_9854A test al, 10h jz short loc_9854F cmp qword ptr [r14+28h], 0 jnz short loc_9858E jmp short loc_9854F loc_9854A: cmp cl, 40h ; '@' jnz short loc_9858E loc_9854F: mov rax, [r14+38h] cmp byte ptr [rax+54h], 0 jnz short loc_9858E lea r12, [rsp+48h+var_40] mov rdi, r12 mov rsi, r14 call _ZN6google8protobuf8compiler3cpp9FieldNameB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::cpp::FieldName(google::protobuf::FieldDescriptor const*) lea rsi, aInternalSetHas; "_Internal::set_has_$1$(&$has_bits$);\n" mov rdi, rbx; int mov rdx, r12; int call _ZNK6google8protobuf8compiler3cpp9FormatterclIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<std::string>(char const*,std::string const&) lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9858E call __ZdlPv; operator delete(void *) loc_9858E: lea rsi, aIfArenaNullptr_1; "if (arena != nullptr) {\n ptr = ctx->R"... mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ mov rsi, [r15+10h] mov rdi, r14 call _ZN6google8protobuf8compiler3cpp15IsStringInlinedEPKNS0_15FieldDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::IsStringInlined(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::cpp::Options const&) test al, al jz short loc_98602 test byte ptr [r14+1], 8 jnz short loc_985BE mov rax, [r14+20h] add rax, 28h ; '(' jmp short loc_985D5 loc_985BE: mov rax, [r14+28h] test rax, rax jz short loc_985CD add rax, 50h ; 'P' jmp short loc_985D5 loc_985CD: mov rax, [r14+10h] add rax, 70h ; 'p' loc_985D5: sub r14, [rax] shr r14, 3 imul eax, r14d, 38E38E39h mov rcx, [r15+50h] cdqe mov eax, [rcx+rax*4] lea rdx, [rsp+48h+var_40] mov [rdx], eax lea rsi, aMsgInlinedStri; ", &$msg$$inlined_string_donated_array$["... mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJiEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<int>(char const*,int const&) loc_98602: lea rsi, aElsePtrPbiInli; ");\n} else {\n ptr = ::_pbi::InlineGre"... mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98633 call __ZdlPv; operator delete(void *) loc_98633: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString( long long a1, google::protobuf::io::Printer **a2, long long a3) { char v4; // al const google::protobuf::compiler::cpp::Options *v5; // rdx _QWORD *v6; // rax long long v7; // rax int v9[4]; // [rsp+8h] [rbp-40h] BYREF char v10; // [rsp+18h] [rbp-30h] BYREF v4 = *(_BYTE *)(a3 + 1); if ( (v4 & 2) == 0 ) { if ( (v4 & 0x60) == 0x20 && *(_BYTE *)(*(_QWORD *)(a3 + 16) + 3LL) == 2 ) { if ( (v4 & 0x10) != 0 && *(_QWORD *)(a3 + 40) ) goto LABEL_11; } else if ( (v4 & 0x60) != 0x40 ) { goto LABEL_11; } } if ( !*(_BYTE *)(*(_QWORD *)(a3 + 56) + 84LL) ) { google::protobuf::compiler::cpp::FieldName[abi:cxx11]((long long *)v9, a3); google::protobuf::compiler::cpp::Formatter::operator()<std::string>( a2, (int)"_Internal::set_has_$1$(&$has_bits$);\n", (long long)v9); if ( *(char **)v9 != &v10 ) operator delete(*(void **)v9); } LABEL_11: google::protobuf::compiler::cpp::Formatter::operator()<>( a2, "if (arena != nullptr) {\n ptr = ctx->ReadArenaString(ptr, &$msg$$field$, arena"); if ( (unsigned __int8)google::protobuf::compiler::cpp::IsStringInlined( (google::protobuf::compiler::cpp *)a3, *(const google::protobuf::FieldDescriptor **)(a1 + 16), v5) ) { if ( (*(_BYTE *)(a3 + 1) & 8) != 0 ) { v7 = *(_QWORD *)(a3 + 40); if ( v7 ) v6 = (_QWORD *)(v7 + 80); else v6 = (_QWORD *)(*(_QWORD *)(a3 + 16) + 112LL); } else { v6 = (_QWORD *)(*(_QWORD *)(a3 + 32) + 40LL); } v9[0] = *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4LL * (int)(954437177 * ((unsigned long long)(a3 - *v6) >> 3))); google::protobuf::compiler::cpp::Formatter::operator()<int>( a2, (unsigned int)", &$msg$$inlined_string_donated_array$[0], $1$, $this$", (unsigned int *)v9); } return google::protobuf::compiler::cpp::Formatter::operator()<>( a2, ");\n" "} else {\n" " ptr = ::_pbi::InlineGreedyStringParser($msg$$field$.MutableNoCopy(nullptr), ptr, ctx);\n" "}\n" "const std::string* str = &$msg$$field$.Get(); (void)str;\n"); }
GenerateArenaString: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV AL,byte ptr [RDX + 0x1] TEST AL,0x2 JNZ 0x0019854f MOV ECX,EAX AND CL,0x60 CMP CL,0x20 JNZ 0x0019854a MOV RDX,qword ptr [R14 + 0x10] CMP byte ptr [RDX + 0x3],0x2 JNZ 0x0019854a TEST AL,0x10 JZ 0x0019854f CMP qword ptr [R14 + 0x28],0x0 JNZ 0x0019858e JMP 0x0019854f LAB_0019854a: CMP CL,0x40 JNZ 0x0019858e LAB_0019854f: MOV RAX,qword ptr [R14 + 0x38] CMP byte ptr [RAX + 0x54],0x0 JNZ 0x0019858e LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R14 CALL 0x00135cdf LAB_00198569: LEA RSI,[0x2b5c4e] MOV RDI,RBX MOV RDX,R12 CALL 0x00139a78 LAB_0019857b: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019858e CALL 0x0011f4a0 LAB_0019858e: LEA RSI,[0x2b5c74] MOV RDI,RBX CALL 0x00139938 MOV RSI,qword ptr [R15 + 0x10] MOV RDI,R14 CALL 0x001373d6 TEST AL,AL JZ 0x00198602 TEST byte ptr [R14 + 0x1],0x8 JNZ 0x001985be MOV RAX,qword ptr [R14 + 0x20] ADD RAX,0x28 JMP 0x001985d5 LAB_001985be: MOV RAX,qword ptr [R14 + 0x28] TEST RAX,RAX JZ 0x001985cd ADD RAX,0x50 JMP 0x001985d5 LAB_001985cd: MOV RAX,qword ptr [R14 + 0x10] ADD RAX,0x70 LAB_001985d5: SUB R14,qword ptr [RAX] SHR R14,0x3 IMUL EAX,R14D,0x38e38e39 MOV RCX,qword ptr [R15 + 0x50] CDQE MOV EAX,dword ptr [RCX + RAX*0x4] LEA RDX,[RSP + 0x8] MOV dword ptr [RDX],EAX LEA RSI,[0x2b5cc3] MOV RDI,RBX CALL 0x0017d7f4 LAB_00198602: LEA RSI,[0x2b5cfa] MOV RDI,RBX CALL 0x00139938 ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString(google::protobuf::compiler::cpp::Formatter&, google::protobuf::FieldDescriptor const*) */ void __thiscall google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateArenaString (ParseFunctionGenerator *this,Formatter *param_1,FieldDescriptor *param_2) { FieldDescriptor FVar1; char cVar2; long *plVar3; int local_40; int4 uStack_3c; int1 local_30 [16]; FVar1 = param_2[1]; if (((byte)FVar1 & 2) == 0) { if ((((byte)FVar1 & 0x60) == 0x20) && (*(char *)(*(long *)(param_2 + 0x10) + 3) == '\x02')) { if ((((byte)FVar1 & 0x10) != 0) && (*(long *)(param_2 + 0x28) != 0)) goto LAB_0019858e; } else if (((byte)FVar1 & 0x60) != 0x40) goto LAB_0019858e; } if (*(char *)(*(long *)(param_2 + 0x38) + 0x54) == '\0') { FieldName_abi_cxx11_((cpp *)&local_40,param_2); /* try { // try from 00198569 to 0019857a has its CatchHandler @ 0019861d */ Formatter::operator()(param_1,"_Internal::set_has_$1$(&$has_bits$);\n",(string *)&local_40); if ((int1 *)CONCAT44(uStack_3c,local_40) != local_30) { operator_delete((int1 *)CONCAT44(uStack_3c,local_40)); } } LAB_0019858e: Formatter::operator()<> (param_1, "if (arena != nullptr) {\n ptr = ctx->ReadArenaString(ptr, &$msg$$field$, arena"); cVar2 = IsStringInlined(param_2,*(Options **)(this + 0x10)); if (cVar2 != '\0') { if (((byte)param_2[1] & 8) == 0) { plVar3 = (long *)(*(long *)(param_2 + 0x20) + 0x28); } else if (*(long *)(param_2 + 0x28) == 0) { plVar3 = (long *)(*(long *)(param_2 + 0x10) + 0x70); } else { plVar3 = (long *)(*(long *)(param_2 + 0x28) + 0x50); } local_40 = *(int *)(*(long *)(this + 0x50) + (long)((int)((ulong)((long)param_2 - *plVar3) >> 3) * 0x38e38e39) * 4); Formatter::operator() (param_1,", &$msg$$inlined_string_donated_array$[0], $1$, $this$",&local_40); } Formatter::operator()<> (param_1, ");\n} else {\n ptr = ::_pbi::InlineGreedyStringParser($msg$$field$.MutableNoCopy(nullptr), ptr, ctx);\n}\nconst std::string* str = &$msg$$field$.Get(); (void)str;\n" ); return; }
55,324
ggml_compute_forward_unary
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_unary( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const enum ggml_unary_op op = ggml_get_unary_op(dst); switch (op) { case GGML_UNARY_OP_ABS: { ggml_compute_forward_abs(params, dst); } break; case GGML_UNARY_OP_SGN: { ggml_compute_forward_sgn(params, dst); } break; case GGML_UNARY_OP_NEG: { ggml_compute_forward_neg(params, dst); } break; case GGML_UNARY_OP_STEP: { ggml_compute_forward_step(params, dst); } break; case GGML_UNARY_OP_TANH: { ggml_compute_forward_tanh(params, dst); } break; case GGML_UNARY_OP_ELU: { ggml_compute_forward_elu(params, dst); } break; case GGML_UNARY_OP_RELU: { ggml_compute_forward_relu(params, dst); } break; case GGML_UNARY_OP_SIGMOID: { ggml_compute_forward_sigmoid(params, dst); } break; case GGML_UNARY_OP_GELU: { ggml_compute_forward_gelu(params, dst); } break; case GGML_UNARY_OP_GELU_QUICK: { ggml_compute_forward_gelu_quick(params, dst); } break; case GGML_UNARY_OP_SILU: { ggml_compute_forward_silu(params, dst); } break; case GGML_UNARY_OP_HARDSWISH: { ggml_compute_forward_hardswish(params, dst); } break; case GGML_UNARY_OP_HARDSIGMOID: { ggml_compute_forward_hardsigmoid(params, dst); } break; case GGML_UNARY_OP_EXP: { ggml_compute_forward_exp(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_unary: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rdi callq 0xca00 movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax movq %rax, 0x8(%rsp) subq $0xd, %rax ja 0x1932a movq 0x8(%rsp), %rax leaq 0x98869(%rip), %rcx # 0xb1a84 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c4b0 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c510 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c570 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c5d0 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c630 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c690 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c6f0 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c750 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c7b0 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c810 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c870 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c8d0 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c930 jmp 0x19344 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x3c990 jmp 0x19344 leaq 0x98829(%rip), %rdi # 0xb1b5a movl $0x2ddc, %esi # imm = 0x2DDC leaq 0x9898a(%rip), %rdx # 0xb1cc7 movb $0x0, %al callq 0xd030 addq $0x28, %rsp retq nopl (%rax)
ggml_compute_forward_unary: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rdi, [rsp+28h+var_10] call _ggml_get_unary_op mov [rsp+28h+var_14], eax mov eax, [rsp+28h+var_14] mov [rsp+28h+var_20], rax sub rax, 0Dh; switch 14 cases ja def_19222; jumptable 0000000000019222 default case mov rax, [rsp+28h+var_20] lea rcx, jpt_19222 movsxd rax, ds:(jpt_19222 - 0B1A84h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_19224: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 0 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_abs jmp loc_19344 loc_19238: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 1 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_sgn jmp loc_19344 loc_1924C: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 2 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_neg jmp loc_19344 loc_19260: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 3 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_step jmp loc_19344 loc_19274: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 4 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_tanh jmp loc_19344 loc_19288: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 5 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_elu jmp loc_19344 loc_1929C: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 6 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_relu jmp loc_19344 loc_192B0: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 7 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_sigmoid jmp loc_19344 loc_192C4: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 8 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_gelu jmp short loc_19344 loc_192D5: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 9 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_gelu_quick jmp short loc_19344 loc_192E6: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 10 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_silu jmp short loc_19344 loc_192F7: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 11 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_hardswish jmp short loc_19344 loc_19308: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 12 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_hardsigmoid jmp short loc_19344 loc_19319: mov rdi, [rsp+28h+var_8]; jumptable 0000000000019222 case 13 mov rsi, [rsp+28h+var_10] call ggml_compute_forward_exp jmp short loc_19344 def_19222: lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000019222 default case mov esi, 2DDCh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_19344: add rsp, 28h retn
double ggml_compute_forward_unary(long long a1, long long a2) { double result; // xmm0_8 switch ( (unsigned int)ggml_get_unary_op(a2) ) { case 0u: ggml_compute_forward_abs(a1, a2); break; case 1u: ggml_compute_forward_sgn(a1, a2); break; case 2u: ggml_compute_forward_neg(a1, a2); break; case 3u: ggml_compute_forward_step(a1, a2); break; case 4u: ggml_compute_forward_tanh(a1, a2); break; case 5u: ggml_compute_forward_elu(a1, a2); break; case 6u: ggml_compute_forward_relu(a1, a2); break; case 7u: ggml_compute_forward_sigmoid(a1, a2); break; case 8u: ggml_compute_forward_gelu(a1, a2); break; case 9u: ggml_compute_forward_gelu_quick(a1, a2); break; case 0xAu: ggml_compute_forward_silu(a1, a2); break; case 0xBu: ggml_compute_forward_hardswish(a1, a2); break; case 0xCu: ggml_compute_forward_hardsigmoid(a1, a2); break; case 0xDu: ggml_compute_forward_exp(a1, a2); break; default: result = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 11740LL, "fatal error"); break; } return result; }
ggml_compute_forward_unary: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010ca00 MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x14] MOV qword ptr [RSP + 0x8],RAX SUB RAX,0xd JA 0x0011932a MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x1b1a84] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c4b0 JMP 0x00119344 caseD_1: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c510 JMP 0x00119344 caseD_2: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c570 JMP 0x00119344 caseD_3: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c5d0 JMP 0x00119344 caseD_4: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c630 JMP 0x00119344 caseD_5: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c690 JMP 0x00119344 caseD_6: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c6f0 JMP 0x00119344 caseD_7: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c750 JMP 0x00119344 caseD_8: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c7b0 JMP 0x00119344 caseD_9: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c810 JMP 0x00119344 caseD_a: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c870 JMP 0x00119344 caseD_b: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c8d0 JMP 0x00119344 caseD_c: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c930 JMP 0x00119344 caseD_d: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0013c990 JMP 0x00119344 default: LEA RDI,[0x1b1b5a] MOV ESI,0x2ddc LEA RDX,[0x1b1cc7] MOV AL,0x0 CALL 0x0010d030 LAB_00119344: ADD RSP,0x28 RET
void ggml_compute_forward_unary(int8 param_1,int8 param_2) { int4 uVar1; uVar1 = ggml_get_unary_op(param_2); switch(uVar1) { case 0: ggml_compute_forward_abs(param_1,param_2); break; case 1: ggml_compute_forward_sgn(param_1,param_2); break; case 2: ggml_compute_forward_neg(param_1,param_2); break; case 3: ggml_compute_forward_step(param_1,param_2); break; case 4: ggml_compute_forward_tanh(param_1,param_2); break; case 5: ggml_compute_forward_elu(param_1,param_2); break; case 6: ggml_compute_forward_relu(param_1,param_2); break; case 7: ggml_compute_forward_sigmoid(param_1,param_2); break; case 8: ggml_compute_forward_gelu(param_1,param_2); break; case 9: ggml_compute_forward_gelu_quick(param_1,param_2); break; case 10: ggml_compute_forward_silu(param_1,param_2); break; case 0xb: ggml_compute_forward_hardswish(param_1,param_2); break; case 0xc: ggml_compute_forward_hardsigmoid(param_1,param_2); break; case 0xd: ggml_compute_forward_exp(param_1,param_2); break; default: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2ddc,"fatal error"); } return; }
55,325
update_backward_delete_link
eloqsql/storage/myisam/mi_dynrec.c
static int update_backward_delete_link(MI_INFO *info, my_off_t delete_block, my_off_t filepos) { MI_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_mi_get_block_info(&block_info,info->dfile,delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O0
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x78(%rbp) movq %rsi, -0x80(%rbp) movq %rdx, -0x88(%rbp) cmpq $-0x1, -0x80(%rbp) je 0xabfb4 movl $0x0, -0x10(%rbp) movq -0x78(%rbp), %rax movl 0x1c0(%rax), %esi movq -0x80(%rbp), %rdx leaq -0x60(%rbp), %rdi callq 0xab090 andl $0x4, %eax cmpl $0x0, %eax je 0xabf9e movq -0x88(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x88(%rbp), %rax shrq $0x20, %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa0(%rbp), %rax movb %al, -0x65(%rbp) movq -0xa0(%rbp), %rax shrq $0x8, %rax movb %al, -0x66(%rbp) movq -0xa0(%rbp), %rax shrq $0x10, %rax movb %al, -0x67(%rbp) movq -0xa0(%rbp), %rax shrq $0x18, %rax movb %al, -0x68(%rbp) movq -0x90(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movb %al, -0x61(%rbp) movq -0xa8(%rbp), %rax shrq $0x8, %rax movb %al, -0x62(%rbp) movq -0xa8(%rbp), %rax shrq $0x10, %rax movb %al, -0x63(%rbp) movq -0xa8(%rbp), %rax shrq $0x18, %rax movb %al, -0x64(%rbp) movq -0x78(%rbp), %rax movq (%rax), %rax movq 0x2e8(%rax), %rax movq -0x78(%rbp), %rdi leaq -0x68(%rbp), %rsi movq -0x80(%rbp), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0xabf9c jmp 0xabf93 movl $0x1, -0x6c(%rbp) jmp 0xabfbd jmp 0xabfb2 callq 0xf7440 movl $0x7f, (%rax) movl $0x1, -0x6c(%rbp) jmp 0xabfbd jmp 0xabfb4 jmp 0xabfb6 movl $0x0, -0x6c(%rbp) movl -0x6c(%rbp), %eax movl %eax, -0xac(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xabfe7 movl -0xac(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
update_backward_delete_link_0: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_78], rdi mov [rbp+var_80], rsi mov [rbp+var_88], rdx cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jz loc_ABFB4 mov [rbp+var_10], 0 mov rax, [rbp+var_78] mov esi, [rax+1C0h] mov rdx, [rbp+var_80] lea rdi, [rbp+var_60] call _mi_get_block_info and eax, 4 cmp eax, 0 jz loc_ABF9E mov rax, [rbp+var_88] mov [rbp+var_90], rax mov rax, [rbp+var_88] shr rax, 20h mov [rbp+var_98], rax mov rax, [rbp+var_98] mov [rbp+var_A0], rax mov rax, [rbp+var_A0] mov [rbp+var_65], al mov rax, [rbp+var_A0] shr rax, 8 mov [rbp+var_66], al mov rax, [rbp+var_A0] shr rax, 10h mov [rbp+var_67], al mov rax, [rbp+var_A0] shr rax, 18h mov [rbp+var_68], al mov rax, [rbp+var_90] mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_61], al mov rax, [rbp+var_A8] shr rax, 8 mov [rbp+var_62], al mov rax, [rbp+var_A8] shr rax, 10h mov [rbp+var_63], al mov rax, [rbp+var_A8] shr rax, 18h mov [rbp+var_64], al mov rax, [rbp+var_78] mov rax, [rax] mov rax, [rax+2E8h] mov rdi, [rbp+var_78] lea rsi, [rbp+var_68] mov rcx, [rbp+var_80] add rcx, 0Ch mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_ABF9C jmp short $+2 loc_ABF93: mov [rbp+var_6C], 1 jmp short loc_ABFBD loc_ABF9C: jmp short loc_ABFB2 loc_ABF9E: call _my_thread_var mov dword ptr [rax], 7Fh mov [rbp+var_6C], 1 jmp short loc_ABFBD loc_ABFB2: jmp short $+2 loc_ABFB4: jmp short $+2 loc_ABFB6: mov [rbp+var_6C], 0 loc_ABFBD: mov eax, [rbp+var_6C] mov [rbp+var_AC], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_ABFE7 mov eax, [rbp+var_AC] add rsp, 0B0h pop rbp retn loc_ABFE7: call ___stack_chk_fail
_BOOL8 update_backward_delete_link_0(unsigned int *a1, long long a2, long long a3) { const char *v3; // rsi _BYTE v8[8]; // [rsp+48h] [rbp-68h] BYREF char v9[80]; // [rsp+50h] [rbp-60h] BYREF int v10; // [rsp+A0h] [rbp-10h] unsigned long long v11; // [rsp+A8h] [rbp-8h] v11 = __readfsqword(0x28u); if ( a2 == -1 ) return 0; v10 = 0; v3 = (const char *)a1[112]; if ( (mi_get_block_info(v9, v3, a2) & 4) == 0 ) { *(_DWORD *)my_thread_var(v9, v3) = 127; return 1; } v8[2] = BYTE5(a3); v8[3] = BYTE4(a3); v8[0] = HIBYTE(a3); v8[1] = BYTE6(a3); v8[6] = BYTE1(a3); v8[7] = a3; v8[4] = BYTE3(a3); v8[5] = BYTE2(a3); return (*(long long ( **)(unsigned int *, _BYTE *, long long, long long, long long))(*(_QWORD *)a1 + 744LL))( a1, v8, 8LL, a2 + 12, 4LL) != 0; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x80],RSI MOV qword ptr [RBP + -0x88],RDX CMP qword ptr [RBP + -0x80],-0x1 JZ 0x001abfb4 MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV ESI,dword ptr [RAX + 0x1c0] MOV RDX,qword ptr [RBP + -0x80] LEA RDI,[RBP + -0x60] CALL 0x001ab090 AND EAX,0x4 CMP EAX,0x0 JZ 0x001abf9e MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x88] SHR RAX,0x20 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RBP + -0x65],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x8 MOV byte ptr [RBP + -0x66],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x10 MOV byte ptr [RBP + -0x67],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x18 MOV byte ptr [RBP + -0x68],AL MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV byte ptr [RBP + -0x61],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x8 MOV byte ptr [RBP + -0x62],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x10 MOV byte ptr [RBP + -0x63],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x18 MOV byte ptr [RBP + -0x64],AL MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x2e8] MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x68] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x001abf9c JMP 0x001abf93 LAB_001abf93: MOV dword ptr [RBP + -0x6c],0x1 JMP 0x001abfbd LAB_001abf9c: JMP 0x001abfb2 LAB_001abf9e: CALL 0x001f7440 MOV dword ptr [RAX],0x7f MOV dword ptr [RBP + -0x6c],0x1 JMP 0x001abfbd LAB_001abfb2: JMP 0x001abfb4 LAB_001abfb4: JMP 0x001abfb6 LAB_001abfb6: MOV dword ptr [RBP + -0x6c],0x0 LAB_001abfbd: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0xac],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001abfe7 MOV EAX,dword ptr [RBP + -0xac] ADD RSP,0xb0 POP RBP RET LAB_001abfe7: CALL 0x0012a270
int4 update_backward_delete_link(long *param_1,long param_2,int8 param_3) { uint uVar1; long lVar2; int4 *puVar3; long in_FS_OFFSET; int4 local_74; int1 local_70; int1 local_6f; int1 local_6e; int1 local_6d; int1 local_6c; int1 local_6b; int1 local_6a; int1 local_69; int1 local_68 [80]; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_18 = 0; uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],param_2); if ((uVar1 & 4) == 0) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x7f; local_74 = 1; goto LAB_001abfbd; } local_6d = (int1)((ulong)param_3 >> 0x20); local_6e = (int1)((ulong)param_3 >> 0x28); local_6f = (int1)((ulong)param_3 >> 0x30); local_70 = (int1)((ulong)param_3 >> 0x38); local_69 = (int1)param_3; local_6a = (int1)((ulong)param_3 >> 8); local_6b = (int1)((ulong)param_3 >> 0x10); local_6c = (int1)((ulong)param_3 >> 0x18); lVar2 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_70,8,param_2 + 0xc,4); if (lVar2 != 0) { local_74 = 1; goto LAB_001abfbd; } } local_74 = 0; LAB_001abfbd: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_74; }
55,326
update_backward_delete_link
eloqsql/storage/myisam/mi_dynrec.c
static int update_backward_delete_link(MI_INFO *info, my_off_t delete_block, my_off_t filepos) { MI_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_mi_get_block_info(&block_info,info->dfile,delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O3
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x798d4 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 leaq -0x78(%rbp), %rdi movl $0x0, 0x50(%rdi) movl 0x1c0(%r14), %esi movq %rbx, %rdx callq 0x7933f testb $0x4, %al jne 0x7989f callq 0xa2a4e movl $0x7f, (%rax) movl $0x1, %eax jmp 0x798d6 bswapq %r15 leaq -0x80(%rbp), %rsi movq %r15, (%rsi) movq (%r14), %rax addq $0xc, %rbx movl $0x8, %edx movl $0x4, %r8d movq %r14, %rdi movq %rbx, %rcx callq *0x2e8(%rax) movq %rax, %rcx movl $0x1, %eax testq %rcx, %rcx jne 0x798d6 xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x798f0 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29270
update_backward_delete_link_0: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_798D4 mov r15, rdx mov rbx, rsi mov r14, rdi lea rdi, [rbp+var_78] mov dword ptr [rdi+50h], 0 mov esi, [r14+1C0h] mov rdx, rbx call _mi_get_block_info test al, 4 jnz short loc_7989F call _my_thread_var mov dword ptr [rax], 7Fh mov eax, 1 jmp short loc_798D6 loc_7989F: bswap r15 lea rsi, [rbp+var_80] mov [rsi], r15 mov rax, [r14] add rbx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, r14 mov rcx, rbx call qword ptr [rax+2E8h] mov rcx, rax mov eax, 1 test rcx, rcx jnz short loc_798D6 loc_798D4: xor eax, eax loc_798D6: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_798F0 add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_798F0: call ___stack_chk_fail
long long update_backward_delete_link_0(unsigned int *a1, long long a2, unsigned long long a3) { unsigned long long v5; // rsi long long result; // rax long long v7; // rcx unsigned long long v8; // [rsp+0h] [rbp-80h] BYREF _BYTE v9[80]; // [rsp+8h] [rbp-78h] BYREF int v10; // [rsp+58h] [rbp-28h] unsigned long long v11; // [rsp+60h] [rbp-20h] v11 = __readfsqword(0x28u); if ( a2 == -1 ) return 0LL; v10 = 0; v5 = a1[112]; if ( (mi_get_block_info((long long)v9, v5, a2) & 4) == 0 ) { *(_DWORD *)my_thread_var(v9, (const char *)v5) = 127; return 1LL; } v8 = _byteswap_uint64(a3); v7 = (*(long long ( **)(unsigned int *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 744LL))( a1, &v8, 8LL, a2 + 12, 4LL); result = 1LL; if ( !v7 ) return 0LL; return result; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x001798d4 MOV R15,RDX MOV RBX,RSI MOV R14,RDI LEA RDI,[RBP + -0x78] MOV dword ptr [RDI + 0x50],0x0 MOV ESI,dword ptr [R14 + 0x1c0] MOV RDX,RBX CALL 0x0017933f TEST AL,0x4 JNZ 0x0017989f CALL 0x001a2a4e MOV dword ptr [RAX],0x7f MOV EAX,0x1 JMP 0x001798d6 LAB_0017989f: BSWAP R15 LEA RSI,[RBP + -0x80] MOV qword ptr [RSI],R15 MOV RAX,qword ptr [R14] ADD RBX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x2e8] MOV RCX,RAX MOV EAX,0x1 TEST RCX,RCX JNZ 0x001798d6 LAB_001798d4: XOR EAX,EAX LAB_001798d6: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x001798f0 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_001798f0: CALL 0x00129270
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3) { ulong uVar1; int4 *puVar2; int8 uVar3; long lVar4; long in_FS_OFFSET; ulong local_88; int1 local_80 [80]; int4 local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_30 = 0; uVar1 = _mi_get_block_info(local_80,(int)param_1[0x38],param_2); if ((uVar1 & 4) == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7f; uVar3 = 1; goto LAB_001798d6; } local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 | (param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 | (param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 | (param_3 & 0xff00) << 0x28 | param_3 << 0x38; lVar4 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_88,8,param_2 + 0xc,4); uVar3 = 1; if (lVar4 != 0) goto LAB_001798d6; } uVar3 = 0; LAB_001798d6: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
55,327
add_directory
eloqsql/mysys/my_default.c
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) { char buf[FN_REFLEN]; size_t len; char *p; my_bool err __attribute__((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) return 1; /* Failure */ /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); DBUG_ASSERT(err == FALSE); return 0; }
O0
c
add_directory: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movq %rdx, -0x230(%rbp) leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0x33ae0 movq %rax, -0x238(%rbp) movq -0x220(%rbp), %rdi leaq -0x210(%rbp), %rsi movq -0x238(%rbp), %rdx callq 0x34c30 movq %rax, -0x240(%rbp) cmpq $0x0, %rax jne 0x3130a movl $0x1, -0x214(%rbp) jmp 0x31334 movq -0x240(%rbp), %rdi movq -0x230(%rbp), %rsi movl $0x8, %edx callq 0x34000 movb %al, -0x241(%rbp) jmp 0x3132a movl $0x0, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x248(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x31361 movl -0x248(%rbp), %eax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x24330 nopw %cs:(%rax,%rax)
add_directory: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_230], rdx lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call normalize_dirname mov [rbp+var_238], rax mov rdi, [rbp+var_220] lea rsi, [rbp+var_210] mov rdx, [rbp+var_238] call strmake_root mov [rbp+var_240], rax cmp rax, 0 jnz short loc_3130A mov [rbp+var_214], 1 jmp short loc_31334 loc_3130A: mov rdi, [rbp+var_240] mov rsi, [rbp+var_230] mov edx, 8 call array_append_string_unique mov [rbp+var_241], al jmp short $+2 loc_3132A: mov [rbp+var_214], 0 loc_31334: mov eax, [rbp+var_214] mov [rbp+var_248], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_31361 mov eax, [rbp+var_248] add rsp, 250h pop rbp retn loc_31361: call ___stack_chk_fail
long long add_directory(long long a1, long long a2, long long a3) { long long v4; // [rsp+10h] [rbp-240h] long long v5; // [rsp+18h] [rbp-238h] _BYTE v8[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v9; // [rsp+248h] [rbp-8h] v9 = __readfsqword(0x28u); v5 = normalize_dirname(v8, a2); v4 = strmake_root(a1, v8, v5); if ( v4 ) { array_append_string_unique(v4, a3, 8LL); return 0; } else { return 1; } }
add_directory: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV qword ptr [RBP + -0x230],RDX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x00133ae0 MOV qword ptr [RBP + -0x238],RAX MOV RDI,qword ptr [RBP + -0x220] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00134c30 MOV qword ptr [RBP + -0x240],RAX CMP RAX,0x0 JNZ 0x0013130a MOV dword ptr [RBP + -0x214],0x1 JMP 0x00131334 LAB_0013130a: MOV RDI,qword ptr [RBP + -0x240] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x8 CALL 0x00134000 MOV byte ptr [RBP + -0x241],AL JMP 0x0013132a LAB_0013132a: MOV dword ptr [RBP + -0x214],0x0 LAB_00131334: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x248],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00131361 MOV EAX,dword ptr [RBP + -0x248] ADD RSP,0x250 POP RBP RET LAB_00131361: CALL 0x00124330
bool add_directory(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = normalize_dirname(local_218,param_2); lVar2 = strmake_root(param_1,local_218,uVar1); if (lVar2 != 0) { array_append_string_unique(lVar2,param_3,8); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar2 == 0; }
55,328
init_alloc_root
eloqsql/mysys/my_alloc.c
void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused)), myf my_flags) { DBUG_ENTER("init_alloc_root"); DBUG_PRINT("enter",("root: %p prealloc: %zu", mem_root, pre_alloc_size)); mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1; if (my_flags & MY_THREAD_SPECIFIC) mem_root->block_size|= 1; mem_root->error_handler= 0; mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; mem_root->m_psi_key= key; #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if ((mem_root->free= mem_root->pre_alloc= (USED_MEM*) my_malloc(key, size, MYF(my_flags)))) { mem_root->free->size= size; mem_root->free->left= pre_alloc_size; mem_root->free->next= 0; TRASH_MEM(mem_root->free); } } #endif DBUG_VOID_RETURN; }
O0
c
init_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) jmp 0xec78d movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x10(%rbp), %rax movq $0x20, 0x18(%rax) movq -0x18(%rbp), %rcx subq $0x28, %rcx andq $-0x2, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x28(%rbp), %rax andq $0x10000, %rax # imm = 0x10000 cmpq $0x0, %rax je 0xec7f0 movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x1, %rcx movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movl $0x4, 0x28(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movl -0x4(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x38(%rax) cmpq $0x0, -0x20(%rbp) je 0xec88a movq -0x20(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) movl -0x4(%rbp), %edi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xf2e30 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) movq -0x10(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xec888 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) jmp 0xec882 jmp 0xec884 jmp 0xec886 jmp 0xec888 jmp 0xec88a jmp 0xec88c jmp 0xec88e addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
init_alloc_root: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 jmp short $+2 loc_EC78D: mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+8], 0 mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_10] mov qword ptr [rax+18h], 20h ; ' ' mov rcx, [rbp+var_18] sub rcx, 28h ; '(' and rcx, 0FFFFFFFFFFFFFFFEh mov rax, [rbp+var_10] mov [rax+20h], rcx mov rax, [rbp+var_28] and rax, 10000h cmp rax, 0 jz short loc_EC7F0 mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 1 mov [rax+20h], rcx loc_EC7F0: mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 4 mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 mov ecx, [rbp+var_4] mov rax, [rbp+var_10] mov [rax+38h], ecx cmp [rbp+var_20], 0 jz short loc_EC88A mov rax, [rbp+var_20] add rax, 18h mov [rbp+var_30], rax mov edi, [rbp+var_4] mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] call my_malloc mov rcx, [rbp+var_10] mov [rcx+10h], rax mov rcx, [rbp+var_10] mov [rcx], rax cmp rax, 0 jz short loc_EC888 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+10h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax], 0 jmp short $+2 loc_EC882: jmp short $+2 loc_EC884: jmp short $+2 loc_EC886: jmp short $+2 loc_EC888: jmp short $+2 loc_EC88A: jmp short $+2 loc_EC88C: jmp short $+2 loc_EC88E: add rsp, 30h pop rbp retn
long long init_alloc_root(unsigned int a1, long long *a2, long long a3, long long a4, long long a5) { long long result; // rax a2[2] = 0LL; a2[1] = 0LL; *a2 = 0LL; a2[3] = 32LL; a2[4] = (a3 - 40) & 0xFFFFFFFFFFFFFFFELL; if ( (a5 & 0x10000) != 0 ) a2[4] |= 1uLL; a2[6] = 0LL; *((_DWORD *)a2 + 10) = 4; *((_DWORD *)a2 + 11) = 0; result = (long long)a2; *((_DWORD *)a2 + 14) = a1; if ( a4 ) { result = my_malloc(a1, a4 + 24, a5); a2[2] = result; *a2 = result; if ( result ) { *(_QWORD *)(*a2 + 16) = a4 + 24; *(_QWORD *)(*a2 + 8) = a4; result = *a2; *(_QWORD *)*a2 = 0LL; } } return result; }
init_alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 JMP 0x001ec78d LAB_001ec78d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x20 MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x28 AND RCX,-0x2 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x10000 CMP RAX,0x0 JZ 0x001ec7f0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x1 MOV qword ptr [RAX + 0x20],RCX LAB_001ec7f0: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x4 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x38],ECX CMP qword ptr [RBP + -0x20],0x0 JZ 0x001ec88a MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001f2e30 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001ec888 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 JMP 0x001ec882 LAB_001ec882: JMP 0x001ec884 LAB_001ec884: JMP 0x001ec886 LAB_001ec886: JMP 0x001ec888 LAB_001ec888: JMP 0x001ec88a LAB_001ec88a: JMP 0x001ec88c LAB_001ec88c: JMP 0x001ec88e LAB_001ec88e: ADD RSP,0x30 POP RBP RET
void init_alloc_root(int4 param_1,long *param_2,long param_3,long param_4,ulong param_5) { long lVar1; param_2[2] = 0; param_2[1] = 0; *param_2 = 0; param_2[3] = 0x20; param_2[4] = param_3 - 0x28U & 0xfffffffffffffffe; if ((param_5 & 0x10000) != 0) { param_2[4] = param_2[4] | 1; } param_2[6] = 0; *(int4 *)(param_2 + 5) = 4; *(int4 *)((long)param_2 + 0x2c) = 0; *(int4 *)(param_2 + 7) = param_1; if (param_4 != 0) { lVar1 = my_malloc(param_1,param_4 + 0x18,param_5); param_2[2] = lVar1; *param_2 = lVar1; if (lVar1 != 0) { *(long *)(*param_2 + 0x10) = param_4 + 0x18; *(long *)(*param_2 + 8) = param_4; *(int8 *)*param_2 = 0; } } return; }
55,329
my_utf8mb3_uni_no_range
eloqsql/strings/ctype-utf8.c
static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t * pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!((s[1] ^ 0x80) < 0x40)) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O0
c
my_utf8mb3_uni_no_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0xfb71d movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xfb833 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0xfb734 movl $0x0, -0x4(%rbp) jmp 0xfb833 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0xfb790 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0xfb75d movl $0x0, -0x4(%rbp) jmp 0xfb833 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0xfb833 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0xfb82c movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xfb7dd movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xfb7dd movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0xfb7e6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0xfb7e6 movl $0x0, -0x4(%rbp) jmp 0xfb833 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0xfb833 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_utf8mb3_uni_no_range: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_FB71D movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_FB833 loc_FB71D: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_FB734 mov [rbp+var_4], 0 jmp loc_FB833 loc_FB734: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_FB790 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_FB75D mov [rbp+var_4], 0 jmp loc_FB833 loc_FB75D: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_FB833 loc_FB790: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_FB82C mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_FB7DD mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_FB7DD movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_FB7E6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_FB7E6 loc_FB7DD: mov [rbp+var_4], 0 jmp short loc_FB833 loc_FB7E6: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_FB833 loc_FB82C: mov [rbp+var_4], 0 loc_FB833: mov eax, [rbp+var_4] pop rbp retn
long long my_utf8mb3_uni_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] v4 = *a3; if ( *a3 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { return 0; } else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) ) { *a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else if ( (a3[1] ^ 0x80) < 64 ) { *a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return 0; } } else { *a2 = v4; return 1; } }
my_utf8mb3_uni_no_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x001fb71d MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001fb833 LAB_001fb71d: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x001fb734 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fb833 LAB_001fb734: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x001fb790 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001fb75d MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fb833 LAB_001fb75d: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001fb833 LAB_001fb790: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x001fb82c MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001fb7dd MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001fb7dd MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x001fb7e6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x001fb7e6 LAB_001fb7dd: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fb833 LAB_001fb7e6: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x001fb833 LAB_001fb82c: MOV dword ptr [RBP + -0x4],0x0 LAB_001fb833: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf8mb3_uni_no_range(int8 param_1,ulong *param_2,byte *param_3) { byte bVar1; int4 local_c; bVar1 = *param_3; if (bVar1 < 0x80) { *param_2 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if ((param_3[1] ^ 0x80) < 0x40) { *param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_3[1])))) { *param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 | (long)(int)(param_3[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else { local_c = 0; } return local_c; }
55,330
my_uni_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *r, uchar *e) { if (wc < 0x80) { if (r >= e) return MY_CS_TOOSMALL; *r= (uchar) wc; return 1; } if (wc < 0x800) { if (r + 2 > e) return MY_CS_TOOSMALLN(2); /* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */ *r++= (uchar) (0xC0 | (wc >> 6)); *r= (uchar) (0x80 | (wc & 0x3F)); return 2; } if (wc < 0x10000) { if (r + 3 > e) return MY_CS_TOOSMALLN(3); /* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */ *r++= (uchar) (0xE0 | (wc >> 12)); *r++= (uchar) (0x80 | ((wc >> 6) & 0x3f)); *r= (uchar) (0x80 | (wc & 0x3f)); return 3; } return MY_CS_ILUNI; }
O3
c
my_uni_utf8mb3: pushq %rbp movq %rsp, %rbp cmpq $0x7f, %rsi ja 0x900f6 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x90168 movb %sil, (%rdx) movl $0x1, %eax jmp 0x90168 cmpq $0x7ff, %rsi # imm = 0x7FF ja 0x90129 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x90168 movl %esi, %eax shrl $0x6, %eax orb $-0x40, %al movb %al, (%rdx) andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax jmp 0x90168 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x90168 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x90168 movl %esi, %eax shrl $0xc, %eax orb $-0x20, %al movb %al, (%rdx) movl %esi, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0x1(%rdx) andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x2(%rdx) movl $0x3, %eax popq %rbp retq
my_uni_utf8mb3: push rbp mov rbp, rsp cmp rsi, 7Fh ja short loc_900F6 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_90168 mov [rdx], sil mov eax, 1 jmp short loc_90168 loc_900F6: cmp rsi, 7FFh ja short loc_90129 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_90168 mov eax, esi shr eax, 6 or al, 0C0h mov [rdx], al and sil, 3Fh or sil, 80h mov [rdx+1], sil mov eax, 2 jmp short loc_90168 loc_90129: xor eax, eax cmp rsi, 0FFFFh ja short loc_90168 lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja short loc_90168 mov eax, esi shr eax, 0Ch or al, 0E0h mov [rdx], al mov eax, esi shr eax, 6 and al, 3Fh or al, 80h mov [rdx+1], al and sil, 3Fh or sil, 80h mov [rdx+2], sil mov eax, 3 loc_90168: pop rbp retn
long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax if ( a2 > 0x7F ) { if ( a2 > 0x7FF ) { result = 0LL; if ( a2 <= 0xFFFF ) { result = 4294967193LL; if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = ((unsigned int)a2 >> 12) | 0xE0; a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80; a3[2] = a2 & 0x3F | 0x80; return 3LL; } } } else { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = ((unsigned int)a2 >> 6) | 0xC0; a3[1] = a2 & 0x3F | 0x80; return 2LL; } } } else { result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1LL; } } return result; }
my_uni_utf8mb3: PUSH RBP MOV RBP,RSP CMP RSI,0x7f JA 0x001900f6 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00190168 MOV byte ptr [RDX],SIL MOV EAX,0x1 JMP 0x00190168 LAB_001900f6: CMP RSI,0x7ff JA 0x00190129 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00190168 MOV EAX,ESI SHR EAX,0x6 OR AL,0xc0 MOV byte ptr [RDX],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 JMP 0x00190168 LAB_00190129: XOR EAX,EAX CMP RSI,0xffff JA 0x00190168 LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x00190168 MOV EAX,ESI SHR EAX,0xc OR AL,0xe0 MOV byte ptr [RDX],AL MOV EAX,ESI SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOV byte ptr [RDX + 0x1],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RDX + 0x2],SIL MOV EAX,0x3 LAB_00190168: POP RBP RET
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int8 uVar1; byte bVar2; uint uVar3; uVar3 = (uint)param_2; bVar2 = (byte)param_2; if (param_2 < 0x80) { uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_3 = bVar2; uVar1 = 1; } } else if (param_2 < 0x800) { uVar1 = 0xffffff9a; if (param_3 + 2 <= param_4) { *param_3 = (byte)(uVar3 >> 6) | 0xc0; param_3[1] = bVar2 & 0x3f | 0x80; uVar1 = 2; } } else { uVar1 = 0; if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) { *param_3 = (byte)(uVar3 >> 0xc) | 0xe0; param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80; param_3[2] = bVar2 & 0x3f | 0x80; uVar1 = 3; } } return uVar1; }
55,331
Catch::RunContext::handleExpr(Catch::AssertionInfo const&, Catch::ITransientExpression const&, Catch::AssertionReaction&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void RunContext::handleExpr( AssertionInfo const& info, ITransientExpression const& expr, AssertionReaction& reaction ) { m_reporter->assertionStarting( info ); bool negated = isFalseTest( info.resultDisposition ); bool result = expr.getResult() != negated; if( result ) { if (!m_includeSuccessfulResults) { assertionPassed(); } else { reportExpr(info, ResultWas::Ok, &expr, negated); } } else { reportExpr(info, ResultWas::ExpressionFailed, &expr, negated ); populateReaction( reaction ); } }
O3
cpp
Catch::RunContext::handleExpr(Catch::AssertionInfo const&, Catch::ITransientExpression const&, Catch::AssertionReaction&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 movq 0x110(%rdi), %rdi movq (%rdi), %rax callq *0x60(%rax) movl 0x30(%r12), %r8d andl $0x4, %r8d shrl $0x2, %r8d cmpb 0x9(%r15), %r8b je 0x6023d cmpb $0x0, 0x1cb(%r14) je 0x6029c movq %r14, %rdi movq %r12, %rsi xorl %edx, %edx movq %r15, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x602b4 movq %r14, %rdi movq %r12, %rsi movl $0x11, %edx movq %r15, %rcx callq 0x602b4 movq 0xc8(%r14), %rdi movq (%rdi), %rax callq *0x28(%rax) movb %al, (%rbx) movq 0xc8(%r14), %rdi movq 0xd8(%r14), %r15 movq (%rdi), %rax callq *0x48(%rax) cltq movb 0x178(%r14), %cl andb $0x1, %cl cmpq %rax, %r15 movzbl %cl, %eax movl $0x1, %ecx cmovbl %eax, %ecx movb %cl, 0x1(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq (%r14), %rax movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *0xb0(%rax) nop
_ZN5Catch10RunContext10handleExprERKNS_13AssertionInfoERKNS_20ITransientExpressionERNS_17AssertionReactionE: push r15; int push r14; int push r12; int push rbx; int push rax; int mov rbx, rcx mov r15, rdx mov r12, rsi mov r14, rdi mov rdi, [rdi+110h] mov rax, [rdi] call qword ptr [rax+60h] mov r8d, [r12+30h] and r8d, 4 shr r8d, 2 cmp r8b, [r15+9] jz short loc_6023D cmp byte ptr [r14+1CBh], 0 jz short loc_6029C mov rdi, r14; this mov rsi, r12 xor edx, edx mov rcx, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN5Catch10RunContext10reportExprERKNS_13AssertionInfoENS_9ResultWas6OfTypeEPKNS_20ITransientExpressionEb; Catch::RunContext::reportExpr(Catch::AssertionInfo const&,Catch::ResultWas::OfType,Catch::ITransientExpression const*,bool) loc_6023D: mov rdi, r14; this mov rsi, r12 mov edx, 11h mov rcx, r15 call _ZN5Catch10RunContext10reportExprERKNS_13AssertionInfoENS_9ResultWas6OfTypeEPKNS_20ITransientExpressionEb; Catch::RunContext::reportExpr(Catch::AssertionInfo const&,Catch::ResultWas::OfType,Catch::ITransientExpression const*,bool) mov rdi, [r14+0C8h] mov rax, [rdi] call qword ptr [rax+28h] mov [rbx], al mov rdi, [r14+0C8h] mov r15, [r14+0D8h] mov rax, [rdi] call qword ptr [rax+48h] cdqe mov cl, [r14+178h] and cl, 1 cmp r15, rax movzx eax, cl mov ecx, 1 cmovb ecx, eax mov [rbx+1], cl add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_6029C: mov rax, [r14] mov rdi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp qword ptr [rax+0B0h]
handleExpr: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R15,RDX MOV R12,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x110] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x60] MOV R8D,dword ptr [R12 + 0x30] AND R8D,0x4 SHR R8D,0x2 CMP R8B,byte ptr [R15 + 0x9] JZ 0x0016023d CMP byte ptr [R14 + 0x1cb],0x0 JZ 0x0016029c MOV RDI,R14 MOV RSI,R12 XOR EDX,EDX MOV RCX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x001602b4 LAB_0016023d: MOV RDI,R14 MOV RSI,R12 MOV EDX,0x11 MOV RCX,R15 CALL 0x001602b4 MOV RDI,qword ptr [R14 + 0xc8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] MOV byte ptr [RBX],AL MOV RDI,qword ptr [R14 + 0xc8] MOV R15,qword ptr [R14 + 0xd8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x48] CDQE MOV CL,byte ptr [R14 + 0x178] AND CL,0x1 CMP R15,RAX MOVZX EAX,CL MOV ECX,0x1 CMOVC ECX,EAX MOV byte ptr [RBX + 0x1],CL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016029c: MOV RAX,qword ptr [R14] MOV RDI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP qword ptr [RAX + 0xb0]
/* Catch::RunContext::handleExpr(Catch::AssertionInfo const&, Catch::ITransientExpression const&, Catch::AssertionReaction&) */ void __thiscall Catch::RunContext::handleExpr (RunContext *this,AssertionInfo *param_1,ITransientExpression *param_2, AssertionReaction *param_3) { ulong uVar1; AssertionReaction AVar2; int iVar3; (**(code **)(**(long **)(this + 0x110) + 0x60))(); if (SUB41((*(uint *)(param_1 + 0x30) & 4) >> 2,0) == param_2[9]) { reportExpr(this,param_1,0x11,param_2); AVar2 = (AssertionReaction)(**(code **)(**(long **)(this + 200) + 0x28))(); *param_3 = AVar2; uVar1 = *(ulong *)(this + 0xd8); iVar3 = (**(code **)(**(long **)(this + 200) + 0x48))(); AVar2 = (AssertionReaction)0x1; if (uVar1 < (ulong)(long)iVar3) { AVar2 = (AssertionReaction)((byte)this[0x178] & 1); } param_3[1] = AVar2; return; } if (this[0x1cb] != (RunContext)0x0) { reportExpr(this,param_1,0,param_2); return; } /* WARNING: Could not recover jumptable at 0x001602ad. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)this + 0xb0))(this); return; }
55,332
exchange_int32s
bluesky950520[P]quickjs/cutils.c
static void exchange_int32s(void *a, void *b, size_t size) { uint32_t *ap = (uint32_t *)a; uint32_t *bp = (uint32_t *)b; for (size /= sizeof(uint32_t); size-- != 0;) { uint32_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O1
c
exchange_int32s: cmpq $0x4, %rdx jb 0x1c936 shrq $0x2, %rdx xorl %eax, %eax movl (%rdi,%rax,4), %ecx movl (%rsi,%rax,4), %r8d movl %r8d, (%rdi,%rax,4) movl %ecx, (%rsi,%rax,4) incq %rax cmpq %rax, %rdx jne 0x1c920 retq
exchange_int32s: cmp rdx, 4 jb short locret_1C936 shr rdx, 2 xor eax, eax loc_1C920: mov ecx, [rdi+rax*4] mov r8d, [rsi+rax*4] mov [rdi+rax*4], r8d mov [rsi+rax*4], ecx inc rax cmp rdx, rax jnz short loc_1C920 locret_1C936: retn
void exchange_int32s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long v4; // rax int v5; // ecx if ( a3 >= 4 ) { v3 = a3 >> 2; v4 = 0LL; do { v5 = *(_DWORD *)(a1 + 4 * v4); *(_DWORD *)(a1 + 4 * v4) = *(_DWORD *)(a2 + 4 * v4); *(_DWORD *)(a2 + 4 * v4++) = v5; } while ( v3 != v4 ); } }
exchange_int32s: CMP RDX,0x4 JC 0x0011c936 SHR RDX,0x2 XOR EAX,EAX LAB_0011c920: MOV ECX,dword ptr [RDI + RAX*0x4] MOV R8D,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],R8D MOV dword ptr [RSI + RAX*0x4],ECX INC RAX CMP RDX,RAX JNZ 0x0011c920 LAB_0011c936: RET
void exchange_int32s(long param_1,long param_2,ulong param_3) { int4 uVar1; ulong uVar2; if (3 < param_3) { uVar2 = 0; do { uVar1 = *(int4 *)(param_1 + uVar2 * 4); *(int4 *)(param_1 + uVar2 * 4) = *(int4 *)(param_2 + uVar2 * 4); *(int4 *)(param_2 + uVar2 * 4) = uVar1; uVar2 = uVar2 + 1; } while (param_3 >> 2 != uVar2); } return; }
55,333
exchange_int32s
bluesky950520[P]quickjs/cutils.c
static void exchange_int32s(void *a, void *b, size_t size) { uint32_t *ap = (uint32_t *)a; uint32_t *bp = (uint32_t *)b; for (size /= sizeof(uint32_t); size-- != 0;) { uint32_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O2
c
exchange_int32s: shrq $0x2, %rdx xorl %eax, %eax cmpq %rax, %rdx je 0x16f3e movl (%rdi,%rax,4), %ecx movl (%rsi,%rax,4), %r8d movl %r8d, (%rdi,%rax,4) movl %ecx, (%rsi,%rax,4) incq %rax jmp 0x16f26 retq
exchange_int32s: shr rdx, 2 xor eax, eax loc_16F26: cmp rdx, rax jz short locret_16F3E mov ecx, [rdi+rax*4] mov r8d, [rsi+rax*4] mov [rdi+rax*4], r8d mov [rsi+rax*4], ecx inc rax jmp short loc_16F26 locret_16F3E: retn
long long exchange_int32s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long result; // rax int v5; // ecx v3 = a3 >> 2; for ( result = 0LL; v3 != result; ++result ) { v5 = *(_DWORD *)(a1 + 4 * result); *(_DWORD *)(a1 + 4 * result) = *(_DWORD *)(a2 + 4 * result); *(_DWORD *)(a2 + 4 * result) = v5; } return result; }
exchange_int32s: SHR RDX,0x2 XOR EAX,EAX LAB_00116f26: CMP RDX,RAX JZ 0x00116f3e MOV ECX,dword ptr [RDI + RAX*0x4] MOV R8D,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],R8D MOV dword ptr [RSI + RAX*0x4],ECX INC RAX JMP 0x00116f26 LAB_00116f3e: RET
void exchange_int32s(long param_1,long param_2,ulong param_3) { int4 uVar1; ulong uVar2; for (uVar2 = 0; param_3 >> 2 != uVar2; uVar2 = uVar2 + 1) { uVar1 = *(int4 *)(param_1 + uVar2 * 4); *(int4 *)(param_1 + uVar2 * 4) = *(int4 *)(param_2 + uVar2 * 4); *(int4 *)(param_2 + uVar2 * 4) = uVar1; } return; }
55,334
exchange_int32s
bluesky950520[P]quickjs/cutils.c
static void exchange_int32s(void *a, void *b, size_t size) { uint32_t *ap = (uint32_t *)a; uint32_t *bp = (uint32_t *)b; for (size /= sizeof(uint32_t); size-- != 0;) { uint32_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O3
c
exchange_int32s: cmpq $0x4, %rdx jb 0x1d234 shrq $0x2, %rdx xorl %eax, %eax movl (%rdi,%rax,4), %ecx movl (%rsi,%rax,4), %r8d movl %r8d, (%rdi,%rax,4) movl %ecx, (%rsi,%rax,4) incq %rax cmpq %rax, %rdx jne 0x1d21e retq
exchange_int32s: cmp rdx, 4 jb short locret_1D234 shr rdx, 2 xor eax, eax loc_1D21E: mov ecx, [rdi+rax*4] mov r8d, [rsi+rax*4] mov [rdi+rax*4], r8d mov [rsi+rax*4], ecx inc rax cmp rdx, rax jnz short loc_1D21E locret_1D234: retn
void exchange_int32s(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long v4; // rax int v5; // ecx if ( a3 >= 4 ) { v3 = a3 >> 2; v4 = 0LL; do { v5 = *(_DWORD *)(a1 + 4 * v4); *(_DWORD *)(a1 + 4 * v4) = *(_DWORD *)(a2 + 4 * v4); *(_DWORD *)(a2 + 4 * v4++) = v5; } while ( v3 != v4 ); } }
exchange_int32s: CMP RDX,0x4 JC 0x0011d234 SHR RDX,0x2 XOR EAX,EAX LAB_0011d21e: MOV ECX,dword ptr [RDI + RAX*0x4] MOV R8D,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],R8D MOV dword ptr [RSI + RAX*0x4],ECX INC RAX CMP RDX,RAX JNZ 0x0011d21e LAB_0011d234: RET
void exchange_int32s(long param_1,long param_2,ulong param_3) { int4 uVar1; ulong uVar2; if (3 < param_3) { uVar2 = 0; do { uVar1 = *(int4 *)(param_1 + uVar2 * 4); *(int4 *)(param_1 + uVar2 * 4) = *(int4 *)(param_2 + uVar2 * 4); *(int4 *)(param_2 + uVar2 * 4) = uVar1; uVar2 = uVar2 + 1; } while (param_3 >> 2 != uVar2); } return; }
55,335
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/./json.hpp
json_value(value_t t) { switch (t) { case value_t::object: { object = create<object_t>(); break; } case value_t::array: { array = create<array_t>(); break; } case value_t::string: { string = create<string_t>(""); break; } case value_t::binary: { binary = create<binary_t>(); break; } case value_t::boolean: { boolean = static_cast<boolean_t>(false); break; } case value_t::number_integer: { number_integer = static_cast<number_integer_t>(0); break; } case value_t::number_unsigned: { number_unsigned = static_cast<number_unsigned_t>(0); break; } case value_t::number_float: { number_float = static_cast<number_float_t>(0.0); break; } case value_t::null: { object = nullptr; // silence warning, see #821 break; } case value_t::discarded: default: { object = nullptr; // silence warning, see #821 if (JSON_HEDLEY_UNLIKELY(t == value_t::null)) { JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE } break; } } }
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbx movq %rdi, %rbx cmpl $0x8, %esi ja 0x4c2ff movl %esi, %eax leaq 0x6133a(%rip), %rcx # 0xad630 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq $0x0, (%rbx) jmp 0x4c357 movl $0x20, %edi jmp 0x4c319 movb $0x0, (%rbx) jmp 0x4c357 movl $0x18, %edi callq 0x18690 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) jmp 0x4c354 leaq 0x69106(%rip), %rdi # 0xb543b callq 0x4c35a jmp 0x4c354 movl $0x28, %edi callq 0x18690 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movups %xmm0, 0x10(%rax) movb $0x0, 0x20(%rax) movq %rax, (%rbx) popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE: push rbx mov rbx, rdi cmp esi, 8; switch 9 cases ja short def_4C2FD; jumptable 000000000004C2FD default case, cases 0,5-7 mov eax, esi lea rcx, jpt_4C2FD movsxd rax, ds:(jpt_4C2FD - 0AD630h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_4C2FD: mov qword ptr [rbx], 0; jumptable 000000000004C2FD default case, cases 0,5-7 jmp short loc_4C357 loc_4C308: mov edi, 20h ; ' '; jumptable 000000000004C2FD case 1 jmp short loc_4C319 loc_4C30F: mov byte ptr [rbx], 0; jumptable 000000000004C2FD case 4 jmp short loc_4C357 loc_4C314: mov edi, 18h; jumptable 000000000004C2FD case 2 loc_4C319: call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 jmp short loc_4C354 loc_4C32E: lea rdi, aSJinja+16h; jumptable 000000000004C2FD case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&) jmp short loc_4C354 loc_4C33C: mov edi, 28h ; '('; jumptable 000000000004C2FD case 8 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+20h], 0 loc_4C354: mov [rbx], rax loc_4C357: pop rbx retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::json_value( _BYTE *a1, unsigned int a2) { long long result; // rax unsigned long long v4; // rdi result = a2; switch ( a2 ) { case 1u: v4 = 32LL; goto LABEL_6; case 2u: v4 = 24LL; LABEL_6: result = operator new(v4); *(_OWORD *)result = 0LL; *(_QWORD *)(result + 16) = 0LL; goto LABEL_9; case 3u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,char const(&)[1]>(""); goto LABEL_9; case 4u: *a1 = 0; return result; case 8u: result = operator new(0x28uLL); *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; *(_BYTE *)(result + 32) = 0; LABEL_9: *(_QWORD *)a1 = result; break; default: *(_QWORD *)a1 = 0LL; break; } return result; }
json_value: PUSH RBX MOV RBX,RDI CMP ESI,0x8 JA 0x0014c2ff MOV EAX,ESI LEA RCX,[0x1ad630] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV qword ptr [RBX],0x0 JMP 0x0014c357 caseD_1: MOV EDI,0x20 JMP 0x0014c319 caseD_4: MOV byte ptr [RBX],0x0 JMP 0x0014c357 caseD_2: MOV EDI,0x18 LAB_0014c319: CALL 0x00118690 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 JMP 0x0014c354 caseD_3: LEA RDI,[0x1b543b] CALL 0x0014c35a JMP 0x0014c354 caseD_8: MOV EDI,0x28 CALL 0x00118690 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x20],0x0 LAB_0014c354: MOV qword ptr [RBX],RAX LAB_0014c357: POP RBX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::json_value(json_value *this,int4 param_2) { string *psVar1; ulong uVar2; switch(param_2) { default: *(int8 *)this = 0; return; case 1: uVar2 = 0x20; break; case 2: uVar2 = 0x18; break; case 3: psVar1 = create<std::__cxx11::string,char_const(&)[1]>(""); goto LAB_0014c354; case 4: *this = (json_value)0x0; return; case 8: psVar1 = (string *)operator_new(0x28); *(int8 *)psVar1 = 0; *(int8 *)(psVar1 + 8) = 0; *(int8 *)(psVar1 + 0x10) = 0; *(int8 *)(psVar1 + 0x18) = 0; psVar1[0x20] = (string)0x0; goto LAB_0014c354; } psVar1 = (string *)operator_new(uVar2); *(int8 *)psVar1 = 0; *(int8 *)(psVar1 + 8) = 0; *(int8 *)(psVar1 + 0x10) = 0; LAB_0014c354: *(string **)this = psVar1; return; }
55,336
maria_rtree_insert_req
eloqsql/storage/maria/ma_rt_index.c
static int maria_rtree_insert_req(MARIA_HA *info, MARIA_KEY *key, my_off_t page_pos, my_off_t *new_page, int ins_level, int level) { uint nod_flag; uint key_length= key->data_length; int res; my_bool buff_alloced; uchar *page_buf, *k; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_PAGE page; DBUG_ENTER("maria_rtree_insert_req"); alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced, keyinfo->block_length + keyinfo->max_store_length); if (!page_buf) { my_errno= HA_ERR_OUT_OF_MEM; DBUG_RETURN(-1); /* purecov: inspected */ } if (_ma_fetch_keypage(&page, info, keyinfo, page_pos, PAGECACHE_LOCK_WRITE, DFLT_INIT_HITS, page_buf, 0)) goto err; nod_flag= page.node; DBUG_PRINT("rtree", ("page: %lu level: %d ins_level: %d nod_flag: %u", (ulong) page.pos, level, ins_level, nod_flag)); if ((ins_level == -1 && nod_flag) || /* key: go down to leaf */ (ins_level > -1 && ins_level > level)) /* branch: go down to ins_level */ { if (!(k= (uchar *)maria_rtree_pick_key(key, &page))) goto err; /* k is now a pointer inside the page_buf buffer */ switch ((res= maria_rtree_insert_req(info, key, _ma_kpos(nod_flag, k), new_page, ins_level, level + 1))) { case 0: /* child was not split, most common case */ { maria_rtree_combine_rect(keyinfo->seg, k, key->data, k, key_length); if (share->now_transactional && _ma_log_change(&page, k, key_length, KEY_OP_DEBUG_RTREE_COMBINE)) goto err; page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; goto ok; } case 1: /* child was split */ { /* Set new_key to point to a free buffer area */ uchar *new_key_buff= page_buf + keyinfo->block_length + nod_flag; MARIA_KEY new_key; MARIA_KEY k_key; DBUG_ASSERT(nod_flag); k_key.keyinfo= new_key.keyinfo= keyinfo; new_key.data= new_key_buff; k_key.data= k; k_key.data_length= new_key.data_length= key->data_length; k_key.ref_length= new_key.ref_length= key->ref_length; k_key.flag= new_key.flag= 0; /* Safety */ /* set proper MBR for key */ if (maria_rtree_set_key_mbr(info, &k_key, _ma_kpos(nod_flag, k))) goto err; if (share->now_transactional && _ma_log_change(&page, k, key_length, KEY_OP_DEBUG_RTREE_SPLIT)) goto err; /* add new key for new page */ _ma_kpointer(info, new_key_buff - nod_flag, *new_page); if (maria_rtree_set_key_mbr(info, &new_key, *new_page)) goto err; res= maria_rtree_add_key(&new_key, &page, new_page); page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; goto ok; } default: case -1: /* error */ { goto err; } } } else { res= maria_rtree_add_key(key, &page, new_page); page_mark_changed(info, &page); if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED, DFLT_INIT_HITS)) goto err; } ok: stack_alloc_free(page_buf, buff_alloced); DBUG_RETURN(res); err: res= -1; /* purecov: inspected */ goto ok; /* purecov: inspected */ }
O3
c
maria_rtree_insert_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movl %r9d, -0x44(%rbp) movl %r8d, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq %rdx, %rbx movq %rsi, %r13 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x10(%rsi), %eax movl %eax, -0x38(%rbp) movq (%rdi), %rax movq %rax, -0x70(%rbp) movq 0x8(%rsi), %rcx movzwl 0xa6(%rcx), %eax movq %rcx, -0x58(%rbp) movzwl 0xb0(%rcx), %esi addq %rax, %rsi leaq -0xd8(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rdi), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x6cb42 cmpq $0x10000, %rax # imm = 0x10000 ja 0x6cb2e cmpl $0x1000, %esi # imm = 0x1000 jb 0x6cb42 cmpq $0x8001, %rax # imm = 0x8001 jb 0x6cb42 movq %rsp, %r14 addl $0xf, %esi andl $-0x10, %esi subq %rsi, %r14 movq %r14, %rsp movb $0x1, %r15b jmp 0x6cb5d xorl %r15d, %r15d movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xa0c8d testq %rax, %rax je 0x6cd7b movq %rax, %r14 leaq -0xd8(%rbp), %rdi movq %r12, %rsi movq -0x58(%rbp), %rdx movq %rbx, %rcx movl $0x4, %r8d movl $0x3, %r9d pushq $0x0 pushq %r14 callq 0x59dda addq $0x10, %rsp testb %al, %al jne 0x6cde1 movq %r12, -0x40(%rbp) movl %r15d, -0x34(%rbp) movl -0xb0(%rbp), %eax movl -0x48(%rbp), %esi cmpl $-0x1, %esi sete %cl testl %eax, %eax setne %dl testb %dl, %cl jne 0x6cbc2 testl %esi, %esi sets %cl cmpl -0x44(%rbp), %esi setle %dl orb %cl, %dl jne 0x6cd97 movq %r14, -0x68(%rbp) movl %eax, %edx movq -0xd8(%rbp), %rax movq -0xc8(%rbp), %rcx movq (%rax), %rax movq %rax, %r12 movl 0x744(%rax), %r15d movq %rdx, -0x60(%rbp) addq %rcx, %r15 addq %rdx, %r15 movl -0xb8(%rbp), %r14d addq %rcx, %r14 cmpq %r14, %r15 jae 0x6cd8d movl 0x10(%r13), %ecx movsd 0x7569c(%rip), %xmm2 # 0xe22a8 xorl %ebx, %ebx movsd %xmm2, -0xa0(%rbp) movq (%r13), %rdx movq 0x8(%r13), %rax movq 0xc0(%rax), %rdi addl 0x14(%r13), %ecx movq %r15, %rsi leaq -0x90(%rbp), %r8 callq 0x6f855 ucomisd 0x75670(%rip), %xmm0 # 0xe22b0 jne 0x6cc48 jnp 0x6cd8d movsd -0x90(%rbp), %xmm1 testq %rbx, %rbx movsd -0xa0(%rbp), %xmm2 je 0x6cc79 ucomisd %xmm0, %xmm2 ja 0x6cc79 ucomisd %xmm2, %xmm0 jne 0x6cc88 jp 0x6cc88 movsd -0x98(%rbp), %xmm3 ucomisd %xmm1, %xmm3 jbe 0x6cc88 movapd %xmm0, %xmm2 movsd %xmm1, -0x98(%rbp) movq %r15, %rbx movl -0xb0(%rbp), %eax testl %eax, %eax jne 0x6cc9a movl 0x3e0(%r12), %eax movl 0x10(%r13), %ecx addq %rcx, %r15 movl %eax, %eax addq %rax, %r15 cmpq %r14, %r15 jb 0x6cc0e testq %rbx, %rbx movq -0x68(%rbp), %r14 movl -0x34(%rbp), %r15d movq -0x40(%rbp), %r12 je 0x6cde1 movq -0x60(%rbp), %rdi movq %rbx, %rsi callq 0x57deb movl -0x44(%rbp), %r9d incl %r9d movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx movq -0x50(%rbp), %rcx movl -0x48(%rbp), %r8d callq 0x6caa1 cmpl $0x1, %eax je 0x6ce17 testl %eax, %eax movq -0x40(%rbp), %r12 jne 0x6cde1 movq -0x58(%rbp), %rax movq 0xc0(%rax), %rdi movq (%r13), %rdx movq %rbx, %rsi movq %rbx, %rcx movl -0x38(%rbp), %r8d callq 0x6ee55 movq -0x70(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x6cd49 leaq -0xd8(%rbp), %rdi movq %rbx, %rsi movl -0x38(%rbp), %edx xorl %ecx, %ecx callq 0x67faa testb %al, %al jne 0x6cde1 movq 0x2e8(%r12), %rax leaq -0xd8(%rbp), %rdi movl 0x30(%rdi), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movl $0x2, %esi movl $0x3, %edx callq 0x59f19 testb %al, %al jne 0x6cde1 xorl %ebx, %ebx jmp 0x6cde6 callq 0xa29fe movl $0x80, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x6cdf3 movq -0x68(%rbp), %r14 movl -0x34(%rbp), %r15d jmp 0x6cde1 leaq -0xd8(%rbp), %r15 movq %r13, %rdi movq %r15, %rsi movq -0x50(%rbp), %rdx callq 0x6dd08 movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x2e8(%rax), %rax movl 0x30(%r15), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq %r15, %rdi movl $0x2, %esi movl $0x3, %edx callq 0x59f19 testb %al, %al movl -0x34(%rbp), %r15d je 0x6cde6 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb %r15b, %r15b jne 0x6cdf3 movq %r14, %rdi callq 0xa0eba movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6cf3d movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x58(%rbp), %rcx movzwl 0xa6(%rcx), %r12d addq %r14, %r12 movq -0x60(%rbp), %rdi movq %rdi, %rax addq %r12, %rax movq %rcx, -0x88(%rbp) leaq -0xf8(%rbp), %r15 movq %rcx, 0x8(%r15) movq %rax, -0x90(%rbp) movq %rbx, (%r15) movl 0x10(%r13), %eax movl %eax, -0x80(%rbp) movl %eax, 0x10(%r15) movl 0x14(%r13), %eax movl %eax, -0x7c(%rbp) movl %eax, 0x14(%r15) xorl %eax, %eax movl %eax, -0x78(%rbp) movl %eax, 0x18(%r15) movq %rbx, %rsi callq 0x57deb movq -0x40(%rbp), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x6dea7 testl %eax, %eax jne 0x6cd91 movq -0x70(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x6ceb6 leaq -0xd8(%rbp), %rdi movq %rbx, %rsi movl -0x38(%rbp), %edx movl $0x1, %ecx callq 0x67faa testb %al, %al jne 0x6cd91 movq -0x50(%rbp), %r15 movq (%r15), %rdx movq -0x40(%rbp), %rbx movq %rbx, %rdi movq %r12, %rsi callq 0x57e99 movq (%r15), %rdx leaq -0x90(%rbp), %rsi movq %rbx, %rdi callq 0x6dea7 testl %eax, %eax jne 0x6cd91 leaq -0x90(%rbp), %rdi leaq -0xd8(%rbp), %r15 movq %r15, %rsi movq -0x50(%rbp), %rdx callq 0x6dd08 movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x2e8(%rax), %rax movl 0x30(%r15), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq %r15, %rdi movl $0x2, %esi movl $0x3, %edx callq 0x59f19 testb %al, %al jne 0x6cd91 movl -0x34(%rbp), %r15d jmp 0x6cde6 callq 0x29270
maria_rtree_insert_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov [rbp+var_44], r9d mov [rbp+var_48], r8d mov [rbp+var_50], rcx mov rbx, rdx mov r13, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rsi+10h] mov [rbp+var_38], eax mov rax, [rdi] mov [rbp+var_70], rax mov rcx, [rsi+8] movzx eax, word ptr [rcx+0A6h] mov [rbp+var_58], rcx movzx esi, word ptr [rcx+0B0h] add rsi, rax lea rcx, [rbp+var_D8] mov [rcx], rsi mov rax, [rdi+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_6CB42 cmp rax, offset stru_10000 ja short loc_6CB2E cmp esi, 1000h jb short loc_6CB42 cmp rax, 8001h jb short loc_6CB42 loc_6CB2E: mov r14, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub r14, rsi mov rsp, r14 mov r15b, 1 jmp short loc_6CB5D loc_6CB42: xor r15d, r15d mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz loc_6CD7B mov r14, rax loc_6CB5D: lea rdi, [rbp+var_D8] mov rsi, r12 mov rdx, [rbp+var_58] mov rcx, rbx mov r8d, 4 mov r9d, 3 push 0 push r14 call _ma_fetch_keypage add rsp, 10h test al, al jnz loc_6CDE1 mov [rbp+var_40], r12 mov [rbp+var_34], r15d mov eax, [rbp+var_B0] mov esi, [rbp+var_48] cmp esi, 0FFFFFFFFh setz cl test eax, eax setnz dl test cl, dl jnz short loc_6CBC2 test esi, esi sets cl cmp esi, [rbp+var_44] setle dl or dl, cl jnz loc_6CD97 loc_6CBC2: mov [rbp+var_68], r14 mov edx, eax mov rax, [rbp+var_D8] mov rcx, [rbp+var_C8] mov rax, [rax] mov r12, rax mov r15d, [rax+744h] mov [rbp+var_60], rdx add r15, rcx add r15, rdx mov r14d, [rbp+var_B8] add r14, rcx cmp r15, r14 jnb loc_6CD8D mov ecx, [r13+10h] movsd xmm2, cs:qword_E22A8 xor ebx, ebx loc_6CC0E: movsd [rbp+var_A0], xmm2 mov rdx, [r13+0] mov rax, [r13+8] mov rdi, [rax+0C0h] add ecx, [r13+14h] mov rsi, r15 lea r8, [rbp+var_90] call maria_rtree_area_increase ucomisd xmm0, cs:qword_E22B0 jnz short loc_6CC48 jnp loc_6CD8D loc_6CC48: movsd xmm1, [rbp+var_90] test rbx, rbx movsd xmm2, [rbp+var_A0] jz short loc_6CC79 ucomisd xmm2, xmm0 ja short loc_6CC79 ucomisd xmm0, xmm2 jnz short loc_6CC88 jp short loc_6CC88 movsd xmm3, [rbp+var_98] ucomisd xmm3, xmm1 jbe short loc_6CC88 loc_6CC79: movapd xmm2, xmm0 movsd [rbp+var_98], xmm1 mov rbx, r15 loc_6CC88: mov eax, [rbp+var_B0] test eax, eax jnz short loc_6CC9A mov eax, [r12+3E0h] loc_6CC9A: mov ecx, [r13+10h] add r15, rcx mov eax, eax add r15, rax cmp r15, r14 jb loc_6CC0E test rbx, rbx mov r14, [rbp+var_68] mov r15d, [rbp+var_34] mov r12, [rbp+var_40] jz loc_6CDE1 mov rdi, [rbp+var_60] mov rsi, rbx call _ma_kpos mov r9d, [rbp+var_44] inc r9d mov rdi, r12 mov rsi, r13 mov rdx, rax mov rcx, [rbp+var_50] mov r8d, [rbp+var_48] call maria_rtree_insert_req cmp eax, 1 jz loc_6CE17 test eax, eax mov r12, [rbp+var_40] jnz loc_6CDE1 mov rax, [rbp+var_58] mov rdi, [rax+0C0h] mov rdx, [r13+0] mov rsi, rbx mov rcx, rbx mov r8d, [rbp+var_38] call maria_rtree_combine_rect mov rax, [rbp+var_70] cmp byte ptr [rax+7E7h], 0 jz short loc_6CD49 lea rdi, [rbp+var_D8] mov rsi, rbx mov edx, [rbp+var_38] xor ecx, ecx call _ma_log_change test al, al jnz loc_6CDE1 loc_6CD49: mov rax, [r12+2E8h] lea rdi, [rbp+var_D8] mov ecx, [rdi+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al jnz short loc_6CDE1 xor ebx, ebx jmp short loc_6CDE6 loc_6CD7B: call _my_thread_var mov dword ptr [rax], 80h mov ebx, 0FFFFFFFFh jmp short loc_6CDF3 loc_6CD8D: mov r14, [rbp+var_68] loc_6CD91: mov r15d, [rbp+var_34] jmp short loc_6CDE1 loc_6CD97: lea r15, [rbp+var_D8] mov rdi, r13 mov rsi, r15 mov rdx, [rbp+var_50] call maria_rtree_add_key mov ebx, eax mov rax, [rbp+var_40] mov rax, [rax+2E8h] mov ecx, [r15+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rdi, r15 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al mov r15d, [rbp+var_34] jz short loc_6CDE6 loc_6CDE1: mov ebx, 0FFFFFFFFh loc_6CDE6: test r15b, r15b jnz short loc_6CDF3 mov rdi, r14 call my_free loc_6CDF3: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_6CF3D mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6CE17: mov rcx, [rbp+var_58] movzx r12d, word ptr [rcx+0A6h] add r12, r14 mov rdi, [rbp+var_60] mov rax, rdi add rax, r12 mov [rbp+var_88], rcx lea r15, [rbp+var_F8] mov [r15+8], rcx mov [rbp+var_90], rax mov [r15], rbx mov eax, [r13+10h] mov [rbp+var_80], eax mov [r15+10h], eax mov eax, [r13+14h] mov [rbp+var_7C], eax mov [r15+14h], eax xor eax, eax mov [rbp+var_78], eax mov [r15+18h], eax mov rsi, rbx call _ma_kpos mov rdi, [rbp+var_40] mov rsi, r15 mov rdx, rax call maria_rtree_set_key_mbr test eax, eax jnz loc_6CD91 mov rax, [rbp+var_70] cmp byte ptr [rax+7E7h], 0 jz short loc_6CEB6 lea rdi, [rbp+var_D8] mov rsi, rbx mov edx, [rbp+var_38] mov ecx, 1 call _ma_log_change test al, al jnz loc_6CD91 loc_6CEB6: mov r15, [rbp+var_50] mov rdx, [r15] mov rbx, [rbp+var_40] mov rdi, rbx mov rsi, r12 call _ma_kpointer mov rdx, [r15] lea rsi, [rbp+var_90] mov rdi, rbx call maria_rtree_set_key_mbr test eax, eax jnz loc_6CD91 lea rdi, [rbp+var_90] lea r15, [rbp+var_D8] mov rsi, r15 mov rdx, [rbp+var_50] call maria_rtree_add_key mov ebx, eax mov rax, [rbp+var_40] mov rax, [rax+2E8h] mov ecx, [r15+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rdi, r15 mov esi, 2 mov edx, 3 call _ma_write_keypage test al, al jnz loc_6CD91 mov r15d, [rbp+var_34] jmp loc_6CDE6 loc_6CF3D: call ___stack_chk_fail
long long maria_rtree_insert_req( long long a1, _QWORD *a2, unsigned long long a3, unsigned long long *a4, int a5, int a6) { int v6; // r15d long long v9; // rcx long long v10; // rax long long *v11; // rsi unsigned long long v12; // rax bool v13; // cc unsigned long long v14; // rax char *v15; // r14 long long v16; // rax long long v17; // r12 long long v18; // r15 unsigned long long v19; // r15 unsigned long long v20; // r14 long long v21; // rcx double v22; // xmm2_8 long long v23; // rbx double v24; // xmm0_8 double v25; // xmm1_8 unsigned int v26; // eax long long v27; // r12 long long v28; // rax int inserted; // eax long long v30; // r12 unsigned int v31; // ebx char v32; // al long long v34; // r12 long long v35; // rax unsigned long long *v36; // r15 long long v37; // rbx _QWORD v39[2]; // [rsp+8h] [rbp-F8h] BYREF int v40; // [rsp+18h] [rbp-E8h] int v41; // [rsp+1Ch] [rbp-E4h] int v42; // [rsp+20h] [rbp-E0h] long long *v43[2]; // [rsp+28h] [rbp-D8h] BYREF long long v44; // [rsp+38h] [rbp-C8h] unsigned int v45; // [rsp+48h] [rbp-B8h] unsigned int v46; // [rsp+50h] [rbp-B0h] unsigned int v47; // [rsp+58h] [rbp-A8h] double v48; // [rsp+60h] [rbp-A0h] double v49; // [rsp+68h] [rbp-98h] double v50[2]; // [rsp+70h] [rbp-90h] BYREF int v51; // [rsp+80h] [rbp-80h] int v52; // [rsp+84h] [rbp-7Ch] int v53; // [rsp+88h] [rbp-78h] long long v54; // [rsp+90h] [rbp-70h] char *v55; // [rsp+98h] [rbp-68h] long long v56; // [rsp+A0h] [rbp-60h] long long v57; // [rsp+A8h] [rbp-58h] unsigned long long *v58; // [rsp+B0h] [rbp-50h] int v59; // [rsp+B8h] [rbp-48h] int v60; // [rsp+BCh] [rbp-44h] long long v61; // [rsp+C0h] [rbp-40h] unsigned int v62; // [rsp+C8h] [rbp-38h] int v63; // [rsp+CCh] [rbp-34h] unsigned long long v64; // [rsp+D0h] [rbp-30h] v60 = a6; v59 = a5; v58 = a4; v64 = __readfsqword(0x28u); v62 = *((_DWORD *)a2 + 4); v54 = *(_QWORD *)a1; v9 = a2[1]; v10 = *(unsigned __int16 *)(v9 + 166); v57 = v9; v11 = (long long *)(v10 + *(unsigned __int16 *)(v9 + 176)); v43[0] = v11; v12 = **(_QWORD **)(a1 + 120) - (_QWORD)v43; v13 = v12 <= (unsigned long long)v11; v14 = v12 - (_QWORD)v11; if ( v13 || v14 <= (unsigned long long)&stru_10000 && ((unsigned int)v11 < 0x1000 || v14 < 0x8001) ) { v6 = 0; v16 = my_malloc(0LL, v11, 65552LL); if ( !v16 ) { *(_DWORD *)my_thread_var(0LL, (const char *)v11) = 128; return (unsigned int)-1; } v15 = (char *)v16; } else { v15 = (char *)&v39[-1] - (((_DWORD)v11 + 15) & 0xFFFFFFF0); LOBYTE(v6) = 1; } if ( !ma_fetch_keypage((long long)v43, a1, v57, a3, 4u, 3, (long long)v15) ) { v61 = a1; v63 = v6; if ( (v46 == 0 || v59 != -1) && (v59 < 0 || v59 <= v60) ) { v31 = maria_rtree_add_key(a2, v43, v58); *(_BYTE *)(*(_QWORD *)(v61 + 744) + 24LL * v47 + 16) = 1; v32 = ma_write_keypage(v43, 2u, 3); LOBYTE(v6) = v63; if ( !v32 ) goto LABEL_34; } else { v55 = v15; v17 = *v43[0]; v18 = *(unsigned int *)(*v43[0] + 1860); v56 = v46; v19 = v46 + v44 + v18; v20 = v44 + v45; if ( v19 < v20 ) { LODWORD(v21) = *((_DWORD *)a2 + 4); v22 = 1.797693134862316e308; v23 = 0LL; while ( 1 ) { v48 = v22; v24 = maria_rtree_area_increase( *(_QWORD *)(a2[1] + 192LL), v19, *a2, (unsigned int)(*((_DWORD *)a2 + 5) + v21), v50); if ( v24 == -1.0 ) break; v25 = v50[0]; v22 = v48; if ( !v23 || v48 > v24 || v24 == v48 && v49 > v50[0] ) { v22 = v24; v49 = v50[0]; v23 = v19; } v26 = v46; if ( !v46 ) v26 = *(_DWORD *)(v17 + 992); v21 = *((unsigned int *)a2 + 4); v19 += v26 + v21; if ( v19 >= v20 ) { v15 = v55; LOBYTE(v6) = v63; v27 = v61; if ( !v23 ) goto LABEL_33; v28 = ma_kpos(v56, v23); inserted = maria_rtree_insert_req(v27, a2, v28, v58, (unsigned int)v59, (unsigned int)(v60 + 1)); if ( inserted != 1 ) { v30 = v61; if ( !inserted ) { maria_rtree_combine_rect(*(_QWORD *)(v57 + 192), v23, *a2, v23, v62, v24, v25, v22); if ( !*(_BYTE *)(v54 + 2023) || !ma_log_change((long long)v43, v23, v62) ) { *(_BYTE *)(*(_QWORD *)(v30 + 744) + 24LL * v47 + 16) = 1; if ( !(unsigned __int8)ma_write_keypage(v43, 2u, 3) ) { v31 = 0; goto LABEL_34; } } } goto LABEL_33; } v34 = (long long)&v15[*(unsigned __int16 *)(v57 + 166)]; *(_QWORD *)&v50[1] = v57; v39[1] = v57; *(_QWORD *)&v50[0] = v34 + v56; v39[0] = v23; v51 = *((_DWORD *)a2 + 4); v40 = v51; v52 = *((_DWORD *)a2 + 5); v41 = v52; v53 = 0; v42 = 0; v35 = ma_kpos(v56, v23); if ( !(unsigned int)maria_rtree_set_key_mbr(v61, v39, v35) && (!*(_BYTE *)(v54 + 2023) || !ma_log_change((long long)v43, v23, v62)) ) { v36 = v58; v37 = v61; ma_kpointer(v61, v34, *v58); if ( !(unsigned int)maria_rtree_set_key_mbr(v37, v50, *v36) ) { v31 = maria_rtree_add_key(v50, v43, v58); *(_BYTE *)(*(_QWORD *)(v61 + 744) + 24LL * v47 + 16) = 1; if ( !(unsigned __int8)ma_write_keypage(v43, 2u, 3) ) { LOBYTE(v6) = v63; goto LABEL_34; } } } goto LABEL_31; } } } v15 = v55; LABEL_31: LOBYTE(v6) = v63; } } LABEL_33: v31 = -1; LABEL_34: if ( !(_BYTE)v6 ) my_free(v15); return v31; }
maria_rtree_insert_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV dword ptr [RBP + -0x44],R9D MOV dword ptr [RBP + -0x48],R8D MOV qword ptr [RBP + -0x50],RCX MOV RBX,RDX MOV R13,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RDI] MOV qword ptr [RBP + -0x70],RAX MOV RCX,qword ptr [RSI + 0x8] MOVZX EAX,word ptr [RCX + 0xa6] MOV qword ptr [RBP + -0x58],RCX MOVZX ESI,word ptr [RCX + 0xb0] ADD RSI,RAX LEA RCX,[RBP + -0xd8] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x0016cb42 CMP RAX,0x10000 JA 0x0016cb2e CMP ESI,0x1000 JC 0x0016cb42 CMP RAX,0x8001 JC 0x0016cb42 LAB_0016cb2e: MOV R14,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB R14,RSI MOV RSP,R14 MOV R15B,0x1 JMP 0x0016cb5d LAB_0016cb42: XOR R15D,R15D MOV EDX,0x10010 XOR EDI,EDI CALL 0x001a0c8d TEST RAX,RAX JZ 0x0016cd7b MOV R14,RAX LAB_0016cb5d: LEA RDI,[RBP + -0xd8] MOV RSI,R12 MOV RDX,qword ptr [RBP + -0x58] MOV RCX,RBX MOV R8D,0x4 MOV R9D,0x3 PUSH 0x0 PUSH R14 CALL 0x00159dda ADD RSP,0x10 TEST AL,AL JNZ 0x0016cde1 MOV qword ptr [RBP + -0x40],R12 MOV dword ptr [RBP + -0x34],R15D MOV EAX,dword ptr [RBP + -0xb0] MOV ESI,dword ptr [RBP + -0x48] CMP ESI,-0x1 SETZ CL TEST EAX,EAX SETNZ DL TEST CL,DL JNZ 0x0016cbc2 TEST ESI,ESI SETS CL CMP ESI,dword ptr [RBP + -0x44] SETLE DL OR DL,CL JNZ 0x0016cd97 LAB_0016cbc2: MOV qword ptr [RBP + -0x68],R14 MOV EDX,EAX MOV RAX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV R12,RAX MOV R15D,dword ptr [RAX + 0x744] MOV qword ptr [RBP + -0x60],RDX ADD R15,RCX ADD R15,RDX MOV R14D,dword ptr [RBP + -0xb8] ADD R14,RCX CMP R15,R14 JNC 0x0016cd8d MOV ECX,dword ptr [R13 + 0x10] MOVSD XMM2,qword ptr [0x001e22a8] XOR EBX,EBX LAB_0016cc0e: MOVSD qword ptr [RBP + -0xa0],XMM2 MOV RDX,qword ptr [R13] MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + 0xc0] ADD ECX,dword ptr [R13 + 0x14] MOV RSI,R15 LEA R8,[RBP + -0x90] CALL 0x0016f855 UCOMISD XMM0,qword ptr [0x001e22b0] JNZ 0x0016cc48 JNP 0x0016cd8d LAB_0016cc48: MOVSD XMM1,qword ptr [RBP + -0x90] TEST RBX,RBX MOVSD XMM2,qword ptr [RBP + -0xa0] JZ 0x0016cc79 UCOMISD XMM2,XMM0 JA 0x0016cc79 UCOMISD XMM0,XMM2 JNZ 0x0016cc88 JP 0x0016cc88 MOVSD XMM3,qword ptr [RBP + -0x98] UCOMISD XMM3,XMM1 JBE 0x0016cc88 LAB_0016cc79: MOVAPD XMM2,XMM0 MOVSD qword ptr [RBP + -0x98],XMM1 MOV RBX,R15 LAB_0016cc88: MOV EAX,dword ptr [RBP + -0xb0] TEST EAX,EAX JNZ 0x0016cc9a MOV EAX,dword ptr [R12 + 0x3e0] LAB_0016cc9a: MOV ECX,dword ptr [R13 + 0x10] ADD R15,RCX MOV EAX,EAX ADD R15,RAX CMP R15,R14 JC 0x0016cc0e TEST RBX,RBX MOV R14,qword ptr [RBP + -0x68] MOV R15D,dword ptr [RBP + -0x34] MOV R12,qword ptr [RBP + -0x40] JZ 0x0016cde1 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,RBX CALL 0x00157deb MOV R9D,dword ptr [RBP + -0x44] INC R9D MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX MOV RCX,qword ptr [RBP + -0x50] MOV R8D,dword ptr [RBP + -0x48] CALL 0x0016caa1 CMP EAX,0x1 JZ 0x0016ce17 TEST EAX,EAX MOV R12,qword ptr [RBP + -0x40] JNZ 0x0016cde1 MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RAX + 0xc0] MOV RDX,qword ptr [R13] MOV RSI,RBX MOV RCX,RBX MOV R8D,dword ptr [RBP + -0x38] CALL 0x0016ee55 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0016cd49 LEA RDI,[RBP + -0xd8] MOV RSI,RBX MOV EDX,dword ptr [RBP + -0x38] XOR ECX,ECX CALL 0x00167faa TEST AL,AL JNZ 0x0016cde1 LAB_0016cd49: MOV RAX,qword ptr [R12 + 0x2e8] LEA RDI,[RBP + -0xd8] MOV ECX,dword ptr [RDI + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV ESI,0x2 MOV EDX,0x3 CALL 0x00159f19 TEST AL,AL JNZ 0x0016cde1 XOR EBX,EBX JMP 0x0016cde6 LAB_0016cd7b: CALL 0x001a29fe MOV dword ptr [RAX],0x80 MOV EBX,0xffffffff JMP 0x0016cdf3 LAB_0016cd8d: MOV R14,qword ptr [RBP + -0x68] LAB_0016cd91: MOV R15D,dword ptr [RBP + -0x34] JMP 0x0016cde1 LAB_0016cd97: LEA R15,[RBP + -0xd8] MOV RDI,R13 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x50] CALL 0x0016dd08 MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x2e8] MOV ECX,dword ptr [R15 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RDI,R15 MOV ESI,0x2 MOV EDX,0x3 CALL 0x00159f19 TEST AL,AL MOV R15D,dword ptr [RBP + -0x34] JZ 0x0016cde6 LAB_0016cde1: MOV EBX,0xffffffff LAB_0016cde6: TEST R15B,R15B JNZ 0x0016cdf3 MOV RDI,R14 CALL 0x001a0eba LAB_0016cdf3: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016cf3d MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016ce17: MOV RCX,qword ptr [RBP + -0x58] MOVZX R12D,word ptr [RCX + 0xa6] ADD R12,R14 MOV RDI,qword ptr [RBP + -0x60] MOV RAX,RDI ADD RAX,R12 MOV qword ptr [RBP + -0x88],RCX LEA R15,[RBP + -0xf8] MOV qword ptr [R15 + 0x8],RCX MOV qword ptr [RBP + -0x90],RAX MOV qword ptr [R15],RBX MOV EAX,dword ptr [R13 + 0x10] MOV dword ptr [RBP + -0x80],EAX MOV dword ptr [R15 + 0x10],EAX MOV EAX,dword ptr [R13 + 0x14] MOV dword ptr [RBP + -0x7c],EAX MOV dword ptr [R15 + 0x14],EAX XOR EAX,EAX MOV dword ptr [RBP + -0x78],EAX MOV dword ptr [R15 + 0x18],EAX MOV RSI,RBX CALL 0x00157deb MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R15 MOV RDX,RAX CALL 0x0016dea7 TEST EAX,EAX JNZ 0x0016cd91 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0016ceb6 LEA RDI,[RBP + -0xd8] MOV RSI,RBX MOV EDX,dword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x00167faa TEST AL,AL JNZ 0x0016cd91 LAB_0016ceb6: MOV R15,qword ptr [RBP + -0x50] MOV RDX,qword ptr [R15] MOV RBX,qword ptr [RBP + -0x40] MOV RDI,RBX MOV RSI,R12 CALL 0x00157e99 MOV RDX,qword ptr [R15] LEA RSI,[RBP + -0x90] MOV RDI,RBX CALL 0x0016dea7 TEST EAX,EAX JNZ 0x0016cd91 LEA RDI,[RBP + -0x90] LEA R15,[RBP + -0xd8] MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x50] CALL 0x0016dd08 MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x2e8] MOV ECX,dword ptr [R15 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RDI,R15 MOV ESI,0x2 MOV EDX,0x3 CALL 0x00159f19 TEST AL,AL JNZ 0x0016cd91 MOV R15D,dword ptr [RBP + -0x34] JMP 0x0016cde6 LAB_0016cf3d: CALL 0x00129270
int4 maria_rtree_insert_req (long *param_1,int8 *param_2,int8 param_3,int8 *param_4,int param_5, int param_6) { ushort uVar1; long lVar2; int8 uVar3; ulong uVar4; int8 *puVar5; long *plVar6; int1 *puVar7; char cVar8; char cVar9; uint uVar10; int iVar11; int4 uVar12; ulong uVar13; int1 *puVar14; int8 uVar15; int4 *puVar16; ulong uVar17; ulong uVar18; int1 *puVar19; int iVar20; int8 unaff_R15; long in_FS_OFFSET; double dVar21; double dVar22; int1 auStack_108 [8]; ulong local_100; long local_f8; int4 local_f0; int4 local_ec; int4 local_e8; long *local_e0 [2]; long local_d0; uint local_c0; uint local_b8; uint local_b0; double local_a8; int1 *local_a0; int1 *local_98; long local_90; int4 local_88; int4 local_84; int4 local_80; long local_78; int1 *local_70; ulong local_68; long local_60; int8 *local_58; int local_50; int local_4c; long *local_48; int4 local_40; uint local_3c; long local_38; puVar19 = auStack_108; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *(int4 *)(param_2 + 2); local_78 = *param_1; local_60 = param_2[1]; local_e0[0] = (long *)((ulong)*(ushort *)(local_60 + 0xb0) + (ulong)*(ushort *)(local_60 + 0xa6)); uVar13 = (*(long *)param_1[0xf] - (long)local_e0) - (long)local_e0[0]; local_58 = param_4; local_50 = param_5; local_4c = param_6; if ((local_e0[0] < (long *)(*(long *)param_1[0xf] - (long)local_e0)) && ((0x10000 < uVar13 || ((0xfff < (uint)local_e0[0] && (0x8000 < uVar13)))))) { puVar14 = auStack_108 + -(ulong)((uint)local_e0[0] + 0xf & 0xfffffff0); uVar13 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); puVar7 = puVar14; } else { uVar13 = 0; puVar14 = (int1 *)my_malloc(0,local_e0[0],0x10010); puVar7 = auStack_108; if (puVar14 == (int1 *)0x0) { puVar16 = (int4 *)_my_thread_var(); *puVar16 = 0x80; uVar12 = 0xffffffff; goto LAB_0016cdf3; } } puVar19 = puVar7; lVar2 = local_60; *(int8 *)(puVar19 + -8) = 0; *(int1 **)(puVar19 + -0x10) = puVar14; *(int8 *)(puVar19 + -0x18) = 0x16cb83; cVar8 = _ma_fetch_keypage(local_e0,param_1,lVar2,param_3,4,3); puVar5 = local_58; if (cVar8 == '\0') { local_3c = (uint)uVar13; local_48 = param_1; if ((local_50 == -1 && local_b8 != 0) || (local_4c < local_50 && -1 < local_50)) { local_68 = (ulong)local_b8; lVar2 = *local_e0[0]; uVar13 = (ulong)*(uint *)(lVar2 + 0x744) + local_d0 + local_68; local_70 = puVar14; if ((ulong)local_c0 + local_d0 <= uVar13) goto LAB_0016cd91; uVar17 = (ulong)*(uint *)(param_2 + 2); uVar18 = 0; dVar22 = DAT_001e22a8; do { uVar15 = *param_2; uVar3 = *(int8 *)(param_2[1] + 0xc0); iVar11 = *(int *)((long)param_2 + 0x14); local_a8 = dVar22; *(int8 *)(puVar19 + -8) = 0x16cc38; dVar21 = (double)maria_rtree_area_increase (uVar3,uVar13,uVar15,(int)uVar17 + iVar11,&local_98); plVar6 = local_48; uVar4 = local_68; puVar14 = local_70; if ((dVar21 == DAT_001e22b0) && (!NAN(dVar21) && !NAN(DAT_001e22b0))) goto LAB_0016cd91; if ((uVar18 == 0) || (dVar21 < local_a8)) { LAB_0016cc79: local_a0 = local_98; uVar18 = uVar13; dVar22 = dVar21; } else { dVar22 = local_a8; if (((dVar21 == local_a8) && (!NAN(dVar21) && !NAN(local_a8))) && ((double)local_98 < (double)local_a0)) goto LAB_0016cc79; } uVar10 = local_b8; if (local_b8 == 0) { uVar10 = *(uint *)(lVar2 + 0x3e0); } uVar17 = (ulong)*(uint *)(param_2 + 2); uVar13 = uVar13 + uVar17 + (ulong)uVar10; } while (uVar13 < (ulong)local_c0 + local_d0); uVar13 = (ulong)local_3c; cVar8 = (char)local_3c; if (uVar18 != 0) { *(int8 *)(puVar19 + -8) = 0x16ccd0; uVar15 = _ma_kpos(uVar4,uVar18); iVar11 = local_50; puVar5 = local_58; iVar20 = local_4c + 1; *(int8 *)(puVar19 + -8) = 0x16cced; iVar11 = maria_rtree_insert_req(plVar6,param_2,uVar15,puVar5,iVar11,iVar20); uVar12 = local_40; plVar6 = local_48; uVar17 = local_68; if (iVar11 == 1) { uVar1 = *(ushort *)(local_60 + 0xa6); local_98 = puVar14 + uVar1 + local_68; local_90 = local_60; local_f8 = local_60; local_f0 = *(int4 *)(param_2 + 2); local_ec = *(int4 *)((long)param_2 + 0x14); local_80 = 0; local_e8 = 0; local_100 = uVar18; local_88 = local_f0; local_84 = local_ec; *(int8 *)(puVar19 + -8) = 0x16ce73; uVar15 = _ma_kpos(uVar17,uVar18); plVar6 = local_48; *(int8 *)(puVar19 + -8) = 0x16ce82; iVar11 = maria_rtree_set_key_mbr(plVar6,&local_100,uVar15); uVar12 = local_40; if (iVar11 == 0) { if (*(char *)(local_78 + 0x7e7) != '\0') { *(int8 *)(puVar19 + -8) = 0x16ceae; cVar8 = _ma_log_change(local_e0,uVar18,uVar12,1); if (cVar8 != '\0') goto LAB_0016cd91; } plVar6 = local_48; puVar5 = local_58; uVar15 = *local_58; *(int8 *)(puVar19 + -8) = 0x16cecc; _ma_kpointer(plVar6,puVar14 + uVar1,uVar15); uVar15 = *puVar5; *(int8 *)(puVar19 + -8) = 0x16cede; iVar11 = maria_rtree_set_key_mbr(plVar6,&local_98,uVar15); puVar5 = local_58; if (iVar11 == 0) { *(int8 *)(puVar19 + -8) = 0x16cf00; uVar12 = maria_rtree_add_key(&local_98,local_e0,puVar5); *(int1 *)(local_48[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x16cf2c; cVar8 = _ma_write_keypage(local_e0,2,3); if (cVar8 == '\0') { cVar8 = (char)local_3c; goto LAB_0016cde6; } } } LAB_0016cd91: uVar13 = (ulong)local_3c; } else if (iVar11 == 0) { uVar15 = *(int8 *)(local_60 + 0xc0); uVar3 = *param_2; *(int8 *)(puVar19 + -8) = 0x16cd20; maria_rtree_combine_rect(uVar15,uVar18,uVar3,uVar18,uVar12); uVar12 = local_40; if (*(char *)(local_78 + 0x7e7) != '\0') { *(int8 *)(puVar19 + -8) = 0x16cd41; cVar9 = _ma_log_change(local_e0,uVar18,uVar12,0); if (cVar9 != '\0') goto LAB_0016cde1; } *(int1 *)(plVar6[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x16cd73; cVar9 = _ma_write_keypage(local_e0,2,3); if (cVar9 == '\0') { uVar12 = 0; goto LAB_0016cde6; } } } goto LAB_0016cde1; } *(int8 *)(puVar19 + -8) = 0x16cdad; uVar12 = maria_rtree_add_key(param_2,local_e0,puVar5); *(int1 *)(local_48[0x5d] + 0x10 + (ulong)local_b0 * 0x18) = 1; *(int8 *)(puVar19 + -8) = 0x16cdd9; cVar9 = _ma_write_keypage(local_e0,2,3); uVar13 = (ulong)local_3c; cVar8 = (char)local_3c; if (cVar9 != '\0') goto LAB_0016cde1; } else { LAB_0016cde1: cVar8 = (char)uVar13; uVar12 = 0xffffffff; } LAB_0016cde6: if (cVar8 == '\0') { *(int8 *)(puVar19 + -8) = 0x16cdf3; my_free(puVar14); } LAB_0016cdf3: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar19 + -8) = maria_rtree_insert; __stack_chk_fail(); } return uVar12; }
55,337
minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O2
cpp
minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %r14 pushq $0xf popq %rsi callq 0x622b6 leaq 0x8a621(%rip), %rax # 0xfce58 addq $0x10, %rax movq %rax, (%r14) andq $0x0, 0x38(%r14) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r14) andq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5minja19FilterTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE: push r14 push rbx push rax mov rbx, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov r14, rdi push 0Fh pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [r14], rax and qword ptr [r14+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r14+30h], xmm0 and qword ptr [rbx], 0 add rsp, 8 pop rbx pop r14 retn
long long * minja::FilterTemplateToken::FilterTemplateToken( long long a1, long long a2, int a3, int a4, __int128 *a5) { long long *result; // rax __int128 v7; // xmm0 minja::TemplateToken::TemplateToken(a1, 15, a2, a3, a4); result = &`vtable for'minja::FilterTemplateToken + 2; *(_QWORD *)a1 = &`vtable for'minja::FilterTemplateToken + 2; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a5 = 0LL; return result; }
FilterTemplateToken: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV R14,RDI PUSH 0xf POP RSI CALL 0x001622b6 LEA RAX,[0x1fce58] ADD RAX,0x10 MOV qword ptr [R14],RAX AND qword ptr [R14 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R14 + 0x30],XMM0 AND qword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::FilterTemplateToken::FilterTemplateToken (FilterTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, int8 *param_5) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,0xf,param_1,param_3,param_4); *(int ***)this = &PTR__FilterTemplateToken_001fce68; *(int8 *)(this + 0x38) = 0; uVar1 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar1; *param_5 = 0; return; }
55,338
void fmt::v11::detail::bigint::assign<unsigned __int128, 0>(unsigned __int128)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR void assign(UInt n) { size_t num_bigits = 0; do { bigits_[num_bigits++] = static_cast<bigit>(n); n >>= bigit_bits; } while (n != 0); bigits_.resize(num_bigits); exp_ = 0; }
O1
c
void fmt::v11::detail::bigint::assign<unsigned __int128, 0>(unsigned __int128): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax xorl %r14d, %r14d movl %esi, (%rax,%r14,4) shrdq $0x20, %rdx, %rsi incq %r14 shrq $0x20, %rdx movq %rsi, %rcx orq %rdx, %rcx jne 0x44c7d leaq -0x1(%r14), %rax cmpq %rax, 0x10(%rbx) ja 0x44ca8 movq %rbx, %rdi movq %r14, %rsi callq *0x18(%rbx) movq 0x10(%rbx), %rax cmpq %rax, %r14 cmovbq %r14, %rax movq %rax, 0x8(%rbx) movl $0x0, 0xa8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN3fmt3v116detail6bigint6assignIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_: push r14 push rbx push rax mov rbx, rdi mov rax, [rdi] xor r14d, r14d loc_44C7D: mov [rax+r14*4], esi shrd rsi, rdx, 20h inc r14 shr rdx, 20h mov rcx, rsi or rcx, rdx jnz short loc_44C7D lea rax, [r14-1] cmp [rbx+10h], rax ja short loc_44CA8 mov rdi, rbx mov rsi, r14 call qword ptr [rbx+18h] loc_44CA8: mov rax, [rbx+10h] cmp r14, rax cmovb rax, r14 mov [rbx+8], rax mov dword ptr [rbx+0A8h], 0 add rsp, 8 pop rbx pop r14 retn
unsigned long long ZN3fmt3v116detail6bigint6assignIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_( long long *a1, long long a2, unsigned long long a3) { long long v3; // rax unsigned long long v4; // r14 __int128 v5; // rt0 unsigned long long result; // rax v3 = *a1; v4 = 0LL; do { *(_DWORD *)(v3 + 4 * v4) = a2; *(_QWORD *)&v5 = a2; *((_QWORD *)&v5 + 1) = a3; a2 = v5 >> 32; ++v4; a3 >>= 32; } while ( (unsigned __int128)v5 >> 32 != 0 ); if ( a1[2] <= v4 - 1 ) ((void ( *)(long long *, unsigned long long))a1[3])(a1, v4); result = a1[2]; if ( v4 < result ) result = v4; a1[1] = result; *((_DWORD *)a1 + 42) = 0; return result; }
_ZN3fmt3v116detail6bigint6assignIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] XOR R14D,R14D LAB_00144c7d: MOV dword ptr [RAX + R14*0x4],ESI SHRD RSI,RDX,0x20 INC R14 SHR RDX,0x20 MOV RCX,RSI OR RCX,RDX JNZ 0x00144c7d LEA RAX,[R14 + -0x1] CMP qword ptr [RBX + 0x10],RAX JA 0x00144ca8 MOV RDI,RBX MOV RSI,R14 CALL qword ptr [RBX + 0x18] LAB_00144ca8: MOV RAX,qword ptr [RBX + 0x10] CMP R14,RAX CMOVC RAX,R14 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0xa8],0x0 ADD RSP,0x8 POP RBX POP R14 RET
void _ZN3fmt3v116detail6bigint6assignIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_ (long *param_1,ulong param_2,ulong param_3) { long lVar1; ulong uVar2; ulong uVar3; lVar1 = *param_1; uVar3 = 0; do { uVar2 = uVar3; *(int *)(lVar1 + uVar2 * 4) = (int)param_2; param_2 = param_2 >> 0x20 | param_3 << 0x20; uVar3 = uVar2 + 1; param_3 = param_3 >> 0x20; } while (param_2 != 0 || param_3 != 0); if ((ulong)param_1[2] <= uVar2) { (*(code *)param_1[3])(param_1,uVar3); } uVar2 = param_1[2]; if (uVar3 < (ulong)param_1[2]) { uVar2 = uVar3; } param_1[1] = uVar2; *(int4 *)(param_1 + 0x15) = 0; return; }
55,339
js_std_file_getByte
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_getByte(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewInt32(ctx, fgetc(f)); }
O0
c
js_std_file_getByte: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x127c0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x12650 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x12695 movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe380 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_std_file_getByte: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_12650 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_12695 loc_12650: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _fgetc mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 0 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_12695: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_getByte(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = fgetc(v4); return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_getByte: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001127c0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00112650 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00112695 LAB_00112650: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e380 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00112695: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_getByte(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { local_30 = fgetc(__stream); uStack_2c = uStack_c; local_28 = 0; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
55,340
intx::result_with_carry<intx::uint<256u>> intx::subc<256u>(intx::uint<256u> const&, intx::uint<256u> const&, bool)
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
inline constexpr result_with_carry<uint<N>> subc( const uint<N>& x, const uint<N>& y, bool carry = false) noexcept { uint<N> z; bool k = carry; for (size_t i = 0; i < uint<N>::num_words; ++i) { auto t = subc(x[i], y[i], k); z[i] = t.value; k = t.carry; } return {z, k}; }
O2
cpp
intx::result_with_carry<intx::uint<256u>> intx::subc<256u>(intx::uint<256u> const&, intx::uint<256u> const&, bool): movq %rdi, %rax xorps %xmm0, %xmm0 movaps %xmm0, -0x18(%rsp) xorl %edi, %edi cmpq $0x2, %rdi je 0x3994a movq (%rsi,%rdi,8), %r8 movzbl %cl, %ecx btl $0x0, %ecx sbbq (%rdx,%rdi,8), %r8 setb %cl movq %r8, -0x18(%rsp,%rdi,8) incq %rdi jmp 0x39928 movaps -0x18(%rsp), %xmm0 movups %xmm0, (%rax) andb $0x1, %cl movb %cl, 0x10(%rax) retq
_ZN4intx4subcILj128EEENS_17result_with_carryINS_4uintIXT_EEEEERKS3_S6_b: mov rax, rdi xorps xmm0, xmm0 movaps [rsp+var_18], xmm0 xor edi, edi loc_39928: cmp rdi, 2 jz short loc_3994A mov r8, [rsi+rdi*8] movzx ecx, cl bt ecx, 0 sbb r8, [rdx+rdi*8] setb cl mov qword ptr [rsp+rdi*8+var_18], r8 inc rdi jmp short loc_39928 loc_3994A: movaps xmm0, [rsp+var_18] movups xmmword ptr [rax], xmm0 and cl, 1 mov [rax+10h], cl retn
long long intx::subc<128u>(long long a1, long long a2, long long a3, bool a4) { long long result; // rax long long i; // rdi unsigned long long v6; // r8 bool v7; // cf unsigned long long v8; // r8 __int128 v9; // [rsp+0h] [rbp-18h] result = a1; v9 = 0LL; for ( i = 0LL; i != 2; ++i ) { v6 = *(_QWORD *)(a2 + 8 * i); v7 = v6 < (unsigned long long)a4 + *(_QWORD *)(a3 + 8 * i); v8 = v6 - (a4 + *(_QWORD *)(a3 + 8 * i)); a4 = v7; *((_QWORD *)&v9 + i) = v8; } *(_OWORD *)result = v9; *(_BYTE *)(result + 16) = a4; return result; }
subc<128u>: MOV RAX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + -0x18],XMM0 XOR EDI,EDI LAB_00139928: CMP RDI,0x2 JZ 0x0013994a MOV R8,qword ptr [RSI + RDI*0x8] MOVZX ECX,CL BT ECX,0x0 SBB R8,qword ptr [RDX + RDI*0x8] SETC CL MOV qword ptr [RSP + RDI*0x8 + -0x18],R8 INC RDI JMP 0x00139928 LAB_0013994a: MOVAPS XMM0,xmmword ptr [RSP + -0x18] MOVUPS xmmword ptr [RAX],XMM0 AND CL,0x1 MOV byte ptr [RAX + 0x10],CL RET
/* intx::result_with_carry<intx::uint<128u> > intx::subc<128u>(intx::uint<128u> const&, intx::uint<128u> const&, bool) */ void __thiscall intx::subc<128u>(intx *this,uint *param_1,uint *param_2,bool param_3) { ulong uVar1; ulong uVar2; long lVar3; long local_18 [3]; local_18[0] = 0; local_18[1] = 0; for (lVar3 = 0; lVar3 != 2; lVar3 = lVar3 + 1) { uVar1 = (ulong)((param_3 & 1U) != 0); uVar2 = *(ulong *)(param_1 + lVar3 * 8) - *(ulong *)(param_2 + lVar3 * 8); param_3 = *(ulong *)(param_1 + lVar3 * 8) < *(ulong *)(param_2 + lVar3 * 8) || uVar2 < uVar1; local_18[lVar3] = uVar2 - uVar1; } *(long *)this = local_18[0]; *(long *)(this + 8) = local_18[1]; this[0x10] = (intx)(param_3 & 1); return; }
55,341
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); }
O3
c
my_strnxfrm_latin1_de: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rax movl %ecx, %r10d movq %rdx, %rcx movl 0x10(%rbp), %r9d addq %rsi, %rcx testq %rax, %rax jle 0x39bfb addq %r8, %rax leaq 0x16bc0b(%rip), %r11 # 0x1a57a0 leaq 0x16bd04(%rip), %rbx # 0x1a58a0 movq %rsi, %r14 cmpq %rcx, %r14 jae 0x39c00 testl %r10d, %r10d je 0x39c00 movzbl (%r8), %edx movb (%rdx,%r11), %r15b leaq 0x1(%r14), %rdx movb %r15b, (%r14) movzbl (%r8), %r15d movb (%r15,%rbx), %r15b testb %r15b, %r15b je 0x39beb cmpq %rcx, %rdx setb %r12b cmpl $0x2, %r10d setae %r13b andb %r12b, %r13b cmpb $0x1, %r13b jne 0x39beb movb %r15b, 0x1(%r14) addq $0x2, %r14 decl %r10d movq %r14, %rdx incq %r8 decl %r10d movq %rdx, %r14 cmpq %rax, %r8 jb 0x39b9f jmp 0x39c03 movq %rsi, %rdx jmp 0x39c03 movq %r14, %rdx movl $0x0, (%rsp) movl %r10d, %r8d callq 0x3b98c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
my_strnxfrm_latin1_de: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rax, r9 mov r10d, ecx mov rcx, rdx mov r9d, [rbp+arg_0] add rcx, rsi test rax, rax jle short loc_39BFB add rax, r8 lea r11, combo1map lea rbx, combo2map mov r14, rsi loc_39B9F: cmp r14, rcx jnb short loc_39C00 test r10d, r10d jz short loc_39C00 movzx edx, byte ptr [r8] mov r15b, [rdx+r11] lea rdx, [r14+1] mov [r14], r15b movzx r15d, byte ptr [r8] mov r15b, [r15+rbx] test r15b, r15b jz short loc_39BEB cmp rdx, rcx setb r12b cmp r10d, 2 setnb r13b and r13b, r12b cmp r13b, 1 jnz short loc_39BEB mov [r14+1], r15b add r14, 2 dec r10d mov rdx, r14 loc_39BEB: inc r8 dec r10d mov r14, rdx cmp r8, rax jb short loc_39B9F jmp short loc_39C03 loc_39BFB: mov rdx, rsi jmp short loc_39C03 loc_39C00: mov rdx, r14 loc_39C03: mov [rsp+30h+var_30], 0 mov r8d, r10d call my_strxfrm_pad_desc_and_reverse add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_latin1_de( int a1, _BYTE *a2, long long a3, unsigned int a4, unsigned __int8 *a5, long long a6, int a7) { unsigned long long v8; // rcx unsigned __int8 *v9; // rax _BYTE *v10; // r14 _BYTE *v11; // rdx unsigned __int8 v12; // r15 v8 = (unsigned long long)&a2[a3]; if ( a6 <= 0 ) { LODWORD(v11) = (_DWORD)a2; } else { v9 = &a5[a6]; v10 = a2; while ( (unsigned long long)v10 < v8 && a4 ) { v11 = v10 + 1; *v10 = combo1map[*a5]; v12 = combo2map[*a5]; if ( v12 && (unsigned long long)v11 < v8 && a4 >= 2 ) { v10[1] = v12; --a4; v11 = v10 + 2; } ++a5; --a4; v10 = v11; if ( a5 >= v9 ) return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0); } LODWORD(v11) = (_DWORD)v10; } return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0); }
my_strnxfrm_latin1_de: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,R9 MOV R10D,ECX MOV RCX,RDX MOV R9D,dword ptr [RBP + 0x10] ADD RCX,RSI TEST RAX,RAX JLE 0x00139bfb ADD RAX,R8 LEA R11,[0x2a57a0] LEA RBX,[0x2a58a0] MOV R14,RSI LAB_00139b9f: CMP R14,RCX JNC 0x00139c00 TEST R10D,R10D JZ 0x00139c00 MOVZX EDX,byte ptr [R8] MOV R15B,byte ptr [RDX + R11*0x1] LEA RDX,[R14 + 0x1] MOV byte ptr [R14],R15B MOVZX R15D,byte ptr [R8] MOV R15B,byte ptr [R15 + RBX*0x1] TEST R15B,R15B JZ 0x00139beb CMP RDX,RCX SETC R12B CMP R10D,0x2 SETNC R13B AND R13B,R12B CMP R13B,0x1 JNZ 0x00139beb MOV byte ptr [R14 + 0x1],R15B ADD R14,0x2 DEC R10D MOV RDX,R14 LAB_00139beb: INC R8 DEC R10D MOV R14,RDX CMP R8,RAX JC 0x00139b9f JMP 0x00139c03 LAB_00139bfb: MOV RDX,RSI JMP 0x00139c03 LAB_00139c00: MOV RDX,R14 LAB_00139c03: MOV dword ptr [RSP],0x0 MOV R8D,R10D CALL 0x0013b98c ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_latin1_de (int8 param_1,int1 *param_2,long param_3,uint param_4,byte *param_5, long param_6,int4 param_7) { ulong in_RAX; byte *pbVar1; int1 *puVar2; int1 *puVar3; int1 *puVar4; puVar2 = param_2 + param_3; puVar4 = param_2; if (0 < param_6) { pbVar1 = param_5 + param_6; puVar3 = param_2; do { puVar4 = puVar3; if ((puVar2 <= puVar3) || (param_4 == 0)) break; puVar4 = puVar3 + 1; *puVar3 = combo1map[*param_5]; if ((combo2map[*param_5] != '\0') && (1 < param_4 && puVar4 < puVar2)) { puVar3[1] = combo2map[*param_5]; puVar4 = puVar3 + 2; param_4 = param_4 - 1; } param_5 = param_5 + 1; param_4 = param_4 - 1; puVar3 = puVar4; } while (param_5 < pbVar1); } my_strxfrm_pad_desc_and_reverse (param_1,param_2,puVar4,puVar2,param_4,param_7,in_RAX & 0xffffffff00000000); return; }
55,342
void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<std::unique_ptr<google::protobuf::DescriptorPool::Tables, std::default_delete<google::protobuf::DescriptorPool::Tables>> const>(std::unique_ptr<google::protobuf::DescriptorPool::Tables, std::default_delete<google::protobuf::DescriptorPool::Tables>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void FinalizePlanning(Alloc& alloc) { GOOGLE_CHECK(!has_allocated()); pointers_ = alloc->CreateFlatAlloc(total_)->Pointers(); GOOGLE_CHECK(has_allocated()); }
O3
cpp
void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<std::unique_ptr<google::protobuf::DescriptorPool::Tables, std::default_delete<google::protobuf::DescriptorPool::Tables>> const>(std::unique_ptr<google::protobuf::DescriptorPool::Tables, std::default_delete<google::protobuf::DescriptorPool::Tables>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, (%rdi) je 0xcd5b1 leaq 0x9e91f(%rip), %rdx # 0x16be93 leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0x201, %ecx # imm = 0x201 callq 0x857c2 leaq 0xa0fd8(%rip), %rsi # 0x16e56a movq %r15, %rdi callq 0x852c0 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x8(%rsp), %rdi callq 0x857e0 movq (%r14), %rdi leaq 0x68(%rbx), %rsi callq 0xdf2ce leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rax, %rsi callq 0xdf7f6 movl $0xd, %ecx movq %rbx, %rdi movq %r14, %rsi rep movsq (%rsi), %es:(%rdi) cmpq $0x0, (%rbx) jne 0xcd625 leaq 0x9e8ab(%rip), %rdx # 0x16be93 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x3, %esi movl $0x205, %ecx # imm = 0x205 callq 0x857c2 leaq 0xa0eca(%rip), %rsi # 0x16e4d0 movq %rbx, %rdi callq 0x852c0 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x8(%rsp), %rdi callq 0x857e0 addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0xcd635 jmp 0xcd635 jmp 0xcd635 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE16FinalizePlanningIPNS0_14DescriptorPool6TablesEEEvRT_: push r15 push r14 push rbx sub rsp, 70h mov r14, rsi mov rbx, rdi cmp qword ptr [rdi], 0 jz short loc_CD5B1 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... lea r15, [rsp+88h+var_80] mov rdi, r15 mov esi, 3 mov ecx, 201h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_81] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+88h+var_80]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_CD5B1: mov rdi, [r14] lea rsi, [rbx+68h] call _ZN6google8protobuf14DescriptorPool6Tables15CreateFlatAllocIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEEPNS0_12_GLOBAL__N_114FlatAllocationIJcS9_SA_SB_SC_SD_SE_SF_SG_SH_SI_SJ_SK_EEERKNSL_7TypeMapINSL_4IntTEJDpT_EEE; google::protobuf::DescriptorPool::Tables::CreateFlatAlloc<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>(google::protobuf::`anonymous namespace'::TypeMap<google::protobuf::`anonymous namespace'::IntT,char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> const&) lea r14, [rsp+88h+var_80] mov rdi, r14 mov rsi, rax call _ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE8PointersEv; google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::Pointers(void) mov ecx, 0Dh mov rdi, rbx mov rsi, r14 rep movsq cmp qword ptr [rbx], 0 jnz short loc_CD625 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... lea rbx, [rsp+88h+var_80] mov rdi, rbx mov esi, 3 mov ecx, 205h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedHas_1; "CHECK failed: has_allocated(): " mov rdi, rbx call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_81] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+88h+var_80]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_CD625: add rsp, 70h pop rbx pop r14 pop r15 retn jmp short loc_CD635 jmp short loc_CD635 jmp short $+2 loc_CD635: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
void google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::FinalizePlanning<google::protobuf::DescriptorPool::Tables *>( _QWORD *a1, _QWORD *a2) { google::protobuf::internal::LogMessage *v2; // rax long long v3; // rax google::protobuf::internal::LogMessage *v4; // rax char v5; // [rsp+7h] [rbp-81h] BYREF _BYTE v6[128]; // [rsp+8h] [rbp-80h] BYREF if ( *a1 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v6, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 513); v2 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v6, (long long)"CHECK failed: !has_allocated(): "); google::protobuf::internal::LogFinisher::operator=((long long)&v5, v2); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v6); } v3 = google::protobuf::DescriptorPool::Tables::CreateFlatAlloc<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>( *a2, a1 + 13); google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::Pointers( v6, v3); qmemcpy(a1, v6, 0x68uLL); if ( !*a1 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v6, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 517); v4 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v6, (long long)"CHECK failed: has_allocated(): "); google::protobuf::internal::LogFinisher::operator=((long long)&v5, v4); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v6); } }
FinalizePlanning<google::protobuf::DescriptorPool::Tables*>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV R14,RSI MOV RBX,RDI CMP qword ptr [RDI],0x0 JZ 0x001cd5b1 LEA RDX,[0x26be93] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV ESI,0x3 MOV ECX,0x201 CALL 0x001857c2 LAB_001cd58b: LEA RSI,[0x26e56a] MOV RDI,R15 CALL 0x001852c0 LAB_001cd59a: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x0018539a LAB_001cd5a7: LEA RDI,[RSP + 0x8] CALL 0x001857e0 LAB_001cd5b1: MOV RDI,qword ptr [R14] LEA RSI,[RBX + 0x68] CALL 0x001df2ce LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RAX CALL 0x001df7f6 MOV ECX,0xd MOV RDI,RBX MOV RSI,R14 MOVSQ.REP RDI,RSI CMP qword ptr [RBX],0x0 JNZ 0x001cd625 LEA RDX,[0x26be93] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x3 MOV ECX,0x205 CALL 0x001857c2 LAB_001cd5ff: LEA RSI,[0x26e4d0] MOV RDI,RBX CALL 0x001852c0 LAB_001cd60e: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x0018539a LAB_001cd61b: LEA RDI,[RSP + 0x8] CALL 0x001857e0 LAB_001cd625: ADD RSP,0x70 POP RBX POP R14 POP R15 RET
/* void google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__cxx11::string, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::FinalizePlanning<google::protobuf::DescriptorPool::Tables*>(google::protobuf::DescriptorPool::Tables*&) */ void __thiscall google::protobuf::(anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::FinalizePlanning<google::protobuf::DescriptorPool::Tables*> (FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *this,Tables **param_1) { LogMessage *pLVar1; long lVar2; FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *pFVar3; byte bVar4; LogFinisher local_81; LogMessage local_80 [104]; bVar4 = 0; if (*(long *)this != 0) { internal::LogMessage::LogMessage (local_80,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x201); /* try { // try from 001cd58b to 001cd599 has its CatchHandler @ 001cd635 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_80,"CHECK failed: !has_allocated(): "); /* try { // try from 001cd59a to 001cd5a6 has its CatchHandler @ 001cd633 */ internal::LogFinisher::operator=(&local_81,pLVar1); internal::LogMessage::~LogMessage(local_80); } DescriptorPool::Tables:: CreateFlatAlloc<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> (*param_1,(TypeMap *)(this + 0x68)); FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::Pointers(); pLVar1 = local_80; pFVar3 = this; for (lVar2 = 0xd; lVar2 != 0; lVar2 = lVar2 + -1) { *(int8 *)pFVar3 = *(int8 *)pLVar1; pLVar1 = pLVar1 + ((ulong)bVar4 * -2 + 1) * 8; pFVar3 = pFVar3 + (ulong)bVar4 * -0x10 + 8; } if (*(long *)this == 0) { internal::LogMessage::LogMessage (local_80,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x205); /* try { // try from 001cd5ff to 001cd60d has its CatchHandler @ 001cd631 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_80,"CHECK failed: has_allocated(): "); /* try { // try from 001cd60e to 001cd61a has its CatchHandler @ 001cd62f */ internal::LogFinisher::operator=(&local_81,pLVar1); internal::LogMessage::~LogMessage(local_80); } return; }
55,343
google::protobuf::ReplaceCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, char)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
void ReplaceCharacters(std::string *s, const char *remove, char replacewith) { const char *str_start = s->c_str(); const char *str = str_start; for (str = strpbrk(str, remove); str != nullptr; str = strpbrk(str + 1, remove)) { (*s)[str - str_start] = replacewith; } }
O0
cpp
google::protobuf::ReplaceCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, char): subq $0x38, %rsp movb %dl, %al movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movb %al, 0x27(%rsp) movq 0x30(%rsp), %rdi callq 0x13190 movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x13740 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0x26738 movb 0x27(%rsp), %al movb %al, 0xf(%rsp) movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax subq %rax, %rsi callq 0x13800 movb 0xf(%rsp), %cl movb %cl, (%rax) movq 0x10(%rsp), %rdi addq $0x1, %rdi movq 0x28(%rsp), %rsi callq 0x13740 movq %rax, 0x10(%rsp) jmp 0x266f1 addq $0x38, %rsp retq nopl (%rax)
_ZN6google8protobuf17ReplaceCharactersEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcc: sub rsp, 38h mov al, dl mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_11], al mov rdi, [rsp+38h+var_8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_20] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_28] mov rsi, [rsp+38h+var_10] call _strpbrk mov [rsp+38h+var_28], rax loc_266F1: cmp [rsp+38h+var_28], 0 jz short loc_26738 mov al, [rsp+38h+var_11] mov [rsp+38h+var_29], al mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_28] mov rax, [rsp+38h+var_20] sub rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov cl, [rsp+38h+var_29] mov [rax], cl mov rdi, [rsp+38h+var_28] add rdi, 1 mov rsi, [rsp+38h+var_10] call _strpbrk mov [rsp+38h+var_28], rax jmp short loc_266F1 loc_26738: add rsp, 38h retn
long long google::protobuf::ReplaceCharacters(long long a1, long long a2, char a3) { long long result; // rax long long i; // [rsp+10h] [rbp-28h] long long v5; // [rsp+18h] [rbp-20h] v5 = std::string::c_str(a1); result = strpbrk(v5, a2); for ( i = result; i; i = result ) { *(_BYTE *)std::string::operator[](a1, i - v5) = a3; result = strpbrk(i + 1, a2); } return result; }
ReplaceCharacters: SUB RSP,0x38 MOV AL,DL MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV byte ptr [RSP + 0x27],AL MOV RDI,qword ptr [RSP + 0x30] CALL 0x00113190 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113740 MOV qword ptr [RSP + 0x10],RAX LAB_001266f1: CMP qword ptr [RSP + 0x10],0x0 JZ 0x00126738 MOV AL,byte ptr [RSP + 0x27] MOV byte ptr [RSP + 0xf],AL MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RSI,RAX CALL 0x00113800 MOV CL,byte ptr [RSP + 0xf] MOV byte ptr [RAX],CL MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x1 MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113740 MOV qword ptr [RSP + 0x10],RAX JMP 0x001266f1 LAB_00126738: ADD RSP,0x38 RET
/* google::protobuf::ReplaceCharacters(std::__cxx11::string*, char const*, char) */ void google::protobuf::ReplaceCharacters(string *param_1,char *param_2,char param_3) { char *pcVar1; char *local_28; pcVar1 = (char *)std::__cxx11::string::c_str(); for (local_28 = strpbrk(pcVar1,param_2); local_28 != (char *)0x0; local_28 = strpbrk(local_28 + 1,param_2)) { pcVar1 = (char *)std::__cxx11::string::operator[]((ulong)param_1); *pcVar1 = param_3; } return; }
55,344
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
llama.cpp/common/json.hpp
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
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>::operator[](unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movb (%rdi), %al testb %al, %al jne 0x476ba movb $0x2, (%r14) movl $0x18, %edi callq 0x17140 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x25e48 movb (%r14), %al cmpb $0x2, %al jne 0x47705 movq 0x8(%r14), %rdi movq (%rdi), %rax movq 0x8(%rdi), %rcx subq %rax, %rcx sarq $0x4, %rcx cmpq %rbx, %rcx ja 0x476f2 leaq 0x1(%rbx), %rsi callq 0x4d000 movq %r14, %rdi movl $0x1, %esi callq 0x25e48 movq 0x8(%r14), %rax movq (%rax), %rax shlq $0x4, %rbx addq %rax, %rbx movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x17400 movq %rax, %rbx movq %r14, %rdi callq 0x2c462 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x196fa(%rip), %rsi # 0x60e23 leaq 0x10(%rsp), %rdi callq 0x4d030 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x2c206 xorl %ebp, %ebp leaq 0x3001c(%rip), %rsi # 0x77770 leaq -0x1f19f(%rip), %rdx # 0x285bc movq %rbx, %rdi callq 0x176f0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x47781 movq 0x20(%rsp), %rsi incq %rsi callq 0x17100 testb %bpl, %bpl jne 0x4778b jmp 0x47793 movq %rax, %r14 movq %rbx, %rdi callq 0x179b0 movq %r14, %rdi callq 0x17710
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi mov al, [rdi] test al, al jnz short loc_476BA mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov al, [r14] loc_476BA: cmp al, 2 jnz short loc_47705 mov rdi, [r14+8] mov rax, [rdi] mov rcx, [rdi+8] sub rcx, rax sar rcx, 4 cmp rcx, rbx ja short loc_476F2 lea rsi, [rbx+1] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::resize(ulong) 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 rax, [r14+8] mov rax, [rax] loc_476F2: shl rbx, 4 add rbx, rax mov rax, rbx add rsp, 30h pop rbx pop r14 pop rbp retn loc_47705: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_47781 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_47781: test bpl, bpl jnz short loc_4778B jmp short loc_47793 mov r14, rax loc_4778B: mov rdi, rbx; void * call ___cxa_free_exception loc_47793: 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>::operator[]( long long a1, unsigned long long a2) { char v3; // al long long v4; // rax long long *v5; // rdi long long v6; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v9[2]; // [rsp+10h] [rbp-38h] BYREF v3 = *(_BYTE *)a1; if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 2; v4 = operator new(0x18uLL); *(_OWORD *)v4 = 0LL; *(_QWORD *)(v4 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v4; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v3 = *(_BYTE *)a1; } if ( v3 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v9, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v5 = *(long long **)(a1 + 8); v6 = *v5; if ( (v5[1] - *v5) >> 4 <= a2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::resize( v5, a2 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v6 = **(_QWORD **)(a1 + 8); } return v6 + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOV AL,byte ptr [RDI] TEST AL,AL JNZ 0x001476ba MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00117140 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00125e48 MOV AL,byte ptr [R14] LAB_001476ba: CMP AL,0x2 JNZ 0x00147705 MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] SUB RCX,RAX SAR RCX,0x4 CMP RCX,RBX JA 0x001476f2 LEA RSI,[RBX + 0x1] CALL 0x0014d000 MOV RDI,R14 MOV ESI,0x1 CALL 0x00125e48 MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX] LAB_001476f2: SHL RBX,0x4 ADD RBX,RAX MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00147705: MOV EDI,0x20 CALL 0x00117400 MOV RBX,RAX MOV RDI,R14 CALL 0x0012c462 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00147722: LEA RSI,[0x160e23] LEA RDI,[RSP + 0x10] CALL 0x0014d030 MOV BPL,0x1 LAB_00147736: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0012c206 XOR EBP,EBP LEA RSI,[0x177770] LEA RDX,[0x1285bc] MOV RDI,RBX CALL 0x001176f0
/* 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[](unsigned long) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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> *this,ulong param_1) { vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this_00; 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> bVar1; int8 *puVar2; long lVar3; int8 uVar4; char *local_40; detail local_38 [32]; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar2 = (int8 *)operator_new(0x18); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; assert_invariant(SUB81(this,0)); bVar1 = *this; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); lVar3 = *(long *)this_00; if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::resize(this_00,param_1 + 1); assert_invariant(SUB81(this,0)); lVar3 = **(long **)(this + 8); } return param_1 * 0x10 + lVar3; } uVar4 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00147722 to 00147732 has its CatchHandler @ 00147788 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 00147736 to 00147762 has its CatchHandler @ 00147763 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); }
55,345
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
hkr04[P]cpp-mcp/common/json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %r15 incq %r15 movl $0x1, %ebp movabsq $0x346dc5d63886594b, %r13 # imm = 0x346DC5D63886594B movl $0x1, %esi cmpq $0xa, %r15 jb 0x3dde8 movl $0x4, %esi movq %r15, %rcx cmpq $0x63, %rcx jbe 0x3dde1 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x3dde6 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x3dde8 movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x3ddab addl $-0x3, %esi jmp 0x3dde8 addl $-0x2, %esi jmp 0x3dde8 decl %esi movl %esi, %esi leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %edx, %edx callq 0x8660 movq (%r12), %rdi movl 0x8(%r12), %esi movq %r15, %rdx callq 0xbb6e movq 0x8(%r14), %r14 cmpq $0xa, %r14 jb 0x3de62 movl $0x4, %ebp movq %r14, %rcx cmpq $0x63, %rcx jbe 0x3de5b cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x3de60 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x3de62 movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %ebp cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x3de25 addl $-0x3, %ebp jmp 0x3de62 addl $-0x2, %ebp jmp 0x3de62 decl %ebp movl %ebp, %esi leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x28(%rsp), %rdi xorl %edx, %edx callq 0x8660 leaq 0x28(%rsp), %r15 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0xbb6e leaq 0x7d13(%rip), %rsi # 0x45ba8 leaq 0x7d16(%rip), %rcx # 0x45bb2 leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r15, %r8 callq 0x3df34 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x3dec3 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3dedf movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x3df10 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x3df10 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3df2c movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rdi callq 0x8960
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov r15, [rsi+10h] inc r15 mov ebp, 1 mov r13, 346DC5D63886594Bh mov esi, 1 cmp r15, 0Ah jb short loc_3DDE8 mov esi, 4 mov rcx, r15 loc_3DDAB: cmp rcx, 63h ; 'c' jbe short loc_3DDE1 cmp rcx, 3E7h jbe short loc_3DDE6 cmp rcx, 2710h jb short loc_3DDE8 mov rax, rcx mul r13 shr rdx, 0Bh add esi, 4 cmp rcx, offset locret_1869F mov rcx, rdx ja short loc_3DDAB add esi, 0FFFFFFFDh jmp short loc_3DDE8 loc_3DDE1: add esi, 0FFFFFFFEh jmp short loc_3DDE8 loc_3DDE6: dec esi loc_3DDE8: mov esi, esi lea rax, [rsp+78h+var_60] mov [rax-10h], rax lea r12, [rsp+78h+var_70] mov rdi, r12 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r12] mov esi, [r12+8] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov r14, [r14+8] cmp r14, 0Ah jb short loc_3DE62 mov ebp, 4 mov rcx, r14 loc_3DE25: cmp rcx, 63h ; 'c' jbe short loc_3DE5B cmp rcx, 3E7h jbe short loc_3DE60 cmp rcx, 2710h jb short loc_3DE62 mov rax, rcx mul r13 shr rdx, 0Bh add ebp, 4 cmp rcx, offset locret_1869F mov rcx, rdx ja short loc_3DE25 add ebp, 0FFFFFFFDh jmp short loc_3DE62 loc_3DE5B: add ebp, 0FFFFFFFEh jmp short loc_3DE62 loc_3DE60: dec ebp loc_3DE62: mov esi, ebp lea r12, [rsp+78h+var_40] mov [r12-10h], r12 lea rdi, [rsp+78h+var_50] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea r15, [rsp+78h+var_50] mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+78h+var_70] mov rdi, rbx mov r8, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r12 jz short loc_3DEC3 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3DEC3: mov rdi, [rsp+78h+var_70]; void * lea rax, [rsp+78h+var_60] cmp rdi, rax jz short loc_3DEDF mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3DEDF: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_3DF10 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3DF10 mov rbx, rax loc_3DF10: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_3DF2C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3DF2C: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { unsigned long long v3; // r15 unsigned int v4; // ebp unsigned int v5; // esi unsigned long long v6; // rcx bool v7; // cc unsigned long long v8; // r14 unsigned long long v9; // rcx void *v11; // [rsp+8h] [rbp-70h] BYREF int v12; // [rsp+10h] [rbp-68h] _QWORD v13[2]; // [rsp+18h] [rbp-60h] BYREF void *v14; // [rsp+28h] [rbp-50h] BYREF int v15; // [rsp+30h] [rbp-48h] _QWORD v16[8]; // [rsp+38h] [rbp-40h] BYREF v3 = *(_QWORD *)(a2 + 16) + 1LL; v4 = 1; v5 = 1; if ( v3 >= 0xA ) { v5 = 4; v6 = v3; while ( 1 ) { if ( v6 <= 0x63 ) { v5 -= 2; goto LABEL_10; } if ( v6 <= 0x3E7 ) break; if ( v6 < 0x2710 ) goto LABEL_10; v5 += 4; v7 = v6 <= (unsigned long long)&locret_1869F; v6 /= 0x2710uLL; if ( v7 ) { v5 -= 3; goto LABEL_10; } } --v5; } LABEL_10: v11 = v13; std::string::_M_construct(&v11, v5, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v11, v12, v3); v8 = *(_QWORD *)(a2 + 8); if ( v8 >= 0xA ) { v4 = 4; v9 = v8; while ( 1 ) { if ( v9 <= 0x63 ) { v4 -= 2; goto LABEL_19; } if ( v9 <= 0x3E7 ) break; if ( v9 < 0x2710 ) goto LABEL_19; v4 += 4; v7 = v9 <= (unsigned long long)&locret_1869F; v9 /= 0x2710uLL; if ( v7 ) { v4 -= 3; goto LABEL_19; } } --v4; } LABEL_19: v14 = v16; std::string::_M_construct(&v14, v4, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v14, v15, v8); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", &v11, ", column ", &v14); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); return a1; }
position_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RSI + 0x10] INC R15 MOV EBP,0x1 MOV R13,0x346dc5d63886594b MOV ESI,0x1 CMP R15,0xa JC 0x0013dde8 MOV ESI,0x4 MOV RCX,R15 LAB_0013ddab: CMP RCX,0x63 JBE 0x0013dde1 CMP RCX,0x3e7 JBE 0x0013dde6 CMP RCX,0x2710 JC 0x0013dde8 MOV RAX,RCX MUL R13 SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0013ddab ADD ESI,-0x3 JMP 0x0013dde8 LAB_0013dde1: ADD ESI,-0x2 JMP 0x0013dde8 LAB_0013dde6: DEC ESI LAB_0013dde8: MOV ESI,ESI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA R12,[RSP + 0x8] MOV RDI,R12 XOR EDX,EDX CALL 0x00108660 MOV RDI,qword ptr [R12] MOV ESI,dword ptr [R12 + 0x8] MOV RDX,R15 CALL 0x0010bb6e MOV R14,qword ptr [R14 + 0x8] CMP R14,0xa JC 0x0013de62 MOV EBP,0x4 MOV RCX,R14 LAB_0013de25: CMP RCX,0x63 JBE 0x0013de5b CMP RCX,0x3e7 JBE 0x0013de60 CMP RCX,0x2710 JC 0x0013de62 MOV RAX,RCX MUL R13 SHR RDX,0xb ADD EBP,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0013de25 ADD EBP,-0x3 JMP 0x0013de62 LAB_0013de5b: ADD EBP,-0x2 JMP 0x0013de62 LAB_0013de60: DEC EBP LAB_0013de62: MOV ESI,EBP LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 LAB_0013de6e: LEA RDI,[RSP + 0x28] XOR EDX,EDX CALL 0x00108660 LEA R15,[RSP + 0x28] MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0010bb6e LAB_0013de8e: LEA RSI,[0x145ba8] LEA RCX,[0x145bb2] LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV R8,R15 CALL 0x0013df34 LAB_0013deac: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x0013dec3 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00108580 LAB_0013dec3: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0013dedf MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108580 LAB_0013dedf: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { bool bVar1; char cVar2; ulong uVar3; char cVar4; char cVar5; ulong uVar6; long *local_70; uint local_68; long local_60 [2]; long *local_50; uint local_48; long local_40 [2]; uVar6 = *(long *)(param_1 + 0x10) + 1; cVar4 = '\x01'; cVar5 = '\x01'; if (9 < uVar6) { uVar3 = uVar6; cVar2 = '\x04'; do { cVar5 = cVar2; if (uVar3 < 100) { cVar5 = cVar5 + -2; goto LAB_0013dde8; } if (uVar3 < 1000) { cVar5 = cVar5 + -1; goto LAB_0013dde8; } if (uVar3 < 10000) goto LAB_0013dde8; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar5 + '\x04'; } while (bVar1); cVar5 = cVar5 + '\x01'; } LAB_0013dde8: local_70 = local_60; std::__cxx11::string::_M_construct((ulong)&local_70,cVar5); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_70,local_68,uVar6); uVar6 = *(ulong *)(param_1 + 8); if (9 < uVar6) { uVar3 = uVar6; cVar5 = '\x04'; do { cVar4 = cVar5; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_0013de62; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_0013de62; } if (uVar3 < 10000) goto LAB_0013de62; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar5 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0013de62: /* try { // try from 0013de6e to 0013de79 has its CatchHandler @ 0013df0d */ local_50 = local_40; std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,uVar6); /* try { // try from 0013de8e to 0013deab has its CatchHandler @ 0013def1 */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)&local_70,", column ",(string *)&local_50); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } return this; }
55,346
aimrt::protocols::sensor::JointCommand::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
aimrt_mujoco_sim/build_O3/src/protocols/actuator/joint_command.pb.cc
uint8_t* JointCommand::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:aimrt.protocols.sensor.JointCommand) uint32_t cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (!this->_internal_name().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "aimrt.protocols.sensor.JointCommand.name"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name(), target); } // double position = 2; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_position = this->_internal_position(); uint64_t raw_position; memcpy(&raw_position, &tmp_position, sizeof(tmp_position)); if (raw_position != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_position(), target); } // double velocity = 3; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_velocity = this->_internal_velocity(); uint64_t raw_velocity; memcpy(&raw_velocity, &tmp_velocity, sizeof(tmp_velocity)); if (raw_velocity != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_velocity(), target); } // double effort = 4; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_effort = this->_internal_effort(); uint64_t raw_effort; memcpy(&raw_effort, &tmp_effort, sizeof(tmp_effort)); if (raw_effort != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_effort(), target); } // double stiffness = 5; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_stiffness = this->_internal_stiffness(); uint64_t raw_stiffness; memcpy(&raw_stiffness, &tmp_stiffness, sizeof(tmp_stiffness)); if (raw_stiffness != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_stiffness(), target); } // double damping = 6; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_damping = this->_internal_damping(); uint64_t raw_damping; memcpy(&raw_damping, &tmp_damping, sizeof(tmp_damping)); if (raw_damping != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_damping(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:aimrt.protocols.sensor.JointCommand) return target; }
O3
cpp
aimrt::protocols::sensor::JointCommand::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq 0x10(%rdi), %rax andq $-0x4, %rax movq 0x8(%rax), %rsi testq %rsi, %rsi je 0x76520 movq (%rax), %rdi leaq 0xef35a(%rip), %rcx # 0x165855 movl $0x1, %edx callq 0x8d1be movq 0x10(%r14), %rdx andq $-0x4, %rdx movq %rbx, %rdi movl $0x1, %esi movq %r15, %rcx callq 0x7442a movq %rax, %r15 movq 0x18(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0x76545 cmpq %r15, (%rbx) jbe 0x76604 movb $0x11, (%r15) movq %rax, 0x1(%r15) addq $0x9, %r15 movq 0x20(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0x7656a cmpq %r15, (%rbx) jbe 0x7661b movb $0x19, (%r15) movq %rax, 0x1(%r15) addq $0x9, %r15 movq 0x28(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0x7658f cmpq %r15, (%rbx) jbe 0x76632 movb $0x21, (%r15) movq %rax, 0x1(%r15) addq $0x9, %r15 movq 0x30(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0x765b4 cmpq %r15, (%rbx) jbe 0x76649 movb $0x29, (%r15) movq %rax, 0x1(%r15) addq $0x9, %r15 movq 0x38(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0x765d9 cmpq %r15, (%rbx) jbe 0x76660 movb $0x31, (%r15) movq %rax, 0x1(%r15) addq $0x9, %r15 movq 0x8(%r14), %rdi testb $0x1, %dil jne 0x765ec movq %r15, %rax popq %rbx popq %r14 popq %r15 retq andq $-0x4, %rdi addq $0x8, %rdi movq %r15, %rsi movq %rbx, %rdx popq %rbx popq %r14 popq %r15 jmp 0xa6e1e movq %rbx, %rdi movq %r15, %rsi callq 0x2f106 movq %rax, %r15 movq 0x18(%r14), %rax jmp 0x76539 movq %rbx, %rdi movq %r15, %rsi callq 0x2f106 movq %rax, %r15 movq 0x20(%r14), %rax jmp 0x7655e movq %rbx, %rdi movq %r15, %rsi callq 0x2f106 movq %rax, %r15 movq 0x28(%r14), %rax jmp 0x76583 movq %rbx, %rdi movq %r15, %rsi callq 0x2f106 movq %rax, %r15 movq 0x30(%r14), %rax jmp 0x765a8 movq %rbx, %rdi movq %r15, %rsi callq 0x2f106 movq %rax, %r15 movq 0x38(%r14), %rax jmp 0x765cd nop
_ZNK5aimrt9protocols6sensor12JointCommand18_InternalSerializeEPhPN6google8protobuf2io19EpsCopyOutputStreamE: push r15 push r14 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+10h] and rax, 0FFFFFFFFFFFFFFFCh mov rsi, [rax+8] test rsi, rsi jz short loc_76520 mov rdi, [rax] lea rcx, aAimrtProtocols_1; "aimrt.protocols.sensor.JointCommand.nam"... mov edx, 1 call _ZN6google8protobuf8internal14WireFormatLite16VerifyUtf8StringEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*,int,google::protobuf::internal::WireFormatLite::Operation,char const*) mov rdx, [r14+10h] and rdx, 0FFFFFFFFFFFFFFFCh mov rdi, rbx mov esi, 1 mov rcx, r15 call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov r15, rax loc_76520: movq xmm0, qword ptr [r14+18h] movq rax, xmm0 test rax, rax jz short loc_76545 cmp [rbx], r15 jbe loc_76604 loc_76539: mov byte ptr [r15], 11h mov [r15+1], rax add r15, 9 loc_76545: movq xmm0, qword ptr [r14+20h] movq rax, xmm0 test rax, rax jz short loc_7656A cmp [rbx], r15 jbe loc_7661B loc_7655E: mov byte ptr [r15], 19h mov [r15+1], rax add r15, 9 loc_7656A: movq xmm0, qword ptr [r14+28h] movq rax, xmm0 test rax, rax jz short loc_7658F cmp [rbx], r15 jbe loc_76632 loc_76583: mov byte ptr [r15], 21h ; '!' mov [r15+1], rax add r15, 9 loc_7658F: movq xmm0, qword ptr [r14+30h] movq rax, xmm0 test rax, rax jz short loc_765B4 cmp [rbx], r15 jbe loc_76649 loc_765A8: mov byte ptr [r15], 29h ; ')' mov [r15+1], rax add r15, 9 loc_765B4: movq xmm0, qword ptr [r14+38h] movq rax, xmm0 test rax, rax jz short loc_765D9 cmp [rbx], r15 jbe loc_76660 loc_765CD: mov byte ptr [r15], 31h ; '1' mov [r15+1], rax add r15, 9 loc_765D9: mov rdi, [r14+8] test dil, 1 jnz short loc_765EC mov rax, r15 pop rbx pop r14 pop r15 retn loc_765EC: and rdi, 0FFFFFFFFFFFFFFFCh add rdi, 8; this mov rsi, r15; google::protobuf::UnknownFieldSet * mov rdx, rbx; unsigned __int8 * pop rbx pop r14 pop r15 jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *) loc_76604: mov rdi, rbx; this mov rsi, r15; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov r15, rax mov rax, [r14+18h] jmp loc_76539 loc_7661B: mov rdi, rbx; this mov rsi, r15; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov r15, rax mov rax, [r14+20h] jmp loc_7655E loc_76632: mov rdi, rbx; this mov rsi, r15; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov r15, rax mov rax, [r14+28h] jmp loc_76583 loc_76649: mov rdi, rbx; this mov rsi, r15; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov r15, rax mov rax, [r14+30h] jmp loc_765A8 loc_76660: mov rdi, rbx; this mov rsi, r15; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *) mov r15, rax mov rax, [r14+38h] jmp loc_765CD
unsigned __int8 * aimrt::protocols::sensor::JointCommand::_InternalSerialize( aimrt::protocols::sensor::JointCommand *this, unsigned __int8 *a2, google::protobuf::io::EpsCopyOutputStream *a3, google::protobuf::io::EpsCopyOutputStream *a4) { _QWORD *v6; // rax long long v7; // rsi long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rdi v6 = (_QWORD *)(*((_QWORD *)this + 2) & 0xFFFFFFFFFFFFFFFCLL); v7 = v6[1]; if ( v7 ) { google::protobuf::internal::WireFormatLite::VerifyUtf8String( *v6, v7, 1LL, "aimrt.protocols.sensor.JointCommand.name"); a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased( a3, 1, *((_QWORD *)this + 2) & 0xFFFFFFFFFFFFFFFCLL, a2); } v8 = *((_QWORD *)this + 3); if ( v8 ) { if ( *(_QWORD *)a3 <= (unsigned long long)a2 ) { a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2); v8 = *((_QWORD *)this + 3); } *a2 = 17; *(_QWORD *)(a2 + 1) = v8; a2 += 9; } v9 = *((_QWORD *)this + 4); if ( v9 ) { if ( *(_QWORD *)a3 <= (unsigned long long)a2 ) { a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2); v9 = *((_QWORD *)this + 4); } *a2 = 25; *(_QWORD *)(a2 + 1) = v9; a2 += 9; } v10 = *((_QWORD *)this + 5); if ( v10 ) { if ( *(_QWORD *)a3 <= (unsigned long long)a2 ) { a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2); v10 = *((_QWORD *)this + 5); } *a2 = 33; *(_QWORD *)(a2 + 1) = v10; a2 += 9; } v11 = *((_QWORD *)this + 6); if ( v11 ) { if ( *(_QWORD *)a3 <= (unsigned long long)a2 ) { a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2); v11 = *((_QWORD *)this + 6); } *a2 = 41; *(_QWORD *)(a2 + 1) = v11; a2 += 9; } v12 = *((_QWORD *)this + 7); if ( v12 ) { if ( *(_QWORD *)a3 <= (unsigned long long)a2 ) { a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2); v12 = *((_QWORD *)this + 7); } *a2 = 49; *(_QWORD *)(a2 + 1) = v12; a2 += 9; } v13 = *((_QWORD *)this + 1); if ( (v13 & 1) != 0 ) return (unsigned __int8 *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray( (google::protobuf::internal::WireFormat *)((v13 & 0xFFFFFFFFFFFFFFFCLL) + 8), (const google::protobuf::UnknownFieldSet *)a2, (unsigned __int8 *)a3, a4); else return a2; }
_InternalSerialize: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x10] AND RAX,-0x4 MOV RSI,qword ptr [RAX + 0x8] TEST RSI,RSI JZ 0x00176520 MOV RDI,qword ptr [RAX] LEA RCX,[0x265855] MOV EDX,0x1 CALL 0x0018d1be MOV RDX,qword ptr [R14 + 0x10] AND RDX,-0x4 MOV RDI,RBX MOV ESI,0x1 MOV RCX,R15 CALL 0x0017442a MOV R15,RAX LAB_00176520: MOVQ XMM0,qword ptr [R14 + 0x18] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x00176545 CMP qword ptr [RBX],R15 JBE 0x00176604 LAB_00176539: MOV byte ptr [R15],0x11 MOV qword ptr [R15 + 0x1],RAX ADD R15,0x9 LAB_00176545: MOVQ XMM0,qword ptr [R14 + 0x20] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x0017656a CMP qword ptr [RBX],R15 JBE 0x0017661b LAB_0017655e: MOV byte ptr [R15],0x19 MOV qword ptr [R15 + 0x1],RAX ADD R15,0x9 LAB_0017656a: MOVQ XMM0,qword ptr [R14 + 0x28] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x0017658f CMP qword ptr [RBX],R15 JBE 0x00176632 LAB_00176583: MOV byte ptr [R15],0x21 MOV qword ptr [R15 + 0x1],RAX ADD R15,0x9 LAB_0017658f: MOVQ XMM0,qword ptr [R14 + 0x30] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x001765b4 CMP qword ptr [RBX],R15 JBE 0x00176649 LAB_001765a8: MOV byte ptr [R15],0x29 MOV qword ptr [R15 + 0x1],RAX ADD R15,0x9 LAB_001765b4: MOVQ XMM0,qword ptr [R14 + 0x38] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x001765d9 CMP qword ptr [RBX],R15 JBE 0x00176660 LAB_001765cd: MOV byte ptr [R15],0x31 MOV qword ptr [R15 + 0x1],RAX ADD R15,0x9 LAB_001765d9: MOV RDI,qword ptr [R14 + 0x8] TEST DIL,0x1 JNZ 0x001765ec MOV RAX,R15 POP RBX POP R14 POP R15 RET LAB_001765ec: AND RDI,-0x4 ADD RDI,0x8 MOV RSI,R15 MOV RDX,RBX POP RBX POP R14 POP R15 JMP 0x001a6e1e LAB_00176604: MOV RDI,RBX MOV RSI,R15 CALL 0x0012f106 MOV R15,RAX MOV RAX,qword ptr [R14 + 0x18] JMP 0x00176539 LAB_0017661b: MOV RDI,RBX MOV RSI,R15 CALL 0x0012f106 MOV R15,RAX MOV RAX,qword ptr [R14 + 0x20] JMP 0x0017655e LAB_00176632: MOV RDI,RBX MOV RSI,R15 CALL 0x0012f106 MOV R15,RAX MOV RAX,qword ptr [R14 + 0x28] JMP 0x00176583 LAB_00176649: MOV RDI,RBX MOV RSI,R15 CALL 0x0012f106 MOV R15,RAX MOV RAX,qword ptr [R14 + 0x30] JMP 0x001765a8 LAB_00176660: MOV RDI,RBX MOV RSI,R15 CALL 0x0012f106 MOV R15,RAX MOV RAX,qword ptr [R14 + 0x38] JMP 0x001765cd
/* aimrt::protocols::sensor::JointCommand::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const */ uchar * __thiscall aimrt::protocols::sensor::JointCommand::_InternalSerialize (JointCommand *this,uchar *param_1,EpsCopyOutputStream *param_2) { long lVar1; uchar *puVar2; lVar1 = ((int8 *)(*(ulong *)(this + 0x10) & 0xfffffffffffffffc))[1]; if (lVar1 != 0) { google::protobuf::internal::WireFormatLite::VerifyUtf8String (*(int8 *)(*(ulong *)(this + 0x10) & 0xfffffffffffffffc),lVar1,1, "aimrt.protocols.sensor.JointCommand.name"); param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased (param_2,1,(string *)(*(ulong *)(this + 0x10) & 0xfffffffffffffffc) ,param_1); } lVar1 = *(long *)(this + 0x18); if (lVar1 != 0) { if (*(uchar **)param_2 <= param_1) { param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback (param_2,param_1); lVar1 = *(long *)(this + 0x18); } *param_1 = '\x11'; *(long *)(param_1 + 1) = lVar1; param_1 = param_1 + 9; } lVar1 = *(long *)(this + 0x20); if (lVar1 != 0) { if (*(uchar **)param_2 <= param_1) { param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback (param_2,param_1); lVar1 = *(long *)(this + 0x20); } *param_1 = '\x19'; *(long *)(param_1 + 1) = lVar1; param_1 = param_1 + 9; } lVar1 = *(long *)(this + 0x28); if (lVar1 != 0) { if (*(uchar **)param_2 <= param_1) { param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback (param_2,param_1); lVar1 = *(long *)(this + 0x28); } *param_1 = '!'; *(long *)(param_1 + 1) = lVar1; param_1 = param_1 + 9; } lVar1 = *(long *)(this + 0x30); if (lVar1 != 0) { if (*(uchar **)param_2 <= param_1) { param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback (param_2,param_1); lVar1 = *(long *)(this + 0x30); } *param_1 = ')'; *(long *)(param_1 + 1) = lVar1; param_1 = param_1 + 9; } lVar1 = *(long *)(this + 0x38); if (lVar1 != 0) { if (*(uchar **)param_2 <= param_1) { param_1 = (uchar *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback (param_2,param_1); lVar1 = *(long *)(this + 0x38); } *param_1 = '1'; *(long *)(param_1 + 1) = lVar1; param_1 = param_1 + 9; } if ((*(ulong *)(this + 8) & 1) == 0) { return param_1; } puVar2 = (uchar *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray ((UnknownFieldSet *)((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8), param_1,param_2); return puVar2; }
55,347
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O3
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rsi, %rdi leaq -0xd0(%rbp), %rsi movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x2d69d movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rsi, 0x10(%rax) leaq 0x10(%rbp), %rsi movq %rsi, 0x8(%rax) movabsq $0x3000000020, %rsi # imm = 0x3000000020 movq %rsi, (%rax) movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0x36c01 addq $0xd0, %rsp popq %rbp retq
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rdi, rsi lea rsi, [rbp+var_D0] mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_2D69D movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_2D69D: lea rax, [rbp+var_20] mov [rax+10h], rsi lea rsi, [rbp+arg_0] mov [rax+8], rsi mov rsi, 3000000020h mov [rax], rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call my_vsnprintf add rsp, 0D0h pop rbp retn
long long my_snprintf_8bit( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+20h] [rbp-B0h] long long v18; // [rsp+28h] [rbp-A8h] __m128 v19; // [rsp+30h] [rbp-A0h] __m128 v20; // [rsp+40h] [rbp-90h] __m128 v21; // [rsp+50h] [rbp-80h] __m128 v22; // [rsp+60h] [rbp-70h] __m128 v23; // [rsp+70h] [rbp-60h] __m128 v24; // [rsp+80h] [rbp-50h] __m128 v25; // [rsp+90h] [rbp-40h] __m128 v26; // [rsp+A0h] [rbp-30h] _QWORD v27[4]; // [rsp+B0h] [rbp-20h] BYREF v19 = a1; v20 = a2; v21 = a3; v22 = a4; v23 = a5; v24 = a6; v25 = a7; v26 = a8; v17 = a13; v18 = a14; v27[2] = &v16; v27[1] = &a15; v27[0] = 0x3000000020LL; return my_vsnprintf(a10, a11, a12, v27); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RDI,RSI LEA RSI,[RBP + -0xd0] MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0012d69d MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0012d69d: LEA RAX,[RBP + -0x20] MOV qword ptr [RAX + 0x10],RSI LEA RSI,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RSI MOV RSI,0x3000000020 MOV qword ptr [RAX],RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x00136c01 ADD RSP,0xd0 POP RBP RET
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [32]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000020; local_b8 = param_13; local_b0 = param_14; my_vsnprintf(param_10,param_11,param_12,&local_28); return; }
55,348
ma_retrieve_auto_increment
eloqsql/storage/maria/ma_key.c
ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type) { ulonglong value= 0; /* Store unsigned values here */ longlong s_value= 0; /* Store signed values here */ switch (key_type) { case HA_KEYTYPE_INT8: s_value= (longlong) *(const signed char*) key; break; case HA_KEYTYPE_BINARY: value=(ulonglong) *key; break; case HA_KEYTYPE_SHORT_INT: s_value= (longlong) sint2korr(key); break; case HA_KEYTYPE_USHORT_INT: value=(ulonglong) uint2korr(key); break; case HA_KEYTYPE_LONG_INT: s_value= (longlong) sint4korr(key); break; case HA_KEYTYPE_ULONG_INT: value=(ulonglong) uint4korr(key); break; case HA_KEYTYPE_INT24: s_value= (longlong) sint3korr(key); break; case HA_KEYTYPE_UINT24: value=(ulonglong) uint3korr(key); break; case HA_KEYTYPE_FLOAT: /* This shouldn't be used */ { float f_1; float4get(f_1,key); /* Ignore negative values */ value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1; break; } case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */ { double f_1; float8get(f_1,key); /* Ignore negative values */ value = (f_1 < 0.0) ? 0 : (ulonglong) f_1; break; } case HA_KEYTYPE_LONGLONG: s_value= sint8korr(key); break; case HA_KEYTYPE_ULONGLONG: value= uint8korr(key); break; default: DBUG_ASSERT(0); value=0; /* Error */ break; } /* The following code works becasue if s_value < 0 then value is 0 and if s_value == 0 then value will contain either s_value or the correct value. */ return (s_value > 0) ? (ulonglong) s_value : value; }
O0
c
ma_retrieve_auto_increment: pushq %rbp movq %rsp, %rbp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq $0x0, -0x18(%rbp) movq $0x0, -0x20(%rbp) movzbl -0x9(%rbp), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x38(%rbp) subl $0xc, %eax ja 0x35437 movq -0x38(%rbp), %rax leaq 0x123ad9(%rip), %rcx # 0x158d48 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x8(%rbp), %rax movsbq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movswq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movslq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movl (%rax), %eax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x35316 movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x10, %eax orl $0xff000000, %eax # imm = 0xFF000000 movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx orl %ecx, %eax movl %eax, -0x3c(%rbp) jmp 0x3533a movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x10, %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx orl %ecx, %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax cltq movq %rax, -0x20(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) xorps %xmm0, %xmm0 ucomiss -0x24(%rbp), %xmm0 jbe 0x3538e xorl %eax, %eax movq %rax, -0x48(%rbp) jmp 0x353bd movss -0x24(%rbp), %xmm0 movss 0x11bc69(%rip), %xmm2 # 0x151004 movaps %xmm0, %xmm1 subss %xmm2, %xmm1 cvttss2si %xmm1, %rcx cvttss2si %xmm0, %rax movq %rax, %rdx sarq $0x3f, %rdx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) xorps %xmm0, %xmm0 ucomisd -0x30(%rbp), %xmm0 jbe 0x353e4 xorl %eax, %eax movq %rax, -0x50(%rbp) jmp 0x35413 movsd -0x30(%rbp), %xmm0 movsd 0x12385f(%rip), %xmm2 # 0x158c50 movaps %xmm0, %xmm1 subsd %xmm2, %xmm1 cvttsd2si %xmm1, %rcx cvttsd2si %xmm0, %rax movq %rax, %rdx sarq $0x3f, %rdx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x35443 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x35443 jmp 0x35439 jmp 0x3543b movq $0x0, -0x18(%rbp) cmpq $0x0, -0x20(%rbp) jle 0x35454 movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x3545c movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
ma_retrieve_auto_increment: push rbp mov rbp, rsp mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov [rbp+var_18], 0 mov [rbp+var_20], 0 movzx eax, [rbp+var_9] add eax, 0FFFFFFFEh; switch 13 cases mov ecx, eax mov [rbp+var_38], rcx sub eax, 0Ch ja def_35276; jumptable 0000000000035276 default case, case 7 mov rax, [rbp+var_38] lea rcx, jpt_35276 movsxd rax, ds:(jpt_35276 - 158D48h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_35278: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 14 movsx rax, byte ptr [rax] mov [rbp+var_20], rax jmp loc_35443 loc_35289: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 2 movzx eax, byte ptr [rax] mov [rbp+var_18], rax jmp loc_35443 loc_35299: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 3 movsx rax, word ptr [rax] mov [rbp+var_20], rax jmp loc_35443 loc_352AA: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 8 movzx eax, word ptr [rax] mov [rbp+var_18], rax jmp loc_35443 loc_352BA: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 4 movsxd rax, dword ptr [rax] mov [rbp+var_20], rax jmp loc_35443 loc_352CA: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 9 mov eax, [rax] mov [rbp+var_18], rax jmp loc_35443 loc_352D9: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 12 movzx eax, byte ptr [rax+2] and eax, 80h cmp eax, 0 jz short loc_35316 mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 10h or eax, 0FF000000h mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] or eax, ecx mov [rbp+var_3C], eax jmp short loc_3533A loc_35316: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 10h mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] or eax, ecx mov [rbp+var_3C], eax loc_3533A: mov eax, [rbp+var_3C] cdqe mov [rbp+var_20], rax jmp loc_35443 loc_35348: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 13 movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_18], rax jmp loc_35443 loc_35374: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 5 mov eax, [rax] mov [rbp+var_24], eax xorps xmm0, xmm0 ucomiss xmm0, [rbp+var_24] jbe short loc_3538E xor eax, eax mov [rbp+var_48], rax jmp short loc_353BD loc_3538E: movss xmm0, [rbp+var_24] movss xmm2, cs:dword_151004 movaps xmm1, xmm0 subss xmm1, xmm2 cvttss2si rcx, xmm1 cvttss2si rax, xmm0 mov rdx, rax sar rdx, 3Fh and rcx, rdx or rax, rcx mov [rbp+var_48], rax loc_353BD: mov rax, [rbp+var_48] mov [rbp+var_18], rax jmp short loc_35443 loc_353C7: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 6 mov rax, [rax] mov [rbp+var_30], rax xorps xmm0, xmm0 ucomisd xmm0, [rbp+var_30] jbe short loc_353E4 xor eax, eax mov [rbp+var_50], rax jmp short loc_35413 loc_353E4: movsd xmm0, [rbp+var_30] movsd xmm2, cs:qword_158C50 movaps xmm1, xmm0 subsd xmm1, xmm2 cvttsd2si rcx, xmm1 cvttsd2si rax, xmm0 mov rdx, rax sar rdx, 3Fh and rcx, rdx or rax, rcx mov [rbp+var_50], rax loc_35413: mov rax, [rbp+var_50] mov [rbp+var_18], rax jmp short loc_35443 loc_3541D: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 10 mov rax, [rax] mov [rbp+var_20], rax jmp short loc_35443 loc_3542A: mov rax, [rbp+var_8]; jumptable 0000000000035276 case 11 mov rax, [rax] mov [rbp+var_18], rax jmp short loc_35443 def_35276: jmp short $+2; jumptable 0000000000035276 default case, case 7 loc_35439: jmp short $+2 loc_3543B: mov [rbp+var_18], 0 loc_35443: cmp [rbp+var_20], 0 jle short loc_35454 mov rax, [rbp+var_20] mov [rbp+var_58], rax jmp short loc_3545C loc_35454: mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_3545C: mov rax, [rbp+var_58] pop rbp retn
long long ma_retrieve_auto_increment(float *a1, char a2) { long long v4; // [rsp+8h] [rbp-50h] long long v5; // [rsp+10h] [rbp-48h] signed int v6; // [rsp+1Ch] [rbp-3Ch] long long v7; // [rsp+38h] [rbp-20h] long long v8; // [rsp+40h] [rbp-18h] v8 = 0LL; v7 = 0LL; switch ( a2 ) { case 2: v8 = *(unsigned __int8 *)a1; break; case 3: v7 = *(__int16 *)a1; break; case 4: v7 = *(int *)a1; break; case 5: if ( *a1 >= 0.0 ) v5 = (unsigned int)(int)*a1; else v5 = 0LL; v8 = v5; break; case 6: if ( *(double *)a1 >= 0.0 ) v4 = (unsigned int)(int)*(double *)a1; else v4 = 0LL; v8 = v4; break; case 8: v8 = *(unsigned __int16 *)a1; break; case 9: v8 = *(unsigned int *)a1; break; case 10: v7 = *(_QWORD *)a1; break; case 11: v8 = *(_QWORD *)a1; break; case 12: if ( (*((_BYTE *)a1 + 2) & 0x80) != 0 ) v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16) | 0xFF000000; else v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16); v7 = v6; break; case 13: v8 = (*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*(unsigned __int16 *)a1; break; case 14: v7 = *(char *)a1; break; default: v8 = 0LL; break; } if ( v7 <= 0 ) return v8; else return v7; }
ma_retrieve_auto_increment: PUSH RBP MOV RBP,RSP MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x0 MOVZX EAX,byte ptr [RBP + -0x9] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x38],RCX SUB EAX,0xc JA 0x00135437 MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x258d48] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_e: MOV RAX,qword ptr [RBP + -0x8] MOVSX RAX,byte ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00135443 caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOVSX RAX,word ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00135443 caseD_8: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_4: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RAX,dword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00135443 caseD_9: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_c: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0x80 CMP EAX,0x0 JZ 0x00135316 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x10 OR EAX,0xff000000 MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] OR EAX,ECX MOV dword ptr [RBP + -0x3c],EAX JMP 0x0013533a LAB_00135316: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x10 MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] OR EAX,ECX MOV dword ptr [RBP + -0x3c],EAX LAB_0013533a: MOV EAX,dword ptr [RBP + -0x3c] CDQE MOV qword ptr [RBP + -0x20],RAX JMP 0x00135443 caseD_d: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_5: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RBP + -0x24] JBE 0x0013538e XOR EAX,EAX MOV qword ptr [RBP + -0x48],RAX JMP 0x001353bd LAB_0013538e: MOVSS XMM0,dword ptr [RBP + -0x24] MOVSS XMM2,dword ptr [0x00251004] MOVAPS XMM1,XMM0 SUBSS XMM1,XMM2 CVTTSS2SI RCX,XMM1 CVTTSS2SI RAX,XMM0 MOV RDX,RAX SAR RDX,0x3f AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX LAB_001353bd: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_6: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX XORPS XMM0,XMM0 UCOMISD XMM0,qword ptr [RBP + -0x30] JBE 0x001353e4 XOR EAX,EAX MOV qword ptr [RBP + -0x50],RAX JMP 0x00135413 LAB_001353e4: MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD XMM2,qword ptr [0x00258c50] MOVAPS XMM1,XMM0 SUBSD XMM1,XMM2 CVTTSD2SI RCX,XMM1 CVTTSD2SI RAX,XMM0 MOV RDX,RAX SAR RDX,0x3f AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_00135413: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_a: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00135443 caseD_b: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00135443 caseD_7: JMP 0x00135439 LAB_00135439: JMP 0x0013543b LAB_0013543b: MOV qword ptr [RBP + -0x18],0x0 LAB_00135443: CMP qword ptr [RBP + -0x20],0x0 JLE 0x00135454 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX JMP 0x0013545c LAB_00135454: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX LAB_0013545c: MOV RAX,qword ptr [RBP + -0x58] POP RBP RET
double ma_retrieve_auto_increment(double *param_1,int1 param_2) { float fVar1; double dVar2; double local_60; double local_58; double local_50; uint local_44; double local_28; double local_20; local_20 = 0.0; local_28 = 0.0; switch(param_2) { case 2: local_20 = (double)(ulong)*(byte *)param_1; break; case 3: local_28 = (double)(long)(short)*(ushort *)param_1; break; case 4: local_28 = (double)(long)(int)*(float *)param_1; break; case 5: fVar1 = *(float *)param_1; if (0.0 <= fVar1) { local_50 = (double)((long)fVar1 | (long)(fVar1 - DAT_00251004) & (long)fVar1 >> 0x3f); } else { local_50 = 0.0; } local_20 = local_50; break; case 6: dVar2 = *param_1; if (0.0 <= dVar2) { local_58 = (double)((long)dVar2 | (long)(dVar2 - DAT_00258c50) & (long)dVar2 >> 0x3f); } else { local_58 = 0.0; } local_20 = local_58; break; default: local_20 = 0.0; break; case 8: local_20 = (double)(ulong)*(ushort *)param_1; break; case 9: local_20 = (double)(ulong)(uint)*(float *)param_1; break; case 10: local_28 = *param_1; break; case 0xb: local_20 = *param_1; break; case 0xc: if (((ulong)*param_1 & 0x800000) == 0) { local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 | (uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1; } else { local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 | 0xff000000 | (uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1; } local_28 = (double)(long)(int)local_44; break; case 0xd: local_20 = (double)(ulong)*(uint3 *)param_1; break; case 0xe: local_28 = (double)(long)(char)*(byte *)param_1; } if ((long)local_28 < 1) { local_60 = local_20; } else { local_60 = local_28; } return local_60; }
55,349
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O3
c
tailoring_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x690(%rdi), %r13 leaq (%rdx,%r13), %rax addq $0x40, %rax cmpq %rax, 0x698(%rdi) jbe 0x74dcb movq 0x688(%rbx), %rax jmp 0x74e0f movq %r9, %r14 addq %r15, %r13 movq 0x688(%rbx), %rdi movq 0x7a8(%rbx), %rax movq 0x90(%rax), %rax addq $0x8040, %r13 # imm = 0x8040 movq %r13, 0x698(%rbx) movq %r13, %rsi callq *%rax movq %rax, 0x688(%rbx) testq %rax, %rax je 0x74e52 movq 0x690(%rbx), %r13 movq %r14, %r9 addq %rax, %r13 xorl %r14d, %r14d movq %r13, %rdi movl $0x1, %esi movq $-0x1, %rdx movq %r12, %rcx movl %r15d, %r8d xorl %eax, %eax callq 0x26200 movq %r13, %rdi callq 0x26150 addq %rax, 0x690(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %r14d jmp 0x74e40
tailoring_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r9, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov r13, [rdi+690h] lea rax, [rdx+r13] add rax, 40h ; '@' cmp [rdi+698h], rax jbe short loc_74DCB mov rax, [rbx+688h] jmp short loc_74E0F loc_74DCB: mov r14, r9 add r13, r15 mov rdi, [rbx+688h] mov rax, [rbx+7A8h] mov rax, [rax+90h] add r13, 8040h mov [rbx+698h], r13 mov rsi, r13 call rax mov [rbx+688h], rax test rax, rax jz short loc_74E52 mov r13, [rbx+690h] mov r9, r14 loc_74E0F: add r13, rax xor r14d, r14d mov rdi, r13 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh mov rcx, r12 mov r8d, r15d xor eax, eax call ___sprintf_chk mov rdi, r13 call _strlen add [rbx+690h], rax loc_74E40: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_74E52: mov r14d, 1 jmp short loc_74E40
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4) { long long v4; // rax long long v5; // r9 unsigned int v6; // r15d long long v8; // r13 long long v9; // rax long long v11; // rdi long long ( *v12)(long long, long long); // rax long long v13; // r13 long long v14; // r13 unsigned int v15; // r14d long long v17; // [rsp-8h] [rbp-30h] v17 = v4; v5 = a4; v6 = a3; v8 = a1[210]; if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) ) { v11 = a1[209]; v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL); v13 = a3 + v8 + 32832; a1[211] = v13; v9 = v12(v11, v13); a1[209] = v9; if ( !v9 ) return 1; v8 = a1[210]; v5 = a4; } else { v9 = a1[209]; } v14 = v9 + v8; v15 = 0; __sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17); a1[210] += strlen(v14); return v15; }
tailoring_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R9,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x690] LEA RAX,[RDX + R13*0x1] ADD RAX,0x40 CMP qword ptr [RDI + 0x698],RAX JBE 0x00174dcb MOV RAX,qword ptr [RBX + 0x688] JMP 0x00174e0f LAB_00174dcb: MOV R14,R9 ADD R13,R15 MOV RDI,qword ptr [RBX + 0x688] MOV RAX,qword ptr [RBX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] ADD R13,0x8040 MOV qword ptr [RBX + 0x698],R13 MOV RSI,R13 CALL RAX MOV qword ptr [RBX + 0x688],RAX TEST RAX,RAX JZ 0x00174e52 MOV R13,qword ptr [RBX + 0x690] MOV R9,R14 LAB_00174e0f: ADD R13,RAX XOR R14D,R14D MOV RDI,R13 MOV ESI,0x1 MOV RDX,-0x1 MOV RCX,R12 MOV R8D,R15D XOR EAX,EAX CALL 0x00126200 MOV RDI,R13 CALL 0x00126150 ADD qword ptr [RBX + 0x690],RAX LAB_00174e40: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00174e52: MOV R14D,0x1 JMP 0x00174e40
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4) { code *pcVar1; long lVar2; size_t sVar3; long lVar4; lVar4 = *(long *)(param_1 + 0x690); if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) { lVar2 = *(long *)(param_1 + 0x688); } else { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); lVar4 = lVar4 + param_3 + 0x8040; *(long *)(param_1 + 0x698) = lVar4; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *(long *)(param_1 + 0x690); } __sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4); sVar3 = strlen((char *)(lVar4 + lVar2)); *(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3; return 0; }
55,350
remove_io_thread
eloqsql/mysys/mf_iocache.c
void remove_io_thread(IO_CACHE *cache) { IO_CACHE_SHARE *cshare= cache->share; uint total; DBUG_ENTER("remove_io_thread"); /* If the writer goes, it needs to flush the write cache. */ if (cache == cshare->source_cache) flush_io_cache(cache); mysql_mutex_lock(&cshare->mutex); DBUG_PRINT("io_cache_share", ("%s: %p", (cache == cshare->source_cache) ? "writer" : "reader", cache)); /* Remove from share. */ total= --cshare->total_threads; DBUG_PRINT("io_cache_share", ("remaining threads: %u", total)); /* Detach from share. */ cache->share= NULL; /* If the writer goes, let the readers know. */ if (cache == cshare->source_cache) { DBUG_PRINT("io_cache_share", ("writer leaves")); cshare->source_cache= NULL; } /* If all threads are waiting for me to join the lock, wake them. */ if (!--cshare->running_threads) { DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all")); mysql_cond_signal(&cshare->cond_writer); mysql_cond_broadcast(&cshare->cond); } mysql_mutex_unlock(&cshare->mutex); if (!total) { DBUG_PRINT("io_cache_share", ("last thread removed, destroy share")); mysql_cond_destroy (&cshare->cond_writer); mysql_cond_destroy (&cshare->cond); mysql_mutex_destroy(&cshare->mutex); } DBUG_VOID_RETURN; }
O0
c
remove_io_thread: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0xc0(%rcx), %rax jne 0xe16da movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0xe0be0 movq -0x10(%rbp), %rdi leaq 0x72ac9(%rip), %rsi # 0x1541ae movl $0x392, %edx # imm = 0x392 callq 0xe17c0 jmp 0xe16f1 movq -0x10(%rbp), %rcx movl 0xdc(%rcx), %eax addl $-0x1, %eax movl %eax, 0xdc(%rcx) movl %eax, -0x14(%rbp) jmp 0xe1709 movq -0x8(%rbp), %rax movq $0x0, 0x98(%rax) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0xc0(%rcx), %rax jne 0xe173c jmp 0xe172b jmp 0xe172d movq -0x10(%rbp), %rax movq $0x0, 0xc0(%rax) movq -0x10(%rbp), %rcx movl 0xd8(%rcx), %eax addl $-0x1, %eax movl %eax, 0xd8(%rcx) cmpl $0x0, %eax jne 0xe1775 jmp 0xe1756 jmp 0xe1758 movq -0x10(%rbp), %rdi addq $0x80, %rdi callq 0xe1830 movq -0x10(%rbp), %rdi addq $0x48, %rdi callq 0xe1890 movq -0x10(%rbp), %rdi callq 0xe18f0 cmpl $0x0, -0x14(%rbp) jne 0xe17ae jmp 0xe1786 jmp 0xe1788 movq -0x10(%rbp), %rdi addq $0x80, %rdi callq 0xe1950 movq -0x10(%rbp), %rdi addq $0x48, %rdi callq 0xe1950 movq -0x10(%rbp), %rdi callq 0xe19c0 jmp 0xe17b0 jmp 0xe17b2 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
remove_io_thread: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] cmp rax, [rcx+0C0h] jnz short loc_E16DA mov rdi, [rbp+var_8] mov esi, 1 call my_b_flush_io_cache loc_E16DA: mov rdi, [rbp+var_10] lea rsi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 392h call inline_mysql_mutex_lock_23 jmp short $+2 loc_E16F1: mov rcx, [rbp+var_10] mov eax, [rcx+0DCh] add eax, 0FFFFFFFFh mov [rcx+0DCh], eax mov [rbp+var_14], eax jmp short $+2 loc_E1709: mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0 mov rax, [rbp+var_8] mov rcx, [rbp+var_10] cmp rax, [rcx+0C0h] jnz short loc_E173C jmp short $+2 loc_E172B: jmp short $+2 loc_E172D: mov rax, [rbp+var_10] mov qword ptr [rax+0C0h], 0 loc_E173C: mov rcx, [rbp+var_10] mov eax, [rcx+0D8h] add eax, 0FFFFFFFFh mov [rcx+0D8h], eax cmp eax, 0 jnz short loc_E1775 jmp short $+2 loc_E1756: jmp short $+2 loc_E1758: mov rdi, [rbp+var_10] add rdi, 80h call inline_mysql_cond_signal_1 mov rdi, [rbp+var_10] add rdi, 48h ; 'H' call inline_mysql_cond_broadcast_2 loc_E1775: mov rdi, [rbp+var_10] call inline_mysql_mutex_unlock_24 cmp [rbp+var_14], 0 jnz short loc_E17AE jmp short $+2 loc_E1786: jmp short $+2 loc_E1788: mov rdi, [rbp+var_10] add rdi, 80h call inline_mysql_cond_destroy_3 mov rdi, [rbp+var_10] add rdi, 48h ; 'H' call inline_mysql_cond_destroy_3 mov rdi, [rbp+var_10] call inline_mysql_mutex_destroy_6 loc_E17AE: jmp short $+2 loc_E17B0: jmp short $+2 loc_E17B2: add rsp, 20h pop rbp retn
long long remove_io_thread(long long a1) { int v1; // eax int v2; // eax long long result; // rax int v4; // [rsp+Ch] [rbp-14h] long long v5; // [rsp+10h] [rbp-10h] v5 = *(_QWORD *)(a1 + 152); if ( a1 == *(_QWORD *)(v5 + 192) ) my_b_flush_io_cache(a1, 1); inline_mysql_mutex_lock_23(v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 914LL); v1 = *(_DWORD *)(v5 + 220) - 1; *(_DWORD *)(v5 + 220) = v1; v4 = v1; *(_QWORD *)(a1 + 152) = 0LL; if ( a1 == *(_QWORD *)(v5 + 192) ) *(_QWORD *)(v5 + 192) = 0LL; v2 = *(_DWORD *)(v5 + 216) - 1; *(_DWORD *)(v5 + 216) = v2; if ( !v2 ) { inline_mysql_cond_signal_1(v5 + 128); inline_mysql_cond_broadcast_2(v5 + 72); } result = inline_mysql_mutex_unlock_24(v5); if ( !v4 ) { inline_mysql_cond_destroy_3(v5 + 128); inline_mysql_cond_destroy_3(v5 + 72); return inline_mysql_mutex_destroy_6(v5); } return result; }
remove_io_thread: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0xc0] JNZ 0x001e16da MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x001e0be0 LAB_001e16da: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2541ae] MOV EDX,0x392 CALL 0x001e17c0 JMP 0x001e16f1 LAB_001e16f1: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0xdc] ADD EAX,-0x1 MOV dword ptr [RCX + 0xdc],EAX MOV dword ptr [RBP + -0x14],EAX JMP 0x001e1709 LAB_001e1709: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0xc0] JNZ 0x001e173c JMP 0x001e172b LAB_001e172b: JMP 0x001e172d LAB_001e172d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],0x0 LAB_001e173c: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0xd8] ADD EAX,-0x1 MOV dword ptr [RCX + 0xd8],EAX CMP EAX,0x0 JNZ 0x001e1775 JMP 0x001e1756 LAB_001e1756: JMP 0x001e1758 LAB_001e1758: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x80 CALL 0x001e1830 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x48 CALL 0x001e1890 LAB_001e1775: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e18f0 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001e17ae JMP 0x001e1786 LAB_001e1786: JMP 0x001e1788 LAB_001e1788: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x80 CALL 0x001e1950 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x48 CALL 0x001e1950 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e19c0 LAB_001e17ae: JMP 0x001e17b0 LAB_001e17b0: JMP 0x001e17b2 LAB_001e17b2: ADD RSP,0x20 POP RBP RET
void remove_io_thread(long param_1) { long lVar1; int iVar2; int iVar3; lVar1 = *(long *)(param_1 + 0x98); if (param_1 == *(long *)(lVar1 + 0xc0)) { my_b_flush_io_cache(param_1,1); } inline_mysql_mutex_lock(lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392) ; iVar2 = *(int *)(lVar1 + 0xdc) + -1; *(int *)(lVar1 + 0xdc) = iVar2; *(int8 *)(param_1 + 0x98) = 0; if (param_1 == *(long *)(lVar1 + 0xc0)) { *(int8 *)(lVar1 + 0xc0) = 0; } iVar3 = *(int *)(lVar1 + 0xd8) + -1; *(int *)(lVar1 + 0xd8) = iVar3; if (iVar3 == 0) { inline_mysql_cond_signal(lVar1 + 0x80); inline_mysql_cond_broadcast(lVar1 + 0x48); } inline_mysql_mutex_unlock(lVar1); if (iVar2 == 0) { inline_mysql_cond_destroy(lVar1 + 0x80); inline_mysql_cond_destroy(lVar1 + 0x48); inline_mysql_mutex_destroy(lVar1); } return; }
55,351
remove_io_thread
eloqsql/mysys/mf_iocache.c
void remove_io_thread(IO_CACHE *cache) { IO_CACHE_SHARE *cshare= cache->share; uint total; DBUG_ENTER("remove_io_thread"); /* If the writer goes, it needs to flush the write cache. */ if (cache == cshare->source_cache) flush_io_cache(cache); mysql_mutex_lock(&cshare->mutex); DBUG_PRINT("io_cache_share", ("%s: %p", (cache == cshare->source_cache) ? "writer" : "reader", cache)); /* Remove from share. */ total= --cshare->total_threads; DBUG_PRINT("io_cache_share", ("remaining threads: %u", total)); /* Detach from share. */ cache->share= NULL; /* If the writer goes, let the readers know. */ if (cache == cshare->source_cache) { DBUG_PRINT("io_cache_share", ("writer leaves")); cshare->source_cache= NULL; } /* If all threads are waiting for me to join the lock, wake them. */ if (!--cshare->running_threads) { DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all")); mysql_cond_signal(&cshare->cond_writer); mysql_cond_broadcast(&cshare->cond); } mysql_mutex_unlock(&cshare->mutex); if (!total) { DBUG_PRINT("io_cache_share", ("last thread removed, destroy share")); mysql_cond_destroy (&cshare->cond_writer); mysql_cond_destroy (&cshare->cond); mysql_mutex_destroy(&cshare->mutex); } DBUG_VOID_RETURN; }
O3
c
remove_io_thread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x98(%rdi), %rbx cmpq %rdi, 0xc0(%rbx) jne 0x95e5f movq %r14, %rdi movl $0x1, %esi callq 0x95561 cmpq $0x0, 0x40(%rbx) jne 0x95f6f movq %rbx, %rdi callq 0x29220 movl 0xdc(%rbx), %r15d decl %r15d movl %r15d, 0xdc(%rbx) movq $0x0, 0x98(%r14) cmpq %r14, 0xc0(%rbx) jne 0x95ea2 movq $0x0, 0xc0(%rbx) decl 0xd8(%rbx) jne 0x95ee2 leaq 0x80(%rbx), %r14 movq 0xb0(%rbx), %rdi testq %rdi, %rdi jne 0x95f9d movq %r14, %rdi callq 0x295c0 leaq 0x48(%rbx), %r14 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x95fb2 movq %r14, %rdi callq 0x296f0 movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x95f88 movq %rbx, %rdi callq 0x291e0 testl %r15d, %r15d je 0x95f07 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x80(%rbx), %r14 movq 0xb0(%rbx), %rdi testq %rdi, %rdi jne 0x95fc7 movq %r14, %rdi callq 0x29280 leaq 0x48(%rbx), %r14 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x95fe4 movq %r14, %rdi callq 0x29280 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x95f5d leaq 0x2f00c1(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x290c0 leaq 0x463b9(%rip), %rsi # 0xdc32f movq %rbx, %rdi movl $0x392, %edx # imm = 0x392 callq 0x2eb8f jmp 0x95e72 leaq 0x2f0081(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x95eef leaq 0x2f006c(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x170(%rax) jmp 0x95ec1 leaq 0x2f0057(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x178(%rax) jmp 0x95eda leaq 0x2f0042(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0xb0(%rbx) jmp 0x95f1e leaq 0x2f0025(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0x78(%rbx) jmp 0x95f37
remove_io_thread: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi mov rbx, [rdi+98h] cmp [rbx+0C0h], rdi jnz short loc_95E5F mov rdi, r14 mov esi, 1 call my_b_flush_io_cache loc_95E5F: cmp qword ptr [rbx+40h], 0 jnz loc_95F6F mov rdi, rbx call _pthread_mutex_lock loc_95E72: mov r15d, [rbx+0DCh] dec r15d mov [rbx+0DCh], r15d mov qword ptr [r14+98h], 0 cmp [rbx+0C0h], r14 jnz short loc_95EA2 mov qword ptr [rbx+0C0h], 0 loc_95EA2: dec dword ptr [rbx+0D8h] jnz short loc_95EE2 lea r14, [rbx+80h] mov rdi, [rbx+0B0h] test rdi, rdi jnz loc_95F9D loc_95EC1: mov rdi, r14 call _pthread_cond_signal lea r14, [rbx+48h] mov rdi, [rbx+78h] test rdi, rdi jnz loc_95FB2 loc_95EDA: mov rdi, r14 call _pthread_cond_broadcast loc_95EE2: mov rdi, [rbx+40h] test rdi, rdi jnz loc_95F88 loc_95EEF: mov rdi, rbx call _pthread_mutex_unlock test r15d, r15d jz short loc_95F07 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_95F07: lea r14, [rbx+80h] mov rdi, [rbx+0B0h] test rdi, rdi jnz loc_95FC7 loc_95F1E: mov rdi, r14 call _pthread_cond_destroy lea r14, [rbx+48h] mov rdi, [rbx+78h] test rdi, rdi jnz loc_95FE4 loc_95F37: mov rdi, r14 call _pthread_cond_destroy mov rdi, [rbx+40h] test rdi, rdi jz short loc_95F5D lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_95F5D: mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_destroy loc_95F6F: lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 392h call psi_mutex_lock jmp loc_95E72 loc_95F88: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_95EEF loc_95F9D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_95EC1 loc_95FB2: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+178h] jmp loc_95EDA loc_95FC7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+0B0h], 0 jmp loc_95F1E loc_95FE4: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+78h], 0 jmp loc_95F37
long long remove_io_thread(long long *a1) { long long v1; // rbx int v2; // r15d long long v4; // rdi long long v5; // rdi long long v6; // rdi long long result; // rax long long v8; // rdi long long v9; // rdi long long v10; // rdi v1 = a1[19]; if ( *(long long **)(v1 + 192) == a1 ) my_b_flush_io_cache(a1, 1); if ( *(_QWORD *)(v1 + 64) ) psi_mutex_lock(v1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x392u); else pthread_mutex_lock(v1); v2 = *(_DWORD *)(v1 + 220) - 1; *(_DWORD *)(v1 + 220) = v2; a1[19] = 0LL; if ( *(long long **)(v1 + 192) == a1 ) *(_QWORD *)(v1 + 192) = 0LL; if ( (*(_DWORD *)(v1 + 216))-- == 1 ) { v4 = *(_QWORD *)(v1 + 176); if ( v4 ) ((void ( *)(long long))PSI_server[46])(v4); pthread_cond_signal(v1 + 128); v5 = *(_QWORD *)(v1 + 120); if ( v5 ) ((void ( *)(long long))PSI_server[47])(v5); pthread_cond_broadcast(v1 + 72); } v6 = *(_QWORD *)(v1 + 64); if ( v6 ) ((void ( *)(long long))PSI_server[44])(v6); result = pthread_mutex_unlock(v1); if ( !v2 ) { v8 = *(_QWORD *)(v1 + 176); if ( v8 ) { ((void ( *)(long long))PSI_server[13])(v8); *(_QWORD *)(v1 + 176) = 0LL; } pthread_cond_destroy(v1 + 128); v9 = *(_QWORD *)(v1 + 120); if ( v9 ) { ((void ( *)(long long))PSI_server[13])(v9); *(_QWORD *)(v1 + 120) = 0LL; } pthread_cond_destroy(v1 + 72); v10 = *(_QWORD *)(v1 + 64); if ( v10 ) { ((void ( *)(long long))PSI_server[9])(v10); *(_QWORD *)(v1 + 64) = 0LL; } return pthread_mutex_destroy(v1); } return result; }
remove_io_thread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RDI + 0x98] CMP qword ptr [RBX + 0xc0],RDI JNZ 0x00195e5f MOV RDI,R14 MOV ESI,0x1 CALL 0x00195561 LAB_00195e5f: CMP qword ptr [RBX + 0x40],0x0 JNZ 0x00195f6f MOV RDI,RBX CALL 0x00129220 LAB_00195e72: MOV R15D,dword ptr [RBX + 0xdc] DEC R15D MOV dword ptr [RBX + 0xdc],R15D MOV qword ptr [R14 + 0x98],0x0 CMP qword ptr [RBX + 0xc0],R14 JNZ 0x00195ea2 MOV qword ptr [RBX + 0xc0],0x0 LAB_00195ea2: DEC dword ptr [RBX + 0xd8] JNZ 0x00195ee2 LEA R14,[RBX + 0x80] MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JNZ 0x00195f9d LAB_00195ec1: MOV RDI,R14 CALL 0x001295c0 LEA R14,[RBX + 0x48] MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x00195fb2 LAB_00195eda: MOV RDI,R14 CALL 0x001296f0 LAB_00195ee2: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x00195f88 LAB_00195eef: MOV RDI,RBX CALL 0x001291e0 TEST R15D,R15D JZ 0x00195f07 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00195f07: LEA R14,[RBX + 0x80] MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JNZ 0x00195fc7 LAB_00195f1e: MOV RDI,R14 CALL 0x00129280 LEA R14,[RBX + 0x48] MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x00195fe4 LAB_00195f37: MOV RDI,R14 CALL 0x00129280 MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00195f5d LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00195f5d: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001290c0 LAB_00195f6f: LEA RSI,[0x1dc32f] MOV RDI,RBX MOV EDX,0x392 CALL 0x0012eb8f JMP 0x00195e72 LAB_00195f88: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00195eef LAB_00195f9d: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00195ec1 LAB_00195fb2: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x178] JMP 0x00195eda LAB_00195fc7: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0xb0],0x0 JMP 0x00195f1e LAB_00195fe4: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x78],0x0 JMP 0x00195f37
void remove_io_thread(long param_1) { int *piVar1; pthread_mutex_t *__mutex; int iVar2; __mutex = *(pthread_mutex_t **)(param_1 + 0x98); if (*(long *)((long)__mutex + 0xc0) == param_1) { my_b_flush_io_cache(param_1,1); } if (*(long *)((long)__mutex + 0x40) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392); } iVar2 = *(int *)((long)__mutex + 0xdc) + -1; *(int *)((long)__mutex + 0xdc) = iVar2; *(int8 *)(param_1 + 0x98) = 0; if (*(long *)((long)__mutex + 0xc0) == param_1) { *(int8 *)((long)__mutex + 0xc0) = 0; } piVar1 = (int *)((long)__mutex + 0xd8); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { if (*(long *)((long)__mutex + 0xb0) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80)); if (__mutex[3].__align != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)((long)__mutex + 0x48)); } if (*(long *)((long)__mutex + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (iVar2 != 0) { return; } if (*(long *)((long)__mutex + 0xb0) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)((long)__mutex + 0xb0) = 0; } pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x80)); if (__mutex[3].__align != 0) { (**(code **)(PSI_server + 0x68))(); __mutex[3].__align = 0; } pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x48)); if (*(long *)((long)__mutex + 0x40) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)((long)__mutex + 0x40) = 0; } pthread_mutex_destroy(__mutex); return; }
55,352
my_strcasecmp_mb
eloqsql/strings/ctype-mb.c
int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) { register uint32 l; register const uchar *map=cs->to_upper; while (*s && *t) { /* Pointing after the '\0' is safe here. */ if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen))) { while (l--) if (*s++ != *t++) return 1; } else if (my_ci_charlen(cs, (const uchar *) t, (const uchar *) t + cs->mbmaxlen) > 1) return 1; else if (map[(uchar) *s++] != map[(uchar) *t++]) return 1; } /* At least one of '*s' and '*t' is zero here. */ return (*t != *s); }
O3
c
my_strcasecmp_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movb (%rsi), %cl testb %cl, %cl je 0xb30f7 cmpb $0x0, (%rbx) je 0xb30f9 movq %rsi, %r15 movq %rdi, %r14 movq 0x50(%rdi), %r12 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0xb30bc movl 0x9c(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x1, %ecx jg 0xb3107 movzbl (%r15), %ecx movb (%r12,%rcx), %cl movzbl (%rbx), %edx cmpb (%r12,%rdx), %cl jne 0xb3107 incq %r15 incq %rbx jmp 0xb30e5 movl %eax, %eax leaq (%r15,%rax), %rcx leaq (%rbx,%rax), %rdx xorl %esi, %esi cmpl %esi, %eax je 0xb30df movb (%r15,%rsi), %dil leaq 0x1(%rsi), %r8 cmpb (%rbx,%rsi), %dil movq %r8, %rsi je 0xb30c8 jmp 0xb3102 movq %rcx, %r15 movq %rdx, %rbx movb (%r15), %cl testb %cl, %cl je 0xb30f7 cmpb $0x0, (%rbx) jne 0xb3058 jmp 0xb30f9 xorl %ecx, %ecx xorl %eax, %eax cmpb %cl, (%rbx) setne %al jmp 0xb3107 movl $0x1, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strcasecmp_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov cl, [rsi] test cl, cl jz loc_B30F7 cmp byte ptr [rbx], 0 jz loc_B30F9 mov r15, rsi mov r14, rdi mov r12, [rdi+50h] loc_B3058: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_B30BC mov edx, [r14+9Ch] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 1 jg short loc_B3107 movzx ecx, byte ptr [r15] mov cl, [r12+rcx] movzx edx, byte ptr [rbx] cmp cl, [r12+rdx] jnz short loc_B3107 inc r15 inc rbx jmp short loc_B30E5 loc_B30BC: mov eax, eax lea rcx, [r15+rax] lea rdx, [rbx+rax] xor esi, esi loc_B30C8: cmp eax, esi jz short loc_B30DF mov dil, [r15+rsi] lea r8, [rsi+1] cmp dil, [rbx+rsi] mov rsi, r8 jz short loc_B30C8 jmp short loc_B3102 loc_B30DF: mov r15, rcx mov rbx, rdx loc_B30E5: mov cl, [r15] test cl, cl jz short loc_B30F7 cmp byte ptr [rbx], 0 jnz loc_B3058 jmp short loc_B30F9 loc_B30F7: xor ecx, ecx loc_B30F9: xor eax, eax cmp [rbx], cl setnz al jmp short loc_B3107 loc_B3102: mov eax, 1 loc_B3107: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 my_strcasecmp_mb(long long a1, unsigned __int8 *a2, _BYTE *a3) { _BYTE *v3; // rbx unsigned __int8 v4; // cl unsigned __int8 *v5; // r15 long long v6; // r12 int v7; // eax int v8; // ecx _BOOL8 result; // rax long long i; // rsi v3 = a3; v4 = *a2; if ( *a2 ) { if ( *a3 ) { v5 = a2; v6 = *(_QWORD *)(a1 + 80); do { v7 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v5, &v5[*(unsigned int *)(a1 + 156)]); if ( v7 >= 2 ) { for ( i = 0LL; v7 != (_DWORD)i; ++i ) { if ( v5[i] != v3[i] ) return 1LL; } v5 += (unsigned int)v7; v3 += (unsigned int)v7; } else { v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v3, &v3[*(unsigned int *)(a1 + 156)]); result = 1LL; if ( v8 > 1 || *(_BYTE *)(v6 + *v5) != *(_BYTE *)(v6 + (unsigned __int8)*v3) ) return result; ++v5; ++v3; } v4 = *v5; if ( !*v5 ) goto LABEL_16; } while ( *v3 ); } } else { LABEL_16: v4 = 0; } return *v3 != v4; }
my_strcasecmp_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV CL,byte ptr [RSI] TEST CL,CL JZ 0x001b30f7 CMP byte ptr [RBX],0x0 JZ 0x001b30f9 MOV R15,RSI MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] LAB_001b3058: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x001b30bc MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x1 JG 0x001b3107 MOVZX ECX,byte ptr [R15] MOV CL,byte ptr [R12 + RCX*0x1] MOVZX EDX,byte ptr [RBX] CMP CL,byte ptr [R12 + RDX*0x1] JNZ 0x001b3107 INC R15 INC RBX JMP 0x001b30e5 LAB_001b30bc: MOV EAX,EAX LEA RCX,[R15 + RAX*0x1] LEA RDX,[RBX + RAX*0x1] XOR ESI,ESI LAB_001b30c8: CMP EAX,ESI JZ 0x001b30df MOV DIL,byte ptr [R15 + RSI*0x1] LEA R8,[RSI + 0x1] CMP DIL,byte ptr [RBX + RSI*0x1] MOV RSI,R8 JZ 0x001b30c8 JMP 0x001b3102 LAB_001b30df: MOV R15,RCX MOV RBX,RDX LAB_001b30e5: MOV CL,byte ptr [R15] TEST CL,CL JZ 0x001b30f7 CMP byte ptr [RBX],0x0 JNZ 0x001b3058 JMP 0x001b30f9 LAB_001b30f7: XOR ECX,ECX LAB_001b30f9: XOR EAX,EAX CMP byte ptr [RBX],CL SETNZ AL JMP 0x001b3107 LAB_001b3102: MOV EAX,0x1 LAB_001b3107: POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool my_strcasecmp_mb(long param_1,byte *param_2,byte *param_3) { byte *pbVar1; byte *pbVar2; long lVar3; uint uVar4; int iVar5; byte bVar6; byte *pbVar7; long lVar8; byte *pbVar9; bVar6 = *param_2; if (bVar6 == 0) { LAB_001b30f7: bVar6 = 0; } else if (*param_3 != 0) { lVar3 = *(long *)(param_1 + 0x50); pbVar7 = param_3; do { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,param_2 + *(uint *)(param_1 + 0x9c)); if ((int)uVar4 < 2) { iVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar7,pbVar7 + *(uint *)(param_1 + 0x9c)); if (1 < iVar5) { return true; } if (*(char *)(lVar3 + (ulong)*param_2) != *(char *)(lVar3 + (ulong)*pbVar7)) { return true; } pbVar9 = param_2 + 1; param_3 = pbVar7 + 1; } else { pbVar9 = param_2 + uVar4; param_3 = pbVar7 + uVar4; lVar8 = 0; while (uVar4 != (uint)lVar8) { pbVar1 = param_2 + lVar8; pbVar2 = pbVar7 + lVar8; lVar8 = lVar8 + 1; if (*pbVar1 != *pbVar2) { return true; } } } bVar6 = *pbVar9; if (bVar6 == 0) goto LAB_001b30f7; pbVar7 = param_3; param_2 = pbVar9; } while (*param_3 != 0); } return *param_3 != bVar6; }
55,353
maria_page_get_lsn
eloqsql/storage/maria/ma_blockrec.c
TRANSLOG_ADDRESS maria_page_get_lsn(uchar *page, pgcache_page_no_t page_no __attribute__((unused)), uchar* data_ptr __attribute__((unused))) { #ifndef DBUG_OFF const MARIA_SHARE *share= (MARIA_SHARE*)data_ptr; DBUG_ASSERT(share->page_type == PAGECACHE_LSN_PAGE && share->now_transactional); #endif return lsn_korr(page); }
O0
c
maria_page_get_lsn: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x8(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax popq %rbp retq nopw %cs:(%rax,%rax)
maria_page_get_lsn: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_8] mov ecx, [rcx+3] or rax, rcx pop rbp retn
unsigned long long maria_page_get_lsn(unsigned __int16 *a1) { return *(unsigned int *)((char *)a1 + 3) | ((unsigned long long)((*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*a1) << 32); }
maria_page_get_lsn: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX POP RBP RET
ulong maria_page_get_lsn(int3 *param_1) { return (ulong)CONCAT34(*param_1,*(int4 *)((long)param_1 + 3)); }
55,354
maria_page_get_lsn
eloqsql/storage/maria/ma_blockrec.c
TRANSLOG_ADDRESS maria_page_get_lsn(uchar *page, pgcache_page_no_t page_no __attribute__((unused)), uchar* data_ptr __attribute__((unused))) { #ifndef DBUG_OFF const MARIA_SHARE *share= (MARIA_SHARE*)data_ptr; DBUG_ASSERT(share->page_type == PAGECACHE_LSN_PAGE && share->now_transactional); #endif return lsn_korr(page); }
O3
c
maria_page_get_lsn: pushq %rbp movq %rsp, %rbp movzwl (%rdi), %eax shlq $0x20, %rax movzbl 0x2(%rdi), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x3(%rdi), %eax orq %rcx, %rax popq %rbp retq
maria_page_get_lsn: push rbp mov rbp, rsp movzx eax, word ptr [rdi] shl rax, 20h movzx ecx, byte ptr [rdi+2] shl rcx, 30h or rcx, rax mov eax, [rdi+3] or rax, rcx pop rbp retn
unsigned long long maria_page_get_lsn(unsigned __int16 *a1) { return ((unsigned long long)*a1 << 32) | ((unsigned long long)*((unsigned __int8 *)a1 + 2) << 48) | *(unsigned int *)((char *)a1 + 3); }
maria_page_get_lsn: PUSH RBP MOV RBP,RSP MOVZX EAX,word ptr [RDI] SHL RAX,0x20 MOVZX ECX,byte ptr [RDI + 0x2] SHL RCX,0x30 OR RCX,RAX MOV EAX,dword ptr [RDI + 0x3] OR RAX,RCX POP RBP RET
ulong maria_page_get_lsn(ushort *param_1) { return (ulong)*(uint *)((long)param_1 + 3) | (ulong)(byte)param_1[1] << 0x30 | (ulong)*param_1 << 0x20; }
55,355
mysql_stmt_next_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { int rc= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (!mysql_stmt_more_results(stmt)) return(-1); if (stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE) madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA); stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE; if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT) stmt->mysql->status= MYSQL_STATUS_STMT_RESULT; if (stmt->mysql->field_count) rc= madb_alloc_stmt_fields(stmt); else { stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.last_insert_id= stmt->mysql->insert_id; stmt->upsert_status.server_status= stmt->mysql->server_status; stmt->upsert_status.warning_count= stmt->mysql->warning_count; } stmt->field_count= stmt->mysql->field_count; stmt->result.rows= 0; return(rc); }
O3
c
mysql_stmt_next_result: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x220df movl 0x50(%rbx), %eax cmpl $0x1, %eax ja 0x22125 movl $0x7de, %r15d # imm = 0x7DE movl %r15d, 0x90(%rdi) movl $0x297, %edi # imm = 0x297 addq 0x38(%rbx), %rdi leaq 0x269c9(%rip), %r12 # 0x48a30 movq (%r12), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%rbx), %rdi leaq 0x269ad(%rip), %r13 # 0x48a40 movq 0x70(%r13), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%rbx), %rax movb %r14b, 0x296(%rax) movl %r15d, 0x108(%rbx) leaq 0x30d(%rbx), %rdi movq (%r12), %rsi movl $0x5, %edx callq 0x13220 movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movq 0x70(%r13), %rsi jmp 0x221b2 movl $0x7dd, 0x108(%rbx) # imm = 0x7DD leaq 0x30d(%rbx), %rdi leaq 0x26939(%rip), %rax # 0x48a30 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x26924(%rip), %rax # 0x48a40 movq 0x68(%rax), %rsi jmp 0x221b2 movzwl 0x380(%rdi), %ecx testl $0x1008, %ecx # imm = 0x1008 je 0x221db cmpl $0x2, %eax sete %cl cmpl $0x6, %eax setae %al orb %cl, %al jne 0x22159 movq %rbx, %rdi movl $0xb, %esi callq 0x20718 movq 0x38(%rbx), %rdi movl $0x3, 0x50(%rbx) callq 0x1985d testl %eax, %eax je 0x221e3 movl $0x6, 0x50(%rbx) movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) leaq 0x30d(%rbx), %rdi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movl $0x1, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x221c9 movq 0x38(%rbx), %r15 cmpl $0x1, 0x488(%r15) jne 0x22200 movl $0x8, 0x488(%r15) movq 0x38(%rbx), %r15 movl 0x37c(%r15), %eax testl %eax, %eax je 0x2226f movq 0x340(%rbx), %r14 movl %eax, 0x60(%rbx) cmpq $0x0, 0x2f8(%r15) je 0x22304 movq %r14, %rdi xorl %esi, %esi callq 0x1dc3f movq 0x2f8(%r15), %rdi movl 0x37c(%r15), %esi movq %r14, %rdx callq 0x1acfe movq %rax, 0x58(%rbx) testq %rax, %rax je 0x222aa movl 0x60(%rbx), %eax imulq $0x70, %rax, %rsi movq %r14, %rdi callq 0x1db27 movq %rax, 0x78(%rbx) testq %rax, %rax je 0x222aa movq %rax, %rdi movl 0x60(%rbx), %eax jmp 0x22308 movq 0x338(%r15), %rax movq %rax, 0xf8(%rbx) movq 0x340(%r15), %rax movq %rax, 0x100(%rbx) movl 0x380(%r15), %eax movl %eax, 0xf4(%rbx) movl 0x388(%r15), %eax movl %eax, 0xf0(%rbx) xorl %r14d, %r14d jmp 0x2231f movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x2676e(%rip), %rax # 0x48a30 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x26759(%rip), %rax # 0x48a40 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movl $0x1, %r14d jmp 0x2231f movq 0x78(%rbx), %rdi movl %eax, %eax imulq $0x70, %rax, %rdx xorl %r14d, %r14d xorl %esi, %esi callq 0x13260 movb $0x0, 0xe8(%rbx) movq 0x38(%rbx), %rax movl 0x37c(%rax), %eax movl %eax, 0x60(%rbx) movq $0x0, 0xc8(%rbx) jmp 0x221c9
mysql_stmt_next_result: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+38h] test rdi, rdi jz loc_220DF mov eax, [rbx+50h] cmp eax, 1 ja loc_22125 mov r15d, 7DEh mov [rdi+90h], r15d mov edi, 297h add rdi, [rbx+38h] lea r12, SQLSTATE_UNKNOWN mov rsi, [r12] mov edx, 5 call _strncpy mov rax, [rbx+38h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+38h] lea r13, client_errors mov rsi, [r13+70h] mov edx, 1FFh call _strncpy mov rax, [rbx+38h] mov [rax+296h], r14b mov [rbx+108h], r15d lea rdi, [rbx+30Dh] mov rsi, [r12] mov edx, 5 call _strncpy mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov rsi, [r13+70h] jmp loc_221B2 loc_220DF: mov dword ptr [rbx+108h], 7DDh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+68h] jmp loc_221B2 loc_22125: movzx ecx, word ptr [rdi+380h] test ecx, 1008h jz loc_221DB cmp eax, 2 setz cl cmp eax, 6 setnb al or al, cl jnz short loc_22159 mov rdi, rbx mov esi, 0Bh call madb_reset_stmt mov rdi, [rbx+38h] loc_22159: mov dword ptr [rbx+50h], 3 call mysql_next_result test eax, eax jz short loc_221E3 mov dword ptr [rbx+50h], 6 mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax lea rdi, [rbx+30Dh] add rsi, 297h mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov esi, 97h add rsi, [rbx+38h] loc_221B2: mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14d, 1 loc_221C9: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_221DB: mov r14d, 0FFFFFFFFh jmp short loc_221C9 loc_221E3: mov r15, [rbx+38h] cmp dword ptr [r15+488h], 1 jnz short loc_22200 mov dword ptr [r15+488h], 8 mov r15, [rbx+38h] loc_22200: mov eax, [r15+37Ch] test eax, eax jz short loc_2226F mov r14, [rbx+340h] mov [rbx+60h], eax cmp qword ptr [r15+2F8h], 0 jz loc_22304 mov rdi, r14 xor esi, esi call ma_free_root mov rdi, [r15+2F8h] mov esi, [r15+37Ch] mov rdx, r14 call ma_duplicate_resultset_metadata mov [rbx+58h], rax test rax, rax jz short loc_222AA mov eax, [rbx+60h] imul rsi, rax, 70h ; 'p' mov rdi, r14 call ma_alloc_root mov [rbx+78h], rax test rax, rax jz short loc_222AA mov rdi, rax mov eax, [rbx+60h] jmp loc_22308 loc_2226F: mov rax, [r15+338h] mov [rbx+0F8h], rax mov rax, [r15+340h] mov [rbx+100h], rax mov eax, [r15+380h] mov [rbx+0F4h], eax mov eax, [r15+388h] mov [rbx+0F0h], eax xor r14d, r14d jmp short loc_2231F loc_222AA: mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14d, 1 jmp short loc_2231F loc_22304: mov rdi, [rbx+78h] loc_22308: mov eax, eax imul rdx, rax, 70h ; 'p' xor r14d, r14d xor esi, esi call _memset mov byte ptr [rbx+0E8h], 0 loc_2231F: mov rax, [rbx+38h] mov eax, [rax+37Ch] mov [rbx+60h], eax mov qword ptr [rbx+0C8h], 0 jmp loc_221C9
long long mysql_stmt_next_result(long long a1) { long long v2; // rdi unsigned int v3; // eax long long v4; // rdi char *v5; // rsi long long v6; // rsi unsigned int v7; // r14d long long v9; // r15 unsigned int v10; // eax long long v11; // r14 long long v12; // rax char *v13; // rax char *v14; // rdi v2 = *(_QWORD *)(a1 + 56); if ( !v2 ) { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = client_errors[13]; goto LABEL_10; } v3 = *(_DWORD *)(a1 + 80); if ( v3 > 1 ) { if ( (*(_WORD *)(v2 + 896) & 0x1008) == 0 ) return (unsigned int)-1; if ( v3 != 2 && v3 < 6 ) { madb_reset_stmt(a1, 11); v2 = *(_QWORD *)(a1 + 56); } *(_DWORD *)(a1 + 80) = 3; if ( (unsigned int)mysql_next_result(v2) ) { *(_DWORD *)(a1 + 80) = 6; v6 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v6 + 144); strncpy(a1 + 781, v6 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); goto LABEL_10; } v9 = *(_QWORD *)(a1 + 56); if ( *(_DWORD *)(v9 + 1160) == 1 ) { *(_DWORD *)(v9 + 1160) = 8; v9 = *(_QWORD *)(a1 + 56); } v10 = *(_DWORD *)(v9 + 892); if ( v10 ) { v11 = *(_QWORD *)(a1 + 832); *(_DWORD *)(a1 + 96) = v10; if ( !*(_QWORD *)(v9 + 760) ) { v14 = *(char **)(a1 + 120); goto LABEL_23; } ma_free_root(v11, 0); v12 = ma_duplicate_resultset_metadata(*(_QWORD *)(v9 + 760), *(unsigned int *)(v9 + 892), v11); *(_QWORD *)(a1 + 88) = v12; if ( v12 ) { v13 = ma_alloc_root(v11, 112LL * *(unsigned int *)(a1 + 96)); *(_QWORD *)(a1 + 120) = v13; if ( v13 ) { v14 = v13; v10 = *(_DWORD *)(a1 + 96); LABEL_23: v7 = 0; memset(v14, 0LL, 112LL * v10); *(_BYTE *)(a1 + 232) = 0; goto LABEL_24; } } *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[8], 512LL); *(_BYTE *)(a1 + 779) = 0; v7 = 1; } else { *(_QWORD *)(a1 + 248) = *(_QWORD *)(v9 + 824); *(_QWORD *)(a1 + 256) = *(_QWORD *)(v9 + 832); *(_DWORD *)(a1 + 244) = *(_DWORD *)(v9 + 896); *(_DWORD *)(a1 + 240) = *(_DWORD *)(v9 + 904); v7 = 0; } LABEL_24: *(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL); *(_QWORD *)(a1 + 200) = 0LL; return v7; } *(_DWORD *)(v2 + 144) = 2014; strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0; *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = client_errors[14]; LABEL_10: strncpy(v4, v5, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
mysql_stmt_next_result: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x001220df MOV EAX,dword ptr [RBX + 0x50] CMP EAX,0x1 JA 0x00122125 MOV R15D,0x7de MOV dword ptr [RDI + 0x90],R15D MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x38] LEA R12,[0x148a30] MOV RSI,qword ptr [R12] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x38] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x38] LEA R13,[0x148a40] MOV RSI,qword ptr [R13 + 0x70] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x38] MOV byte ptr [RAX + 0x296],R14B MOV dword ptr [RBX + 0x108],R15D LEA RDI,[RBX + 0x30d] MOV RSI,qword ptr [R12] MOV EDX,0x5 CALL 0x00113220 MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV RSI,qword ptr [R13 + 0x70] JMP 0x001221b2 LAB_001220df: MOV dword ptr [RBX + 0x108],0x7dd LEA RDI,[RBX + 0x30d] LEA RAX,[0x148a30] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x148a40] MOV RSI,qword ptr [RAX + 0x68] JMP 0x001221b2 LAB_00122125: MOVZX ECX,word ptr [RDI + 0x380] TEST ECX,0x1008 JZ 0x001221db CMP EAX,0x2 SETZ CL CMP EAX,0x6 SETNC AL OR AL,CL JNZ 0x00122159 MOV RDI,RBX MOV ESI,0xb CALL 0x00120718 MOV RDI,qword ptr [RBX + 0x38] LAB_00122159: MOV dword ptr [RBX + 0x50],0x3 CALL 0x0011985d TEST EAX,EAX JZ 0x001221e3 MOV dword ptr [RBX + 0x50],0x6 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX LEA RDI,[RBX + 0x30d] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] LAB_001221b2: MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R14D,0x1 LAB_001221c9: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001221db: MOV R14D,0xffffffff JMP 0x001221c9 LAB_001221e3: MOV R15,qword ptr [RBX + 0x38] CMP dword ptr [R15 + 0x488],0x1 JNZ 0x00122200 MOV dword ptr [R15 + 0x488],0x8 MOV R15,qword ptr [RBX + 0x38] LAB_00122200: MOV EAX,dword ptr [R15 + 0x37c] TEST EAX,EAX JZ 0x0012226f MOV R14,qword ptr [RBX + 0x340] MOV dword ptr [RBX + 0x60],EAX CMP qword ptr [R15 + 0x2f8],0x0 JZ 0x00122304 MOV RDI,R14 XOR ESI,ESI CALL 0x0011dc3f MOV RDI,qword ptr [R15 + 0x2f8] MOV ESI,dword ptr [R15 + 0x37c] MOV RDX,R14 CALL 0x0011acfe MOV qword ptr [RBX + 0x58],RAX TEST RAX,RAX JZ 0x001222aa MOV EAX,dword ptr [RBX + 0x60] IMUL RSI,RAX,0x70 MOV RDI,R14 CALL 0x0011db27 MOV qword ptr [RBX + 0x78],RAX TEST RAX,RAX JZ 0x001222aa MOV RDI,RAX MOV EAX,dword ptr [RBX + 0x60] JMP 0x00122308 LAB_0012226f: MOV RAX,qword ptr [R15 + 0x338] MOV qword ptr [RBX + 0xf8],RAX MOV RAX,qword ptr [R15 + 0x340] MOV qword ptr [RBX + 0x100],RAX MOV EAX,dword ptr [R15 + 0x380] MOV dword ptr [RBX + 0xf4],EAX MOV EAX,dword ptr [R15 + 0x388] MOV dword ptr [RBX + 0xf0],EAX XOR R14D,R14D JMP 0x0012231f LAB_001222aa: MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x148a30] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x148a40] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R14D,0x1 JMP 0x0012231f LAB_00122304: MOV RDI,qword ptr [RBX + 0x78] LAB_00122308: MOV EAX,EAX IMUL RDX,RAX,0x70 XOR R14D,R14D XOR ESI,ESI CALL 0x00113260 MOV byte ptr [RBX + 0xe8],0x0 LAB_0012231f: MOV RAX,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RAX + 0x37c] MOV dword ptr [RBX + 0x60],EAX MOV qword ptr [RBX + 0xc8],0x0 JMP 0x001221c9
int8 mysql_stmt_next_result(long param_1) { int iVar1; uint uVar2; long lVar3; void *__s; char *__src; int8 uVar4; lVar3 = *(long *)(param_1 + 0x38); if (lVar3 == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Lost_connection_to_server_during_00148aa8; LAB_001221b2: strncpy((char *)(param_1 + 0x10c),__src,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } uVar2 = *(uint *)(param_1 + 0x50); if (uVar2 < 2) { *(int4 *)(lVar3 + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_00148ab0,0x1ff); *(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0; *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Commands_out_of_sync__you_can_t_r_00148ab0; goto LAB_001221b2; } if ((*(ushort *)(lVar3 + 0x380) & 0x1008) == 0) { return 0xffffffff; } if (uVar2 < 6 && uVar2 != 2) { madb_reset_stmt(param_1); lVar3 = *(long *)(param_1 + 0x38); } *(int4 *)(param_1 + 0x50) = 3; iVar1 = mysql_next_result(lVar3); if (iVar1 != 0) { *(int4 *)(param_1 + 0x50) = 6; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; __src = (char *)(*(long *)(param_1 + 0x38) + 0x97); goto LAB_001221b2; } lVar3 = *(long *)(param_1 + 0x38); if (*(int *)(lVar3 + 0x488) == 1) { *(int4 *)(lVar3 + 0x488) = 8; lVar3 = *(long *)(param_1 + 0x38); } uVar2 = *(uint *)(lVar3 + 0x37c); if (uVar2 == 0) { *(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar3 + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(lVar3 + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar3 + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar3 + 0x388); uVar4 = 0; goto LAB_0012231f; } uVar4 = *(int8 *)(param_1 + 0x340); *(uint *)(param_1 + 0x60) = uVar2; if (*(long *)(lVar3 + 0x2f8) == 0) { __s = *(void **)(param_1 + 0x78); LAB_00122308: uVar4 = 0; memset(__s,0,(ulong)uVar2 * 0x70); *(int1 *)(param_1 + 0xe8) = 0; } else { ma_free_root(uVar4,0); lVar3 = ma_duplicate_resultset_metadata (*(int8 *)(lVar3 + 0x2f8),*(int4 *)(lVar3 + 0x37c),uVar4); *(long *)(param_1 + 0x58) = lVar3; if (lVar3 != 0) { __s = (void *)ma_alloc_root(uVar4); *(void **)(param_1 + 0x78) = __s; if (__s != (void *)0x0) { uVar2 = *(uint *)(param_1 + 0x60); goto LAB_00122308; } } *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_00148a80,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar4 = 1; } LAB_0012231f: *(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c); *(int8 *)(param_1 + 200) = 0; return uVar4; }
55,356
my_bitmap_init
eloqsql/mysys/my_bitmap.c
my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, my_bool thread_safe) { DBUG_ENTER("my_bitmap_init"); map->mutex= 0; if (!buf) { uint size_in_bytes= bitmap_buffer_size(n_bits); uint extra= 0; if (thread_safe) { size_in_bytes= ALIGN_SIZE(size_in_bytes); extra= sizeof(mysql_mutex_t); } if (!(buf= (my_bitmap_map*) my_malloc(key_memory_MY_BITMAP_bitmap, size_in_bytes+extra, MYF(MY_WME)))) DBUG_RETURN(1); if (thread_safe) { map->mutex= (mysql_mutex_t *) ((char*) buf + size_in_bytes); mysql_mutex_init(key_BITMAP_mutex, map->mutex, MY_MUTEX_INIT_FAST); } } else { DBUG_ASSERT(thread_safe == 0); } map->bitmap= buf; map->n_bits= n_bits; create_last_word_mask(map); bitmap_clear_all(map); DBUG_RETURN(0); }
O0
c
my_bitmap_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movb %al, -0x1d(%rbp) movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) cmpq $0x0, -0x18(%rbp) jne 0xedfcd movl -0x1c(%rbp), %eax addl $0x1f, %eax shrl $0x5, %eax shll $0x2, %eax movl %eax, -0x24(%rbp) movl $0x0, -0x28(%rbp) cmpb $0x0, -0x1d(%rbp) je 0xedf64 movl -0x24(%rbp), %eax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x24(%rbp) movl $0x48, -0x28(%rbp) leaq 0xb95355(%rip), %rax # 0xc832c0 movl (%rax), %edi movl -0x24(%rbp), %eax addl -0x28(%rbp), %eax movl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0xf3830 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xedf96 jmp 0xedf8d movb $0x1, -0x1(%rbp) jmp 0xee017 cmpb $0x0, -0x1d(%rbp) je 0xedfcb movq -0x18(%rbp), %rcx movl -0x24(%rbp), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) leaq 0xb9495b(%rip), %rax # 0xc82910 movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi leaq 0xb9566a(%rip), %rdx # 0xc83630 callq 0xee020 jmp 0xedfd3 jmp 0xedfcf jmp 0xedfd1 jmp 0xedfd3 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x1c(%rax) movq -0x10(%rbp), %rdi callq 0xeddf0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax shll $0x2, %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq
my_bitmap_init: push rbp mov rbp, rsp sub rsp, 30h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_1D], al mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 cmp [rbp+var_18], 0 jnz loc_EDFCD mov eax, [rbp+var_1C] add eax, 1Fh shr eax, 5 shl eax, 2 mov [rbp+var_24], eax mov [rbp+var_28], 0 cmp [rbp+var_1D], 0 jz short loc_EDF64 mov eax, [rbp+var_24] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_24], eax mov [rbp+var_28], 48h ; 'H' loc_EDF64: lea rax, key_memory_MY_BITMAP_bitmap mov edi, [rax] mov eax, [rbp+var_24] add eax, [rbp+var_28] mov eax, eax mov esi, eax mov edx, 10h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_EDF96 jmp short $+2 loc_EDF8D: mov [rbp+var_1], 1 jmp loc_EE017 loc_EDF96: cmp [rbp+var_1D], 0 jz short loc_EDFCB mov rcx, [rbp+var_18] mov eax, [rbp+var_24] add rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx lea rax, key_BITMAP_mutex mov edi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+10h] lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_9 loc_EDFCB: jmp short loc_EDFD3 loc_EDFCD: jmp short $+2 loc_EDFCF: jmp short $+2 loc_EDFD1: jmp short $+2 loc_EDFD3: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+1Ch], ecx mov rdi, [rbp+var_10] call create_last_word_mask mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov eax, [rax+1Ch] add eax, 1Fh shr eax, 5 shl eax, 2 mov eax, eax mov edx, eax xor esi, esi call _memset mov [rbp+var_1], 0 loc_EE017: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_bitmap_init(long long a1, long long a2, int a3, char a4) { int v5; // [rsp+8h] [rbp-28h] unsigned int v6; // [rsp+Ch] [rbp-24h] long long v9; // [rsp+18h] [rbp-18h] v9 = a2; *(_QWORD *)(a1 + 16) = 0LL; if ( a2 ) { LABEL_8: *(_QWORD *)a1 = v9; *(_DWORD *)(a1 + 28) = a3; create_last_word_mask(a1); memset(*(_QWORD *)a1, 0LL, 4 * ((unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5)); return 0; } v6 = 4 * ((unsigned int)(a3 + 31) >> 5); v5 = 0; if ( a4 ) { v6 = (v6 + 7) & 0xFFFFFFF8; v5 = 72; } v9 = my_malloc(key_memory_MY_BITMAP_bitmap, v5 + v6, 16LL); if ( v9 ) { if ( a4 ) { *(_QWORD *)(a1 + 16) = v6 + v9; inline_mysql_mutex_init_9(key_BITMAP_mutex, *(_QWORD *)(a1 + 16), &my_fast_mutexattr); } goto LABEL_8; } return 1; }
my_bitmap_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV byte ptr [RBP + -0x1d],AL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001edfcd MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1f SHR EAX,0x5 SHL EAX,0x2 MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x28],0x0 CMP byte ptr [RBP + -0x1d],0x0 JZ 0x001edf64 MOV EAX,dword ptr [RBP + -0x24] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x28],0x48 LAB_001edf64: LEA RAX,[0xd832c0] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x28] MOV EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x001f3830 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001edf96 JMP 0x001edf8d LAB_001edf8d: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001ee017 LAB_001edf96: CMP byte ptr [RBP + -0x1d],0x0 JZ 0x001edfcb MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX LEA RAX,[0xd82910] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0xd83630] CALL 0x001ee020 LAB_001edfcb: JMP 0x001edfd3 LAB_001edfcd: JMP 0x001edfcf LAB_001edfcf: JMP 0x001edfd1 LAB_001edfd1: JMP 0x001edfd3 LAB_001edfd3: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001eddf0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 SHL EAX,0x2 MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV byte ptr [RBP + -0x1],0x0 LAB_001ee017: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_bitmap_init(long *param_1,long param_2,int param_3,char param_4) { int local_30; uint local_2c; long local_20; param_1[2] = 0; local_20 = param_2; if (param_2 == 0) { local_2c = (param_3 + 0x1fU >> 5) * 4; local_30 = 0; if (param_4 != '\0') { local_2c = local_2c + 7 & 0xfffffff8; local_30 = 0x48; } local_20 = my_malloc(key_memory_MY_BITMAP_bitmap,local_2c + local_30,0x10); if (local_20 == 0) { return 1; } if (param_4 != '\0') { param_1[2] = local_20 + (ulong)local_2c; inline_mysql_mutex_init(key_BITMAP_mutex,param_1[2],&my_fast_mutexattr); } } *param_1 = local_20; *(int *)((long)param_1 + 0x1c) = param_3; create_last_word_mask(param_1); memset((void *)*param_1,0,(ulong)((*(int *)((long)param_1 + 0x1c) + 0x1fU >> 5) << 2)); return 0; }
55,357
delete_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
static int delete_dynamic_record(MI_INFO *info, my_off_t filepos, uint second_read) { uint length,b_type; MI_BLOCK_INFO block_info,del_block; int error; my_bool remove_next_block; DBUG_ENTER("delete_dynamic_record"); /* First add a link from the last block to the new one */ error= update_backward_delete_link(info, info->s->state.dellink, filepos); block_info.second_read=second_read; do { /* Remove block at 'filepos' */ if ((b_type=_mi_get_block_info(&block_info,info->dfile,filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR) || (length=(uint) (block_info.filepos-filepos) +block_info.block_len) < MI_MIN_BLOCK_LENGTH) { my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } /* Check if next block is a delete block */ del_block.second_read=0; remove_next_block=0; if (_mi_get_block_info(&del_block,info->dfile,filepos+length) & BLOCK_DELETED && del_block.block_len+length < MI_DYN_MAX_BLOCK_LENGTH) { /* We can't remove this yet as this block may be the head block */ remove_next_block=1; length+=del_block.block_len; } block_info.header[0]=0; mi_int3store(block_info.header+1,length); mi_sizestore(block_info.header+4,info->s->state.dellink); if (b_type & BLOCK_LAST) bfill(block_info.header+12,8,255); else mi_sizestore(block_info.header+12,block_info.next_filepos); if (info->s->file_write(info,(uchar*) block_info.header,20,filepos, MYF(MY_NABP))) DBUG_RETURN(1); info->s->state.dellink = filepos; info->state->del++; info->state->empty+=length; filepos=block_info.next_filepos; /* Now it's safe to unlink the deleted block directly after this one */ if (remove_next_block && unlink_deleted_block(info,&del_block)) error=1; } while (!(b_type & BLOCK_LAST)); DBUG_RETURN(error); }
O3
c
delete_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %edx, %r13d movq %rsi, %r15 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x58(%rax), %rsi movq %r15, %rdx callq 0x788f2 movl %eax, -0xe4(%rbp) leaq -0x88(%rbp), %rax movl %r13d, 0x50(%rax) movl 0x1c0(%r14), %esi leaq -0x88(%rbp), %rdi movq %r15, %rdx callq 0x783eb cmpl $0x3, %eax ja 0x77cc3 movq -0x50(%rbp), %rbx subq %r15, %rbx addq -0x60(%rbp), %rbx cmpl $0x13, %ebx jbe 0x77cc3 movl %eax, %r13d movl $0x0, -0x90(%rbp) movl 0x1c0(%r14), %esi movq %r15, %rax movl %ebx, %r15d movq %rax, -0xf0(%rbp) leaq (%r15,%rax), %rdx leaq -0xe0(%rbp), %rdi callq 0x783eb testb $0x4, %al sete %al addq -0xb8(%rbp), %r15 cmpq $0xfffffc, %r15 # imm = 0xFFFFFC setae %r12b orb %al, %r12b jne 0x77bfc movq %r15, %rbx movb $0x0, -0x88(%rbp) movb %bl, -0x85(%rbp) movb %bh, -0x86(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, -0x87(%rbp) movq (%r14), %rax movq 0x58(%rax), %rcx bswapq %rcx movq %rcx, -0x84(%rbp) cmpl $0x2, %r13d jae 0x77c3e movq -0x48(%rbp), %rcx bswapq %rcx movq %rcx, -0x7c(%rbp) jmp 0x77c46 movq $-0x1, -0x7c(%rbp) movq -0xf0(%rbp), %r15 movl $0x14, %edx movl $0x4, %r8d movq %r14, %rdi leaq -0x88(%rbp), %rsi movq %r15, %rcx callq *0x2e8(%rax) testq %rax, %rax jne 0x77cce movl %ebx, %eax movq (%r14), %rcx movq %r15, 0x58(%rcx) movq 0x8(%r14), %rcx incq 0x8(%rcx) movq 0x8(%r14), %rcx addq %rax, 0x10(%rcx) movq -0x48(%rbp), %r15 testb %r12b, %r12b jne 0x77cb7 movq %r14, %rdi leaq -0xe0(%rbp), %rsi callq 0x787c1 testb %al, %al movl -0xe4(%rbp), %eax movl $0x1, %ecx cmovnel %ecx, %eax movl %eax, -0xe4(%rbp) cmpl $0x2, %r13d jb 0x77b79 jmp 0x77cd8 callq 0xa1afa movl $0x7f, (%rax) movl $0x1, -0xe4(%rbp) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x77cff movl -0xe4(%rbp), %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
delete_dynamic_record_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r13d, edx mov r15, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov rsi, [rax+58h] mov rdx, r15 call update_backward_delete_link_0 mov [rbp+var_E4], eax lea rax, [rbp+var_88] mov [rax+50h], r13d loc_77B79: mov esi, [r14+1C0h] lea rdi, [rbp+var_88] mov rdx, r15 call _mi_get_block_info cmp eax, 3 ja loc_77CC3 mov rbx, [rbp+var_50] sub rbx, r15 add rbx, [rbp+var_60] cmp ebx, 13h jbe loc_77CC3 mov r13d, eax mov [rbp+var_90], 0 mov esi, [r14+1C0h] mov rax, r15 mov r15d, ebx mov [rbp+var_F0], rax lea rdx, [r15+rax] lea rdi, [rbp+var_E0] call _mi_get_block_info test al, 4 setz al add r15, [rbp+var_B8] cmp r15, 0FFFFFCh setnb r12b or r12b, al jnz short loc_77BFC mov rbx, r15 loc_77BFC: mov [rbp+var_88], 0 mov [rbp+var_85], bl mov [rbp+var_86], bh mov eax, ebx shr eax, 10h mov [rbp+var_87], al mov rax, [r14] mov rcx, [rax+58h] bswap rcx mov [rbp+var_84], rcx cmp r13d, 2 jnb short loc_77C3E mov rcx, [rbp+var_48] bswap rcx mov [rbp+var_7C], rcx jmp short loc_77C46 loc_77C3E: mov [rbp+var_7C], 0FFFFFFFFFFFFFFFFh loc_77C46: mov r15, [rbp+var_F0] mov edx, 14h mov r8d, 4 mov rdi, r14 lea rsi, [rbp+var_88] mov rcx, r15 call qword ptr [rax+2E8h] test rax, rax jnz short loc_77CCE mov eax, ebx mov rcx, [r14] mov [rcx+58h], r15 mov rcx, [r14+8] inc qword ptr [rcx+8] mov rcx, [r14+8] add [rcx+10h], rax mov r15, [rbp+var_48] test r12b, r12b jnz short loc_77CB7 mov rdi, r14 lea rsi, [rbp+var_E0] call unlink_deleted_block_0 test al, al mov eax, [rbp+var_E4] mov ecx, 1 cmovnz eax, ecx mov [rbp+var_E4], eax loc_77CB7: cmp r13d, 2 jb loc_77B79 jmp short loc_77CD8 loc_77CC3: call _my_thread_var mov dword ptr [rax], 7Fh loc_77CCE: mov [rbp+var_E4], 1 loc_77CD8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_77CFF mov eax, [rbp+var_E4] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_77CFF: call ___stack_chk_fail
long long delete_dynamic_record_0(unsigned int *a1, unsigned long long a2, int a3) { unsigned long long v4; // r15 const char *v5; // rsi unsigned int block_info; // eax unsigned int v7; // ebx unsigned int v8; // r13d char v9; // al bool v10; // r12 long long v11; // rax bool v12; // zf int v13; // eax unsigned int v15; // [rsp+Ch] [rbp-E4h] _BYTE v16[40]; // [rsp+10h] [rbp-E0h] BYREF long long v17; // [rsp+38h] [rbp-B8h] int v18; // [rsp+60h] [rbp-90h] _BYTE v19[4]; // [rsp+68h] [rbp-88h] BYREF unsigned long long v20; // [rsp+6Ch] [rbp-84h] unsigned long long v21; // [rsp+74h] [rbp-7Ch] long long v22; // [rsp+90h] [rbp-60h] long long v23; // [rsp+A0h] [rbp-50h] unsigned long long v24; // [rsp+A8h] [rbp-48h] int v25; // [rsp+B8h] [rbp-38h] unsigned long long v26; // [rsp+C0h] [rbp-30h] v4 = a2; v26 = __readfsqword(0x28u); v15 = update_backward_delete_link_0(a1, *(_QWORD *)(*(_QWORD *)a1 + 88LL), a2); v25 = a3; while ( 1 ) { v5 = (const char *)a1[112]; block_info = mi_get_block_info(v19, v5, v4); if ( block_info > 3 ) break; v7 = v22 + v23 - v4; if ( v7 <= 0x13 ) break; v8 = block_info; v18 = 0; v9 = mi_get_block_info(v16, a1[112], v7 + v4); v10 = (v9 & 4) == 0 || v17 + (unsigned long long)v7 >= 0xFFFFFC; if ( !v10 ) v7 += v17; v19[0] = 0; v19[2] = BYTE1(v7); v19[3] = v7; v19[1] = BYTE2(v7); v11 = *(_QWORD *)a1; v20 = _byteswap_uint64(*(_QWORD *)(*(_QWORD *)a1 + 88LL)); if ( v8 >= 2 ) v21 = -1LL; else v21 = _byteswap_uint64(v24); if ( (*(long long ( **)(unsigned int *, _BYTE *, long long, unsigned long long, long long))(v11 + 744))( a1, v19, 20LL, v4, 4LL) ) { return 1; } *(_QWORD *)(*(_QWORD *)a1 + 88LL) = v4; ++*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) += v7; v4 = v24; if ( !v10 ) { v12 = (unsigned __int8)unlink_deleted_block_0(a1, v16) == 0; v13 = v15; if ( !v12 ) v13 = 1; v15 = v13; } if ( v8 >= 2 ) return v15; } *(_DWORD *)my_thread_var(v19, v5) = 127; return 1; }
delete_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R13D,EDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RAX + 0x58] MOV RDX,R15 CALL 0x001788f2 MOV dword ptr [RBP + -0xe4],EAX LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],R13D LAB_00177b79: MOV ESI,dword ptr [R14 + 0x1c0] LEA RDI,[RBP + -0x88] MOV RDX,R15 CALL 0x001783eb CMP EAX,0x3 JA 0x00177cc3 MOV RBX,qword ptr [RBP + -0x50] SUB RBX,R15 ADD RBX,qword ptr [RBP + -0x60] CMP EBX,0x13 JBE 0x00177cc3 MOV R13D,EAX MOV dword ptr [RBP + -0x90],0x0 MOV ESI,dword ptr [R14 + 0x1c0] MOV RAX,R15 MOV R15D,EBX MOV qword ptr [RBP + -0xf0],RAX LEA RDX,[R15 + RAX*0x1] LEA RDI,[RBP + -0xe0] CALL 0x001783eb TEST AL,0x4 SETZ AL ADD R15,qword ptr [RBP + -0xb8] CMP R15,0xfffffc SETNC R12B OR R12B,AL JNZ 0x00177bfc MOV RBX,R15 LAB_00177bfc: MOV byte ptr [RBP + -0x88],0x0 MOV byte ptr [RBP + -0x85],BL MOV byte ptr [RBP + -0x86],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RBP + -0x87],AL MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RAX + 0x58] BSWAP RCX MOV qword ptr [RBP + -0x84],RCX CMP R13D,0x2 JNC 0x00177c3e MOV RCX,qword ptr [RBP + -0x48] BSWAP RCX MOV qword ptr [RBP + -0x7c],RCX JMP 0x00177c46 LAB_00177c3e: MOV qword ptr [RBP + -0x7c],-0x1 LAB_00177c46: MOV R15,qword ptr [RBP + -0xf0] MOV EDX,0x14 MOV R8D,0x4 MOV RDI,R14 LEA RSI,[RBP + -0x88] MOV RCX,R15 CALL qword ptr [RAX + 0x2e8] TEST RAX,RAX JNZ 0x00177cce MOV EAX,EBX MOV RCX,qword ptr [R14] MOV qword ptr [RCX + 0x58],R15 MOV RCX,qword ptr [R14 + 0x8] INC qword ptr [RCX + 0x8] MOV RCX,qword ptr [R14 + 0x8] ADD qword ptr [RCX + 0x10],RAX MOV R15,qword ptr [RBP + -0x48] TEST R12B,R12B JNZ 0x00177cb7 MOV RDI,R14 LEA RSI,[RBP + -0xe0] CALL 0x001787c1 TEST AL,AL MOV EAX,dword ptr [RBP + -0xe4] MOV ECX,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0xe4],EAX LAB_00177cb7: CMP R13D,0x2 JC 0x00177b79 JMP 0x00177cd8 LAB_00177cc3: CALL 0x001a1afa MOV dword ptr [RAX],0x7f LAB_00177cce: MOV dword ptr [RBP + -0xe4],0x1 LAB_00177cd8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00177cff MOV EAX,dword ptr [RBP + -0xe4] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00177cff: CALL 0x00129270
int4 delete_dynamic_record(long *param_1,ulong param_2,int4 param_3) { ulong uVar1; char cVar2; uint uVar3; ulong uVar4; long lVar5; int4 *puVar6; ulong uVar7; long in_FS_OFFSET; bool bVar8; int4 local_ec; int1 local_e8 [40]; long local_c0; int4 local_98; int1 local_90; int1 local_8f; int1 local_8e; int1 local_8d; ulong local_8c; ulong local_84; long local_68; long local_58; ulong local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_ec = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 0x58),param_2); local_40 = param_3; do { uVar3 = _mi_get_block_info(&local_90,(int)param_1[0x38],param_2); if ((3 < uVar3) || (uVar7 = (local_58 - param_2) + local_68, (uint)uVar7 < 0x14)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7f; LAB_00177cce: local_ec = 1; break; } local_98 = 0; uVar4 = _mi_get_block_info(local_e8,(int)param_1[0x38],(uVar7 & 0xffffffff) + param_2); bVar8 = (uVar4 & 4) != 0; uVar4 = (uVar7 & 0xffffffff) + local_c0; if (uVar4 < 0xfffffc && bVar8) { uVar7 = uVar4; } local_90 = 0; local_8d = (int1)uVar7; local_8e = (int1)(uVar7 >> 8); local_8f = (int1)(uVar7 >> 0x10); uVar1 = *(ulong *)(*param_1 + 0x58); local_8c = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; if (uVar3 < 2) { local_84 = local_50 >> 0x38 | (local_50 & 0xff000000000000) >> 0x28 | (local_50 & 0xff0000000000) >> 0x18 | (local_50 & 0xff00000000) >> 8 | (local_50 & 0xff000000) << 8 | (local_50 & 0xff0000) << 0x18 | (local_50 & 0xff00) << 0x28 | local_50 << 0x38; } else { local_84 = 0xffffffffffffffff; } lVar5 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_90,0x14,param_2,4); uVar1 = local_50; if (lVar5 != 0) goto LAB_00177cce; *(ulong *)(*param_1 + 0x58) = param_2; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + (uVar7 & 0xffffffff); if ((uVar4 < 0xfffffc && bVar8) && (cVar2 = unlink_deleted_block(param_1,local_e8), cVar2 != '\0')) { local_ec = 1; } param_2 = uVar1; } while (uVar3 < 2); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_ec; }
55,358
copy_str16
bluesky950520[P]quickjs/quickjs.c
static void copy_str16(uint16_t *dst, const JSString *p, int offset, int len) { if (p->is_wide_char) { memcpy(dst, p->u.str16 + offset, len * 2); } else { const uint8_t *src1 = p->u.str8 + offset; int i; for(i = 0; i < len; i++) dst[i] = src1[i]; } }
O0
c
copy_str16: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movl %edx, 0x14(%rsp) movl %ecx, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x779e4 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi addq $0x18, %rsi movslq 0x14(%rsp), %rax shlq %rax addq %rax, %rsi movl 0x10(%rsp), %eax shll %eax movslq %eax, %rdx callq 0xe610 jmp 0x77a3a movq 0x18(%rsp), %rax addq $0x18, %rax movslq 0x14(%rsp), %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0x77a38 movq 0x8(%rsp), %rax movslq 0x4(%rsp), %rcx movzbl (%rax,%rcx), %eax movw %ax, %dx movq 0x20(%rsp), %rax movslq 0x4(%rsp), %rcx movw %dx, (%rax,%rcx,2) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x77a02 jmp 0x77a3a addq $0x28, %rsp retq nop
copy_str16: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_14], edx mov [rsp+28h+var_18], ecx mov rax, [rsp+28h+var_10] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz short loc_779E4 mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] add rsi, 18h movsxd rax, [rsp+28h+var_14] shl rax, 1 add rsi, rax mov eax, [rsp+28h+var_18] shl eax, 1 movsxd rdx, eax call _memcpy jmp short loc_77A3A loc_779E4: mov rax, [rsp+28h+var_10] add rax, 18h movsxd rcx, [rsp+28h+var_14] add rax, rcx mov [rsp+28h+var_20], rax mov [rsp+28h+var_24], 0 loc_77A02: mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_18] jge short loc_77A38 mov rax, [rsp+28h+var_20] movsxd rcx, [rsp+28h+var_24] movzx eax, byte ptr [rax+rcx] mov dx, ax mov rax, [rsp+28h+var_8] movsxd rcx, [rsp+28h+var_24] mov [rax+rcx*2], dx mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp short loc_77A02 loc_77A38: jmp short $+2 loc_77A3A: add rsp, 28h retn
long long copy_str16(long long a1, long long a2, int a3, int a4) { long long result; // rax unsigned int i; // [rsp+4h] [rbp-24h] if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 ) return memcpy(a1, 2LL * a3 + a2 + 24, 2 * a4); for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a4 ) break; *(_WORD *)(a1 + 2LL * (int)i) = *(unsigned __int8 *)(a3 + a2 + 24 + (int)i); } return result; }
copy_str16: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV dword ptr [RSP + 0x14],EDX MOV dword ptr [RSP + 0x10],ECX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001779e4 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x18 MOVSXD RAX,dword ptr [RSP + 0x14] SHL RAX,0x1 ADD RSI,RAX MOV EAX,dword ptr [RSP + 0x10] SHL EAX,0x1 MOVSXD RDX,EAX CALL 0x0010e610 JMP 0x00177a3a LAB_001779e4: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x18 MOVSXD RCX,dword ptr [RSP + 0x14] ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x4],0x0 LAB_00177a02: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JGE 0x00177a38 MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x4] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV DX,AX MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x4] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00177a02 LAB_00177a38: JMP 0x00177a3a LAB_00177a3a: ADD RSP,0x28 RET
void copy_str16(void *param_1,long param_2,int param_3,int param_4) { int4 local_24; if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) { for (local_24 = 0; local_24 < param_4; local_24 = local_24 + 1) { *(ushort *)((long)param_1 + (long)local_24 * 2) = (ushort)*(byte *)(param_2 + 0x18 + (long)param_3 + (long)local_24); } } else { memcpy(param_1,(void *)(param_2 + 0x18 + (long)param_3 * 2),(long)(param_4 << 1)); } return; }
55,359
copy_str16
bluesky950520[P]quickjs/quickjs.c
static void copy_str16(uint16_t *dst, const JSString *p, int offset, int len) { if (p->is_wide_char) { memcpy(dst, p->u.str16 + offset, len * 2); } else { const uint8_t *src1 = p->u.str8 + offset; int i; for(i = 0; i < len; i++) dst[i] = src1[i]; } }
O2
c
copy_str16: movq %rsi, %rax addq $0x18, %rsi testb $-0x80, 0x7(%rax) jne 0x3e44b xorl %eax, %eax testl %edx, %edx cmovlel %eax, %edx cmpq %rax, %rdx je 0x3e452 movzbl (%rsi,%rax), %ecx movw %cx, (%rdi,%rax,2) incq %rax jmp 0x3e439 addl %edx, %edx jmp 0xe630 retq
copy_str16: mov rax, rsi add rsi, 18h test byte ptr [rax+7], 80h jnz short loc_3E44B xor eax, eax test edx, edx cmovle edx, eax loc_3E439: cmp rdx, rax jz short locret_3E452 movzx ecx, byte ptr [rsi+rax] mov [rdi+rax*2], cx inc rax jmp short loc_3E439 loc_3E44B: add edx, edx jmp _memcpy locret_3E452: retn
long long copy_str16(long long a1, long long a2, long long a3) { long long v4; // rsi long long result; // rax v4 = a2 + 24; if ( *(char *)(a2 + 7) < 0 ) return memcpy(a1, v4, (unsigned int)(2 * a3)); result = 0LL; if ( (int)a3 <= 0 ) a3 = 0LL; while ( a3 != result ) { *(_WORD *)(a1 + 2 * result) = *(unsigned __int8 *)(v4 + result); ++result; } return result; }
copy_str16: MOV RAX,RSI ADD RSI,0x18 TEST byte ptr [RAX + 0x7],0x80 JNZ 0x0013e44b XOR EAX,EAX TEST EDX,EDX CMOVLE EDX,EAX LAB_0013e439: CMP RDX,RAX JZ 0x0013e452 MOVZX ECX,byte ptr [RSI + RAX*0x1] MOV word ptr [RDI + RAX*0x2],CX INC RAX JMP 0x0013e439 LAB_0013e44b: ADD EDX,EDX JMP 0x0010e630 LAB_0013e452: RET
void copy_str16(void *param_1,long param_2,uint param_3) { ulong uVar1; ulong uVar2; if ((*(byte *)(param_2 + 7) & 0x80) == 0) { uVar1 = 0; uVar2 = (ulong)param_3; if ((int)param_3 < 1) { uVar2 = uVar1; } for (; uVar2 != uVar1; uVar1 = uVar1 + 1) { *(ushort *)((long)param_1 + uVar1 * 2) = (ushort)*(byte *)(param_2 + 0x18 + uVar1); } return; } memcpy(param_1,(void *)(param_2 + 0x18),(ulong)(param_3 * 2)); return; }
55,360
Socket::shutdown(int)
minnow/util/socket.cc
void Socket::shutdown( const int how ) { CheckSystemCall( "shutdown", ::shutdown( fd_num(), how ) ); switch ( how ) { case SHUT_RD: register_read(); break; case SHUT_WR: register_write(); break; case SHUT_RDWR: register_read(); register_write(); break; default: throw runtime_error( "Socket::shutdown() called with invalid `how`" ); } }
O0
cpp
Socket::shutdown(int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) leaq 0x168c(%rip), %rsi # 0x1b85a leaq -0x20(%rbp), %rdi callq 0xed90 movq -0x38(%rbp), %rdi callq 0x12410 movl %eax, %edi movl -0xc(%rbp), %esi callq 0x5300 movq -0x38(%rbp), %rdi movl %eax, %ecx movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x17680 movl -0xc(%rbp), %eax movl %eax, -0x30(%rbp) testl %eax, %eax je 0x1a21d jmp 0x1a209 movl -0x30(%rbp), %eax subl $0x1, %eax je 0x1a228 jmp 0x1a213 movl -0x30(%rbp), %eax subl $0x2, %eax je 0x1a233 jmp 0x1a247 movq -0x38(%rbp), %rdi callq 0x16cd0 jmp 0x1a297 movq -0x38(%rbp), %rdi callq 0x17650 jmp 0x1a297 movq -0x38(%rbp), %rdi callq 0x16cd0 movq -0x38(%rbp), %rdi callq 0x17650 jmp 0x1a297 movl $0x10, %edi callq 0x5140 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x40(%rbp) leaq 0x1601(%rip), %rsi # 0x1b863 callq 0x50e0 jmp 0x1a269 movq -0x40(%rbp), %rdi movq 0xed64(%rip), %rsi # 0x28fd8 movq 0xed15(%rip), %rdx # 0x28f90 callq 0x53d0 movq -0x40(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) callq 0x51f0 jmp 0x1a29d addq $0x40, %rsp popq %rbp retq movq -0x28(%rbp), %rdi callq 0x53f0 nopw %cs:(%rax,%rax)
_ZN6Socket8shutdownEi: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov [rbp+var_38], rax lea rsi, aShutdown_0; "shutdown" lea rdi, [rbp+var_20] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_38]; this call _ZNK14FileDescriptor6fd_numEv; FileDescriptor::fd_num(void) mov edi, eax mov esi, [rbp+var_C] call _shutdown mov rdi, [rbp+var_38] mov ecx, eax mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call _ZNK14FileDescriptor15CheckSystemCallIiEET_St17basic_string_viewIcSt11char_traitsIcEES1_; FileDescriptor::CheckSystemCall<int>(std::string_view,int) mov eax, [rbp+var_C] mov [rbp+var_30], eax test eax, eax jz short loc_1A21D jmp short $+2 loc_1A209: mov eax, [rbp+var_30] sub eax, 1 jz short loc_1A228 jmp short $+2 loc_1A213: mov eax, [rbp+var_30] sub eax, 2 jz short loc_1A233 jmp short loc_1A247 loc_1A21D: mov rdi, [rbp+var_38]; this call _ZN14FileDescriptor13register_readEv; FileDescriptor::register_read(void) jmp short loc_1A297 loc_1A228: mov rdi, [rbp+var_38]; this call _ZN14FileDescriptor14register_writeEv; FileDescriptor::register_write(void) jmp short loc_1A297 loc_1A233: mov rdi, [rbp+var_38]; this call _ZN14FileDescriptor13register_readEv; FileDescriptor::register_read(void) mov rdi, [rbp+var_38]; this call _ZN14FileDescriptor14register_writeEv; FileDescriptor::register_write(void) jmp short loc_1A297 loc_1A247: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rbp+var_40], rax lea rsi, aSocketShutdown; "Socket::shutdown() called with invalid "... call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_1A269: mov rdi, [rbp+var_40]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rbp+var_40]; void * mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax call ___cxa_free_exception jmp short loc_1A29D loc_1A297: add rsp, 40h pop rbp retn loc_1A29D: mov rdi, [rbp+var_28] call __Unwind_Resume
long long Socket::shutdown(Socket *this, unsigned int a2) { unsigned int v2; // eax int v3; // eax std::runtime_error *exception; // [rsp+0h] [rbp-40h] long long v6[2]; // [rsp+20h] [rbp-20h] BYREF unsigned int v7; // [rsp+34h] [rbp-Ch] Socket *v8; // [rsp+38h] [rbp-8h] v8 = this; v7 = a2; std::string_view::basic_string_view(v6, (long long)"shutdown"); v2 = FileDescriptor::fd_num(this); v3 = shutdown(v2, v7); FileDescriptor::CheckSystemCall<int>((long long)this, v6[0], v6[1], v3); if ( !v7 ) return FileDescriptor::register_read(this); if ( v7 == 1 ) return FileDescriptor::register_write(this); if ( v7 != 2 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Socket::shutdown() called with invalid `how`"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } FileDescriptor::register_read(this); return FileDescriptor::register_write(this); }
shutdown: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX LEA RSI,[0x11b85a] LEA RDI,[RBP + -0x20] CALL 0x0010ed90 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00112410 MOV EDI,EAX MOV ESI,dword ptr [RBP + -0xc] CALL 0x00105300 MOV RDI,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00117680 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x30],EAX TEST EAX,EAX JZ 0x0011a21d JMP 0x0011a209 LAB_0011a209: MOV EAX,dword ptr [RBP + -0x30] SUB EAX,0x1 JZ 0x0011a228 JMP 0x0011a213 LAB_0011a213: MOV EAX,dword ptr [RBP + -0x30] SUB EAX,0x2 JZ 0x0011a233 JMP 0x0011a247 LAB_0011a21d: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00116cd0 JMP 0x0011a297 LAB_0011a228: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00117650 JMP 0x0011a297 LAB_0011a233: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00116cd0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00117650 JMP 0x0011a297 LAB_0011a247: MOV EDI,0x10 CALL 0x00105140 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x40],RAX LAB_0011a25b: LEA RSI,[0x11b863] CALL 0x001050e0 LAB_0011a267: JMP 0x0011a269 LAB_0011a269: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [0x00128fd8] MOV RDX,qword ptr [0x00128f90] CALL 0x001053d0 LAB_0011a297: ADD RSP,0x40 POP RBP RET
/* Socket::shutdown(int) */ void __thiscall Socket::shutdown(Socket *this,int param_1) { int iVar1; runtime_error *this_00; int8 local_28; int8 local_20; int local_14; Socket *local_10; local_14 = param_1; local_10 = this; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_28,"shutdown"); iVar1 = FileDescriptor::fd_num((FileDescriptor *)this); iVar1 = ::shutdown(iVar1,local_14); FileDescriptor::CheckSystemCall<int>(this,local_28,local_20,iVar1); if (local_14 == 0) { FileDescriptor::register_read((FileDescriptor *)this); } else if (local_14 == 1) { FileDescriptor::register_write((FileDescriptor *)this); } else { if (local_14 != 2) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0011a25b to 0011a266 has its CatchHandler @ 0011a280 */ std::runtime_error::runtime_error(this_00,"Socket::shutdown() called with invalid `how`"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00128fd8,PTR__runtime_error_00128f90); } FileDescriptor::register_read((FileDescriptor *)this); FileDescriptor::register_write((FileDescriptor *)this); } return; }
55,361
js_regexp_string_iterator_next
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_string_iterator_next(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, BOOL *pdone, int magic) { JSRegExpStringIteratorData *it; JSValue R, S; JSValue matchStr = JS_UNDEFINED, match = JS_UNDEFINED; JSString *sp; it = JS_GetOpaque2(ctx, this_val, JS_CLASS_REGEXP_STRING_ITERATOR); if (!it) goto exception; if (it->done) { *pdone = TRUE; return JS_UNDEFINED; } R = it->iterating_regexp; S = it->iterated_string; match = JS_RegExpExec(ctx, R, S); if (JS_IsException(match)) goto exception; if (JS_IsNull(match)) { it->done = TRUE; *pdone = TRUE; return JS_UNDEFINED; } else if (it->global) { matchStr = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, match, 0)); if (JS_IsException(matchStr)) goto exception; if (JS_IsEmptyString(matchStr)) { int64_t thisIndex, nextIndex; if (JS_ToLengthFree(ctx, &thisIndex, JS_GetProperty(ctx, R, JS_ATOM_lastIndex)) < 0) goto exception; sp = JS_VALUE_GET_STRING(S); nextIndex = string_advance_index(sp, thisIndex, it->unicode); if (JS_SetProperty(ctx, R, JS_ATOM_lastIndex, js_int64(nextIndex)) < 0) goto exception; } JS_FreeValue(ctx, matchStr); } else { it->done = TRUE; } *pdone = FALSE; return match; exception: JS_FreeValue(ctx, match); JS_FreeValue(ctx, matchStr); *pdone = FALSE; return JS_EXCEPTION; }
O0
c
js_regexp_string_iterator_next: subq $0x108, %rsp # imm = 0x108 movl 0x110(%rsp), %eax movq %rsi, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq %rdi, 0xe0(%rsp) movl %ecx, 0xdc(%rsp) movq %r8, 0xd0(%rsp) movq %r9, 0xc8(%rsp) movq 0x873ac(%rip), %rax # 0x10c210 movq %rax, 0x90(%rsp) movq 0x873a5(%rip), %rax # 0x10c218 movq %rax, 0x98(%rsp) movq 0x8738e(%rip), %rax # 0x10c210 movq %rax, 0x80(%rsp) movq 0x87387(%rip), %rax # 0x10c218 movq %rax, 0x88(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi movq 0xf0(%rsp), %rdx movl $0x2e, %ecx callq 0x370f0 movq %rax, 0xc0(%rsp) cmpq $0x0, 0xc0(%rsp) jne 0x84ed3 jmp 0x85205 movq 0xc0(%rsp), %rax cmpl $0x0, 0x28(%rax) je 0x84f0b movq 0xc8(%rsp), %rax movl $0x1, (%rax) movl $0x0, 0xf8(%rsp) movq $0x3, 0x100(%rsp) jmp 0x85264 movq 0xc0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xb0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xb8(%rsp) movq 0xc0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0xa0(%rsp) movq 0x18(%rax), %rax movq %rax, 0xa8(%rsp) movq 0xe0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0xa0(%rsp), %rcx movq 0xa8(%rsp), %r8 callq 0x83090 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x84fba jmp 0x85205 movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x2cf80 cmpl $0x0, %eax je 0x8500d movq 0xc0(%rsp), %rax movl $0x1, 0x28(%rax) movq 0xc8(%rsp), %rax movl $0x1, (%rax) movl $0x0, 0xf8(%rsp) movq $0x3, 0x100(%rsp) jmp 0x85264 movq 0xc0(%rsp), %rax cmpl $0x0, 0x20(%rax) je 0x851c4 movq 0xe0(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xe0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx xorl %eax, %eax movl %eax, %ecx callq 0x301f0 movq 0x10(%rsp), %rdi movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x4f3b0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x850ae jmp 0x85205 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x83ee0 cmpl $0x0, %eax je 0x851a5 movq 0xe0(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xe0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movl $0x56, %ecx callq 0x28ac0 movq 0x8(%rsp), %rdi movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rdx movq 0x30(%rsp), %rcx leaq 0x40(%rsp), %rsi callq 0x7cf90 cmpl $0x0, %eax jge 0x85128 jmp 0x85205 movq 0xa0(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0xc0(%rsp), %rax movl 0x24(%rax), %edx callq 0x83f20 movq %rax, 0x38(%rsp) movq 0xe0(%rsp), %rax movq %rax, (%rsp) movq 0x38(%rsp), %rdi callq 0x361c0 movq (%rsp), %rdi movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 movl $0x56, %ecx callq 0x30c40 cmpl $0x0, %eax jge 0x851a3 jmp 0x85205 jmp 0x851a5 movq 0xe0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 jmp 0x851d3 movq 0xc0(%rsp), %rax movl $0x1, 0x28(%rax) jmp 0x851d5 movq 0xc8(%rsp), %rax movl $0x0, (%rax) movq 0x80(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x100(%rsp) jmp 0x85264 movq 0xe0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 movq 0xe0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 movq 0xc8(%rsp), %rax movl $0x0, (%rax) movl $0x0, 0xf8(%rsp) movq $0x6, 0x100(%rsp) movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rdx addq $0x108, %rsp # imm = 0x108 retq nopl (%rax)
js_regexp_string_iterator_next: sub rsp, 108h mov eax, [rsp+108h+arg_0] mov [rsp+108h+var_20], rsi mov [rsp+108h+var_18], rdx mov [rsp+108h+var_28], rdi mov [rsp+108h+var_2C], ecx mov [rsp+108h+var_38], r8 mov [rsp+108h+var_40], r9 mov rax, cs:qword_10C210 mov [rsp+108h+var_78], rax mov rax, cs:qword_10C218 mov [rsp+108h+var_70], rax mov rax, cs:qword_10C210 mov [rsp+108h+var_88], rax mov rax, cs:qword_10C218 mov [rsp+108h+var_80], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_20] mov rdx, [rsp+108h+var_18] mov ecx, 2Eh ; '.' call JS_GetOpaque2 mov [rsp+108h+var_48], rax cmp [rsp+108h+var_48], 0 jnz short loc_84ED3 jmp loc_85205 loc_84ED3: mov rax, [rsp+108h+var_48] cmp dword ptr [rax+28h], 0 jz short loc_84F0B mov rax, [rsp+108h+var_40] mov dword ptr [rax], 1 mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 3 jmp loc_85264 loc_84F0B: mov rax, [rsp+108h+var_48] mov rcx, [rax] mov [rsp+108h+var_58], rcx mov rax, [rax+8] mov [rsp+108h+var_50], rax mov rax, [rsp+108h+var_48] mov rcx, [rax+10h] mov [rsp+108h+var_68], rcx mov rax, [rax+18h] mov [rsp+108h+var_60], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] mov rcx, [rsp+108h+var_68] mov r8, [rsp+108h+var_60] call JS_RegExpExec mov [rsp+108h+var_A0], rax mov [rsp+108h+var_98], rdx mov rax, [rsp+108h+var_A0] mov [rsp+108h+var_88], rax mov rax, [rsp+108h+var_98] mov [rsp+108h+var_80], rax mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_80] call JS_IsException_1 cmp eax, 0 jz short loc_84FBA jmp loc_85205 loc_84FBA: mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_80] call JS_IsNull_0 cmp eax, 0 jz short loc_8500D mov rax, [rsp+108h+var_48] mov dword ptr [rax+28h], 1 mov rax, [rsp+108h+var_40] mov dword ptr [rax], 1 mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 3 jmp loc_85264 loc_8500D: mov rax, [rsp+108h+var_48] cmp dword ptr [rax+20h], 0 jz loc_851C4 mov rax, [rsp+108h+var_28] mov [rsp+108h+var_F8], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_88] mov rdx, [rsp+108h+var_80] xor eax, eax mov ecx, eax call JS_GetPropertyInt64 mov rdi, [rsp+108h+var_F8] mov [rsp+108h+var_C0], rax mov [rsp+108h+var_B8], rdx mov rsi, [rsp+108h+var_C0] mov rdx, [rsp+108h+var_B8] call JS_ToStringFree mov [rsp+108h+var_B0], rax mov [rsp+108h+var_A8], rdx mov rax, [rsp+108h+var_B0] mov [rsp+108h+var_78], rax mov rax, [rsp+108h+var_A8] mov [rsp+108h+var_70], rax mov rdi, [rsp+108h+var_78] mov rsi, [rsp+108h+var_70] call JS_IsException_1 cmp eax, 0 jz short loc_850AE jmp loc_85205 loc_850AE: mov rdi, [rsp+108h+var_78] mov rsi, [rsp+108h+var_70] call JS_IsEmptyString cmp eax, 0 jz loc_851A5 mov rax, [rsp+108h+var_28] mov [rsp+108h+var_100], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] mov ecx, 56h ; 'V' call JS_GetProperty mov rdi, [rsp+108h+var_100] mov [rsp+108h+var_E0], rax mov [rsp+108h+var_D8], rdx mov rdx, [rsp+108h+var_E0] mov rcx, [rsp+108h+var_D8] lea rsi, [rsp+108h+var_C8] call JS_ToLengthFree cmp eax, 0 jge short loc_85128 jmp loc_85205 loc_85128: mov rax, [rsp+108h+var_68] mov [rsp+108h+var_90], rax mov rdi, [rsp+108h+var_90] mov rsi, [rsp+108h+var_C8] mov rax, [rsp+108h+var_48] mov edx, [rax+24h] call string_advance_index mov [rsp+108h+var_D0], rax mov rax, [rsp+108h+var_28] mov [rsp+108h+var_108], rax mov rdi, [rsp+108h+var_D0] call js_int64 mov rdi, [rsp+108h+var_108] mov [rsp+108h+var_F0], rax mov [rsp+108h+var_E8], rdx mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] mov r8, [rsp+108h+var_F0] mov r9, [rsp+108h+var_E8] mov ecx, 56h ; 'V' call JS_SetProperty cmp eax, 0 jge short loc_851A3 jmp short loc_85205 loc_851A3: jmp short $+2 loc_851A5: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_78] mov rdx, [rsp+108h+var_70] call JS_FreeValue jmp short loc_851D3 loc_851C4: mov rax, [rsp+108h+var_48] mov dword ptr [rax+28h], 1 loc_851D3: jmp short $+2 loc_851D5: mov rax, [rsp+108h+var_40] mov dword ptr [rax], 0 mov rax, [rsp+108h+var_88] mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_80] mov [rsp+108h+var_8], rax jmp short loc_85264 loc_85205: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_88] mov rdx, [rsp+108h+var_80] call JS_FreeValue mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_78] mov rdx, [rsp+108h+var_70] call JS_FreeValue mov rax, [rsp+108h+var_40] mov dword ptr [rax], 0 mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 6 loc_85264: mov rax, [rsp+108h+var_10] mov rdx, [rsp+108h+var_8] add rsp, 108h retn
long long js_regexp_string_iterator_next( long long a1, long long a2, long long a3, int a4, long long a5, _DWORD *a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { double v14; // xmm4_8 double v15; // xmm5_8 long long v16; // rdx long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 long long v21; // rdx long long v22; // rdx int v23; // edx int v25; // [rsp+0h] [rbp-108h] int v26; // [rsp+18h] [rbp-F0h] _DWORD *Property; // [rsp+28h] [rbp-E0h] long long v28; // [rsp+38h] [rbp-D0h] long long v29; // [rsp+40h] [rbp-C8h] BYREF long long PropertyInt64; // [rsp+48h] [rbp-C0h] long long v31; // [rsp+50h] [rbp-B8h] long long v32; // [rsp+58h] [rbp-B0h] long long v33; // [rsp+60h] [rbp-A8h] long long v34; // [rsp+68h] [rbp-A0h] long long v35; // [rsp+70h] [rbp-98h] long long v36; // [rsp+78h] [rbp-90h] long long v37; // [rsp+80h] [rbp-88h] long long v38; // [rsp+88h] [rbp-80h] long long v39; // [rsp+90h] [rbp-78h] long long v40; // [rsp+98h] [rbp-70h] long long v41; // [rsp+A0h] [rbp-68h] long long v42; // [rsp+A8h] [rbp-60h] long long v43; // [rsp+B0h] [rbp-58h] long long v44; // [rsp+B8h] [rbp-50h] long long Opaque2; // [rsp+C0h] [rbp-48h] _DWORD *v46; // [rsp+C8h] [rbp-40h] long long v47; // [rsp+D0h] [rbp-38h] int v48; // [rsp+DCh] [rbp-2Ch] long long v49; // [rsp+E0h] [rbp-28h] long long v50; // [rsp+E8h] [rbp-20h] long long v51; // [rsp+F0h] [rbp-18h] long long v52; // [rsp+F8h] [rbp-10h] long long v53; // [rsp+100h] [rbp-8h] v50 = a2; v51 = a3; v49 = a1; v48 = a4; v47 = a5; v46 = a6; v39 = 0LL; v40 = 3LL; v37 = 0LL; v38 = 3LL; Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x2Eu); if ( !Opaque2 ) goto LABEL_15; if ( !*(_DWORD *)(Opaque2 + 40) ) { v43 = *(_QWORD *)Opaque2; v44 = *(_QWORD *)(Opaque2 + 8); v41 = *(_QWORD *)(Opaque2 + 16); v42 = *(_QWORD *)(Opaque2 + 24); v34 = JS_RegExpExec(v49, v43, v44, v41, v42, a7, a8, a9, a10, v14, v15, a13, a14); v35 = v16; v37 = v34; v38 = v16; if ( !JS_IsException_1(v34, v16) ) { if ( JS_IsNull_0(v37, v38) ) { *(_DWORD *)(Opaque2 + 40) = 1; *v46 = 1; LODWORD(v52) = 0; v53 = 3LL; return v52; } if ( !*(_DWORD *)(Opaque2 + 32) ) { *(_DWORD *)(Opaque2 + 40) = 1; goto LABEL_14; } PropertyInt64 = JS_GetPropertyInt64(v49, v37, v38, 0LL); v31 = v17; v32 = JS_ToStringFree(v49, PropertyInt64, v17, v18, v19, v20); v33 = v21; v39 = v32; v40 = v21; if ( !JS_IsException_1(v32, v21) ) { if ( !JS_IsEmptyString(v39, v40) || (Property = (_DWORD *)JS_GetProperty(v49, v43, v44, 86), (int)JS_ToLengthFree(v49, &v29, Property, v22) >= 0) && (v36 = v41, v28 = string_advance_index(v41, v29, *(_DWORD *)(Opaque2 + 36)), v25 = v49, v26 = js_int64(v28), (int)JS_SetProperty(v25, v43, v44, 86, v26, v23) >= 0) ) { JS_FreeValue(v49, v39, v40); LABEL_14: *v46 = 0; v52 = v37; v53 = v38; return v52; } } } LABEL_15: JS_FreeValue(v49, v37, v38); JS_FreeValue(v49, v39, v40); *v46 = 0; LODWORD(v52) = 0; v53 = 6LL; return v52; } *v46 = 1; LODWORD(v52) = 0; v53 = 3LL; return v52; }
js_regexp_string_iterator_next: SUB RSP,0x108 MOV EAX,dword ptr [RSP + 0x110] MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV qword ptr [RSP + 0xe0],RDI MOV dword ptr [RSP + 0xdc],ECX MOV qword ptr [RSP + 0xd0],R8 MOV qword ptr [RSP + 0xc8],R9 MOV RAX,qword ptr [0x0020c210] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [0x0020c218] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [0x0020c210] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [0x0020c218] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xf0] MOV ECX,0x2e CALL 0x001370f0 MOV qword ptr [RSP + 0xc0],RAX CMP qword ptr [RSP + 0xc0],0x0 JNZ 0x00184ed3 JMP 0x00185205 LAB_00184ed3: MOV RAX,qword ptr [RSP + 0xc0] CMP dword ptr [RAX + 0x28],0x0 JZ 0x00184f0b MOV RAX,qword ptr [RSP + 0xc8] MOV dword ptr [RAX],0x1 MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x3 JMP 0x00185264 LAB_00184f0b: MOV RAX,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xb0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xa0],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xa0] MOV R8,qword ptr [RSP + 0xa8] CALL 0x00183090 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00184fba JMP 0x00185205 LAB_00184fba: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x0012cf80 CMP EAX,0x0 JZ 0x0018500d MOV RAX,qword ptr [RSP + 0xc0] MOV dword ptr [RAX + 0x28],0x1 MOV RAX,qword ptr [RSP + 0xc8] MOV dword ptr [RAX],0x1 MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x3 JMP 0x00185264 LAB_0018500d: MOV RAX,qword ptr [RSP + 0xc0] CMP dword ptr [RAX + 0x20],0x0 JZ 0x001851c4 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] XOR EAX,EAX MOV ECX,EAX CALL 0x001301f0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x0014f3b0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001850ae JMP 0x00185205 LAB_001850ae: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00183ee0 CMP EAX,0x0 JZ 0x001851a5 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV ECX,0x56 CALL 0x00128ac0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x40] CALL 0x0017cf90 CMP EAX,0x0 JGE 0x00185128 JMP 0x00185205 LAB_00185128: MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0xc0] MOV EDX,dword ptr [RAX + 0x24] CALL 0x00183f20 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001361c0 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] MOV ECX,0x56 CALL 0x00130c40 CMP EAX,0x0 JGE 0x001851a3 JMP 0x00185205 LAB_001851a3: JMP 0x001851a5 LAB_001851a5: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 JMP 0x001851d3 LAB_001851c4: MOV RAX,qword ptr [RSP + 0xc0] MOV dword ptr [RAX + 0x28],0x1 LAB_001851d3: JMP 0x001851d5 LAB_001851d5: MOV RAX,qword ptr [RSP + 0xc8] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x100],RAX JMP 0x00185264 LAB_00185205: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0xc8] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x6 LAB_00185264: MOV RAX,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] ADD RSP,0x108 RET
int1 [16] js_regexp_string_iterator_next (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int4 *param_6) { int8 uVar1; int iVar2; int8 uVar3; int1 auVar4 [16]; int8 local_c8; int1 local_c0 [16]; int1 local_b0 [16]; int1 local_a0 [16]; int8 local_90; int1 local_88 [16]; int1 local_78 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 *local_48; int4 *local_40; int8 local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_78._0_8_ = DAT_0020c210; local_78._8_8_ = DAT_0020c218; local_88._0_8_ = DAT_0020c210; local_88._8_8_ = DAT_0020c218; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_48 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,0x2e); if (local_48 != (int8 *)0x0) { if (*(int *)(local_48 + 5) != 0) { *local_40 = 1; local_10 = 0; local_8 = 3; goto LAB_00185264; } local_58 = *local_48; local_50 = local_48[1]; local_68 = local_48[2]; local_60 = local_48[3]; local_a0 = JS_RegExpExec(local_28,local_58,local_50,local_68,local_60); local_88 = local_a0; iVar2 = JS_IsException(local_a0._0_8_,local_a0._8_8_); if (iVar2 == 0) { iVar2 = JS_IsNull(local_88._0_8_,local_88._8_8_); uVar1 = local_28; if (iVar2 != 0) { *(int4 *)(local_48 + 5) = 1; *local_40 = 1; local_10 = 0; local_8 = 3; goto LAB_00185264; } if (*(int *)(local_48 + 4) == 0) { *(int4 *)(local_48 + 5) = 1; LAB_001851d3: *local_40 = 0; local_10 = local_88._0_4_; uStack_c = local_88._4_4_; local_8 = local_88._8_8_; goto LAB_00185264; } local_c0 = JS_GetPropertyInt64(local_28,local_88._0_8_,local_88._8_8_,0); local_b0 = JS_ToStringFree(uVar1,local_c0._0_8_,local_c0._8_8_); local_78 = local_b0; iVar2 = JS_IsException(local_b0._0_8_,local_b0._8_8_); if (iVar2 == 0) { iVar2 = JS_IsEmptyString(local_78._0_8_,local_78._8_8_); uVar1 = local_28; if (iVar2 == 0) { LAB_001851a5: JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); goto LAB_001851d3; } auVar4 = JS_GetProperty(local_28,local_58,local_50,0x56); iVar2 = JS_ToLengthFree(uVar1,&local_c8,auVar4._0_8_,auVar4._8_8_); if (-1 < iVar2) { local_90 = local_68; uVar3 = string_advance_index(local_68,local_c8,*(int4 *)((long)local_48 + 0x24)); uVar1 = local_28; auVar4 = js_int64(uVar3); iVar2 = JS_SetProperty(uVar1,local_58,local_50,0x56,auVar4._0_8_,auVar4._8_8_); if (-1 < iVar2) goto LAB_001851a5; } } } } JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_); JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); *local_40 = 0; local_10 = 0; local_8 = 6; LAB_00185264: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
55,362
js_regexp_string_iterator_next
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_string_iterator_next(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, BOOL *pdone, int magic) { JSRegExpStringIteratorData *it; JSValue R, S; JSValue matchStr = JS_UNDEFINED, match = JS_UNDEFINED; JSString *sp; it = JS_GetOpaque2(ctx, this_val, JS_CLASS_REGEXP_STRING_ITERATOR); if (!it) goto exception; if (it->done) { *pdone = TRUE; return JS_UNDEFINED; } R = it->iterating_regexp; S = it->iterated_string; match = JS_RegExpExec(ctx, R, S); if (JS_IsException(match)) goto exception; if (JS_IsNull(match)) { it->done = TRUE; *pdone = TRUE; return JS_UNDEFINED; } else if (it->global) { matchStr = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, match, 0)); if (JS_IsException(matchStr)) goto exception; if (JS_IsEmptyString(matchStr)) { int64_t thisIndex, nextIndex; if (JS_ToLengthFree(ctx, &thisIndex, JS_GetProperty(ctx, R, JS_ATOM_lastIndex)) < 0) goto exception; sp = JS_VALUE_GET_STRING(S); nextIndex = string_advance_index(sp, thisIndex, it->unicode); if (JS_SetProperty(ctx, R, JS_ATOM_lastIndex, js_int64(nextIndex)) < 0) goto exception; } JS_FreeValue(ctx, matchStr); } else { it->done = TRUE; } *pdone = FALSE; return match; exception: JS_FreeValue(ctx, match); JS_FreeValue(ctx, matchStr); *pdone = FALSE; return JS_EXCEPTION; }
O1
c
js_regexp_string_iterator_next: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %rbx movq %rdi, %r15 movl $0x2e, %ecx callq 0x269a1 movl $0x3, %r13d testq %rax, %rax je 0x4bcd9 movq %rax, %r12 cmpl $0x0, 0x28(%rax) je 0x4bd23 movl $0x1, (%rbx) movl $0x3, %r14d jmp 0x4bd0a xorl %esi, %esi movl $0x3, %r14d xorl %ebp, %ebp movq 0x18(%r15), %rdi movq %r14, %rdx callq 0x1ccb2 movq 0x18(%r15), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1ccb2 movl $0x0, (%rbx) movl $0x6, %r14d xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %r14, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rbp movq 0x8(%r12), %rdx movq 0x10(%r12), %xmm0 movq %xmm0, 0x60(%rsp) movq 0x18(%r12), %r8 movq %xmm0, %rcx movq %r15, %rdi movq %rbp, %rsi movq %rdx, 0x30(%rsp) callq 0x4ab4d movq %rax, %rsi movq %rdx, %r14 cmpl $0x6, %r14d je 0x4bce1 cmpl $0x2, %r14d jne 0x4bd76 movl $0x1, %eax movl %eax, 0x28(%r12) movl %eax, (%rbx) jmp 0x4bcd1 cmpl $0x0, 0x20(%r12) je 0x4bdd8 movq %rbp, 0x28(%rsp) movq %r15, %rdi movq %rsi, 0x20(%rsp) movq %r14, %rdx xorl %ecx, %ecx callq 0x235a0 movq %rax, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq %r15, %rdi movq %rax, %rsi xorl %ecx, %ecx callq 0x26ec9 movq %rax, %rbp movq %rdx, %r13 movq 0x18(%r15), %rdi movq 0x50(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x1ccb2 movl %r13d, %eax cmpq $0x6, %rax jne 0x4bde3 movq 0x20(%rsp), %rsi jmp 0x4bce3 movl $0x1, 0x28(%r12) jmp 0x4be10 movq %rbp, 0x38(%rsp) cmpl $-0x7, %eax jne 0x4bdfc movq 0x38(%rsp), %rax movq 0x4(%rax), %rax shlq $0x21, %rax je 0x4be2d movq 0x18(%r15), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1ccb2 movq 0x20(%rsp), %rsi movl $0x0, (%rbx) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rsi, %rcx andq %rax, %rcx movl %esi, %eax jmp 0x4bd0e movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movl $0x56, %ecx movq %rsi, %r8 movq %rdx, %r9 callq 0x2238f movq %rdx, %rcx leaq 0x58(%rsp), %rsi movq %r15, %rdi movq %rax, %rdx callq 0x469b0 testl %eax, %eax js 0x4bdce movq 0x60(%rsp), %rdi movq 0x58(%rsp), %rsi movl 0x24(%r12), %edx callq 0x4b387 movslq %eax, %rcx xorl %edx, %edx cmpq %rax, %rcx movl %ecx, %ecx cvtsi2sd %rax, %xmm0 movq %xmm0, %r8 cmoveq %rcx, %r8 movl $0x7, %r9d cmoveq %rdx, %r9 movq 0x28(%rsp), %rsi movq %rsi, 0x38(%rsp) movq 0x30(%rsp), %rdx movq %rdx, 0x40(%rsp) movdqu 0x38(%rsp), %xmm0 movdqu %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %r15, %rdi movl $0x56, %ecx callq 0x23774 testl %eax, %eax jns 0x4bdfc jmp 0x4bdce
js_regexp_string_iterator_next: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, r9 mov r15, rdi mov ecx, 2Eh ; '.' call JS_GetOpaque2 mov r13d, 3 test rax, rax jz short loc_4BCD9 mov r12, rax cmp dword ptr [rax+28h], 0 jz short loc_4BD23 mov dword ptr [rbx], 1 loc_4BCD1: mov r14d, 3 jmp short loc_4BD0A loc_4BCD9: xor esi, esi mov r14d, 3 loc_4BCE1: xor ebp, ebp loc_4BCE3: mov rdi, [r15+18h] mov rdx, r14 call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov dword ptr [rbx], 0 mov r14d, 6 loc_4BD0A: xor eax, eax xor ecx, ecx loc_4BD0E: or rax, rcx mov rdx, r14 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4BD23: mov rbp, [r12] mov rdx, [r12+8] movq xmm0, qword ptr [r12+10h] movq [rsp+98h+var_38], xmm0 mov r8, [r12+18h] movq rcx, xmm0 mov rdi, r15 mov rsi, rbp mov [rsp+98h+var_68], rdx call JS_RegExpExec mov rsi, rax mov r14, rdx cmp r14d, 6 jz short loc_4BCE1 cmp r14d, 2 jnz short loc_4BD76 mov eax, 1 mov [r12+28h], eax mov [rbx], eax jmp loc_4BCD1 loc_4BD76: cmp dword ptr [r12+20h], 0 jz short loc_4BDD8 mov [rsp+98h+var_70], rbp mov rdi, r15 mov [rsp+98h+var_78], rsi mov rdx, r14 xor ecx, ecx call JS_GetPropertyInt64 mov [rsp+98h+var_48], rax mov [rsp+98h+var_50], rdx mov rdi, r15 mov rsi, rax xor ecx, ecx call JS_ToStringInternal mov rbp, rax mov r13, rdx mov rdi, [r15+18h] mov rsi, [rsp+98h+var_48] mov rdx, [rsp+98h+var_50] call JS_FreeValueRT mov eax, r13d cmp rax, 6 jnz short loc_4BDE3 loc_4BDCE: mov rsi, [rsp+98h+var_78] jmp loc_4BCE3 loc_4BDD8: mov dword ptr [r12+28h], 1 jmp short loc_4BE10 loc_4BDE3: mov qword ptr [rsp+98h+var_60], rbp cmp eax, 0FFFFFFF9h jnz short loc_4BDFC mov rax, qword ptr [rsp+98h+var_60] mov rax, [rax+4] shl rax, 21h jz short loc_4BE2D loc_4BDFC: mov rdi, [r15+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov rsi, [rsp+98h+var_78] loc_4BE10: mov dword ptr [rbx], 0 mov rax, 0FFFFFFFF00000000h mov rcx, rsi and rcx, rax mov eax, esi jmp loc_4BD0E loc_4BE2D: mov dword ptr [rsp+98h+var_98+8], 0 mov qword ptr [rsp+98h+var_98], 0 mov rdi, r15 mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_68] mov ecx, 56h ; 'V' mov r8, rsi mov r9, rdx call JS_GetPropertyInternal2 mov rcx, rdx lea rsi, [rsp+98h+var_40] mov rdi, r15 mov rdx, rax call JS_ToLengthFree test eax, eax js loc_4BDCE mov rdi, [rsp+98h+var_38] mov rsi, [rsp+98h+var_40] mov edx, [r12+24h] call string_advance_index movsxd rcx, eax xor edx, edx cmp rcx, rax mov ecx, ecx cvtsi2sd xmm0, rax movq r8, xmm0 cmovz r8, rcx mov r9d, 7 cmovz r9, rdx mov rsi, [rsp+98h+var_70] mov qword ptr [rsp+98h+var_60], rsi mov rdx, [rsp+98h+var_68] mov qword ptr [rsp+98h+var_60+8], rdx movdqu xmm0, [rsp+98h+var_60] movdqu [rsp+98h+var_98], xmm0 mov [rsp+98h+var_80], 0 mov [rsp+98h+var_88], 4000h mov rdi, r15 mov ecx, 56h ; 'V' call JS_SetPropertyInternal2 test eax, eax jns loc_4BDFC jmp loc_4BDCE
unsigned long long js_regexp_string_iterator_next( long long a1, long long a2, int a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, _DWORD *a14) { const __m128i *Opaque2; // rax double v16; // xmm4_8 double v17; // xmm5_8 long long v18; // r13 const __m128i *v19; // r12 long long v20; // rsi long long v21; // r14 _DWORD *v22; // rbp long long v23; // rax unsigned long long v24; // rcx long long v26; // rbp unsigned long long v27; // rdx __m128 v28; // xmm0 long long v29; // rax long long v30; // rdx long long v31; // rdx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // rdx _DWORD *PropertyInternal2; // rax long long v38; // rdx long long v39; // rax double v40; // xmm4_8 double v41; // xmm5_8 double v42; // r8 long long v43; // r9 __m128 v44; // xmm0 _DWORD *v45; // [rsp+20h] [rbp-78h] __m128i v46; // [rsp+28h] [rbp-70h] __m128i v47; // [rsp+38h] [rbp-60h] BYREF long long v48; // [rsp+48h] [rbp-50h] _DWORD *PropertyInt64; // [rsp+50h] [rbp-48h] long long v50; // [rsp+58h] [rbp-40h] BYREF long long v51; // [rsp+60h] [rbp-38h] Opaque2 = (const __m128i *)JS_GetOpaque2(a1, a2, a3, 0x2Eu); v18 = 3LL; if ( !Opaque2 ) { v20 = 0LL; v21 = 3LL; goto LABEL_5; } v19 = Opaque2; if ( !Opaque2[2].m128i_i32[2] ) { v26 = Opaque2->m128i_i64[0]; v27 = Opaque2->m128i_u64[1]; v28 = (__m128)_mm_loadl_epi64(Opaque2 + 1); v51 = v28.m128_u64[0]; v46.m128i_i64[1] = v27; v29 = JS_RegExpExec(a1, v26, v27, v28.m128_i64[0], Opaque2[1].m128i_i64[1], v28, a5, a6, a7, v16, v17, a10, a11); v20 = v29; v21 = v30; if ( (_DWORD)v30 != 6 ) { if ( (_DWORD)v30 == 2 ) { v19[2].m128i_i32[2] = 1; *a14 = 1; goto LABEL_7; } if ( v19[2].m128i_i32[0] ) { v46.m128i_i64[0] = v26; v45 = (_DWORD *)v29; PropertyInt64 = (_DWORD *)JS_GetPropertyInt64(a1, v29, v30, 0LL); v48 = v31; v22 = (_DWORD *)JS_ToStringInternal( a1, (long long)PropertyInt64, v31, 0, v32, v33, v28, a5, a6, a7, v34, v35, a10, a11); v18 = v36; JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInt64, v48); if ( (unsigned int)v18 == 6LL ) goto LABEL_14; v47.m128i_i64[0] = (long long)v22; if ( (_DWORD)v18 == -7 && !(*(_QWORD *)(v47.m128i_i64[0] + 4) << 33) ) { PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2( a1, v46.m128i_i64[0], v46.m128i_i64[1], 0x56u, v46.m128i_i64[0], v46.m128i_i64[1], 0LL, 0); if ( (int)JS_ToLengthFree(a1, (unsigned long long *)&v50, PropertyInternal2, v38) < 0 ) goto LABEL_14; v39 = string_advance_index(v51, v50, v19[2].m128i_i32[1]); v42 = (double)(int)v39; if ( (int)v39 == v39 ) *(_QWORD *)&v42 = (unsigned int)v39; v43 = 7LL; if ( (int)v39 == v39 ) v43 = 0LL; v47 = v46; v44 = (__m128)_mm_loadu_si128(&v47); if ( (int)JS_SetPropertyInternal2( a1, v46.m128i_i64[0], v46.m128i_i64[1], 0x56u, *(_DWORD **)&v42, v43, v44, a5, a6, a7, v40, v41, a10, a11, v44.m128_i64[0], v44.m128_i32[2], 0x4000u, 0LL) < 0 ) { LABEL_14: v20 = (long long)v45; goto LABEL_6; } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v18); v20 = (long long)v45; } else { v19[2].m128i_i32[2] = 1; } *a14 = 0; v24 = v20 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v20; return v24 | v23; } LABEL_5: v22 = 0LL; LABEL_6: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v20, v21); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v18); *a14 = 0; goto LABEL_7; } *a14 = 1; LABEL_7: v23 = 0LL; v24 = 0LL; return v24 | v23; }
js_regexp_string_iterator_next: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,R9 MOV R15,RDI MOV ECX,0x2e CALL 0x001269a1 MOV R13D,0x3 TEST RAX,RAX JZ 0x0014bcd9 MOV R12,RAX CMP dword ptr [RAX + 0x28],0x0 JZ 0x0014bd23 MOV dword ptr [RBX],0x1 LAB_0014bcd1: MOV R14D,0x3 JMP 0x0014bd0a LAB_0014bcd9: XOR ESI,ESI MOV R14D,0x3 LAB_0014bce1: XOR EBP,EBP LAB_0014bce3: MOV RDI,qword ptr [R15 + 0x18] MOV RDX,R14 CALL 0x0011ccb2 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBP MOV RDX,R13 CALL 0x0011ccb2 MOV dword ptr [RBX],0x0 MOV R14D,0x6 LAB_0014bd0a: XOR EAX,EAX XOR ECX,ECX LAB_0014bd0e: OR RAX,RCX MOV RDX,R14 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014bd23: MOV RBP,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOVQ XMM0,qword ptr [R12 + 0x10] MOVQ qword ptr [RSP + 0x60],XMM0 MOV R8,qword ptr [R12 + 0x18] MOVQ RCX,XMM0 MOV RDI,R15 MOV RSI,RBP MOV qword ptr [RSP + 0x30],RDX CALL 0x0014ab4d MOV RSI,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x0014bce1 CMP R14D,0x2 JNZ 0x0014bd76 MOV EAX,0x1 MOV dword ptr [R12 + 0x28],EAX MOV dword ptr [RBX],EAX JMP 0x0014bcd1 LAB_0014bd76: CMP dword ptr [R12 + 0x20],0x0 JZ 0x0014bdd8 MOV qword ptr [RSP + 0x28],RBP MOV RDI,R15 MOV qword ptr [RSP + 0x20],RSI MOV RDX,R14 XOR ECX,ECX CALL 0x001235a0 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x48],RDX MOV RDI,R15 MOV RSI,RAX XOR ECX,ECX CALL 0x00126ec9 MOV RBP,RAX MOV R13,RDX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x48] CALL 0x0011ccb2 MOV EAX,R13D CMP RAX,0x6 JNZ 0x0014bde3 LAB_0014bdce: MOV RSI,qword ptr [RSP + 0x20] JMP 0x0014bce3 LAB_0014bdd8: MOV dword ptr [R12 + 0x28],0x1 JMP 0x0014be10 LAB_0014bde3: MOV qword ptr [RSP + 0x38],RBP CMP EAX,-0x7 JNZ 0x0014bdfc MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x4] SHL RAX,0x21 JZ 0x0014be2d LAB_0014bdfc: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBP MOV RDX,R13 CALL 0x0011ccb2 MOV RSI,qword ptr [RSP + 0x20] LAB_0014be10: MOV dword ptr [RBX],0x0 MOV RAX,-0x100000000 MOV RCX,RSI AND RCX,RAX MOV EAX,ESI JMP 0x0014bd0e LAB_0014be2d: MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV ECX,0x56 MOV R8,RSI MOV R9,RDX CALL 0x0012238f MOV RCX,RDX LEA RSI,[RSP + 0x58] MOV RDI,R15 MOV RDX,RAX CALL 0x001469b0 TEST EAX,EAX JS 0x0014bdce MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x58] MOV EDX,dword ptr [R12 + 0x24] CALL 0x0014b387 MOVSXD RCX,EAX XOR EDX,EDX CMP RCX,RAX MOV ECX,ECX CVTSI2SD XMM0,RAX MOVQ R8,XMM0 CMOVZ R8,RCX MOV R9D,0x7 CMOVZ R9,RDX MOV RSI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x38],RSI MOV RDX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x40],RDX MOVDQU XMM0,xmmword ptr [RSP + 0x38] MOVDQU xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,R15 MOV ECX,0x56 CALL 0x00123774 TEST EAX,EAX JNS 0x0014bdfc JMP 0x0014bdce
int1 [16] js_regexp_string_iterator_next(long param_1) { int8 uVar1; int8 uVar2; int iVar3; int8 *puVar4; ulong uVar5; ulong uVar6; double dVar7; int4 *in_R9; int8 uVar8; int8 uVar9; bool bVar10; int1 auVar11 [16]; int1 auVar12 [16]; int1 auVar13 [16]; ulong in_stack_ffffffffffffff70; int8 local_40; int8 local_38; puVar4 = (int8 *)JS_GetOpaque2(); if (puVar4 == (int8 *)0x0) { auVar11 = ZEXT816(3) << 0x40; LAB_0014bce1: auVar13 = ZEXT816(3) << 0x40; LAB_0014bce3: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar11._0_8_,auVar11._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_,auVar13._8_8_); *in_R9 = 0; uVar9 = 6; } else { if (*(int *)(puVar4 + 5) == 0) { uVar1 = *puVar4; uVar2 = puVar4[1]; local_38 = puVar4[2]; auVar11 = JS_RegExpExec(param_1,uVar1,uVar2,local_38,puVar4[3]); uVar9 = auVar11._8_8_; uVar5 = auVar11._0_8_; if (auVar11._8_4_ == 6) goto LAB_0014bce1; if (auVar11._8_4_ == 2) { *(int4 *)(puVar4 + 5) = 1; *in_R9 = 1; goto LAB_0014bcd1; } if (*(int *)(puVar4 + 4) == 0) { *(int4 *)(puVar4 + 5) = 1; LAB_0014be10: *in_R9 = 0; uVar6 = uVar5 & 0xffffffff00000000; uVar5 = uVar5 & 0xffffffff; goto LAB_0014bd0e; } auVar12 = JS_GetPropertyInt64(param_1,uVar5,uVar9,0); auVar13 = JS_ToStringInternal(param_1,auVar12._0_8_,auVar12._8_8_,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar12._0_8_,auVar12._8_8_); if ((auVar13._8_8_ & 0xffffffff) != 6) { if ((auVar13._8_4_ != -7) || ((*(ulong *)(auVar13._0_8_ + 4) & 0x7fffffff) != 0)) { LAB_0014bdfc: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_,auVar13._8_8_); goto LAB_0014be10; } auVar12 = JS_GetPropertyInternal2 (param_1,uVar1,uVar2,0x56,uVar1,uVar2,0, in_stack_ffffffffffffff70 & 0xffffffff00000000); iVar3 = JS_ToLengthFree(param_1,&local_40,auVar12._0_8_,auVar12._8_8_); if (-1 < iVar3) { uVar6 = string_advance_index(local_38,local_40,*(int4 *)((long)puVar4 + 0x24)); bVar10 = (long)(int)uVar6 == uVar6; dVar7 = (double)(long)uVar6; if (bVar10) { dVar7 = (double)(uVar6 & 0xffffffff); } uVar8 = 7; if (bVar10) { uVar8 = 0; } iVar3 = JS_SetPropertyInternal2(param_1,uVar1,uVar2,0x56,dVar7,uVar8,uVar1,uVar2,0x4000,0) ; if (-1 < iVar3) goto LAB_0014bdfc; } } goto LAB_0014bce3; } *in_R9 = 1; LAB_0014bcd1: uVar9 = 3; } uVar5 = 0; uVar6 = 0; LAB_0014bd0e: auVar11._0_8_ = uVar5 | uVar6; auVar11._8_8_ = uVar9; return auVar11; }
55,363
js_regexp_string_iterator_next
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_string_iterator_next(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, BOOL *pdone, int magic) { JSRegExpStringIteratorData *it; JSValue R, S; JSValue matchStr = JS_UNDEFINED, match = JS_UNDEFINED; JSString *sp; it = JS_GetOpaque2(ctx, this_val, JS_CLASS_REGEXP_STRING_ITERATOR); if (!it) goto exception; if (it->done) { *pdone = TRUE; return JS_UNDEFINED; } R = it->iterating_regexp; S = it->iterated_string; match = JS_RegExpExec(ctx, R, S); if (JS_IsException(match)) goto exception; if (JS_IsNull(match)) { it->done = TRUE; *pdone = TRUE; return JS_UNDEFINED; } else if (it->global) { matchStr = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, match, 0)); if (JS_IsException(matchStr)) goto exception; if (JS_IsEmptyString(matchStr)) { int64_t thisIndex, nextIndex; if (JS_ToLengthFree(ctx, &thisIndex, JS_GetProperty(ctx, R, JS_ATOM_lastIndex)) < 0) goto exception; sp = JS_VALUE_GET_STRING(S); nextIndex = string_advance_index(sp, thisIndex, it->unicode); if (JS_SetProperty(ctx, R, JS_ATOM_lastIndex, js_int64(nextIndex)) < 0) goto exception; } JS_FreeValue(ctx, matchStr); } else { it->done = TRUE; } *pdone = FALSE; return match; exception: JS_FreeValue(ctx, match); JS_FreeValue(ctx, matchStr); *pdone = FALSE; return JS_EXCEPTION; }
O3
c
js_regexp_string_iterator_next: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %rbx movq %rdi, %r15 cmpl $-0x1, %edx jne 0x4db0e cmpw $0x2e, 0x6(%rsi) jne 0x4db0e movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x4db0e cmpl $0x0, 0x28(%r13) je 0x4db40 movl $0x1, (%rbx) movl $0x3, %r14d jmp 0x4db27 movq %r15, %rdi movl $0x2e, %esi callq 0x270bb movl $0x0, (%rbx) movl $0x6, %r14d xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %r14, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rbp movq 0x8(%r13), %rdx movq 0x10(%r13), %r12 movq 0x18(%r13), %r8 movq %r15, %rdi movq %rbp, %rsi movq %rdx, 0x38(%rsp) movq %r12, %rcx callq 0x4ca53 movq %rdx, %r14 cmpl $0x6, %r14d je 0x4db1b cmpl $0x2, %r14d jne 0x4db7f movl $0x1, %eax movl %eax, 0x28(%r13) movl %eax, (%rbx) jmp 0x4db06 cmpl $0x0, 0x20(%r13) je 0x4dca8 movq %r15, %rdi movq %rax, 0x20(%rsp) movq %rax, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x23bcc movq %r15, %rdi movq %rax, %rsi callq 0x3479d movq %rax, %r9 movq %rdx, %r8 cmpl $0x6, %r8d je 0x4dd06 cmpl $-0x7, %r8d jne 0x4dcb2 testl $0x7fffffff, 0x4(%r9) # imm = 0x7FFFFFFF movq 0x20(%rsp), %rax jne 0x4dcbd movq %r9, 0x28(%rsp) movq %r8, 0x30(%rsp) movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq %rbp, %rsi movq 0x38(%rsp), %rdx movl $0x56, %ecx movq %rbp, %r8 movq %rdx, %r9 callq 0x22c0f movq %rdx, %rcx leaq 0x40(%rsp), %rsi movq %r15, %rdi movq %rax, %rdx callq 0x4864e testl %eax, %eax js 0x4dcfc movq 0x40(%rsp), %rsi movl 0x24(%r13), %edx movq %r12, %rdi callq 0x4d275 movslq %eax, %rcx xorl %edx, %edx cmpq %rax, %rcx movl %ecx, %ecx cvtsi2sd %rax, %xmm0 movq %xmm0, %r8 cmoveq %rcx, %r8 movl $0x7, %r9d cmoveq %rdx, %r9 movq %rbp, 0x48(%rsp) movq 0x38(%rsp), %rdx movq %rdx, 0x50(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %r15, %rdi movq %rbp, %rsi movl $0x56, %ecx callq 0x23d7f testl %eax, %eax js 0x4dcfc movq 0x20(%rsp), %rax movq 0x30(%rsp), %r8 movq 0x28(%rsp), %r9 jmp 0x4dcbd movl $0x1, 0x28(%r13) jmp 0x4dcdf cmpl $-0x9, %r8d movq 0x20(%rsp), %rax jb 0x4dcdf movq 0x18(%r15), %rdi movl (%r9), %edx leal -0x1(%rdx), %ecx movl %ecx, (%r9) cmpl $0x1, %edx jg 0x4dcdf movq %r9, %rsi movq %r8, %rdx callq 0x20d90 movq 0x20(%rsp), %rax movl $0x0, (%rbx) movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 movq %rax, %rcx andq %rdx, %rcx movl %eax, %eax jmp 0x4db2b movq 0x30(%rsp), %r8 movq 0x28(%rsp), %r9 movq 0x18(%r15), %rdi cmpl $-0x9, %r14d jb 0x4dd39 movq 0x20(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x4dd39 movq %r14, %rdx movq %r8, %r14 movq %r9, %r12 callq 0x20d90 movq %r12, %r9 movq %r14, %r8 movq 0x18(%r15), %rdi cmpl $-0x9, %r8d jb 0x4db1b movl (%r9), %eax leal -0x1(%rax), %ecx movl %ecx, (%r9) cmpl $0x1, %eax jg 0x4db1b movq %r9, %rsi movq %r8, %rdx callq 0x20d90 jmp 0x4db1b
js_regexp_string_iterator_next: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, r9 mov r15, rdi cmp edx, 0FFFFFFFFh jnz short loc_4DB0E cmp word ptr [rsi+6], 2Eh ; '.' jnz short loc_4DB0E mov r13, [rsi+30h] test r13, r13 jz short loc_4DB0E cmp dword ptr [r13+28h], 0 jz short loc_4DB40 mov dword ptr [rbx], 1 loc_4DB06: mov r14d, 3 jmp short loc_4DB27 loc_4DB0E: mov rdi, r15 mov esi, 2Eh ; '.' call JS_ThrowTypeErrorInvalidClass loc_4DB1B: mov dword ptr [rbx], 0 mov r14d, 6 loc_4DB27: xor eax, eax xor ecx, ecx loc_4DB2B: or rax, rcx mov rdx, r14 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DB40: mov rbp, [r13+0] mov rdx, [r13+8] mov r12, [r13+10h] mov r8, [r13+18h] mov rdi, r15 mov rsi, rbp mov [rsp+88h+var_50], rdx mov rcx, r12 call JS_RegExpExec mov r14, rdx cmp r14d, 6 jz short loc_4DB1B cmp r14d, 2 jnz short loc_4DB7F mov eax, 1 mov [r13+28h], eax mov [rbx], eax jmp short loc_4DB06 loc_4DB7F: cmp dword ptr [r13+20h], 0 jz loc_4DCA8 mov rdi, r15 mov [rsp+88h+var_68], rax mov rsi, rax mov rdx, r14 xor ecx, ecx call JS_GetPropertyInt64 mov rdi, r15 mov rsi, rax call JS_ToStringFree mov r9, rax mov r8, rdx cmp r8d, 6 jz loc_4DD06 cmp r8d, 0FFFFFFF9h jnz loc_4DCB2 test dword ptr [r9+4], 7FFFFFFFh mov rax, [rsp+88h+var_68] jnz loc_4DCBD mov [rsp+88h+var_60], r9 mov [rsp+88h+var_58], r8 mov dword ptr [rsp+88h+var_88+8], 0 mov qword ptr [rsp+88h+var_88], 0 mov rdi, r15 mov rsi, rbp mov rdx, [rsp+88h+var_50] mov ecx, 56h ; 'V' mov r8, rbp mov r9, rdx call JS_GetPropertyInternal2 mov rcx, rdx lea rsi, [rsp+88h+var_48] mov rdi, r15 mov rdx, rax call JS_ToLengthFree test eax, eax js loc_4DCFC mov rsi, [rsp+88h+var_48] mov edx, [r13+24h] mov rdi, r12 call string_advance_index movsxd rcx, eax xor edx, edx cmp rcx, rax mov ecx, ecx cvtsi2sd xmm0, rax movq r8, xmm0 cmovz r8, rcx mov r9d, 7 cmovz r9, rdx mov qword ptr [rsp+88h+var_40], rbp mov rdx, [rsp+88h+var_50] mov qword ptr [rsp+88h+var_40+8], rdx movups xmm0, [rsp+88h+var_40] movups [rsp+88h+var_88], xmm0 mov [rsp+88h+var_70], 0 mov [rsp+88h+var_78], 4000h mov rdi, r15 mov rsi, rbp mov ecx, 56h ; 'V' call JS_SetPropertyInternal2 test eax, eax js short loc_4DCFC mov rax, [rsp+88h+var_68] mov r8, [rsp+88h+var_58] mov r9, [rsp+88h+var_60] jmp short loc_4DCBD loc_4DCA8: mov dword ptr [r13+28h], 1 jmp short loc_4DCDF loc_4DCB2: cmp r8d, 0FFFFFFF7h mov rax, [rsp+88h+var_68] jb short loc_4DCDF loc_4DCBD: mov rdi, [r15+18h] mov edx, [r9] lea ecx, [rdx-1] mov [r9], ecx cmp edx, 1 jg short loc_4DCDF mov rsi, r9 mov rdx, r8 call js_free_value_rt mov rax, [rsp+88h+var_68] loc_4DCDF: mov dword ptr [rbx], 0 mov rdx, 0FFFFFFFF00000000h mov rcx, rax and rcx, rdx mov eax, eax jmp loc_4DB2B loc_4DCFC: mov r8, [rsp+88h+var_58] mov r9, [rsp+88h+var_60] loc_4DD06: mov rdi, [r15+18h] cmp r14d, 0FFFFFFF7h jb short loc_4DD39 mov rsi, [rsp+88h+var_68] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_4DD39 mov rdx, r14 mov r14, r8 mov r12, r9 call js_free_value_rt mov r9, r12 mov r8, r14 mov rdi, [r15+18h] loc_4DD39: cmp r8d, 0FFFFFFF7h jb loc_4DB1B mov eax, [r9] lea ecx, [rax-1] mov [r9], ecx cmp eax, 1 jg loc_4DB1B mov rsi, r9 mov rdx, r8 call js_free_value_rt jmp loc_4DB1B
unsigned long long js_regexp_string_iterator_next( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, _DWORD *a14) { long long v16; // r13 long long v17; // rax unsigned long long v18; // rcx unsigned long long v20; // rbp long long v21; // r12 long long v22; // rdx long long v23; // r14 int *PropertyInt64; // rax long long v25; // rdx long long v26; // rcx long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 long long v31; // rdx unsigned long long v32; // r9 long long v33; // r8 int *PropertyInternal2; // rax long long v35; // rdx long long v36; // rax double v37; // xmm4_8 double v38; // xmm5_8 double v39; // r8 long long v40; // r9 long long v41; // rdi int v42; // edx long long v43; // rcx long long v44; // rdi int v45; // eax long long v46; // rcx long long v47; // rdx long long v48; // r14 unsigned long long v49; // r12 int v50; // eax long long v51; // rcx _QWORD *v52; // [rsp+20h] [rbp-68h] unsigned long long v53; // [rsp+28h] [rbp-60h] long long v54; // [rsp+30h] [rbp-58h] unsigned long long v55; // [rsp+38h] [rbp-50h] long long v56; // [rsp+40h] [rbp-48h] BYREF __m128 v57; // [rsp+48h] [rbp-40h] if ( a3 != -1 || *(_WORD *)(a2 + 6) != 46 || (v16 = *(_QWORD *)(a2 + 48)) == 0 ) { JS_ThrowTypeErrorInvalidClass(a1, 46, a4, a5, a6, a7, a8, a9, a10, a11); goto LABEL_7; } if ( !*(_DWORD *)(v16 + 40) ) { v20 = *(_QWORD *)v16; v21 = *(_QWORD *)(v16 + 16); v55 = *(_QWORD *)(v16 + 8); v17 = JS_RegExpExec(a1, *(_QWORD *)v16, v55, v21, *(_QWORD *)(v16 + 24), a4, a5, a6, a7, a8, a9, a10, a11); v23 = v22; if ( (_DWORD)v22 != 6 ) { if ( (_DWORD)v22 == 2 ) { *(_DWORD *)(v16 + 40) = 1; *a14 = 1; goto LABEL_8; } if ( *(_DWORD *)(v16 + 32) ) { v52 = (_QWORD *)v17; PropertyInt64 = (int *)JS_GetPropertyInt64(a1, v17, v22, 0LL); v32 = JS_ToStringFree(a1, PropertyInt64, v25, a4, a5, a6, a7, v29, v30, a10, a11, v26, v27, v28); v33 = v31; if ( (_DWORD)v31 == 6 ) { LABEL_30: v44 = *(_QWORD *)(a1 + 24); if ( (unsigned int)v23 >= 0xFFFFFFF7 ) { v45 = *(_DWORD *)v52; v46 = (unsigned int)(*(_DWORD *)v52 - 1); *(_DWORD *)v52 = v46; if ( v45 <= 1 ) { v47 = v23; v48 = v33; v49 = v32; js_free_value_rt(v44, v52, v47, v46, v33, v32); v32 = v49; v33 = v48; v44 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)v33 >= 0xFFFFFFF7 ) { v50 = *(_DWORD *)v32; v51 = (unsigned int)(*(_DWORD *)v32 - 1); *(_DWORD *)v32 = v51; if ( v50 <= 1 ) js_free_value_rt(v44, (_QWORD *)v32, v33, v51, v33, v32); } goto LABEL_7; } if ( (_DWORD)v31 == -7 ) { v17 = (long long)v52; if ( (*(_DWORD *)(v32 + 4) & 0x7FFFFFFF) != 0 ) goto LABEL_26; v53 = v32; v54 = v31; PropertyInternal2 = (int *)JS_GetPropertyInternal2(a1, v20, v55, 0x56u, v20, v55, 0LL, 0); if ( (int)JS_ToLengthFree(a1, (unsigned long long *)&v56, PropertyInternal2, v35) >= 0 ) { v36 = string_advance_index(v21, v56, *(_DWORD *)(v16 + 36)); v39 = (double)(int)v36; if ( (int)v36 == v36 ) *(_QWORD *)&v39 = (unsigned int)v36; v40 = 7LL; if ( (int)v36 == v36 ) v40 = 0LL; v57.m128_u64[0] = v20; v57.m128_u64[1] = v55; if ( (int)JS_SetPropertyInternal2( a1, v20, v55, 0x56u, *(long long *)&v39, v40, v57, a5, a6, a7, v37, v38, a10, a11, v20, v55, 0x4000u, 0LL) >= 0 ) { v17 = (long long)v52; v33 = v54; v32 = v53; goto LABEL_26; } } v33 = v54; v32 = v53; goto LABEL_30; } v17 = (long long)v52; if ( (unsigned int)v31 >= 0xFFFFFFF7 ) { LABEL_26: v41 = *(_QWORD *)(a1 + 24); v42 = *(_DWORD *)v32; v43 = (unsigned int)(*(_DWORD *)v32 - 1); *(_DWORD *)v32 = v43; if ( v42 <= 1 ) { js_free_value_rt(v41, (_QWORD *)v32, v33, v43, v33, v32); v17 = (long long)v52; } } } else { *(_DWORD *)(v16 + 40) = 1; } *a14 = 0; v18 = v17 & 0xFFFFFFFF00000000LL; v17 = (unsigned int)v17; return v18 | v17; } LABEL_7: *a14 = 0; goto LABEL_8; } *a14 = 1; LABEL_8: v17 = 0LL; v18 = 0LL; return v18 | v17; }
js_regexp_string_iterator_next: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,R9 MOV R15,RDI CMP EDX,-0x1 JNZ 0x0014db0e CMP word ptr [RSI + 0x6],0x2e JNZ 0x0014db0e MOV R13,qword ptr [RSI + 0x30] TEST R13,R13 JZ 0x0014db0e CMP dword ptr [R13 + 0x28],0x0 JZ 0x0014db40 MOV dword ptr [RBX],0x1 LAB_0014db06: MOV R14D,0x3 JMP 0x0014db27 LAB_0014db0e: MOV RDI,R15 MOV ESI,0x2e CALL 0x001270bb LAB_0014db1b: MOV dword ptr [RBX],0x0 MOV R14D,0x6 LAB_0014db27: XOR EAX,EAX XOR ECX,ECX LAB_0014db2b: OR RAX,RCX MOV RDX,R14 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014db40: MOV RBP,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV R12,qword ptr [R13 + 0x10] MOV R8,qword ptr [R13 + 0x18] MOV RDI,R15 MOV RSI,RBP MOV qword ptr [RSP + 0x38],RDX MOV RCX,R12 CALL 0x0014ca53 MOV R14,RDX CMP R14D,0x6 JZ 0x0014db1b CMP R14D,0x2 JNZ 0x0014db7f MOV EAX,0x1 MOV dword ptr [R13 + 0x28],EAX MOV dword ptr [RBX],EAX JMP 0x0014db06 LAB_0014db7f: CMP dword ptr [R13 + 0x20],0x0 JZ 0x0014dca8 MOV RDI,R15 MOV qword ptr [RSP + 0x20],RAX MOV RSI,RAX MOV RDX,R14 XOR ECX,ECX CALL 0x00123bcc MOV RDI,R15 MOV RSI,RAX CALL 0x0013479d MOV R9,RAX MOV R8,RDX CMP R8D,0x6 JZ 0x0014dd06 CMP R8D,-0x7 JNZ 0x0014dcb2 TEST dword ptr [R9 + 0x4],0x7fffffff MOV RAX,qword ptr [RSP + 0x20] JNZ 0x0014dcbd MOV qword ptr [RSP + 0x28],R9 MOV qword ptr [RSP + 0x30],R8 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x38] MOV ECX,0x56 MOV R8,RBP MOV R9,RDX CALL 0x00122c0f MOV RCX,RDX LEA RSI,[RSP + 0x40] MOV RDI,R15 MOV RDX,RAX CALL 0x0014864e TEST EAX,EAX JS 0x0014dcfc MOV RSI,qword ptr [RSP + 0x40] MOV EDX,dword ptr [R13 + 0x24] MOV RDI,R12 CALL 0x0014d275 MOVSXD RCX,EAX XOR EDX,EDX CMP RCX,RAX MOV ECX,ECX CVTSI2SD XMM0,RAX MOVQ R8,XMM0 CMOVZ R8,RCX MOV R9D,0x7 CMOVZ R9,RDX MOV qword ptr [RSP + 0x48],RBP MOV RDX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x50],RDX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,R15 MOV RSI,RBP MOV ECX,0x56 CALL 0x00123d7f TEST EAX,EAX JS 0x0014dcfc MOV RAX,qword ptr [RSP + 0x20] MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x28] JMP 0x0014dcbd LAB_0014dca8: MOV dword ptr [R13 + 0x28],0x1 JMP 0x0014dcdf LAB_0014dcb2: CMP R8D,-0x9 MOV RAX,qword ptr [RSP + 0x20] JC 0x0014dcdf LAB_0014dcbd: MOV RDI,qword ptr [R15 + 0x18] MOV EDX,dword ptr [R9] LEA ECX,[RDX + -0x1] MOV dword ptr [R9],ECX CMP EDX,0x1 JG 0x0014dcdf MOV RSI,R9 MOV RDX,R8 CALL 0x00120d90 MOV RAX,qword ptr [RSP + 0x20] LAB_0014dcdf: MOV dword ptr [RBX],0x0 MOV RDX,-0x100000000 MOV RCX,RAX AND RCX,RDX MOV EAX,EAX JMP 0x0014db2b LAB_0014dcfc: MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x28] LAB_0014dd06: MOV RDI,qword ptr [R15 + 0x18] CMP R14D,-0x9 JC 0x0014dd39 MOV RSI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0014dd39 MOV RDX,R14 MOV R14,R8 MOV R12,R9 CALL 0x00120d90 MOV R9,R12 MOV R8,R14 MOV RDI,qword ptr [R15 + 0x18] LAB_0014dd39: CMP R8D,-0x9 JC 0x0014db1b MOV EAX,dword ptr [R9] LEA ECX,[RAX + -0x1] MOV dword ptr [R9],ECX CMP EAX,0x1 JG 0x0014db1b MOV RSI,R9 MOV RDX,R8 CALL 0x00120d90 JMP 0x0014db1b
int1 [16] js_regexp_string_iterator_next (long param_1,long param_2,int param_3,int8 param_4,int8 param_5, int4 *param_6) { int8 *puVar1; int8 uVar2; int4 uVar3; int iVar4; int8 uVar6; int *piVar7; ulong uVar8; ulong uVar9; int8 uVar10; uint uVar11; double dVar12; int8 uVar13; uint uVar14; int8 uVar15; bool bVar16; int1 auVar17 [16]; int1 auVar18 [16]; int8 local_48; int8 local_40; int8 uStack_38; int *piVar5; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x2e)) && (puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) { if (*(int *)(puVar1 + 5) == 0) { uVar10 = *puVar1; uVar2 = puVar1[1]; uVar13 = puVar1[2]; auVar17 = JS_RegExpExec(param_1,uVar10,uVar2,uVar13,puVar1[3]); uVar15 = auVar17._8_8_; piVar5 = auVar17._0_8_; uVar14 = auVar17._8_4_; if (uVar14 == 6) goto LAB_0014db1b; if (uVar14 != 2) { if (*(int *)(puVar1 + 4) == 0) { *(int4 *)(puVar1 + 5) = 1; } else { uVar6 = JS_GetPropertyInt64(param_1,piVar5,uVar15,0); auVar17 = JS_ToStringFree(param_1,uVar6); piVar7 = auVar17._0_8_; uVar11 = auVar17._8_4_; if (uVar11 == 6) goto LAB_0014dd06; if (uVar11 == 0xfffffff9) { if ((piVar7[1] & 0x7fffffffU) == 0) { auVar18 = JS_GetPropertyInternal2(param_1,uVar10,uVar2,0x56,uVar10,uVar2,0,0); iVar4 = JS_ToLengthFree(param_1,&local_48,auVar18._0_8_,auVar18._8_8_); if (-1 < iVar4) { uVar8 = string_advance_index(uVar13,local_48,*(int4 *)((long)puVar1 + 0x24)); bVar16 = (long)(int)uVar8 == uVar8; dVar12 = (double)(long)uVar8; if (bVar16) { dVar12 = (double)(uVar8 & 0xffffffff); } uVar13 = 7; if (bVar16) { uVar13 = 0; } uStack_38._0_4_ = (int4)uVar2; local_40 = uVar10; uVar3 = (int4)uStack_38; uStack_38 = uVar2; iVar4 = JS_SetPropertyInternal2 (param_1,uVar10,uVar2,0x56,dVar12,uVar13,uVar10,uVar3,0x4000,0); if (-1 < iVar4) goto LAB_0014dcbd; } LAB_0014dd06: uVar10 = *(int8 *)(param_1 + 0x18); if ((0xfffffff6 < uVar14) && (iVar4 = *piVar5, *piVar5 = iVar4 + -1, iVar4 < 2)) { js_free_value_rt(uVar10,piVar5,uVar15); uVar10 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < uVar11) && (iVar4 = *piVar7, *piVar7 = iVar4 + -1, iVar4 < 2)) { js_free_value_rt(uVar10,piVar7,auVar17._8_8_); } goto LAB_0014db1b; } } else if (uVar11 < 0xfffffff7) goto LAB_0014dcdf; LAB_0014dcbd: uVar10 = *(int8 *)(param_1 + 0x18); iVar4 = *piVar7; *piVar7 = iVar4 + -1; if (iVar4 < 2) { js_free_value_rt(uVar10,piVar7,auVar17._8_8_); } } LAB_0014dcdf: *param_6 = 0; uVar9 = (ulong)piVar5 & 0xffffffff00000000; uVar8 = (ulong)piVar5 & 0xffffffff; goto LAB_0014db2b; } *(int4 *)(puVar1 + 5) = 1; *param_6 = 1; } else { *param_6 = 1; } uVar15 = 3; } else { JS_ThrowTypeErrorInvalidClass(param_1,0x2e); LAB_0014db1b: *param_6 = 0; uVar15 = 6; } uVar8 = 0; uVar9 = 0; LAB_0014db2b: auVar17._0_8_ = uVar8 | uVar9; auVar17._8_8_ = uVar15; return auVar17; }
55,364
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!object) throw std::runtime_error("CallExpr.object is null"); auto obj = object->evaluate(context); if (!obj.is_callable()) { throw std::runtime_error("Object is not callable: " + obj.dump(2)); } auto vargs = args.evaluate(context); return obj.call(context, vargs); }
O3
cpp
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x735ce movq %rdx, %r14 movq %rdi, %rbx leaq 0x50(%rsp), %r12 movq %r12, %rdi callq 0x65552 cmpq $0x0, 0x30(%r12) je 0x73600 addq $0x30, %r15 movq %rsp, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x70b72 leaq 0x50(%rsp), %rsi movq %rsp, %rcx movq %rbx, %rdi movq %r14, %rdx callq 0x71ef2 leaq 0x18(%rsp), %rdi callq 0x7323a movq %rsp, %rdi callq 0x6c1a6 leaq 0x90(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x31156 movq %r14, %rdi callq 0x364a4 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x73567 callq 0x309ec movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0x73576 callq 0x309ec movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x73585 callq 0x309ec movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x735bb movq 0x77a02(%rip), %rax # 0xeaf98 cmpb $0x0, (%rax) je 0x735a6 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x735b0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x735bb movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %rbx leaq 0x4771f(%rip), %rsi # 0xbad01 movq %rax, %rdi callq 0x19280 movq 0x779ff(%rip), %rsi # 0xeaff0 movq 0x77978(%rip), %rdx # 0xeaf70 movq %rbx, %rdi callq 0x19ba0 movl $0x10, %edi callq 0x19370 movq %rax, %rbx leaq 0x30(%rsp), %rdi leaq 0x50(%rsp), %rsi movl $0x2, %edx xorl %ecx, %ecx callq 0x65b66 leaq 0x4796c(%rip), %rsi # 0xbaf96 movq %rsp, %rdi leaq 0x30(%rsp), %rdx callq 0x3f43f movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x19ae0 xorl %ebp, %ebp movq 0x779a2(%rip), %rsi # 0xeaff0 movq 0x7791b(%rip), %rdx # 0xeaf70 movq %rbx, %rdi callq 0x19ba0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7367b movq 0x10(%rsp), %rsi incq %rsi callq 0x196d0 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x73696 movq 0x40(%rsp), %rsi incq %rsi callq 0x196d0 testb %bpl, %bpl jne 0x736c0 jmp 0x736f1 movq %rax, %r14 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x736c0 movq 0x40(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0x736c0 movq %rax, %r14 movq %rbx, %rdi callq 0x19510 jmp 0x736f1 movq %rax, %r14 movq %rbx, %rdi callq 0x19510 jmp 0x736fb movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x7323a movq %rsp, %rdi callq 0x6c1a6 jmp 0x736f1 movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x65844 movq %r14, %rdi callq 0x19c00 nop
_ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_735CE mov r14, rdx mov rbx, rdi lea r12, [rsp+0C8h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_73600 add r15, 30h ; '0' mov rdi, rsp mov rsi, r15 mov rdx, r14 call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) lea rsi, [rsp+0C8h+var_78] mov rcx, rsp mov rdi, rbx mov rdx, r14 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) lea rdi, [rsp+0C8h+var_B0] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() lea r14, [rsp+0C8h+var_38] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_73567 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73567: mov rdi, [rsp+0C8h+var_50] test rdi, rdi jz short loc_73576 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73576: mov rdi, [rsp+0C8h+var_60] test rdi, rdi jz short loc_73585 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73585: mov rdi, [rsp+0C8h+var_70] test rdi, rdi jz short loc_735BB mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_735A6 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_735B0 loc_735A6: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_735B0: cmp eax, 1 jnz short loc_735BB mov rax, [rdi] call qword ptr [rax+18h] loc_735BB: mov rax, rbx add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_735CE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMethodcallexpr+6; char * mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_73600: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_78] mov edx, 2 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aObjectIsNotCal; "Object is not callable: " mov rdi, rsp lea rdx, [rsp+0C8h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+0C8h+var_B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7367B mov rsi, [rsp+0C8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7367B: lea rax, [rsp+0C8h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_73696 mov rsi, [rsp+0C8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_73696: test bpl, bpl jnz short loc_736C0 jmp short loc_736F1 mov r14, rax lea rax, [rsp+0C8h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_736C0 mov rsi, [rsp+0C8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_736C0 mov r14, rax loc_736C0: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_736F1 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_736FB mov r14, rax lea rdi, [rsp+0C8h+var_B0] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_736F1 mov r14, rax loc_736F1: lea rdi, [rsp+0C8h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_736FB: mov rdi, r14 call __Unwind_Resume
long long minja::CallExpr::do_evaluate(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi long long v7; // rdi signed __int32 v8; // eax std::runtime_error *exception; // rbx void *v11; // rbx __int128 v12; // [rsp+0h] [rbp-C8h] BYREF char *v13; // [rsp+18h] [rbp-B0h] BYREF _BYTE v14[16]; // [rsp+30h] [rbp-98h] BYREF _BYTE v15[8]; // [rsp+50h] [rbp-78h] BYREF long long v16; // [rsp+58h] [rbp-70h] volatile signed __int32 *v17; // [rsp+68h] [rbp-60h] volatile signed __int32 *v18; // [rsp+78h] [rbp-50h] long long v19; // [rsp+80h] [rbp-48h] volatile signed __int32 *v20; // [rsp+88h] [rbp-40h] char v21[56]; // [rsp+90h] [rbp-38h] BYREF v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "CallExpr.object is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v15, v4); if ( !v19 ) { v11 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, (long long)v15, 2u, 0); std::operator+<char>((long long)&v12, (long long)"Object is not callable: ", (long long)v14); std::runtime_error::runtime_error(v11, &v12); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::ArgumentsExpression::evaluate(&v12, (_QWORD *)(a2 + 48), a3); minja::Value::call(a1, (long long)v15); std::vector<std::pair<std::string,minja::Value>>::~vector(&v13); std::vector<minja::Value>::~vector(&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>::assert_invariant(v21); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); v7 = v16; if ( v16 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v16 + 12); *(_DWORD *)(v16 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v16 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x001735ce MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x50] MOV RDI,R12 CALL 0x00165552 CMP qword ptr [R12 + 0x30],0x0 JZ 0x00173600 ADD R15,0x30 LAB_0017350c: MOV RDI,RSP MOV RSI,R15 MOV RDX,R14 CALL 0x00170b72 LAB_0017351a: LEA RSI,[RSP + 0x50] MOV RCX,RSP MOV RDI,RBX MOV RDX,R14 CALL 0x00171ef2 LAB_0017352d: LEA RDI,[RSP + 0x18] CALL 0x0017323a MOV RDI,RSP CALL 0x0016c1a6 LEA R14,[RSP + 0x90] MOV RDI,R14 XOR ESI,ESI CALL 0x00131156 MOV RDI,R14 CALL 0x001364a4 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x00173567 CALL 0x001309ec LAB_00173567: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x00173576 CALL 0x001309ec LAB_00173576: MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x00173585 CALL 0x001309ec LAB_00173585: MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001735bb MOV RAX,qword ptr [0x001eaf98] CMP byte ptr [RAX],0x0 JZ 0x001735a6 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001735b0 LAB_001735a6: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001735b0: CMP EAX,0x1 JNZ 0x001735bb MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001735bb: MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001735ce: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_001735db: LEA RSI,[0x1bad01] MOV RDI,RAX CALL 0x00119280 LAB_001735ea: MOV RSI,qword ptr [0x001eaff0] MOV RDX,qword ptr [0x001eaf70] MOV RDI,RBX CALL 0x00119ba0 LAB_00173600: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_0017360d: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x50] MOV EDX,0x2 XOR ECX,ECX CALL 0x00165b66 LAB_00173623: LEA RSI,[0x1baf96] MOV RDI,RSP LEA RDX,[RSP + 0x30] CALL 0x0013f43f MOV BPL,0x1 LAB_0017363a: MOV RSI,RSP MOV RDI,RBX CALL 0x00119ae0 XOR EBP,EBP MOV RSI,qword ptr [0x001eaff0] MOV RDX,qword ptr [0x001eaf70] MOV RDI,RBX CALL 0x00119ba0
/* minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ CallExpr * __thiscall minja::CallExpr::do_evaluate(CallExpr *this,shared_ptr *param_1) { int *piVar1; int iVar2; runtime_error *prVar3; shared_ptr asStack_c8 [24]; vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> local_b0 [24]; int1 local_98 [32]; Expression local_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001735db to 001735e9 has its CatchHandler @ 001736ca */ std::runtime_error::runtime_error(prVar3,"CallExpr.object is null"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70); } Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 0017350c to 00173519 has its CatchHandler @ 001736ee */ ArgumentsExpression::evaluate(asStack_c8); /* try { // try from 0017351a to 0017352c has its CatchHandler @ 001736d7 */ Value::call((shared_ptr *)this,(ArgumentsValue *)local_78); std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::~vector(local_b0); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)asStack_c8); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_001eaf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_70 + 0x18))(); } } return this; } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017360d to 00173622 has its CatchHandler @ 001736bd */ Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0)); /* try { // try from 00173623 to 00173636 has its CatchHandler @ 0017369d */ std::operator+((char *)asStack_c8,(string *)"Object is not callable: "); /* try { // try from 0017363a to 0017365c has its CatchHandler @ 0017365d */ std::runtime_error::runtime_error(prVar3,(string *)asStack_c8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70); }
55,365
universe::deinit()
untodesu[P]voxelius/game/server/universe.cc
void universe::deinit(void) { for(const auto metadata : metadata_map) { metadata.second->config.save_file(metadata.second->config_path.c_str()); delete metadata.second; } metadata_map.clear(); for(const auto dimension : globals::dimensions) { universe::save_all_chunks(dimension.second); delete dimension.second; } globals::dimensions.clear(); globals::spawn_dimension = nullptr; universe_config.save_file(universe_config_path.c_str()); }
O2
cpp
universe::deinit(): pushq %r14 pushq %rbx subq $0x28, %rsp leaq 0xe13e0(%rip), %r14 # 0x10dd80 movq (%r14), %r14 testq %r14, %r14 je 0x2c9cf movq 0x10(%r14), %rbx leaq 0x40(%rbx), %rdi movq (%rbx), %rsi callq 0x4e6ba movq %rbx, %rdi callq 0x2ce6e movl $0x80, %esi movq %rbx, %rdi callq 0x17750 jmp 0x2c9a0 leaq 0xe139a(%rip), %rdi # 0x10dd70 callq 0x2d2bc leaq 0xe100e(%rip), %r14 # 0x10d9f0 addq $0x10, %r14 movq %rsp, %rbx movq (%r14), %r14 testq %r14, %r14 je 0x2ca21 leaq 0x8(%r14), %rsi movq %rbx, %rdi callq 0x1a8fa movq 0x20(%rsp), %rdi callq 0x2ca66 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x2ca17 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x17ec8 jmp 0x2c9e9 leaq 0xe0fc8(%rip), %rdi # 0x10d9f0 callq 0x1b3e8 leaq 0xe0fb4(%rip), %rax # 0x10d9e8 andq $0x0, (%rax) movq 0xe1311(%rip), %rsi # 0x10dd50 leaq 0xe1262(%rip), %rdi # 0x10dca8 callq 0x4e6ba addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %rsp, %rdi callq 0x17ec8 movq %rbx, %rdi callq 0x17cd0
_ZN8universe6deinitEv: push r14 push rbx sub rsp, 28h lea r14, xmmword_10DD80 loc_2C9A0: mov r14, [r14] test r14, r14 jz short loc_2C9CF mov rbx, [r14+10h] lea rdi, [rbx+40h]; this mov rsi, [rbx]; char * call _ZNK6Config9save_fileEPKc; Config::save_file(char const*) mov rdi, rbx; this call _ZN17DimensionMetadataD2Ev; DimensionMetadata::~DimensionMetadata() mov esi, 80h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2C9A0 loc_2C9CF: lea rdi, _ZL12metadata_map; metadata_map call _ZNSt10_HashtableIP9DimensionSt4pairIKS1_P17DimensionMetadataESaIS6_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE5clearEv; std::_Hashtable<Dimension *,std::pair<Dimension * const,DimensionMetadata *>,std::allocator<std::pair<Dimension * const,DimensionMetadata *>>,std::__detail::_Select1st,std::equal_to<Dimension *>,std::hash<Dimension *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear(void) lea r14, _ZN7globals10dimensionsB5cxx11E; globals::dimensions add r14, 10h mov rbx, rsp loc_2C9E9: mov r14, [r14] test r14, r14 jz short loc_2CA21 lea rsi, [r14+8]; Dimension * mov rdi, rbx call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9DimensionEC2ERKS9_; std::pair<std::string const,Dimension *>::pair(std::pair<std::string const,Dimension *> const&) mov rdi, [rsp+38h+var_18]; this call _ZN8universe15save_all_chunksEP9Dimension; universe::save_all_chunks(Dimension *) mov rdi, [rsp+38h+var_18] test rdi, rdi jz short loc_2CA17 mov rax, [rdi] call qword ptr [rax+8] loc_2CA17: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2C9E9 loc_2CA21: lea rdi, _ZN7globals10dimensionsB5cxx11E; globals::dimensions call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9DimensionESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv; std::_Hashtable<std::string,std::pair<std::string const,Dimension *>,std::allocator<std::pair<std::string const,Dimension *>>,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>>::clear(void) lea rax, _ZN7globals15spawn_dimensionE; globals::spawn_dimension and qword ptr [rax], 0 mov rsi, cs:_ZL20universe_config_pathB5cxx11; char * lea rdi, _ZL15universe_config; this call _ZNK6Config9save_fileEPKc; Config::save_file(char const*) add rsp, 28h pop rbx pop r14 retn mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long universe::deinit(universe *this) { __int128 *v1; // r14 const char **v2; // rbx long long *v3; // r14 _BYTE v5[32]; // [rsp+0h] [rbp-38h] BYREF universe *v6; // [rsp+20h] [rbp-18h] v1 = &xmmword_10DD80; while ( 1 ) { v1 = *(__int128 **)v1; if ( !v1 ) break; v2 = (const char **)*((_QWORD *)v1 + 2); Config::save_file((Config *)(v2 + 8), *v2); DimensionMetadata::~DimensionMetadata((DimensionMetadata *)v2); operator delete(v2, 0x80uLL); } std::_Hashtable<Dimension *,std::pair<Dimension * const,DimensionMetadata *>,std::allocator<std::pair<Dimension * const,DimensionMetadata *>>,std::__detail::_Select1st,std::equal_to<Dimension *>,std::hash<Dimension *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear(&metadata_map); v3 = &globals::dimensions[abi:cxx11] + 2; while ( 1 ) { v3 = (long long *)*v3; if ( !v3 ) break; std::pair<std::string const,Dimension *>::pair((long long)v5, (long long)(v3 + 1)); universe::save_all_chunks(v6, (Dimension *)(v3 + 1)); if ( v6 ) (*(void ( **)(universe *))(*(_QWORD *)v6 + 8LL))(v6); std::string::~string(v5); } std::_Hashtable<std::string,std::pair<std::string const,Dimension *>,std::allocator<std::pair<std::string const,Dimension *>>,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>>::clear(&globals::dimensions[abi:cxx11]); globals::spawn_dimension = 0LL; return Config::save_file((Config *)&universe_config, universe_config_path[abi:cxx11]); }
deinit: PUSH R14 PUSH RBX SUB RSP,0x28 LEA R14,[0x20dd80] LAB_0012c9a0: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x0012c9cf MOV RBX,qword ptr [R14 + 0x10] LEA RDI,[RBX + 0x40] MOV RSI,qword ptr [RBX] CALL 0x0014e6ba MOV RDI,RBX CALL 0x0012ce6e MOV ESI,0x80 MOV RDI,RBX CALL 0x00117750 JMP 0x0012c9a0 LAB_0012c9cf: LEA RDI,[0x20dd70] CALL 0x0012d2bc LEA R14,[0x20d9f0] ADD R14,0x10 MOV RBX,RSP LAB_0012c9e9: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x0012ca21 LEA RSI,[R14 + 0x8] MOV RDI,RBX CALL 0x0011a8fa MOV RDI,qword ptr [RSP + 0x20] LAB_0012ca02: CALL 0x0012ca66 LAB_0012ca07: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0012ca17 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0012ca17: MOV RDI,RBX CALL 0x00117ec8 JMP 0x0012c9e9 LAB_0012ca21: LEA RDI,[0x20d9f0] CALL 0x0011b3e8 LEA RAX,[0x20d9e8] AND qword ptr [RAX],0x0 MOV RSI,qword ptr [0x0020dd50] LEA RDI,[0x20dca8] CALL 0x0014e6ba ADD RSP,0x28 POP RBX POP R14 RET
/* universe::deinit() */ void universe::deinit(void) { DimensionMetadata *this; long *plVar1; pair<std::__cxx11::string_const,Dimension*> apStack_38 [32]; Dimension *local_18; plVar1 = (long *)(metadata_map + 0x10); while (plVar1 = (long *)*plVar1, plVar1 != (long *)0x0) { this = (DimensionMetadata *)plVar1[2]; Config::save_file((Config *)(this + 0x40),*(char **)this); DimensionMetadata::~DimensionMetadata(this); operator_delete(this,0x80); } std:: _Hashtable<Dimension*,std::pair<Dimension*const,DimensionMetadata*>,std::allocator<std::pair<Dimension*const,DimensionMetadata*>>,std::__detail::_Select1st,std::equal_to<Dimension*>,std::hash<Dimension*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::clear((_Hashtable<Dimension*,std::pair<Dimension*const,DimensionMetadata*>,std::allocator<std::pair<Dimension*const,DimensionMetadata*>>,std::__detail::_Select1st,std::equal_to<Dimension*>,std::hash<Dimension*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)metadata_map); plVar1 = (long *)(globals::dimensions_abi_cxx11_ + 0x10); while (plVar1 = (long *)*plVar1, plVar1 != (long *)0x0) { std::pair<std::__cxx11::string_const,Dimension*>::pair(apStack_38,(pair *)(plVar1 + 1)); /* try { // try from 0012ca02 to 0012ca06 has its CatchHandler @ 0012ca53 */ save_all_chunks(local_18); if (local_18 != (Dimension *)0x0) { (**(code **)(*(long *)local_18 + 8))(); } std::__cxx11::string::~string((string *)apStack_38); } std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Dimension*>,std::allocator<std::pair<std::__cxx11::string_const,Dimension*>>,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>> ::clear((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Dimension*>,std::allocator<std::pair<std::__cxx11::string_const,Dimension*>>,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>> *)globals::dimensions_abi_cxx11_); globals::spawn_dimension = 0; Config::save_file((Config *)universe_config,universe_config_path_abi_cxx11_); return; }
55,366
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
monkey531[P]llama/common/common.cpp
bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) { // Discard potential 0x prefix size_t start_i = 0; if (mask.length() >= 2 && mask.substr(0, 2) == "0x") { start_i = 2; } size_t num_digits = mask.length() - start_i; if (num_digits > 128) num_digits = 128; size_t end_i = num_digits + start_i; for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) { char c = mask.at(i); int8_t id = c; if ((c >= '0' && c <= '9')) { id -= '0'; } else if (c >= 'a' && c <= 'f') { id -= 'a' - 10; } else if (c >= 'A' && c <= 'F') { id -= 'A' - 10; } else { LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i)); return false; } boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0); boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0); boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0); boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0); } return true; }
O1
cpp
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %r12 cmpq $0x2, %r12 jb 0x71a54 movq %rsp, %rbx movl $0x2, %ecx movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x1b910 leaq 0x83869(%rip), %rsi # 0xf52aa movq %rbx, %rdi callq 0x1b220 xorl %ebx, %ebx testl %eax, %eax sete %bl addl %ebx, %ebx jmp 0x71a56 xorl %ebx, %ebx cmpq $0x2, %r12 jb 0x71a77 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x71a77 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8c0 movq 0x8(%r15), %rdx movq %rdx, %rax subq %rbx, %rax movl $0x80, %ecx cmpq %rcx, %rax cmovaeq %rcx, %rax cmpq %rbx, %rdx sete %bpl je 0x71b36 movq (%r15), %rcx leaq (%r14,%rax,4), %rsi addq $-0x4, %rsi addq %rbx, %rax movdqa 0x80c10(%rip), %xmm0 # 0xf26c0 movdqa 0x80c18(%rip), %xmm1 # 0xf26d0 cmpq %rbx, %rdx jbe 0x71b78 movsbl (%rcx,%rbx), %r14d leal -0x30(%r14), %edi cmpb $0xa, %dil jb 0x71af1 leal -0x61(%r14), %edi cmpb $0x5, %dil ja 0x71ae0 addb $-0x57, %r14b jmp 0x71aee leal -0x41(%r14), %edi cmpb $0x5, %dil ja 0x71b49 addb $-0x37, %r14b movl %r14d, %edi movzbl %dil, %edi movd (%rsi), %xmm2 punpcklbw %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] punpcklwd %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3] movd %edi, %xmm3 pshufd $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] pand %xmm0, %xmm3 pcmpeqd %xmm0, %xmm3 por %xmm2, %xmm3 pand %xmm1, %xmm3 packuswb %xmm3, %xmm3 packuswb %xmm3, %xmm3 movd %xmm3, (%rsi) incq %rbx addq $-0x4, %rsi cmpq %rax, %rbx setae %bpl jb 0x71ab8 andb $0x1, %bpl movl %ebp, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0xbf8d8(%rip), %rax # 0x131428 cmpl $0x0, (%rax) js 0x71b36 callq 0xcd023 leaq 0x80ee1(%rip), %rdx # 0xf2a42 movq %rax, %rdi movl $0x4, %esi movl %r14d, %ecx movl %ebx, %r8d xorl %eax, %eax callq 0xcd0be jmp 0x71b36 leaq 0x83cb7(%rip), %rdi # 0xf5836 movq %rbx, %rsi xorl %eax, %eax callq 0x1bd00
_Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rsi mov r15, rdi mov r12, [rdi+8] cmp r12, 2 jb short loc_71A54 mov rbx, rsp mov ecx, 2 mov rdi, rbx mov rsi, r15 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, aIncompleteUtf8+24h; "0x" mov rdi, rbx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) xor ebx, ebx test eax, eax setz bl add ebx, ebx jmp short loc_71A56 loc_71A54: xor ebx, ebx loc_71A56: cmp r12, 2 jb short loc_71A77 lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_71A77 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71A77: mov rdx, [r15+8] mov rax, rdx sub rax, rbx mov ecx, 80h cmp rax, rcx cmovnb rax, rcx cmp rdx, rbx setz bpl jz loc_71B36 mov rcx, [r15] lea rsi, [r14+rax*4] add rsi, 0FFFFFFFFFFFFFFFCh add rax, rbx movdqa xmm0, cs:xmmword_F26C0 movdqa xmm1, cs:xmmword_F26D0 loc_71AB8: cmp rdx, rbx jbe loc_71B78 movsx r14d, byte ptr [rcx+rbx] lea edi, [r14-30h] cmp dil, 0Ah jb short loc_71AF1 lea edi, [r14-61h] cmp dil, 5 ja short loc_71AE0 add r14b, 0A9h jmp short loc_71AEE loc_71AE0: lea edi, [r14-41h] cmp dil, 5 ja short loc_71B49 add r14b, 0C9h loc_71AEE: mov edi, r14d loc_71AF1: movzx edi, dil movd xmm2, dword ptr [rsi] punpcklbw xmm2, xmm2 punpcklwd xmm2, xmm2 movd xmm3, edi pshufd xmm3, xmm3, 0 pand xmm3, xmm0 pcmpeqd xmm3, xmm0 por xmm3, xmm2 pand xmm3, xmm1 packuswb xmm3, xmm3 packuswb xmm3, xmm3 movd dword ptr [rsi], xmm3 inc rbx add rsi, 0FFFFFFFFFFFFFFFCh cmp rbx, rax setnb bpl jb short loc_71AB8 loc_71B36: and bpl, 1 mov eax, ebp add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_71B49: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_71B36 call _Z15common_log_mainv; common_log_main(void) lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "... mov rdi, rax mov esi, 4 mov ecx, r14d mov r8d, ebx xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp short loc_71B36 loc_71B78: lea rdi, aBasicStringAtN; "basic_string::at: __n (which is %zu) >="... mov rsi, rbx xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
long long parse_cpu_mask(long long *a1, long long a2) { unsigned int v2; // ebp unsigned long long v3; // r12 unsigned long long v4; // rbx unsigned long long v5; // rdx long long v6; // rax long long v7; // rcx unsigned int *v8; // rsi unsigned long long v9; // rax __m128i si128; // xmm0 __m128i v11; // xmm1 int v12; // r14d unsigned __int8 v13; // di unsigned __int8 v14; // r14 __m128i v15; // xmm2 __m128i v16; // xmm2 __m128i v17; // xmm3 __m128i v18; // xmm3 int v20; // eax int v21; // r9d void *v22[2]; // [rsp+0h] [rbp-48h] BYREF long long v23; // [rsp+10h] [rbp-38h] BYREF v3 = a1[1]; if ( v3 < 2 ) { v4 = 0LL; } else { std::string::substr(v22, a1, 0LL, 2LL); v4 = 2 * (unsigned int)((unsigned int)std::string::compare(v22, "0x") == 0); } if ( v3 >= 2 && v22[0] != &v23 ) operator delete(v22[0], v23 + 1); v5 = a1[1]; v6 = v5 - v4; if ( v5 - v4 >= 0x80 ) v6 = 128LL; LOBYTE(v2) = v5 == v4; if ( v5 != v4 ) { v7 = *a1; v8 = (unsigned int *)(a2 + 4 * v6 - 4); v9 = v4 + v6; si128 = _mm_load_si128((const __m128i *)&xmmword_F26C0); v11 = _mm_load_si128((const __m128i *)&xmmword_F26D0); do { if ( v5 <= v4 ) std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", v4, v5); v12 = *(char *)(v7 + v4); v13 = *(_BYTE *)(v7 + v4) - 48; if ( v13 >= 0xAu ) { if ( (unsigned __int8)(v12 - 97) > 5u ) { if ( (unsigned __int8)(v12 - 65) > 5u ) { if ( common_log_verbosity_thold >= 0 ) { v20 = common_log_main(); common_log_add(v20, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v12, v4, v21); } break; } v14 = v12 - 55; } else { v14 = v12 - 87; } v13 = v14; } v15 = _mm_cvtsi32_si128(*v8); v16 = _mm_unpacklo_epi8(v15, v15); v17 = _mm_and_si128( _mm_or_si128( _mm_cmpeq_epi32(_mm_and_si128(_mm_shuffle_epi32(_mm_cvtsi32_si128(v13), 0), si128), si128), _mm_unpacklo_epi16(v16, v16)), v11); v18 = _mm_packus_epi16(v17, v17); *v8 = _mm_cvtsi128_si32(_mm_packus_epi16(v18, v18)); ++v4; --v8; LOBYTE(v2) = v4 >= v9; } while ( v4 < v9 ); } LOBYTE(v2) = v2 & 1; return v2; }
parse_cpu_mask: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV R15,RDI MOV R12,qword ptr [RDI + 0x8] CMP R12,0x2 JC 0x00171a54 MOV RBX,RSP MOV ECX,0x2 MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL 0x0011b910 LEA RSI,[0x1f52aa] MOV RDI,RBX CALL 0x0011b220 XOR EBX,EBX TEST EAX,EAX SETZ BL ADD EBX,EBX JMP 0x00171a56 LAB_00171a54: XOR EBX,EBX LAB_00171a56: CMP R12,0x2 JC 0x00171a77 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00171a77 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011b8c0 LAB_00171a77: MOV RDX,qword ptr [R15 + 0x8] MOV RAX,RDX SUB RAX,RBX MOV ECX,0x80 CMP RAX,RCX CMOVNC RAX,RCX CMP RDX,RBX SETZ BPL JZ 0x00171b36 MOV RCX,qword ptr [R15] LEA RSI,[R14 + RAX*0x4] ADD RSI,-0x4 ADD RAX,RBX MOVDQA XMM0,xmmword ptr [0x001f26c0] MOVDQA XMM1,xmmword ptr [0x001f26d0] LAB_00171ab8: CMP RDX,RBX JBE 0x00171b78 MOVSX R14D,byte ptr [RCX + RBX*0x1] LEA EDI,[R14 + -0x30] CMP DIL,0xa JC 0x00171af1 LEA EDI,[R14 + -0x61] CMP DIL,0x5 JA 0x00171ae0 ADD R14B,0xa9 JMP 0x00171aee LAB_00171ae0: LEA EDI,[R14 + -0x41] CMP DIL,0x5 JA 0x00171b49 ADD R14B,0xc9 LAB_00171aee: MOV EDI,R14D LAB_00171af1: MOVZX EDI,DIL MOVD XMM2,dword ptr [RSI] PUNPCKLBW XMM2,XMM2 PUNPCKLWD XMM2,XMM2 MOVD XMM3,EDI PSHUFD XMM3,XMM3,0x0 PAND XMM3,XMM0 PCMPEQD XMM3,XMM0 POR XMM3,XMM2 PAND XMM3,XMM1 PACKUSWB XMM3,XMM3 PACKUSWB XMM3,XMM3 MOVD dword ptr [RSI],XMM3 INC RBX ADD RSI,-0x4 CMP RBX,RAX SETNC BPL JC 0x00171ab8 LAB_00171b36: AND BPL,0x1 MOV EAX,EBP ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00171b49: LEA RAX,[0x231428] CMP dword ptr [RAX],0x0 JS 0x00171b36 CALL 0x001cd023 LEA RDX,[0x1f2a42] MOV RDI,RAX MOV ESI,0x4 MOV ECX,R14D MOV R8D,EBX XOR EAX,EAX CALL 0x001cd0be JMP 0x00171b36 LAB_00171b78: LEA RDI,[0x1f5836] MOV RSI,RBX XOR EAX,EAX CALL 0x0011bd00
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */ ulong parse_cpu_mask(string *param_1,bool *param_2) { char cVar1; ulong uVar2; long lVar3; char cVar4; short sVar7; short sVar8; short sVar9; ulong uVar10; int1 auVar11 [16]; int1 auVar12 [16]; int iVar13; ulong uVar14; int8 uVar15; ulong uVar16; int8 unaff_RBP; bool *pbVar17; byte bVar18; bool bVar19; bool bVar20; int1 uVar24; int1 auVar21 [16]; short sVar26; int1 auVar29 [16]; int1 auVar30 [16]; int1 auVar31 [16]; long *local_48 [2]; long local_38 [2]; char cVar5; char cVar6; int1 auVar22 [16]; int1 auVar23 [16]; int2 uVar25; int4 uVar27; int6 uVar28; if (*(ulong *)(param_1 + 8) < 2) { uVar16 = 0; } else { std::__cxx11::string::substr((ulong)local_48,(ulong)param_1); iVar13 = std::__cxx11::string::compare((char *)local_48); uVar16 = (ulong)((uint)(iVar13 == 0) * 2); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } } auVar12 = _DAT_001f26d0; auVar11 = _DAT_001f26c0; uVar2 = *(ulong *)(param_1 + 8); uVar14 = uVar2 - uVar16; if (0x7f < uVar14) { uVar14 = 0x80; } bVar20 = uVar2 == uVar16; if (!bVar20) { lVar3 = *(long *)param_1; pbVar17 = param_2 + uVar14 * 4; uVar14 = uVar14 + uVar16; do { pbVar17 = pbVar17 + -4; if (uVar2 <= uVar16) { uVar16 = std::__throw_out_of_range_fmt ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", uVar16); llama_log_set(common_init()::$_0::__invoke,0); if (-1 < common_log_verbosity_thold) { uVar15 = common_log_main(); common_log_add(uVar15,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER, LLAMA_COMMIT,LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return uVar16; } cVar1 = *(char *)(lVar3 + uVar16); bVar18 = cVar1 - 0x30; if (9 < bVar18) { if ((byte)(cVar1 + 0x9fU) < 6) { bVar18 = cVar1 + 0xa9; } else { if (5 < (byte)(cVar1 + 0xbfU)) { if (-1 < common_log_verbosity_thold) { uVar15 = common_log_main(); common_log_add(uVar15,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar1, uVar16 & 0xffffffff); } break; } bVar18 = cVar1 - 0x37; } } uVar27 = *(int4 *)pbVar17; uVar24 = (int1)((uint)uVar27 >> 0x18); uVar25 = CONCAT11(uVar24,uVar24); uVar24 = (int1)((uint)uVar27 >> 0x10); uVar15 = CONCAT35(CONCAT21(uVar25,uVar24),CONCAT14(uVar24,uVar27)); uVar24 = (int1)((uint)uVar27 >> 8); uVar28 = CONCAT51(CONCAT41((int)((ulong)uVar15 >> 0x20),uVar24),uVar24); auVar31._0_2_ = CONCAT11((char)uVar27,(char)uVar27); uVar10 = CONCAT62(uVar28,auVar31._0_2_); auVar23._8_4_ = 0; auVar23._0_8_ = uVar10; auVar23._12_2_ = uVar25; auVar23._14_2_ = uVar25; uVar25 = (int2)((ulong)uVar15 >> 0x20); auVar22._12_4_ = auVar23._12_4_; auVar22._8_2_ = 0; auVar22._0_8_ = uVar10; auVar22._10_2_ = uVar25; auVar21._10_6_ = auVar22._10_6_; auVar21._8_2_ = uVar25; auVar21._0_8_ = uVar10; uVar25 = (int2)uVar28; auVar31._8_8_ = auVar21._8_8_; auVar31._6_2_ = uVar25; auVar31._4_2_ = uVar25; auVar31._2_2_ = auVar31._0_2_; auVar29._1_3_ = 0; auVar29[0] = bVar18; auVar29[4] = bVar18; auVar29._5_3_ = 0; auVar29[8] = bVar18; auVar29._9_3_ = 0; auVar29[0xc] = bVar18; auVar29._13_3_ = 0; auVar29 = auVar29 & auVar11; auVar30._0_4_ = -(uint)(auVar29._0_4_ == auVar11._0_4_); auVar30._4_4_ = -(uint)(auVar29._4_4_ == auVar11._4_4_); auVar30._8_4_ = -(uint)(auVar29._8_4_ == auVar11._8_4_); auVar30._12_4_ = -(uint)(auVar29._12_4_ == auVar11._12_4_); auVar31 = (auVar30 | auVar31) & auVar12; sVar7 = auVar31._0_2_; cVar1 = (0 < sVar7) * (sVar7 < 0x100) * auVar31[0] - (0xff < sVar7); sVar7 = auVar31._2_2_; sVar26 = CONCAT11((0 < sVar7) * (sVar7 < 0x100) * auVar31[2] - (0xff < sVar7),cVar1); sVar7 = auVar31._4_2_; cVar4 = (0 < sVar7) * (sVar7 < 0x100) * auVar31[4] - (0xff < sVar7); sVar7 = auVar31._6_2_; uVar27 = CONCAT13((0 < sVar7) * (sVar7 < 0x100) * auVar31[6] - (0xff < sVar7), CONCAT12(cVar4,sVar26)); sVar7 = auVar31._8_2_; cVar5 = (0 < sVar7) * (sVar7 < 0x100) * auVar31[8] - (0xff < sVar7); sVar7 = auVar31._10_2_; uVar28 = CONCAT15((0 < sVar7) * (sVar7 < 0x100) * auVar31[10] - (0xff < sVar7), CONCAT14(cVar5,uVar27)); sVar7 = auVar31._12_2_; cVar6 = (0 < sVar7) * (sVar7 < 0x100) * auVar31[0xc] - (0xff < sVar7); sVar9 = auVar31._14_2_; sVar7 = (short)((uint)uVar27 >> 0x10); sVar8 = (short)((uint6)uVar28 >> 0x20); sVar9 = (short)(CONCAT17((0 < sVar9) * (sVar9 < 0x100) * auVar31[0xe] - (0xff < sVar9), CONCAT16(cVar6,uVar28)) >> 0x30); *(uint *)pbVar17 = CONCAT13((0 < sVar9) * (sVar9 < 0x100) * cVar6 - (0xff < sVar9), CONCAT12((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8), CONCAT11((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7), (0 < sVar26) * (sVar26 < 0x100) * cVar1 - (0xff < sVar26)))); uVar16 = uVar16 + 1; bVar19 = uVar16 < uVar14; bVar20 = !bVar19; } while (bVar19); } return CONCAT71((int7)((ulong)unaff_RBP >> 8),bVar20) & 0xffffffff; }
55,367
pfs_end_idle_wait_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_end_idle_wait_v1(PSI_idle_locker* locker) { PSI_idle_locker_state *state= reinterpret_cast<PSI_idle_locker_state*> (locker); assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { timer_end= state->m_timer(); wait_time= timer_end - state->m_timer_start; } if (flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); if (flags & STATE_FLAG_TIMED) { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */ event_name_array[GLOBAL_IDLE_EVENT_INDEX].aggregate_value(wait_time); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */ event_name_array[GLOBAL_IDLE_EVENT_INDEX].aggregate_counted(); } if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; if (thread->m_flag_events_waits_history) insert_events_waits_history(thread, wait); if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; assert(wait == thread->m_events_waits_current); } } if (flags & STATE_FLAG_TIMED) { /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME (timed) */ global_idle_stat.aggregate_value(wait_time); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME (counted) */ global_idle_stat.aggregate_counted(); } }
O3
cpp
pfs_end_idle_wait_v1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %r13d testb $0x1, %r13b jne 0x3c36e xorl %r12d, %r12d xorl %r15d, %r15d jmp 0x3c37b callq *0x18(%rbx) movq %rax, %r15 movq %rax, %r12 subq 0x10(%rbx), %r12 testb $0x2, %r13b je 0x3c40c movq 0x8(%rbx), %r14 cmpb $0x0, (%r14) jne 0x3c39b movq %r14, %rdi callq 0x401f8 movb $0x1, (%r14) movq 0x8(%r14), %rax incq 0x40(%rax) testb $0x1, %r13b je 0x3c3c1 addq %r12, 0x48(%rax) cmpq %r12, 0x50(%rax) ja 0x3c447 cmpq %r12, 0x58(%rax) jb 0x3c450 testb $0x4, %r13b je 0x3c40c movq 0x20(%rbx), %rbx movq %r15, 0x40(%rbx) movq 0x7f8(%r14), %rax movq %rax, 0x10(%rbx) cmpb $0x1, 0x7e2(%r14) jne 0x3c3ef movq %r14, %rdi movq %rbx, %rsi callq 0x2b3e9 cmpb $0x1, 0x7e3(%r14) jne 0x3c401 movq %rbx, %rdi callq 0x2b445 addq $-0xb0, 0x7f0(%r14) leaq 0x390d2d(%rip), %rax # 0x3cd140 incq (%rax) testb $0x1, %r13b je 0x3c42c addq %r12, 0x8(%rax) cmpq %r12, 0x10(%rax) ja 0x3c43b cmpq %r12, 0x18(%rax) jb 0x3c441 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x10(%rax) jmp 0x3c426 movq %r12, 0x18(%rax) jmp 0x3c42c movq %r12, 0x50(%rax) jmp 0x3c3b7 movq %r12, 0x58(%rax) jmp 0x3c3c1
pfs_end_idle_wait_v1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r13d, [rdi] test r13b, 1 jnz short loc_3C36E xor r12d, r12d xor r15d, r15d jmp short loc_3C37B loc_3C36E: call qword ptr [rbx+18h] mov r15, rax mov r12, rax sub r12, [rbx+10h] loc_3C37B: test r13b, 2 jz loc_3C40C mov r14, [rbx+8] cmp byte ptr [r14], 0 jnz short loc_3C39B mov rdi, r14; this call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov byte ptr [r14], 1 loc_3C39B: mov rax, [r14+8] inc qword ptr [rax+40h] test r13b, 1 jz short loc_3C3C1 add [rax+48h], r12 cmp [rax+50h], r12 ja loc_3C447 loc_3C3B7: cmp [rax+58h], r12 jb loc_3C450 loc_3C3C1: test r13b, 4 jz short loc_3C40C mov rbx, [rbx+20h] mov [rbx+40h], r15 mov rax, [r14+7F8h] mov [rbx+10h], rax cmp byte ptr [r14+7E2h], 1 jnz short loc_3C3EF mov rdi, r14 mov rsi, rbx call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *) loc_3C3EF: cmp byte ptr [r14+7E3h], 1 jnz short loc_3C401 mov rdi, rbx call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *) loc_3C401: add qword ptr [r14+7F0h], 0FFFFFFFFFFFFFF50h loc_3C40C: lea rax, global_idle_stat inc qword ptr [rax] test r13b, 1 jz short loc_3C42C add [rax+8], r12 cmp [rax+10h], r12 ja short loc_3C43B loc_3C426: cmp [rax+18h], r12 jb short loc_3C441 loc_3C42C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3C43B: mov [rax+10h], r12 jmp short loc_3C426 loc_3C441: mov [rax+18h], r12 jmp short loc_3C42C loc_3C447: mov [rax+50h], r12 jmp loc_3C3B7 loc_3C450: mov [rax+58h], r12 jmp loc_3C3C1
__int128 * pfs_end_idle_wait_v1(int *a1) { int v1; // r13d unsigned long long v2; // r12 long long v3; // r15 long long v4; // r14 _QWORD *v5; // rax long long v6; // rbx __int128 *result; // rax v1 = *a1; if ( (*a1 & 1) != 0 ) { v3 = (*((long long ( **)(int *))a1 + 3))(a1); v2 = v3 - *((_QWORD *)a1 + 2); } else { v2 = 0LL; v3 = 0LL; } if ( (v1 & 2) != 0 ) { v4 = *((_QWORD *)a1 + 1); if ( !*(_BYTE *)v4 ) { PFS_connection_slice::reset_waits_stats(*((PFS_connection_slice **)a1 + 1)); *(_BYTE *)v4 = 1; } v5 = *(_QWORD **)(v4 + 8); ++v5[8]; if ( (v1 & 1) != 0 ) { v5[9] += v2; if ( v5[10] > v2 ) v5[10] = v2; if ( v5[11] < v2 ) v5[11] = v2; } if ( (v1 & 4) != 0 ) { v6 = *((_QWORD *)a1 + 4); *(_QWORD *)(v6 + 64) = v3; *(_QWORD *)(v6 + 16) = *(_QWORD *)(v4 + 2040); if ( *(_BYTE *)(v4 + 2018) == 1 ) insert_events_waits_history(v4, v6); if ( *(_BYTE *)(v4 + 2019) == 1 ) insert_events_waits_history_long(v6); *(_QWORD *)(v4 + 2032) -= 176LL; } } result = &global_idle_stat; *(_QWORD *)&global_idle_stat = global_idle_stat + 1; if ( (v1 & 1) != 0 ) { *((_QWORD *)&global_idle_stat + 1) += v2; if ( *((_QWORD *)&global_idle_stat + 2) > v2 ) *((_QWORD *)&global_idle_stat + 2) = v2; if ( *((_QWORD *)&global_idle_stat + 3) < v2 ) *((_QWORD *)&global_idle_stat + 3) = v2; } return result; }
pfs_end_idle_wait_v1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R13D,dword ptr [RDI] TEST R13B,0x1 JNZ 0x0013c36e XOR R12D,R12D XOR R15D,R15D JMP 0x0013c37b LAB_0013c36e: CALL qword ptr [RBX + 0x18] MOV R15,RAX MOV R12,RAX SUB R12,qword ptr [RBX + 0x10] LAB_0013c37b: TEST R13B,0x2 JZ 0x0013c40c MOV R14,qword ptr [RBX + 0x8] CMP byte ptr [R14],0x0 JNZ 0x0013c39b MOV RDI,R14 CALL 0x001401f8 MOV byte ptr [R14],0x1 LAB_0013c39b: MOV RAX,qword ptr [R14 + 0x8] INC qword ptr [RAX + 0x40] TEST R13B,0x1 JZ 0x0013c3c1 ADD qword ptr [RAX + 0x48],R12 CMP qword ptr [RAX + 0x50],R12 JA 0x0013c447 LAB_0013c3b7: CMP qword ptr [RAX + 0x58],R12 JC 0x0013c450 LAB_0013c3c1: TEST R13B,0x4 JZ 0x0013c40c MOV RBX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x40],R15 MOV RAX,qword ptr [R14 + 0x7f8] MOV qword ptr [RBX + 0x10],RAX CMP byte ptr [R14 + 0x7e2],0x1 JNZ 0x0013c3ef MOV RDI,R14 MOV RSI,RBX CALL 0x0012b3e9 LAB_0013c3ef: CMP byte ptr [R14 + 0x7e3],0x1 JNZ 0x0013c401 MOV RDI,RBX CALL 0x0012b445 LAB_0013c401: ADD qword ptr [R14 + 0x7f0],-0xb0 LAB_0013c40c: LEA RAX,[0x4cd140] INC qword ptr [RAX] TEST R13B,0x1 JZ 0x0013c42c ADD qword ptr [RAX + 0x8],R12 CMP qword ptr [RAX + 0x10],R12 JA 0x0013c43b LAB_0013c426: CMP qword ptr [RAX + 0x18],R12 JC 0x0013c441 LAB_0013c42c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013c43b: MOV qword ptr [RAX + 0x10],R12 JMP 0x0013c426 LAB_0013c441: MOV qword ptr [RAX + 0x18],R12 JMP 0x0013c42c LAB_0013c447: MOV qword ptr [RAX + 0x50],R12 JMP 0x0013c3b7 LAB_0013c450: MOV qword ptr [RAX + 0x58],R12 JMP 0x0013c3c1
void pfs_end_idle_wait_v1(uint *param_1) { uint uVar1; PFS_connection_slice *this; long lVar2; PFS_events_waits *pPVar3; long lVar4; ulong uVar5; uVar1 = *param_1; if ((uVar1 & 1) == 0) { uVar5 = 0; lVar4 = 0; } else { lVar4 = (**(code **)(param_1 + 6))(); uVar5 = lVar4 - *(long *)(param_1 + 4); } if ((uVar1 & 2) != 0) { this = *(PFS_connection_slice **)(param_1 + 2); if (*this == (PFS_connection_slice)0x0) { PFS_connection_slice::reset_waits_stats(this); *this = (PFS_connection_slice)0x1; } lVar2 = *(long *)(this + 8); *(long *)(lVar2 + 0x40) = *(long *)(lVar2 + 0x40) + 1; if ((uVar1 & 1) != 0) { *(long *)(lVar2 + 0x48) = *(long *)(lVar2 + 0x48) + uVar5; if (uVar5 < *(ulong *)(lVar2 + 0x50)) { *(ulong *)(lVar2 + 0x50) = uVar5; } if (*(ulong *)(lVar2 + 0x58) < uVar5) { *(ulong *)(lVar2 + 0x58) = uVar5; } } if ((uVar1 & 4) != 0) { pPVar3 = *(PFS_events_waits **)(param_1 + 8); *(long *)(pPVar3 + 0x40) = lVar4; *(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8); if (this[0x7e2] == (PFS_connection_slice)0x1) { insert_events_waits_history((PFS_thread *)this,pPVar3); } if (this[0x7e3] == (PFS_connection_slice)0x1) { insert_events_waits_history_long(pPVar3); } *(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0; } } global_idle_stat = global_idle_stat + 1; if ((uVar1 & 1) != 0) { DAT_004cd148 = DAT_004cd148 + uVar5; if (uVar5 < DAT_004cd150) { DAT_004cd150 = uVar5; } if (DAT_004cd158 < uVar5) { DAT_004cd158 = uVar5; } } return; }
55,368
google::protobuf::DoubleValue::CopyFrom(google::protobuf::DoubleValue const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc
void DoubleValue::CopyFrom(const DoubleValue& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DoubleValue) if (&from == this) return; Clear(); MergeFrom(from); }
O3
cpp
google::protobuf::DoubleValue::CopyFrom(google::protobuf::DoubleValue const&): pushq %r15 pushq %r14 pushq %rbx cmpq %rdi, %rsi je 0xb06c4 movq %rsi, %r14 movq %rdi, %r15 movq $0x0, 0x10(%rdi) leaq 0x8(%rdi), %rbx testb $0x1, 0x8(%rdi) je 0xb06a4 movq %rbx, %rdi callq 0x73576 movq 0x10(%r14), %xmm0 movq %xmm0, %rax testq %rax, %rax je 0xb06ba movq %xmm0, 0x10(%r15) movq 0x8(%r14), %rsi testb $0x1, %sil jne 0xb06ca popq %rbx popq %r14 popq %r15 retq andq $-0x4, %rsi addq $0x8, %rsi movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x734be nop
_ZN6google8protobuf11DoubleValue8CopyFromERKS1_: push r15 push r14 push rbx cmp rsi, rdi jz short loc_B06C4 mov r14, rsi mov r15, rdi mov qword ptr [rdi+10h], 0 lea rbx, [rdi+8] test byte ptr [rdi+8], 1 jz short loc_B06A4 mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void) loc_B06A4: movq xmm0, qword ptr [r14+10h] movq rax, xmm0 test rax, rax jz short loc_B06BA movq qword ptr [r15+10h], xmm0 loc_B06BA: mov rsi, [r14+8] test sil, 1 jnz short loc_B06CA loc_B06C4: pop rbx pop r14 pop r15 retn loc_B06CA: and rsi, 0FFFFFFFFFFFFFFFCh add rsi, 8 mov rdi, rbx pop rbx pop r14 pop r15 jmp _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
long long google::protobuf::DoubleValue::CopyFrom( google::protobuf::DoubleValue *this, const google::protobuf::DoubleValue *a2) { long long v2; // xmm0_8 long long result; // rax long long v4; // rsi if ( a2 != this ) { *((_QWORD *)this + 2) = 0LL; if ( (*((_BYTE *)this + 8) & 1) != 0 ) google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((long long *)this + 1); v2 = *((_QWORD *)a2 + 2); result = v2; if ( v2 ) *((_QWORD *)this + 2) = v2; v4 = *((_QWORD *)a2 + 1); if ( (v4 & 1) != 0 ) return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (long long *)this + 1, (const google::protobuf::UnknownFieldSet *)((v4 & 0xFFFFFFFFFFFFFFFCLL) + 8)); } return result; }
CopyFrom: PUSH R15 PUSH R14 PUSH RBX CMP RSI,RDI JZ 0x001b06c4 MOV R14,RSI MOV R15,RDI MOV qword ptr [RDI + 0x10],0x0 LEA RBX,[RDI + 0x8] TEST byte ptr [RDI + 0x8],0x1 JZ 0x001b06a4 MOV RDI,RBX CALL 0x00173576 LAB_001b06a4: MOVQ XMM0,qword ptr [R14 + 0x10] MOVQ RAX,XMM0 TEST RAX,RAX JZ 0x001b06ba MOVQ qword ptr [R15 + 0x10],XMM0 LAB_001b06ba: MOV RSI,qword ptr [R14 + 0x8] TEST SIL,0x1 JNZ 0x001b06ca LAB_001b06c4: POP RBX POP R14 POP R15 RET LAB_001b06ca: AND RSI,-0x4 ADD RSI,0x8 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x001734be
/* google::protobuf::DoubleValue::CopyFrom(google::protobuf::DoubleValue const&) */ void __thiscall google::protobuf::DoubleValue::CopyFrom(DoubleValue *this,DoubleValue *param_1) { if (param_1 != this) { *(int8 *)(this + 0x10) = 0; if (((byte)this[8] & 1) != 0) { internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } if (*(long *)(param_1 + 0x10) != 0) { *(long *)(this + 0x10) = *(long *)(param_1 + 0x10); } if ((*(ulong *)(param_1 + 8) & 1) != 0) { internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8), (UnknownFieldSet *)((*(ulong *)(param_1 + 8) & 0xfffffffffffffffc) + 8)); return; } } return; }
55,369
file_input::get_tensor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
monkey531[P]llama/examples/export-lora/export-lora.cpp
ggml_tensor * get_tensor(std::string name) { if (tensors.find(name) == tensors.end()) { return nullptr; } return tensors[name]; }
O3
cpp
file_input::get_tensor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 leaq 0x218(%rdi), %r14 movq %r14, %rdi callq 0x249a2 addq $0x220, %r15 # imm = 0x220 cmpq %r15, %rax je 0x23af2 movq %r14, %rdi movq %rbx, %rsi callq 0x234c4 movq (%rax), %rax jmp 0x23af4 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
_ZN10file_input10get_tensorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi lea r14, [rdi+218h] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::find(std::string const&) add r15, 220h cmp rax, r15 jz short loc_23AF2 mov rdi, r14 mov rsi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_; std::map<std::string,ggml_tensor *>::operator[](std::string const&) mov rax, [rax] jmp short loc_23AF4 loc_23AF2: xor eax, eax loc_23AF4: pop rbx pop r14 pop r15 retn
long long file_input::get_tensor(long long a1, long long a2) { if ( std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::find(a1 + 536) == a1 + 544 ) return 0LL; else return *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a1 + 536, a2); }
get_tensor: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI LEA R14,[RDI + 0x218] MOV RDI,R14 CALL 0x001249a2 ADD R15,0x220 CMP RAX,R15 JZ 0x00123af2 MOV RDI,R14 MOV RSI,RBX CALL 0x001234c4 MOV RAX,qword ptr [RAX] JMP 0x00123af4 LAB_00123af2: XOR EAX,EAX LAB_00123af4: POP RBX POP R14 POP R15 RET
/* file_input::get_tensor(std::__cxx11::string) */ int8 __thiscall file_input::get_tensor(file_input *this,string *param_2) { file_input *pfVar1; int8 *puVar2; int8 uVar3; pfVar1 = (file_input *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *)(this + 0x218),param_2); if (pfVar1 == this + 0x220) { uVar3 = 0; } else { puVar2 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[]((map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *)(this + 0x218),param_2); uVar3 = *puVar2; } return uVar3; }
55,370
JS_AtomGetStrRT
bluesky950520[P]quickjs/quickjs.c
static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size, JSAtom atom) { if (__JS_AtomIsTaggedInt(atom)) { snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom)); } else if (atom == JS_ATOM_NULL) { snprintf(buf, buf_size, "<null>"); } else if (atom >= rt->atom_size) { assert(atom < rt->atom_size); snprintf(buf, buf_size, "<invalid %x>", atom); } else { JSAtomStruct *p = rt->atom_array[atom]; *buf = '\0'; if (atom_is_free(p)) { assert(!atom_is_free(p)); snprintf(buf, buf_size, "<free %x>", atom); } else if (p != NULL) { JSString *str = p; if (str->is_wide_char) { /* encode surrogates correctly */ utf8_encode_buf16(buf, buf_size, str->u.str16, str->len); } else { /* special case ASCII strings */ int i, c = 0; for(i = 0; i < str->len; i++) { c |= str->u.str8[i]; } if (c < 0x80) return (const char *)str->u.str8; utf8_encode_buf8(buf, buf_size, str->u.str8, str->len); } } } return buf; }
O2
c
JS_AtomGetStrRT: pushq %rbx movl %edx, %ecx movq %rsi, %rbx testl %edx, %edx js 0x1b844 je 0x1b853 cmpl %ecx, 0x58(%rdi) jbe 0x1b862 movq 0x68(%rdi), %rax movl %ecx, %edx movq (%rax,%rdx,8), %rdx movb $0x0, (%rbx) testb $0x1, %dl jne 0x1b86b testq %rdx, %rdx je 0x1b87f movq 0x4(%rdx), %rcx addq $0x18, %rdx movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF testl %ecx, %ecx js 0x1b884 xorl %esi, %esi xorl %edi, %edi cmpq %rsi, %rax je 0x1b894 movzbl (%rdx,%rsi), %r8d orl %r8d, %edi incq %rsi jmp 0x1b832 andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq 0x6991c(%rip), %rdx # 0x8516d jmp 0x1b872 movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C jmp 0x1b87f leaq 0x68ef9(%rip), %rdx # 0x84762 jmp 0x1b872 leaq 0x68efd(%rip), %rdx # 0x8476f pushq $0x40 popq %rsi movq %rbx, %rdi xorl %eax, %eax callq 0xe2e0 movq %rbx, %rax popq %rbx retq pushq $0x40 popq %rsi movq %rbx, %rdi movq %rax, %rcx callq 0x15788 jmp 0x1b87f cmpl $0x80, %edi jl 0x1b8af andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF pushq $0x40 popq %rsi movq %rbx, %rdi callq 0x15711 jmp 0x1b87f movq %rdx, %rbx jmp 0x1b87f
JS_AtomGetStrRT: push rbx mov ecx, edx mov rbx, rsi test edx, edx js short loc_1B844 jz short loc_1B853 cmp [rdi+58h], ecx jbe short loc_1B862 mov rax, [rdi+68h] mov edx, ecx mov rdx, [rax+rdx*8] mov byte ptr [rbx], 0 test dl, 1 jnz short loc_1B86B test rdx, rdx jz short loc_1B87F mov rcx, [rdx+4] add rdx, 18h mov eax, ecx and eax, 7FFFFFFFh test ecx, ecx js short loc_1B884 xor esi, esi xor edi, edi loc_1B832: cmp rax, rsi jz short loc_1B894 movzx r8d, byte ptr [rdx+rsi] or edi, r8d inc rsi jmp short loc_1B832 loc_1B844: and ecx, 7FFFFFFFh lea rdx, aUnreasonableAt+19h; "%u" jmp short loc_1B872 loc_1B853: mov dword ptr [rbx+3], 3E6C6Ch mov dword ptr [rbx], 6C756E3Ch jmp short loc_1B87F loc_1B862: lea rdx, aInvalidX; "<invalid %x>" jmp short loc_1B872 loc_1B86B: lea rdx, aFreeX; "<free %x>" loc_1B872: push 40h ; '@' pop rsi mov rdi, rbx xor eax, eax call _snprintf loc_1B87F: mov rax, rbx pop rbx retn loc_1B884: push 40h ; '@' pop rsi mov rdi, rbx mov rcx, rax call utf8_encode_buf16 jmp short loc_1B87F loc_1B894: cmp edi, 80h jl short loc_1B8AF and ecx, 7FFFFFFFh push 40h ; '@' pop rsi mov rdi, rbx call utf8_encode_buf8 jmp short loc_1B87F loc_1B8AF: mov rbx, rdx jmp short loc_1B87F
long long JS_AtomGetStrRT(long long a1, char *a2, int a3) { long long v3; // rbx long long v4; // rdx long long v5; // rcx long long v6; // rdx long long v7; // rsi int v8; // edi v3 = (long long)a2; if ( a3 < 0 ) { snprintf(a2, 64LL, "%u"); } else if ( a3 ) { if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 ) { snprintf(a2, 64LL, "<invalid %x>"); } else { v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3); *a2 = 0; if ( (v4 & 1) != 0 ) { snprintf(a2, 64LL, "<free %x>"); } else if ( v4 ) { v5 = *(_QWORD *)(v4 + 4); v6 = v4 + 24; if ( (int)v5 < 0 ) { utf8_encode_buf16((long long)a2, 0x40uLL, v6, v5 & 0x7FFFFFFF); } else { v7 = 0LL; v8 = 0; while ( (v5 & 0x7FFFFFFF) != v7 ) v8 |= *(unsigned __int8 *)(v6 + v7++); if ( v8 < 128 ) return v6; else utf8_encode_buf8(v3, 0x40uLL, v6, v5 & 0x7FFFFFFF); } } } } else { strcpy(a2, "<null>"); } return v3; }
JS_AtomGetStrRT: PUSH RBX MOV ECX,EDX MOV RBX,RSI TEST EDX,EDX JS 0x0011b844 JZ 0x0011b853 CMP dword ptr [RDI + 0x58],ECX JBE 0x0011b862 MOV RAX,qword ptr [RDI + 0x68] MOV EDX,ECX MOV RDX,qword ptr [RAX + RDX*0x8] MOV byte ptr [RBX],0x0 TEST DL,0x1 JNZ 0x0011b86b TEST RDX,RDX JZ 0x0011b87f MOV RCX,qword ptr [RDX + 0x4] ADD RDX,0x18 MOV EAX,ECX AND EAX,0x7fffffff TEST ECX,ECX JS 0x0011b884 XOR ESI,ESI XOR EDI,EDI LAB_0011b832: CMP RAX,RSI JZ 0x0011b894 MOVZX R8D,byte ptr [RDX + RSI*0x1] OR EDI,R8D INC RSI JMP 0x0011b832 LAB_0011b844: AND ECX,0x7fffffff LEA RDX,[0x18516d] JMP 0x0011b872 LAB_0011b853: MOV dword ptr [RBX + 0x3],0x3e6c6c MOV dword ptr [RBX],0x6c756e3c JMP 0x0011b87f LAB_0011b862: LEA RDX,[0x184762] JMP 0x0011b872 LAB_0011b86b: LEA RDX,[0x18476f] LAB_0011b872: PUSH 0x40 POP RSI MOV RDI,RBX XOR EAX,EAX CALL 0x0010e2e0 LAB_0011b87f: MOV RAX,RBX POP RBX RET LAB_0011b884: PUSH 0x40 POP RSI MOV RDI,RBX MOV RCX,RAX CALL 0x00115788 JMP 0x0011b87f LAB_0011b894: CMP EDI,0x80 JL 0x0011b8af AND ECX,0x7fffffff PUSH 0x40 POP RSI MOV RDI,RBX CALL 0x00115711 JMP 0x0011b87f LAB_0011b8af: MOV RBX,RDX JMP 0x0011b87f
char * JS_AtomGetStrRT(long param_1,char *param_2,uint param_3) { ulong uVar1; uint uVar2; char *pcVar3; ulong uVar4; byte bVar5; uVar4 = (ulong)param_3; if ((int)param_3 < 0) { uVar4 = (ulong)(param_3 & 0x7fffffff); pcVar3 = "%u"; } else { if (param_3 == 0) { builtin_strncpy(param_2,"<null>",7); return param_2; } if (param_3 < *(uint *)(param_1 + 0x58)) { uVar1 = *(ulong *)(*(long *)(param_1 + 0x68) + uVar4 * 8); *param_2 = '\0'; if ((uVar1 & 1) == 0) { if (uVar1 == 0) { return param_2; } pcVar3 = (char *)(uVar1 + 0x18); uVar2 = (uint)*(int8 *)(uVar1 + 4); if (-1 < (int)uVar2) { bVar5 = 0; for (uVar4 = 0; (uVar2 & 0x7fffffff) != uVar4; uVar4 = uVar4 + 1) { bVar5 = bVar5 | pcVar3[uVar4]; } if (bVar5 < 0x80) { return pcVar3; } utf8_encode_buf8(param_2,0x40,pcVar3,uVar2 & 0x7fffffff); return param_2; } utf8_encode_buf16(param_2,0x40,pcVar3,(ulong)(uVar2 & 0x7fffffff)); return param_2; } pcVar3 = "<free %x>"; } else { pcVar3 = "<invalid %x>"; } } snprintf(param_2,0x40,pcVar3,uVar4); return param_2; }
55,371
JS_AtomGetStrRT
bluesky950520[P]quickjs/quickjs.c
static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size, JSAtom atom) { if (__JS_AtomIsTaggedInt(atom)) { snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom)); } else if (atom == JS_ATOM_NULL) { snprintf(buf, buf_size, "<null>"); } else if (atom >= rt->atom_size) { assert(atom < rt->atom_size); snprintf(buf, buf_size, "<invalid %x>", atom); } else { JSAtomStruct *p = rt->atom_array[atom]; *buf = '\0'; if (atom_is_free(p)) { assert(!atom_is_free(p)); snprintf(buf, buf_size, "<free %x>", atom); } else if (p != NULL) { JSString *str = p; if (str->is_wide_char) { /* encode surrogates correctly */ utf8_encode_buf16(buf, buf_size, str->u.str16, str->len); } else { /* special case ASCII strings */ int i, c = 0; for(i = 0; i < str->len; i++) { c |= str->u.str8[i]; } if (c < 0x80) return (const char *)str->u.str8; utf8_encode_buf8(buf, buf_size, str->u.str8, str->len); } } } return buf; }
O3
c
JS_AtomGetStrRT: pushq %rbx movl %edx, %ecx movq %rsi, %rbx testl %edx, %edx js 0x21e9d je 0x21eac cmpl %ecx, 0x58(%rdi) jbe 0x21ebb movq 0x68(%rdi), %rax movl %ecx, %edx movq (%rax,%rdx,8), %rdx movb $0x0, (%rbx) testb $0x1, %dl jne 0x21ec4 testq %rdx, %rdx je 0x21eda movq 0x4(%rdx), %rcx testl %ecx, %ecx js 0x21edf movq %rcx, %rax shlq $0x21, %rax je 0x21ef8 movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %esi, %esi xorl %edi, %edi movzbl 0x18(%rdx,%rsi), %r8d orl %r8d, %edi incq %rsi cmpq %rsi, %rax jne 0x21e6b cmpl $0x80, %edi jl 0x21ef8 addq $0x18, %rdx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movl $0x40, %esi movq %rbx, %rdi callq 0x1b713 jmp 0x21eda andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq 0x7f333(%rip), %rdx # 0xa11dd jmp 0x21ecb movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C jmp 0x21eda leaq 0x7e910(%rip), %rdx # 0xa07d2 jmp 0x21ecb leaq 0x7e914(%rip), %rdx # 0xa07df movl $0x40, %esi movq %rbx, %rdi xorl %eax, %eax callq 0xe2d0 movq %rbx, %rax popq %rbx retq addq $0x18, %rdx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movl $0x40, %esi movq %rbx, %rdi callq 0x1b79b jmp 0x21eda addq $0x18, %rdx movq %rdx, %rbx jmp 0x21eda
JS_AtomGetStrRT: push rbx mov ecx, edx mov rbx, rsi test edx, edx js loc_21E9D jz loc_21EAC cmp [rdi+58h], ecx jbe loc_21EBB mov rax, [rdi+68h] mov edx, ecx mov rdx, [rax+rdx*8] mov byte ptr [rbx], 0 test dl, 1 jnz loc_21EC4 test rdx, rdx jz loc_21EDA mov rcx, [rdx+4] test ecx, ecx js loc_21EDF mov rax, rcx shl rax, 21h jz loc_21EF8 mov eax, ecx and eax, 7FFFFFFFh xor esi, esi xor edi, edi loc_21E6B: movzx r8d, byte ptr [rdx+rsi+18h] or edi, r8d inc rsi cmp rax, rsi jnz short loc_21E6B cmp edi, 80h jl short loc_21EF8 add rdx, 18h and ecx, 7FFFFFFFh mov esi, 40h ; '@' mov rdi, rbx call utf8_encode_buf8 jmp short loc_21EDA loc_21E9D: and ecx, 7FFFFFFFh lea rdx, aUnreasonableAt+19h; "%u" jmp short loc_21ECB loc_21EAC: mov dword ptr [rbx+3], 3E6C6Ch mov dword ptr [rbx], 6C756E3Ch jmp short loc_21EDA loc_21EBB: lea rdx, aInvalidX; "<invalid %x>" jmp short loc_21ECB loc_21EC4: lea rdx, aFreeX; "<free %x>" loc_21ECB: mov esi, 40h ; '@' mov rdi, rbx xor eax, eax call _snprintf loc_21EDA: mov rax, rbx pop rbx retn loc_21EDF: add rdx, 18h and ecx, 7FFFFFFFh mov esi, 40h ; '@' mov rdi, rbx call utf8_encode_buf16 jmp short loc_21EDA loc_21EF8: add rdx, 18h mov rbx, rdx jmp short loc_21EDA
long long JS_AtomGetStrRT(long long a1, char *a2, int a3) { long long v3; // rbx long long v4; // rdx long long v5; // rcx long long v6; // rsi int v7; // edi v3 = (long long)a2; if ( a3 < 0 ) { snprintf(a2, 64LL, "%u"); } else if ( a3 ) { if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 ) { snprintf(a2, 64LL, "<invalid %x>"); } else { v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3); *a2 = 0; if ( (v4 & 1) != 0 ) { snprintf(a2, 64LL, "<free %x>"); } else if ( v4 ) { v5 = *(_QWORD *)(v4 + 4); if ( (int)v5 < 0 ) { utf8_encode_buf16((long long)a2, 0x40uLL, v4 + 24, *(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL); } else { if ( !(v5 << 33) ) return v4 + 24; v6 = 0LL; v7 = 0; do v7 |= *(unsigned __int8 *)(v4 + v6++ + 24); while ( (*(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL) != v6 ); if ( v7 >= 128 ) utf8_encode_buf8(v3, 0x40uLL, v4 + 24, *(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL); else return v4 + 24; } } } } else { strcpy(a2, "<null>"); } return v3; }
JS_AtomGetStrRT: PUSH RBX MOV ECX,EDX MOV RBX,RSI TEST EDX,EDX JS 0x00121e9d JZ 0x00121eac CMP dword ptr [RDI + 0x58],ECX JBE 0x00121ebb MOV RAX,qword ptr [RDI + 0x68] MOV EDX,ECX MOV RDX,qword ptr [RAX + RDX*0x8] MOV byte ptr [RBX],0x0 TEST DL,0x1 JNZ 0x00121ec4 TEST RDX,RDX JZ 0x00121eda MOV RCX,qword ptr [RDX + 0x4] TEST ECX,ECX JS 0x00121edf MOV RAX,RCX SHL RAX,0x21 JZ 0x00121ef8 MOV EAX,ECX AND EAX,0x7fffffff XOR ESI,ESI XOR EDI,EDI LAB_00121e6b: MOVZX R8D,byte ptr [RDX + RSI*0x1 + 0x18] OR EDI,R8D INC RSI CMP RAX,RSI JNZ 0x00121e6b CMP EDI,0x80 JL 0x00121ef8 ADD RDX,0x18 AND ECX,0x7fffffff MOV ESI,0x40 MOV RDI,RBX CALL 0x0011b713 JMP 0x00121eda LAB_00121e9d: AND ECX,0x7fffffff LEA RDX,[0x1a11dd] JMP 0x00121ecb LAB_00121eac: MOV dword ptr [RBX + 0x3],0x3e6c6c MOV dword ptr [RBX],0x6c756e3c JMP 0x00121eda LAB_00121ebb: LEA RDX,[0x1a07d2] JMP 0x00121ecb LAB_00121ec4: LEA RDX,[0x1a07df] LAB_00121ecb: MOV ESI,0x40 MOV RDI,RBX XOR EAX,EAX CALL 0x0010e2d0 LAB_00121eda: MOV RAX,RBX POP RBX RET LAB_00121edf: ADD RDX,0x18 AND ECX,0x7fffffff MOV ESI,0x40 MOV RDI,RBX CALL 0x0011b79b JMP 0x00121eda LAB_00121ef8: ADD RDX,0x18 MOV RBX,RDX JMP 0x00121eda
char * JS_AtomGetStrRT(long param_1,char *param_2,uint param_3) { ulong uVar1; uint uVar2; char *__format; ulong uVar3; byte bVar4; uVar3 = (ulong)param_3; if ((int)param_3 < 0) { uVar3 = (ulong)(param_3 & 0x7fffffff); __format = "%u"; } else { if (param_3 == 0) { builtin_strncpy(param_2,"<null>",7); return param_2; } if (param_3 < *(uint *)(param_1 + 0x58)) { uVar1 = *(ulong *)(*(long *)(param_1 + 0x68) + uVar3 * 8); *param_2 = '\0'; if ((uVar1 & 1) == 0) { if (uVar1 == 0) { return param_2; } uVar2 = (uint)*(ulong *)(uVar1 + 4); if (-1 < (int)uVar2) { if ((*(ulong *)(uVar1 + 4) & 0x7fffffff) != 0) { uVar3 = 0; bVar4 = 0; do { bVar4 = bVar4 | *(byte *)(uVar1 + 0x18 + uVar3); uVar3 = uVar3 + 1; } while ((uVar2 & 0x7fffffff) != uVar3); if (0x7f < bVar4) { utf8_encode_buf8(param_2,0x40,uVar1 + 0x18,uVar2 & 0x7fffffff); return param_2; } } return (char *)(uVar1 + 0x18); } utf8_encode_buf16(param_2,0x40,uVar1 + 0x18,uVar2 & 0x7fffffff); return param_2; } __format = "<free %x>"; } else { __format = "<invalid %x>"; } } snprintf(param_2,0x40,__format,uVar3); return param_2; }
55,372
cr_union1
bluesky950520[P]quickjs/libunicode.c
int cr_union1(CharRange *cr, const uint32_t *b_pt, int b_len) { CharRange a = *cr; int ret; cr->len = 0; cr->size = 0; cr->points = NULL; ret = cr_op(cr, a.points, a.len, b_pt, b_len, CR_OP_UNION); cr_free(&a); return ret; }
O3
c
cr_union1: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r8d movq %rsi, %rcx movl (%rdi), %edx movq 0x8(%rdi), %rbx movq 0x10(%rdi), %r14 movq 0x18(%rdi), %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rbx, %rsi xorl %r9d, %r9d callq 0x9a3c1 movl %eax, %ebp movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq *%r15 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
cr_union1: push rbp push r15 push r14 push rbx push rax mov r8d, edx mov rcx, rsi mov edx, [rdi] mov rbx, [rdi+8] mov r14, [rdi+10h] mov r15, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rsi, rbx xor r9d, r9d call cr_op mov ebp, eax mov rdi, r14 mov rsi, rbx xor edx, edx call r15 mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long cr_union1(long long a1, long long a2, int a3) { int v4; // edx long long v5; // rbx long long v6; // r14 void ( *v7)(long long, long long, _QWORD); // r15 unsigned int v8; // ebp v4 = *(_DWORD *)a1; v5 = *(_QWORD *)(a1 + 8); v6 = *(_QWORD *)(a1 + 16); v7 = *(void ( **)(long long, long long, _QWORD))(a1 + 24); *(_OWORD *)a1 = 0LL; v8 = cr_op((const char *)a1, v5, v4, a2, a3, 0); v7(v6, v5, 0LL); return v8; }
cr_union1: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R8D,EDX MOV RCX,RSI MOV EDX,dword ptr [RDI] MOV RBX,qword ptr [RDI + 0x8] MOV R14,qword ptr [RDI + 0x10] MOV R15,qword ptr [RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RSI,RBX XOR R9D,R9D CALL 0x0019a3c1 MOV EBP,EAX MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL R15 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 cr_union1(int8 *param_1,int8 param_2,int4 param_3) { int8 uVar1; int8 uVar2; code *pcVar3; int4 uVar4; uVar4 = *(int4 *)param_1; uVar1 = param_1[1]; uVar2 = param_1[2]; pcVar3 = (code *)param_1[3]; *param_1 = 0; param_1[1] = 0; uVar4 = cr_op(param_1,uVar1,uVar4,param_2,param_3,0); (*pcVar3)(uVar2,uVar1,0); return uVar4; }
55,373
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O1
cpp
common_chat_templates_from_model(llama_model 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 $0xa8, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x1c220 movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x2d612 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x2d612 cmpq $0x0, 0x8(%r13) setne %r15b jne 0x84a4c movq %r12, %rdi xorl %esi, %esi callq 0x1b3e0 movq %rax, %r13 testq %rax, %rax je 0x84a0c leaq 0x28(%rsp), %rbp movq 0x8(%rbp), %r14 movq %r13, %rdi callq 0x1b3f0 movb $0x1, %r15b movq %rbp, %rdi leaq 0x38(%rsp), %rbp xorl %esi, %esi movq %r14, %rdx leaq 0x28(%rsp), %r14 movq %r13, %rcx movq %rax, %r8 callq 0x1bdd0 leaq 0x7aafa(%rip), %rsi # 0xff50d movq %r12, %rdi callq 0x1b3e0 movq %rax, %r12 testq %rax, %rax je 0x84a4c leaq 0x8(%rsp), %rax movq 0x8(%rax), %r13 movq %r12, %rdi callq 0x1b3f0 movb $0x1, %r15b leaq 0x8(%rsp), %rdi xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x1bdd0 cmpq $0x0, 0x30(%rsp) je 0x84a69 leaq 0x7aabb(%rip), %rsi # 0xff516 leaq 0x28(%rsp), %rdi callq 0x1b220 testl %eax, %eax jne 0x84a9f cmpq $0x0, 0x10(%rsp) je 0x84a82 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1b4c0 jmp 0x84a9f leaq 0x28(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x7aa8b(%rip), %rcx # 0xff51d movl $0x145, %r8d # imm = 0x145 xorl %esi, %esi callq 0x1bdd0 movq %r14, 0x90(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rax), %rdi callq 0x1b7b0 leaq 0x7ab93(%rip), %rcx # 0xff663 leaq 0x7ab90(%rip), %r8 # 0xff667 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x84cd8 movq 0x48(%rsp), %rdi callq 0x1b0b0 leaq 0x7ab75(%rip), %rcx # 0xff671 leaq 0x7ab72(%rip), %r8 # 0xff675 leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x84cd8 movb %r15b, (%rbx) movl $0x80, %edi callq 0x1b8d0 movq %rax, %r15 leaq 0x28(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x86a5e movq %r15, 0x8(%rbx) cmpq $0x0, 0x10(%rsp) je 0x84b70 movl $0x80, %edi callq 0x1b8d0 movq %rax, %r15 leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x86a5e jmp 0x84b7b movq $0x0, 0x10(%rbx) xorl %r15d, %r15d movq %r15, 0x10(%rbx) leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x84b9a movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x84bbb movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x84bd7 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x84bee movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x84c99 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b8f0 jmp 0x84c1d movq %rax, %r14 addq $0x8, %rbx movq (%rbx), %rsi testq %rsi, %rsi je 0x84c31 movq %rbx, %rdi callq 0xc8d4a movq $0x0, (%rbx) jmp 0x84c4f movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b8f0 jmp 0x84c4f movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x84c76 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x84c76 movq %rax, %r14 jmp 0x84cb8 jmp 0x84c99 movq %rax, %r14 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x84c9c movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x84c9c movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x84cb8 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x84ccf movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %r14, %rdi callq 0x1c020 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; __int64 push r14; int push r13; void * push r12; int push rbx; int sub rsp, 0A8h mov r13, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov qword ptr [rsp+0D8h+var_90], rax; int lea rbp, [rsp+0D8h+var_A0] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rsp+0D8h+var_C0] mov [rax-10h], rax mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) cmp qword ptr [r13+8], 0 setnz r15b jnz loc_84A4C mov rdi, r12 xor esi, esi call _llama_model_chat_template mov r13, rax test rax, rax jz short loc_84A0C lea rbp, [rsp+0D8h+var_B0] mov r14, [rbp+8] mov rdi, r13 call _strlen mov r15b, 1 mov rdi, rbp lea rbp, [rsp+0D8h+var_A0] xor esi, esi mov rdx, r14 lea r14, [rsp+0D8h+var_B0] mov rcx, r13 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_84A0C: lea rsi, aToolUse; "tool_use" mov rdi, r12 call _llama_model_chat_template mov r12, rax test rax, rax jz short loc_84A4C lea rax, [rsp+0D8h+var_D0] mov r13, [rax+8] mov rdi, r12 call _strlen mov r15b, 1 lea rdi, [rsp+0D8h+var_D0] xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_84A4C: cmp [rsp+0D8h+var_A8], 0 jz short loc_84A69 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_B0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_84A9F loc_84A69: cmp [rsp+0D8h+var_C8], 0 jz short loc_84A82 lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_84A9F loc_84A82: lea rdi, [rsp+0D8h+var_B0] mov rdx, [rdi+8] lea rcx, aForMessageInMe; "\n {%- for message in me"... mov r8d, 145h xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_84A9F: mov qword ptr [rsp+0D8h+var_48], r14; int lea rax, [rsp+0D8h+var_D0] mov qword ptr [rsp+0D8h+var_40], rax; int lea rax, [rsp+0D8h+var_90] mov qword ptr [rsp+0D8h+var_38], rax; int mov rdi, [rax] call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, qword ptr [rsp+0D8h+var_90] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_88] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_B0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) mov [rbx+8], r15 cmp [rsp+0D8h+var_C8], 0 jz short loc_84B70 mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_D0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) jmp short loc_84B7B loc_84B70: mov qword ptr [rbx+10h], 0 xor r15d, r15d loc_84B7B: mov [rbx+10h], r15 lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_84B9A mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84B9A: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_84BBB mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84BBB: mov rdi, [rsp+0D8h+var_D0]; void * lea rax, [rsp+0D8h+var_C0] cmp rdi, rax jz short loc_84BD7 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84BD7: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbp jz short loc_84BEE mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84BEE: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_84C99 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_84C1D mov r14, rax loc_84C1D: add rbx, 8 mov rsi, [rbx] test rsi, rsi jz short loc_84C31 mov rdi, rbx call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*) loc_84C31: mov qword ptr [rbx], 0 jmp short loc_84C4F mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_84C4F mov r14, rax loc_84C4F: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_84C76 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_84C76 mov r14, rax jmp short loc_84CB8 jmp short loc_84C99 mov r14, rax loc_84C76: lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_84C9C mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_84C9C loc_84C99: mov r14, rax loc_84C9C: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_84CB8 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84CB8: mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_84CCF mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_84CCF: mov rdi, r14 call __Unwind_Resume
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3) { bool v4; // r15 long long v5; // rax long long v6; // r13 long long v7; // r14 long long v8; // rax long long v9; // r12 long long v10; // r13 long long v11; // rax unsigned int v12; // eax unsigned int v13; // eax long long v14; // r15 long long v15; // r15 void *v17; // [rsp+8h] [rbp-D0h] BYREF long long v18; // [rsp+10h] [rbp-C8h] _QWORD v19[2]; // [rsp+18h] [rbp-C0h] BYREF void *v20; // [rsp+28h] [rbp-B0h] BYREF long long v21; // [rsp+30h] [rbp-A8h] _QWORD v22[2]; // [rsp+38h] [rbp-A0h] BYREF int v23[2]; // [rsp+48h] [rbp-90h] BYREF int v24[4]; // [rsp+50h] [rbp-88h] BYREF long long v25; // [rsp+60h] [rbp-78h] BYREF int v26[4]; // [rsp+70h] [rbp-68h] BYREF long long v27; // [rsp+80h] [rbp-58h] BYREF int v28[2]; // [rsp+90h] [rbp-48h] BYREF int v29[2]; // [rsp+98h] [rbp-40h] int v30[2]; // [rsp+A0h] [rbp-38h] *(_QWORD *)v23 = llama_model_get_vocab(a2); v20 = v22; std::string::_M_construct<char *>(&v20, *a3, (long long)&a3[1][(_QWORD)*a3]); v17 = v19; std::string::_M_construct<char *>(&v17, *a3, (long long)&a3[1][(_QWORD)*a3]); v4 = a3[1] != 0LL; if ( !a3[1] ) { v5 = llama_model_chat_template(a2, 0LL); v6 = v5; if ( v5 ) { v7 = v21; v8 = strlen(v5); v4 = 1; std::string::_M_replace(&v20, 0LL, v7, v6, v8); } v9 = llama_model_chat_template(a2, "tool_use"); if ( v9 ) { v10 = v18; v11 = strlen(v9); v4 = 1; std::string::_M_replace(&v17, 0LL, v10, v9, v11); } } if ( !v21 || !(unsigned int)std::string::compare(&v20, "chatml") ) { if ( v18 ) std::string::_M_assign(&v20, &v17); else std::string::_M_replace( &v20, 0LL, v21, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " ", 325LL); } *(_QWORD *)v28 = &v20; *(_QWORD *)v29 = &v17; *(_QWORD *)v30 = v23; v12 = llama_vocab_bos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v26, v28, v12, "BOS", "bos_token"); v13 = llama_vocab_eos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v24, v28, v13, "EOS", "eos_token"); *(_BYTE *)a1 = v4; v14 = operator new(0x80uLL); minja::chat_template::chat_template(v14, &v20, v26, v24); *(_QWORD *)(a1 + 8) = v14; if ( v18 ) { v15 = operator new(0x80uLL); minja::chat_template::chat_template(v15, &v17, v26, v24); } else { *(_QWORD *)(a1 + 16) = 0LL; v15 = 0LL; } *(_QWORD *)(a1 + 16) = v15; if ( *(long long **)v24 != &v25 ) operator delete(*(void **)v24, v25 + 1); if ( *(long long **)v26 != &v27 ) operator delete(*(void **)v26, v27 + 1); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0011c220 MOV qword ptr [RSP + 0x48],RAX LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x0012d612 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LAB_001849b0: LEA RDI,[RSP + 0x8] CALL 0x0012d612 CMP qword ptr [R13 + 0x8],0x0 SETNZ R15B JNZ 0x00184a4c LAB_001849c9: MOV RDI,R12 XOR ESI,ESI CALL 0x0011b3e0 MOV R13,RAX TEST RAX,RAX JZ 0x00184a0c LEA RBP,[RSP + 0x28] MOV R14,qword ptr [RBP + 0x8] MOV RDI,R13 CALL 0x0011b3f0 MOV R15B,0x1 MOV RDI,RBP LEA RBP,[RSP + 0x38] XOR ESI,ESI MOV RDX,R14 LEA R14,[RSP + 0x28] MOV RCX,R13 MOV R8,RAX CALL 0x0011bdd0 LAB_00184a0c: LEA RSI,[0x1ff50d] MOV RDI,R12 CALL 0x0011b3e0 MOV R12,RAX TEST RAX,RAX JZ 0x00184a4c LEA RAX,[RSP + 0x8] MOV R13,qword ptr [RAX + 0x8] MOV RDI,R12 CALL 0x0011b3f0 MOV R15B,0x1 LEA RDI,[RSP + 0x8] XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x0011bdd0 LAB_00184a4c: CMP qword ptr [RSP + 0x30],0x0 JZ 0x00184a69 LEA RSI,[0x1ff516] LEA RDI,[RSP + 0x28] CALL 0x0011b220 TEST EAX,EAX JNZ 0x00184a9f LAB_00184a69: CMP qword ptr [RSP + 0x10],0x0 JZ 0x00184a82 LAB_00184a71: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x0011b4c0 JMP 0x00184a9f LAB_00184a82: LEA RDI,[RSP + 0x28] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1ff51d] MOV R8D,0x145 XOR ESI,ESI CALL 0x0011bdd0 LAB_00184a9f: MOV qword ptr [RSP + 0x90],R14 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RAX] LAB_00184ac4: CALL 0x0011b7b0 LEA RCX,[0x1ff663] LEA R8,[0x1ff667] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00184cd8 MOV RDI,qword ptr [RSP + 0x48] LAB_00184af0: CALL 0x0011b0b0 LEA RCX,[0x1ff671] LEA R8,[0x1ff675] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00184cd8 MOV byte ptr [RBX],R15B LAB_00184b1a: MOV EDI,0x80 CALL 0x0011b8d0 LAB_00184b24: MOV R15,RAX LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00186a5e MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RSP + 0x10],0x0 JZ 0x00184b70 LAB_00184b4a: MOV EDI,0x80 CALL 0x0011b8d0 LAB_00184b54: MOV R15,RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00186a5e LAB_00184b6e: JMP 0x00184b7b LAB_00184b70: MOV qword ptr [RBX + 0x10],0x0 XOR R15D,R15D LAB_00184b7b: MOV qword ptr [RBX + 0x10],R15 LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00184b9a MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0011b8f0 LAB_00184b9a: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00184bbb MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x0011b8f0 LAB_00184bbb: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00184bd7 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_00184bd7: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x00184bee MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8f0 LAB_00184bee: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { char *pcVar1; int iVar2; uint uVar3; char *pcVar4; chat_template *pcVar5; long *in_RDX; llama_model lVar6; long *local_d0; char *local_c8; long local_c0 [2]; long *local_b0; char *local_a8; long local_a0 [2]; int8 local_90; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; int8 **local_48; int8 **local_40; int8 *local_38; local_90 = llama_model_get_vocab(param_2); local_b0 = local_a0; std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX); local_d0 = local_c0; /* try { // try from 001849b0 to 001849b9 has its CatchHandler @ 00184c6c */ std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX); lVar6 = (llama_model)(in_RDX[1] != 0); if (!(bool)lVar6) { /* try { // try from 001849c9 to 00184a4b has its CatchHandler @ 00184c71 */ pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_a8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4); } lVar6 = (llama_model)(pcVar4 != (char *)0x0 || (bool)lVar6); pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_c8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); lVar6 = (llama_model)0x1; std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4); } } if (local_a8 != (char *)0x0) { iVar2 = std::__cxx11::string::compare((char *)&local_b0); if (iVar2 != 0) goto LAB_00184a9f; } if (local_c8 == (char *)0x0) { std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1ff51d); } else { /* try { // try from 00184a71 to 00184a9e has its CatchHandler @ 00184c03 */ std::__cxx11::string::_M_assign((string *)&local_b0); } LAB_00184a9f: local_40 = &local_d0; local_38 = &local_90; local_48 = &local_b0; /* try { // try from 00184ac4 to 00184aea has its CatchHandler @ 00184c99 */ uVar3 = llama_vocab_bos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3); /* try { // try from 00184af0 to 00184b16 has its CatchHandler @ 00184c73 */ uVar3 = llama_vocab_eos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3); *param_1 = lVar6; /* try { // try from 00184b1a to 00184b23 has its CatchHandler @ 00184c4c */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00184b24 to 00184b3d has its CatchHandler @ 00184c3a */ minja::chat_template::chat_template (pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88); *(chat_template **)(param_1 + 8) = pcVar5; if (local_c8 == (char *)0x0) { *(int8 *)(param_1 + 0x10) = 0; pcVar5 = (chat_template *)0x0; } else { /* try { // try from 00184b4a to 00184b53 has its CatchHandler @ 00184c1a */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00184b54 to 00184b6d has its CatchHandler @ 00184c08 */ minja::chat_template::chat_template (pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88); } *(chat_template **)(param_1 + 0x10) = pcVar5; if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } return param_1; }
55,374
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O2
cpp
common_chat_templates_from_model(llama_model 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 $0xa8, %rsp movq %rdx, %rbp movq %rsi, %r13 movq %rdi, %rbx movq %rsi, %rdi callq 0x25260 movq %rax, %r14 movq %rax, 0x8(%rsp) leaq 0x10(%rsp), %rdi movq %rbp, %rsi callq 0x24c50 leaq 0x30(%rsp), %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x24c50 movb $0x1, %r15b cmpq $0x0, 0x8(%rbp) jne 0x6322a movq %r13, %rdi xorl %esi, %esi callq 0x243e0 testq %rax, %rax setne %r15b je 0x63206 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x251c0 leaq 0x5c2a0(%rip), %rsi # 0xbf4ad movq %r13, %rdi callq 0x243e0 testq %rax, %rax je 0x6322a leaq 0x30(%rsp), %rdi movq %rax, %rsi callq 0x251c0 movb $0x1, %r15b cmpq $0x0, 0x18(%rsp) je 0x63247 leaq 0x5c27d(%rip), %rsi # 0xbf4b6 leaq 0x10(%rsp), %rdi callq 0x4550a testb %al, %al je 0x63271 cmpq $0x0, 0x38(%rsp) je 0x63260 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x244e0 jmp 0x63271 leaq 0x5c256(%rip), %rsi # 0xbf4bd leaq 0x10(%rsp), %rdi callq 0x251c0 leaq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq %r12, 0x58(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x60(%rsp) movq %r14, %rdi callq 0x247c0 leaq 0x5c36a(%rip), %rcx # 0xbf603 leaq 0x5c367(%rip), %r8 # 0xbf607 leaq 0x88(%rsp), %rdi leaq 0x50(%rsp), %rsi movl %eax, %edx callq 0x633be movq 0x8(%rsp), %rdi callq 0x240a0 leaq 0x5c34c(%rip), %rcx # 0xbf611 leaq 0x5c349(%rip), %r8 # 0xbf615 leaq 0x68(%rsp), %rdi leaq 0x50(%rsp), %rsi movl %eax, %edx callq 0x633be movb %r15b, (%rbx) leaq 0x8(%rbx), %r14 leaq 0x10(%rsp), %rsi leaq 0x88(%rsp), %rdx leaq 0x68(%rsp), %rcx movq %r14, %rdi callq 0x68204 leaq 0x10(%rbx), %rdi cmpq $0x0, 0x38(%rsp) je 0x63323 leaq 0x30(%rsp), %rsi leaq 0x88(%rsp), %rdx leaq 0x68(%rsp), %rcx callq 0x68204 jmp 0x63327 andq $0x0, (%rdi) leaq 0x68(%rsp), %rdi callq 0x25298 leaq 0x88(%rsp), %rdi callq 0x25298 leaq 0x30(%rsp), %rdi callq 0x25298 leaq 0x10(%rsp), %rdi callq 0x25298 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %r14, %rdi callq 0x68260 jmp 0x63379 jmp 0x6339e movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x25298 jmp 0x6338f movq %rax, %rbx jmp 0x633ab jmp 0x6339e movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x25298 jmp 0x633a1 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25298 leaq 0x10(%rsp), %rdi callq 0x25298 movq %rbx, %rdi callq 0x25010 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbp, rdx mov r13, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov r14, rax mov [rsp+0D8h+var_D0], rax lea rdi, [rsp+0D8h+var_C8] mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r12, [rsp+0D8h+var_A8] mov rdi, r12 mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov r15b, 1 cmp qword ptr [rbp+8], 0 jnz short loc_6322A mov rdi, r13 xor esi, esi call _llama_model_chat_template test rax, rax setnz r15b jz short loc_63206 lea rdi, [rsp+0D8h+var_C8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) loc_63206: lea rsi, aToolUse; "tool_use" mov rdi, r13 call _llama_model_chat_template test rax, rax jz short loc_6322A lea rdi, [rsp+0D8h+var_A8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov r15b, 1 loc_6322A: cmp [rsp+0D8h+var_C0], 0 jz short loc_63247 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_C8] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_63271 loc_63247: cmp [rsp+0D8h+var_A0], 0 jz short loc_63260 lea rdi, [rsp+0D8h+var_C8] lea rsi, [rsp+0D8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_63271 loc_63260: lea rsi, aForMessageInMe; "\n {%- for message in me"... lea rdi, [rsp+0D8h+var_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) loc_63271: lea rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_88], rax mov [rsp+0D8h+var_80], r12 lea rax, [rsp+0D8h+var_D0] mov [rsp+0D8h+var_78], rax mov rdi, r14 call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_50]; void * lea rsi, [rsp+0D8h+var_88] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, [rsp+0D8h+var_D0] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_70]; void * lea rsi, [rsp+0D8h+var_88] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b lea r14, [rbx+8] lea rsi, [rsp+0D8h+var_C8] lea rdx, [rsp+0D8h+var_50] lea rcx, [rsp+0D8h+var_70] mov rdi, r14 call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) lea rdi, [rbx+10h] cmp [rsp+0D8h+var_A0], 0 jz short loc_63323 lea rsi, [rsp+0D8h+var_A8] lea rdx, [rsp+0D8h+var_50] lea rcx, [rsp+0D8h+var_70] call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short loc_63327 loc_63323: and qword ptr [rdi], 0 loc_63327: lea rdi, [rsp+0D8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, r14 call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr() jmp short loc_63379 jmp short loc_6339E mov rbx, rax loc_63379: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6338F mov rbx, rax jmp short loc_633AB jmp short loc_6339E mov rbx, rax loc_6338F: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_633A1 loc_6339E: mov rbx, rax loc_633A1: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_633AB: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3) { long long vocab; // r14 bool v6; // r15 const char *v7; // rax const char *v8; // rax _QWORD *v9; // rdi long long v11; // [rsp+8h] [rbp-D0h] BYREF char v12[8]; // [rsp+10h] [rbp-C8h] BYREF long long v13; // [rsp+18h] [rbp-C0h] char v14[8]; // [rsp+30h] [rbp-A8h] BYREF long long v15; // [rsp+38h] [rbp-A0h] char *v16; // [rsp+50h] [rbp-88h] char *v17; // [rsp+58h] [rbp-80h] long long *v18; // [rsp+60h] [rbp-78h] _BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF _BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF vocab = llama_model_get_vocab(a2); v11 = vocab; std::string::basic_string(v12, a3); std::string::basic_string(v14, a3); v6 = 1; if ( !*(_QWORD *)(a3 + 8) ) { v7 = (const char *)llama_model_chat_template(a2, 0LL); v6 = v7 != 0LL; if ( v7 ) std::string::assign(v12, v7); v8 = (const char *)llama_model_chat_template(a2, "tool_use"); if ( v8 ) { std::string::assign(v14, v8); v6 = 1; } } if ( !v13 || std::operator==<char>((long long)v12) ) { if ( v15 ) std::string::_M_assign(v12, v14); else std::string::assign( v12, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " "); } v16 = v12; v17 = v14; v18 = &v11; llama_vocab_bos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20); llama_vocab_eos(v11); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19); *a1 = v6; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19); v9 = a1 + 16; if ( v15 ) std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19); else *v9 = 0LL; std::string::~string(v19); std::string::~string(v20); std::string::~string(v14); std::string::~string(v12); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBP,RDX MOV R13,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00125260 MOV R14,RAX MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x10] MOV RSI,RBP CALL 0x00124c50 LAB_001631cc: LEA R12,[RSP + 0x30] MOV RDI,R12 MOV RSI,RBP CALL 0x00124c50 MOV R15B,0x1 CMP qword ptr [RBP + 0x8],0x0 JNZ 0x0016322a LAB_001631e6: MOV RDI,R13 XOR ESI,ESI CALL 0x001243e0 TEST RAX,RAX SETNZ R15B JZ 0x00163206 LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x001251c0 LAB_00163206: LEA RSI,[0x1bf4ad] MOV RDI,R13 CALL 0x001243e0 TEST RAX,RAX JZ 0x0016322a LEA RDI,[RSP + 0x30] MOV RSI,RAX CALL 0x001251c0 MOV R15B,0x1 LAB_0016322a: CMP qword ptr [RSP + 0x18],0x0 JZ 0x00163247 LEA RSI,[0x1bf4b6] LEA RDI,[RSP + 0x10] CALL 0x0014550a TEST AL,AL JZ 0x00163271 LAB_00163247: CMP qword ptr [RSP + 0x38],0x0 JZ 0x00163260 LAB_0016324f: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x30] CALL 0x001244e0 JMP 0x00163271 LAB_00163260: LEA RSI,[0x1bf4bd] LEA RDI,[RSP + 0x10] CALL 0x001251c0 LAB_00163271: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],R12 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x60],RAX LAB_0016328a: MOV RDI,R14 CALL 0x001247c0 LEA RCX,[0x1bf603] LEA R8,[0x1bf607] LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x50] MOV EDX,EAX CALL 0x001633be MOV RDI,qword ptr [RSP + 0x8] LAB_001632b9: CALL 0x001240a0 LEA RCX,[0x1bf611] LEA R8,[0x1bf615] LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x50] MOV EDX,EAX CALL 0x001633be MOV byte ptr [RBX],R15B LEA R14,[RBX + 0x8] LAB_001632e4: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x88] LEA RCX,[RSP + 0x68] MOV RDI,R14 CALL 0x00168204 LEA RDI,[RBX + 0x10] CMP qword ptr [RSP + 0x38],0x0 JZ 0x00163323 LAB_0016330a: LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x88] LEA RCX,[RSP + 0x68] CALL 0x00168204 LAB_00163321: JMP 0x00163327 LAB_00163323: AND qword ptr [RDI],0x0 LAB_00163327: LEA RDI,[RSP + 0x68] CALL 0x00125298 LEA RDI,[RSP + 0x88] CALL 0x00125298 LEA RDI,[RSP + 0x30] CALL 0x00125298 LEA RDI,[RSP + 0x10] CALL 0x00125298 MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { bool bVar1; uint uVar2; int8 uVar3; long lVar4; string *in_RDX; llama_model lVar5; int8 local_d0; string local_c8 [8]; long local_c0; string local_a8 [8]; long local_a0; string *local_88; string *local_80; int8 *local_78; string local_70 [32]; string local_50 [32]; uVar3 = llama_model_get_vocab(param_2); local_d0 = uVar3; std::__cxx11::string::string(local_c8,in_RDX); /* try { // try from 001631cc to 001631db has its CatchHandler @ 00163385 */ std::__cxx11::string::string(local_a8,in_RDX); lVar5 = (llama_model)0x1; if (*(long *)(in_RDX + 8) == 0) { /* try { // try from 001631e6 to 00163226 has its CatchHandler @ 0016338a */ lVar4 = llama_model_chat_template(param_2,0); lVar5 = (llama_model)(lVar4 != 0); if ((bool)lVar5) { std::__cxx11::string::assign((char *)local_c8); } lVar4 = llama_model_chat_template(param_2,"tool_use"); if (lVar4 != 0) { std::__cxx11::string::assign((char *)local_a8); lVar5 = (llama_model)0x1; } } if (local_c0 != 0) { bVar1 = std::operator==(local_c8,"chatml"); if (!bVar1) goto LAB_00163271; } if (local_a0 == 0) { std::__cxx11::string::assign((char *)local_c8); } else { /* try { // try from 0016324f to 00163270 has its CatchHandler @ 00163374 */ std::__cxx11::string::_M_assign(local_c8); } LAB_00163271: local_88 = local_c8; local_78 = &local_d0; local_80 = local_a8; /* try { // try from 0016328a to 001632b3 has its CatchHandler @ 0016339e */ uVar2 = llama_vocab_bos(uVar3); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2); /* try { // try from 001632b9 to 001632dc has its CatchHandler @ 0016338c */ uVar2 = llama_vocab_eos(local_d0); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2); *param_1 = lVar5; /* try { // try from 001632e4 to 001632fd has its CatchHandler @ 00163376 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 8),local_c8,local_50); if (local_a0 == 0) { *(int8 *)(param_1 + 0x10) = 0; } else { /* try { // try from 0016330a to 00163320 has its CatchHandler @ 00163367 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 0x10),local_a8,local_50); } std::__cxx11::string::~string(local_70); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string(local_c8); return param_1; }
55,375
LefDefParser::defiPropType::propType(char*) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPropType.cpp
const char defiPropType::propType(char* name) const { int i; // Name is NULL, error if (!name) return('N'); for (i = 0; i < numProperties_; i++) { if (strcmp(name, propNames_[i]) == 0) return(propTypes_[i]); // found the prop name } return('N'); // Can't found the name }
O3
cpp
LefDefParser::defiPropType::propType(char*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movb $0x4e, %bl testq %rsi, %rsi je 0x2f6ac movq %rdi, %r14 movslq (%rdi), %r12 testq %r12, %r12 jle 0x2f6ac movq %rsi, %r15 movq 0x8(%r14), %rbp xorl %r13d, %r13d movq (%rbp,%r13,8), %rsi movq %r15, %rdi callq 0x7280 testl %eax, %eax je 0x2f6a4 incq %r13 cmpq %r13, %r12 jne 0x2f689 jmp 0x2f6ac movq 0x10(%r14), %rax movb (%rax,%r13), %bl movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
_ZNK12LefDefParser12defiPropType8propTypeEPc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov bl, 4Eh ; 'N' test rsi, rsi jz short loc_2F6AC mov r14, rdi movsxd r12, dword ptr [rdi] test r12, r12 jle short loc_2F6AC mov r15, rsi mov rbp, [r14+8] xor r13d, r13d loc_2F689: mov rsi, [rbp+r13*8+0] mov rdi, r15 call _strcmp test eax, eax jz short loc_2F6A4 inc r13 cmp r12, r13 jnz short loc_2F689 jmp short loc_2F6AC loc_2F6A4: mov rax, [r14+10h] mov bl, [rax+r13] loc_2F6AC: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiPropType::propType(LefDefParser::defiPropType *this, char *a2) { unsigned int v2; // ebx long long v3; // r12 long long v4; // rbp long long v5; // r13 LOBYTE(v2) = 78; if ( a2 ) { v3 = *(int *)this; if ( v3 > 0 ) { v4 = *((_QWORD *)this + 1); v5 = 0LL; while ( (unsigned int)strcmp(a2, *(_QWORD *)(v4 + 8 * v5)) ) { if ( v3 == ++v5 ) return v2; } LOBYTE(v2) = *(_BYTE *)(*((_QWORD *)this + 2) + v5); } } return v2; }
propType: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV BL,0x4e TEST RSI,RSI JZ 0x0012f6ac MOV R14,RDI MOVSXD R12,dword ptr [RDI] TEST R12,R12 JLE 0x0012f6ac MOV R15,RSI MOV RBP,qword ptr [R14 + 0x8] XOR R13D,R13D LAB_0012f689: MOV RSI,qword ptr [RBP + R13*0x8] MOV RDI,R15 CALL 0x00107280 TEST EAX,EAX JZ 0x0012f6a4 INC R13 CMP R12,R13 JNZ 0x0012f689 JMP 0x0012f6ac LAB_0012f6a4: MOV RAX,qword ptr [R14 + 0x10] MOV BL,byte ptr [RAX + R13*0x1] LAB_0012f6ac: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiPropType::propType(char*) const */ ulong __thiscall LefDefParser::defiPropType::propType(defiPropType *this,char *param_1) { int iVar1; long lVar2; int iVar3; int8 unaff_RBX; ulong uVar4; long lVar6; int7 uVar5; uVar5 = (int7)((ulong)unaff_RBX >> 8); uVar4 = CONCAT71(uVar5,0x4e); if ((param_1 != (char *)0x0) && (iVar1 = *(int *)this, 0 < (long)iVar1)) { lVar2 = *(long *)(this + 8); lVar6 = 0; do { iVar3 = strcmp(param_1,*(char **)(lVar2 + lVar6 * 8)); if (iVar3 == 0) { uVar4 = CONCAT71(uVar5,*(int1 *)(*(long *)(this + 0x10) + lVar6)); break; } lVar6 = lVar6 + 1; } while (iVar1 != lVar6); } return uVar4 & 0xffffffff; }
55,376
match_pins
eloqsql/mysys/lf_alloc-pin.c
static int match_pins(LF_PINS *el, void *addr) { int i; LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH; for (; el < el_end; el++) for (i= 0; i < LF_PINBOX_PINS; i++) if (el->pin[i] == addr) return 1; return 0; }
O3
c
match_pins: pushq %rbp movq %rsp, %rbp xorl %eax, %eax xorl %ecx, %ecx movq (%rdi,%rcx,8), %rdx cmpq %rsi, %rdx je 0xa5a0a incq %rcx cmpq $0x4, %rcx jne 0xa59e1 leaq 0x78(%rax), %rcx addq $0x78, %rdi cmpq $0x7788, %rax # imm = 0x7788 movq %rcx, %rax jb 0xa59df xorl %eax, %eax jmp 0xa5a0f movl $0x1, %eax popq %rbp retq nopl (%rax)
match_pins: push rbp mov rbp, rsp xor eax, eax loc_A59DF: xor ecx, ecx loc_A59E1: mov rdx, [rdi+rcx*8] cmp rdx, rsi jz short loc_A5A0A inc rcx cmp rcx, 4 jnz short loc_A59E1 lea rcx, [rax+78h] add rdi, 78h ; 'x' cmp rax, 7788h mov rax, rcx jb short loc_A59DF xor eax, eax jmp short loc_A5A0F loc_A5A0A: mov eax, 1 loc_A5A0F: pop rbp retn
long long match_pins(long long a1, long long a2) { unsigned long long v2; // rax long long i; // rcx bool v4; // cf v2 = 0LL; while ( 2 ) { for ( i = 0LL; i != 4; ++i ) { if ( *(_QWORD *)(a1 + 8 * i) == a2 ) return 1LL; } a1 += 120LL; v4 = v2 < 0x7788; v2 += 120LL; if ( v4 ) continue; break; } return 0LL; }
match_pins: PUSH RBP MOV RBP,RSP XOR EAX,EAX LAB_001a59df: XOR ECX,ECX LAB_001a59e1: MOV RDX,qword ptr [RDI + RCX*0x8] CMP RDX,RSI JZ 0x001a5a0a INC RCX CMP RCX,0x4 JNZ 0x001a59e1 LEA RCX,[RAX + 0x78] ADD RDI,0x78 CMP RAX,0x7788 MOV RAX,RCX JC 0x001a59df XOR EAX,EAX JMP 0x001a5a0f LAB_001a5a0a: MOV EAX,0x1 LAB_001a5a0f: POP RBP RET
int8 match_pins(long param_1,long param_2) { ulong uVar1; long lVar2; bool bVar3; uVar1 = 0; do { lVar2 = 0; do { if (*(long *)(param_1 + lVar2 * 8) == param_2) { return 1; } lVar2 = lVar2 + 1; } while (lVar2 != 4); param_1 = param_1 + 0x78; bVar3 = uVar1 < 0x7788; uVar1 = uVar1 + 0x78; } while (bVar3); return 0; }
55,377
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0x80ad8 cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0x5fa9f cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x5fb4a andb %al, %cl testb %cl, %cl je 0x5fb14 movb $0x1, (%rbx) movl $0x20, %edi callq 0x196c0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0x5fb2e shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x80a32 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x38474 movq %r15, %rdi xorl %esi, %esi callq 0x3175a movq %r15, %rdi callq 0x36dc4 addq $0x18, %r14 addq $-0x18, %r12 jne 0x5fad2 jmp 0x5fb2e movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0x80a84 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x3175a addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x19370 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x5ea5c(%rip), %rsi # 0xbe5c4 leaq 0x5ea7f(%rip), %rdx # 0xbe5ee movq %rsp, %rdi callq 0x22f42 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x4f726 xorl %ebp, %ebp leaq 0x8c5eb(%rip), %rsi # 0xec180 leaq -0x2bbfe(%rip), %rdx # 0x33f9e movq %r14, %rdi callq 0x19ba0 jmp 0x5fbaa jmp 0x5fbaa jmp 0x5fbaa movq %rax, %r15 jmp 0x5fbf7 movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3175a movq %r14, %rdi callq 0x36dc4 jmp 0x5fbf7 movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x5fbea movq 0x10(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0x5fbea movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x5fbf7 movq %r14, %rdi callq 0x19510 movq %rbx, %rdi callq 0x36dc4 movq %r15, %rdi callq 0x19c00 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; int push r14; char push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_5FA9F cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_5FB4A and cl, al loc_5FA9F: test cl, cl jz short loc_5FB14 mov byte ptr [rbx], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [rbx+8], rax test r15, r15 jz short loc_5FB2E shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_5FAD2: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_5FAD2 jmp short loc_5FB2E loc_5FB14: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_5FB2E: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5FB4A: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_5FBAA jmp short loc_5FBAA jmp short $+2 loc_5FBAA: mov r15, rax jmp short loc_5FBF7 mov r15, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_5FBF7 mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_5FBEA mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5FBEA mov r15, rax mov bpl, 1 loc_5FBEA: test bpl, bpl jz short loc_5FBF7 mov rdi, r14; void * call ___cxa_free_exception loc_5FBF7: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
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>::basic_json( long long a1, char *a2, long long a3, char a4, char a5) { char *v8; // r14 char *v9; // r12 long long v10; // rax bool v11; // cl bool v12; // al long long result; // rax long long v14; // r12 nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14 void *v16; // [rsp+0h] [rbp-58h] BYREF long long v17; // [rsp+8h] [rbp-50h] _QWORD v18[9]; // [rsp+10h] [rbp-48h] BYREF v8 = a2; v9 = &a2[24 * a3]; *(_OWORD *)a1 = 0LL; v10 = std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>>( a2, v9); v11 = v10 == (_QWORD)v9; if ( !a4 ) { v12 = v10 == (_QWORD)v9; if ( !v12 && a5 == 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v16 = v18; std::string::_M_construct<char const*>(&v16, "cannot create object from initializer list", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( exception, 301, &v16); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v11 = v12 && a5 != 2; } if ( v11 ) { *(_BYTE *)a1 = 1; result = operator new(0x20uLL); *(_OWORD *)result = 0LL; *(_QWORD *)(result + 16) = 0LL; *(_QWORD *)(a1 + 8) = result; if ( a3 ) { v14 = 24 * a3; do { nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( &v16, v8); nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( *(_QWORD **)(a1 + 8), *(long long **)(*(_QWORD *)v17 + 8LL), *(_QWORD *)v17 + 16LL); 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 *)&v16); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v16); v8 += 24; v14 -= 24LL; } while ( v14 ); } } else { *(_BYTE *)a1 = 2; v16 = a2; v18[2] = v9; result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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::json_ref<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*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>(&v16); *(_QWORD *)(a1 + 8) = result; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_0015fa6b: MOV RDI,RSI MOV RSI,R12 CALL 0x00180ad8 CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x0015fa9f CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x0015fb4a AND CL,AL LAB_0015fa9f: TEST CL,CL JZ 0x0015fb14 MOV byte ptr [RBX],0x1 LAB_0015faa6: MOV EDI,0x20 CALL 0x001196c0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x0015fb2e SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_0015fad2: MOV RDI,R15 MOV RSI,R14 CALL 0x00180a32 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_0015faf1: CALL 0x00138474 MOV RDI,R15 XOR ESI,ESI CALL 0x0013175a MOV RDI,R15 CALL 0x00136dc4 ADD R14,0x18 ADD R12,-0x18 JNZ 0x0015fad2 JMP 0x0015fb2e LAB_0015fb14: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_0015fb25: CALL 0x00180a84 LAB_0015fb2a: MOV qword ptr [RBX + 0x8],RAX LAB_0015fb2e: MOV RDI,RBX MOV ESI,0x1 CALL 0x0013175a ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015fb4a: MOV EDI,0x20 CALL 0x00119370 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_0015fb61: LEA RSI,[0x1be5c4] LEA RDX,[0x1be5ee] MOV RDI,RSP CALL 0x00122f42 MOV BPL,0x1 LAB_0015fb7a: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x0014f726 XOR EBP,EBP LEA RSI,[0x1ec180] LEA RDX,[0x133f9e] MOV RDI,R14 CALL 0x00119ba0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 0015fa6b to 0015fa75 has its CatchHandler @ 0015fba8 */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 0015fb61 to 0015fb76 has its CatchHandler @ 0015fbe4 */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 0015fb7a to 0015fba3 has its CatchHandler @ 0015fbc9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 0015faa6 to 0015faaf has its CatchHandler @ 0015fba6 */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 0015fad2 to 0015fadc has its CatchHandler @ 0015fbaa */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 0015faf1 to 0015faf5 has its CatchHandler @ 0015fbaf */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 0015fb25 to 0015fb29 has its CatchHandler @ 0015fba4 */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
55,378
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>::emplace_back<float const&>(float const&)
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<float const&>(float const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax je 0x2b7be cmpl $0x2, %eax je 0x2b7e0 movl $0x20, %edi callq 0xf4f0 movq %rax, %rbx movq %r14, %rdi callq 0x2ba90 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x264baf(%rip), %rsi # 0x290333 leaq 0x10(%rsp), %rdi callq 0x2ba07 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x2b83c xorl %ebp, %ebp leaq 0x307bd1(%rip), %rsi # 0x333380 leaq 0x7cbc(%rip), %rdx # 0x33472 movq %rbx, %rdi callq 0x10170 movb $0x2, (%r14) movl $0x18, %edi callq 0xfa40 vxorps %xmm0, %xmm0, %xmm0 vmovups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0x2bab0 movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2b827 movq 0x20(%rsp), %rsi incq %rsi callq 0xfa70 jmp 0x2b827 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x2b834 movq %rbx, %rdi callq 0xf6f0 movq %r14, %rdi callq 0x101c0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRKfEEERSD_DpOT_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jz short loc_2B7BE cmp eax, 2 jz loc_2B7E0 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+48h+var_40] mov [rdx], rax lea rsi, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_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_2B7BE: mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) vxorps xmm0, xmm0, xmm0 vmovups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax loc_2B7E0: mov rdi, [r14+8] mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRKfEEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<float const&>(float const&) mov rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn mov r14, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2B827 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2B827 mov r14, rax mov bpl, 1 loc_2B827: test bpl, bpl jz short loc_2B834 mov rdi, rbx; void * call ___cxa_free_exception loc_2B834: mov rdi, r14 call __Unwind_Resume
emplace_back<float_const&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x0012b7be CMP EAX,0x2 JZ 0x0012b7e0 MOV EDI,0x20 CALL 0x0010f4f0 MOV RBX,RAX MOV RDI,R14 CALL 0x0012ba90 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0012b77d: LEA RSI,[0x390333] LEA RDI,[RSP + 0x10] CALL 0x0012ba07 MOV BPL,0x1 LAB_0012b791: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0012b83c XOR EBP,EBP LEA RSI,[0x433380] LEA RDX,[0x133472] MOV RDI,RBX CALL 0x00110170 LAB_0012b7be: MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x0010fa40 VXORPS XMM0,XMM0,XMM0 VMOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX LAB_0012b7e0: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX CALL 0x0012bab0 MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::emplace_back<float const&>(float const&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::emplace_back<float_const&> (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,float *param_1) { int8 uVar1; int8 *puVar2; char *local_40; detail local_38 [32]; if (*this == (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) { *this = (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; puVar2 = (int8 *)operator_new(0x18); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; } else if (*this != (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) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0012b77d to 0012b78d has its CatchHandler @ 0012b821 */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 0012b791 to 0012b7bd has its CatchHandler @ 0012b801 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::emplace_back<float_const&> (*(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>>> **)(this + 8),param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
55,379
Binary_string::free()
eloqsql/sql/sql_string.h
inline void free() { free_buffer(); /* We have to clear the values as some Strings, like in Field, are reused after free(). Because of this we cannot use MEM_UNDEFINED() here. */ Ptr= 0; str_length= 0; Alloced_length= extra_alloc= 0; }
O0
c
Binary_string::free(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xe670 movq -0x10(%rbp), %rax movq $0x0, (%rax) movl $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) movl $0x0, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nop
_ZN13Binary_string4freeEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call __ZN13Binary_string11free_bufferEv; Binary_string::free_buffer(void) mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov dword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 mov dword ptr [rax+0Ch], 0 add rsp, 10h pop rbp retn
Binary_string * Binary_string::free(Binary_string *this) { Binary_string *result; // rax Binary_string::free_buffer(this); result = this; *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 3) = 0; return result; }
free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x0010e670 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV dword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 MOV dword ptr [RAX + 0xc],0x0 ADD RSP,0x10 POP RBP RET
/* Binary_string::free() */ void __thiscall Binary_string::free(Binary_string *this) { free_buffer(this); *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0xc) = 0; return; }
55,380
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::object(); for (const auto& [key, value] : elements) { if (!key) throw std::runtime_error("Dict key is null"); if (!value) throw std::runtime_error("Dict value is null"); result.set(key->evaluate(context), value->evaluate(context)); } return result; }
O3
cpp
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rsp), %r12 movl $0x30, %edi callq 0x1c160 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x621be(%rip), %rcx # 0xfe470 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, (%r12) movq %rcx, -0x8(%r12) leaq 0x8(%rsp), %rsi movq %rbx, (%rsp) movq %rbx, %rdi callq 0x781b6 movq %r12, %rdi callq 0x34564 movq 0x20(%r15), %rbx movq 0x28(%r15), %r15 cmpq %r15, %rbx je 0x9c438 leaq 0x68(%rsp), %rbp leaq 0x18(%rsp), %r13 movq (%rbx), %rsi testq %rsi, %rsi je 0x9c44e cmpq $0x0, 0x10(%rbx) je 0x9c46c movq %rbp, %rdi movq %r14, %rdx callq 0x96f0a movq 0x10(%rbx), %rsi movq %r13, %rdi movq %r14, %rdx callq 0x96f0a movq (%rsp), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x77bc4 leaq 0x58(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x732fc movq %r12, %rdi callq 0x300e0 leaq 0x50(%rsp), %rdi callq 0x34564 leaq 0x40(%rsp), %rdi callq 0x34564 leaq 0x30(%rsp), %rdi callq 0x34564 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9c3b4 movq 0x63c01(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0x9c39f movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9c3a9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9c3b4 movq (%rdi), %rax callq *0x18(%rax) leaq 0xa8(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x732fc movq %r12, %rdi callq 0x300e0 leaq 0xa0(%rsp), %rdi callq 0x34564 leaq 0x90(%rsp), %rdi callq 0x34564 leaq 0x80(%rsp), %rdi callq 0x34564 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x9c42b movq 0x63b8a(%rip), %rax # 0xfff90 cmpb $0x0, (%rax) je 0x9c416 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9c420 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9c42b movq (%rdi), %rax callq *0x18(%rax) addq $0x20, %rbx cmpq %r15, %rbx jne 0x9c309 movq (%rsp), %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1c460 movq %rax, %r15 leaq 0x31eef(%rip), %rsi # 0xce351 movq %rax, %rdi callq 0x1c280 jmp 0x9c488 movl $0x10, %edi callq 0x1c460 movq %rax, %r15 leaq 0x31ee2(%rip), %rsi # 0xce362 movq %rax, %rdi callq 0x1c280 movq 0x63b29(%rip), %rsi # 0xfffb8 movq 0x63ae2(%rip), %rdx # 0xfff78 movq %r15, %rdi callq 0x1c7b0 jmp 0x9c4a0 movq %rax, %r14 movq %r15, %rdi callq 0x1caa0 jmp 0x9c4d0 jmp 0x9c4cd movq %rax, %r14 jmp 0x9c4c1 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x6cc36 leaq 0x68(%rsp), %rdi callq 0x6cc36 jmp 0x9c4d0 movq %rax, %r14 movq (%rsp), %rdi callq 0x6cc36 movq %r14, %rdi callq 0x1c7d0 nop
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsp+0E8h+var_D8] mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [r12], rax mov [r12-8], rcx lea rsi, [rsp+0E8h+var_E0] mov [rsp+0E8h+var_E8], rbx mov rdi, rbx call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rbx, [r15+20h] mov r15, [r15+28h] cmp rbx, r15 jz loc_9C438 lea rbp, [rsp+0E8h+var_80] lea r13, [rsp+0E8h+var_D0] loc_9C309: mov rsi, [rbx] test rsi, rsi jz loc_9C44E cmp qword ptr [rbx+10h], 0 jz loc_9C46C mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rsi, [rbx+10h] mov rdi, r13 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+0E8h+var_E8]; this mov rsi, rbp; minja::Value * mov rdx, r13; minja::Value * call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&) lea r12, [rsp+0E8h+var_90] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+0E8h+var_98] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_A8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_B8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+0E8h+var_C8] test rdi, rdi jz short loc_9C3B4 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_9C39F mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9C3A9 loc_9C39F: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9C3A9: cmp eax, 1 jnz short loc_9C3B4 mov rax, [rdi] call qword ptr [rax+18h] loc_9C3B4: lea r12, [rsp+0E8h+var_40] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+0E8h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0E8h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+0E8h+var_78] test rdi, rdi jz short loc_9C42B mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_9C416 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9C420 loc_9C416: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9C420: cmp eax, 1 jnz short loc_9C42B mov rax, [rdi] call qword ptr [rax+18h] loc_9C42B: add rbx, 20h ; ' ' cmp rbx, r15 jnz loc_9C309 loc_9C438: mov rax, [rsp+0E8h+var_E8] add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9C44E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictKeyIsNull; "Dict key is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_9C488 loc_9C46C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictValueIsNul; "Dict value is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_9C488: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short $+2 loc_9C4A0: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_9C4D0 jmp short loc_9C4CD mov r14, rax jmp short loc_9C4C1 mov r14, rax lea rdi, [rsp+0E8h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9C4C1: lea rdi, [rsp+0E8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_9C4D0 loc_9C4CD: mov r14, rax loc_9C4D0: mov rdi, [rsp+0E8h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r14 call __Unwind_Resume
minja::Value * minja::DictExpr::do_evaluate(minja::Value *a1, long long a2) { long long v2; // rax void (****v3)(void); // rbx void (****v4)(void); // r15 long long v5; // rdi signed __int32 v6; // eax long long v7; // rdi signed __int32 v8; // eax std::runtime_error *exception; // r15 long long v12; // [rsp+8h] [rbp-E0h] BYREF volatile signed __int32 *v13; // [rsp+10h] [rbp-D8h] BYREF _BYTE v14[8]; // [rsp+18h] [rbp-D0h] BYREF long long v15; // [rsp+20h] [rbp-C8h] volatile signed __int32 *v16; // [rsp+30h] [rbp-B8h] BYREF volatile signed __int32 *v17; // [rsp+40h] [rbp-A8h] BYREF volatile signed __int32 *v18; // [rsp+50h] [rbp-98h] BYREF char v19[16]; // [rsp+58h] [rbp-90h] BYREF _BYTE v20[8]; // [rsp+68h] [rbp-80h] BYREF long long v21; // [rsp+70h] [rbp-78h] volatile signed __int32 *v22; // [rsp+80h] [rbp-68h] BYREF volatile signed __int32 *v23; // [rsp+90h] [rbp-58h] BYREF volatile signed __int32 *v24; // [rsp+A0h] [rbp-48h] BYREF char v25[64]; // [rsp+A8h] [rbp-40h] BYREF v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; v13 = (volatile signed __int32 *)v2; v12 = v2 + 16; minja::Value::Value((long long)a1, &v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); v3 = *(void (*****)(void))(a2 + 32); v4 = *(void (*****)(void))(a2 + 40); if ( v3 != v4 ) { while ( *v3 ) { if ( !v3[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict value is null"); LABEL_20: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v20, *v3); minja::Expression::evaluate((long long)v14, v3[2]); minja::Value::set(a1, (const minja::Value *)v20, (const minja::Value *)v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16); v5 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v24); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v22); v7 = v21; if ( v21 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v21 + 12); *(_DWORD *)(v21 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } v3 += 4; if ( v3 == v4 ) return a1; } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict key is null"); goto LABEL_20; } return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSP + 0x10] MOV EDI,0x30 CALL 0x0011c160 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1fe470] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [R12],RAX MOV qword ptr [R12 + -0x8],RCX LEA RSI,[RSP + 0x8] MOV qword ptr [RSP],RBX MOV RDI,RBX CALL 0x001781b6 MOV RDI,R12 CALL 0x00134564 MOV RBX,qword ptr [R15 + 0x20] MOV R15,qword ptr [R15 + 0x28] CMP RBX,R15 JZ 0x0019c438 LEA RBP,[RSP + 0x68] LEA R13,[RSP + 0x18] LAB_0019c309: MOV RSI,qword ptr [RBX] TEST RSI,RSI JZ 0x0019c44e CMP qword ptr [RBX + 0x10],0x0 JZ 0x0019c46c LAB_0019c320: MOV RDI,RBP MOV RDX,R14 CALL 0x00196f0a MOV RSI,qword ptr [RBX + 0x10] LAB_0019c32f: MOV RDI,R13 MOV RDX,R14 CALL 0x00196f0a LAB_0019c33a: MOV RDI,qword ptr [RSP] MOV RSI,RBP MOV RDX,R13 CALL 0x00177bc4 LAB_0019c349: LEA R12,[RSP + 0x58] MOV RDI,R12 XOR ESI,ESI CALL 0x001732fc MOV RDI,R12 CALL 0x001300e0 LEA RDI,[RSP + 0x50] CALL 0x00134564 LEA RDI,[RSP + 0x40] CALL 0x00134564 LEA RDI,[RSP + 0x30] CALL 0x00134564 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019c3b4 MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x0019c39f MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019c3a9 LAB_0019c39f: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019c3a9: CMP EAX,0x1 JNZ 0x0019c3b4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019c3b4: LEA R12,[RSP + 0xa8] MOV RDI,R12 XOR ESI,ESI CALL 0x001732fc MOV RDI,R12 CALL 0x001300e0 LEA RDI,[RSP + 0xa0] CALL 0x00134564 LEA RDI,[RSP + 0x90] CALL 0x00134564 LEA RDI,[RSP + 0x80] CALL 0x00134564 MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x0019c42b MOV RAX,qword ptr [0x001fff90] CMP byte ptr [RAX],0x0 JZ 0x0019c416 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019c420 LAB_0019c416: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019c420: CMP EAX,0x1 JNZ 0x0019c42b MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019c42b: ADD RBX,0x20 CMP RBX,R15 JNZ 0x0019c309 LAB_0019c438: MOV RAX,qword ptr [RSP] ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019c44e: MOV EDI,0x10 CALL 0x0011c460 MOV R15,RAX LAB_0019c45b: LEA RSI,[0x1ce351] MOV RDI,RAX CALL 0x0011c280 LAB_0019c46a: JMP 0x0019c488 LAB_0019c46c: MOV EDI,0x10 CALL 0x0011c460 MOV R15,RAX LAB_0019c479: LEA RSI,[0x1ce362] MOV RDI,RAX CALL 0x0011c280 LAB_0019c488: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff78] MOV RDI,R15 CALL 0x0011c7b0
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1) { int *piVar1; int8 *puVar2; int iVar3; runtime_error *this_00; int8 *puVar4; int8 *local_e0; int8 *local_d8; Expression local_d0 [8]; long *local_c8; __shared_count<(__gnu_cxx::_Lock_policy)2> local_b8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_98 [8]; data local_90 [16]; Expression local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; local_d8 = (int8 *)operator_new(0x30); local_d8[1] = 0x100000001; *local_d8 = &PTR___Sp_counted_base_001fe480; local_e0 = local_d8 + 2; local_d8[2] = 0; local_d8[3] = 0; local_d8[4] = 0; Value::Value((Value *)this,(shared_ptr *)&local_e0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_d8); puVar4 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar4 != puVar2) { do { if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019c45b to 0019c469 has its CatchHandler @ 0019c4a0 */ std::runtime_error::runtime_error(this_00,"Dict key is null"); LAB_0019c488: /* try { // try from 0019c488 to 0019c49d has its CatchHandler @ 0019c4cd */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78); } if (puVar4[2] == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019c479 to 0019c487 has its CatchHandler @ 0019c49e */ std::runtime_error::runtime_error(this_00,"Dict value is null"); goto LAB_0019c488; } /* try { // try from 0019c320 to 0019c32a has its CatchHandler @ 0019c4ad */ Expression::evaluate(local_80,(shared_ptr *)*puVar4); /* try { // try from 0019c32f to 0019c339 has its CatchHandler @ 0019c4af */ Expression::evaluate(local_d0,(shared_ptr *)puVar4[2]); /* try { // try from 0019c33a to 0019c348 has its CatchHandler @ 0019c4b4 */ Value::set((Value *)this,(Value *)local_80,(Value *)local_d0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_98); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b8); if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_c8 + 0x18))(); } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001fff90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } puVar4 = puVar4 + 4; } while (puVar4 != puVar2); } return this; }
55,381
print_name
eloqsql/mysys/my_getopt.c
static uint print_name(const struct my_option *optp) { const char *s= optp->name; for (;*s;s++) putchar(*s == '_' ? '-' : *s); return (uint)(s - optp->name); }
O0
c
print_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x7aad6 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5f, %eax jne 0x7aab6 movl $0x2d, %eax movl %eax, -0x14(%rbp) jmp 0x7aac0 movq -0x10(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %edi callq 0x36b20 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x7aa97 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
print_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax loc_7AA97: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_7AAD6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_7AAB6 mov eax, 2Dh ; '-' mov [rbp+var_14], eax jmp short loc_7AAC0 loc_7AAB6: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] mov [rbp+var_14], eax loc_7AAC0: mov edi, [rbp+var_14] call _putchar mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_7AA97 loc_7AAD6: mov rax, [rbp+var_10] mov rcx, [rbp+var_8] mov rcx, [rcx] sub rax, rcx add rsp, 20h pop rbp retn
long long print_name(_BYTE **a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] _BYTE *i; // [rsp+10h] [rbp-10h] for ( i = *a1; *i; ++i ) { if ( *i == 95 ) v2 = 45; else v2 = (char)*i; putchar(v2); } return i - *a1; }
print_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LAB_0017aa97: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x0017aad6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x0017aab6 MOV EAX,0x2d MOV dword ptr [RBP + -0x14],EAX JMP 0x0017aac0 LAB_0017aab6: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x14],EAX LAB_0017aac0: MOV EDI,dword ptr [RBP + -0x14] CALL 0x00136b20 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0017aa97 LAB_0017aad6: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] SUB RAX,RCX ADD RSP,0x20 POP RBP RET
long print_name(long *param_1) { int local_1c; char *local_18; for (local_18 = (char *)*param_1; *local_18 != '\0'; local_18 = local_18 + 1) { if (*local_18 == '_') { local_1c = 0x2d; } else { local_1c = (int)*local_18; } putchar(local_1c); } return (long)local_18 - *param_1; }
55,382
fill_buffer
eloqsql/storage/maria/ma_packrec.c
static void fill_buffer(MARIA_BIT_BUFF *bit_buff) { if (bit_buff->pos >= bit_buff->end) { bit_buff->error= 1; bit_buff->current_byte=0; return; } #if BITS_SAVED == 64 bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) | (((uint) ((uchar) bit_buff->pos[6])) << 8) | (((uint) ((uchar) bit_buff->pos[5])) << 16) | (((uint) ((uchar) bit_buff->pos[4])) << 24) | ((ulonglong) ((((uint) ((uchar) bit_buff->pos[3]))) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32)); bit_buff->pos+=8; #else #if BITS_SAVED == 32 bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)); bit_buff->pos+=4; #else bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) | (((uint) ((uchar) bit_buff->pos[0])) << 8)); bit_buff->pos+=2; #endif #endif }
O0
c
fill_buffer: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jb 0x4aba1 movq -0x8(%rbp), %rax movl $0x1, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, (%rax) jmp 0x4abf5 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x8(%rax) popq %rbp retq nopw (%rax,%rax)
fill_buffer: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jb short loc_4ABA1 mov rax, [rbp+var_8] mov dword ptr [rax+28h], 1 mov rax, [rbp+var_8] mov dword ptr [rax], 0 jmp short loc_4ABF5 loc_4ABA1: mov rax, [rbp+var_8] mov rax, [rax+8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_8] mov rcx, [rax+8] add rcx, 4 mov [rax+8], rcx loc_4ABF5: pop rbp retn
long long fill_buffer(long long a1) { long long result; // rax if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)(a1 + 16) ) { *(_DWORD *)a1 = _byteswap_ulong(**(_DWORD **)(a1 + 8)); result = a1; *(_QWORD *)(a1 + 8) += 4LL; } else { *(_DWORD *)(a1 + 40) = 1; result = a1; *(_DWORD *)a1 = 0; } return result; }
fill_buffer: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JC 0x0014aba1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x0 JMP 0x0014abf5 LAB_0014aba1: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x4 MOV qword ptr [RAX + 0x8],RCX LAB_0014abf5: POP RBP RET
void fill_buffer(int4 *param_1) { if (*(ulong *)(param_1 + 2) < *(ulong *)(param_1 + 4)) { *param_1 = CONCAT13(**(int1 **)(param_1 + 2), CONCAT12(*(int1 *)(*(long *)(param_1 + 2) + 1), CONCAT11(*(int1 *)(*(long *)(param_1 + 2) + 2), *(int1 *)(*(long *)(param_1 + 2) + 3)))); *(long *)(param_1 + 2) = *(long *)(param_1 + 2) + 4; } else { param_1[10] = 1; *param_1 = 0; } return; }
55,383
my_getwd
eloqsql/mysys/my_getwd.c
int my_getwd(char * buf, size_t size, myf MyFlags) { char * pos; DBUG_ENTER("my_getwd"); DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu", buf, (uint) size, MyFlags)); if (size < 1) DBUG_RETURN(-1); if (curr_dir[0]) /* Current pos is saved here */ (void) strmake(buf,&curr_dir[0],size-1); else { #if defined(HAVE_GETCWD) if (size < 2) DBUG_RETURN(-1); if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME) { my_errno=errno; my_error(EE_GETWD,MYF(ME_BELL),errno); DBUG_RETURN(-1); } #elif defined(HAVE_GETWD) { char pathname[MAXPATHLEN]; getwd(pathname); strmake(buf,pathname,size-1); } #else #error "No way to get current directory" #endif if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ { pos[0]= FN_LIBCHAR; pos[1]=0; } (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); } DBUG_RETURN(0); }
O0
c
my_getwd: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x69466 cmpq $0x1, -0x18(%rbp) jae 0x6947b jmp 0x6946f movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6955a leaq 0x3a8dfe(%rip), %rax # 0x412280 cmpb $0x0, (%rax) je 0x694a4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x3a8de6(%rip), %rsi # 0x412280 callq 0xb0460 jmp 0x69551 cmpq $0x2, -0x18(%rbp) jae 0x694b9 jmp 0x694ad movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6955a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax subq $0x2, %rax movl %eax, %eax movl %eax, %esi callq 0x26190 cmpq $0x0, %rax jne 0x69517 movq -0x20(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x69517 callq 0x26050 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x5ea40 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) callq 0x26050 movl (%rax), %edx movl $0x10, %edi movl $0x4, %esi movb $0x0, %al callq 0x68f20 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6955a movq -0x10(%rbp), %rdi callq 0xb03e0 movq %rax, -0x28(%rbp) movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x6953c movq -0x28(%rbp), %rax movb $0x2f, (%rax) movq -0x28(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x10(%rbp), %rsi leaq 0x3a8d39(%rip), %rdi # 0x412280 movl $0x1ff, %edx # imm = 0x1FF callq 0xb0460 jmp 0x69553 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_getwd: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_69466: cmp [rbp+var_18], 1 jnb short loc_6947B jmp short $+2 loc_6946F: mov [rbp+var_4], 0FFFFFFFFh jmp loc_6955A loc_6947B: lea rax, curr_dir cmp byte ptr [rax], 0 jz short loc_694A4 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, curr_dir call strmake jmp loc_69551 loc_694A4: cmp [rbp+var_18], 2 jnb short loc_694B9 jmp short $+2 loc_694AD: mov [rbp+var_4], 0FFFFFFFFh jmp loc_6955A loc_694B9: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] sub rax, 2 mov eax, eax mov esi, eax call _getcwd cmp rax, 0 jnz short loc_69517 mov rax, [rbp+var_20] and rax, 10h cmp rax, 0 jz short loc_69517 call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx call ___errno_location mov edx, [rax] mov edi, 10h mov esi, 4 mov al, 0 call my_error mov [rbp+var_4], 0FFFFFFFFh jmp short loc_6955A loc_69517: mov rdi, [rbp+var_10] call strend mov [rbp+var_28], rax movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_6953C mov rax, [rbp+var_28] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_28] mov byte ptr [rax+1], 0 loc_6953C: mov rsi, [rbp+var_10] lea rdi, curr_dir mov edx, 1FFh call strmake loc_69551: jmp short $+2 loc_69553: mov [rbp+var_4], 0 loc_6955A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_getwd(long long a1, unsigned long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+4h] [rbp-2Ch] _BYTE *v6; // [rsp+8h] [rbp-28h] if ( a2 ) { if ( curr_dir[0] ) { strmake(a1, curr_dir, a2 - 1); } else { if ( a2 < 2 ) return (unsigned int)-1; if ( !getcwd(a1, (unsigned int)(a2 - 2)) && (a3 & 0x10) != 0 ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; v3 = (unsigned int *)__errno_location(); my_error(0x10u, 4LL, *v3); return (unsigned int)-1; } v6 = (_BYTE *)strend(a1); if ( *(v6 - 1) != 47 ) { *v6 = 47; v6[1] = 0; } strmake(curr_dir, a1, 511LL); } return 0; } return (unsigned int)-1; }
my_getwd: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00169466 LAB_00169466: CMP qword ptr [RBP + -0x18],0x1 JNC 0x0016947b JMP 0x0016946f LAB_0016946f: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016955a LAB_0016947b: LEA RAX,[0x512280] CMP byte ptr [RAX],0x0 JZ 0x001694a4 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x512280] CALL 0x001b0460 JMP 0x00169551 LAB_001694a4: CMP qword ptr [RBP + -0x18],0x2 JNC 0x001694b9 JMP 0x001694ad LAB_001694ad: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016955a LAB_001694b9: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x2 MOV EAX,EAX MOV ESI,EAX CALL 0x00126190 CMP RAX,0x0 JNZ 0x00169517 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x10 CMP RAX,0x0 JZ 0x00169517 CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x0015ea40 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX CALL 0x00126050 MOV EDX,dword ptr [RAX] MOV EDI,0x10 MOV ESI,0x4 MOV AL,0x0 CALL 0x00168f20 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016955a LAB_00169517: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b03e0 MOV qword ptr [RBP + -0x28],RAX MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x0016953c MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],0x0 LAB_0016953c: MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x512280] MOV EDX,0x1ff CALL 0x001b0460 LAB_00169551: JMP 0x00169553 LAB_00169553: MOV dword ptr [RBP + -0x4],0x0 LAB_0016955a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_getwd(char *param_1,ulong param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int1 *puVar4; if (param_2 == 0) { return 0xffffffff; } if (curr_dir == '\0') { if (param_2 < 2) { return 0xffffffff; } pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2)); if ((pcVar2 == (char *)0x0) && ((param_3 & 0x10) != 0)) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; piVar3 = __errno_location(); my_error(0x10,4,*piVar3); return 0xffffffff; } puVar4 = (int1 *)strend(param_1); if (puVar4[-1] != '/') { *puVar4 = 0x2f; puVar4[1] = 0; } strmake(&curr_dir,param_1,0x1ff); } else { strmake(param_1,&curr_dir,param_2 - 1); } return 0; }
55,384
my_getcputime
eloqsql/mysys/my_getsystime.c
ulonglong my_getcputime() { #ifdef CLOCK_THREAD_CPUTIME_ID struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #elif defined(__NR_clock_gettime) struct timespec tp; if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #endif /* CLOCK_THREAD_CPUTIME_ID */ return 0; }
O0
c
my_getcputime: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x3, %edi leaq -0x18(%rbp), %rsi callq 0x38370 cmpl $0x0, %eax je 0x89d75 movq $0x0, -0x8(%rbp) jmp 0x89d9d imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x20(%rbp), %rax addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_getcputime: push rbp mov rbp, rsp sub rsp, 20h mov edi, 3 lea rsi, [rbp+var_18] call _clock_gettime cmp eax, 0 jz short loc_89D75 mov [rbp+var_8], 0 jmp short loc_89D9D loc_89D75: imul rax, [rbp+var_18], 989680h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_20] add rax, rcx mov [rbp+var_8], rax loc_89D9D: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
unsigned long long my_getcputime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] if ( (unsigned int)clock_gettime(3LL, &v1) ) return 0LL; else return v2 / 0x64 + 10000000 * v1; }
my_getcputime: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV EDI,0x3 LEA RSI,[RBP + -0x18] CALL 0x00138370 CMP EAX,0x0 JZ 0x00189d75 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00189d9d LAB_00189d75: IMUL RAX,qword ptr [RBP + -0x18],0x989680 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00189d9d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long my_getcputime(void) { int iVar1; timespec local_20; long local_10; iVar1 = clock_gettime(3,&local_20); if (iVar1 == 0) { local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100; } else { local_10 = 0; } return local_10; }
55,385
glfwGetVideoModes
untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c
GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count) { _GLFWmonitor* monitor = (_GLFWmonitor*) handle; assert(monitor != NULL); assert(count != NULL); *count = 0; _GLFW_REQUIRE_INIT_OR_RETURN(NULL); if (!refreshVideoModes(monitor)) return NULL; *count = monitor->modeCount; return monitor->modes; }
O1
c
glfwGetVideoModes: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x1c141 movq %rsi, %r14 testq %rsi, %rsi je 0x1c160 movl $0x0, (%r14) leaq 0x88533(%rip), %rax # 0xa4638 cmpl $0x0, (%rax) je 0x1c122 movq %rdi, %rbx callq 0x1bce0 testl %eax, %eax je 0x1c134 movl 0x28(%rbx), %eax movl %eax, (%r14) movq 0x20(%rbx), %rbx jmp 0x1c136 xorl %ebx, %ebx movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax callq 0x19081 jmp 0x1c136 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x633b4(%rip), %rdi # 0x7f4fc leaq 0x63329(%rip), %rsi # 0x7f478 leaq 0x63542(%rip), %rcx # 0x7f698 movl $0x1a8, %edx # imm = 0x1A8 callq 0xc540 leaq 0x63000(%rip), %rdi # 0x7f167 leaq 0x6330a(%rip), %rsi # 0x7f478 leaq 0x63523(%rip), %rcx # 0x7f698 movl $0x1a9, %edx # imm = 0x1A9 callq 0xc540
glfwGetVideoModes: push r14 push rbx push rax test rdi, rdi jz short loc_1C141 mov r14, rsi test rsi, rsi jz short loc_1C160 mov dword ptr [r14], 0 lea rax, _glfw cmp dword ptr [rax], 0 jz short loc_1C122 mov rbx, rdi call refreshVideoModes test eax, eax jz short loc_1C134 mov eax, [rbx+28h] mov [r14], eax mov rbx, [rbx+20h] jmp short loc_1C136 loc_1C122: xor ebx, ebx mov edi, 10001h xor esi, esi xor eax, eax call _glfwInputError jmp short loc_1C136 loc_1C134: xor ebx, ebx loc_1C136: mov rax, rbx add rsp, 8 pop rbx pop r14 retn loc_1C141: lea rdi, aMonitorNull; "monitor != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstGlfwvidmo; "const GLFWvidmode *glfwGetVideoModes(GL"... mov edx, 1A8h call ___assert_fail loc_1C160: lea rdi, aCountNull; "count != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstGlfwvidmo; "const GLFWvidmode *glfwGetVideoModes(GL"... mov edx, 1A9h call ___assert_fail
long long glfwGetVideoModes(long long a1, _DWORD *a2) { long long v2; // rbx if ( !a1 ) __assert_fail( "monitor != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c", 424LL, "const GLFWvidmode *glfwGetVideoModes(GLFWmonitor *, int *)"); if ( !a2 ) __assert_fail( "count != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c", 425LL, "const GLFWvidmode *glfwGetVideoModes(GLFWmonitor *, int *)"); *a2 = 0; if ( glfw[0] ) { if ( (unsigned int)refreshVideoModes(a1) ) { *a2 = *(_DWORD *)(a1 + 40); return *(_QWORD *)(a1 + 32); } else { return 0LL; } } else { v2 = 0LL; glfwInputError(0x10001u, 0LL); } return v2; }
glfwGetVideoModes: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x0011c141 MOV R14,RSI TEST RSI,RSI JZ 0x0011c160 MOV dword ptr [R14],0x0 LEA RAX,[0x1a4638] CMP dword ptr [RAX],0x0 JZ 0x0011c122 MOV RBX,RDI CALL 0x0011bce0 TEST EAX,EAX JZ 0x0011c134 MOV EAX,dword ptr [RBX + 0x28] MOV dword ptr [R14],EAX MOV RBX,qword ptr [RBX + 0x20] JMP 0x0011c136 LAB_0011c122: XOR EBX,EBX MOV EDI,0x10001 XOR ESI,ESI XOR EAX,EAX CALL 0x00119081 JMP 0x0011c136 LAB_0011c134: XOR EBX,EBX LAB_0011c136: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_0011c141: LEA RDI,[0x17f4fc] LEA RSI,[0x17f478] LEA RCX,[0x17f698] MOV EDX,0x1a8 CALL 0x0010c540 LAB_0011c160: LEA RDI,[0x17f167] LEA RSI,[0x17f478] LEA RCX,[0x17f698] MOV EDX,0x1a9 CALL 0x0010c540
int8 glfwGetVideoModes(long param_1,int4 *param_2) { int iVar1; int8 uVar2; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("monitor != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c" ,0x1a8,"const GLFWvidmode *glfwGetVideoModes(GLFWmonitor *, int *)"); } if (param_2 != (int4 *)0x0) { *param_2 = 0; if (_glfw == 0) { uVar2 = 0; _glfwInputError(0x10001,0); } else { iVar1 = refreshVideoModes(); if (iVar1 == 0) { uVar2 = 0; } else { *param_2 = *(int4 *)(param_1 + 0x28); uVar2 = *(int8 *)(param_1 + 0x20); } } return uVar2; } /* WARNING: Subroutine does not return */ __assert_fail("count != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c" ,0x1a9,"const GLFWvidmode *glfwGetVideoModes(GLFWmonitor *, int *)"); }
55,386
test_bug14845
eloqsql/tests/mysql_client_test.c
static void test_bug14845() { MYSQL_STMT *stmt; int rc; const ulong type= CURSOR_TYPE_READ_ONLY; const char *query= "select count(*) from t1 where 1 = 0"; myheader("test_bug14845"); rc= mysql_query(mysql, "drop table if exists t1"); myquery(rc); rc= mysql_query(mysql, "create table t1 (id int(11) default null, " "name varchar(20) default null)" "engine=MyISAM DEFAULT CHARSET=utf8"); myquery(rc); rc= mysql_query(mysql, "insert into t1 values (1,'abc'),(2,'def')"); myquery(rc); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type); check_execute(stmt, rc); rc= mysql_stmt_prepare(stmt, query, strlen(query)); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == 0); rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == MYSQL_NO_DATA); /* Cleanup */ mysql_stmt_close(stmt); rc= mysql_query(mysql, "drop table t1"); myquery(rc); }
O3
c
test_bug14845: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp movq $0x1, -0x10(%rbp) cmpb $0x1, 0x3ada00(%rip) # 0x41a4c1 jg 0x6cb3c movq 0x3334f6(%rip), %rbx # 0x39ffc0 movq (%rbx), %rdi leaq 0x729f0(%rip), %rdx # 0xdf4c4 movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi movl 0x3adc23(%rip), %ecx # 0x41a70c leal 0x1(%rcx), %eax movl %eax, 0x3adc1a(%rip) # 0x41a70c movl 0x3adc0f(%rip), %r8d # 0x41a708 movl 0x3ad9ec(%rip), %r9d # 0x41a4ec leaq 0x73726(%rip), %rax # 0xe022d movq %rax, (%rsp) leaq 0x73cba(%rip), %rdx # 0xe07cc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi leaq 0x729d4(%rip), %rdx # 0xdf4fc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi callq 0x394b0 movq 0x3ad985(%rip), %rdi # 0x41a4c8 leaq 0x74383(%rip), %rsi # 0xe0ecd callq 0x3b116 testl %eax, %eax jne 0x6cc2c movq 0x3ad96a(%rip), %rdi # 0x41a4c8 leaq 0x83e4a(%rip), %rsi # 0xf09af callq 0x3b116 testl %eax, %eax jne 0x6cc4b movq 0x3ad94f(%rip), %rdi # 0x41a4c8 leaq 0x83e9a(%rip), %rsi # 0xf0a1a callq 0x3b116 testl %eax, %eax jne 0x6cc6a movq 0x3ad934(%rip), %rdi # 0x41a4c8 callq 0x9191c movq %rax, %rbx leaq -0x10(%rbp), %rdx movq %rax, %rdi movl $0x1, %esi callq 0x908de testb %al, %al jne 0x6cc89 leaq 0x83dcf(%rip), %rsi # 0xf098b movl $0x23, %edx movq %rbx, %rdi callq 0x3b4a1 testl %eax, %eax jne 0x6cca9 movq %rbx, %rdi callq 0x3b510 testl %eax, %eax jne 0x6ccc9 movq %rbx, %rdi callq 0x3b573 testl %eax, %eax jne 0x6cce9 movq %rbx, %rdi callq 0x3b573 cmpl $0x64, %eax jne 0x6cd01 movq %rbx, %rdi callq 0x3b639 movq 0x3ad8b7(%rip), %rdi # 0x41a4c8 leaq 0x74100(%rip), %rsi # 0xe0d18 callq 0x3b116 testl %eax, %eax jne 0x6cd19 addq $0x18, %rsp popq %rbx popq %rbp retq xorl %edi, %edi callq 0x3ba57 leaq 0x72172(%rip), %rdi # 0xdedac leaq 0x8847e(%rip), %rdx # 0xf50bf movl $0x3b8d, %esi # imm = 0x3B8D callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x72153(%rip), %rdi # 0xdedac leaq 0x8845f(%rip), %rdx # 0xf50bf movl $0x3b91, %esi # imm = 0x3B91 callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x72134(%rip), %rdi # 0xdedac leaq 0x88440(%rip), %rdx # 0xf50bf movl $0x3b93, %esi # imm = 0x3B93 callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x72114(%rip), %rdi # 0xdedac leaq 0x7dcc8(%rip), %rdx # 0xea967 movl $0x3b97, %esi # imm = 0x3B97 callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x720f4(%rip), %rdi # 0xdedac leaq 0x7dca8(%rip), %rdx # 0xea967 movl $0x3b9a, %esi # imm = 0x3B9A callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x720d4(%rip), %rdi # 0xdedac leaq 0x7dc88(%rip), %rdx # 0xea967 movl $0x3b9d, %esi # imm = 0x3B9D callq 0x3bb30 leaq 0x720bc(%rip), %rdi # 0xdedac leaq 0x7dc70(%rip), %rdx # 0xea967 movl $0x3ba0, %esi # imm = 0x3BA0 callq 0x3bb30 leaq 0x720a4(%rip), %rdi # 0xdedac leaq 0x721bf(%rip), %rdx # 0xdeece movl $0x3ba3, %esi # imm = 0x3BA3 callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x72085(%rip), %rdi # 0xdedac leaq 0x88391(%rip), %rdx # 0xf50bf movl $0x3ba8, %esi # imm = 0x3BA8 callq 0x3bb30
test_bug14845: push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_10], 1 cmp cs:opt_silent, 1 jg short loc_6CB3C mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, asc_DF4C4; "\n\n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] mov ecx, cs:test_count lea eax, [rcx+1] mov cs:test_count, eax mov r8d, cs:iter_count mov r9d, cs:opt_count lea rax, aTestBug14845; "test_bug14845" mov [rsp+20h+var_20], rax lea rdx, aUOfUUS; "%u of (%u/%u): %s" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] lea rdx, asc_DF4FC; " \n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush loc_6CB3C: mov rdi, cs:mysql lea rsi, aDropTableIfExi_2; "drop table if exists t1" call wrap_mysql_query test eax, eax jnz loc_6CC2C mov rdi, cs:mysql lea rsi, aCreateTableT1I_16; "create table t1 (id int(11) default nul"... call wrap_mysql_query test eax, eax jnz loc_6CC4B mov rdi, cs:mysql lea rsi, aInsertIntoT1Va_37; "insert into t1 values (1,'abc'),(2,'def"... call wrap_mysql_query test eax, eax jnz loc_6CC6A mov rdi, cs:mysql call mysql_stmt_init mov rbx, rax lea rdx, [rbp+var_10] mov rdi, rax mov esi, 1 call mysql_stmt_attr_set test al, al jnz loc_6CC89 lea rsi, aSelectCountFro_1; "select count(*) from t1 where 1 = 0" mov edx, 23h ; '#' mov rdi, rbx call wrap_mysql_stmt_prepare test eax, eax jnz loc_6CCA9 mov rdi, rbx call wrap_mysql_stmt_execute test eax, eax jnz loc_6CCC9 mov rdi, rbx call wrap_mysql_stmt_fetch test eax, eax jnz loc_6CCE9 mov rdi, rbx call wrap_mysql_stmt_fetch cmp eax, 64h ; 'd' jnz loc_6CD01 mov rdi, rbx call wrap_mysql_stmt_close mov rdi, cs:mysql lea rsi, aDropTableT1_0; "drop table t1" call wrap_mysql_query test eax, eax jnz loc_6CD19 add rsp, 18h pop rbx pop rbp retn loc_6CC2C: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 3B8Dh call die loc_6CC4B: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 3B91h call die loc_6CC6A: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 3B93h call die loc_6CC89: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3B97h call die loc_6CCA9: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3B9Ah call die loc_6CCC9: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3B9Dh call die loc_6CCE9: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3BA0h call die loc_6CD01: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlNoData; "rc == MYSQL_NO_DATA" mov esi, 3BA3h call die loc_6CD19: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 3BA8h call die
long long test_bug14845() { int v0; // ecx long long v1; // rbx long long result; // rax long long v3; // [rsp+10h] [rbp-10h] BYREF v3 = 1LL; if ( opt_silent <= 1 ) { __fprintf_chk(stdout, 1LL, "\n\n#####################################\n"); v0 = test_count++; __fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug14845"); __fprintf_chk(stdout, 1LL, " \n#####################################\n"); fflush(stdout); } if ( (unsigned int)wrap_mysql_query(mysql, (long long)"drop table if exists t1") ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15245, "r == 0"); } if ( (unsigned int)wrap_mysql_query( mysql, (long long)"create table t1 (id int(11) default null, name varchar(20) default null)engine=MyISAM DE" "FAULT CHARSET=utf8") ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15249, "r == 0"); } if ( (unsigned int)wrap_mysql_query(mysql, (long long)"insert into t1 values (1,'abc'),(2,'def')") ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15251, "r == 0"); } v1 = mysql_stmt_init(mysql); if ( (unsigned __int8)mysql_stmt_attr_set(v1, 1LL, &v3) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15255, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_prepare(v1, (long long)"select count(*) from t1 where 1 = 0", 35LL) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15258, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_execute(v1) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15261, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_fetch(v1) ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15264, "rc == 0"); if ( (unsigned int)wrap_mysql_stmt_fetch(v1) != 100 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15267, "rc == MYSQL_NO_DATA"); wrap_mysql_stmt_close(v1); result = wrap_mysql_query(mysql, (long long)"drop table t1"); if ( (_DWORD)result ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15272, "r == 0"); } return result; }
test_bug14845: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x10],0x1 CMP byte ptr [0x0051a4c1],0x1 JG 0x0016cb3c MOV RBX,qword ptr [0x0049ffc0] MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4c4] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] MOV ECX,dword ptr [0x0051a70c] LEA EAX,[RCX + 0x1] MOV dword ptr [0x0051a70c],EAX MOV R8D,dword ptr [0x0051a708] MOV R9D,dword ptr [0x0051a4ec] LEA RAX,[0x1e022d] MOV qword ptr [RSP],RAX LEA RDX,[0x1e07cc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4fc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] CALL 0x001394b0 LAB_0016cb3c: MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e0ecd] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0016cc2c MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1f09af] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0016cc4b MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1f0a1a] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0016cc6a MOV RDI,qword ptr [0x0051a4c8] CALL 0x0019191c MOV RBX,RAX LEA RDX,[RBP + -0x10] MOV RDI,RAX MOV ESI,0x1 CALL 0x001908de TEST AL,AL JNZ 0x0016cc89 LEA RSI,[0x1f098b] MOV EDX,0x23 MOV RDI,RBX CALL 0x0013b4a1 TEST EAX,EAX JNZ 0x0016cca9 MOV RDI,RBX CALL 0x0013b510 TEST EAX,EAX JNZ 0x0016ccc9 MOV RDI,RBX CALL 0x0013b573 TEST EAX,EAX JNZ 0x0016cce9 MOV RDI,RBX CALL 0x0013b573 CMP EAX,0x64 JNZ 0x0016cd01 MOV RDI,RBX CALL 0x0013b639 MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e0d18] CALL 0x0013b116 TEST EAX,EAX JNZ 0x0016cd19 ADD RSP,0x18 POP RBX POP RBP RET LAB_0016cc2c: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x3b8d CALL 0x0013bb30 LAB_0016cc4b: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x3b91 CALL 0x0013bb30 LAB_0016cc6a: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x3b93 CALL 0x0013bb30 LAB_0016cc89: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3b97 CALL 0x0013bb30 LAB_0016cca9: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3b9a CALL 0x0013bb30 LAB_0016ccc9: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3b9d CALL 0x0013bb30 LAB_0016cce9: LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3ba0 CALL 0x0013bb30 LAB_0016cd01: LEA RDI,[0x1dedac] LEA RDX,[0x1deece] MOV ESI,0x3ba3 CALL 0x0013bb30 LAB_0016cd19: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x3ba8 CALL 0x0013bb30
void test_bug14845(void) { int *puVar1; char cVar2; int iVar3; int8 uVar4; int8 local_18; puVar1 = PTR_stdout_0049ffc0; local_18 = 1; if (opt_silent < '\x02') { __fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n" ); iVar3 = test_count; test_count = test_count + 1; __fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar3,iter_count,opt_count, "test_bug14845"); __fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n"); fflush(*(FILE **)puVar1); } iVar3 = wrap_mysql_query(mysql,"drop table if exists t1"); if (iVar3 != 0) { print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b8d,"r == 0"); } iVar3 = wrap_mysql_query(mysql, "create table t1 (id int(11) default null, name varchar(20) default null)engine=MyISAM DEFAULT CHARSET=utf8" ); if (iVar3 != 0) { print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b91,"r == 0"); } iVar3 = wrap_mysql_query(mysql,"insert into t1 values (1,\'abc\'),(2,\'def\')"); if (iVar3 != 0) { print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b93,"r == 0"); } uVar4 = mysql_stmt_init(mysql); cVar2 = mysql_stmt_attr_set(uVar4,1,&local_18); if (cVar2 != '\0') { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b97,"rc == 0"); } iVar3 = wrap_mysql_stmt_prepare(uVar4,"select count(*) from t1 where 1 = 0",0x23); if (iVar3 != 0) { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b9a,"rc == 0"); } iVar3 = wrap_mysql_stmt_execute(uVar4); if (iVar3 != 0) { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3b9d,"rc == 0"); } iVar3 = wrap_mysql_stmt_fetch(uVar4); if (iVar3 == 0) { iVar3 = wrap_mysql_stmt_fetch(uVar4); if (iVar3 != 100) { /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3ba3, "rc == MYSQL_NO_DATA"); } wrap_mysql_stmt_close(uVar4); iVar3 = wrap_mysql_query(mysql,"drop table t1"); if (iVar3 == 0) { return; } print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3ba8,"r == 0"); } /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3ba0,"rc == 0"); }
55,387
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()
monkey531[P]llama/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 0x1c63e cmpl $0x2f, %eax je 0x5cd61 cmpl $0x2a, %eax jne 0x5cd7e movq %rbx, %rdi callq 0x1c63e leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x5cd87 cmpl $0x2a, %eax jne 0x5cd35 movq %rbx, %rdi callq 0x1c63e cmpl $0x2f, %eax je 0x5cd7a movq %rbx, %rdi callq 0x5d5f0 jmp 0x5cd35 movl $0x4803, %ebp # imm = 0x4803 movq %rbx, %rdi callq 0x1c63e incl %eax cmpl $0xf, %eax jae 0x5cd66 btl %eax, %ebp jae 0x5cd66 movb $0x1, %al jmp 0x5cd94 leaq 0x92743(%rip), %rax # 0xef4c8 jmp 0x5cd8e leaq 0x92714(%rip), %rax # 0xef4a2 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_5CD61 cmp eax, 2Ah ; '*' jnz short loc_5CD7E loc_5CD35: 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_5CD87 cmp eax, 2Ah ; '*' jnz short loc_5CD35 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_5CD7A 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_5CD35 loc_5CD61: mov ebp, 4803h loc_5CD66: 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_5CD66 bt ebp, eax jnb short loc_5CD66 loc_5CD7A: mov al, 1 jmp short loc_5CD94 loc_5CD7E: lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"... jmp short loc_5CD8E loc_5CD87: lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'" loc_5CD8E: mov [rbx+70h], rax xor eax, eax loc_5CD94: 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(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 0x0011c63e CMP EAX,0x2f JZ 0x0015cd61 CMP EAX,0x2a JNZ 0x0015cd7e LAB_0015cd35: MOV RDI,RBX CALL 0x0011c63e LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x0015cd87 CMP EAX,0x2a JNZ 0x0015cd35 MOV RDI,RBX CALL 0x0011c63e CMP EAX,0x2f JZ 0x0015cd7a MOV RDI,RBX CALL 0x0015d5f0 JMP 0x0015cd35 LAB_0015cd61: MOV EBP,0x4803 LAB_0015cd66: MOV RDI,RBX CALL 0x0011c63e INC EAX CMP EAX,0xf JNC 0x0015cd66 BT EBP,EAX JNC 0x0015cd66 LAB_0015cd7a: MOV AL,0x1 JMP 0x0015cd94 LAB_0015cd7e: LEA RAX,[0x1ef4c8] JMP 0x0015cd8e LAB_0015cd87: LEA RAX,[0x1ef4a2] LAB_0015cd8e: MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX LAB_0015cd94: 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_0015cd7a: uVar2 = 1; } else { if (iVar1 == 0x2a) { while (iVar1 = get(this), 1 < iVar1 + 1U) { if (iVar1 == 0x2a) { iVar1 = get(this); if (iVar1 == 0x2f) goto LAB_0015cd7a; unget(this); } } pcVar3 = "invalid comment; missing closing \'*/\'"; } else { pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'"; } *(char **)(this + 0x70) = pcVar3; uVar2 = 0; } return uVar2; }
55,388
uint256_mod_inverse
corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_ec.c
static bool uint256_mod_inverse(uint256_t* result, const uint256_t* a, const uint256_t* modulus) { // Check if a is 0 if (intx_is_zero(a)) { intx_init(result); return false; } uint256_t r0, r1, s0, s1, t0, t1, q, tmp1, tmp2; // Initialize variables for extended Euclidean algorithm intx_init(&r0); intx_init(&r1); intx_init(&s0); intx_init(&s1); intx_init(&t0); intx_init(&t1); intx_init(&q); intx_init(&tmp1); intx_init(&tmp2); // r0 = modulus, r1 = a intx_add(&r0, modulus, NULL); intx_add(&r1, a, NULL); // s0 = 1, s1 = 0 intx_init_value(&s0, 1); intx_init(&s1); // t0 = 0, t1 = 1 intx_init(&t0); intx_init_value(&t1, 1); while (!intx_is_zero(&r1)) { // q = r0 / r1 intx_div(&q, &r0, &r1); // (r0, r1) = (r1, r0 - q * r1) intx_add(&tmp1, &r1, NULL); intx_mul(&tmp2, &q, &r1); intx_sub(&r0, &r0, &tmp2); intx_add(&r1, &tmp1, NULL); // (s0, s1) = (s1, s0 - q * s1) intx_add(&tmp1, &s1, NULL); intx_mul(&tmp2, &q, &s1); intx_sub(&s0, &s0, &tmp2); intx_add(&s1, &tmp1, NULL); // (t0, t1) = (t1, t0 - q * t1) intx_add(&tmp1, &t1, NULL); intx_mul(&tmp2, &q, &t1); intx_sub(&t0, &t0, &tmp2); intx_add(&t1, &tmp1, NULL); } // If r0 > 1, a is not invertible uint256_t one; intx_init_value(&one, 1); if (!intx_eq(&r0, &one)) { intx_init(result); return false; } // Make sure s0 is positive if (t0.bytes[0] & 0x80) { intx_add(&t0, &t0, modulus); } // Return the result intx_mod(result, &t0, modulus); return true; }
O0
c
uint256_mod_inverse: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0xd8fe0 cmpl $0x0, %eax je 0x9b737 movq -0x10(%rbp), %rdi callq 0xd8540 movb $0x0, -0x1(%rbp) jmp 0x9b9a2 leaq -0x40(%rbp), %rdi callq 0xd8540 leaq -0x60(%rbp), %rdi callq 0xd8540 leaq -0x80(%rbp), %rdi callq 0xd8540 leaq -0xa0(%rbp), %rdi callq 0xd8540 leaq -0xc0(%rbp), %rdi callq 0xd8540 leaq -0xe0(%rbp), %rdi callq 0xd8540 leaq -0x100(%rbp), %rdi callq 0xd8540 leaq -0x120(%rbp), %rdi callq 0xd8540 leaq -0x140(%rbp), %rdi callq 0xd8540 movq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 movq -0x18(%rbp), %rsi leaq -0x60(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x80(%rbp), %rdi movl $0x1, %esi callq 0xd8570 leaq -0xa0(%rbp), %rdi callq 0xd8540 leaq -0xc0(%rbp), %rdi callq 0xd8540 leaq -0xe0(%rbp), %rdi movl $0x1, %esi callq 0xd8570 leaq -0x60(%rbp), %rdi callq 0xd8fe0 cmpl $0x0, %eax setne %al xorb $-0x1, %al testb $0x1, %al jne 0x9b80d jmp 0x9b931 leaq -0x100(%rbp), %rdi leaq -0x40(%rbp), %rsi leaq -0x60(%rbp), %rdx callq 0xd8a10 leaq -0x120(%rbp), %rdi leaq -0x60(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x140(%rbp), %rdi leaq -0x100(%rbp), %rsi leaq -0x60(%rbp), %rdx callq 0xd89b0 leaq -0x40(%rbp), %rsi leaq -0x140(%rbp), %rdx movq %rsi, %rdi callq 0xd8950 leaq -0x60(%rbp), %rdi leaq -0x120(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x120(%rbp), %rdi leaq -0xa0(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x140(%rbp), %rdi leaq -0x100(%rbp), %rsi leaq -0xa0(%rbp), %rdx callq 0xd89b0 leaq -0x80(%rbp), %rsi leaq -0x140(%rbp), %rdx movq %rsi, %rdi callq 0xd8950 leaq -0xa0(%rbp), %rdi leaq -0x120(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x120(%rbp), %rdi leaq -0xe0(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 leaq -0x140(%rbp), %rdi leaq -0x100(%rbp), %rsi leaq -0xe0(%rbp), %rdx callq 0xd89b0 leaq -0xc0(%rbp), %rsi leaq -0x140(%rbp), %rdx movq %rsi, %rdi callq 0xd8950 leaq -0xe0(%rbp), %rdi leaq -0x120(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd88f0 jmp 0x9b7f3 leaq -0x160(%rbp), %rdi movl $0x1, %esi callq 0xd8570 leaq -0x40(%rbp), %rdi leaq -0x160(%rbp), %rsi callq 0xd8d60 cmpl $0x0, %eax jne 0x9b966 movq -0x10(%rbp), %rdi callq 0xd8540 movb $0x0, -0x1(%rbp) jmp 0x9b9a2 movzbl -0xc0(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x9b98a movq -0x20(%rbp), %rdx leaq -0xc0(%rbp), %rsi movq %rsi, %rdi callq 0xd88f0 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx leaq -0xc0(%rbp), %rsi callq 0xd8ac0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x160, %rsp # imm = 0x160 popq %rbp retq
uint256_mod_inverse: push rbp mov rbp, rsp sub rsp, 160h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_18] call intx_is_zero cmp eax, 0 jz short loc_9B737 mov rdi, [rbp+var_10] call intx_init mov [rbp+var_1], 0 jmp loc_9B9A2 loc_9B737: lea rdi, [rbp+var_40] call intx_init lea rdi, [rbp+var_60] call intx_init lea rdi, [rbp+var_80] call intx_init lea rdi, [rbp+var_A0] call intx_init lea rdi, [rbp+var_C0] call intx_init lea rdi, [rbp+var_E0] call intx_init lea rdi, [rbp+var_100] call intx_init lea rdi, [rbp+var_120] call intx_init lea rdi, [rbp+var_140] call intx_init mov rsi, [rbp+var_20] lea rdi, [rbp+var_40] xor eax, eax mov edx, eax call intx_add mov rsi, [rbp+var_18] lea rdi, [rbp+var_60] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_80] mov esi, 1 call intx_init_value lea rdi, [rbp+var_A0] call intx_init lea rdi, [rbp+var_C0] call intx_init lea rdi, [rbp+var_E0] mov esi, 1 call intx_init_value loc_9B7F3: lea rdi, [rbp+var_60] call intx_is_zero cmp eax, 0 setnz al xor al, 0FFh test al, 1 jnz short loc_9B80D jmp loc_9B931 loc_9B80D: lea rdi, [rbp+var_100] lea rsi, [rbp+var_40] lea rdx, [rbp+var_60] call intx_div lea rdi, [rbp+var_120] lea rsi, [rbp+var_60] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_140] lea rsi, [rbp+var_100] lea rdx, [rbp+var_60] call intx_mul lea rsi, [rbp+var_40] lea rdx, [rbp+var_140] mov rdi, rsi call intx_sub lea rdi, [rbp+var_60] lea rsi, [rbp+var_120] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_120] lea rsi, [rbp+var_A0] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_140] lea rsi, [rbp+var_100] lea rdx, [rbp+var_A0] call intx_mul lea rsi, [rbp+var_80] lea rdx, [rbp+var_140] mov rdi, rsi call intx_sub lea rdi, [rbp+var_A0] lea rsi, [rbp+var_120] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_120] lea rsi, [rbp+var_E0] xor eax, eax mov edx, eax call intx_add lea rdi, [rbp+var_140] lea rsi, [rbp+var_100] lea rdx, [rbp+var_E0] call intx_mul lea rsi, [rbp+var_C0] lea rdx, [rbp+var_140] mov rdi, rsi call intx_sub lea rdi, [rbp+var_E0] lea rsi, [rbp+var_120] xor eax, eax mov edx, eax call intx_add jmp loc_9B7F3 loc_9B931: lea rdi, [rbp+var_160] mov esi, 1 call intx_init_value lea rdi, [rbp+var_40] lea rsi, [rbp+var_160] call intx_eq cmp eax, 0 jnz short loc_9B966 mov rdi, [rbp+var_10] call intx_init mov [rbp+var_1], 0 jmp short loc_9B9A2 loc_9B966: movzx eax, [rbp+var_C0] and eax, 80h cmp eax, 0 jz short loc_9B98A mov rdx, [rbp+var_20] lea rsi, [rbp+var_C0] mov rdi, rsi call intx_add loc_9B98A: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] lea rsi, [rbp+var_C0] call intx_mod mov [rbp+var_1], 1 loc_9B9A2: mov al, [rbp+var_1] and al, 1 add rsp, 160h pop rbp retn
char uint256_mod_inverse(long long a1, long long a2, long long a3) { _BYTE v4[32]; // [rsp+0h] [rbp-160h] BYREF _BYTE v5[32]; // [rsp+20h] [rbp-140h] BYREF _BYTE v6[32]; // [rsp+40h] [rbp-120h] BYREF _BYTE v7[32]; // [rsp+60h] [rbp-100h] BYREF _BYTE v8[32]; // [rsp+80h] [rbp-E0h] BYREF _BYTE v9[32]; // [rsp+A0h] [rbp-C0h] BYREF _BYTE v10[32]; // [rsp+C0h] [rbp-A0h] BYREF _BYTE v11[32]; // [rsp+E0h] [rbp-80h] BYREF _BYTE v12[32]; // [rsp+100h] [rbp-60h] BYREF _BYTE v13[32]; // [rsp+120h] [rbp-40h] BYREF long long v14; // [rsp+140h] [rbp-20h] long long v15; // [rsp+148h] [rbp-18h] long long v16; // [rsp+150h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; if ( (unsigned int)intx_is_zero(a2) ) { intx_init(v16); return 0; } else { intx_init(v13); intx_init(v12); intx_init(v11); intx_init(v10); intx_init(v9); intx_init(v8); intx_init(v7); intx_init(v6); intx_init(v5); intx_add(v13, v14, 0LL); intx_add(v12, v15, 0LL); intx_init_value(v11, 1LL); intx_init(v10); intx_init(v9); intx_init_value(v8, 1LL); while ( !(unsigned int)intx_is_zero(v12) ) { intx_div(v7, v13, v12); intx_add(v6, v12, 0LL); intx_mul(v5, v7, v12); intx_sub(v13, v13, v5); intx_add(v12, v6, 0LL); intx_add(v6, v10, 0LL); intx_mul(v5, v7, v10); intx_sub(v11, v11, v5); intx_add(v10, v6, 0LL); intx_add(v6, v8, 0LL); intx_mul(v5, v7, v8); intx_sub(v9, v9, v5); intx_add(v8, v6, 0LL); } intx_init_value(v4, 1LL); if ( (unsigned int)intx_eq(v13, v4) ) { if ( (v9[0] & 0x80) != 0 ) intx_add(v9, v9, v14); intx_mod(v16, v9, v14); return 1; } else { intx_init(v16); return 0; } } }
uint256_mod_inverse: PUSH RBP MOV RBP,RSP SUB RSP,0x160 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001d8fe0 CMP EAX,0x0 JZ 0x0019b737 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d8540 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0019b9a2 LAB_0019b737: LEA RDI,[RBP + -0x40] CALL 0x001d8540 LEA RDI,[RBP + -0x60] CALL 0x001d8540 LEA RDI,[RBP + -0x80] CALL 0x001d8540 LEA RDI,[RBP + -0xa0] CALL 0x001d8540 LEA RDI,[RBP + -0xc0] CALL 0x001d8540 LEA RDI,[RBP + -0xe0] CALL 0x001d8540 LEA RDI,[RBP + -0x100] CALL 0x001d8540 LEA RDI,[RBP + -0x120] CALL 0x001d8540 LEA RDI,[RBP + -0x140] CALL 0x001d8540 MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x40] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x60] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x80] MOV ESI,0x1 CALL 0x001d8570 LEA RDI,[RBP + -0xa0] CALL 0x001d8540 LEA RDI,[RBP + -0xc0] CALL 0x001d8540 LEA RDI,[RBP + -0xe0] MOV ESI,0x1 CALL 0x001d8570 LAB_0019b7f3: LEA RDI,[RBP + -0x60] CALL 0x001d8fe0 CMP EAX,0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x0019b80d JMP 0x0019b931 LAB_0019b80d: LEA RDI,[RBP + -0x100] LEA RSI,[RBP + -0x40] LEA RDX,[RBP + -0x60] CALL 0x001d8a10 LEA RDI,[RBP + -0x120] LEA RSI,[RBP + -0x60] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x140] LEA RSI,[RBP + -0x100] LEA RDX,[RBP + -0x60] CALL 0x001d89b0 LEA RSI,[RBP + -0x40] LEA RDX,[RBP + -0x140] MOV RDI,RSI CALL 0x001d8950 LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x120] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x120] LEA RSI,[RBP + -0xa0] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x140] LEA RSI,[RBP + -0x100] LEA RDX,[RBP + -0xa0] CALL 0x001d89b0 LEA RSI,[RBP + -0x80] LEA RDX,[RBP + -0x140] MOV RDI,RSI CALL 0x001d8950 LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0x120] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x120] LEA RSI,[RBP + -0xe0] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 LEA RDI,[RBP + -0x140] LEA RSI,[RBP + -0x100] LEA RDX,[RBP + -0xe0] CALL 0x001d89b0 LEA RSI,[RBP + -0xc0] LEA RDX,[RBP + -0x140] MOV RDI,RSI CALL 0x001d8950 LEA RDI,[RBP + -0xe0] LEA RSI,[RBP + -0x120] XOR EAX,EAX MOV EDX,EAX CALL 0x001d88f0 JMP 0x0019b7f3 LAB_0019b931: LEA RDI,[RBP + -0x160] MOV ESI,0x1 CALL 0x001d8570 LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x160] CALL 0x001d8d60 CMP EAX,0x0 JNZ 0x0019b966 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d8540 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0019b9a2 LAB_0019b966: MOVZX EAX,byte ptr [RBP + -0xc0] AND EAX,0x80 CMP EAX,0x0 JZ 0x0019b98a MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xc0] MOV RDI,RSI CALL 0x001d88f0 LAB_0019b98a: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xc0] CALL 0x001d8ac0 MOV byte ptr [RBP + -0x1],0x1 LAB_0019b9a2: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x160 POP RBP RET
int1 uint256_mod_inverse(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int1 local_168 [32]; int1 local_148 [32]; int1 local_128 [32]; int1 local_108 [32]; int1 local_e8 [32]; byte local_c8 [32]; int1 local_a8 [32]; int1 local_88 [32]; int1 local_68 [32]; int1 local_48 [32]; int8 local_28; int8 local_20; int8 local_18; int1 local_9; local_28 = param_3; local_20 = param_2; local_18 = param_1; iVar1 = intx_is_zero(param_2); if (iVar1 == 0) { intx_init(local_48); intx_init(local_68); intx_init(local_88); intx_init(local_a8); intx_init(local_c8); intx_init(local_e8); intx_init(local_108); intx_init(local_128); intx_init(local_148); intx_add(local_48,local_28,0); intx_add(local_68,local_20,0); intx_init_value(local_88,1); intx_init(local_a8); intx_init(local_c8); intx_init_value(local_e8,1); while( true ) { iVar1 = intx_is_zero(local_68); if (iVar1 != 0) break; intx_div(local_108,local_48,local_68); intx_add(local_128,local_68,0); intx_mul(local_148,local_108,local_68); intx_sub(local_48,local_48,local_148); intx_add(local_68,local_128,0); intx_add(local_128,local_a8,0); intx_mul(local_148,local_108,local_a8); intx_sub(local_88,local_88,local_148); intx_add(local_a8,local_128,0); intx_add(local_128,local_e8,0); intx_mul(local_148,local_108,local_e8); intx_sub(local_c8,local_c8,local_148); intx_add(local_e8,local_128,0); } intx_init_value(local_168,1); iVar1 = intx_eq(local_48,local_168); if (iVar1 == 0) { intx_init(local_18); local_9 = 0; } else { if ((local_c8[0] & 0x80) != 0) { intx_add(local_c8,local_c8,local_28); } intx_mod(local_18,local_c8,local_28); local_9 = 1; } } else { intx_init(local_18); local_9 = 0; } return local_9; }
55,389
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x8932b leaq 0x1d84c1(%rip), %rax # 0x2617d8 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x2a030 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 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_8932B lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_8932B: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal_0(long long a1) { if ( *(_QWORD *)(a1 + 48) ) (*((void ( **)(_QWORD))PSI_server + 46))(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],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 0x0018932b LEA RAX,[0x3617d8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_0018932b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a030 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
55,390
my_strnncollsp_nchars_generic
eloqsql/strings/ctype.c
int my_strnncollsp_nchars_generic(CHARSET_INFO *cs, const uchar *str1, size_t len1, const uchar *str2, size_t len2, size_t nchars) { int error; len1= my_well_formed_length(cs, (const char *) str1, (const char *) str1 + len1, nchars, &error); len2= my_well_formed_length(cs, (const char *) str2, (const char *) str2 + len2, nchars, &error); DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0); return cs->coll->strnncollsp(cs, str1, len1, str2, len2); }
O3
c
my_strnncollsp_nchars_generic: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, -0x30(%rbp) movq %r8, %r13 movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 addq %rsi, %rdx movq 0xb8(%rdi), %rax leaq -0x40(%rbp), %r12 movq %r9, %rcx movq %r12, %r8 callq *0xc8(%rax) movq (%r12), %r12 subq %r14, %r12 addq %rbx, %r13 movq 0xb8(%r15), %rax leaq -0x40(%rbp), %r8 movq %r15, %rdi movq %rbx, %rsi movq %r13, %rdx movq -0x30(%rbp), %rcx movq %r8, %r13 callq *0xc8(%rax) movq (%r13), %r8 subq %rbx, %r8 movq 0xc0(%r15), %rax movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %rbx, %rcx callq *0x10(%rax) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnncollsp_nchars_generic: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], r9 mov r13, r8 mov rbx, rcx mov r14, rsi mov r15, rdi add rdx, rsi mov rax, [rdi+0B8h] lea r12, [rbp+var_40] mov rcx, r9 mov r8, r12 call qword ptr [rax+0C8h] mov r12, [r12] sub r12, r14 add r13, rbx mov rax, [r15+0B8h] lea r8, [rbp+var_40] mov rdi, r15 mov rsi, rbx mov rdx, r13 mov rcx, [rbp+var_30] mov r13, r8 call qword ptr [rax+0C8h] mov r8, [r13+0] sub r8, rbx mov rax, [r15+0C0h] mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, rbx call qword ptr [rax+10h] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnncollsp_nchars_generic( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long v8; // r12 long long v10; // [rsp+0h] [rbp-40h] BYREF long long v11; // [rsp+10h] [rbp-30h] v11 = a6; (*(void ( **)(long long, long long, long long, long long, long long *))(*(_QWORD *)(a1 + 184) + 200LL))( a1, a2, a2 + a3, a6, &v10); v8 = v10 - a2; (*(void ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 200LL))(a1, a4, a4 + a5, v11); return (*(long long ( **)(long long, long long, long long, long long, long long))(*(_QWORD *)(a1 + 192) + 16LL))( a1, a2, v8, a4, v10 - a4); }
my_strnncollsp_nchars_generic: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],R9 MOV R13,R8 MOV RBX,RCX MOV R14,RSI MOV R15,RDI ADD RDX,RSI MOV RAX,qword ptr [RDI + 0xb8] LEA R12,[RBP + -0x40] MOV RCX,R9 MOV R8,R12 CALL qword ptr [RAX + 0xc8] MOV R12,qword ptr [R12] SUB R12,R14 ADD R13,RBX MOV RAX,qword ptr [R15 + 0xb8] LEA R8,[RBP + -0x40] MOV RDI,R15 MOV RSI,RBX MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x30] MOV R13,R8 CALL qword ptr [RAX + 0xc8] MOV R8,qword ptr [R13] SUB R8,RBX MOV RAX,qword ptr [R15 + 0xc0] MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,RBX CALL qword ptr [RAX + 0x10] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnncollsp_nchars_generic (long param_1,long param_2,long param_3,long param_4,long param_5,int8 param_6) { long lVar1; long local_48 [2]; int8 local_38; local_38 = param_6; (**(code **)(*(long *)(param_1 + 0xb8) + 200))(param_1,param_2,param_3 + param_2,param_6,local_48) ; lVar1 = local_48[0] - param_2; (**(code **)(*(long *)(param_1 + 0xb8) + 200))(param_1,param_4,param_5 + param_4,local_38); (**(code **)(*(long *)(param_1 + 0xc0) + 0x10)) (param_1,param_2,lVar1,param_4,local_48[0] - param_4); return; }
55,391
find_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool find_head(MARIA_HA *info, uint length, uint position) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; MARIA_BITMAP_BLOCK *block; /* There is always place for the head block in bitmap_blocks as these are preallocated at _ma_init_block_record(). */ block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *); if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER) { if (bitmap->page != info->s->last_insert_bitmap && _ma_change_bitmap_page(info, bitmap, info->s->last_insert_bitmap)) return 1; /* Don't allocate any blocks from earlier pages */ info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap; } /* We need to have DIRENTRY_SIZE here to take into account that we may need an extra directory entry for the row */ while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block)) if (move_to_next_bitmap(info, bitmap)) return 1; return 0; }
O0
c
find_head: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x18(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x428(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x47d8e movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0xc30(%rcx), %rax je 0x47d72 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xc30(%rax), %rdx callq 0x48320 movsbl %al, %eax cmpl $0x0, %eax je 0x47d72 movb $0x1, -0x1(%rbp) jmp 0x47dc4 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xc30(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0xd0(%rax) jmp 0x47d90 movq -0x20(%rbp), %rdi movl -0x14(%rbp), %esi addl $0x4, %esi movq -0x28(%rbp), %rdx callq 0x49880 cmpb $0x0, %al je 0x47dc0 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x49bc0 cmpb $0x0, %al je 0x47dbe movb $0x1, -0x1(%rbp) jmp 0x47dc4 jmp 0x47d90 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
find_head: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov ecx, [rbp+var_18] imul rcx, 18h add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+428h] and eax, 2 cmp eax, 0 jz short loc_47D8E mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+0C30h] jz short loc_47D72 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rax+0C30h] call _ma_change_bitmap_page movsx eax, al cmp eax, 0 jz short loc_47D72 mov [rbp+var_1], 1 jmp short loc_47DC4 loc_47D72: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rax+0C30h] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+0D0h], rcx loc_47D8E: jmp short $+2 loc_47D90: mov rdi, [rbp+var_20] mov esi, [rbp+var_14] add esi, 4 mov rdx, [rbp+var_28] call allocate_head cmp al, 0 jz short loc_47DC0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call move_to_next_bitmap cmp al, 0 jz short loc_47DBE mov [rbp+var_1], 1 jmp short loc_47DC4 loc_47DBE: jmp short loc_47D90 loc_47DC0: mov [rbp+var_1], 0 loc_47DC4: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char find_head(_QWORD *a1, int a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v5 = *a1 + 2576LL; v4 = 24LL * a3 + a1[88]; if ( (*(_DWORD *)(*a1 + 1064LL) & 2) != 0 ) { if ( *(_QWORD *)(*a1 + 2592LL) == *(_QWORD *)(*a1 + 3120LL) || !(unsigned __int8)ma_change_bitmap_page(a1, v5, *(_QWORD *)(*a1 + 3120LL)) ) { *(_QWORD *)(*a1 + 208LL) = *(_QWORD *)(*a1 + 3120LL); goto LABEL_6; } return 1; } else { LABEL_6: while ( (unsigned __int8)allocate_head(v5, (unsigned int)(a2 + 4), v4) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v5) ) return 1; } return 0; } }
find_head: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x18] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x428] AND EAX,0x2 CMP EAX,0x0 JZ 0x00147d8e MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0xc30] JZ 0x00147d72 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0xc30] CALL 0x00148320 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00147d72 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00147dc4 LAB_00147d72: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xd0],RCX LAB_00147d8e: JMP 0x00147d90 LAB_00147d90: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x14] ADD ESI,0x4 MOV RDX,qword ptr [RBP + -0x28] CALL 0x00149880 CMP AL,0x0 JZ 0x00147dc0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00149bc0 CMP AL,0x0 JZ 0x00147dbe MOV byte ptr [RBP + -0x1],0x1 JMP 0x00147dc4 LAB_00147dbe: JMP 0x00147d90 LAB_00147dc0: MOV byte ptr [RBP + -0x1],0x0 LAB_00147dc4: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 find_head(long *param_1,int param_2,uint param_3) { long lVar1; char cVar2; long lVar3; lVar3 = *param_1 + 0xa10; lVar1 = param_1[0x58]; if ((*(uint *)(*param_1 + 0x428) & 2) != 0) { if ((*(long *)(*param_1 + 0xa20) != *(long *)(*param_1 + 0xc30)) && (cVar2 = _ma_change_bitmap_page(param_1,lVar3,*(int8 *)(*param_1 + 0xc30)), cVar2 != '\0')) { return 1; } *(int8 *)(*param_1 + 0xd0) = *(int8 *)(*param_1 + 0xc30); } do { cVar2 = allocate_head(lVar3,param_2 + 4,lVar1 + (ulong)param_3 * 0x18); if (cVar2 == '\0') { return 0; } cVar2 = move_to_next_bitmap(param_1,lVar3); } while (cVar2 == '\0'); return 1; }
55,392
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::__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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O3
cpp
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::__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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, 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 $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) leaq 0x9375e(%rip), %rsi # 0x11cba9 leaq 0x93764(%rip), %rdx # 0x11cbb6 callq 0x28f28 movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x894de leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) addq $0xf, %rsi leaq 0x8(%rsp), %rdi callq 0x21f70 leaq 0x9372c(%rip), %rsi # 0x11cbb7 leaq 0x8(%rsp), %rdi callq 0x21c70 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x21590 leaq 0x8(%rsp), %rdi movl $0x20, %esi callq 0x225e0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21590 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x894de movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 leaq 0x936e1(%rip), %rsi # 0x11cbc6 movq %rbx, %rdi callq 0x21c70 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x89581 movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x8936a leaq 0x2f(%rsp), %r8 movb $0x27, (%r8) leaq 0x936a2(%rip), %rdx # 0x11cbc9 leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x7e87a movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21590 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89568 movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x895fb movq 0x48(%rsp), %rsi jmp 0x895f3 callq 0x8ea2a movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x21710 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x21f70 leaq 0x9361d(%rip), %rsi # 0x11cbd8 leaq 0x8(%rsp), %rdi callq 0x21c70 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x21c70 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21590 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x895fb movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 testl %ebp, %ebp je 0x8967b movl %ebp, %edi callq 0x8ea2a movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x21710 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x21f70 leaq 0x935a9(%rip), %rsi # 0x11cbe4 leaq 0x8(%rsp), %rdi callq 0x21c70 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x21c70 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21590 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x8967b movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x896d4 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x896b2 movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 jmp 0x896b2 movq %rax, %r14 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x896fd movq 0x48(%rsp), %rsi jmp 0x896f5 jmp 0x896cd jmp 0x896d4 jmp 0x896e3 movq %rax, %r14 jmp 0x896fd jmp 0x896d4 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi jne 0x896f0 jmp 0x896fd movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x896fd movq 0x18(%rsp), %rsi incq %rsi callq 0x21190 movq (%rbx), %rdi cmpq %r12, %rdi je 0x89711 movq (%r12), %rsi incq %rsi callq 0x21190 movq %r14, %rdi callq 0x21c20 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 lea rsi, aSyntaxError; "syntax error " lea rdx, aSyntaxError+0Dh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [r15+8] test rsi, rsi jz short loc_894DE lea r13, [rsp+88h+var_70] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 add rsi, 0Fh lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rdi, [rsp+88h+var_80] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r13 jz short loc_894DE mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_894DE: lea rsi, asc_11CBC6; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz loc_89581 mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_50] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; 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_token_string(void) lea r8, [rsp+88h+var_59] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_58] lea rcx, [rsp+88h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89568 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89568: lea rax, [rsp+88h+var_40] mov rdi, [rax-10h] cmp rdi, rax jz loc_895FB mov rsi, [rsp+88h+var_40] jmp short loc_895F3 loc_89581: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_895FB mov rsi, [rsp+88h+var_70] loc_895F3: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_895FB: test ebp, ebp jz short loc_8967B mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aExpected; "; expected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_8967B mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8967B: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_896D4 mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_896B2 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_896B2 mov r14, rax loc_896B2: lea rax, [rsp+arg_40] mov rdi, [rax-10h] cmp rdi, rax jz short loc_896FD mov rsi, [rsp+arg_40] jmp short loc_896F5 jmp short loc_896CD jmp short loc_896D4 jmp short loc_896E3 loc_896CD: mov r14, rax jmp short loc_896FD jmp short $+2 loc_896D4: mov r14, rax mov rdi, [rsp+arg_0] cmp rdi, r15 jnz short loc_896F0 jmp short loc_896FD loc_896E3: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_896FD loc_896F0: mov rsi, [rsp+arg_10] loc_896F5: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_896FD: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_89711 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89711: mov rdi, r14 call __Unwind_Resume
_QWORD * 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>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, _QWORD *a4) { long long v8; // rsi void *v9; // rdi long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // r14 long long v14; // rax void *v16; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] _QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF char v19; // [rsp+2Fh] [rbp-59h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF _QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF long long v22; // [rsp+48h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)""); v8 = a4[1]; if ( v8 ) { v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; std::string::reserve(&v16, v8 + 15); std::string::append(&v16, "while parsing "); std::string::append(&v16, *a4, a4[1]); std::string::push_back(&v16, 32LL); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v20 = *(_QWORD *)(a2 + 152); 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_token_string( (long long)v21, a2 + 40); v19 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( (long long)&v16, &v20, (long long)"; last read: '", v21, &v19); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); v9 = (void *)v21[0]; if ( (long long *)v21[0] != &v22 ) { v10 = v22; LABEL_11: operator delete(v9, v10 + 1); } } else { v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)(); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v12 = strlen(v11); std::string::reserve(&v16, v12 + 11); std::string::append(&v16, "unexpected "); std::string::append(&v16, v11); std::string::append(a1, v16, v17); v9 = v16; if ( v16 != v18 ) { v10 = v18[0]; goto LABEL_11; } } if ( a3 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v14 = strlen(v13); std::string::reserve(&v16, v14 + 11); std::string::append(&v16, "; expected "); std::string::append(&v16, v13); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 LEA RSI,[0x21cba9] LEA RDX,[0x21cbb6] CALL 0x00128f28 MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x001894de LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 ADD RSI,0xf LAB_0018947a: LEA RDI,[RSP + 0x8] CALL 0x00121f70 LEA RSI,[0x21cbb7] LEA RDI,[RSP + 0x8] CALL 0x00121c70 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x00121590 LEA RDI,[RSP + 0x8] MOV ESI,0x20 CALL 0x001225e0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001894bf: MOV RDI,RBX CALL 0x00121590 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x001894de MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121190 LAB_001894de: LEA RSI,[0x21cbc6] MOV RDI,RBX CALL 0x00121c70 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x00189581 MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_0018950a: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x0018936a LEA R8,[RSP + 0x2f] MOV byte ptr [R8],0x27 LAB_00189520: LEA RDX,[0x21cbc9] LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x0017e87a MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00189545: MOV RDI,RBX CALL 0x00121590 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00189568 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121190 LAB_00189568: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001895fb MOV RSI,qword ptr [RSP + 0x48] JMP 0x001895f3 LAB_00189581: CALL 0x0018ea2a MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00121710 LEA RSI,[RAX + 0xb] LAB_001895aa: LEA RDI,[RSP + 0x8] CALL 0x00121f70 LEA RSI,[0x21cbd8] LEA RDI,[RSP + 0x8] CALL 0x00121c70 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00121c70 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001895dc: MOV RDI,RBX CALL 0x00121590 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x001895fb MOV RSI,qword ptr [RSP + 0x18] LAB_001895f3: INC RSI CALL 0x00121190 LAB_001895fb: TEST EBP,EBP JZ 0x0018967b MOV EDI,EBP CALL 0x0018ea2a MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00121710 LEA RSI,[RAX + 0xb] LAB_0018962a: LEA RDI,[RSP + 0x8] CALL 0x00121f70 LEA RSI,[0x21cbe4] LEA RDI,[RSP + 0x8] CALL 0x00121c70 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00121c70 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0018965c: MOV RDI,RBX CALL 0x00121590 LAB_00189664: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0018967b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121190 LAB_0018967b: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* 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::__cxx11::string, 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 > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */ long * 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::__cxx11::string,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>>> ::exception_message(long *param_1,long param_2,int param_3,ulong *param_4) { char *pcVar1; long *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int1 local_59; int8 local_58; long *local_50 [2]; long local_40 [2]; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ",""); if (param_4[1] != 0) { local_78 = 0; local_70 = 0; /* try { // try from 0018947a to 001894b4 has its CatchHandler @ 001896e3 */ local_80 = (long *)&local_70; std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80,*param_4); std::__cxx11::string::push_back((char)&local_80); /* try { // try from 001894bf to 001894c6 has its CatchHandler @ 001896cb */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } /* try { // try from 001894de to 001894ec has its CatchHandler @ 001896cd */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_58 = *(int8 *)(param_2 + 0x98); /* try { // try from 0018950a to 00189516 has its CatchHandler @ 001896c7 */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_59 = 0x27; /* try { // try from 00189520 to 0018953a has its CatchHandler @ 001896af */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50); /* try { // try from 00189545 to 0018954c has its CatchHandler @ 0018968f */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_50[0] == local_40) goto LAB_001895fb; } else { pcVar1 = (char *)lexer_base<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>> ::token_type_name(); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 001895aa to 001895d1 has its CatchHandler @ 001896d2 */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 001895dc to 001895e3 has its CatchHandler @ 0018968d */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 == (long *)&local_70) goto LAB_001895fb; local_40[0] = CONCAT71(uStack_6f,local_70); local_50[0] = local_80; } operator_delete(local_50[0],local_40[0] + 1); LAB_001895fb: if (param_3 != 0) { pcVar1 = (char *)lexer_base<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>> ::token_type_name(param_3); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 0018962a to 00189651 has its CatchHandler @ 001896d4 */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 0018965c to 00189663 has its CatchHandler @ 001896c9 */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } return param_1; }
55,393
sp_get_linestring_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_points; n_points = uint4korr(*wkb); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } return 0; }
O0
c
sp_get_linestring_mbr: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movb %al, -0x1d(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x2c(%rbp) jbe 0xd7fa1 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x1d(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0xd8070 cmpl $0x0, %eax je 0xd7f94 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xd7fa8 jmp 0xd7f96 movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xd7f66 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
sp_get_linestring_mbr_0: push rbp mov rbp, rsp sub rsp, 30h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_1D], al mov [rbp+var_28], r8 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_D7F66: cmp [rbp+var_2C], 0 jbe short loc_D7FA1 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_1D] mov r8, [rbp+var_28] movzx ecx, al call sp_add_point_to_mbr_0 cmp eax, 0 jz short loc_D7F94 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_D7FA8 loc_D7F94: jmp short $+2 loc_D7F96: mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_D7F66 loc_D7FA1: mov [rbp+var_4], 0 loc_D7FA8: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long sp_get_linestring_mbr_0(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5) { int i; // [rsp+4h] [rbp-2Ch] for ( i = *(*a1)++; i; --i ) { if ( (unsigned int)sp_add_point_to_mbr_0(a1, a2, a3, a4, a5) ) return (unsigned int)-1; } return 0; }
sp_get_linestring_mbr: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV byte ptr [RBP + -0x1d],AL MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_001d7f66: CMP dword ptr [RBP + -0x2c],0x0 JBE 0x001d7fa1 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x1d] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x001d8070 CMP EAX,0x0 JZ 0x001d7f94 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001d7fa8 LAB_001d7f94: JMP 0x001d7f96 LAB_001d7f96: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001d7f66 LAB_001d7fa1: MOV dword ptr [RBP + -0x4],0x0 LAB_001d7fa8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 sp_get_linestring_mbr (long *param_1,int8 param_2,int4 param_3,int1 param_4,int8 param_5 ) { int iVar1; int local_34; local_34 = *(int *)*param_1; *param_1 = *param_1 + 4; while( true ) { if (local_34 == 0) { return 0; } iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5); if (iVar1 != 0) break; local_34 = local_34 + -1; } return 0xffffffff; }
55,394
ImPlot3D::PixelsToNDCRay(ImVec2 const&)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
ImPlot3DRay PixelsToNDCRay(const ImVec2& pix) { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"); ImPlot3DPlot& plot = *gp.CurrentPlot; SetupLock(); // Calculate zoom factor and plot center float zoom = plot.GetBoxZoom(); ImVec2 center = plot.PlotRect.GetCenter(); // Undo screen transformations to get back to NDC space float x = (pix.x - center.x) / zoom; float y = -(pix.y - center.y) / zoom; // Invert y-axis // Define near and far points in NDC space along the z-axis ImPlot3DPoint ndc_near = plot.Rotation.Inverse() * ImPlot3DPoint(x, y, -10.0f); ImPlot3DPoint ndc_far = plot.Rotation.Inverse() * ImPlot3DPoint(x, y, 10.0f); // Create the ray in NDC space ImPlot3DRay ndc_ray; ndc_ray.Origin = ndc_near; ndc_ray.Direction = (ndc_far - ndc_near).Normalized(); return ndc_ray; }
O0
cpp
ImPlot3D::PixelsToNDCRay(ImVec2 const&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x18(%rsp) movq %rdi, 0x20(%rsp) movq %rsi, 0x100(%rsp) movq 0x5bd7f8(%rip), %rax # 0x68f638 movq %rax, 0xf8(%rsp) movq 0xf8(%rsp), %rax cmpq $0x0, 0x28(%rax) jne 0xd1e6b leaq 0x500973(%rip), %rdi # 0x5d27d1 callq 0x4f7220 testb $0x1, %al jne 0xd1e69 jmp 0xd1e6b jmp 0xd1e6b jmp 0xd1e6d movq 0xf8(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0xf0(%rsp) callq 0xd09c0 movq 0xf0(%rsp), %rdi callq 0xd2870 movss %xmm0, 0xec(%rsp) movq 0xf0(%rsp), %rdi addq $0x44, %rdi callq 0xd8930 movlpd %xmm0, 0xe4(%rsp) movq 0x100(%rsp), %rax movss (%rax), %xmm0 movss 0xe4(%rsp), %xmm1 subss %xmm1, %xmm0 movss 0xec(%rsp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, 0xe0(%rsp) movq 0x100(%rsp), %rax movss 0x4(%rax), %xmm0 movss 0xe8(%rsp), %xmm1 subss %xmm1, %xmm0 movaps 0x4ffb4a(%rip), %xmm1 # 0x5d1a50 pxor %xmm1, %xmm0 movss 0xec(%rsp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, 0xdc(%rsp) movq 0xf0(%rsp), %rdi addq $0x64, %rdi callq 0xd28c0 movlpd %xmm0, 0xc0(%rsp) movlpd %xmm1, 0xc8(%rsp) movss 0xe0(%rsp), %xmm0 movss 0xdc(%rsp), %xmm1 leaq 0xb4(%rsp), %rdi movq %rdi, 0x8(%rsp) movss 0x4ffa6e(%rip), %xmm2 # 0x5d19d8 callq 0xd8c50 movq 0x8(%rsp), %rsi leaq 0xc0(%rsp), %rdi callq 0xcd850 movss %xmm1, 0xa8(%rsp) movlpd %xmm0, 0xa0(%rsp) movl 0xa8(%rsp), %eax movl %eax, 0xd8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xf0(%rsp), %rdi addq $0x64, %rdi callq 0xd28c0 movlpd %xmm0, 0x80(%rsp) movlpd %xmm1, 0x88(%rsp) movss 0xe0(%rsp), %xmm0 movss 0xdc(%rsp), %xmm1 leaq 0x74(%rsp), %rdi movq %rdi, 0x10(%rsp) movss 0x4ff984(%rip), %xmm2 # 0x5d197c callq 0xd8c50 movq 0x10(%rsp), %rsi leaq 0x80(%rsp), %rdi callq 0xcd850 movq 0x18(%rsp), %rdi movss %xmm1, 0x68(%rsp) movlpd %xmm0, 0x60(%rsp) movl 0x68(%rsp), %eax movl %eax, 0x98(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x90(%rsp) callq 0xd99f0 movq 0x18(%rsp), %rax movl 0xd8(%rsp), %ecx movl %ecx, 0x8(%rax) movq 0xd0(%rsp), %rcx movq %rcx, (%rax) leaq 0x90(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0xcbba0 movss %xmm1, 0x40(%rsp) movlpd %xmm0, 0x38(%rsp) movl 0x40(%rsp), %eax movl %eax, 0x50(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x48(%rsp), %rdi callq 0xcd480 movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movss %xmm1, 0x30(%rsp) movlpd %xmm0, 0x28(%rsp) movq 0x28(%rsp), %rdx movq %rdx, 0x54(%rsp) movl 0x30(%rsp), %edx movl %edx, 0x5c(%rsp) movq 0x54(%rsp), %rdx movq %rdx, 0xc(%rcx) movl 0x5c(%rsp), %edx movl %edx, 0x14(%rcx) addq $0x108, %rsp # imm = 0x108 retq nopw %cs:(%rax,%rax)
_ZN8ImPlot3D14PixelsToNDCRayERK6ImVec2: sub rsp, 108h mov [rsp+108h+var_F0], rdi mov [rsp+108h+var_E8], rdi mov [rsp+108h+var_8], rsi mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_10] cmp qword ptr [rax+28h], 0 jnz short loc_D1E6B lea rdi, aPixelstondcray; "PixelsToNDCRay() needs to be called bet"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) test al, 1 jnz short loc_D1E69 jmp short loc_D1E6B loc_D1E69: jmp short $+2 loc_D1E6B: jmp short $+2 loc_D1E6D: mov rax, [rsp+108h+var_10] mov rax, [rax+28h] mov [rsp+108h+var_18], rax call _ZN8ImPlot3D9SetupLockEv; ImPlot3D::SetupLock(void) mov rdi, [rsp+108h+var_18]; this call _ZNK12ImPlot3DPlot10GetBoxZoomEv; ImPlot3DPlot::GetBoxZoom(void) movss [rsp+108h+var_1C], xmm0 mov rdi, [rsp+108h+var_18] add rdi, 44h ; 'D'; this call _ZNK6ImRect9GetCenterEv; ImRect::GetCenter(void) movlpd [rsp+108h+var_24], xmm0 mov rax, [rsp+108h+var_8] movss xmm0, dword ptr [rax] movss xmm1, dword ptr [rsp+108h+var_24] subss xmm0, xmm1 movss xmm1, [rsp+108h+var_1C] divss xmm0, xmm1 movss [rsp+108h+var_28], xmm0 mov rax, [rsp+108h+var_8] movss xmm0, dword ptr [rax+4] movss xmm1, dword ptr [rsp+108h+var_24+4] subss xmm0, xmm1 movaps xmm1, cs:xmmword_5D1A50 pxor xmm0, xmm1 movss xmm1, [rsp+108h+var_1C] divss xmm0, xmm1 movss [rsp+108h+var_2C], xmm0 mov rdi, [rsp+108h+var_18] add rdi, 64h ; 'd'; this call _ZNK12ImPlot3DQuat7InverseEv; ImPlot3DQuat::Inverse(void) movlpd [rsp+108h+var_48], xmm0 movlpd [rsp+108h+var_40], xmm1 movss xmm0, [rsp+108h+var_28]; float movss xmm1, [rsp+108h+var_2C]; float lea rdi, [rsp+108h+var_54]; this mov [rsp+108h+var_100], rdi movss xmm2, cs:flt_5D19D8; float call _ZN13ImPlot3DPointC2Efff; ImPlot3DPoint::ImPlot3DPoint(float,float,float) mov rsi, [rsp+108h+var_100] lea rdi, [rsp+108h+var_48] call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) movss [rsp+108h+var_60], xmm1 movlpd [rsp+108h+var_68], xmm0 mov eax, [rsp+108h+var_60] mov [rsp+108h+var_30], eax mov rax, [rsp+108h+var_68] mov [rsp+108h+var_38], rax mov rdi, [rsp+108h+var_18] add rdi, 64h ; 'd'; this call _ZNK12ImPlot3DQuat7InverseEv; ImPlot3DQuat::Inverse(void) movlpd [rsp+108h+var_88], xmm0 movlpd [rsp+108h+var_80], xmm1 movss xmm0, [rsp+108h+var_28]; float movss xmm1, [rsp+108h+var_2C]; float lea rdi, [rsp+108h+var_94]; this mov [rsp+108h+var_F8], rdi movss xmm2, cs:flt_5D197C; float call _ZN13ImPlot3DPointC2Efff; ImPlot3DPoint::ImPlot3DPoint(float,float,float) mov rsi, [rsp+108h+var_F8] lea rdi, [rsp+108h+var_88] call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) mov rdi, [rsp+108h+var_F0]; this movss [rsp+108h+var_A0], xmm1 movlpd [rsp+108h+var_A8], xmm0 mov eax, [rsp+108h+var_A0] mov [rsp+108h+var_70], eax mov rax, [rsp+108h+var_A8] mov [rsp+108h+var_78], rax call _ZN11ImPlot3DRayC2Ev; ImPlot3DRay::ImPlot3DRay(void) mov rax, [rsp+108h+var_F0] mov ecx, [rsp+108h+var_30] mov [rax+8], ecx mov rcx, [rsp+108h+var_38] mov [rax], rcx lea rdi, [rsp+108h+var_78] lea rsi, [rsp+108h+var_38] call _ZNK13ImPlot3DPointmiERKS_; ImPlot3DPoint::operator-(ImPlot3DPoint const&) movss [rsp+108h+var_C8], xmm1 movlpd [rsp+108h+var_D0], xmm0 mov eax, [rsp+108h+var_C8] mov [rsp+108h+var_B8], eax mov rax, [rsp+108h+var_D0] mov [rsp+108h+var_C0], rax lea rdi, [rsp+108h+var_C0]; this call _ZNK13ImPlot3DPoint10NormalizedEv; ImPlot3DPoint::Normalized(void) mov rcx, [rsp+108h+var_F0] mov rax, [rsp+108h+var_E8] movss [rsp+108h+var_D8], xmm1 movlpd [rsp+108h+var_E0], xmm0 mov rdx, [rsp+108h+var_E0] mov [rsp+108h+var_B4], rdx mov edx, [rsp+108h+var_D8] mov [rsp+108h+var_AC], edx mov rdx, [rsp+108h+var_B4] mov [rcx+0Ch], rdx mov edx, [rsp+108h+var_AC] mov [rcx+14h], edx add rsp, 108h retn
ImPlot3D * ImPlot3D::PixelsToNDCRay( ImPlot3D *this, const ImVec2 *a2, long long a3, bool a4, double a5, double a6) { __m128i v6; // xmm0 long long v7; // xmm1_8 ImPlot3D *result; // rax ImPlot3DRay *v9; // [rsp+18h] [rbp-F0h] ImPlot3D *v10; // [rsp+20h] [rbp-E8h] double v11; // [rsp+48h] [rbp-C0h] BYREF int v12; // [rsp+50h] [rbp-B8h] int v13; // [rsp+5Ch] [rbp-ACh] long long v14; // [rsp+60h] [rbp-A8h] int v15; // [rsp+68h] [rbp-A0h] _BYTE v16[12]; // [rsp+74h] [rbp-94h] BYREF _QWORD v17[2]; // [rsp+80h] [rbp-88h] BYREF long long v18; // [rsp+90h] [rbp-78h] BYREF int v19; // [rsp+98h] [rbp-70h] long long v20; // [rsp+A0h] [rbp-68h] int v21; // [rsp+A8h] [rbp-60h] _BYTE v22[12]; // [rsp+B4h] [rbp-54h] BYREF _QWORD v23[2]; // [rsp+C0h] [rbp-48h] BYREF long long v24; // [rsp+D0h] [rbp-38h] BYREF int v25; // [rsp+D8h] [rbp-30h] float v26; // [rsp+DCh] [rbp-2Ch] float v27; // [rsp+E0h] [rbp-28h] double v28; // [rsp+E4h] [rbp-24h] float v29; // [rsp+ECh] [rbp-1Ch] ImPlot3DPlot *v30; // [rsp+F0h] [rbp-18h] long long v31; // [rsp+F8h] [rbp-10h] const ImVec2 *v32; // [rsp+100h] [rbp-8h] v9 = this; v10 = this; v32 = a2; v31 = ImPlot3D::GImPlot3D; if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) ) { this = (ImPlot3D *)"PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!", (const char *)a2); } v30 = *(ImPlot3DPlot **)(v31 + 40); ImPlot3D::SetupLock(this, (const char *)a2, a5, a6, a3, a4); ImPlot3DPlot::GetBoxZoom(v30); v29 = *(float *)&a5; ImRect::GetCenter((ImPlot3DPlot *)((char *)v30 + 68)); v28 = a5; v27 = (float)(*(float *)v32 - *(float *)&a5) / *(float *)&a5; v6 = (__m128i)*((unsigned int *)v32 + 1); *(float *)v6.m128i_i32 = *(float *)v6.m128i_i32 - *((float *)&v28 + 1); v6.m128i_i64[0] = _mm_xor_si128(v6, (__m128i)xmmword_5D1A50).m128i_u64[0]; *(float *)v6.m128i_i32 = *(float *)v6.m128i_i32 / v29; v26 = *(float *)v6.m128i_i32; ImPlot3DQuat::Inverse((ImPlot3DPlot *)((char *)v30 + 100)); v23[0] = v6.m128i_i64[0]; v23[1] = LODWORD(v29); v6.m128i_i64[0] = LODWORD(v27); v7 = LODWORD(v26); ImPlot3DPoint::ImPlot3DPoint((ImPlot3DPoint *)v22, v27, v26, -10.0); ImPlot3DQuat::operator*((float *)v23, (ImPlot3DPoint *)v22); v21 = v7; v20 = v6.m128i_i64[0]; v25 = v7; v24 = v6.m128i_i64[0]; ImPlot3DQuat::Inverse((ImPlot3DPlot *)((char *)v30 + 100)); v17[0] = v6.m128i_i64[0]; v17[1] = v7; v6.m128i_i64[0] = LODWORD(v27); *(float *)&v7 = v26; ImPlot3DPoint::ImPlot3DPoint((ImPlot3DPoint *)v16, v27, v26, 10.0); ImPlot3DQuat::operator*((float *)v17, (ImPlot3DPoint *)v16); v15 = v7; v14 = v6.m128i_i64[0]; v19 = v7; v18 = v6.m128i_i64[0]; ImPlot3DRay::ImPlot3DRay(v9); *((_DWORD *)v9 + 2) = v25; *(_QWORD *)v9 = v24; v12 = v7; v11 = ImPlot3DPoint::operator-((float *)&v18, (float *)&v24); *(double *)v6.m128i_i64 = ImPlot3DPoint::Normalized((ImPlot3DPoint *)&v11, *(float *)&v11); result = v10; v13 = v7; *(_QWORD *)((char *)v9 + 12) = v6.m128i_i64[0]; *((_DWORD *)v9 + 5) = v13; return result; }
PixelsToNDCRay: SUB RSP,0x108 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x100],RSI MOV RAX,qword ptr [0x0078f638] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0xf8] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x001d1e6b LEA RDI,[0x6d27d1] CALL 0x005f7220 TEST AL,0x1 JNZ 0x001d1e69 JMP 0x001d1e6b LAB_001d1e69: JMP 0x001d1e6b LAB_001d1e6b: JMP 0x001d1e6d LAB_001d1e6d: MOV RAX,qword ptr [RSP + 0xf8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0xf0],RAX CALL 0x001d09c0 MOV RDI,qword ptr [RSP + 0xf0] CALL 0x001d2870 MOVSS dword ptr [RSP + 0xec],XMM0 MOV RDI,qword ptr [RSP + 0xf0] ADD RDI,0x44 CALL 0x001d8930 MOVLPD qword ptr [RSP + 0xe4],XMM0 MOV RAX,qword ptr [RSP + 0x100] MOVSS XMM0,dword ptr [RAX] MOVSS XMM1,dword ptr [RSP + 0xe4] SUBSS XMM0,XMM1 MOVSS XMM1,dword ptr [RSP + 0xec] DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0xe0],XMM0 MOV RAX,qword ptr [RSP + 0x100] MOVSS XMM0,dword ptr [RAX + 0x4] MOVSS XMM1,dword ptr [RSP + 0xe8] SUBSS XMM0,XMM1 MOVAPS XMM1,xmmword ptr [0x006d1a50] PXOR XMM0,XMM1 MOVSS XMM1,dword ptr [RSP + 0xec] DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0xdc],XMM0 MOV RDI,qword ptr [RSP + 0xf0] ADD RDI,0x64 CALL 0x001d28c0 MOVLPD qword ptr [RSP + 0xc0],XMM0 MOVLPD qword ptr [RSP + 0xc8],XMM1 MOVSS XMM0,dword ptr [RSP + 0xe0] MOVSS XMM1,dword ptr [RSP + 0xdc] LEA RDI,[RSP + 0xb4] MOV qword ptr [RSP + 0x8],RDI MOVSS XMM2,dword ptr [0x006d19d8] CALL 0x001d8c50 MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0xc0] CALL 0x001cd850 MOVSS dword ptr [RSP + 0xa8],XMM1 MOVLPD qword ptr [RSP + 0xa0],XMM0 MOV EAX,dword ptr [RSP + 0xa8] MOV dword ptr [RSP + 0xd8],EAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xd0],RAX MOV RDI,qword ptr [RSP + 0xf0] ADD RDI,0x64 CALL 0x001d28c0 MOVLPD qword ptr [RSP + 0x80],XMM0 MOVLPD qword ptr [RSP + 0x88],XMM1 MOVSS XMM0,dword ptr [RSP + 0xe0] MOVSS XMM1,dword ptr [RSP + 0xdc] LEA RDI,[RSP + 0x74] MOV qword ptr [RSP + 0x10],RDI MOVSS XMM2,dword ptr [0x006d197c] CALL 0x001d8c50 MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x80] CALL 0x001cd850 MOV RDI,qword ptr [RSP + 0x18] MOVSS dword ptr [RSP + 0x68],XMM1 MOVLPD qword ptr [RSP + 0x60],XMM0 MOV EAX,dword ptr [RSP + 0x68] MOV dword ptr [RSP + 0x98],EAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x90],RAX CALL 0x001d99f0 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0xd8] MOV dword ptr [RAX + 0x8],ECX MOV RCX,qword ptr [RSP + 0xd0] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0xd0] CALL 0x001cbba0 MOVSS dword ptr [RSP + 0x40],XMM1 MOVLPD qword ptr [RSP + 0x38],XMM0 MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x50],EAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x48] CALL 0x001cd480 MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOVSS dword ptr [RSP + 0x30],XMM1 MOVLPD qword ptr [RSP + 0x28],XMM0 MOV RDX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x54],RDX MOV EDX,dword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x5c],EDX MOV RDX,qword ptr [RSP + 0x54] MOV qword ptr [RCX + 0xc],RDX MOV EDX,dword ptr [RSP + 0x5c] MOV dword ptr [RCX + 0x14],EDX ADD RSP,0x108 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::PixelsToNDCRay(ImVec2 const&) */ ImPlot3D * __thiscall ImPlot3D::PixelsToNDCRay(ImPlot3D *this,ImVec2 *param_1) { int8 uVar1; float fVar2; int4 uVar3; int8 local_c0; float local_b8; int8 local_a8; float local_a0; ImPlot3DPoint local_94 [12]; int8 local_88; int8 local_80; int8 local_78; float local_70; int8 local_68; float local_60; ImPlot3DPoint local_54 [12]; int8 local_48; int8 local_40; int8 local_38; float local_30; float local_2c; float local_28; int8 local_24; float local_1c; ImPlot3DPlot *local_18; long local_10; ImVec2 *local_8; local_10 = GImPlot3D; local_8 = param_1; if (*(long *)(GImPlot3D + 0x28) == 0) { ImGui::ErrorLog("PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"); } local_18 = *(ImPlot3DPlot **)(local_10 + 0x28); SetupLock(); local_1c = (float)ImPlot3DPlot::GetBoxZoom(local_18); uVar1 = ImRect::GetCenter((ImRect *)(local_18 + 0x44)); local_24._0_4_ = (float)uVar1; local_28 = (*(float *)local_8 - (float)local_24) / local_1c; local_24._4_4_ = (float)((ulong)uVar1 >> 0x20); uVar3 = 0; local_2c = (float)((uint)(*(float *)(local_8 + 4) - local_24._4_4_) ^ _DAT_006d1a50) / local_1c; fVar2 = local_1c; local_24 = uVar1; local_48 = ImPlot3DQuat::Inverse((ImPlot3DQuat *)(local_18 + 100)); local_40 = CONCAT44(uVar3,fVar2); uVar3 = 0; fVar2 = local_2c; ImPlot3DPoint::ImPlot3DPoint(local_54,local_28,local_2c,DAT_006d19d8); local_68 = ImPlot3DQuat::operator*((ImPlot3DQuat *)&local_48,local_54); local_60 = fVar2; local_38 = local_68; local_30 = fVar2; local_88 = ImPlot3DQuat::Inverse((ImPlot3DQuat *)(local_18 + 100)); local_80 = CONCAT44(uVar3,fVar2); fVar2 = local_2c; ImPlot3DPoint::ImPlot3DPoint(local_94,local_28,local_2c,DAT_006d197c); local_a8 = ImPlot3DQuat::operator*((ImPlot3DQuat *)&local_88,local_94); local_a0 = fVar2; local_78 = local_a8; local_70 = fVar2; ImPlot3DRay::ImPlot3DRay((ImPlot3DRay *)this); *(float *)(this + 8) = local_30; *(int8 *)this = local_38; local_c0 = ImPlot3DPoint::operator-((ImPlot3DPoint *)&local_78,(ImPlot3DPoint *)&local_38); local_b8 = fVar2; uVar1 = ImPlot3DPoint::Normalized((ImPlot3DPoint *)&local_c0); *(int8 *)(this + 0xc) = uVar1; *(float *)(this + 0x14) = fVar2; return this; }
55,395
my_instr_bin
eloqsql/strings/ctype-bin.c
static uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if ( (*str++) == (*search)) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if ((*i++) != (*j++)) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O0
c
my_instr_bin: pushq %rbp movq %rsp, %rbp movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x3dbbb cmpq $0x0, -0x30(%rbp) jne 0x3da86 cmpl $0x0, 0x10(%rbp) je 0x3da7a movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x38(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0x3dbc2 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax xorl %ecx, %ecx subq -0x30(%rbp), %rcx addq %rcx, %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x3dabd movq -0x40(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x3dbb9 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x40(%rbp) movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl (%rcx), %ecx cmpl %ecx, %eax jne 0x3dbb4 movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x3db36 movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movzbl (%rax), %eax movq -0x68(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x68(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x3db34 jmp 0x3dabb jmp 0x3db00 cmpl $0x0, 0x10(%rbp) jbe 0x3dbab movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subq $0x1, %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x8(%rax) cmpl $0x1, 0x10(%rbp) jbe 0x3dba9 movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %eax addq -0x30(%rbp), %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %ecx movq -0x38(%rbp), %rax subl 0xc(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x14(%rax) jmp 0x3dbab movl $0x2, -0x4(%rbp) jmp 0x3dbc2 jmp 0x3dabd jmp 0x3dbbb movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_instr_bin: push rbp mov rbp, rsp mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] cmp rax, [rbp+var_20] ja loc_3DBBB cmp [rbp+var_30], 0 jnz short loc_3DA86 cmp [rbp+arg_0], 0 jz short loc_3DA7A mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_38] mov dword ptr [rax+4], 0 mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 loc_3DA7A: mov [rbp+var_4], 1 jmp loc_3DBC2 loc_3DA86: mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] xor ecx, ecx sub rcx, [rbp+var_30] add rax, rcx add rax, 1 mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_58], rax loc_3DABB: jmp short $+2 loc_3DABD: mov rax, [rbp+var_40] cmp rax, [rbp+var_50] jz loc_3DBB9 mov rax, [rbp+var_40] mov rcx, rax add rcx, 1 mov [rbp+var_40], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx] cmp eax, ecx jnz loc_3DBB4 mov rax, [rbp+var_40] mov [rbp+var_60], rax mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_68], rax loc_3DB00: mov rax, [rbp+var_68] cmp rax, [rbp+var_58] jz short loc_3DB36 mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_68] mov rdx, rcx add rdx, 1 mov [rbp+var_68], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_3DB34 jmp short loc_3DABB loc_3DB34: jmp short loc_3DB00 loc_3DB36: cmp [rbp+arg_0], 0 jbe short loc_3DBAB mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_40] mov rcx, [rbp+var_18] sub rax, rcx sub rax, 1 mov ecx, eax mov rax, [rbp+var_38] mov [rax+4], ecx mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+8], ecx cmp [rbp+arg_0], 1 jbe short loc_3DBA9 mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+0Ch], ecx mov rax, [rbp+var_38] mov eax, [rax+4] add rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, [rbp+var_38] mov ecx, [rax+10h] mov rax, [rbp+var_38] sub ecx, [rax+0Ch] mov rax, [rbp+var_38] mov [rax+14h], ecx loc_3DBA9: jmp short $+2 loc_3DBAB: mov [rbp+var_4], 2 jmp short loc_3DBC2 loc_3DBB4: jmp loc_3DABD loc_3DBB9: jmp short $+2 loc_3DBBB: mov [rbp+var_4], 0 loc_3DBC2: mov eax, [rbp+var_4] pop rbp retn
long long my_instr_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, _DWORD *a6, unsigned int a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rcx unsigned __int8 *v11; // [rsp+0h] [rbp-68h] unsigned __int8 *v12; // [rsp+8h] [rbp-60h] unsigned __int8 *v13; // [rsp+10h] [rbp-58h] unsigned __int8 *v14; // [rsp+28h] [rbp-40h] if ( a5 > a3 ) return 0; if ( a5 ) { v14 = a2; v13 = &a4[a5]; LABEL_7: while ( v14 != &a2[a3 - a5 + 1] ) { v7 = v14++; if ( *v7 == *a4 ) { v12 = v14; v11 = a4 + 1; while ( v11 != v13 ) { v8 = v12++; v9 = v11++; if ( *v8 != *v9 ) goto LABEL_7; } if ( a7 ) { *a6 = 0; a6[1] = (_DWORD)v14 - (_DWORD)a2 - 1; a6[2] = a6[1]; if ( a7 > 1 ) { a6[3] = a6[1]; a6[4] = a5 + a6[1]; a6[5] = a6[4] - a6[3]; } } return 2; } } return 0; } if ( a7 ) { *a6 = 0; a6[1] = 0; a6[2] = 0; } return 1; }
my_instr_bin: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RBP + 0x10] 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 qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JA 0x0013dbbb CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0013da86 CMP dword ptr [RBP + 0x10],0x0 JZ 0x0013da7a MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 LAB_0013da7a: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013dbc2 LAB_0013da86: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x30] ADD RAX,RCX ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX LAB_0013dabb: JMP 0x0013dabd LAB_0013dabd: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x50] JZ 0x0013dbb9 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x40],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x0013dbb4 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x68],RAX LAB_0013db00: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x58] JZ 0x0013db36 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x68],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x0013db34 JMP 0x0013dabb LAB_0013db34: JMP 0x0013db00 LAB_0013db36: CMP dword ptr [RBP + 0x10],0x0 JBE 0x0013dbab MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB RAX,0x1 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],ECX CMP dword ptr [RBP + 0x10],0x1 JBE 0x0013dba9 MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x4] ADD RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x38] SUB ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x14],ECX LAB_0013dba9: JMP 0x0013dbab LAB_0013dbab: MOV dword ptr [RBP + -0x4],0x2 JMP 0x0013dbc2 LAB_0013dbb4: JMP 0x0013dabd LAB_0013dbb9: JMP 0x0013dbbb LAB_0013dbbb: MOV dword ptr [RBP + -0x4],0x0 LAB_0013dbc2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5, int4 *param_6,uint param_7) { char cVar1; char cVar2; char *pcVar3; char *local_70; char *local_68; char *local_48; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 != 0) { *param_6 = 0; param_6[1] = 0; param_6[2] = 0; } return 1; } local_48 = param_2; while (local_48 != param_2 + (param_3 - param_5) + 1) { pcVar3 = local_48 + 1; cVar1 = *local_48; local_48 = pcVar3; if (cVar1 == *param_4) { local_70 = param_4 + 1; local_68 = pcVar3; do { if (local_70 == param_4 + param_5) { if (param_7 != 0) { *param_6 = 0; param_6[1] = ((int)pcVar3 - (int)param_2) + -1; param_6[2] = param_6[1]; if (1 < param_7) { param_6[3] = param_6[1]; param_6[4] = param_6[1] + (int)param_5; param_6[5] = param_6[4] - param_6[3]; } } return 2; } cVar1 = *local_68; cVar2 = *local_70; local_70 = local_70 + 1; local_68 = local_68 + 1; } while (cVar1 == cVar2); } } } return 0; }
55,396
OpenGL_Init_4_3
SDL3Lite/dependencies/OpenGL.h
void OpenGL_Init_4_3() { glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)OpenGL_Load("glClearBufferData"); glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)OpenGL_Load("glClearBufferSubData"); glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)OpenGL_Load("glDispatchCompute"); glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)OpenGL_Load("glDispatchComputeIndirect"); glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)OpenGL_Load("glCopyImageSubData"); glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)OpenGL_Load("glFramebufferParameteri"); glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)OpenGL_Load("glGetFramebufferParameteriv"); glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)OpenGL_Load("glGetInternalformati64v"); glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)OpenGL_Load("glInvalidateTexSubImage"); glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)OpenGL_Load("glInvalidateTexImage"); glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)OpenGL_Load("glInvalidateBufferSubData"); glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)OpenGL_Load("glInvalidateBufferData"); glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)OpenGL_Load("glInvalidateFramebuffer"); glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)OpenGL_Load("glInvalidateSubFramebuffer"); glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)OpenGL_Load("glMultiDrawArraysIndirect"); glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)OpenGL_Load("glMultiDrawElementsIndirect"); glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)OpenGL_Load("glGetProgramInterfaceiv"); glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)OpenGL_Load("glGetProgramResourceIndex"); glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)OpenGL_Load("glGetProgramResourceName"); glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)OpenGL_Load("glGetProgramResourceiv"); glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)OpenGL_Load("glGetProgramResourceLocation"); glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)OpenGL_Load("glGetProgramResourceLocationIndex"); glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)OpenGL_Load("glShaderStorageBlockBinding"); glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)OpenGL_Load("glTexBufferRange"); glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)OpenGL_Load("glTexStorage2DMultisample"); glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)OpenGL_Load("glTexStorage3DMultisample"); glTextureView = (PFNGLTEXTUREVIEWPROC)OpenGL_Load("glTextureView"); glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)OpenGL_Load("glBindVertexBuffer"); glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)OpenGL_Load("glVertexAttribFormat"); glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)OpenGL_Load("glVertexAttribIFormat"); glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)OpenGL_Load("glVertexAttribLFormat"); glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)OpenGL_Load("glVertexAttribBinding"); glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)OpenGL_Load("glVertexBindingDivisor"); glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)OpenGL_Load("glDebugMessageControl"); glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)OpenGL_Load("glDebugMessageInsert"); glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)OpenGL_Load("glDebugMessageCallback"); glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)OpenGL_Load("glGetDebugMessageLog"); glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)OpenGL_Load("glPushDebugGroup"); glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)OpenGL_Load("glPopDebugGroup"); glObjectLabel = (PFNGLOBJECTLABELPROC)OpenGL_Load("glObjectLabel"); glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)OpenGL_Load("glGetObjectLabel"); glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)OpenGL_Load("glObjectPtrLabel"); glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)OpenGL_Load("glGetObjectPtrLabel"); }
O3
c
OpenGL_Init_4_3: pushq %rax leaq 0x101ed(%rip), %rdi # 0x39dc5 callq 0x220c0 movq %rax, %rcx movq 0x19f21(%rip), %rax # 0x43b08 movq %rcx, (%rax) leaq 0x101e6(%rip), %rdi # 0x39dd7 callq 0x220c0 movq %rax, %rcx movq 0x19a58(%rip), %rax # 0x43658 movq %rcx, (%rax) leaq 0x101e2(%rip), %rdi # 0x39dec callq 0x220c0 movq %rax, %rcx movq 0x1a1b7(%rip), %rax # 0x43dd0 movq %rcx, (%rax) leaq 0x101db(%rip), %rdi # 0x39dfe callq 0x220c0 movq %rax, %rcx movq 0x198de(%rip), %rax # 0x43510 movq %rcx, (%rax) leaq 0x101dc(%rip), %rdi # 0x39e18 callq 0x220c0 movq %rax, %rcx movq 0x1830d(%rip), %rax # 0x41f58 movq %rcx, (%rax) leaq 0x101d6(%rip), %rdi # 0x39e2b callq 0x220c0 movq %rax, %rcx movq 0x19974(%rip), %rax # 0x435d8 movq %rcx, (%rax) leaq 0x101d5(%rip), %rdi # 0x39e43 callq 0x220c0 movq %rax, %rcx movq 0x19543(%rip), %rax # 0x431c0 movq %rcx, (%rax) leaq 0x101d8(%rip), %rdi # 0x39e5f callq 0x220c0 movq %rax, %rcx movq 0x183ca(%rip), %rax # 0x42060 movq %rcx, (%rax) leaq 0x101d7(%rip), %rdi # 0x39e77 callq 0x220c0 movq %rax, %rcx movq 0x194a9(%rip), %rax # 0x43158 movq %rcx, (%rax) leaq 0x101d6(%rip), %rdi # 0x39e8f callq 0x220c0 movq %rax, %rcx movq 0x197b0(%rip), %rax # 0x43478 movq %rcx, (%rax) leaq 0x101d2(%rip), %rdi # 0x39ea4 callq 0x220c0 movq %rax, %rcx movq 0x19f87(%rip), %rax # 0x43c68 movq %rcx, (%rax) leaq 0x101d3(%rip), %rdi # 0x39ebe callq 0x220c0 movq %rax, %rcx movq 0x187c6(%rip), %rax # 0x424c0 movq %rcx, (%rax) leaq 0x101d1(%rip), %rdi # 0x39ed5 callq 0x220c0 movq %rax, %rcx movq 0x18455(%rip), %rax # 0x42168 movq %rcx, (%rax) leaq 0x101d0(%rip), %rdi # 0x39eed callq 0x220c0 movq %rax, %rcx movq 0x19c3c(%rip), %rax # 0x43968 movq %rcx, (%rax) leaq 0x101d2(%rip), %rdi # 0x39f08 callq 0x220c0 movq %rax, %rcx movq 0x19f43(%rip), %rax # 0x43c88 movq %rcx, (%rax) leaq 0x101d3(%rip), %rdi # 0x39f22 callq 0x220c0 movq %rax, %rcx movq 0x18bda(%rip), %rax # 0x42938 movq %rcx, (%rax) leaq 0x101d6(%rip), %rdi # 0x39f3e callq 0x220c0 movq %rax, %rcx movq 0x18e79(%rip), %rax # 0x42bf0 movq %rcx, (%rax) leaq 0x101d5(%rip), %rdi # 0x39f56 callq 0x220c0 movq %rax, %rcx movq 0x18918(%rip), %rax # 0x426a8 movq %rcx, (%rax) leaq 0x101d6(%rip), %rdi # 0x39f70 callq 0x220c0 movq %rax, %rcx movq 0x19f37(%rip), %rax # 0x43ce0 movq %rcx, (%rax) leaq 0x101d6(%rip), %rdi # 0x39f89 callq 0x220c0 movq %rax, %rcx movq 0x18306(%rip), %rax # 0x420c8 movq %rcx, (%rax) leaq 0x101d4(%rip), %rdi # 0x39fa0 callq 0x220c0 movq %rax, %rcx movq 0x19dcd(%rip), %rax # 0x43ba8 movq %rcx, (%rax) leaq 0x101d8(%rip), %rdi # 0x39fbd callq 0x220c0 movq %rax, %rcx movq 0x192bc(%rip), %rax # 0x430b0 movq %rcx, (%rax) leaq 0x101e1(%rip), %rdi # 0x39fdf callq 0x220c0 movq %rax, %rcx movq 0x192d3(%rip), %rax # 0x430e0 movq %rcx, (%rax) leaq 0x101e4(%rip), %rdi # 0x39ffb callq 0x220c0 movq %rax, %rcx movq 0x1821a(%rip), %rax # 0x42040 movq %rcx, (%rax) leaq 0x101dc(%rip), %rdi # 0x3a00c callq 0x220c0 movq %rax, %rcx movq 0x1a109(%rip), %rax # 0x43f48 movq %rcx, (%rax) leaq 0x101dd(%rip), %rdi # 0x3a026 callq 0x220c0 movq %rax, %rcx movq 0x195a8(%rip), %rax # 0x43400 movq %rcx, (%rax) leaq 0x101de(%rip), %rdi # 0x3a040 callq 0x220c0 movq %rax, %rcx movq 0x18c9f(%rip), %rax # 0x42b10 movq %rcx, (%rax) leaq 0x101d3(%rip), %rdi # 0x3a04e callq 0x220c0 movq %rax, %rcx movq 0x197f6(%rip), %rax # 0x43680 movq %rcx, (%rax) leaq 0x101cd(%rip), %rdi # 0x3a061 callq 0x220c0 movq %rax, %rcx movq 0x18345(%rip), %rax # 0x421e8 movq %rcx, (%rax) leaq 0x101c9(%rip), %rdi # 0x3a076 callq 0x220c0 movq %rax, %rcx movq 0x189d4(%rip), %rax # 0x42890 movq %rcx, (%rax) leaq 0x101c6(%rip), %rdi # 0x3a08c callq 0x220c0 movq %rax, %rcx movq 0x183b3(%rip), %rax # 0x42288 movq %rcx, (%rax) leaq 0x101c3(%rip), %rdi # 0x3a0a2 callq 0x220c0 movq %rax, %rcx movq 0x188fa(%rip), %rax # 0x427e8 movq %rcx, (%rax) leaq 0x101c0(%rip), %rdi # 0x3a0b8 callq 0x220c0 movq %rax, %rcx movq 0x19bb9(%rip), %rax # 0x43ac0 movq %rcx, (%rax) leaq 0x101be(%rip), %rdi # 0x3a0cf callq 0x220c0 movq %rax, %rcx movq 0x18810(%rip), %rax # 0x42730 movq %rcx, (%rax) leaq 0x101bb(%rip), %rdi # 0x3a0e5 callq 0x220c0 movq %rax, %rcx movq 0x17fcf(%rip), %rax # 0x41f08 movq %rcx, (%rax) leaq 0x101b7(%rip), %rdi # 0x3a0fa callq 0x220c0 movq %rax, %rcx movq 0x19ce6(%rip), %rax # 0x43c38 movq %rcx, (%rax) leaq 0x101b5(%rip), %rdi # 0x3a111 callq 0x220c0 movq %rax, %rcx movq 0x1838d(%rip), %rax # 0x422f8 movq %rcx, (%rax) leaq 0x101b1(%rip), %rdi # 0x3a126 callq 0x220c0 movq %rax, %rcx movq 0x19184(%rip), %rax # 0x43108 movq %rcx, (%rax) leaq 0x101a9(%rip), %rdi # 0x3a137 callq 0x220c0 movq %rax, %rcx movq 0x183cb(%rip), %rax # 0x42368 movq %rcx, (%rax) leaq 0x101a0(%rip), %rdi # 0x3a147 callq 0x220c0 movq %rax, %rcx movq 0x18b12(%rip), %rax # 0x42ac8 movq %rcx, (%rax) leaq 0x10195(%rip), %rdi # 0x3a155 callq 0x220c0 movq %rax, %rcx movq 0x19c89(%rip), %rax # 0x43c58 movq %rcx, (%rax) leaq 0x1018d(%rip), %rdi # 0x3a166 callq 0x220c0 movq %rax, %rcx movq 0x190d0(%rip), %rax # 0x430b8 movq %rcx, (%rax) leaq 0x10185(%rip), %rdi # 0x3a177 callq 0x220c0 movq %rax, %rcx movq 0x198c7(%rip), %rax # 0x438c8 movq %rcx, (%rax) popq %rax retq nopw %cs:(%rax,%rax)
OpenGL_Init_4_3: push rax lea rdi, aGlclearbufferd_0; "glClearBufferData" call _OpenGL_Load mov rcx, rax mov rax, cs:glClearBufferData_ptr mov [rax], rcx lea rdi, aGlclearbuffers_0; "glClearBufferSubData" call _OpenGL_Load mov rcx, rax mov rax, cs:glClearBufferSubData_ptr mov [rax], rcx lea rdi, aGldispatchcomp_1; "glDispatchCompute" call _OpenGL_Load mov rcx, rax mov rax, cs:glDispatchCompute_ptr mov [rax], rcx lea rdi, aGldispatchcomp_2; "glDispatchComputeIndirect" call _OpenGL_Load mov rcx, rax mov rax, cs:glDispatchComputeIndirect_ptr mov [rax], rcx lea rdi, aGlcopyimagesub_0; "glCopyImageSubData" call _OpenGL_Load mov rcx, rax mov rax, cs:glCopyImageSubData_ptr mov [rax], rcx lea rdi, aGlframebufferp_0; "glFramebufferParameteri" call _OpenGL_Load mov rcx, rax mov rax, cs:glFramebufferParameteri_ptr mov [rax], rcx lea rdi, aGlgetframebuff_2; "glGetFramebufferParameteriv" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetFramebufferParameteriv_ptr mov [rax], rcx lea rdi, aGlgetinternalf_2; "glGetInternalformati64v" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetInternalformati64v_ptr mov [rax], rcx lea rdi, aGlinvalidatete_1; "glInvalidateTexSubImage" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateTexSubImage_ptr mov [rax], rcx lea rdi, aGlinvalidatete_2; "glInvalidateTexImage" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateTexImage_ptr mov [rax], rcx lea rdi, aGlinvalidatebu_1; "glInvalidateBufferSubData" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateBufferSubData_ptr mov [rax], rcx lea rdi, aGlinvalidatebu_2; "glInvalidateBufferData" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateBufferData_ptr mov [rax], rcx lea rdi, aGlinvalidatefr_0; "glInvalidateFramebuffer" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateFramebuffer_ptr mov [rax], rcx lea rdi, aGlinvalidatesu_0; "glInvalidateSubFramebuffer" call _OpenGL_Load mov rcx, rax mov rax, cs:glInvalidateSubFramebuffer_ptr mov [rax], rcx lea rdi, aGlmultidrawarr_3; "glMultiDrawArraysIndirect" call _OpenGL_Load mov rcx, rax mov rax, cs:glMultiDrawArraysIndirect_ptr mov [rax], rcx lea rdi, aGlmultidrawele_5; "glMultiDrawElementsIndirect" call _OpenGL_Load mov rcx, rax mov rax, cs:glMultiDrawElementsIndirect_ptr mov [rax], rcx lea rdi, aGlgetprogramin_2; "glGetProgramInterfaceiv" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramInterfaceiv_ptr mov [rax], rcx lea rdi, aGlgetprogramre_4; "glGetProgramResourceIndex" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramResourceIndex_ptr mov [rax], rcx lea rdi, aGlgetprogramre_5; "glGetProgramResourceName" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramResourceName_ptr mov [rax], rcx lea rdi, aGlgetprogramre_6; "glGetProgramResourceiv" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramResourceiv_ptr mov [rax], rcx lea rdi, aGlgetprogramre_7; "glGetProgramResourceLocation" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramResourceLocation_ptr mov [rax], rcx lea rdi, aGlgetprogramre_8; "glGetProgramResourceLocationIndex" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetProgramResourceLocationIndex_ptr mov [rax], rcx lea rdi, aGlshaderstorag_0; "glShaderStorageBlockBinding" call _OpenGL_Load mov rcx, rax mov rax, cs:glShaderStorageBlockBinding_ptr mov [rax], rcx lea rdi, aGltexbufferran_0; "glTexBufferRange" call _OpenGL_Load mov rcx, rax mov rax, cs:glTexBufferRange_ptr mov [rax], rcx lea rdi, aGltexstorage2d_2; "glTexStorage2DMultisample" call _OpenGL_Load mov rcx, rax mov rax, cs:glTexStorage2DMultisample_ptr mov [rax], rcx lea rdi, aGltexstorage3d_2; "glTexStorage3DMultisample" call _OpenGL_Load mov rcx, rax mov rax, cs:glTexStorage3DMultisample_ptr mov [rax], rcx lea rdi, aGltextureview_0; "glTextureView" call _OpenGL_Load mov rcx, rax mov rax, cs:glTextureView_ptr mov [rax], rcx lea rdi, aGlbindvertexbu_1; "glBindVertexBuffer" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindVertexBuffer_ptr mov [rax], rcx lea rdi, aGlvertexattrib_155; "glVertexAttribFormat" call _OpenGL_Load mov rcx, rax mov rax, cs:glVertexAttribFormat_ptr mov [rax], rcx lea rdi, aGlvertexattrib_156; "glVertexAttribIFormat" call _OpenGL_Load mov rcx, rax mov rax, cs:glVertexAttribIFormat_ptr mov [rax], rcx lea rdi, aGlvertexattrib_157; "glVertexAttribLFormat" call _OpenGL_Load mov rcx, rax mov rax, cs:glVertexAttribLFormat_ptr mov [rax], rcx lea rdi, aGlvertexattrib_158; "glVertexAttribBinding" call _OpenGL_Load mov rcx, rax mov rax, cs:glVertexAttribBinding_ptr mov [rax], rcx lea rdi, aGlvertexbindin_0; "glVertexBindingDivisor" call _OpenGL_Load mov rcx, rax mov rax, cs:glVertexBindingDivisor_ptr mov [rax], rcx lea rdi, aGldebugmessage_2; "glDebugMessageControl" call _OpenGL_Load mov rcx, rax mov rax, cs:glDebugMessageControl_ptr mov [rax], rcx lea rdi, aGldebugmessage_3; "glDebugMessageInsert" call _OpenGL_Load mov rcx, rax mov rax, cs:glDebugMessageInsert_ptr mov [rax], rcx lea rdi, aGldebugmessage_4; "glDebugMessageCallback" call _OpenGL_Load mov rcx, rax mov rax, cs:glDebugMessageCallback_ptr mov [rax], rcx lea rdi, aGlgetdebugmess_0; "glGetDebugMessageLog" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetDebugMessageLog_ptr mov [rax], rcx lea rdi, aGlpushdebuggro_0; "glPushDebugGroup" call _OpenGL_Load mov rcx, rax mov rax, cs:glPushDebugGroup_ptr mov [rax], rcx lea rdi, aGlpopdebuggrou_0; "glPopDebugGroup" call _OpenGL_Load mov rcx, rax mov rax, cs:glPopDebugGroup_ptr mov [rax], rcx lea rdi, aGlobjectlabel_0; "glObjectLabel" call _OpenGL_Load mov rcx, rax mov rax, cs:glObjectLabel_ptr mov [rax], rcx lea rdi, aGlgetobjectlab_0; "glGetObjectLabel" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetObjectLabel_ptr mov [rax], rcx lea rdi, aGlobjectptrlab_0; "glObjectPtrLabel" call _OpenGL_Load mov rcx, rax mov rax, cs:glObjectPtrLabel_ptr mov [rax], rcx lea rdi, aGlgetobjectptr_0; "glGetObjectPtrLabel" call _OpenGL_Load mov rcx, rax mov rax, cs:glGetObjectPtrLabel_ptr mov [rax], rcx pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_3() { glClearBufferData = OpenGL_Load("glClearBufferData"); glClearBufferSubData = OpenGL_Load("glClearBufferSubData"); glDispatchCompute = OpenGL_Load("glDispatchCompute"); glDispatchComputeIndirect = OpenGL_Load("glDispatchComputeIndirect"); glCopyImageSubData = OpenGL_Load("glCopyImageSubData"); glFramebufferParameteri = OpenGL_Load("glFramebufferParameteri"); glGetFramebufferParameteriv = OpenGL_Load("glGetFramebufferParameteriv"); glGetInternalformati64v = OpenGL_Load("glGetInternalformati64v"); glInvalidateTexSubImage = OpenGL_Load("glInvalidateTexSubImage"); glInvalidateTexImage = OpenGL_Load("glInvalidateTexImage"); glInvalidateBufferSubData = OpenGL_Load("glInvalidateBufferSubData"); glInvalidateBufferData = OpenGL_Load("glInvalidateBufferData"); glInvalidateFramebuffer = OpenGL_Load("glInvalidateFramebuffer"); glInvalidateSubFramebuffer = OpenGL_Load("glInvalidateSubFramebuffer"); glMultiDrawArraysIndirect = OpenGL_Load("glMultiDrawArraysIndirect"); glMultiDrawElementsIndirect = OpenGL_Load("glMultiDrawElementsIndirect"); glGetProgramInterfaceiv = OpenGL_Load("glGetProgramInterfaceiv"); glGetProgramResourceIndex = OpenGL_Load("glGetProgramResourceIndex"); glGetProgramResourceName = OpenGL_Load("glGetProgramResourceName"); glGetProgramResourceiv = OpenGL_Load("glGetProgramResourceiv"); glGetProgramResourceLocation = OpenGL_Load("glGetProgramResourceLocation"); glGetProgramResourceLocationIndex = OpenGL_Load("glGetProgramResourceLocationIndex"); glShaderStorageBlockBinding = OpenGL_Load("glShaderStorageBlockBinding"); glTexBufferRange = OpenGL_Load("glTexBufferRange"); glTexStorage2DMultisample = OpenGL_Load("glTexStorage2DMultisample"); glTexStorage3DMultisample = OpenGL_Load("glTexStorage3DMultisample"); glTextureView = OpenGL_Load("glTextureView"); glBindVertexBuffer = OpenGL_Load("glBindVertexBuffer"); glVertexAttribFormat = OpenGL_Load("glVertexAttribFormat"); glVertexAttribIFormat = OpenGL_Load("glVertexAttribIFormat"); glVertexAttribLFormat = OpenGL_Load("glVertexAttribLFormat"); glVertexAttribBinding = OpenGL_Load("glVertexAttribBinding"); glVertexBindingDivisor = OpenGL_Load("glVertexBindingDivisor"); glDebugMessageControl = OpenGL_Load("glDebugMessageControl"); glDebugMessageInsert = OpenGL_Load("glDebugMessageInsert"); glDebugMessageCallback = OpenGL_Load("glDebugMessageCallback"); glGetDebugMessageLog = OpenGL_Load("glGetDebugMessageLog"); glPushDebugGroup = OpenGL_Load("glPushDebugGroup"); glPopDebugGroup = OpenGL_Load("glPopDebugGroup"); glObjectLabel = OpenGL_Load("glObjectLabel"); glGetObjectLabel = OpenGL_Load("glGetObjectLabel"); glObjectPtrLabel = OpenGL_Load("glObjectPtrLabel"); glGetObjectPtrLabel = OpenGL_Load("glGetObjectPtrLabel"); }
OpenGL_Init_4_3: PUSH RAX LEA RDI,[0x139dc5] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143b08] MOV qword ptr [RAX],RCX LEA RDI,[0x139dd7] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143658] MOV qword ptr [RAX],RCX LEA RDI,[0x139dec] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143dd0] MOV qword ptr [RAX],RCX LEA RDI,[0x139dfe] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143510] MOV qword ptr [RAX],RCX LEA RDI,[0x139e18] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00141f58] MOV qword ptr [RAX],RCX LEA RDI,[0x139e2b] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001435d8] MOV qword ptr [RAX],RCX LEA RDI,[0x139e43] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001431c0] MOV qword ptr [RAX],RCX LEA RDI,[0x139e5f] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142060] MOV qword ptr [RAX],RCX LEA RDI,[0x139e77] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143158] MOV qword ptr [RAX],RCX LEA RDI,[0x139e8f] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143478] MOV qword ptr [RAX],RCX LEA RDI,[0x139ea4] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143c68] MOV qword ptr [RAX],RCX LEA RDI,[0x139ebe] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001424c0] MOV qword ptr [RAX],RCX LEA RDI,[0x139ed5] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142168] MOV qword ptr [RAX],RCX LEA RDI,[0x139eed] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143968] MOV qword ptr [RAX],RCX LEA RDI,[0x139f08] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143c88] MOV qword ptr [RAX],RCX LEA RDI,[0x139f22] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142938] MOV qword ptr [RAX],RCX LEA RDI,[0x139f3e] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142bf0] MOV qword ptr [RAX],RCX LEA RDI,[0x139f56] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001426a8] MOV qword ptr [RAX],RCX LEA RDI,[0x139f70] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143ce0] MOV qword ptr [RAX],RCX LEA RDI,[0x139f89] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001420c8] MOV qword ptr [RAX],RCX LEA RDI,[0x139fa0] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143ba8] MOV qword ptr [RAX],RCX LEA RDI,[0x139fbd] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001430b0] MOV qword ptr [RAX],RCX LEA RDI,[0x139fdf] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001430e0] MOV qword ptr [RAX],RCX LEA RDI,[0x139ffb] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142040] MOV qword ptr [RAX],RCX LEA RDI,[0x13a00c] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143f48] MOV qword ptr [RAX],RCX LEA RDI,[0x13a026] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143400] MOV qword ptr [RAX],RCX LEA RDI,[0x13a040] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142b10] MOV qword ptr [RAX],RCX LEA RDI,[0x13a04e] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143680] MOV qword ptr [RAX],RCX LEA RDI,[0x13a061] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001421e8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a076] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142890] MOV qword ptr [RAX],RCX LEA RDI,[0x13a08c] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142288] MOV qword ptr [RAX],RCX LEA RDI,[0x13a0a2] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001427e8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a0b8] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143ac0] MOV qword ptr [RAX],RCX LEA RDI,[0x13a0cf] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142730] MOV qword ptr [RAX],RCX LEA RDI,[0x13a0e5] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00141f08] MOV qword ptr [RAX],RCX LEA RDI,[0x13a0fa] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143c38] MOV qword ptr [RAX],RCX LEA RDI,[0x13a111] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001422f8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a126] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143108] MOV qword ptr [RAX],RCX LEA RDI,[0x13a137] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142368] MOV qword ptr [RAX],RCX LEA RDI,[0x13a147] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142ac8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a155] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143c58] MOV qword ptr [RAX],RCX LEA RDI,[0x13a166] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001430b8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a177] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001438c8] MOV qword ptr [RAX],RCX POP RAX RET
int8 OpenGL_Init_4_3(void) { int8 in_RAX; int8 uVar1; uVar1 = OpenGL_Load("glClearBufferData"); *(int8 *)PTR_glClearBufferData_00143b08 = uVar1; uVar1 = OpenGL_Load("glClearBufferSubData"); *(int8 *)PTR_glClearBufferSubData_00143658 = uVar1; uVar1 = OpenGL_Load("glDispatchCompute"); *(int8 *)PTR_glDispatchCompute_00143dd0 = uVar1; uVar1 = OpenGL_Load("glDispatchComputeIndirect"); *(int8 *)PTR_glDispatchComputeIndirect_00143510 = uVar1; uVar1 = OpenGL_Load("glCopyImageSubData"); *(int8 *)PTR_glCopyImageSubData_00141f58 = uVar1; uVar1 = OpenGL_Load("glFramebufferParameteri"); *(int8 *)PTR_glFramebufferParameteri_001435d8 = uVar1; uVar1 = OpenGL_Load("glGetFramebufferParameteriv"); *(int8 *)PTR_glGetFramebufferParameteriv_001431c0 = uVar1; uVar1 = OpenGL_Load("glGetInternalformati64v"); *(int8 *)PTR_glGetInternalformati64v_00142060 = uVar1; uVar1 = OpenGL_Load("glInvalidateTexSubImage"); *(int8 *)PTR_glInvalidateTexSubImage_00143158 = uVar1; uVar1 = OpenGL_Load("glInvalidateTexImage"); *(int8 *)PTR_glInvalidateTexImage_00143478 = uVar1; uVar1 = OpenGL_Load("glInvalidateBufferSubData"); *(int8 *)PTR_glInvalidateBufferSubData_00143c68 = uVar1; uVar1 = OpenGL_Load("glInvalidateBufferData"); *(int8 *)PTR_glInvalidateBufferData_001424c0 = uVar1; uVar1 = OpenGL_Load("glInvalidateFramebuffer"); *(int8 *)PTR_glInvalidateFramebuffer_00142168 = uVar1; uVar1 = OpenGL_Load("glInvalidateSubFramebuffer"); *(int8 *)PTR_glInvalidateSubFramebuffer_00143968 = uVar1; uVar1 = OpenGL_Load("glMultiDrawArraysIndirect"); *(int8 *)PTR_glMultiDrawArraysIndirect_00143c88 = uVar1; uVar1 = OpenGL_Load("glMultiDrawElementsIndirect"); *(int8 *)PTR_glMultiDrawElementsIndirect_00142938 = uVar1; uVar1 = OpenGL_Load("glGetProgramInterfaceiv"); *(int8 *)PTR_glGetProgramInterfaceiv_00142bf0 = uVar1; uVar1 = OpenGL_Load("glGetProgramResourceIndex"); *(int8 *)PTR_glGetProgramResourceIndex_001426a8 = uVar1; uVar1 = OpenGL_Load("glGetProgramResourceName"); *(int8 *)PTR_glGetProgramResourceName_00143ce0 = uVar1; uVar1 = OpenGL_Load("glGetProgramResourceiv"); *(int8 *)PTR_glGetProgramResourceiv_001420c8 = uVar1; uVar1 = OpenGL_Load("glGetProgramResourceLocation"); *(int8 *)PTR_glGetProgramResourceLocation_00143ba8 = uVar1; uVar1 = OpenGL_Load("glGetProgramResourceLocationIndex"); *(int8 *)PTR_glGetProgramResourceLocationIndex_001430b0 = uVar1; uVar1 = OpenGL_Load("glShaderStorageBlockBinding"); *(int8 *)PTR_glShaderStorageBlockBinding_001430e0 = uVar1; uVar1 = OpenGL_Load("glTexBufferRange"); *(int8 *)PTR_glTexBufferRange_00142040 = uVar1; uVar1 = OpenGL_Load("glTexStorage2DMultisample"); *(int8 *)PTR_glTexStorage2DMultisample_00143f48 = uVar1; uVar1 = OpenGL_Load("glTexStorage3DMultisample"); *(int8 *)PTR_glTexStorage3DMultisample_00143400 = uVar1; uVar1 = OpenGL_Load("glTextureView"); *(int8 *)PTR_glTextureView_00142b10 = uVar1; uVar1 = OpenGL_Load("glBindVertexBuffer"); *(int8 *)PTR_glBindVertexBuffer_00143680 = uVar1; uVar1 = OpenGL_Load("glVertexAttribFormat"); *(int8 *)PTR_glVertexAttribFormat_001421e8 = uVar1; uVar1 = OpenGL_Load("glVertexAttribIFormat"); *(int8 *)PTR_glVertexAttribIFormat_00142890 = uVar1; uVar1 = OpenGL_Load("glVertexAttribLFormat"); *(int8 *)PTR_glVertexAttribLFormat_00142288 = uVar1; uVar1 = OpenGL_Load("glVertexAttribBinding"); *(int8 *)PTR_glVertexAttribBinding_001427e8 = uVar1; uVar1 = OpenGL_Load("glVertexBindingDivisor"); *(int8 *)PTR_glVertexBindingDivisor_00143ac0 = uVar1; uVar1 = OpenGL_Load("glDebugMessageControl"); *(int8 *)PTR_glDebugMessageControl_00142730 = uVar1; uVar1 = OpenGL_Load("glDebugMessageInsert"); *(int8 *)PTR_glDebugMessageInsert_00141f08 = uVar1; uVar1 = OpenGL_Load("glDebugMessageCallback"); *(int8 *)PTR_glDebugMessageCallback_00143c38 = uVar1; uVar1 = OpenGL_Load("glGetDebugMessageLog"); *(int8 *)PTR_glGetDebugMessageLog_001422f8 = uVar1; uVar1 = OpenGL_Load("glPushDebugGroup"); *(int8 *)PTR_glPushDebugGroup_00143108 = uVar1; uVar1 = OpenGL_Load("glPopDebugGroup"); *(int8 *)PTR_glPopDebugGroup_00142368 = uVar1; uVar1 = OpenGL_Load("glObjectLabel"); *(int8 *)PTR_glObjectLabel_00142ac8 = uVar1; uVar1 = OpenGL_Load("glGetObjectLabel"); *(int8 *)PTR_glGetObjectLabel_00143c58 = uVar1; uVar1 = OpenGL_Load("glObjectPtrLabel"); *(int8 *)PTR_glObjectPtrLabel_001430b8 = uVar1; uVar1 = OpenGL_Load("glGetObjectPtrLabel"); *(int8 *)PTR_glGetObjectPtrLabel_001438c8 = uVar1; return in_RAX; }
55,397
bc_idx_to_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_idx_to_atom(BCReaderState *s, JSAtom *patom, uint32_t idx) { JSAtom atom; if (__JS_AtomIsTaggedInt(idx)) { atom = idx; } else if (idx < s->first_atom) { atom = JS_DupAtom(s->ctx, idx); } else { idx -= s->first_atom; if (idx >= s->idx_to_atom_count) { JS_ThrowSyntaxError(s->ctx, "invalid atom index (pos=%u)", (unsigned int)(s->ptr - s->buf_start)); *patom = JS_ATOM_NULL; return s->error_state = -1; } atom = JS_DupAtom(s->ctx, s->idx_to_atom[idx]); } *patom = atom; return 0; }
O0
c
bc_idx_to_atom: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %edx, 0x1c(%rsp) movl 0x1c(%rsp), %edi callq 0x34e00 cmpl $0x0, %eax je 0x7c09d movl 0x1c(%rsp), %eax movl %eax, 0x18(%rsp) jmp 0x7c160 movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x20(%rcx), %eax jae 0x7c0c5 movq 0x28(%rsp), %rax movq (%rax), %rdi movl 0x1c(%rsp), %esi callq 0x26ce0 movl %eax, 0x18(%rsp) jmp 0x7c15e movq 0x28(%rsp), %rax movl 0x20(%rax), %ecx movl 0x1c(%rsp), %eax subl %ecx, %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x24(%rcx), %eax jb 0x7c13d movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movq 0x28(%rsp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, %edx leaq 0x911c1(%rip), %rsi # 0x10d2cc movb $0x0, %al callq 0x2bf50 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movl $0x0, (%rax) movq 0x28(%rsp), %rax movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x7c173 movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x28(%rsp), %rax movq 0x28(%rax), %rax movl 0x1c(%rsp), %ecx movl (%rax,%rcx,4), %esi callq 0x26ce0 movl %eax, 0x18(%rsp) jmp 0x7c160 movl 0x18(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, (%rax) movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
bc_idx_to_atom: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], edx mov edi, [rsp+38h+var_1C] call __JS_AtomIsTaggedInt cmp eax, 0 jz short loc_7C09D mov eax, [rsp+38h+var_1C] mov [rsp+38h+var_20], eax jmp loc_7C160 loc_7C09D: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+20h] jnb short loc_7C0C5 mov rax, [rsp+38h+var_10] mov rdi, [rax] mov esi, [rsp+38h+var_1C] call JS_DupAtom mov [rsp+38h+var_20], eax jmp loc_7C15E loc_7C0C5: mov rax, [rsp+38h+var_10] mov ecx, [rax+20h] mov eax, [rsp+38h+var_1C] sub eax, ecx mov [rsp+38h+var_1C], eax mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+24h] jb short loc_7C13D mov rax, [rsp+38h+var_10] mov rdi, [rax] mov rax, [rsp+38h+var_10] mov rax, [rax+10h] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+8] sub rax, rcx mov edx, eax lea rsi, aInvalidAtomInd; "invalid atom index (pos=%u)" mov al, 0 call JS_ThrowSyntaxError mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], rdx mov rax, [rsp+38h+var_18] mov dword ptr [rax], 0 mov rax, [rsp+38h+var_10] mov dword ptr [rax+30h], 0FFFFFFFFh mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_7C173 loc_7C13D: mov rax, [rsp+38h+var_10] mov rdi, [rax] mov rax, [rsp+38h+var_10] mov rax, [rax+28h] mov ecx, [rsp+38h+var_1C] mov esi, [rax+rcx*4] call JS_DupAtom mov [rsp+38h+var_20], eax loc_7C15E: jmp short $+2 loc_7C160: mov ecx, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov [rax], ecx mov [rsp+38h+var_4], 0 loc_7C173: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long bc_idx_to_atom( long long a1, _DWORD *a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 char v16; // [rsp+0h] [rbp-38h] int v17; // [rsp+18h] [rbp-20h] unsigned int v19; // [rsp+1Ch] [rbp-1Ch] if ( _JS_AtomIsTaggedInt(a3) ) { v17 = a3; LABEL_8: *a2 = v17; return 0; } if ( a3 < *(_DWORD *)(a1 + 32) ) { v17 = JS_DupAtom(*(_QWORD *)a1, a3); goto LABEL_8; } v19 = a3 - *(_DWORD *)(a1 + 32); if ( v19 < *(_DWORD *)(a1 + 36) ) { v17 = JS_DupAtom(*(_QWORD *)a1, *(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL * v19)); goto LABEL_8; } JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"invalid atom index (pos=%u)", (unsigned int)*(_QWORD *)(a1 + 16) - (unsigned int)*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8), v11, v12, a4, a5, a6, a7, v13, v14, a10, a11, v16); *a2 = 0; *(_DWORD *)(a1 + 48) = -1; return (unsigned int)-1; }
bc_idx_to_atom: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],EDX MOV EDI,dword ptr [RSP + 0x1c] CALL 0x00134e00 CMP EAX,0x0 JZ 0x0017c09d MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x18],EAX JMP 0x0017c160 LAB_0017c09d: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x20] JNC 0x0017c0c5 MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RSP + 0x1c] CALL 0x00126ce0 MOV dword ptr [RSP + 0x18],EAX JMP 0x0017c15e LAB_0017c0c5: MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x20] MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,ECX MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x24] JC 0x0017c13d MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV EDX,EAX LEA RSI,[0x20d2cc] MOV AL,0x0 CALL 0x0012bf50 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x30],0xffffffff MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x0017c173 LAB_0017c13d: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,dword ptr [RSP + 0x1c] MOV ESI,dword ptr [RAX + RCX*0x4] CALL 0x00126ce0 MOV dword ptr [RSP + 0x18],EAX LAB_0017c15e: JMP 0x0017c160 LAB_0017c160: MOV ECX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x34],0x0 LAB_0017c173: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 bc_idx_to_atom(int8 *param_1,uint *param_2,uint param_3) { int iVar1; uint local_20; iVar1 = __JS_AtomIsTaggedInt(param_3); local_20 = param_3; if (iVar1 == 0) { if (param_3 < *(uint *)(param_1 + 4)) { local_20 = JS_DupAtom(*param_1,param_3); } else { if (*(uint *)((long)param_1 + 0x24) <= param_3 - *(int *)(param_1 + 4)) { JS_ThrowSyntaxError(*param_1,"invalid atom index (pos=%u)",(int)param_1[2] - (int)param_1[1] ); *param_2 = 0; *(int4 *)(param_1 + 6) = 0xffffffff; return 0xffffffff; } local_20 = JS_DupAtom(*param_1,*(int4 *) (param_1[5] + (ulong)(param_3 - *(int *)(param_1 + 4)) * 4)); } } *param_2 = local_20; return 0; }
55,398
bc_idx_to_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_idx_to_atom(BCReaderState *s, JSAtom *patom, uint32_t idx) { JSAtom atom; if (__JS_AtomIsTaggedInt(idx)) { atom = idx; } else if (idx < s->first_atom) { atom = JS_DupAtom(s->ctx, idx); } else { idx -= s->first_atom; if (idx >= s->idx_to_atom_count) { JS_ThrowSyntaxError(s->ctx, "invalid atom index (pos=%u)", (unsigned int)(s->ptr - s->buf_start)); *patom = JS_ATOM_NULL; return s->error_state = -1; } atom = JS_DupAtom(s->ctx, s->idx_to_atom[idx]); } *patom = atom; return 0; }
O1
c
bc_idx_to_atom: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx testl %edx, %edx js 0x4642a movq %rdi, %r14 movl %edx, %eax subl 0x20(%rdi), %eax jae 0x46436 cmpl $0xdf, %edx jle 0x4642a movq (%r14), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rax incl (%rax) movl %edx, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq cmpl 0x24(%r14), %eax jae 0x4644f movq 0x28(%r14), %rcx movl %eax, %eax movl (%rcx,%rax,4), %edx cmpl $0xe0, %edx jge 0x46417 jmp 0x4642a movq (%r14), %rdi movl 0x10(%r14), %edx subl 0x8(%r14), %edx leaq 0x57e6f(%rip), %rsi # 0x9e2d0 xorl %eax, %eax callq 0x218bd movl $0x0, (%rbx) movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x4642e
bc_idx_to_atom: push r14 push rbx push rax mov rbx, rsi test edx, edx js short loc_4642A mov r14, rdi mov eax, edx sub eax, [rdi+20h] jnb short loc_46436 cmp edx, 0DFh jle short loc_4642A loc_46417: mov rax, [r14] mov rax, [rax+18h] mov rax, [rax+68h] mov ecx, edx mov rax, [rax+rcx*8] inc dword ptr [rax] loc_4642A: mov [rbx], edx xor eax, eax loc_4642E: add rsp, 8 pop rbx pop r14 retn loc_46436: cmp eax, [r14+24h] jnb short loc_4644F mov rcx, [r14+28h] mov eax, eax mov edx, [rcx+rax*4] cmp edx, 0E0h jge short loc_46417 jmp short loc_4642A loc_4644F: mov rdi, [r14] mov edx, [r14+10h] sub edx, [r14+8] lea rsi, aInvalidAtomInd; "invalid atom index (pos=%u)" xor eax, eax call JS_ThrowSyntaxError mov dword ptr [rbx], 0 mov dword ptr [r14+30h], 0FFFFFFFFh mov eax, 0FFFFFFFFh jmp short loc_4642E
long long bc_idx_to_atom( long long a1, int *a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al unsigned int v15; // eax _DWORD *v16; // rax char v18; // [rsp-8h] [rbp-18h] v18 = v14; if ( a3 < 0 ) goto LABEL_5; v15 = a3 - *(_DWORD *)(a1 + 32); if ( (unsigned int)a3 >= *(_DWORD *)(a1 + 32) ) { if ( v15 >= *(_DWORD *)(a1 + 36) ) { JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"invalid atom index (pos=%u)", (unsigned int)(*(_DWORD *)(a1 + 16) - *(_DWORD *)(a1 + 8)), a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v18); *a2 = 0; *(_DWORD *)(a1 + 48) = -1; return 0xFFFFFFFFLL; } a3 = *(_DWORD *)(*(_QWORD *)(a1 + 40) + 4LL * v15); if ( a3 >= 224 ) goto LABEL_4; } else if ( a3 > 223 ) { LABEL_4: v16 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8LL * (unsigned int)a3); ++*v16; } LABEL_5: *a2 = a3; return 0LL; }
bc_idx_to_atom: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI TEST EDX,EDX JS 0x0014642a MOV R14,RDI MOV EAX,EDX SUB EAX,dword ptr [RDI + 0x20] JNC 0x00146436 CMP EDX,0xdf JLE 0x0014642a LAB_00146417: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,EDX MOV RAX,qword ptr [RAX + RCX*0x8] INC dword ptr [RAX] LAB_0014642a: MOV dword ptr [RBX],EDX XOR EAX,EAX LAB_0014642e: ADD RSP,0x8 POP RBX POP R14 RET LAB_00146436: CMP EAX,dword ptr [R14 + 0x24] JNC 0x0014644f MOV RCX,qword ptr [R14 + 0x28] MOV EAX,EAX MOV EDX,dword ptr [RCX + RAX*0x4] CMP EDX,0xe0 JGE 0x00146417 JMP 0x0014642a LAB_0014644f: MOV RDI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x10] SUB EDX,dword ptr [R14 + 0x8] LEA RSI,[0x19e2d0] XOR EAX,EAX CALL 0x001218bd MOV dword ptr [RBX],0x0 MOV dword ptr [R14 + 0x30],0xffffffff MOV EAX,0xffffffff JMP 0x0014642e
int8 bc_idx_to_atom(long *param_1,uint *param_2,uint param_3) { int *piVar1; uint uVar2; if (-1 < (int)param_3) { uVar2 = param_3 - *(uint *)(param_1 + 4); if (param_3 < *(uint *)(param_1 + 4)) { if ((int)param_3 < 0xe0) goto LAB_0014642a; } else { if (*(uint *)((long)param_1 + 0x24) <= uVar2) { JS_ThrowSyntaxError(*param_1,"invalid atom index (pos=%u)",(int)param_1[2] - (int)param_1[1] ); *param_2 = 0; *(int4 *)(param_1 + 6) = 0xffffffff; return 0xffffffff; } param_3 = *(uint *)(param_1[5] + (ulong)uVar2 * 4); if ((int)param_3 < 0xe0) goto LAB_0014642a; } piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_3 * 8); *piVar1 = *piVar1 + 1; } LAB_0014642a: *param_2 = param_3; return 0; }
55,399
flux::parser::Parser::consume(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char>>)
kvthweatt[P]FluxLang/src/parser/parser.cpp
lexer::Token Parser::consume(lexer::TokenType type, std::string_view message) { if (check(type)) { return advance(); } // Special handling for specific error cases if (type == lexer::TokenType::SEMICOLON && previous_.type() == lexer::TokenType::SEMICOLON) { // We already consumed a semicolon but the parser lost track of it return previous_; } if (type == lexer::TokenType::SEMICOLON && (current_.start().column == previous_.end().column + 1 || current_.start().line > previous_.end().line)) { // Check if we're at a token right after a semicolon that might have been // incorrectly consumed or missing in the source std::cout << "Auto-inserting missing semicolon at line " << previous_.end().line << ", col " << previous_.end().column << std::endl; // Create a synthetic semicolon token at the previous token's end position return lexer::Token( lexer::TokenType::SEMICOLON, ";", previous_.end(), previous_.end() ); } if (type == lexer::TokenType::RIGHT_BRACE && previous_.type() == lexer::TokenType::RIGHT_BRACE) { // We already consumed a closing brace but the parser lost track of it return previous_; } // Regular error handling if (!panicMode_) { error(current_, message); panicMode_ = true; // Enter panic mode to suppress cascading errors } return errorToken(message); }
O2
cpp
flux::parser::Parser::consume(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpl %edx, 0x8(%rsi) jne 0x12f50 movq %rbx, %rdi movq %r14, %rsi callq 0x122ec jmp 0x13066 movq %r8, %r15 movq %rcx, %r12 cmpl $0x60, %edx je 0x13019 cmpl $0x58, %edx jne 0x13031 cmpl $0x58, 0x68(%r14) je 0x13020 movq 0x98(%r14), %rax incq %rax cmpq %rax, 0x28(%r14) je 0x12f94 movq 0x90(%r14), %rax cmpq %rax, 0x20(%r14) jbe 0x13031 movq 0x2401d(%rip), %rdi # 0x36fb8 leaq 0x10bfc(%rip), %rsi # 0x23b9e callq 0x6220 movq 0x90(%r14), %rsi movq %rax, %rdi callq 0x6170 leaq 0x10136(%rip), %rsi # 0x230f3 movq %rax, %rdi callq 0x6220 movq 0x98(%r14), %rsi movq %rax, %rdi callq 0x6170 movq %rax, %rdi callq 0x60f0 movq 0x90(%r14), %rax movq 0x98(%r14), %rcx leaq 0x18(%rsp), %r8 movq %rax, (%r8) movq %rcx, 0x8(%r8) leaq 0x8(%rsp), %r9 movq %rax, (%r9) movq %rcx, 0x8(%r9) leaq 0x10bbf(%rip), %rcx # 0x23bc8 pushq $0x58 popq %rsi pushq $0x1 popq %rdx movq %rbx, %rdi callq 0xa970 jmp 0x13066 cmpl $0x60, 0x68(%r14) jne 0x13031 addq $0x68, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xa5ae jmp 0x13066 cmpb $0x0, 0xe0(%r14) jne 0x13055 leaq 0x8(%r14), %rsi movq %r14, %rdi movq %r12, %rdx movq %r15, %rcx callq 0x12d1a movb $0x1, 0xe0(%r14) movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %rcx callq 0x13076 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi cmp [rsi+8], edx jnz short loc_12F50 mov rdi, rbx; this mov rsi, r14 call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void) jmp loc_13066 loc_12F50: mov r15, r8 mov r12, rcx cmp edx, 60h ; '`' jz loc_13019 cmp edx, 58h ; 'X' jnz loc_13031 cmp dword ptr [r14+68h], 58h ; 'X' jz loc_13020 mov rax, [r14+98h] inc rax cmp [r14+28h], rax jz short loc_12F94 mov rax, [r14+90h] cmp [r14+20h], rax jbe loc_13031 loc_12F94: mov rdi, cs:_ZSt4cout_ptr lea rsi, aAutoInsertingM; "Auto-inserting missing semicolon at lin"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+90h] mov rdi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aCol; ", col " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+98h] mov rdi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rax, [r14+90h] mov rcx, [r14+98h] lea r8, [rsp+48h+var_30] mov [r8], rax mov [r8+8], rcx lea r9, [rsp+48h+var_40] mov [r9], rax mov [r9+8], rcx lea rcx, asc_23BC8; ";" push 58h ; 'X' pop rsi push 1 pop rdx mov rdi, rbx call _ZN4flux5lexer5TokenC2ENS0_9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEERKNS_6common14SourcePositionESA_; flux::lexer::Token::Token(flux::lexer::TokenType,std::string_view,flux::common::SourcePosition const&,flux::common::SourcePosition const&) jmp short loc_13066 loc_13019: cmp dword ptr [r14+68h], 60h ; '`' jnz short loc_13031 loc_13020: add r14, 68h ; 'h' mov rdi, rbx; this mov rsi, r14; flux::lexer::Token * call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) jmp short loc_13066 loc_13031: cmp byte ptr [r14+0E0h], 0 jnz short loc_13055 lea rsi, [r14+8] mov rdi, r14 mov rdx, r12 mov rcx, r15 call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view) mov byte ptr [r14+0E0h], 1 loc_13055: mov rdi, rbx mov rsi, r14 mov rdx, r12 mov rcx, r15 call _ZN4flux6parser6Parser10errorTokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::errorToken(std::string_view) loc_13066: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn
flux::parser::Parser * flux::parser::Parser::consume( flux::parser::Parser *this, long long a2, int a3, long long a4, long long a5) { long long v7; // rax long long v8; // rdx long long v9; // rax long long v10; // rax long long v11; // rdx long long v12; // rax long long v13; // rcx __int128 v15; // [rsp+8h] [rbp-40h] BYREF __int128 v16; // [rsp+18h] [rbp-30h] BYREF if ( *(_DWORD *)(a2 + 8) == a3 ) { flux::parser::Parser::advance(this, a2); return this; } if ( a3 == 96 ) { if ( *(_DWORD *)(a2 + 104) == 96 ) goto LABEL_10; } else if ( a3 == 88 ) { if ( *(_DWORD *)(a2 + 104) != 88 ) { if ( *(_QWORD *)(a2 + 40) == *(_QWORD *)(a2 + 152) + 1LL || *(_QWORD *)(a2 + 32) > *(_QWORD *)(a2 + 144) ) { v7 = std::operator<<<std::char_traits<char>>(&std::cout, "Auto-inserting missing semicolon at line "); v9 = std::ostream::_M_insert<unsigned long>(v7, *(_QWORD *)(a2 + 144), v8); v10 = std::operator<<<std::char_traits<char>>(v9, ", col "); v12 = std::ostream::_M_insert<unsigned long>(v10, *(_QWORD *)(a2 + 152), v11); std::endl<char,std::char_traits<char>>(v12); v13 = *(_QWORD *)(a2 + 152); *(_QWORD *)&v16 = *(_QWORD *)(a2 + 144); *((_QWORD *)&v16 + 1) = v13; *(_QWORD *)&v15 = v16; *((_QWORD *)&v15 + 1) = v13; flux::lexer::Token::Token((long long)this, 88, 1uLL, ";", &v16, &v15); return this; } goto LABEL_11; } LABEL_10: flux::lexer::Token::Token(this, (const flux::lexer::Token *)(a2 + 104)); return this; } LABEL_11: if ( !*(_BYTE *)(a2 + 224) ) { flux::parser::Parser::error((_BYTE *)a2, a2 + 8, a4, a5); *(_BYTE *)(a2 + 224) = 1; } flux::parser::Parser::errorToken(this, a2, a4, a5); return this; }
consume: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI CMP dword ptr [RSI + 0x8],EDX JNZ 0x00112f50 MOV RDI,RBX MOV RSI,R14 CALL 0x001122ec JMP 0x00113066 LAB_00112f50: MOV R15,R8 MOV R12,RCX CMP EDX,0x60 JZ 0x00113019 CMP EDX,0x58 JNZ 0x00113031 CMP dword ptr [R14 + 0x68],0x58 JZ 0x00113020 MOV RAX,qword ptr [R14 + 0x98] INC RAX CMP qword ptr [R14 + 0x28],RAX JZ 0x00112f94 MOV RAX,qword ptr [R14 + 0x90] CMP qword ptr [R14 + 0x20],RAX JBE 0x00113031 LAB_00112f94: MOV RDI,qword ptr [0x00136fb8] LEA RSI,[0x123b9e] CALL 0x00106220 MOV RSI,qword ptr [R14 + 0x90] MOV RDI,RAX CALL 0x00106170 LEA RSI,[0x1230f3] MOV RDI,RAX CALL 0x00106220 MOV RSI,qword ptr [R14 + 0x98] MOV RDI,RAX CALL 0x00106170 MOV RDI,RAX CALL 0x001060f0 MOV RAX,qword ptr [R14 + 0x90] MOV RCX,qword ptr [R14 + 0x98] LEA R8,[RSP + 0x18] MOV qword ptr [R8],RAX MOV qword ptr [R8 + 0x8],RCX LEA R9,[RSP + 0x8] MOV qword ptr [R9],RAX MOV qword ptr [R9 + 0x8],RCX LEA RCX,[0x123bc8] PUSH 0x58 POP RSI PUSH 0x1 POP RDX MOV RDI,RBX CALL 0x0010a970 JMP 0x00113066 LAB_00113019: CMP dword ptr [R14 + 0x68],0x60 JNZ 0x00113031 LAB_00113020: ADD R14,0x68 MOV RDI,RBX MOV RSI,R14 CALL 0x0010a5ae JMP 0x00113066 LAB_00113031: CMP byte ptr [R14 + 0xe0],0x0 JNZ 0x00113055 LEA RSI,[R14 + 0x8] MOV RDI,R14 MOV RDX,R12 MOV RCX,R15 CALL 0x00112d1a MOV byte ptr [R14 + 0xe0],0x1 LAB_00113055: MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 MOV RCX,R15 CALL 0x00113076 LAB_00113066: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* flux::parser::Parser::consume(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char> >) */ Token * flux::parser::Parser::consume (Token *param_1,long param_2,int param_3,int8 param_4,int8 param_5) { ostream *poVar1; if (*(int *)(param_2 + 8) == param_3) { advance(); return param_1; } if (param_3 == 0x60) { if (*(int *)(param_2 + 0x68) == 0x60) { LAB_00113020: lexer::Token::Token(param_1,(Token *)(param_2 + 0x68)); return param_1; } } else if (param_3 == 0x58) { if (*(int *)(param_2 + 0x68) == 0x58) goto LAB_00113020; if ((*(long *)(param_2 + 0x28) == *(long *)(param_2 + 0x98) + 1) || (*(ulong *)(param_2 + 0x90) < *(ulong *)(param_2 + 0x20))) { poVar1 = std::operator<<((ostream *)PTR_cout_00136fb8, "Auto-inserting missing semicolon at line "); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)poVar1); poVar1 = std::operator<<(poVar1,", col "); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)poVar1); std::endl<char,std::char_traits<char>>(poVar1); lexer::Token::Token(param_1,0x58,1,&DAT_00123bc8); return param_1; } } if (*(char *)(param_2 + 0xe0) == '\0') { error(param_2,param_2 + 8,param_4,param_5); *(int1 *)(param_2 + 0xe0) = 1; } errorToken(param_1,param_2,param_4,param_5); return param_1; }