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
10,100
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& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xeb562 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xeb547 movq %rbx, %rdi movq %r15, %rsi callq 0x1b220 testl %eax, %eax je 0xeb544 addq $0x30, %rbx jmp 0xeb525 movq %rbx, %rax movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xeb5be addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b450 movq %rax, %rbx movq %r14, %rdi callq 0x714aa leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0xdaf4(%rip), %rsi # 0xf907a movq %rsp, %rdi callq 0xb09e7 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8c74a xorl %ebp, %ebp leaq 0x46bfb(%rip), %rsi # 0x1321a8 leaq -0x7dfac(%rip), %rdx # 0x6d608 movq %rbx, %rdi callq 0x1bf60 jmp 0xeb637 movl $0x20, %edi callq 0x1b450 movq %rax, %rbx leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b3f0 leaq (%rax,%r15), %rdx leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x28a68 leaq 0xdab5(%rip), %rsi # 0xf90aa leaq 0xdab4(%rip), %rcx # 0xf90b0 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xb0ff0 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xb136a xorl %ebp, %ebp leaq 0x46b00(%rip), %rsi # 0x132128 leaq -0x7e027(%rip), %rdx # 0x6d608 movq %rbx, %rdi callq 0x1bf60 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xeb65d movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xeb65d movq %rax, %r14 movb $0x1, %bpl movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xeb696 movq 0x30(%rsp), %rsi jmp 0xeb686 jmp 0xeb690 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xeb696 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xeb696 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xeb6a3 movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bff0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_EB562 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] loc_EB525: mov rax, [r12+8] cmp rbx, rax jz short loc_EB547 mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_EB544 add rbx, 30h ; '0' jmp short loc_EB525 loc_EB544: mov rax, rbx loc_EB547: mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_EB5BE add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_EB562: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_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 jmp short loc_EB637 loc_EB5BE: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_38] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] lea rdi, [rsp+68h+var_48] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_EB637: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EB65D mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EB65D mov r14, rax mov bpl, 1 loc_EB65D: mov rdi, [rsp+68h+var_48] cmp rdi, r12 jz short loc_EB696 mov rsi, [rsp+68h+var_38] jmp short loc_EB686 jmp short loc_EB690 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EB696 mov rsi, [rsp+68h+var_58] loc_EB686: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EB696 loc_EB690: mov r14, rax mov bpl, 1 loc_EB696: test bpl, bpl jz short loc_EB6A3 mov rdi, rbx; void * call ___cxa_free_exception loc_EB6A3: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long i; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax _QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF long long v11; // [rsp+30h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v9, (long long)"cannot use at() with ", v10); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); for ( i = *v2; ; i += 48LL ) { v4 = v2[1]; if ( i == v4 ) break; if ( !(unsigned int)std::string::compare(i, a2) ) { v4 = i; break; } } if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = &v11; v8 = strlen(a2); std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v9, (long long)"key '", v10, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v7, 403, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001eb562 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] LAB_001eb525: MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001eb547 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b220 TEST EAX,EAX JZ 0x001eb544 ADD RBX,0x30 JMP 0x001eb525 LAB_001eb544: MOV RAX,RBX LAB_001eb547: MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001eb5be ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001eb562: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX MOV RDI,R14 CALL 0x001714aa LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001eb57f: LEA RSI,[0x1f907a] MOV RDI,RSP CALL 0x001b09e7 MOV BPL,0x1 LAB_001eb591: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018c74a XOR EBP,EBP LEA RSI,[0x2321a8] LEA RDX,[0x16d608] MOV RDI,RBX CALL 0x0011bf60 LAB_001eb5be: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b3f0 LEA RDX,[RAX + R15*0x1] LAB_001eb5e1: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00128a68 LAB_001eb5ee: LEA RSI,[0x1f90aa] LEA RCX,[0x1f90b0] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001b0ff0 MOV BPL,0x1 LAB_001eb60c: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001b136a XOR EBP,EBP LEA RSI,[0x232128] LEA RDX,[0x16d608] MOV RDI,RBX CALL 0x0011bf60
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { int8 *puVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; detail adStack_68 [32]; char *local_48 [2]; char local_38 [16]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001eb57f to 001eb58d has its CatchHandler @ 001eb690 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001eb591 to 001eb5bb has its CatchHandler @ 001eb670 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } puVar1 = *(int8 **)(param_1 + 8); pcVar6 = (char *)*puVar1; while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 && (iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) { pcVar6 = pcVar6 + 0x30; } if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = local_38; sVar5 = strlen(param_2); /* try { // try from 001eb5e1 to 001eb5ed has its CatchHandler @ 001eb66e */ std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5); /* try { // try from 001eb5ee to 001eb608 has its CatchHandler @ 001eb657 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (adStack_68,"key \'",(string *)local_48,"\' not found"); /* try { // try from 001eb60c to 001eb636 has its CatchHandler @ 001eb637 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
10,101
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& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xac8f3 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x826c6 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xac951 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx movq %r14, %rdi callq 0x537d6 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0xd765(%rip), %rsi # 0xba07a leaq 0x8(%rsp), %rdi callq 0x81fcb movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x67d14 xorl %ebp, %ebp leaq 0x55880(%rip), %rsi # 0x1021c0 leaq -0x5c5b1(%rip), %rdx # 0x50396 movq %rbx, %rdi callq 0x24f50 jmp 0xac9bb pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x2a75e leaq 0xd735(%rip), %rsi # 0xba0aa leaq 0xd734(%rip), %rcx # 0xba0b0 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x825d5 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x82a40 xorl %ebp, %ebp leaq 0x55794(%rip), %rsi # 0x102140 leaq -0x5c61d(%rip), %rdx # 0x50396 movq %rbx, %rdi callq 0x24f50 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25258 jmp 0xac9d0 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0xac9e1 jmp 0xac9ed movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25258 testb %bpl, %bpl jne 0xac9f0 jmp 0xac9f8 movq %rax, %r14 movq %rbx, %rdi callq 0x246b0 movq %r14, %rdi callq 0x24fe0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_AC8F3 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_AC951 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_AC8F3: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_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 jmp short loc_AC9BB loc_AC951: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_AC9BB: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_AC9D0 mov r14, rax mov bpl, 1 loc_AC9D0: lea rdi, [rsp+68h+var_40] jmp short loc_AC9E1 jmp short loc_AC9ED mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_AC9E1: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_AC9F0 jmp short loc_AC9F8 loc_AC9ED: mov r14, rax loc_AC9F0: mov rdi, rbx; void * call ___cxa_free_exception loc_AC9F8: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v6, (long long)"cannot use at() with ", v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v6, (long long)"key '", (long long)v7, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001ac8f3 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x001826c6 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001ac951 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001ac8f3: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX MOV RDI,R14 CALL 0x001537d6 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_001ac90e: LEA RSI,[0x1ba07a] LEA RDI,[RSP + 0x8] CALL 0x00181fcb MOV BPL,0x1 LAB_001ac922: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00167d14 XOR EBP,EBP LEA RSI,[0x2021c0] LEA RDX,[0x150396] MOV RDI,RBX CALL 0x00124f50 LAB_001ac951: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_001ac95c: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x0012a75e LAB_001ac96e: LEA RSI,[0x1ba0aa] LEA RCX,[0x1ba0b0] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x001825d5 MOV BPL,0x1 LAB_001ac98e: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00182a40 XOR EBP,EBP LEA RSI,[0x202140] LEA RDX,[0x150396] MOV RDI,RBX CALL 0x00124f50
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001ac90e to 001ac91e has its CatchHandler @ 001ac9ed */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 001ac922 to 001ac94e has its CatchHandler @ 001ac9d9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 001ac95c to 001ac96d has its CatchHandler @ 001ac9d7 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 001ac96e to 001ac98a has its CatchHandler @ 001ac9ca */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 001ac98e to 001ac9ba has its CatchHandler @ 001ac9bb */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
10,102
make_obj_error
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue make_obj_error(JSContext *ctx, JSValue obj, int err) { JSValue arr; if (JS_IsException(obj)) return obj; arr = JS_NewArray(ctx); if (JS_IsException(arr)) return JS_EXCEPTION; JS_DefinePropertyValueUint32(ctx, arr, 0, obj, JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err), JS_PROP_C_W_E); return arr; }
O1
c
make_obj_error: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 cmpl $0x6, %ebx jne 0x19f5e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx jmp 0x19fd2 movl %ecx, %ebp movq %rdi, %r13 callq 0xf664 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x19f7d movl $0x6, %ebx xorl %r14d, %r14d xorl %ecx, %ecx jmp 0x19fd2 movq %rax, %r12 movl $0x7, %eax movl %eax, (%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x25fb1 movl %ebp, %r8d movl $0x7, %eax movl %eax, (%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x1, %ecx xorl %r9d, %r9d callq 0x25fb1 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movq %r12, %r14 movq %r15, %rbx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
make_obj_error: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi cmp ebx, 6 jnz short loc_19F5E mov rcx, 0FFFFFFFF00000000h and rcx, r14 jmp short loc_19FD2 loc_19F5E: mov ebp, ecx mov r13, rdi call JS_NewArray mov r15, rdx cmp r15d, 6 jnz short loc_19F7D mov ebx, 6 xor r14d, r14d xor ecx, ecx jmp short loc_19FD2 loc_19F7D: mov r12, rax mov eax, 7 mov [rsp+38h+var_38], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 xor ecx, ecx mov r8, r14 mov r9, rbx call JS_DefinePropertyValueUint32 mov r8d, ebp mov eax, 7 mov [rsp+38h+var_38], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 mov ecx, 1 xor r9d, r9d call JS_DefinePropertyValueUint32 mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov r14, r12 mov rbx, r15 loc_19FD2: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long make_obj_error(long long a1, long long a2, int a3, int a4) { unsigned int v5; // r14d unsigned long long v6; // rcx long long v8; // rax int v9; // edx int v10; // r15d long long v11; // r12 v5 = a2; if ( a3 == 6 ) { v6 = a2 & 0xFFFFFFFF00000000LL; } else { v8 = JS_NewArray(a1); v10 = v9; if ( v9 == 6 ) { v5 = 0; v6 = 0LL; } else { v11 = v8; JS_DefinePropertyValueUint32(a1, v8, v9, 0, a2, a3, 7); JS_DefinePropertyValueUint32(a1, v11, v10, 1, a4, 0, 7); v6 = v11 & 0xFFFFFFFF00000000LL; v5 = v11; } } return v6 | v5; }
make_obj_error: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI CMP EBX,0x6 JNZ 0x00119f5e MOV RCX,-0x100000000 AND RCX,R14 JMP 0x00119fd2 LAB_00119f5e: MOV EBP,ECX MOV R13,RDI CALL 0x0010f664 MOV R15,RDX CMP R15D,0x6 JNZ 0x00119f7d MOV EBX,0x6 XOR R14D,R14D XOR ECX,ECX JMP 0x00119fd2 LAB_00119f7d: MOV R12,RAX MOV EAX,0x7 MOV dword ptr [RSP],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 XOR ECX,ECX MOV R8,R14 MOV R9,RBX CALL 0x00125fb1 MOV R8D,EBP MOV EAX,0x7 MOV dword ptr [RSP],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV ECX,0x1 XOR R9D,R9D CALL 0x00125fb1 MOV RCX,-0x100000000 AND RCX,R12 MOV R14,R12 MOV RBX,R15 LAB_00119fd2: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] make_obj_error(int8 param_1,ulong param_2,int8 param_3,int4 param_4) { int8 in_RAX; int4 uVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar1; auVar3._8_8_ = param_3; auVar3._0_8_ = param_2; uVar2 = (int4)((ulong)in_RAX >> 0x20); if ((int)param_3 == 6) { param_2 = param_2 & 0xffffffff00000000; } else { auVar3 = JS_NewArray(); uVar1 = auVar3._0_8_; if (auVar3._8_4_ == 6) { auVar3 = ZEXT816(6) << 0x40; param_2 = 0; } else { JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,0,param_2,param_3,CONCAT44(uVar2,7)); JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,1,param_4,0,7); param_2 = uVar1 & 0xffffffff00000000; } } auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | param_2; auVar4._8_8_ = auVar3._8_8_; return auVar4; }
10,103
make_obj_error
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue make_obj_error(JSContext *ctx, JSValue obj, int err) { JSValue arr; if (JS_IsException(obj)) return obj; arr = JS_NewArray(ctx); if (JS_IsException(arr)) return JS_EXCEPTION; JS_DefinePropertyValueUint32(ctx, arr, 0, obj, JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err), JS_PROP_C_W_E); return arr; }
O3
c
make_obj_error: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 cmpl $0x6, %ebx jne 0x1a861 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx jmp 0x1a8d5 movl %ecx, %ebp movq %rdi, %r13 callq 0xf69c movq %rdx, %r15 cmpl $0x6, %r15d jne 0x1a880 movl $0x6, %ebx xorl %r14d, %r14d xorl %ecx, %ecx jmp 0x1a8d5 movq %rax, %r12 movl $0x7, %eax movl %eax, (%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x26688 movl %ebp, %r8d movl $0x7, %eax movl %eax, (%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x1, %ecx xorl %r9d, %r9d callq 0x26688 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movq %r12, %r14 movq %r15, %rbx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
make_obj_error: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi cmp ebx, 6 jnz short loc_1A861 mov rcx, 0FFFFFFFF00000000h and rcx, r14 jmp short loc_1A8D5 loc_1A861: mov ebp, ecx mov r13, rdi call JS_NewArray mov r15, rdx cmp r15d, 6 jnz short loc_1A880 mov ebx, 6 xor r14d, r14d xor ecx, ecx jmp short loc_1A8D5 loc_1A880: mov r12, rax mov eax, 7 mov [rsp+38h+var_38], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 xor ecx, ecx mov r8, r14 mov r9, rbx call JS_DefinePropertyValueUint32 mov r8d, ebp mov eax, 7 mov [rsp+38h+var_38], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 mov ecx, 1 xor r9d, r9d call JS_DefinePropertyValueUint32 mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov r14, r12 mov rbx, r15 loc_1A8D5: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long make_obj_error(long long a1, long long a2, int a3, int a4) { unsigned int v5; // r14d unsigned long long v6; // rcx long long v8; // rax int v9; // edx int v10; // r15d long long v11; // r12 v5 = a2; if ( a3 == 6 ) { v6 = a2 & 0xFFFFFFFF00000000LL; } else { v8 = JS_NewArray(a1); v10 = v9; if ( v9 == 6 ) { v5 = 0; v6 = 0LL; } else { v11 = v8; JS_DefinePropertyValueUint32(a1, v8, v9, 0, a2, a3, 7); JS_DefinePropertyValueUint32(a1, v11, v10, 1, a4, 0, 7); v6 = v11 & 0xFFFFFFFF00000000LL; v5 = v11; } } return v6 | v5; }
make_obj_error: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI CMP EBX,0x6 JNZ 0x0011a861 MOV RCX,-0x100000000 AND RCX,R14 JMP 0x0011a8d5 LAB_0011a861: MOV EBP,ECX MOV R13,RDI CALL 0x0010f69c MOV R15,RDX CMP R15D,0x6 JNZ 0x0011a880 MOV EBX,0x6 XOR R14D,R14D XOR ECX,ECX JMP 0x0011a8d5 LAB_0011a880: MOV R12,RAX MOV EAX,0x7 MOV dword ptr [RSP],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 XOR ECX,ECX MOV R8,R14 MOV R9,RBX CALL 0x00126688 MOV R8D,EBP MOV EAX,0x7 MOV dword ptr [RSP],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV ECX,0x1 XOR R9D,R9D CALL 0x00126688 MOV RCX,-0x100000000 AND RCX,R12 MOV R14,R12 MOV RBX,R15 LAB_0011a8d5: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] make_obj_error(int8 param_1,ulong param_2,int8 param_3,int4 param_4) { int8 in_RAX; int4 uVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar1; auVar3._8_8_ = param_3; auVar3._0_8_ = param_2; uVar2 = (int4)((ulong)in_RAX >> 0x20); if ((int)param_3 == 6) { param_2 = param_2 & 0xffffffff00000000; } else { auVar3 = JS_NewArray(); uVar1 = auVar3._0_8_; if (auVar3._8_4_ == 6) { auVar3 = ZEXT816(6) << 0x40; param_2 = 0; } else { JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,0,param_2,param_3,CONCAT44(uVar2,7)); JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,1,param_4,0,7); param_2 = uVar1 & 0xffffffff00000000; } } auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | param_2; auVar4._8_8_ = auVar3._8_8_; return auVar4; }
10,104
js_default_module_normalize_name
bluesky950520[P]quickjs/quickjs.c
static char *js_default_module_normalize_name(JSContext *ctx, const char *base_name, const char *name) { char *filename, *p; const char *r; int cap; int len; if (name[0] != '.') { /* if no initial dot, the module name is not modified */ return js_strdup(ctx, name); } p = strrchr(base_name, '/'); if (p) len = p - base_name; else len = 0; cap = len + strlen(name) + 1 + 1; filename = js_malloc(ctx, cap); if (!filename) return NULL; memcpy(filename, base_name, len); filename[len] = '\0'; /* we only normalize the leading '..' or '.' */ r = name; for(;;) { if (r[0] == '.' && r[1] == '/') { r += 2; } else if (r[0] == '.' && r[1] == '.' && r[2] == '/') { /* remove the last path element of filename, except if "." or ".." */ if (filename[0] == '\0') break; p = strrchr(filename, '/'); if (!p) p = filename; else p++; if (!strcmp(p, ".") || !strcmp(p, "..")) break; if (p > filename) p--; *p = '\0'; r += 3; } else { break; } } if (filename[0] != '\0') js__pstrcat(filename, cap, "/"); js__pstrcat(filename, cap, r); // printf("normalize: %s %s -> %s\n", base_name, name, filename); return filename; }
O0
c
js_default_module_normalize_name: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x28(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax je 0x73339 movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x20d40 movq %rax, 0x40(%rsp) jmp 0x73542 movq 0x30(%rsp), %rdi movl $0x2f, %esi callq 0xe300 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0x73368 movq 0x18(%rsp), %rax movq 0x30(%rsp), %rcx subq %rcx, %rax movl %eax, 0x8(%rsp) jmp 0x73370 movl $0x0, 0x8(%rsp) movslq 0x8(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi callq 0xe240 movq %rax, %rcx movq (%rsp), %rax addq %rcx, %rax addq $0x1, %rax addq $0x1, %rax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi movslq 0xc(%rsp), %rsi callq 0x209f0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x733c3 movq $0x0, 0x40(%rsp) jmp 0x73542 movq 0x20(%rsp), %rdi movq 0x30(%rsp), %rsi movslq 0x8(%rsp), %rdx callq 0xe5a0 movq 0x20(%rsp), %rax movslq 0x8(%rsp), %rcx movb $0x0, (%rax,%rcx) movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax jne 0x7341d movq 0x10(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x7341d movq 0x10(%rsp), %rax addq $0x2, %rax movq %rax, 0x10(%rsp) jmp 0x734fe movq 0x10(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax jne 0x734fa movq 0x10(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0x2e, %eax jne 0x734fa movq 0x10(%rsp), %rax movzbl 0x2(%rax), %eax cmpl $0x2f, %eax jne 0x734fa movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x0, %eax jne 0x73464 jmp 0x73503 movq 0x20(%rsp), %rdi movl $0x2f, %esi callq 0xe300 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x7348c movq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) jmp 0x7349a movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi leaq 0x9b044(%rip), %rsi # 0x10e4ea callq 0xe500 cmpl $0x0, %eax je 0x734c6 movq 0x18(%rsp), %rdi leaq 0x9b02d(%rip), %rsi # 0x10e4e9 callq 0xe500 cmpl $0x0, %eax jne 0x734c8 jmp 0x73503 movq 0x18(%rsp), %rax cmpq 0x20(%rsp), %rax jbe 0x734e2 movq 0x18(%rsp), %rax addq $-0x1, %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movb $0x0, (%rax) movq 0x10(%rsp), %rax addq $0x3, %rax movq %rax, 0x10(%rsp) jmp 0x734fc jmp 0x73503 jmp 0x734fe jmp 0x733ef movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x0, %eax je 0x73525 movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi leaq 0x94e50(%rip), %rdx # 0x108370 callq 0x1cf10 movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi movq 0x10(%rsp), %rdx callq 0x1cf10 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
js_default_module_normalize_name: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_20] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz short loc_73339 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] call js_strdup mov [rsp+48h+var_8], rax jmp loc_73542 loc_73339: mov rdi, [rsp+48h+var_18] mov esi, 2Fh ; '/' call _strrchr mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jz short loc_73368 mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_18] sub rax, rcx mov [rsp+48h+var_40], eax jmp short loc_73370 loc_73368: mov [rsp+48h+var_40], 0 loc_73370: movsxd rax, [rsp+48h+var_40] mov [rsp+48h+var_48], rax mov rdi, [rsp+48h+var_20] call _strlen mov rcx, rax mov rax, [rsp+48h+var_48] add rax, rcx add rax, 1 add rax, 1 mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_10] movsxd rsi, [rsp+48h+var_3C] call js_malloc mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_733C3 mov [rsp+48h+var_8], 0 jmp loc_73542 loc_733C3: mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_18] movsxd rdx, [rsp+48h+var_40] call _memcpy mov rax, [rsp+48h+var_28] movsxd rcx, [rsp+48h+var_40] mov byte ptr [rax+rcx], 0 mov rax, [rsp+48h+var_20] mov [rsp+48h+var_38], rax loc_733EF: mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz short loc_7341D mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_7341D mov rax, [rsp+48h+var_38] add rax, 2 mov [rsp+48h+var_38], rax jmp loc_734FE loc_7341D: mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_734FA mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+1] cmp eax, 2Eh ; '.' jnz loc_734FA mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+2] cmp eax, 2Fh ; '/' jnz loc_734FA mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 0 jnz short loc_73464 jmp loc_73503 loc_73464: mov rdi, [rsp+48h+var_28] mov esi, 2Fh ; '/' call _strrchr mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_7348C mov rax, [rsp+48h+var_28] mov [rsp+48h+var_30], rax jmp short loc_7349A loc_7348C: mov rax, [rsp+48h+var_30] add rax, 1 mov [rsp+48h+var_30], rax loc_7349A: mov rdi, [rsp+48h+var_30] lea rsi, aMissingBinding+19h; "." call _strcmp cmp eax, 0 jz short loc_734C6 mov rdi, [rsp+48h+var_30] lea rsi, aMissingBinding+18h; ".." call _strcmp cmp eax, 0 jnz short loc_734C8 loc_734C6: jmp short loc_73503 loc_734C8: mov rax, [rsp+48h+var_30] cmp rax, [rsp+48h+var_28] jbe short loc_734E2 mov rax, [rsp+48h+var_30] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_30], rax loc_734E2: mov rax, [rsp+48h+var_30] mov byte ptr [rax], 0 mov rax, [rsp+48h+var_38] add rax, 3 mov [rsp+48h+var_38], rax jmp short loc_734FC loc_734FA: jmp short loc_73503 loc_734FC: jmp short $+2 loc_734FE: jmp loc_733EF loc_73503: mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 0 jz short loc_73525 mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] lea rdx, asc_10836F+1; "/" call js__pstrcat loc_73525: mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] mov rdx, [rsp+48h+var_38] call js__pstrcat mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax loc_73542: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long js_default_module_normalize_name(long long a1, long long a2, char *a3) { int v3; // eax int v5; // [rsp+8h] [rbp-40h] int v6; // [rsp+Ch] [rbp-3Ch] char *i; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] long long v9; // [rsp+18h] [rbp-30h] _BYTE *v10; // [rsp+18h] [rbp-30h] _BYTE *v11; // [rsp+20h] [rbp-28h] if ( *a3 != 46 ) return js_strdup(a1, (long long)a3); v8 = strrchr(a2, 47LL); if ( v8 ) v5 = v8 - a2; else v5 = 0; v6 = strlen(a3) + v5 + 2; v11 = (_BYTE *)js_malloc(a1, v6); if ( !v11 ) return 0LL; memcpy(v11, a2, v5); v11[v5] = 0; for ( i = a3; ; i += 3 ) { while ( *i == 46 && i[1] == 47 ) i += 2; if ( *i != 46 || i[1] != 46 || i[2] != 47 || !*v11 ) break; v9 = strrchr(v11, 47LL); if ( v9 ) { v10 = (_BYTE *)(v9 + 1); v3 = strcmp(v10, "."); } else { v10 = v11; v3 = strcmp(v11, "."); } if ( !v3 || !(unsigned int)strcmp(v10, "..") ) break; if ( v10 > v11 ) --v10; *v10 = 0; } if ( *v11 ) js__pstrcat((long long)v11, v6, "/"); js__pstrcat((long long)v11, v6, i); return (long long)v11; }
js_default_module_normalize_name: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x00173339 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00120d40 MOV qword ptr [RSP + 0x40],RAX JMP 0x00173542 LAB_00173339: MOV RDI,qword ptr [RSP + 0x30] MOV ESI,0x2f CALL 0x0010e300 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x00173368 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x30] SUB RAX,RCX MOV dword ptr [RSP + 0x8],EAX JMP 0x00173370 LAB_00173368: MOV dword ptr [RSP + 0x8],0x0 LAB_00173370: MOVSXD RAX,dword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x0010e240 MOV RCX,RAX MOV RAX,qword ptr [RSP] ADD RAX,RCX ADD RAX,0x1 ADD RAX,0x1 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RSI,dword ptr [RSP + 0xc] CALL 0x001209f0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001733c3 MOV qword ptr [RSP + 0x40],0x0 JMP 0x00173542 LAB_001733c3: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x30] MOVSXD RDX,dword ptr [RSP + 0x8] CALL 0x0010e5a0 MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x8] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX LAB_001733ef: MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0017341d MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x0017341d MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x2 MOV qword ptr [RSP + 0x10],RAX JMP 0x001734fe LAB_0017341d: MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x001734fa MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2e JNZ 0x001734fa MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0x2f JNZ 0x001734fa MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00173464 JMP 0x00173503 LAB_00173464: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2f CALL 0x0010e300 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x0017348c MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX JMP 0x0017349a LAB_0017348c: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX LAB_0017349a: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x20e4ea] CALL 0x0010e500 CMP EAX,0x0 JZ 0x001734c6 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x20e4e9] CALL 0x0010e500 CMP EAX,0x0 JNZ 0x001734c8 LAB_001734c6: JMP 0x00173503 LAB_001734c8: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x20] JBE 0x001734e2 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x1 MOV qword ptr [RSP + 0x18],RAX LAB_001734e2: MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x3 MOV qword ptr [RSP + 0x10],RAX JMP 0x001734fc LAB_001734fa: JMP 0x00173503 LAB_001734fc: JMP 0x001734fe LAB_001734fe: JMP 0x001733ef LAB_00173503: MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00173525 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] LEA RDX,[0x208370] CALL 0x0011cf10 LAB_00173525: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011cf10 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX LAB_00173542: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
char * js_default_module_normalize_name(int8 param_1,char *param_2,char *param_3) { int iVar1; int iVar2; char *pcVar3; size_t sVar4; int local_40; char *local_38; char *local_30; char *local_8; if (*param_3 == '.') { pcVar3 = strrchr(param_2,0x2f); if (pcVar3 == (char *)0x0) { local_40 = 0; } else { local_40 = (int)pcVar3 - (int)param_2; } sVar4 = strlen(param_3); iVar1 = local_40 + (int)sVar4 + 2; local_8 = (char *)js_malloc(param_1,(long)iVar1); if (local_8 == (char *)0x0) { local_8 = (char *)0x0; } else { memcpy(local_8,param_2,(long)local_40); local_8[local_40] = '\0'; local_38 = param_3; while( true ) { for (; (*local_38 == '.' && (local_38[1] == '/')); local_38 = local_38 + 2) { } if ((*local_38 != '.') || (((local_38[1] != '.' || (local_38[2] != '/')) || (*local_8 == '\0')))) break; pcVar3 = strrchr(local_8,0x2f); local_30 = local_8; if (pcVar3 != (char *)0x0) { local_30 = pcVar3 + 1; } iVar2 = strcmp(local_30,"."); if ((iVar2 == 0) || (iVar2 = strcmp(local_30,".."), iVar2 == 0)) break; if (local_8 < local_30) { local_30 = local_30 + -1; } *local_30 = '\0'; local_38 = local_38 + 3; } if (*local_8 != '\0') { js__pstrcat(local_8,iVar1,&DAT_00208370); } js__pstrcat(local_8,iVar1,local_38); } } else { local_8 = (char *)js_strdup(param_1,param_3); } return local_8; }
10,105
JS_ReadSharedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadSharedArrayBuffer(BCReaderState *s) { JSContext *ctx = s->ctx; uint32_t byte_length, max_byte_length; uint64_t max_byte_length_u64, *pmax_byte_length = NULL; uint8_t *data_ptr; JSValue obj; uint64_t u64; if (bc_get_leb128(s, &byte_length)) return JS_EXCEPTION; if (bc_get_leb128(s, &max_byte_length)) return JS_EXCEPTION; if (max_byte_length < byte_length) return JS_ThrowTypeError(ctx, "invalid array buffer"); if (max_byte_length != UINT32_MAX) { max_byte_length_u64 = max_byte_length; pmax_byte_length = &max_byte_length_u64; } if (bc_get_u64(s, &u64)) return JS_EXCEPTION; data_ptr = (uint8_t *)(uintptr_t)u64; if (js_resize_array(s->ctx, (void **)&s->sab_tab, sizeof(s->sab_tab[0]), &s->sab_tab_size, s->sab_tab_len + 1)) return JS_EXCEPTION; /* keep the SAB pointer so that the user can clone it or free it */ s->sab_tab[s->sab_tab_len++] = data_ptr; /* the SharedArrayBuffer is cloned */ obj = js_array_buffer_constructor3(ctx, JS_UNDEFINED, byte_length, pmax_byte_length, JS_CLASS_SHARED_ARRAY_BUFFER, data_ptr, NULL, NULL, FALSE); if (JS_IsException(obj)) goto fail; if (BC_add_object_ref(s, obj)) goto fail; return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
JS_ReadSharedArrayBuffer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r15 movq (%rdi), %r14 leaq 0x24(%rsp), %rsi callq 0x45a75 movl $0x6, %ebx testl %eax, %eax jne 0x46a66 leaq 0x20(%rsp), %rsi movq %r15, %rdi callq 0x45a75 testl %eax, %eax je 0x46a83 xorl %r15d, %r15d xorl %eax, %eax orq %rax, %r15 movq %r15, %rax movq %rbx, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x20(%rsp), %eax movl 0x24(%rsp), %r12d cmpl %r12d, %eax jae 0x46aa7 leaq 0x58f70(%rip), %rsi # 0x9fa08 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x46a69 cmpl $-0x1, %eax je 0x46ab7 leaq 0x30(%rsp), %r13 movq %rax, (%r13) jmp 0x46aba xorl %r13d, %r13d leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x45c22 testl %eax, %eax jne 0x46a66 movq 0x28(%rsp), %rbp movl 0x50(%r15), %r8d cmpl %r8d, 0x54(%r15) jle 0x46b6a movq 0x48(%r15), %rax movslq 0x50(%r15), %rcx leal 0x1(%rcx), %edx movl %edx, 0x50(%r15) movq %rbp, (%rax,%rcx,8) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rbp, (%rsp) movl $0x0, 0x18(%rsp) movl $0x3, %edx movq %r14, %rdi xorl %esi, %esi movq %r12, %rcx movq %r13, %r8 movl $0x14, %r9d callq 0x38c19 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x46b3b movq %r15, %rdi movq %r13, %rsi callq 0x47091 testl %eax, %eax je 0x46b4f movq 0x18(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 jmp 0x46a66 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r13, %rax andq %rcx, %rax movl %r13d, %r15d movq %r12, %rbx jmp 0x46a6b leaq 0x48(%r15), %rsi leaq 0x54(%r15), %rcx incl %r8d movq (%r15), %rdi movl $0x8, %edx callq 0x434ef testl %eax, %eax jne 0x46a66 jmp 0x46ade
JS_ReadSharedArrayBuffer: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rdi mov r14, [rdi] lea rsi, [rsp+68h+var_44] call bc_get_leb128 mov ebx, 6 test eax, eax jnz short loc_46A66 lea rsi, [rsp+68h+var_48] mov rdi, r15 call bc_get_leb128 test eax, eax jz short loc_46A83 loc_46A66: xor r15d, r15d loc_46A69: xor eax, eax loc_46A6B: or r15, rax mov rax, r15 mov rdx, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_46A83: mov eax, [rsp+68h+var_48] mov r12d, [rsp+68h+var_44] cmp eax, r12d jnb short loc_46AA7 lea rsi, aInvalidArrayBu_0; "invalid array buffer" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp short loc_46A69 loc_46AA7: cmp eax, 0FFFFFFFFh jz short loc_46AB7 lea r13, [rsp+68h+var_38] mov [r13+0], rax jmp short loc_46ABA loc_46AB7: xor r13d, r13d loc_46ABA: lea rsi, [rsp+68h+var_40] mov rdi, r15 call bc_get_u64 test eax, eax jnz short loc_46A66 mov rbp, [rsp+68h+var_40] mov r8d, [r15+50h] cmp [r15+54h], r8d jle loc_46B6A loc_46ADE: mov rax, [r15+48h] movsxd rcx, dword ptr [r15+50h] lea edx, [rcx+1] mov [r15+50h], edx mov [rax+rcx*8], rbp xorps xmm0, xmm0 movups [rsp+68h+var_60], xmm0 mov [rsp+68h+var_68], rbp mov [rsp+68h+var_50], 0 mov edx, 3 mov rdi, r14 xor esi, esi mov rcx, r12 mov r8, r13 mov r9d, 14h call js_array_buffer_constructor3 mov r13, rax mov r12, rdx cmp r12d, 6 jz short loc_46B3B mov rdi, r15 mov rsi, r13 call BC_add_object_ref1 test eax, eax jz short loc_46B4F loc_46B3B: mov rdi, [r14+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT jmp loc_46A66 loc_46B4F: mov rcx, 0FFFFFFFF00000000h mov rax, r13 and rax, rcx mov r15d, r13d mov rbx, r12 jmp loc_46A6B loc_46B6A: lea rsi, [r15+48h] lea rcx, [r15+54h] inc r8d mov rdi, [r15] mov edx, 8 call js_realloc_array test eax, eax jnz loc_46A66 jmp loc_46ADE
unsigned long long JS_ReadSharedArrayBuffer( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, unsigned long long a13) { long long v13; // r14 long long v14; // rdx int v15; // ecx unsigned long long v16; // r8 long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v23; // r15 unsigned long long v24; // rax unsigned long long v26; // r12 int *v27; // r13 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rbp int v31; // r8d long long v32; // rax long long v33; // rcx unsigned long long v34; // rax unsigned long long v35; // r13 long long v36; // rdx long long v37; // r12 char v38; // [rsp+0h] [rbp-68h] unsigned int v39; // [rsp+20h] [rbp-48h] BYREF unsigned int v40; // [rsp+24h] [rbp-44h] BYREF long long v41; // [rsp+28h] [rbp-40h] BYREF long long v42; // [rsp+30h] [rbp-38h] BYREF v13 = *(_QWORD *)a1; if ( !(unsigned int)bc_get_leb128(a1, &v40, a11, a12, a13) && !(unsigned int)bc_get_leb128(a1, &v39, v14, v15, v16) ) { v26 = v40; if ( v39 < v40 ) { v23 = 0LL; JS_ThrowTypeError(v13, (long long)"invalid array buffer", v17, v18, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9, v38); goto LABEL_4; } if ( v39 == -1 ) { v27 = 0LL; } else { v27 = (int *)&v42; v42 = v39; } if ( !(unsigned int)bc_get_u64(a1, &v41, v17, v18, v19, v20) ) { v30 = v41; v31 = *(_DWORD *)(a1 + 80); if ( *(_DWORD *)(a1 + 84) > v31 || !(unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 72), 8u, (_DWORD *)(a1 + 84), v31 + 1) ) { v32 = *(_QWORD *)(a1 + 72); v33 = *(int *)(a1 + 80); *(_DWORD *)(a1 + 80) = v33 + 1; *(_QWORD *)(v32 + 8 * v33) = v30; v34 = js_array_buffer_constructor3( v13, 0LL, 3LL, v26, v27, 20LL, (__m128)0LL, a3, a4, a5, v28, v29, a8, a9, v30, 0LL, 0LL, 0); v35 = v34; v37 = v36; if ( (_DWORD)v36 != 6 && !(unsigned int)BC_add_object_ref1(a1, v34) ) { v24 = v35 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v35; return v24 | v23; } JS_FreeValueRT(*(_QWORD *)(v13 + 24), (_DWORD *)v35, v37); } } } v23 = 0LL; LABEL_4: v24 = 0LL; return v24 | v23; }
JS_ReadSharedArrayBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDI MOV R14,qword ptr [RDI] LEA RSI,[RSP + 0x24] CALL 0x00145a75 MOV EBX,0x6 TEST EAX,EAX JNZ 0x00146a66 LEA RSI,[RSP + 0x20] MOV RDI,R15 CALL 0x00145a75 TEST EAX,EAX JZ 0x00146a83 LAB_00146a66: XOR R15D,R15D LAB_00146a69: XOR EAX,EAX LAB_00146a6b: OR R15,RAX MOV RAX,R15 MOV RDX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00146a83: MOV EAX,dword ptr [RSP + 0x20] MOV R12D,dword ptr [RSP + 0x24] CMP EAX,R12D JNC 0x00146aa7 LEA RSI,[0x19fa08] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x00146a69 LAB_00146aa7: CMP EAX,-0x1 JZ 0x00146ab7 LEA R13,[RSP + 0x30] MOV qword ptr [R13],RAX JMP 0x00146aba LAB_00146ab7: XOR R13D,R13D LAB_00146aba: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x00145c22 TEST EAX,EAX JNZ 0x00146a66 MOV RBP,qword ptr [RSP + 0x28] MOV R8D,dword ptr [R15 + 0x50] CMP dword ptr [R15 + 0x54],R8D JLE 0x00146b6a LAB_00146ade: MOV RAX,qword ptr [R15 + 0x48] MOVSXD RCX,dword ptr [R15 + 0x50] LEA EDX,[RCX + 0x1] MOV dword ptr [R15 + 0x50],EDX MOV qword ptr [RAX + RCX*0x8],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RBP MOV dword ptr [RSP + 0x18],0x0 MOV EDX,0x3 MOV RDI,R14 XOR ESI,ESI MOV RCX,R12 MOV R8,R13 MOV R9D,0x14 CALL 0x00138c19 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00146b3b MOV RDI,R15 MOV RSI,R13 CALL 0x00147091 TEST EAX,EAX JZ 0x00146b4f LAB_00146b3b: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 JMP 0x00146a66 LAB_00146b4f: MOV RCX,-0x100000000 MOV RAX,R13 AND RAX,RCX MOV R15D,R13D MOV RBX,R12 JMP 0x00146a6b LAB_00146b6a: LEA RSI,[R15 + 0x48] LEA RCX,[R15 + 0x54] INC R8D MOV RDI,qword ptr [R15] MOV EDX,0x8 CALL 0x001434ef TEST EAX,EAX JNZ 0x00146a66 JMP 0x00146ade
int1 [16] JS_ReadSharedArrayBuffer(long *param_1) { long lVar1; long lVar2; int iVar3; ulong uVar4; int8 uVar5; ulong *puVar6; ulong uVar7; int1 auVar8 [16]; uint local_48; uint local_44; int8 local_40; ulong local_38; lVar1 = *param_1; iVar3 = bc_get_leb128(param_1,&local_44); if ((iVar3 == 0) && (iVar3 = bc_get_leb128(param_1,&local_48), iVar3 == 0)) { if (local_48 < local_44) { JS_ThrowTypeError(lVar1,"invalid array buffer"); } else { if (local_48 == 0xffffffff) { puVar6 = (ulong *)0x0; } else { puVar6 = &local_38; local_38 = (ulong)local_48; } iVar3 = bc_get_u64(param_1,&local_40); if ((iVar3 == 0) && (((int)param_1[10] < *(int *)((long)param_1 + 0x54) || (iVar3 = js_realloc_array(*param_1,param_1 + 9,8,(long)param_1 + 0x54,(int)param_1[10] + 1 ), iVar3 == 0)))) { lVar2 = param_1[10]; *(int *)(param_1 + 10) = (int)lVar2 + 1; *(int8 *)(param_1[9] + (long)(int)lVar2 * 8) = local_40; auVar8 = js_array_buffer_constructor3(lVar1,0,3,local_44,puVar6,0x14,local_40,0,0,0); uVar5 = auVar8._8_8_; uVar7 = auVar8._0_8_; if ((auVar8._8_4_ != 6) && (iVar3 = BC_add_object_ref1(param_1,uVar7), iVar3 == 0)) { uVar4 = uVar7 & 0xffffffff00000000; uVar7 = uVar7 & 0xffffffff; goto LAB_00146a6b; } JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),uVar7,uVar5); } } } uVar7 = 0; uVar4 = 0; uVar5 = 6; LAB_00146a6b: auVar8._8_8_ = uVar5; auVar8._0_8_ = uVar7 | uVar4; return auVar8; }
10,106
common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
llama.cpp/common/chat.cpp
std::string common_chat_format_single( const struct common_chat_templates * tmpls, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { common_chat_templates_inputs inputs; inputs.use_jinja = use_jinja; std::string fmt_past_msg; if (!past_msg.empty()) { inputs.messages = past_msg; inputs.add_generation_prompt = false; fmt_past_msg = common_chat_templates_apply(tmpls, inputs).prompt; } std::ostringstream ss; // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg inputs.messages.push_back(new_msg); inputs.add_generation_prompt = add_ass; auto fmt_new_msg = common_chat_templates_apply(tmpls, inputs).prompt; // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O3
cpp
common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movl %r8d, %ebp movq %rcx, %r15 movq %rsi, %r14 movq %rdi, 0x40(%rsp) xorl %eax, %eax leaq 0x108(%rsp), %r13 movq %rax, -0x18(%r13) xorps %xmm0, %xmm0 movaps %xmm0, -0x28(%r13) movq %r13, -0x10(%r13) movq %rax, -0x8(%r13) movb %al, (%r13) leaq 0x128(%rsp), %rbx movq %rbx, -0x10(%rbx) movq %rax, -0x8(%rbx) movb %al, (%rbx) movb $0x1, %cl movb %cl, 0x10(%rbx) movaps %xmm0, 0x18(%rbx) movups %xmm0, 0x25(%rbx) movb %cl, 0x35(%rbx) movb %r9b, 0x11(%rbx) leaq 0x10(%rsp), %rcx movq %rcx, -0x10(%rcx) movq %rax, -0x8(%rcx) movb %al, (%rcx) movq (%rdx), %rax cmpq 0x8(%rdx), %rax je 0xbb64b leaq 0xe0(%rsp), %rdi movq %rdx, %rsi callq 0xd6f0e leaq 0xe0(%rsp), %rdx movb $0x0, 0x58(%rdx) leaq 0x160(%rsp), %rdi movq %r14, %rsi callq 0xb90e7 leaq 0x168(%rsp), %rsi movq %rsp, %rdi callq 0x23ba0 leaq 0x1e0(%rsp), %rdi callq 0x2c50a leaq 0x1c8(%rsp), %rdi callq 0x2c50a leaq 0x1b0(%rsp), %r12 movq %r12, %rdi callq 0x2cb1e movq -0x28(%r12), %rdi leaq 0x198(%rsp), %rax cmpq %rax, %rdi je 0xbb62a movq 0x198(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0x178(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb64b movq 0x178(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0x160(%rsp), %rdi callq 0x245e0 testb %bpl, %bpl je 0xbb68b movq 0x8(%rsp), %rax testq %rax, %rax je 0xbb68b movq (%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0xbb68b leaq 0x8b576(%rip), %rsi # 0x146bef leaq 0x160(%rsp), %rdi movl $0x1, %edx callq 0x24690 leaq 0xe0(%rsp), %rdi movq %r15, %rsi callq 0xd63e6 leaq 0xe0(%rsp), %rdx movb %bpl, 0x58(%rdx) leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0xb90e7 leaq 0x30(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x60(%rsp), %r15 movq -0x10(%r15), %rax cmpq %r15, %rax je 0xbb6e1 movq %rax, 0x20(%rsp) movq 0x58(%rsp), %r12 movq 0x60(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0xbb6f6 movq 0x58(%rsp), %r12 leaq 0x1(%r12), %rdx movq %r14, %rdi movq %r15, %rsi callq 0x23150 movq %r12, 0x28(%rsp) leaq 0xc8(%rsp), %rdi movq %r15, -0x78(%rdi) movq $0x0, -0x70(%rdi) movb $0x0, -0x68(%rdi) callq 0x2c50a leaq 0xb0(%rsp), %rdi callq 0x2c50a leaq 0x98(%rsp), %r12 movq %r12, %rdi callq 0x2cb1e movq -0x28(%r12), %rdi leaq 0x80(%rsp), %rax cmpq %rax, %rdi je 0xbb757 movq 0x80(%rsp), %rsi incq %rsi callq 0x231f0 movq 0x50(%rsp), %rdi cmpq %r15, %rdi je 0xbb76e movq 0x60(%rsp), %rsi incq %rsi callq 0x231f0 movq 0x8(%rsp), %rdx leaq 0x20(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x48(%rsp), %rdi callq 0x24710 movq 0x40(%rsp), %r15 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x160(%rsp), %rdi callq 0x24690 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb7c0 movq 0x58(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0x168(%rsp), %rsi movq %r15, %rdi callq 0x23860 movq 0x20(%rsp), %rdi cmpq %r14, %rdi je 0xbb7e7 movq 0x30(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0x140(%rsp), %r14 movq 0xd3762(%rip), %rsi # 0x18ef58 leaq 0x160(%rsp), %rdi callq 0x240c0 leaq 0x1d0(%rsp), %rdi callq 0x24080 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xbb82b movq 0x10(%rsp), %rsi incq %rsi callq 0x231f0 movq %r14, %rdi callq 0xd6ca0 movq 0x118(%rsp), %rdi cmpq %rbx, %rdi je 0xbb850 movq 0x128(%rsp), %rsi incq %rsi callq 0x231f0 movq 0xf8(%rsp), %rdi cmpq %r13, %rdi je 0xbb86d movq 0x108(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0xe0(%rsp), %rdi callq 0xd6572 movq %r15, %rax addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xbb8d3 jmp 0xbb8d3 jmp 0xbb8b5 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb8b8 movq 0x58(%rsp), %rsi incq %rsi callq 0x231f0 jmp 0xbb8b8 movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r14, %rdi je 0xbb8db movq 0x30(%rsp), %rsi incq %rsi callq 0x231f0 jmp 0xbb8db jmp 0xbb8d8 movq %rax, %rbx jmp 0xbb8fc movq %rax, %rbx movq 0xd3676(%rip), %rsi # 0x18ef58 leaq 0x160(%rsp), %rdi callq 0x240c0 leaq 0x1d0(%rsp), %rdi callq 0x24080 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xbb917 movq 0x10(%rsp), %rsi incq %rsi callq 0x231f0 leaq 0xe0(%rsp), %rdi callq 0xd6ec8 movq %rbx, %rdi callq 0x23ee0
_Z25common_chat_format_singleB5cxx11PK21common_chat_templatesRKSt6vectorI15common_chat_msgSaIS3_EERKS3_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2D8h mov ebp, r8d mov r15, rcx mov r14, rsi mov [rsp+308h+var_2C8], rdi xor eax, eax lea r13, [rsp+308h+var_200] mov [r13-18h], rax xorps xmm0, xmm0 movaps xmmword ptr [r13-28h], xmm0 mov [r13-10h], r13 mov [r13-8], rax mov [r13+0], al lea rbx, [rsp+308h+var_1E0] mov [rbx-10h], rbx mov [rbx-8], rax mov [rbx], al mov cl, 1 mov [rbx+10h], cl movaps xmmword ptr [rbx+18h], xmm0 movups xmmword ptr [rbx+25h], xmm0 mov [rbx+35h], cl mov [rbx+11h], r9b lea rcx, [rsp+308h+var_2F8] mov [rcx-10h], rcx mov [rcx-8], rax mov [rcx], al mov rax, [rdx] cmp rax, [rdx+8] jz loc_BB64B lea rdi, [rsp+308h+var_228] mov rsi, rdx call _ZNSt6vectorI15common_chat_msgSaIS0_EEaSERKS2_; std::vector<common_chat_msg>::operator=(std::vector<common_chat_msg> const&) lea rdx, [rsp+308h+var_228] mov byte ptr [rdx+58h], 0 lea rdi, [rsp+308h+var_1A8] mov rsi, r14 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea rsi, [rsp+308h+var_1A0] mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+308h+var_128] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+308h+var_140] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea r12, [rsp+308h+var_158] mov rdi, r12 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [r12-28h]; void * lea rax, [rsp+308h+var_170] cmp rdi, rax jz short loc_BB62A mov rsi, [rsp+308h+var_170] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB62A: lea rax, [rsp+308h+var_190] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BB64B mov rsi, [rsp+308h+var_190] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB64B: lea rdi, [rsp+308h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) test bpl, bpl jz short loc_BB68B mov rax, [rsp+308h+var_300] test rax, rax jz short loc_BB68B mov rcx, [rsp+308h+var_308] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_BB68B lea rsi, aExampleToolCal+1Ch; "\n" lea rdi, [rsp+308h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_BB68B: lea rdi, [rsp+308h+var_228] mov rsi, r15 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) lea rdx, [rsp+308h+var_228] mov [rdx+58h], bpl lea rdi, [rsp+308h+var_2C0] mov rsi, r14 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea r14, [rsp+308h+var_2D8] mov [r14-10h], r14 lea r15, [rsp+308h+var_2A8] mov rax, [r15-10h] cmp rax, r15 jz short loc_BB6E1 mov [rsp+308h+var_2E8], rax mov r12, [rsp+308h+var_2B0] mov rax, [rsp+308h+var_2A8] mov [rsp+308h+var_2D8], rax jmp short loc_BB6F6 loc_BB6E1: mov r12, [rsp+308h+var_2B0] lea rdx, [r12+1] mov rdi, r14 mov rsi, r15 call _memcpy loc_BB6F6: mov [rsp+308h+var_2E0], r12 lea rdi, [rsp+308h+var_240] mov [rdi-78h], r15 mov qword ptr [rdi-70h], 0 mov byte ptr [rdi-68h], 0 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+308h+var_258] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea r12, [rsp+308h+var_270] mov rdi, r12 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [r12-28h]; void * lea rax, [rsp+308h+var_288] cmp rdi, rax jz short loc_BB757 mov rsi, [rsp+308h+var_288] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB757: mov rdi, [rsp+308h+var_2B8]; void * cmp rdi, r15 jz short loc_BB76E mov rsi, [rsp+308h+var_2A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB76E: mov rdx, [rsp+308h+var_300] lea rsi, [rsp+308h+var_2E8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+308h+var_2C0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov r15, [rsp+308h+var_2C8] mov rsi, [rsp+308h+var_2C0] mov rdx, [rsp+308h+var_2B8] lea rdi, [rsp+308h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+308h+var_2B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BB7C0 mov rsi, [rsp+308h+var_2B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB7C0: lea rsi, [rsp+308h+var_1A0] mov rdi, r15 call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, [rsp+308h+var_2E8]; void * cmp rdi, r14 jz short loc_BB7E7 mov rsi, [rsp+308h+var_2D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB7E7: lea r14, [rsp+308h+var_1C8] mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+308h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+308h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, [rsp+308h+var_308]; void * lea rax, [rsp+308h+var_2F8] cmp rdi, rax jz short loc_BB82B mov rsi, [rsp+308h+var_2F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB82B: mov rdi, r14 call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector() mov rdi, [rsp+308h+var_1F0]; void * cmp rdi, rbx jz short loc_BB850 mov rsi, [rsp+308h+var_1E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB850: mov rdi, [rsp+308h+var_210]; void * cmp rdi, r13 jz short loc_BB86D mov rsi, [rsp+308h+var_200] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB86D: lea rdi, [rsp+308h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 2D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_BB8D3 jmp short loc_BB8D3 jmp short loc_BB8B5 mov rbx, rax lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BB8B8 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BB8B8 loc_BB8B5: mov rbx, rax loc_BB8B8: mov rdi, [rsp+arg_18]; void * cmp rdi, r14 jz short loc_BB8DB mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BB8DB jmp short loc_BB8D8 loc_BB8D3: mov rbx, rax jmp short loc_BB8FC loc_BB8D8: mov rbx, rax loc_BB8DB: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_158] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_1C8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_BB8FC: mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_BB917 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB917: lea rdi, [rsp+arg_D8]; this call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, long long a2, _QWORD *a3, long long a4, char a5, char a6) { long long v8; // r12 long long v9; // r15 void *v11; // [rsp+0h] [rbp-308h] BYREF long long v12; // [rsp+8h] [rbp-300h] _QWORD v13[2]; // [rsp+10h] [rbp-2F8h] BYREF void *v14; // [rsp+20h] [rbp-2E8h] BYREF long long v15; // [rsp+28h] [rbp-2E0h] _QWORD v16[2]; // [rsp+30h] [rbp-2D8h] BYREF long long v17; // [rsp+40h] [rbp-2C8h] long long *v18; // [rsp+48h] [rbp-2C0h] BYREF void *v19; // [rsp+50h] [rbp-2B8h] long long v20; // [rsp+58h] [rbp-2B0h] BYREF _QWORD v21[2]; // [rsp+60h] [rbp-2A8h] BYREF long long *v22; // [rsp+70h] [rbp-298h] long long v23; // [rsp+80h] [rbp-288h] BYREF _BYTE v24[24]; // [rsp+98h] [rbp-270h] BYREF _BYTE v25[24]; // [rsp+B0h] [rbp-258h] BYREF _BYTE v26[24]; // [rsp+C8h] [rbp-240h] BYREF __int128 v27; // [rsp+E0h] [rbp-228h] BYREF long long v28; // [rsp+F0h] [rbp-218h] void *v29; // [rsp+F8h] [rbp-210h] long long v30; // [rsp+100h] [rbp-208h] _QWORD v31[2]; // [rsp+108h] [rbp-200h] BYREF void *v32; // [rsp+118h] [rbp-1F0h] long long v33; // [rsp+120h] [rbp-1E8h] _QWORD v34[2]; // [rsp+128h] [rbp-1E0h] BYREF char v35; // [rsp+138h] [rbp-1D0h] char v36; // [rsp+139h] [rbp-1CFh] _BYTE v37[32]; // [rsp+140h] [rbp-1C8h] BYREF _BYTE v38[8]; // [rsp+160h] [rbp-1A8h] BYREF void *v39[2]; // [rsp+168h] [rbp-1A0h] BYREF long long v40; // [rsp+178h] [rbp-190h] BYREF long long *v41; // [rsp+188h] [rbp-180h] long long v42; // [rsp+198h] [rbp-170h] BYREF _BYTE v43[24]; // [rsp+1B0h] [rbp-158h] BYREF _BYTE v44[8]; // [rsp+1C8h] [rbp-140h] BYREF _BYTE v45[16]; // [rsp+1D0h] [rbp-138h] BYREF _BYTE v46[296]; // [rsp+1E0h] [rbp-128h] BYREF v17 = a1; v28 = 0LL; v27 = 0LL; v29 = v31; v30 = 0LL; LOBYTE(v31[0]) = 0; v32 = v34; v33 = 0LL; LOBYTE(v34[0]) = 0; v35 = 1; memset(v37, 0, 29); v37[29] = 1; v36 = a6; v11 = v13; v12 = 0LL; LOBYTE(v13[0]) = 0; if ( *a3 != a3[1] ) { std::vector<common_chat_msg>::operator=(&v27, a3); v35 = 0; common_chat_templates_apply((long long)v38, a2, (long long *)&v27); std::string::operator=(&v11, v39); std::vector<std::string>::~vector((long long)v46); std::vector<std::string>::~vector((long long)v44); std::vector<common_grammar_trigger>::~vector((long long)v43); if ( v41 != &v42 ) operator delete(v41, v42 + 1); if ( v39[0] != &v40 ) operator delete(v39[0], v40 + 1); } std::ostringstream::basic_ostringstream(v38); if ( a5 && v12 && *((char *)v11 + v12 - 1) == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v38, "\n", 1LL); std::vector<common_chat_msg>::push_back(&v27, a4); v35 = a5; common_chat_templates_apply((long long)&v18, a2, (long long *)&v27); v14 = v16; if ( v19 == v21 ) { v8 = v20; memcpy(v16, v21, v20 + 1); } else { v14 = v19; v8 = v20; v16[0] = v21[0]; } v15 = v8; v19 = v21; v20 = 0LL; LOBYTE(v21[0]) = 0; std::vector<std::string>::~vector((long long)v26); std::vector<std::string>::~vector((long long)v25); std::vector<common_grammar_trigger>::~vector((long long)v24); if ( v22 != &v23 ) operator delete(v22, v23 + 1); if ( v19 != v21 ) operator delete(v19, v21[0] + 1LL); std::string::substr(&v18, &v14, v12, v15 - v12); v9 = v17; std::__ostream_insert<char,std::char_traits<char>>(v38, v18, v19); if ( v18 != &v20 ) operator delete(v18, v20 + 1); std::stringbuf::str(v9, v39); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); std::ostringstream::~ostringstream(v38, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v45); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); std::vector<common_chat_tool>::~vector(v37); if ( v32 != v34 ) operator delete(v32, v34[0] + 1LL); if ( v29 != v31 ) operator delete(v29, v31[0] + 1LL); std::vector<common_chat_msg>::~vector(&v27); return v9; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2d8 MOV EBP,R8D MOV R15,RCX MOV R14,RSI MOV qword ptr [RSP + 0x40],RDI XOR EAX,EAX LEA R13,[RSP + 0x108] MOV qword ptr [R13 + -0x18],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R13 + -0x28],XMM0 MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],RAX MOV byte ptr [R13],AL LEA RBX,[RSP + 0x128] MOV qword ptr [RBX + -0x10],RBX MOV qword ptr [RBX + -0x8],RAX MOV byte ptr [RBX],AL MOV CL,0x1 MOV byte ptr [RBX + 0x10],CL MOVAPS xmmword ptr [RBX + 0x18],XMM0 MOVUPS xmmword ptr [RBX + 0x25],XMM0 MOV byte ptr [RBX + 0x35],CL MOV byte ptr [RBX + 0x11],R9B LEA RCX,[RSP + 0x10] MOV qword ptr [RCX + -0x10],RCX MOV qword ptr [RCX + -0x8],RAX MOV byte ptr [RCX],AL MOV RAX,qword ptr [RDX] CMP RAX,qword ptr [RDX + 0x8] JZ 0x001bb64b LAB_001bb5a2: LEA RDI,[RSP + 0xe0] MOV RSI,RDX CALL 0x001d6f0e LEA RDX,[RSP + 0xe0] MOV byte ptr [RDX + 0x58],0x0 LAB_001bb5be: LEA RDI,[RSP + 0x160] MOV RSI,R14 CALL 0x001b90e7 LEA RSI,[RSP + 0x168] MOV RDI,RSP CALL 0x00123ba0 LEA RDI,[RSP + 0x1e0] CALL 0x0012c50a LEA RDI,[RSP + 0x1c8] CALL 0x0012c50a LEA R12,[RSP + 0x1b0] MOV RDI,R12 CALL 0x0012cb1e MOV RDI,qword ptr [R12 + -0x28] LEA RAX,[RSP + 0x198] CMP RDI,RAX JZ 0x001bb62a MOV RSI,qword ptr [RSP + 0x198] INC RSI CALL 0x001231f0 LAB_001bb62a: LEA RAX,[RSP + 0x178] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001bb64b MOV RSI,qword ptr [RSP + 0x178] INC RSI CALL 0x001231f0 LAB_001bb64b: LEA RDI,[RSP + 0x160] CALL 0x001245e0 TEST BPL,BPL JZ 0x001bb68b MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x001bb68b MOV RCX,qword ptr [RSP] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x001bb68b LAB_001bb672: LEA RSI,[0x246bef] LEA RDI,[RSP + 0x160] MOV EDX,0x1 CALL 0x00124690 LAB_001bb68b: LEA RDI,[RSP + 0xe0] MOV RSI,R15 CALL 0x001d63e6 LEA RDX,[RSP + 0xe0] MOV byte ptr [RDX + 0x58],BPL LAB_001bb6a7: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x001b90e7 LAB_001bb6b4: LEA R14,[RSP + 0x30] MOV qword ptr [R14 + -0x10],R14 LEA R15,[RSP + 0x60] MOV RAX,qword ptr [R15 + -0x10] CMP RAX,R15 JZ 0x001bb6e1 MOV qword ptr [RSP + 0x20],RAX MOV R12,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x30],RAX JMP 0x001bb6f6 LAB_001bb6e1: MOV R12,qword ptr [RSP + 0x58] LEA RDX,[R12 + 0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x00123150 LAB_001bb6f6: MOV qword ptr [RSP + 0x28],R12 LEA RDI,[RSP + 0xc8] MOV qword ptr [RDI + -0x78],R15 MOV qword ptr [RDI + -0x70],0x0 MOV byte ptr [RDI + -0x68],0x0 CALL 0x0012c50a LEA RDI,[RSP + 0xb0] CALL 0x0012c50a LEA R12,[RSP + 0x98] MOV RDI,R12 CALL 0x0012cb1e MOV RDI,qword ptr [R12 + -0x28] LEA RAX,[RSP + 0x80] CMP RDI,RAX JZ 0x001bb757 MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x001231f0 LAB_001bb757: MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R15 JZ 0x001bb76e MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001231f0 LAB_001bb76e: MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_001bb77f: LEA RDI,[RSP + 0x48] CALL 0x00124710 MOV R15,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LAB_001bb798: LEA RDI,[RSP + 0x160] CALL 0x00124690 LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001bb7c0 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001231f0 LAB_001bb7c0: LEA RSI,[RSP + 0x168] LAB_001bb7c8: MOV RDI,R15 CALL 0x00123860 LAB_001bb7d0: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R14 JZ 0x001bb7e7 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001231f0 LAB_001bb7e7: LEA R14,[RSP + 0x140] MOV RSI,qword ptr [0x0028ef58] LEA RDI,[RSP + 0x160] CALL 0x001240c0 LEA RDI,[RSP + 0x1d0] CALL 0x00124080 MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001bb82b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001231f0 LAB_001bb82b: MOV RDI,R14 CALL 0x001d6ca0 MOV RDI,qword ptr [RSP + 0x118] CMP RDI,RBX JZ 0x001bb850 MOV RSI,qword ptr [RSP + 0x128] INC RSI CALL 0x001231f0 LAB_001bb850: MOV RDI,qword ptr [RSP + 0xf8] CMP RDI,R13 JZ 0x001bb86d MOV RSI,qword ptr [RSP + 0x108] INC RSI CALL 0x001231f0 LAB_001bb86d: LEA RDI,[RSP + 0xe0] CALL 0x001d6572 MOV RAX,R15 ADD RSP,0x2d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ common_chat_templates * common_chat_format_single_abi_cxx11_ (common_chat_templates *param_1,vector *param_2,common_chat_msg *param_3,bool param_4, bool param_5) { common_chat_templates *pcVar1; int7 in_register_00000009; int1 *local_308; long local_300; int1 local_2f8; int7 uStack_2f7; long *local_2e8 [2]; long local_2d8 [2]; common_chat_templates *local_2c8; long *local_2c0; long *local_2b8; long local_2b0; int1 local_2a8; int7 uStack_2a7; long *local_298; long local_288 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_270 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_258 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_240 [24]; int8 local_228; int8 uStack_220; int8 local_218; int1 *local_210; int8 local_208; int1 local_200; int7 uStack_1ff; int1 *local_1f0; int8 local_1e8; int1 local_1e0; int7 uStack_1df; int1 local_1d0; int8 local_1c8; int5 uStack_1c0; int3 uStack_1bb; int5 uStack_1b8; int8 uStack_1b3; int1 local_1ab; common_chat_templates local_1a8 [8]; long *local_1a0 [2]; long local_190 [2]; long *local_180; long local_170 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_158 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_140 [8]; ios_base local_138 [16]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_128 [248]; local_218 = 0; local_228 = 0; uStack_220 = 0; local_208 = 0; local_200 = 0; local_1e8 = 0; local_1e0 = 0; local_1d0 = 1; local_1c8 = 0; uStack_1c0 = 0; uStack_1bb = 0; uStack_1b8 = 0; uStack_1b3 = 0; local_1ab = 1; local_308 = &local_2f8; local_300 = 0; local_2f8 = 0; local_2c8 = param_1; local_210 = &local_200; local_1f0 = &local_1e0; if (*(long *)param_3 != *(long *)(param_3 + 8)) { /* try { // try from 001bb5a2 to 001bb5b1 has its CatchHandler @ 001bb891 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::operator= ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228, (vector *)param_3); local_1d0 = 0; /* try { // try from 001bb5be to 001bb5cd has its CatchHandler @ 001bb88f */ common_chat_templates_apply(local_1a8,(common_chat_templates_inputs *)param_2); std::__cxx11::string::operator=((string *)&local_308,(string *)local_1a0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_128); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_140); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_158); if (local_180 != local_170) { operator_delete(local_180,local_170[0] + 1); } if (local_1a0[0] != local_190) { operator_delete(local_1a0[0],local_190[0] + 1); } } /* try { // try from 001bb64b to 001bb657 has its CatchHandler @ 001bb8d3 */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); if (((param_5) && (local_300 != 0)) && (local_308[local_300 + -1] == '\n')) { /* try { // try from 001bb672 to 001bb69a has its CatchHandler @ 001bb8d8 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228, (common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 001bb6a7 to 001bb6b3 has its CatchHandler @ 001bb8d1 */ local_1d0 = param_5; common_chat_templates_apply ((common_chat_templates *)&local_2c0,(common_chat_templates_inputs *)param_2); if (local_2b8 == (long *)&local_2a8) { local_2e8[0] = local_2d8; memcpy(local_2d8,&local_2a8,local_2b0 + 1); } else { local_2e8[0] = local_2b8; local_2d8[0] = CONCAT71(uStack_2a7,local_2a8); } local_2b0 = 0; local_2a8 = 0; local_2b8 = (long *)&local_2a8; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_240); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_258); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_270); if (local_298 != local_288) { operator_delete(local_298,local_288[0] + 1); } if (local_2b8 != (long *)&local_2a8) { operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1); } /* try { // try from 001bb77f to 001bb788 has its CatchHandler @ 001bb8b5 */ std::__cxx11::string::substr((ulong)&local_2c0,(ulong)local_2e8); pcVar1 = local_2c8; /* try { // try from 001bb798 to 001bb7a4 has its CatchHandler @ 001bb895 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_2c0,(long)local_2b8); if (local_2c0 != &local_2b0) { operator_delete(local_2c0,local_2b0 + 1); } /* try { // try from 001bb7c8 to 001bb7cf has its CatchHandler @ 001bb893 */ std::__cxx11::stringbuf::str(); if (local_2e8[0] != local_2d8) { operator_delete(local_2e8[0],local_2d8[0] + 1); } std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); if (local_308 != &local_2f8) { operator_delete(local_308,CONCAT71(uStack_2f7,local_2f8) + 1); } std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector ((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_1c8); if (local_1f0 != &local_1e0) { operator_delete(local_1f0,CONCAT71(uStack_1df,local_1e0) + 1); } if (local_210 != &local_200) { operator_delete(local_210,CONCAT71(uStack_1ff,local_200) + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228); return pcVar1; }
10,107
ma_update_status_with_lock
eloqsql/storage/maria/ma_state.c
void _ma_update_status_with_lock(MARIA_HA *info) { my_bool locked= 0; if (info->state == &info->state_save) { locked= 1; mysql_mutex_lock(&info->s->lock.mutex); } (*info->s->lock.update_status)(info->lock.status_param); if (locked) mysql_mutex_unlock(&info->s->lock.mutex); }
O0
c
ma_update_status_with_lock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movb $0x0, -0x9(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq -0x8(%rbp), %rcx addq $0x28, %rcx cmpq %rcx, %rax jne 0x44f3c movb $0x1, -0x9(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0x7f0, %rdi # imm = 0x7F0 addq $0x18, %rdi leaq 0x10f7f9(%rip), %rsi # 0x15472b movl $0x168, %edx # imm = 0x168 callq 0x44a70 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x8b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x6b8(%rcx), %rdi callq *%rax cmpb $0x0, -0x9(%rbp) je 0x44f74 movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0x7f0, %rdi # imm = 0x7F0 addq $0x18, %rdi callq 0x44ae0 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_update_status_with_lock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_9], 0 mov rax, [rbp+var_8] mov rax, [rax+20h] mov rcx, [rbp+var_8] add rcx, 28h ; '(' cmp rax, rcx jnz short loc_44F3C mov [rbp+var_9], 1 mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 7F0h add rdi, 18h lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 168h call inline_mysql_mutex_lock_5 loc_44F3C: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+8B0h] mov rcx, [rbp+var_8] mov rdi, [rcx+6B8h] call rax cmp [rbp+var_9], 0 jz short loc_44F74 mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 7F0h add rdi, 18h call inline_mysql_mutex_unlock_5 loc_44F74: add rsp, 10h pop rbp retn
long long ma_update_status_with_lock(_QWORD *a1) { long long result; // rax char v2; // [rsp+7h] [rbp-9h] v2 = 0; if ( (_QWORD *)a1[4] == a1 + 5 ) { v2 = 1; inline_mysql_mutex_lock_5( *a1 + 2056LL, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x168u); } result = (*(long long ( **)(_QWORD))(*a1 + 2224LL))(a1[215]); if ( v2 ) return inline_mysql_mutex_unlock_5(*a1 + 2056LL); return result; }
_ma_update_status_with_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x28 CMP RAX,RCX JNZ 0x00144f3c MOV byte ptr [RBP + -0x9],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0x7f0 ADD RDI,0x18 LEA RSI,[0x25472b] MOV EDX,0x168 CALL 0x00144a70 LAB_00144f3c: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8b0] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x6b8] CALL RAX CMP byte ptr [RBP + -0x9],0x0 JZ 0x00144f74 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0x7f0 ADD RDI,0x18 CALL 0x00144ae0 LAB_00144f74: ADD RSP,0x10 POP RBP RET
void _ma_update_status_with_lock(long *param_1) { long *plVar1; plVar1 = (long *)param_1[4]; if (plVar1 == param_1 + 5) { inline_mysql_mutex_lock (*param_1 + 0x808,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x168); } (**(code **)(*param_1 + 0x8b0))(param_1[0xd7]); if (plVar1 == param_1 + 5) { inline_mysql_mutex_unlock(*param_1 + 0x808); } return; }
10,108
ma_update_status_with_lock
eloqsql/storage/maria/ma_state.c
void _ma_update_status_with_lock(MARIA_HA *info) { my_bool locked= 0; if (info->state == &info->state_save) { locked= 1; mysql_mutex_lock(&info->s->lock.mutex); } (*info->s->lock.update_status)(info->lock.status_param); if (locked) mysql_mutex_unlock(&info->s->lock.mutex); }
O3
c
ma_update_status_with_lock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax leaq 0x28(%rdi), %rcx cmpq %rcx, 0x20(%rdi) je 0x3ed83 movq 0x6b8(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %rbp jmpq *0x8b0(%rax) leaq 0x808(%rax), %rdi cmpq $0x0, 0x848(%rax) jne 0x3edcd callq 0x291d0 movq (%rbx), %rax movq 0x6b8(%rbx), %rdi callq *0x8b0(%rax) movq (%rbx), %rbx movq 0x848(%rbx), %rdi addq $0x808, %rbx # imm = 0x808 testq %rdi, %rdi jne 0x3ede0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x291a0 leaq 0x9c957(%rip), %rsi # 0xdb72b movl $0x168, %edx # imm = 0x168 callq 0x2ee0b jmp 0x3ed99 leaq 0x34a269(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0x3edbf
_ma_update_status_with_lock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi] lea rcx, [rdi+28h] cmp [rdi+20h], rcx jz short loc_3ED83 mov rdi, [rbx+6B8h] add rsp, 8 pop rbx pop rbp jmp qword ptr [rax+8B0h] loc_3ED83: lea rdi, [rax+808h] cmp qword ptr [rax+848h], 0 jnz short loc_3EDCD call _pthread_mutex_lock loc_3ED99: mov rax, [rbx] mov rdi, [rbx+6B8h] call qword ptr [rax+8B0h] mov rbx, [rbx] mov rdi, [rbx+848h] add rbx, 808h test rdi, rdi jnz short loc_3EDE0 loc_3EDBF: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_3EDCD: lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 168h call psi_mutex_lock jmp short loc_3ED99 loc_3EDE0: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3EDBF
long long ma_update_status_with_lock(_QWORD *a1) { long long v2; // rax long long v4; // rdi long long v5; // rbx long long v6; // rdi long long v7; // rbx v2 = *a1; if ( (_QWORD *)a1[4] != a1 + 5 ) return (*(long long ( **)(_QWORD))(v2 + 2224))(a1[215]); v4 = v2 + 2056; if ( *(_QWORD *)(v2 + 2120) ) psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x168u); else pthread_mutex_lock(v4); (*(void ( **)(_QWORD))(*a1 + 2224LL))(a1[215]); v5 = *a1; v6 = *(_QWORD *)(v5 + 2120); v7 = v5 + 2056; if ( v6 ) ((void ( *)(long long))PSI_server[44])(v6); return pthread_mutex_unlock(v7); }
_ma_update_status_with_lock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] LEA RCX,[RDI + 0x28] CMP qword ptr [RDI + 0x20],RCX JZ 0x0013ed83 MOV RDI,qword ptr [RBX + 0x6b8] ADD RSP,0x8 POP RBX POP RBP JMP qword ptr [RAX + 0x8b0] LAB_0013ed83: LEA RDI,[RAX + 0x808] CMP qword ptr [RAX + 0x848],0x0 JNZ 0x0013edcd CALL 0x001291d0 LAB_0013ed99: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x6b8] CALL qword ptr [RAX + 0x8b0] MOV RBX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x848] ADD RBX,0x808 TEST RDI,RDI JNZ 0x0013ede0 LAB_0013edbf: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001291a0 LAB_0013edcd: LEA RSI,[0x1db72b] MOV EDX,0x168 CALL 0x0012ee0b JMP 0x0013ed99 LAB_0013ede0: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013edbf
void _ma_update_status_with_lock(long *param_1) { long lVar1; lVar1 = *param_1; if ((long *)param_1[4] != param_1 + 5) { /* WARNING: Could not recover jumptable at 0x0013ed7d. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x8b0))(param_1[0xd7]); return; } if (*(long *)(lVar1 + 0x848) == 0) { pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 0x808)); } else { psi_mutex_lock((pthread_mutex_t *)(lVar1 + 0x808), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x168); } (**(code **)(*param_1 + 0x8b0))(param_1[0xd7]); lVar1 = *param_1; if (*(long *)(lVar1 + 0x848) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x808)); return; }
10,109
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O0
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) leaq 0x28d919(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x10, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x74575 leaq 0x28d8d6(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0x129030 movl %eax, -0x24(%rbp) leaq 0x28d8a7(%rip), %rax # 0x301e00 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x7458a movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0x129030 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_sync_1: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], 0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 10h call rax mov [rbp+var_30], rax cmp [rbp+var_30], 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_74575 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_7458A loc_74575: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_7458A: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_sync_1(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] unsigned int v7; // [rsp+5Ch] [rbp-24h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL); if ( v6 ) { ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_sync(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); } else { return (unsigned int)my_sync(v9, v8); } return v7; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x10 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -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 0x00174575 LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00229030 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x401e00] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0017458a LAB_00174575: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00229030 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0017458a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_2c = 0; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10); if (local_38 == 0) { local_c = my_sync(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_2c = my_sync(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_c = local_2c; } return local_c; }
10,110
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O3
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x357da3(%rip), %rax # 0x3b8c08 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x60e90 movl %ebx, %edi xorl %esi, %esi callq 0xc561c addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq -0x1c(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movl %ebx, %edx movq %r15, %rcx callq 0x2ca2f movl (%r15), %eax jmp 0x60e85
inline_mysql_file_sync_0: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 58h mov ebx, esi mov r14d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_68] mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_60E90 mov edi, ebx xor esi, esi call my_sync loc_60E85: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_60E90: lea r15, [rbp+var_1C] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_sync_cold_1 mov eax, [r15] jmp short loc_60E85
long long inline_mysql_file_sync_0(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF _DWORD v5[7]; // [rsp+54h] [rbp-1Ch] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 16LL); if ( !v2 ) return my_sync((unsigned int)a2, 0LL); inline_mysql_file_sync_cold_1(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00160e90 MOV EDI,EBX XOR ESI,ESI CALL 0x001c561c LAB_00160e85: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_00160e90: LEA R15,[RBP + -0x1c] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012ca2f MOV EAX,dword ptr [R15] JMP 0x00160e85
ulong inline_mysql_file_sync(int4 param_1,ulong param_2) { long lVar1; ulong uVar2; int1 local_70 [76]; uint local_24; lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,0x10); if (lVar1 == 0) { uVar2 = my_sync(param_2 & 0xffffffff,0); } else { inline_mysql_file_sync_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24); uVar2 = (ulong)local_24; } return uVar2; }
10,111
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(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
basic_json(basic_json&& other) noexcept : json_base_class_t(std::forward<json_base_class_t>(other)), m_data(std::move(other.m_data)) { // check that passed value is valid other.assert_invariant(false); // invalidate payload other.m_data.m_type = value_t::null; other.m_data.m_value = {}; set_parents(); assert_invariant(); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_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>&&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rcx movups (%rcx), %xmm0 movups %xmm0, (%rax) movq 0x18(%rsp), %rdi xorl %esi, %esi callq 0xda6e0 movq 0x8(%rsp), %rdi movq 0x18(%rsp), %rax movb $0x0, (%rax) movq $0x0, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) callq 0xe8440 jmp 0xe81ea movq 0x8(%rsp), %rdi movl $0x1, %esi callq 0xda6e0 addq $0x28, %rsp retq movq %rax, %rdi callq 0x6c1c0 nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rcx, [rsp+28h+var_10] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rax], xmm0 mov rdi, [rsp+28h+var_10] 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, [rsp+28h+var_20] mov rax, [rsp+28h+var_10] mov byte ptr [rax], 0 mov [rsp+28h+var_18], 0 mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_18] mov [rax+8], rcx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parents(void) jmp short $+2 loc_E81EA: mov rdi, [rsp+28h+var_20] 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 retn mov rdi, rax call __clang_call_terminate
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( _OWORD *a1, long long a2) { *a1 = *(_OWORD *)a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a2); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(a1); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((long long)a1); }
basic_json: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 MOV RDI,qword ptr [RSP + 0x18] XOR ESI,ESI CALL 0x001da6e0 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_001e81e3: CALL 0x001e8440 JMP 0x001e81ea LAB_001e81ea: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1 CALL 0x001da6e0 ADD RSP,0x28 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&&) */ void __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> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { int8 uVar1; uVar1 = *(int8 *)(param_1 + 8); *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar1; assert_invariant(SUB81(param_1,0)); *param_1 = 0; *(int8 *)(param_1 + 8) = 0; /* try { // try from 001e81e3 to 001e81e7 has its CatchHandler @ 001e81fe */ set_parents(); assert_invariant(SUB81(this,0)); return; }
10,112
ma_read_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { int block_of_record; uint b_type; MARIA_BLOCK_INFO block_info; File file; uchar *UNINIT_VAR(to); uint UNINIT_VAR(left_length); MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_read_dynamic_record"); if (filepos == HA_OFFSET_ERROR) goto err; file= info->dfile.file; block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; do { /* A corrupted table can have wrong pointers. (Bug# 19835) */ if (filepos == HA_OFFSET_ERROR) goto panic; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH) && flush_io_cache(&info->rec_cache)) goto err; info->rec_cache.seek_not_done=1; if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_DELETED; goto err; } if (block_of_record++ == 0) /* First block */ { info->cur_row.total_length= block_info.rec_len; if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; if (share->base.blobs) { if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, block_info.rec_len + share->base.extra_rec_buff_size, flag)) goto err; } to= info->rec_buff; left_length=block_info.rec_len; } if (left_length < block_info.data_len || ! block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset= (uint) (block_info.filepos - filepos); uint prefetch_len= (sizeof(block_info.header) - offset); filepos+= sizeof(block_info.header); if (prefetch_len > block_info.data_len) prefetch_len= block_info.data_len; if (prefetch_len) { memcpy(to, block_info.header + offset, prefetch_len); block_info.data_len-= prefetch_len; left_length-= prefetch_len; to+= prefetch_len; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* What a pity that this method is not called 'file_pread' and that there is no equivalent without seeking. We are at the right position already. :( */ if (share->file_read(info, to, block_info.data_len, filepos, MYF(MY_NABP))) goto panic; left_length-=block_info.data_len; to+=block_info.data_len; } filepos= block_info.next_filepos; } while (left_length); info->update|= HA_STATE_AKTIV; /* We have a aktive record */ fast_ma_writeinfo(info); DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR ? 0 : my_errno); err: fast_ma_writeinfo(info); DBUG_RETURN(my_errno); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; }
O0
c
ma_read_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x9c(%rbp), %eax movl %eax, -0x9c(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0xb0(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x51a3f jmp 0x51db8 movq -0x70(%rbp), %rax movl 0x480(%rax), %eax movl %eax, -0x8c(%rbp) movl $0x0, -0x84(%rbp) movl $0x0, -0x10(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x51a6c jmp 0x51de1 movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x51ab5 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq $0x14, %rcx cmpq %rcx, %rax jae 0x51ab5 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe8710 cmpl $0x0, %eax je 0x51ab5 jmp 0x51db8 movq -0x70(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x70(%rbp), %rdi movl -0x8c(%rbp), %edx movq -0x80(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x4fde0 movl %eax, -0x88(%rbp) andl $0x3c, %eax cmpl $0x0, %eax je 0x51b06 movl -0x88(%rbp), %eax andl $0x14, %eax cmpl $0x0, %eax je 0x51b01 callq 0xfdd30 movl $0x86, (%rax) jmp 0x51db8 movl -0x84(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x84(%rbp) cmpl $0x0, %eax jne 0x51bba movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x110(%rax) movq -0x48(%rbp), %rax movq -0xa8(%rbp), %rcx movq 0x3b0(%rcx), %rcx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x51b4d jmp 0x51de1 movq -0xa8(%rbp), %rax cmpl $0x0, 0x3f0(%rax) je 0x51b9e movq -0x70(%rbp), %rdi addq $0x3a0, %rdi # imm = 0x3A0 movq -0x70(%rbp), %rsi addq $0x460, %rsi # imm = 0x460 movq -0x48(%rbp), %rdx movq -0xa8(%rbp), %rax movl 0x424(%rax), %eax addq %rax, %rdx movq -0xb0(%rbp), %rcx callq 0x34160 cmpb $0x0, %al je 0x51b9c jmp 0x51db8 jmp 0x51b9e movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, -0x9c(%rbp) movl -0x9c(%rbp), %eax cmpq -0x40(%rbp), %rax jb 0x51bcd cmpq $0x0, -0x40(%rbp) jne 0x51bd2 jmp 0x51de1 movq -0x28(%rbp), %rax subq -0x80(%rbp), %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax movl %eax, %ecx movl $0x14, %eax subq %rcx, %rax movl %eax, -0xb8(%rbp) movq -0x80(%rbp), %rax addq $0x14, %rax movq %rax, -0x80(%rbp) movl -0xb8(%rbp), %eax cmpq -0x40(%rbp), %rax jbe 0x51c18 movq -0x40(%rbp), %rax movl %eax, -0xb8(%rbp) cmpl $0x0, -0xb8(%rbp) je 0x51c82 movq -0x98(%rbp), %rdi leaq -0x60(%rbp), %rsi movl -0xb4(%rbp), %eax addq %rax, %rsi movl -0xb8(%rbp), %eax movl %eax, %edx callq 0x29090 movl -0xb8(%rbp), %eax movl %eax, %ecx movq -0x40(%rbp), %rax subq %rcx, %rax movq %rax, -0x40(%rbp) movl -0xb8(%rbp), %ecx movl -0x9c(%rbp), %eax subl %ecx, %eax movl %eax, -0x9c(%rbp) movl -0xb8(%rbp), %ecx movq -0x98(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x40(%rbp) je 0x51d2f movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x51cd6 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq -0x40(%rbp), %rcx cmpq %rcx, %rax jae 0x51cd6 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe8710 cmpl $0x0, %eax je 0x51cd6 jmp 0x51db8 movq -0xa8(%rbp), %rax movq 0x6e0(%rax), %rax movq -0x70(%rbp), %rdi movq -0x98(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x80(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x51d0a jmp 0x51de1 movq -0x40(%rbp), %rcx movl -0x9c(%rbp), %eax subq %rcx, %rax movl %eax, -0x9c(%rbp) movq -0x40(%rbp), %rax addq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) cmpl $0x0, -0x9c(%rbp) jne 0x51a60 movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x51d72 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x46b90 jmp 0x51d74 movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rdx movq -0x48(%rbp), %rcx callq 0x512e0 cmpq $-0x1, %rax je 0x51da0 xorl %eax, %eax movl %eax, -0xbc(%rbp) jmp 0x51dad callq 0xfdd30 movl (%rax), %eax movl %eax, -0xbc(%rbp) movl -0xbc(%rbp), %eax movl %eax, -0x64(%rbp) jmp 0x51df1 movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x51dd3 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x46b90 jmp 0x51dd5 callq 0xfdd30 movl (%rax), %eax movl %eax, -0x64(%rbp) jmp 0x51df1 movq -0x70(%rbp), %rdi movl $0x7f, %esi callq 0x39b70 jmp 0x51db8 movl -0x64(%rbp), %eax movl %eax, -0xc0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x51e1b movl -0xc0(%rbp), %eax addq $0xc0, %rsp popq %rbp retq callq 0x29230
_ma_read_dynamic_record: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov rax, [rbp+var_98] mov [rbp+var_98], rax mov eax, [rbp+var_9C] mov [rbp+var_9C], eax mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_A8], rax mov rax, [rbp+var_A8] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_B0], rax cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_51A3F jmp loc_51DB8 loc_51A3F: mov rax, [rbp+var_70] mov eax, [rax+480h] mov [rbp+var_8C], eax mov [rbp+var_84], 0 mov [rbp+var_10], 0 loc_51A60: cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_51A6C jmp loc_51DE1 loc_51A6C: mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_51AB5 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, 14h cmp rax, rcx jnb short loc_51AB5 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_51AB5 jmp loc_51DB8 loc_51AB5: mov rax, [rbp+var_70] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_70] mov edx, [rbp+var_8C] mov rcx, [rbp+var_80] lea rsi, [rbp+var_60] call _ma_get_block_info mov [rbp+var_88], eax and eax, 3Ch cmp eax, 0 jz short loc_51B06 mov eax, [rbp+var_88] and eax, 14h cmp eax, 0 jz short loc_51B01 call _my_thread_var mov dword ptr [rax], 86h loc_51B01: jmp loc_51DB8 loc_51B06: mov eax, [rbp+var_84] mov ecx, eax add ecx, 1 mov [rbp+var_84], ecx cmp eax, 0 jnz loc_51BBA mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+110h], rcx mov rax, [rbp+var_48] mov rcx, [rbp+var_A8] mov rcx, [rcx+3B0h] mov ecx, ecx cmp rax, rcx jbe short loc_51B4D jmp loc_51DE1 loc_51B4D: mov rax, [rbp+var_A8] cmp dword ptr [rax+3F0h], 0 jz short loc_51B9E mov rdi, [rbp+var_70] add rdi, 3A0h mov rsi, [rbp+var_70] add rsi, 460h mov rdx, [rbp+var_48] mov rax, [rbp+var_A8] mov eax, [rax+424h] add rdx, rax mov rcx, [rbp+var_B0] call _ma_alloc_buffer cmp al, 0 jz short loc_51B9C jmp loc_51DB8 loc_51B9C: jmp short $+2 loc_51B9E: mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov [rbp+var_98], rax mov rax, [rbp+var_48] mov [rbp+var_9C], eax loc_51BBA: mov eax, [rbp+var_9C] cmp rax, [rbp+var_40] jb short loc_51BCD cmp [rbp+var_40], 0 jnz short loc_51BD2 loc_51BCD: jmp loc_51DE1 loc_51BD2: mov rax, [rbp+var_28] sub rax, [rbp+var_80] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] mov ecx, eax mov eax, 14h sub rax, rcx mov [rbp+var_B8], eax mov rax, [rbp+var_80] add rax, 14h mov [rbp+var_80], rax mov eax, [rbp+var_B8] cmp rax, [rbp+var_40] jbe short loc_51C18 mov rax, [rbp+var_40] mov [rbp+var_B8], eax loc_51C18: cmp [rbp+var_B8], 0 jz short loc_51C82 mov rdi, [rbp+var_98] lea rsi, [rbp+var_60] mov eax, [rbp+var_B4] add rsi, rax mov eax, [rbp+var_B8] mov edx, eax call _memcpy mov eax, [rbp+var_B8] mov ecx, eax mov rax, [rbp+var_40] sub rax, rcx mov [rbp+var_40], rax mov ecx, [rbp+var_B8] mov eax, [rbp+var_9C] sub eax, ecx mov [rbp+var_9C], eax mov ecx, [rbp+var_B8] mov rax, [rbp+var_98] mov ecx, ecx add rax, rcx mov [rbp+var_98], rax loc_51C82: cmp [rbp+var_40], 0 jz loc_51D2F mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_51CD6 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, [rbp+var_40] cmp rax, rcx jnb short loc_51CD6 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_51CD6 jmp loc_51DB8 loc_51CD6: mov rax, [rbp+var_A8] mov rax, [rax+6E0h] mov rdi, [rbp+var_70] mov rsi, [rbp+var_98] mov rdx, [rbp+var_40] mov rcx, [rbp+var_80] mov r8d, 4 call rax cmp rax, 0 jz short loc_51D0A jmp loc_51DE1 loc_51D0A: mov rcx, [rbp+var_40] mov eax, [rbp+var_9C] sub rax, rcx mov [rbp+var_9C], eax mov rax, [rbp+var_40] add rax, [rbp+var_98] mov [rbp+var_98], rax loc_51D2F: mov rax, [rbp+var_20] mov [rbp+var_80], rax cmp [rbp+var_9C], 0 jnz loc_51A60 mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 2 mov [rax+624h], ecx mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_51D72 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_51D72: jmp short $+2 loc_51D74: mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] mov rax, [rbp+var_70] mov rdx, [rax+3A0h] mov rcx, [rbp+var_48] call _ma_rec_unpack cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_51DA0 xor eax, eax mov [rbp+var_BC], eax jmp short loc_51DAD loc_51DA0: call _my_thread_var mov eax, [rax] mov [rbp+var_BC], eax loc_51DAD: mov eax, [rbp+var_BC] mov [rbp+var_64], eax jmp short loc_51DF1 loc_51DB8: mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_51DD3 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_51DD3: jmp short $+2 loc_51DD5: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax jmp short loc_51DF1 loc_51DE1: mov rdi, [rbp+var_70] mov esi, 7Fh call _ma_set_fatal_error jmp short loc_51DB8 loc_51DF1: mov eax, [rbp+var_64] mov [rbp+var_C0], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_51E1B mov eax, [rbp+var_C0] add rsp, 0C0h pop rbp retn loc_51E1B: call ___stack_chk_fail
long long ma_read_dynamic_record(_DWORD *a1, const char *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rdx int v7; // eax unsigned long long v8; // rcx int v9; // eax unsigned int v12; // [rsp+8h] [rbp-B8h] int v13; // [rsp+Ch] [rbp-B4h] long long v14; // [rsp+10h] [rbp-B0h] long long v15; // [rsp+18h] [rbp-A8h] unsigned int v16; // [rsp+24h] [rbp-9Ch] long long v17; // [rsp+28h] [rbp-98h] unsigned int v18; // [rsp+34h] [rbp-8Ch] char block_info; // [rsp+38h] [rbp-88h] int v20; // [rsp+3Ch] [rbp-84h] long long v22; // [rsp+40h] [rbp-80h] char *v23; // [rsp+48h] [rbp-78h] long long v24; // [rsp+50h] [rbp-70h] char v26[24]; // [rsp+60h] [rbp-60h] BYREF unsigned long long v27; // [rsp+78h] [rbp-48h] unsigned long long v28; // [rsp+80h] [rbp-40h] long long v29; // [rsp+98h] [rbp-28h] long long v30; // [rsp+A0h] [rbp-20h] int v31; // [rsp+B0h] [rbp-10h] unsigned long long v32; // [rsp+B8h] [rbp-8h] v32 = __readfsqword(0x28u); v24 = (long long)a1; v23 = (char *)a2; v15 = *(_QWORD *)a1; v6 = (unsigned int)*(char *)(*(_QWORD *)a1 + 2009LL); v7 = 0; v8 = 0x10000LL; if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) ) v7 = 0x10000; v14 = v7 | 0x10u; if ( a3 == -1 ) { LABEL_38: if ( !*(_DWORD *)(*(_QWORD *)v24 + 1976LL) ) { a1 = (_DWORD *)v24; a2 = 0LL; ma_writeinfo((long long *)v24, 0LL); } return *(unsigned int *)my_thread_var(a1, a2); } else { v18 = a1[288]; v20 = 0; v31 = 0; do { if ( a3 == -1 ) { LABEL_41: a1 = (_DWORD *)v24; a2 = (_BYTE *)(&dword_7C + 3); ma_set_fatal_error((_DWORD *)v24, 0x7Fu, v6, v8, a5, a6); goto LABEL_38; } if ( (*(_DWORD *)(v24 + 1564) & 0x10) != 0 && *(_QWORD *)(v24 + 1208) < (unsigned long long)(a3 + 20) ) { a1 = (_DWORD *)(v24 + 1208); a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v24 + 1208, 1LL) ) goto LABEL_38; } *(_DWORD *)(v24 + 1432) = 1; a1 = (_DWORD *)v24; a2 = v26; block_info = ma_get_block_info(v24, (unsigned __int8 *)v26, v18, a3, a5, a6); if ( (block_info & 0x3C) != 0 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var(v24, v26) = 134; goto LABEL_38; } v9 = v20; v8 = (unsigned int)++v20; if ( !v9 ) { *(_QWORD *)(v24 + 272) = v27; v8 = (unsigned int)*(_QWORD *)(v15 + 944); if ( v27 > v8 ) goto LABEL_41; if ( *(_DWORD *)(v15 + 1008) ) { a1 = (_DWORD *)(v24 + 928); a2 = (const char *)(v24 + 1120); if ( ma_alloc_buffer( (long long *)(v24 + 928), (unsigned long long *)(v24 + 1120), *(unsigned int *)(v15 + 1060) + v27, v14) ) { goto LABEL_38; } } v17 = *(_QWORD *)(v24 + 928); v16 = v27; } if ( v16 < v28 || !v28 ) goto LABEL_41; v13 = v29 - a3; v8 = (unsigned int)(v29 - a3); v12 = 20 - v8; v22 = a3 + 20; if ( (unsigned int)(20 - v8) > v28 ) v12 = v28; if ( v12 ) { memcpy(v17, &v26[v13], v12); v28 -= v12; v16 -= v12; v8 = v12; v17 += v12; } if ( v28 ) { if ( (*(_DWORD *)(v24 + 1564) & 0x10) != 0 && *(_QWORD *)(v24 + 1208) < v28 + v22 ) { a1 = (_DWORD *)(v24 + 1208); a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v24 + 1208, 1LL) ) goto LABEL_38; } if ( (*(long long ( **)(long long, long long, unsigned long long, long long, long long))(v15 + 1760))( v24, v17, v28, v22, 4LL) ) { goto LABEL_41; } v8 = v28; v16 -= v28; v17 += v28; } a3 = v30; } while ( v16 ); *(_DWORD *)(v24 + 1572) |= 2u; if ( !*(_DWORD *)(*(_QWORD *)v24 + 1976LL) ) ma_writeinfo((long long *)v24, 0LL); if ( ma_rec_unpack((_DWORD *)v24, (unsigned __int8 *)v23, *(_QWORD *)(v24 + 928), v27, a5, a6) == -1 ) return *(unsigned int *)my_thread_var(v24, v23); else return 0; } }
_ma_read_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x9c] MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0xb0],RAX CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x00151a3f JMP 0x00151db8 LAB_00151a3f: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x480] MOV dword ptr [RBP + -0x8c],EAX MOV dword ptr [RBP + -0x84],0x0 MOV dword ptr [RBP + -0x10],0x0 LAB_00151a60: CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x00151a6c JMP 0x00151de1 LAB_00151a6c: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00151ab5 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,0x14 CMP RAX,RCX JNC 0x00151ab5 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e8710 CMP EAX,0x0 JZ 0x00151ab5 JMP 0x00151db8 LAB_00151ab5: MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x8c] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x60] CALL 0x0014fde0 MOV dword ptr [RBP + -0x88],EAX AND EAX,0x3c CMP EAX,0x0 JZ 0x00151b06 MOV EAX,dword ptr [RBP + -0x88] AND EAX,0x14 CMP EAX,0x0 JZ 0x00151b01 CALL 0x001fdd30 MOV dword ptr [RAX],0x86 LAB_00151b01: JMP 0x00151db8 LAB_00151b06: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x84],ECX CMP EAX,0x0 JNZ 0x00151bba MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x110],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RCX + 0x3b0] MOV ECX,ECX CMP RAX,RCX JBE 0x00151b4d JMP 0x00151de1 LAB_00151b4d: MOV RAX,qword ptr [RBP + -0xa8] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x00151b9e MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x3a0 MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x460 MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0xa8] MOV EAX,dword ptr [RAX + 0x424] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0xb0] CALL 0x00134160 CMP AL,0x0 JZ 0x00151b9c JMP 0x00151db8 LAB_00151b9c: JMP 0x00151b9e LAB_00151b9e: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x9c],EAX LAB_00151bba: MOV EAX,dword ptr [RBP + -0x9c] CMP RAX,qword ptr [RBP + -0x40] JC 0x00151bcd CMP qword ptr [RBP + -0x40],0x0 JNZ 0x00151bd2 LAB_00151bcd: JMP 0x00151de1 LAB_00151bd2: MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV ECX,EAX MOV EAX,0x14 SUB RAX,RCX MOV dword ptr [RBP + -0xb8],EAX MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x14 MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0xb8] CMP RAX,qword ptr [RBP + -0x40] JBE 0x00151c18 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0xb8],EAX LAB_00151c18: CMP dword ptr [RBP + -0xb8],0x0 JZ 0x00151c82 MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[RBP + -0x60] MOV EAX,dword ptr [RBP + -0xb4] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0xb8] MOV EDX,EAX CALL 0x00129090 MOV EAX,dword ptr [RBP + -0xb8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV ECX,dword ptr [RBP + -0xb8] MOV EAX,dword ptr [RBP + -0x9c] SUB EAX,ECX MOV dword ptr [RBP + -0x9c],EAX MOV ECX,dword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0x98] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x98],RAX LAB_00151c82: CMP qword ptr [RBP + -0x40],0x0 JZ 0x00151d2f MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00151cd6 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x00151cd6 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e8710 CMP EAX,0x0 JZ 0x00151cd6 JMP 0x00151db8 LAB_00151cd6: MOV RAX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x80] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x00151d0a JMP 0x00151de1 LAB_00151d0a: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x9c] SUB RAX,RCX MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX LAB_00151d2f: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX CMP dword ptr [RBP + -0x9c],0x0 JNZ 0x00151a60 MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x2 MOV dword ptr [RAX + 0x624],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00151d72 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x00146b90 LAB_00151d72: JMP 0x00151d74 LAB_00151d74: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x48] CALL 0x001512e0 CMP RAX,-0x1 JZ 0x00151da0 XOR EAX,EAX MOV dword ptr [RBP + -0xbc],EAX JMP 0x00151dad LAB_00151da0: CALL 0x001fdd30 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xbc],EAX LAB_00151dad: MOV EAX,dword ptr [RBP + -0xbc] MOV dword ptr [RBP + -0x64],EAX JMP 0x00151df1 LAB_00151db8: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00151dd3 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x00146b90 LAB_00151dd3: JMP 0x00151dd5 LAB_00151dd5: CALL 0x001fdd30 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX JMP 0x00151df1 LAB_00151de1: MOV RDI,qword ptr [RBP + -0x70] MOV ESI,0x7f CALL 0x00139b70 JMP 0x00151db8 LAB_00151df1: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xc0],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00151e1b MOV EAX,dword ptr [RBP + -0xc0] ADD RSP,0xc0 POP RBP RET LAB_00151e1b: CALL 0x00129230
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3) { long lVar1; char cVar2; uint uVar3; int iVar4; uint uVar5; long lVar6; long lVar7; int4 *puVar8; long in_FS_OFFSET; int4 local_c4; uint local_c0; uint local_a4; void *local_a0; int local_8c; long local_88; int4 local_6c; int1 local_68 [24]; ulong local_50; ulong local_48; int8 local_30; long local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar7 = *param_1; uVar3 = 0; if (*(char *)(lVar7 + 0x7d9) != '\0') { uVar3 = 0x10000; } if (param_3 == -1) { LAB_00151db8: if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } puVar8 = (int4 *)_my_thread_var(); local_6c = *puVar8; } else { lVar1 = param_1[0x90]; local_8c = 0; local_18 = 0; local_88 = param_3; do { if (local_88 == -1) { LAB_00151de1: _ma_set_fatal_error(param_1,0x7f); goto LAB_00151db8; } if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14U)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00151db8; *(int4 *)(param_1 + 0xb3) = 1; uVar5 = _ma_get_block_info(param_1,local_68,(int)lVar1,local_88); if ((uVar5 & 0x3c) != 0) { if ((uVar5 & 0x14) != 0) { puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x86; } goto LAB_00151db8; } if (local_8c == 0) { param_1[0x22] = local_50; if ((*(ulong *)(lVar7 + 0x3b0) & 0xffffffff) < local_50) goto LAB_00151de1; if ((*(int *)(lVar7 + 0x3f0) != 0) && (cVar2 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c, local_50 + *(uint *)(lVar7 + 0x424),uVar3 | 0x10), cVar2 != '\0')) goto LAB_00151db8; local_a0 = (void *)param_1[0x74]; local_a4 = (uint)local_50; } if ((local_a4 < local_48) || (local_48 == 0)) goto LAB_00151de1; uVar5 = (int)local_30 - (int)local_88; local_c0 = 0x14 - uVar5; if (local_48 < local_c0) { local_c0 = (uint)local_48; } if (local_c0 != 0) { memcpy(local_a0,local_68 + uVar5,(ulong)local_c0); local_48 = local_48 - local_c0; local_a4 = local_a4 - local_c0; local_a0 = (void *)((long)local_a0 + (ulong)local_c0); } if (local_48 != 0) { if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14 + local_48)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00151db8; lVar6 = (**(code **)(lVar7 + 0x6e0))(param_1,local_a0,local_48,local_88 + 0x14,4); if (lVar6 != 0) goto LAB_00151de1; local_a4 = local_a4 - (int)local_48; local_a0 = (void *)(local_48 + (long)local_a0); } local_88 = local_28; local_8c = local_8c + 1; } while (local_a4 != 0); *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } lVar7 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_50); if (lVar7 == -1) { puVar8 = (int4 *)_my_thread_var(); local_c4 = *puVar8; } else { local_c4 = 0; } local_6c = local_c4; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
10,113
LefDefParser::lefiVia::propName(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
char * lefiVia::propName(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf(msg, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d", index, numLayers_); lefiError(0, 1422, msg); return 0; } return propName_[index]; }
O0
cpp
LefDefParser::lefiVia::propName(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x1820e movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x20(%rcx), %eax jl 0x1824f movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x48(%rax), %ecx leaq 0x5f9f0(%rip), %rsi # 0x77c19 movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x58e, %esi # imm = 0x58E callq 0x3f4e0 movq $0x0, 0xc0(%rsp) jmp 0x1826c movq 0x8(%rsp), %rax movq 0x28(%rax), %rax movslq 0xb4(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax addq $0xc8, %rsp retq nopl (%rax)
_ZNK12LefDefParser7lefiVia8propNameEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_1820E mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+20h] jl short loc_1824F loc_1820E: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+48h] lea rsi, aErrorLefpars14_2; "ERROR (LEFPARS-1422): The layer number "... mov al, 0 call _sprintf lea rdx, [rsp+0C8h+var_B8]; int xor edi, edi; this mov esi, 58Eh; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) mov [rsp+0C8h+var_8], 0 jmp short loc_1826C loc_1824F: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+28h] movsxd rcx, [rsp+0C8h+var_14] mov rax, [rax+rcx*8] mov [rsp+0C8h+var_8], rax loc_1826C: mov rax, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long LefDefParser::lefiVia::propName(LefDefParser::lefiVia *this, int a2) { const char *v2; // rcx int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::lefiVia *v6; // [rsp+B8h] [rbp-10h] v6 = this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 8) ) return *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * v5); sprintf( v4, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d", v5, *((_DWORD *)this + 18)); LefDefParser::lefiError(0LL, 1422, (int)v4, v2); return 0LL; }
propName: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x0011820e MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x20] JL 0x0011824f LAB_0011820e: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x48] LEA RSI,[0x177c19] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x58e CALL 0x0013f4e0 MOV qword ptr [RSP + 0xc0],0x0 JMP 0x0011826c LAB_0011824f: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0xb4] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0xc0],RAX LAB_0011826c: MOV RAX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
/* LefDefParser::lefiVia::propName(int) const */ int8 __thiscall LefDefParser::lefiVia::propName(lefiVia *this,int param_1) { char local_b8 [164]; int local_14; lefiVia *local_10; int8 local_8; if ((param_1 < 0) || (*(int *)(this + 0x20) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x48)); lefiError(0,0x58e,local_b8); local_8 = 0; } else { local_8 = *(int8 *)(*(long *)(this + 0x28) + (long)param_1 * 8); } return local_8; }
10,114
LefDefParser::lefiVia::propName(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
char * lefiVia::propName(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf(msg, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d", index, numLayers_); lefiError(0, 1422, msg); return 0; } return propName_[index]; }
O3
cpp
LefDefParser::lefiVia::propName(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi js 0x14d33 cmpl %edx, 0x20(%rdi) jle 0x14d33 movq 0x28(%rdi), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rbx jmp 0x14d5b movl 0x48(%rdi), %ecx leaq 0x38f63(%rip), %rsi # 0x4dca0 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x58e, %esi # imm = 0x58E movq %r14, %rdx callq 0x27ae8 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser7lefiVia8propNameEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi js short loc_14D33 cmp [rdi+20h], edx jle short loc_14D33 mov rax, [rdi+28h] mov ecx, edx mov rbx, [rax+rcx*8] jmp short loc_14D5B loc_14D33: mov ecx, [rdi+48h] lea rsi, aErrorLefpars14_2; "ERROR (LEFPARS-1422): The layer number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 58Eh; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) loc_14D5B: mov rax, rbx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiVia::propName(LefDefParser::lefiVia *this, int a2) { long long v2; // rbx const char *v3; // rcx _BYTE v5[184]; // [rsp+0h] [rbp-B8h] BYREF if ( a2 >= 0 && *((_DWORD *)this + 8) > a2 ) return *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * (unsigned int)a2); v2 = 0LL; sprintf( v5, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d", a2, *((_DWORD *)this + 18)); LefDefParser::lefiError(0LL, 1422, (int)v5, v3); return v2; }
propName: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI JS 0x00114d33 CMP dword ptr [RDI + 0x20],EDX JLE 0x00114d33 MOV RAX,qword ptr [RDI + 0x28] MOV ECX,EDX MOV RBX,qword ptr [RAX + RCX*0x8] JMP 0x00114d5b LAB_00114d33: MOV ECX,dword ptr [RDI + 0x48] LEA RSI,[0x14dca0] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x58e MOV RDX,R14 CALL 0x00127ae8 LAB_00114d5b: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiVia::propName(int) const */ int8 __thiscall LefDefParser::lefiVia::propName(lefiVia *this,int param_1) { int8 uVar1; char acStack_b8 [168]; if ((param_1 < 0) || (*(int *)(this + 0x20) <= param_1)) { uVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x48)); lefiError(0,0x58e,acStack_b8); } else { uVar1 = *(int8 *)(*(long *)(this + 0x28) + (ulong)(uint)param_1 * 8); } return uVar1; }
10,115
Timer::Reset()
sp1187[P]veesem/src/core/spg200/timer.cc
void Timer::Reset() { timer_clock_.Reset(); timebase_setup_.raw = 0; timer_a_divisor_ = -1; timer_a_data_ = 0; timer_a_preload_ = 0; timer_a_enabled_ = false; timer_a_control_.raw = 0; timer_a_control_.source_a = 6; timer_a_control_.source_b = 6; UpdateTimerADivisors(); timer_b_divisor_ = -1; timer_b_data_ = 0; timer_b_preload_ = 0; timer_b_enabled_ = false; timer_b_control_.source_c = 6; UpdateTimerBDivisors(); }
O0
cpp
Timer::Reset(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x38(%rbp) movq -0x38(%rbp), %rdi movq %rdi, -0x40(%rbp) addq $0x8, %rdi callq 0x18f30 movq -0x40(%rbp), %rdi movw $0x0, 0x24(%rdi) movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF movw $0x0, 0x1a(%rdi) movw $0x0, 0x1c(%rdi) movb $0x0, 0x18(%rdi) movw $0x0, 0x26(%rdi) movq %rdi, %rax addq $0x26, %rax movq %rax, -0x18(%rbp) movl $0x6, -0x1c(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %ecx andl $-0x8, %ecx movl -0x1c(%rbp), %edx movzwl %dx, %edx andl $0x7, %edx orl %edx, %ecx movw %cx, (%rax) movq %rdi, %rax addq $0x26, %rax movq %rax, -0x8(%rbp) movl $0x6, -0xc(%rbp) movq -0x8(%rbp), %rax movzwl (%rax), %ecx andl $-0x39, %ecx movl -0xc(%rbp), %edx movzwl %dx, %edx andl $0x7, %edx shll $0x3, %edx orl %edx, %ecx movw %cx, (%rax) callq 0x18730 movq -0x40(%rbp), %rdi movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF movw $0x0, 0x20(%rdi) movw $0x0, 0x22(%rdi) movb $0x0, 0x1e(%rdi) movq %rdi, %rax addq $0x28, %rax movq %rax, -0x28(%rbp) movl $0x6, -0x2c(%rbp) movq -0x28(%rbp), %rax movzwl (%rax), %ecx andl $-0x8, %ecx movl -0x2c(%rbp), %edx movzwl %dx, %edx andl $0x7, %edx orl %edx, %ecx movw %cx, (%rax) callq 0x18920 addq $0x40, %rsp popq %rbp retq
_ZN5Timer5ResetEv: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov rdi, [rbp+var_38] mov [rbp+var_40], rdi add rdi, 8 call _ZN14DivisibleClockILi27000000ELi32768EE5ResetEv; DivisibleClock<27000000,32768>::Reset(void) mov rdi, [rbp+var_40]; this mov word ptr [rdi+24h], 0 mov dword ptr [rdi+10h], 0FFFFFFFFh mov word ptr [rdi+1Ah], 0 mov word ptr [rdi+1Ch], 0 mov byte ptr [rdi+18h], 0 mov word ptr [rdi+26h], 0 mov rax, rdi add rax, 26h ; '&' mov [rbp+var_18], rax mov [rbp+var_1C], 6 mov rax, [rbp+var_18] movzx ecx, word ptr [rax] and ecx, 0FFFFFFF8h mov edx, [rbp+var_1C] movzx edx, dx and edx, 7 or ecx, edx mov [rax], cx mov rax, rdi add rax, 26h ; '&' mov [rbp+var_8], rax mov [rbp+var_C], 6 mov rax, [rbp+var_8] movzx ecx, word ptr [rax] and ecx, 0FFFFFFC7h mov edx, [rbp+var_C] movzx edx, dx and edx, 7 shl edx, 3 or ecx, edx mov [rax], cx call _ZN5Timer20UpdateTimerADivisorsEv; Timer::UpdateTimerADivisors(void) mov rdi, [rbp+var_40]; this mov dword ptr [rdi+14h], 0FFFFFFFFh mov word ptr [rdi+20h], 0 mov word ptr [rdi+22h], 0 mov byte ptr [rdi+1Eh], 0 mov rax, rdi add rax, 28h ; '(' mov [rbp+var_28], rax mov [rbp+var_2C], 6 mov rax, [rbp+var_28] movzx ecx, word ptr [rax] and ecx, 0FFFFFFF8h mov edx, [rbp+var_2C] movzx edx, dx and edx, 7 or ecx, edx mov [rax], cx call _ZN5Timer20UpdateTimerBDivisorsEv; Timer::UpdateTimerBDivisors(void) add rsp, 40h pop rbp retn
long long Timer::Reset(Timer *this) { DivisibleClock<27000000,32768>::Reset((char *)this + 8); *((_WORD *)this + 18) = 0; *((_DWORD *)this + 4) = -1; *((_WORD *)this + 13) = 0; *((_WORD *)this + 14) = 0; *((_BYTE *)this + 24) = 0; *((_WORD *)this + 19) = 0; *((_WORD *)this + 19) = *((_WORD *)this + 19) & 0xFFF8 | 6; *((_WORD *)this + 19) = *((_WORD *)this + 19) & 0xFFC7 | 0x30; Timer::UpdateTimerADivisors(this); *((_DWORD *)this + 5) = -1; *((_WORD *)this + 16) = 0; *((_WORD *)this + 17) = 0; *((_BYTE *)this + 30) = 0; *((_WORD *)this + 20) = *((_WORD *)this + 20) & 0xFFF8 | 6; return Timer::UpdateTimerBDivisors(this); }
Reset: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV RDI,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RDI ADD RDI,0x8 CALL 0x00118f30 MOV RDI,qword ptr [RBP + -0x40] MOV word ptr [RDI + 0x24],0x0 MOV dword ptr [RDI + 0x10],0xffffffff MOV word ptr [RDI + 0x1a],0x0 MOV word ptr [RDI + 0x1c],0x0 MOV byte ptr [RDI + 0x18],0x0 MOV word ptr [RDI + 0x26],0x0 MOV RAX,RDI ADD RAX,0x26 MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x1c],0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX] AND ECX,0xfffffff8 MOV EDX,dword ptr [RBP + -0x1c] MOVZX EDX,DX AND EDX,0x7 OR ECX,EDX MOV word ptr [RAX],CX MOV RAX,RDI ADD RAX,0x26 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x6 MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,word ptr [RAX] AND ECX,0xffffffc7 MOV EDX,dword ptr [RBP + -0xc] MOVZX EDX,DX AND EDX,0x7 SHL EDX,0x3 OR ECX,EDX MOV word ptr [RAX],CX CALL 0x00118730 MOV RDI,qword ptr [RBP + -0x40] MOV dword ptr [RDI + 0x14],0xffffffff MOV word ptr [RDI + 0x20],0x0 MOV word ptr [RDI + 0x22],0x0 MOV byte ptr [RDI + 0x1e],0x0 MOV RAX,RDI ADD RAX,0x28 MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x2c],0x6 MOV RAX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RAX] AND ECX,0xfffffff8 MOV EDX,dword ptr [RBP + -0x2c] MOVZX EDX,DX AND EDX,0x7 OR ECX,EDX MOV word ptr [RAX],CX CALL 0x00118920 ADD RSP,0x40 POP RBP RET
/* Timer::Reset() */ void __thiscall Timer::Reset(Timer *this) { DivisibleClock<27000000,32768>::Reset((DivisibleClock<27000000,32768> *)(this + 8)); *(int2 *)(this + 0x24) = 0; *(int4 *)(this + 0x10) = 0xffffffff; *(int2 *)(this + 0x1a) = 0; *(int2 *)(this + 0x1c) = 0; this[0x18] = (Timer)0x0; *(int2 *)(this + 0x26) = 0; *(ushort *)(this + 0x26) = *(ushort *)(this + 0x26) & 0xfff8 | 6; *(ushort *)(this + 0x26) = *(ushort *)(this + 0x26) & 0xffc7 | 0x30; UpdateTimerADivisors(this); *(int4 *)(this + 0x14) = 0xffffffff; *(int2 *)(this + 0x20) = 0; *(int2 *)(this + 0x22) = 0; this[0x1e] = (Timer)0x0; *(ushort *)(this + 0x28) = *(ushort *)(this + 0x28) & 0xfff8 | 6; UpdateTimerBDivisors(this); return; }
10,116
js_atomics_get_ptr
bluesky950520[P]quickjs/quickjs.c
static void *js_atomics_get_ptr(JSContext *ctx, JSArrayBuffer **pabuf, int *psize_log2, JSClassID *pclass_id, JSValue obj, JSValue idx_val, int is_waitable) { JSObject *p; JSTypedArray *ta; JSArrayBuffer *abuf; void *ptr; uint64_t idx; BOOL err; int size_log2; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(obj); if (is_waitable) err = (p->class_id != JS_CLASS_INT32_ARRAY && p->class_id != JS_CLASS_BIG_INT64_ARRAY); else err = !(p->class_id >= JS_CLASS_INT8_ARRAY && p->class_id <= JS_CLASS_BIG_UINT64_ARRAY); if (err) { fail: JS_ThrowTypeError(ctx, "integer TypedArray expected"); return NULL; } ta = p->u.typed_array; abuf = ta->buffer->u.array_buffer; if (!abuf->shared) { if (is_waitable == 2) { JS_ThrowTypeError(ctx, "not a SharedArrayBuffer TypedArray"); return NULL; } if (abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); return NULL; } } if (JS_ToIndex(ctx, &idx, idx_val)) { return NULL; } /* if the array buffer is detached, p->u.array.count = 0 */ if (idx >= p->u.array.count) { JS_ThrowRangeError(ctx, "out-of-bound access"); return NULL; } size_log2 = typed_array_size_log2(p->class_id); ptr = p->u.array.u.uint8_ptr + ((uintptr_t)idx << size_log2); if (pabuf) *pabuf = abuf; if (psize_log2) *psize_log2 = size_log2; if (pclass_id) *pclass_id = p->class_id; return ptr; }
O1
c
js_atomics_get_ptr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 movq %r8, 0x10(%rsp) cmpl $-0x1, %r9d jne 0x7ee1f movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movl 0x60(%rsp), %eax movq 0x10(%rsp), %rbp movzwl 0x6(%rbp), %ecx testl %eax, %eax je 0x7ee11 addl $-0x1a, %ecx testl $0xfffd, %ecx # imm = 0xFFFD setne %cl jmp 0x7ee1b addl $-0x1e, %ecx cmpw $-0x8, %cx setb %cl testb %cl, %cl je 0x7ee45 leaq 0x21f82(%rip), %rsi # 0xa0da8 xorl %r13d, %r13d movq %r15, %rdi xorl %eax, %eax callq 0x21953 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x30(%rbp), %rcx movq 0x18(%rcx), %rcx movq 0x30(%rcx), %r13 cmpb $0x0, 0x9(%r13) je 0x7ee7a leaq 0x50(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x26e5b testl %eax, %eax je 0x7ee88 xorl %r13d, %r13d jmp 0x7ee33 cmpl $0x2, %eax jne 0x7eed4 leaq 0x21f3e(%rip), %rsi # 0xa0dc4 jmp 0x7ee26 movq %r13, %rdx movq 0x8(%rsp), %r13 movl 0x40(%rbp), %eax cmpq %rax, %r13 jae 0x7eeeb movzwl 0x6(%rbp), %eax leaq 0x1d32c(%rip), %rcx # 0x9c1cf movzbl -0x15(%rax,%rcx), %ecx shlq %cl, %r13 addq 0x38(%rbp), %r13 testq %r12, %r12 je 0x7eeb8 movq %rdx, (%r12) testq %r14, %r14 je 0x7eec0 movl %ecx, (%r14) testq %rbx, %rbx je 0x7ee33 movzwl 0x6(%rbp), %eax movl %eax, (%rbx) jmp 0x7ee33 cmpb $0x0, 0x8(%r13) je 0x7ee58 leaq 0x21e0b(%rip), %rsi # 0xa0cf1 jmp 0x7ee26 leaq 0x21ef5(%rip), %rsi # 0xa0de7 xorl %r13d, %r13d movq %r15, %rdi xorl %eax, %eax callq 0x1fec9 jmp 0x7ee33
js_atomics_get_ptr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdi mov [rsp+48h+var_38], r8 cmp r9d, 0FFFFFFFFh jnz short loc_7EE1F mov rbx, rcx mov r14, rdx mov r12, rsi mov eax, [rsp+48h+arg_10] mov rbp, [rsp+48h+var_38] movzx ecx, word ptr [rbp+6] test eax, eax jz short loc_7EE11 add ecx, 0FFFFFFE6h test ecx, 0FFFDh setnz cl jmp short loc_7EE1B loc_7EE11: add ecx, 0FFFFFFE2h cmp cx, 0FFF8h setb cl loc_7EE1B: test cl, cl jz short loc_7EE45 loc_7EE1F: lea rsi, aIntegerTypedar; "integer TypedArray expected" loc_7EE26: xor r13d, r13d mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_7EE33: mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7EE45: mov rcx, [rbp+30h] mov rcx, [rcx+18h] mov r13, [rcx+30h] cmp byte ptr [r13+9], 0 jz short loc_7EE7A loc_7EE58: lea rax, [rsp+48h+arg_0] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+48h+var_40] mov rdi, r15 call JS_ToIndex test eax, eax jz short loc_7EE88 xor r13d, r13d jmp short loc_7EE33 loc_7EE7A: cmp eax, 2 jnz short loc_7EED4 lea rsi, aNotASharedarra; "not a SharedArrayBuffer TypedArray" jmp short loc_7EE26 loc_7EE88: mov rdx, r13 mov r13, [rsp+48h+var_40] mov eax, [rbp+40h] cmp r13, rax jnb short loc_7EEEB movzx eax, word ptr [rbp+6] lea rcx, typed_array_size_log2 movzx ecx, byte ptr [rax+rcx-15h] shl r13, cl add r13, [rbp+38h] test r12, r12 jz short loc_7EEB8 mov [r12], rdx loc_7EEB8: test r14, r14 jz short loc_7EEC0 mov [r14], ecx loc_7EEC0: test rbx, rbx jz loc_7EE33 movzx eax, word ptr [rbp+6] mov [rbx], eax jmp loc_7EE33 loc_7EED4: cmp byte ptr [r13+8], 0 jz loc_7EE58 lea rsi, aArraybufferIsD; "ArrayBuffer is detached" jmp loc_7EE26 loc_7EEEB: lea rsi, aOutOfBoundAcce; "out-of-bound access" xor r13d, r13d mov rdi, r15 xor eax, eax call JS_ThrowRangeError jmp loc_7EE33
unsigned long long js_atomics_get_ptr( long long a1, long long *a2, _DWORD *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, long long a15, long long a16, int a17) { _DWORD *v17; // rbx long long v19; // rbp int v20; // ecx const char *v21; // rsi unsigned long long v22; // r13 long long v24; // r13 long long v25; // rcx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx int v31; // ecx char v32; // [rsp+0h] [rbp-48h] unsigned long long v33; // [rsp+8h] [rbp-40h] BYREF long long v34; // [rsp+10h] [rbp-38h] v34 = a5; if ( (_DWORD)a6 != -1 || ((v17 = (_DWORD *)a4, v19 = v34, v20 = *(unsigned __int16 *)(v34 + 6), !a17) ? (a4 = (unsigned int)(v20 - 30), LOBYTE(a4) = (unsigned __int16)a4 < 0xFFF8u) : (a4 = (unsigned int)(v20 - 26), LOBYTE(a4) = (a4 & 0xFFFD) != 0), (_BYTE)a4) ) { v21 = "integer TypedArray expected"; LABEL_7: v22 = 0LL; JS_ThrowTypeError(a1, (long long)v21, (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v32); return v22; } a4 = *(_QWORD *)(*(_QWORD *)(v34 + 48) + 24LL); v24 = *(_QWORD *)(a4 + 48); if ( !*(_BYTE *)(v24 + 9) ) { if ( a17 == 2 ) { v21 = "not a SharedArrayBuffer TypedArray"; goto LABEL_7; } if ( *(_BYTE *)(v24 + 8) ) { v21 = "ArrayBuffer is detached"; goto LABEL_7; } } if ( (unsigned int)JS_ToIndex( a1, &v33, a15, a16, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) return 0LL; v30 = v24; if ( v33 >= *(unsigned int *)(v19 + 64) ) { v22 = 0LL; JS_ThrowRangeError(a1, (long long)"out-of-bound access", v30, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v32); } else { v31 = (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(v19 + 6) - 21]; v22 = *(_QWORD *)(v19 + 56) + (v33 << v31); if ( a2 ) *a2 = v30; if ( a3 ) *a3 = v31; if ( v17 ) *v17 = *(unsigned __int16 *)(v19 + 6); } return v22; }
js_atomics_get_ptr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI MOV qword ptr [RSP + 0x10],R8 CMP R9D,-0x1 JNZ 0x0017ee1f MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV EAX,dword ptr [RSP + 0x60] MOV RBP,qword ptr [RSP + 0x10] MOVZX ECX,word ptr [RBP + 0x6] TEST EAX,EAX JZ 0x0017ee11 ADD ECX,-0x1a TEST ECX,0xfffd SETNZ CL JMP 0x0017ee1b LAB_0017ee11: ADD ECX,-0x1e CMP CX,-0x8 SETC CL LAB_0017ee1b: TEST CL,CL JZ 0x0017ee45 LAB_0017ee1f: LEA RSI,[0x1a0da8] LAB_0017ee26: XOR R13D,R13D MOV RDI,R15 XOR EAX,EAX CALL 0x00121953 LAB_0017ee33: MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ee45: MOV RCX,qword ptr [RBP + 0x30] MOV RCX,qword ptr [RCX + 0x18] MOV R13,qword ptr [RCX + 0x30] CMP byte ptr [R13 + 0x9],0x0 JZ 0x0017ee7a LAB_0017ee58: LEA RAX,[RSP + 0x50] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x00126e5b TEST EAX,EAX JZ 0x0017ee88 XOR R13D,R13D JMP 0x0017ee33 LAB_0017ee7a: CMP EAX,0x2 JNZ 0x0017eed4 LEA RSI,[0x1a0dc4] JMP 0x0017ee26 LAB_0017ee88: MOV RDX,R13 MOV R13,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RBP + 0x40] CMP R13,RAX JNC 0x0017eeeb MOVZX EAX,word ptr [RBP + 0x6] LEA RCX,[0x19c1cf] MOVZX ECX,byte ptr [RAX + RCX*0x1 + -0x15] SHL R13,CL ADD R13,qword ptr [RBP + 0x38] TEST R12,R12 JZ 0x0017eeb8 MOV qword ptr [R12],RDX LAB_0017eeb8: TEST R14,R14 JZ 0x0017eec0 MOV dword ptr [R14],ECX LAB_0017eec0: TEST RBX,RBX JZ 0x0017ee33 MOVZX EAX,word ptr [RBP + 0x6] MOV dword ptr [RBX],EAX JMP 0x0017ee33 LAB_0017eed4: CMP byte ptr [R13 + 0x8],0x0 JZ 0x0017ee58 LEA RSI,[0x1a0cf1] JMP 0x0017ee26 LAB_0017eeeb: LEA RSI,[0x1a0de7] XOR R13D,R13D MOV RDI,R15 XOR EAX,EAX CALL 0x0011fec9 JMP 0x0017ee33
long js_atomics_get_ptr(int8 param_1,long *param_2,uint *param_3,uint *param_4,long param_5, int param_6,int8 param_7,int8 param_8,int param_9) { byte bVar1; long lVar2; int iVar3; char *pcVar4; long lVar5; bool bVar6; ulong local_40; long local_38; local_38 = param_5; if (param_6 == -1) { if (param_9 == 0) { bVar6 = (ushort)(*(short *)(param_5 + 6) - 0x1eU) < 0xfff8; } else { bVar6 = (*(short *)(param_5 + 6) - 0x1aU & 0xfffd) != 0; } if (!bVar6) { lVar2 = *(long *)(*(long *)(*(long *)(param_5 + 0x30) + 0x18) + 0x30); if (*(char *)(lVar2 + 9) != '\0') { LAB_0017ee58: iVar3 = JS_ToIndex(param_1,&local_40,param_7,param_8); if (iVar3 != 0) { return 0; } if (local_40 < *(uint *)(param_5 + 0x40)) { bVar1 = "toSorted"[(ulong)*(ushort *)(param_5 + 6) + 6]; lVar5 = (local_40 << (bVar1 & 0x3f)) + *(long *)(param_5 + 0x38); if (param_2 != (long *)0x0) { *param_2 = lVar2; } if (param_3 != (uint *)0x0) { *param_3 = (uint)bVar1; } if (param_4 == (uint *)0x0) { return lVar5; } *param_4 = (uint)*(ushort *)(param_5 + 6); return lVar5; } JS_ThrowRangeError(param_1,"out-of-bound access"); return 0; } if (param_9 == 2) { pcVar4 = "not a SharedArrayBuffer TypedArray"; } else { if (*(char *)(lVar2 + 8) == '\0') goto LAB_0017ee58; pcVar4 = "ArrayBuffer is detached"; } goto LAB_0017ee26; } } pcVar4 = "integer TypedArray expected"; LAB_0017ee26: JS_ThrowTypeError(param_1,pcVar4); return 0; }
10,117
js_atomics_get_ptr
bluesky950520[P]quickjs/quickjs.c
static void *js_atomics_get_ptr(JSContext *ctx, JSArrayBuffer **pabuf, int *psize_log2, JSClassID *pclass_id, JSValue obj, JSValue idx_val, int is_waitable) { JSObject *p; JSTypedArray *ta; JSArrayBuffer *abuf; void *ptr; uint64_t idx; BOOL err; int size_log2; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(obj); if (is_waitable) err = (p->class_id != JS_CLASS_INT32_ARRAY && p->class_id != JS_CLASS_BIG_INT64_ARRAY); else err = !(p->class_id >= JS_CLASS_INT8_ARRAY && p->class_id <= JS_CLASS_BIG_UINT64_ARRAY); if (err) { fail: JS_ThrowTypeError(ctx, "integer TypedArray expected"); return NULL; } ta = p->u.typed_array; abuf = ta->buffer->u.array_buffer; if (!abuf->shared) { if (is_waitable == 2) { JS_ThrowTypeError(ctx, "not a SharedArrayBuffer TypedArray"); return NULL; } if (abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); return NULL; } } if (JS_ToIndex(ctx, &idx, idx_val)) { return NULL; } /* if the array buffer is detached, p->u.array.count = 0 */ if (idx >= p->u.array.count) { JS_ThrowRangeError(ctx, "out-of-bound access"); return NULL; } size_log2 = typed_array_size_log2(p->class_id); ptr = p->u.array.u.uint8_ptr + ((uintptr_t)idx << size_log2); if (pabuf) *pabuf = abuf; if (psize_log2) *psize_log2 = size_log2; if (pclass_id) *pclass_id = p->class_id; return ptr; }
O3
c
js_atomics_get_ptr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 cmpl $-0x1, %r9d jne 0x8188d movq %r8, %r14 movq %rcx, %rbx movq %rdx, %r15 movq %rsi, %rbp movl 0x50(%rsp), %eax movzwl 0x6(%r8), %edx testl %eax, %eax je 0x8187c cmpw $0x1c, %dx setne %cl cmpw $0x1a, %dx jne 0x81889 jmp 0x818b3 cmpw $0x1e, %dx setae %cl cmpw $0x16, %dx jb 0x8188d testb %cl, %cl je 0x818b3 leaq 0x224ce(%rip), %rsi # 0xa3d62 xorl %r13d, %r13d movq %r12, %rdi xorl %eax, %eax callq 0x2214f movq %r13, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x30(%r14), %rcx movq 0x18(%rcx), %rcx movq 0x30(%rcx), %r13 cmpb $0x0, 0x9(%r13) je 0x818e4 movq 0x48(%rsp), %rcx movq 0x40(%rsp), %rdx movq %rsp, %rsi movq %r12, %rdi callq 0x274b4 testl %eax, %eax je 0x818f2 xorl %r13d, %r13d jmp 0x818a1 cmpl $0x2, %eax jne 0x81940 leaq 0x2248e(%rip), %rsi # 0xa3d7e jmp 0x81894 movq %r13, %rdx movq (%rsp), %r13 movl 0x40(%r14), %eax cmpq %rax, %r13 jae 0x81957 movzwl 0x6(%r14), %eax leaq 0x1d851(%rip), %rcx # 0x9f15f movzbl -0x15(%rax,%rcx), %ecx shlq %cl, %r13 addq 0x38(%r14), %r13 testq %rbp, %rbp je 0x81923 movq %rdx, (%rbp) testq %r15, %r15 je 0x8192b movl %ecx, (%r15) testq %rbx, %rbx je 0x818a1 movzwl 0x6(%r14), %eax movl %eax, (%rbx) jmp 0x818a1 cmpb $0x0, 0x8(%r13) je 0x818c6 leaq 0x22359(%rip), %rsi # 0xa3cab jmp 0x81894 leaq 0x22443(%rip), %rsi # 0xa3da1 xorl %r13d, %r13d movq %r12, %rdi xorl %eax, %eax callq 0x205f0 jmp 0x818a1
js_atomics_get_ptr: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdi cmp r9d, 0FFFFFFFFh jnz short loc_8188D mov r14, r8 mov rbx, rcx mov r15, rdx mov rbp, rsi mov eax, [rsp+38h+arg_10] movzx edx, word ptr [r8+6] test eax, eax jz short loc_8187C cmp dx, 1Ch setnz cl cmp dx, 1Ah jnz short loc_81889 jmp short loc_818B3 loc_8187C: cmp dx, 1Eh setnb cl cmp dx, 16h jb short loc_8188D loc_81889: test cl, cl jz short loc_818B3 loc_8188D: lea rsi, aIntegerTypedar; "integer TypedArray expected" loc_81894: xor r13d, r13d mov rdi, r12 xor eax, eax call JS_ThrowTypeError loc_818A1: mov rax, r13 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_818B3: mov rcx, [r14+30h] mov rcx, [rcx+18h] mov r13, [rcx+30h] cmp byte ptr [r13+9], 0 jz short loc_818E4 loc_818C6: mov rcx, [rsp+38h+arg_8] mov rdx, [rsp+38h+arg_0] mov rsi, rsp mov rdi, r12 call JS_ToIndex test eax, eax jz short loc_818F2 xor r13d, r13d jmp short loc_818A1 loc_818E4: cmp eax, 2 jnz short loc_81940 lea rsi, aNotASharedarra; "not a SharedArrayBuffer TypedArray" jmp short loc_81894 loc_818F2: mov rdx, r13 mov r13, [rsp+38h+var_38] mov eax, [r14+40h] cmp r13, rax jnb short loc_81957 movzx eax, word ptr [r14+6] lea rcx, typed_array_size_log2 movzx ecx, byte ptr [rax+rcx-15h] shl r13, cl add r13, [r14+38h] test rbp, rbp jz short loc_81923 mov [rbp+0], rdx loc_81923: test r15, r15 jz short loc_8192B mov [r15], ecx loc_8192B: test rbx, rbx jz loc_818A1 movzx eax, word ptr [r14+6] mov [rbx], eax jmp loc_818A1 loc_81940: cmp byte ptr [r13+8], 0 jz loc_818C6 lea rsi, aArraybufferIsD; "ArrayBuffer is detached" jmp loc_81894 loc_81957: lea rsi, aOutOfBoundAcce; "out-of-bound access" xor r13d, r13d mov rdi, r12 xor eax, eax call JS_ThrowRangeError jmp loc_818A1
unsigned long long js_atomics_get_ptr( 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, _DWORD *a15, long long a16, int a17) { unsigned long long v17; // rax _DWORD *v19; // rbx _DWORD *v20; // r15 const char *v21; // rsi unsigned long long v22; // r13 long long v24; // r13 long long v25; // rcx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx int v31; // ecx unsigned long long v32[7]; // [rsp+0h] [rbp-38h] BYREF v32[0] = v17; if ( (_DWORD)a6 != -1 ) goto LABEL_7; v19 = (_DWORD *)a4; v20 = (_DWORD *)a3; a3 = *(unsigned __int16 *)(a5 + 6); if ( !a17 ) { LOBYTE(a4) = (unsigned __int16)a3 >= 0x1Eu; if ( (unsigned __int16)a3 < 0x16u ) goto LABEL_7; goto LABEL_6; } LOBYTE(a4) = (_WORD)a3 != 28; if ( (_WORD)a3 != 26 ) { LABEL_6: if ( !(_BYTE)a4 ) goto LABEL_10; LABEL_7: v21 = "integer TypedArray expected"; LABEL_8: v22 = 0LL; JS_ThrowTypeError(a1, (long long)v21, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v32[0]); return v22; } LABEL_10: a4 = *(_QWORD *)(*(_QWORD *)(a5 + 48) + 24LL); v24 = *(_QWORD *)(a4 + 48); if ( *(_BYTE *)(v24 + 9) ) goto LABEL_11; if ( a17 == 2 ) { v21 = "not a SharedArrayBuffer TypedArray"; goto LABEL_8; } if ( *(_BYTE *)(v24 + 8) ) { v21 = "ArrayBuffer is detached"; goto LABEL_8; } LABEL_11: if ( (unsigned int)JS_ToIndex( a1, v32, a15, a16, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) return 0LL; v30 = v24; if ( v32[0] >= *(unsigned int *)(a5 + 64) ) { v22 = 0LL; JS_ThrowRangeError( a1, (long long)"out-of-bound access", v30, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v32[0]); } else { v31 = (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(a5 + 6) - 21]; v22 = *(_QWORD *)(a5 + 56) + (v32[0] << v31); if ( a2 ) *a2 = v30; if ( v20 ) *v20 = v31; if ( v19 ) *v19 = *(unsigned __int16 *)(a5 + 6); } return v22; }
js_atomics_get_ptr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDI CMP R9D,-0x1 JNZ 0x0018188d MOV R14,R8 MOV RBX,RCX MOV R15,RDX MOV RBP,RSI MOV EAX,dword ptr [RSP + 0x50] MOVZX EDX,word ptr [R8 + 0x6] TEST EAX,EAX JZ 0x0018187c CMP DX,0x1c SETNZ CL CMP DX,0x1a JNZ 0x00181889 JMP 0x001818b3 LAB_0018187c: CMP DX,0x1e SETNC CL CMP DX,0x16 JC 0x0018188d LAB_00181889: TEST CL,CL JZ 0x001818b3 LAB_0018188d: LEA RSI,[0x1a3d62] LAB_00181894: XOR R13D,R13D MOV RDI,R12 XOR EAX,EAX CALL 0x0012214f LAB_001818a1: MOV RAX,R13 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001818b3: MOV RCX,qword ptr [R14 + 0x30] MOV RCX,qword ptr [RCX + 0x18] MOV R13,qword ptr [RCX + 0x30] CMP byte ptr [R13 + 0x9],0x0 JZ 0x001818e4 LAB_001818c6: MOV RCX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] MOV RSI,RSP MOV RDI,R12 CALL 0x001274b4 TEST EAX,EAX JZ 0x001818f2 XOR R13D,R13D JMP 0x001818a1 LAB_001818e4: CMP EAX,0x2 JNZ 0x00181940 LEA RSI,[0x1a3d7e] JMP 0x00181894 LAB_001818f2: MOV RDX,R13 MOV R13,qword ptr [RSP] MOV EAX,dword ptr [R14 + 0x40] CMP R13,RAX JNC 0x00181957 MOVZX EAX,word ptr [R14 + 0x6] LEA RCX,[0x19f15f] MOVZX ECX,byte ptr [RAX + RCX*0x1 + -0x15] SHL R13,CL ADD R13,qword ptr [R14 + 0x38] TEST RBP,RBP JZ 0x00181923 MOV qword ptr [RBP],RDX LAB_00181923: TEST R15,R15 JZ 0x0018192b MOV dword ptr [R15],ECX LAB_0018192b: TEST RBX,RBX JZ 0x001818a1 MOVZX EAX,word ptr [R14 + 0x6] MOV dword ptr [RBX],EAX JMP 0x001818a1 LAB_00181940: CMP byte ptr [R13 + 0x8],0x0 JZ 0x001818c6 LEA RSI,[0x1a3cab] JMP 0x00181894 LAB_00181957: LEA RSI,[0x1a3da1] XOR R13D,R13D MOV RDI,R12 XOR EAX,EAX CALL 0x001205f0 JMP 0x001818a1
long js_atomics_get_ptr(int8 param_1,long *param_2,uint *param_3,uint *param_4,long param_5, int param_6,int8 param_7,int8 param_8,int param_9) { byte bVar1; ushort uVar2; long lVar3; int iVar4; ulong in_RAX; char *pcVar5; long lVar6; bool bVar7; ulong local_38; if (param_6 == -1) { uVar2 = *(ushort *)(param_5 + 6); if (param_9 != 0) { bVar7 = uVar2 != 0x1c; if (uVar2 != 0x1a) { LAB_00181889: if (bVar7) goto LAB_0018188d; } lVar3 = *(long *)(*(long *)(*(long *)(param_5 + 0x30) + 0x18) + 0x30); if (*(char *)(lVar3 + 9) != '\0') { LAB_001818c6: local_38 = in_RAX; iVar4 = JS_ToIndex(param_1,&local_38,param_7,param_8); if (iVar4 != 0) { return 0; } if (local_38 < *(uint *)(param_5 + 0x40)) { bVar1 = "toSorted"[(ulong)*(ushort *)(param_5 + 6) + 6]; lVar6 = (local_38 << (bVar1 & 0x3f)) + *(long *)(param_5 + 0x38); if (param_2 != (long *)0x0) { *param_2 = lVar3; } if (param_3 != (uint *)0x0) { *param_3 = (uint)bVar1; } if (param_4 == (uint *)0x0) { return lVar6; } *param_4 = (uint)*(ushort *)(param_5 + 6); return lVar6; } JS_ThrowRangeError(param_1,"out-of-bound access"); return 0; } if (param_9 == 2) { pcVar5 = "not a SharedArrayBuffer TypedArray"; } else { if (*(char *)(lVar3 + 8) == '\0') goto LAB_001818c6; pcVar5 = "ArrayBuffer is detached"; } goto LAB_00181894; } bVar7 = 0x1d < uVar2; if (0x15 < uVar2) goto LAB_00181889; } LAB_0018188d: pcVar5 = "integer TypedArray expected"; LAB_00181894: JS_ThrowTypeError(param_1,pcVar5); return 0; }
10,118
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0xd1ff7 movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0xd533b testl %eax, %eax je 0xd1ff7 movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0xd1fd8 movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xd1fd8 movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0xd5457 testl %eax, %eax je 0xd1ff7 movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0xd1f99 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz short loc_D1FF7 mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_D1F99: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_D1FF7 mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_D1FD8 mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_D1FD8 movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_D1FD8: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_D1FF7 mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_D1F99 loc_D1FF7: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001d1ff7 MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_001d1f99: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x001d533b TEST EAX,EAX JZ 0x001d1ff7 MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x001d1fd8 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001d1fd8 MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_001d1fd8: MOV RSI,R14 CALL 0x001d5457 TEST EAX,EAX JZ 0x001d1ff7 MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x001d1f99 LAB_001d1ff7: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
10,119
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O3
c
my_charpos_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rsi, %r12 testq %rcx, %rcx je 0x7e14d movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %r13 movq %rbx, %r12 movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jle 0x7e146 movl %eax, %eax addq %rax, %r12 decq %r15 jne 0x7e11f jmp 0x7e14d addq $0x2, %r14 movq %r14, %r12 subq %rbx, %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r12, rsi test rcx, rcx jz short loc_7E14D mov r15, rcx mov r14, rdx mov r13, rdi mov r12, rbx loc_7E11F: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r14 call qword ptr [rax+0C0h] cmp eax, 1 jle short loc_7E146 mov eax, eax add r12, rax dec r15 jnz short loc_7E11F jmp short loc_7E14D loc_7E146: add r14, 2 mov r12, r14 loc_7E14D: sub r12, rbx mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { long long v4; // r12 long long v5; // r15 int v7; // eax v4 = a2; if ( a4 ) { v5 = a4; v4 = a2; while ( 1 ) { v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3); if ( v7 <= 1 ) break; v4 += (unsigned int)v7; if ( !--v5 ) return v4 - a2; } v4 = a3 + 2; } return v4 - a2; }
my_charpos_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R12,RSI TEST RCX,RCX JZ 0x0017e14d MOV R15,RCX MOV R14,RDX MOV R13,RDI MOV R12,RBX LAB_0017e11f: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JLE 0x0017e146 MOV EAX,EAX ADD R12,RAX DEC R15 JNZ 0x0017e11f JMP 0x0017e14d LAB_0017e146: ADD R14,0x2 MOV R12,R14 LAB_0017e14d: SUB R12,RBX MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4) { uint uVar1; long lVar2; lVar2 = param_2; if (param_4 != 0) { do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3); if ((int)uVar1 < 2) { lVar2 = param_3 + 2; break; } lVar2 = lVar2 + (ulong)uVar1; param_4 = param_4 + -1; } while (param_4 != 0); } return lVar2 - param_2; }
10,120
intern_filename
eloqsql/mysys/mf_pack.c
char *intern_filename(char *to, const char *from) { size_t length, to_length; char buff[FN_REFLEN + 1]; if (from == to) { /* Dirname may destroy from */ (void) strnmov(buff, from, FN_REFLEN); from=buff; } length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length); return (to); }
O3
c
intern_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq %rdi, %rsi jne 0x5980f leaq -0x230(%rbp), %r15 movl $0x200, %edx # imm = 0x200 movq %r15, %rdi movq %r14, %rsi callq 0x96328 movq %r15, %r14 leaq -0x238(%rbp), %r15 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x52f41 movq (%r15), %rcx leaq (%rbx,%rcx), %rdi addq %rax, %r14 movl $0x200, %edx # imm = 0x200 subq %rcx, %rdx movq %r14, %rsi callq 0x96328 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x5985e movq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x28470
intern_filename: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 228h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, rdi jnz short loc_5980F lea r15, [rbp+var_230] mov edx, 200h mov rdi, r15 mov rsi, r14 call strnmov mov r14, r15 loc_5980F: lea r15, [rbp+var_238] mov rdi, rbx mov rsi, r14 mov rdx, r15 call dirname_part mov rcx, [r15] lea rdi, [rbx+rcx] add r14, rax mov edx, 200h sub rdx, rcx mov rsi, r14 call strnmov mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_5985E mov rax, rbx add rsp, 228h pop rbx pop r14 pop r15 pop rbp retn loc_5985E: call ___stack_chk_fail
long long intern_filename(long long a1, _BYTE *a2) { _BYTE *v2; // r14 long long v3; // rax long long v5; // [rsp+8h] [rbp-238h] BYREF _BYTE v6[528]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v7; // [rsp+220h] [rbp-20h] v2 = a2; v7 = __readfsqword(0x28u); if ( a2 == (_BYTE *)a1 ) { strnmov(v6, a2, 512LL); v2 = v6; } v3 = dirname_part(a1, v2, &v5); strnmov(a1 + v5, &v2[v3], 512 - v5); return a1; }
intern_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,RDI JNZ 0x0015980f LEA R15,[RBP + -0x230] MOV EDX,0x200 MOV RDI,R15 MOV RSI,R14 CALL 0x00196328 MOV R14,R15 LAB_0015980f: LEA R15,[RBP + -0x238] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00152f41 MOV RCX,qword ptr [R15] LEA RDI,[RBX + RCX*0x1] ADD R14,RAX MOV EDX,0x200 SUB RDX,RCX MOV RSI,R14 CALL 0x00196328 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0015985e MOV RAX,RBX ADD RSP,0x228 POP RBX POP R14 POP R15 POP RBP RET LAB_0015985e: CALL 0x00128470
int1 * intern_filename(int1 *param_1,int1 *param_2) { long lVar1; int1 *puVar2; long in_FS_OFFSET; long local_240; int1 local_238 [528]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar2 = param_2; if (param_2 == param_1) { puVar2 = local_238; strnmov(puVar2,param_2,0x200); } lVar1 = dirname_part(param_1,puVar2,&local_240); strnmov(param_1 + local_240,puVar2 + lVar1,0x200 - local_240); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,121
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
basic_json(const basic_json& other) : m_type(other.m_type) { // check of passed value is valid other.assert_invariant(); switch (m_type) { case value_t::object: { m_value = *other.m_value.object; break; } case value_t::array: { m_value = *other.m_value.array; break; } case value_t::string: { m_value = *other.m_value.string; break; } case value_t::boolean: { m_value = other.m_value.boolean; break; } case value_t::number_integer: { m_value = other.m_value.number_integer; break; } case value_t::number_unsigned: { m_value = other.m_value.number_unsigned; break; } case value_t::number_float: { m_value = other.m_value.number_float; break; } case value_t::binary: { m_value = *other.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O0
cpp
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x58(%rsp), %rcx movb (%rcx), %cl movb %cl, (%rax) movq $0x0, 0x8(%rax) movq 0x58(%rsp), %rdi movl $0x1, %esi callq 0xc9070 movq 0x8(%rsp), %rax movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0xc3a8f movq 0x10(%rsp), %rax leaq 0xbe715(%rip), %rcx # 0x182070 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x50(%rsp), %rdi callq 0xe6010 movq 0x8(%rsp), %rax movq 0x50(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x48(%rsp), %rdi callq 0xe6040 movq 0x8(%rsp), %rax movq 0x48(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x40(%rsp), %rdi callq 0xdf530 movq 0x8(%rsp), %rax movq 0x40(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movb 0x8(%rax), %al leaq 0x38(%rsp), %rdi andb $0x1, %al movzbl %al, %esi callq 0xe1580 movq 0x8(%rsp), %rax movq 0x38(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x30(%rsp), %rdi callq 0xe1f50 movq 0x8(%rsp), %rax movq 0x30(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x28(%rsp), %rdi callq 0xe2930 movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movsd 0x8(%rax), %xmm0 leaq 0x20(%rsp), %rdi callq 0xe0fd0 movq 0x8(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 movq 0x58(%rsp), %rax movq 0x8(%rax), %rsi leaq 0x18(%rsp), %rdi callq 0xe6070 movq 0x8(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0xc3a91 jmp 0xc3a8f jmp 0xc3a91 movq 0x8(%rsp), %rdi callq 0xcaa90 movq 0x8(%rsp), %rdi movl $0x1, %esi callq 0xc9070 addq $0x68, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEEC2ERKSD_: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov rax, [rsp+68h+var_8] mov [rsp+68h+var_60], rax mov rcx, [rsp+68h+var_10] mov cl, [rcx] mov [rax], cl mov qword ptr [rax+8], 0 mov rdi, [rsp+68h+var_10] mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE16assert_invariantEb; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::assert_invariant(bool) mov rax, [rsp+68h+var_60] movzx eax, byte ptr [rax] mov [rsp+68h+var_58], rax sub rax, 9; switch 10 cases ja def_C3962; jumptable 00000000000C3962 default case mov rax, [rsp+68h+var_58] lea rcx, jpt_C3962 movsxd rax, ds:(jpt_C3962 - 182070h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C3964: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 1 mov rsi, [rax+8] lea rdi, [rsp+68h+var_18] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2ERKS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEE; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(std::map const&<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>>) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_18] mov [rax+8], rcx jmp loc_C3A91 loc_C398A: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 2 mov rsi, [rax+8] lea rdi, [rsp+68h+var_20] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2ERKS3_ISD_SaISD_EE; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(std::vector const&<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>,std::allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_20] mov [rax+8], rcx jmp loc_C3A91 loc_C39B0: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 3 mov rsi, [rax+8] lea rdi, [rsp+68h+var_28] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2ERKS9_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(std::string const&) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_28] mov [rax+8], rcx jmp loc_C3A91 loc_C39D6: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 4 mov al, [rax+8] lea rdi, [rsp+68h+var_30] and al, 1 movzx esi, al call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2Eb; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(bool) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_30] mov [rax+8], rcx jmp loc_C3A91 loc_C3A00: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 5 mov rsi, [rax+8] lea rdi, [rsp+68h+var_38] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2El; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(long) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_38] mov [rax+8], rcx jmp short loc_C3A91 loc_C3A23: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 6 mov rsi, [rax+8] lea rdi, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2Em; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(ulong) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_40] mov [rax+8], rcx jmp short loc_C3A91 loc_C3A46: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 7 movsd xmm0, qword ptr [rax+8] lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2Ed; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(double) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_48] mov [rax+8], rcx jmp short loc_C3A91 loc_C3A6A: mov rax, [rsp+68h+var_10]; jumptable 00000000000C3962 case 8 mov rsi, [rax+8] lea rdi, [rsp+68h+var_50] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE10json_valueC2ERKNS0_27byte_container_with_subtypeISC_EE; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::json_value::json_value(nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&) mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_50] mov [rax+8], rcx jmp short loc_C3A91 loc_C3A8D: jmp short $+2; jumptable 00000000000C3962 cases 0,9 def_C3962: jmp short $+2; jumptable 00000000000C3962 default case loc_C3A91: mov rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE11set_parentsEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::set_parents(void) mov rdi, [rsp+68h+var_60] mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE16assert_invariantEb; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::assert_invariant(bool) add rsp, 68h retn
long long nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::basic_json( long long a1, _BYTE *a2) { long long v3; // [rsp+18h] [rbp-50h] BYREF long long v4; // [rsp+20h] [rbp-48h] BYREF long long v5; // [rsp+28h] [rbp-40h] BYREF long long v6; // [rsp+30h] [rbp-38h] BYREF long long v7; // [rsp+38h] [rbp-30h] BYREF long long v8; // [rsp+40h] [rbp-28h] BYREF long long v9; // [rsp+48h] [rbp-20h] BYREF long long v10; // [rsp+50h] [rbp-18h] BYREF _BYTE *v11; // [rsp+58h] [rbp-10h] long long v12; // [rsp+60h] [rbp-8h] v12 = a1; v11 = a2; *(_BYTE *)a1 = *a2; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::assert_invariant( v11, 1LL); switch ( *(_BYTE *)a1 ) { case 1: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v10, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v10; break; case 2: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v9, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v9; break; case 3: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v8, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v8; break; case 4: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v7, v11[8] & 1); *(_QWORD *)(a1 + 8) = v7; break; case 5: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v6, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v6; break; case 6: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v5, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v5; break; case 7: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v4, *((double *)v11 + 1)); *(_QWORD *)(a1 + 8) = v4; break; case 8: nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::json_value::json_value( &v3, *((_QWORD *)v11 + 1)); *(_QWORD *)(a1 + 8) = v3; break; default: break; } nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::set_parents(a1); return nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::assert_invariant( a1, 1LL); }
basic_json: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x58] MOV CL,byte ptr [RCX] MOV byte ptr [RAX],CL MOV qword ptr [RAX + 0x8],0x0 MOV RDI,qword ptr [RSP + 0x58] MOV ESI,0x1 CALL 0x001c9070 MOV RAX,qword ptr [RSP + 0x8] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x9 JA 0x001c3a8f MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x282070] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x50] CALL 0x001e6010 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_2: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x48] CALL 0x001e6040 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_3: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x40] CALL 0x001df530 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_4: MOV RAX,qword ptr [RSP + 0x58] MOV AL,byte ptr [RAX + 0x8] LEA RDI,[RSP + 0x38] AND AL,0x1 MOVZX ESI,AL CALL 0x001e1580 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_5: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x30] CALL 0x001e1f50 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_6: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x28] CALL 0x001e2930 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_7: MOV RAX,qword ptr [RSP + 0x58] MOVSD XMM0,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x20] CALL 0x001e0fd0 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_8: MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x18] CALL 0x001e6070 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x8],RCX JMP 0x001c3a91 caseD_0: JMP 0x001c3a8f LAB_001c3a8f: JMP 0x001c3a91 default: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001caa90 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1 CALL 0x001c9070 ADD RSP,0x68 RET
/* nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >::basic_json(nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > const&) */ void __thiscall nlohmann::json_abi_v3_11_2:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> ::basic_json(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> *this,basic_json *param_1) { int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; basic_json *local_10; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> *local_8; *this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )*param_1; *(int8 *)(this + 8) = 0; local_10 = param_1; local_8 = this; assert_invariant(SUB81(param_1,0)); switch(*this) { case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x0: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x9: break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x1: json_value::json_value((json_value *)&local_18,*(map **)(local_10 + 8)); *(int8 *)(this + 8) = local_18; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x2: json_value::json_value((json_value *)&local_20,*(vector **)(local_10 + 8)); *(int8 *)(this + 8) = local_20; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x3: json_value::json_value((json_value *)&local_28,*(string **)(local_10 + 8)); *(int8 *)(this + 8) = local_28; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x4: json_value::json_value((json_value *)&local_30,(bool)(local_10[8] & 1)); *(int8 *)(this + 8) = local_30; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x5: json_value::json_value((json_value *)&local_38,*(long *)(local_10 + 8)); *(int8 *)(this + 8) = local_38; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x6: json_value::json_value((json_value *)&local_40,*(ulong *)(local_10 + 8)); *(int8 *)(this + 8) = local_40; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x7: json_value::json_value((json_value *)&local_48,*(double *)(local_10 + 8)); *(int8 *)(this + 8) = local_48; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x8: json_value::json_value((json_value *)&local_50,*(byte_container_with_subtype **)(local_10 + 8)); *(int8 *)(this + 8) = local_50; } set_parents(); assert_invariant(SUB81(this,0)); return; }
10,122
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
basic_json(const basic_json& other) : m_type(other.m_type) { // check of passed value is valid other.assert_invariant(); switch (m_type) { case value_t::object: { m_value = *other.m_value.object; break; } case value_t::array: { m_value = *other.m_value.array; break; } case value_t::string: { m_value = *other.m_value.string; break; } case value_t::boolean: { m_value = other.m_value.boolean; break; } case value_t::number_integer: { m_value = other.m_value.number_integer; break; } case value_t::number_unsigned: { m_value = other.m_value.number_unsigned; break; } case value_t::number_float: { m_value = other.m_value.number_float; break; } case value_t::binary: { m_value = *other.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O1
cpp
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&): movzbl (%rsi), %eax movb %al, (%rdi) movq $0x0, 0x8(%rdi) decl %eax cmpl $0x7, %eax ja 0x6d761 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0x53011(%rip), %rcx # 0xc0718 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsi), %rax jmp 0x6d758 movq 0x8(%rsi), %rdi callq 0x75caa jmp 0x6d758 movq 0x8(%rsi), %rdi callq 0x78c7e jmp 0x6d758 movzbl 0x8(%rsi), %eax jmp 0x6d758 movq 0x8(%rsi), %rdi callq 0x78890 jmp 0x6d758 movq 0x8(%rsi), %rdi callq 0x78b2c jmp 0x6d758 movsd 0x8(%rsi), %xmm0 movsd %xmm0, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x8(%rbx) addq $0x10, %rsp popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEEC2ERKSD_: movzx eax, byte ptr [rsi] mov [rdi], al mov qword ptr [rdi+8], 0 dec eax; switch 8 cases cmp eax, 7 ja short def_6D70E; jumptable 000000000006D70E default case push rbx sub rsp, 10h mov rbx, rdi lea rcx, jpt_6D70E movsxd rax, ds:(jpt_6D70E - 0C0718h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6D710: mov rax, [rsi+8]; jumptable 000000000006D70E cases 5,6 jmp short loc_6D758 loc_6D716: mov rdi, [rsi+8]; jumptable 000000000006D70E case 3 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::string,std::string const&>(std::string const&) jmp short loc_6D758 loc_6D721: mov rdi, [rsi+8]; jumptable 000000000006D70E case 8 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_6D758 loc_6D72C: movzx eax, byte ptr [rsi+8]; jumptable 000000000006D70E case 4 jmp short loc_6D758 loc_6D732: mov rdi, [rsi+8]; jumptable 000000000006D70E case 1 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) jmp short loc_6D758 loc_6D73D: mov rdi, [rsi+8]; jumptable 000000000006D70E case 2 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) jmp short loc_6D758 loc_6D748: movsd xmm0, qword ptr [rsi+8]; jumptable 000000000006D70E case 7 movsd [rsp+18h+var_10], xmm0 mov rax, [rsp+18h+var_10] loc_6D758: mov [rbx+8], rax add rsp, 10h pop rbx def_6D70E: retn; jumptable 000000000006D70E default case
long long nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::basic_json( long long a1, unsigned __int8 *a2) { int v2; // eax long long result; // rax v2 = *a2; *(_BYTE *)a1 = v2; *(_QWORD *)(a1 + 8) = 0LL; result = (unsigned int)(v2 - 1); switch ( (int)result ) { case 0: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>,std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>> const&>(*((_QWORD *)a2 + 1)); goto LABEL_9; case 1: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>> const&>(*((_QWORD *)a2 + 1)); goto LABEL_9; case 2: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::string,std::string const&>(*((_QWORD *)a2 + 1)); goto LABEL_9; case 3: result = a2[8]; goto LABEL_9; case 4: case 5: result = *((_QWORD *)a2 + 1); goto LABEL_9; case 6: result = *((_QWORD *)a2 + 1); goto LABEL_9; case 7: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned char>> const&>(*((_QWORD *)a2 + 1)); LABEL_9: *(_QWORD *)(a1 + 8) = result; break; default: return result; } return result; }
10,123
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
basic_json(const basic_json& other) : m_type(other.m_type) { // check of passed value is valid other.assert_invariant(); switch (m_type) { case value_t::object: { m_value = *other.m_value.object; break; } case value_t::array: { m_value = *other.m_value.array; break; } case value_t::string: { m_value = *other.m_value.string; break; } case value_t::boolean: { m_value = other.m_value.boolean; break; } case value_t::number_integer: { m_value = other.m_value.number_integer; break; } case value_t::number_unsigned: { m_value = other.m_value.number_unsigned; break; } case value_t::number_float: { m_value = other.m_value.number_float; break; } case value_t::binary: { m_value = *other.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&): movzbl (%rsi), %eax movb %al, (%rdi) andq $0x0, 0x8(%rdi) decl %eax cmpl $0x7, %eax ja 0x4a8a2 pushq %rbx movq %rdi, %rbx leaq 0x51dea(%rip), %rcx # 0x9c648 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsi), %rax jmp 0x4a89d movq 0x8(%rsi), %rdi callq 0x5200c jmp 0x4a89d movq 0x8(%rsi), %rdi callq 0x54c20 jmp 0x4a89d movzbl 0x8(%rsi), %eax jmp 0x4a89d movq 0x8(%rsi), %rdi callq 0x54806 jmp 0x4a89d movq 0x8(%rsi), %rdi callq 0x54ab2 movq %rax, 0x8(%rbx) popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEEC2ERKSD_: movzx eax, byte ptr [rsi] mov [rdi], al and qword ptr [rdi+8], 0 dec eax; switch 8 cases cmp eax, 7 ja short def_4A865; jumptable 000000000004A865 default case push rbx mov rbx, rdi lea rcx, jpt_4A865 movsxd rax, ds:(jpt_4A865 - 9C648h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4A867: mov rax, [rsi+8]; jumptable 000000000004A865 cases 5-7 jmp short loc_4A89D loc_4A86D: mov rdi, [rsi+8]; jumptable 000000000004A865 case 3 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::string,std::string const&>(std::string const&) jmp short loc_4A89D loc_4A878: mov rdi, [rsi+8]; jumptable 000000000004A865 case 8 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_4A89D loc_4A883: movzx eax, byte ptr [rsi+8]; jumptable 000000000004A865 case 4 jmp short loc_4A89D loc_4A889: mov rdi, [rsi+8]; jumptable 000000000004A865 case 1 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) jmp short loc_4A89D loc_4A894: mov rdi, [rsi+8]; jumptable 000000000004A865 case 2 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) loc_4A89D: mov [rbx+8], rax pop rbx def_4A865: retn; jumptable 000000000004A865 default case
basic_json: MOVZX EAX,byte ptr [RSI] MOV byte ptr [RDI],AL AND qword ptr [RDI + 0x8],0x0 DEC EAX CMP EAX,0x7 JA 0x0014a8a2 PUSH RBX MOV RBX,RDI LEA RCX,[0x19c648] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [RSI + 0x8] JMP 0x0014a89d caseD_3: MOV RDI,qword ptr [RSI + 0x8] CALL 0x0015200c JMP 0x0014a89d caseD_8: MOV RDI,qword ptr [RSI + 0x8] CALL 0x00154c20 JMP 0x0014a89d caseD_4: MOVZX EAX,byte ptr [RSI + 0x8] JMP 0x0014a89d caseD_1: MOV RDI,qword ptr [RSI + 0x8] CALL 0x00154806 JMP 0x0014a89d caseD_2: MOV RDI,qword ptr [RSI + 0x8] CALL 0x00154ab2 LAB_0014a89d: MOV qword ptr [RBX + 0x8],RAX POP RBX default: RET
/* nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >::basic_json(nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > const&) */ void __thiscall nlohmann::json_abi_v3_11_2:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> ::basic_json(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> *this,basic_json *param_1) { basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> bVar1; string *psVar2; bVar1 = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )*param_1; *this = bVar1; *(int8 *)(this + 8) = 0; switch(bVar1) { case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x1: psVar2 = (string *) create<std::map<std::__cxx11::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>>,std::map<std::__cxx11::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>>const&> (*(map **)(param_1 + 8)); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x2: psVar2 = (string *) create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,std::allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,std::allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>const&> (*(vector **)(param_1 + 8)); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x3: psVar2 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x4: psVar2 = (string *)(ulong)(byte)param_1[8]; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x5: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x6: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x7: psVar2 = *(string **)(param_1 + 8); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> )0x8: psVar2 = (string *) create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_0014a865_default; } *(string **)(this + 8) = psVar2; switchD_0014a865_default: return; }
10,124
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
basic_json(const basic_json& other) : m_type(other.m_type) { // check of passed value is valid other.assert_invariant(); switch (m_type) { case value_t::object: { m_value = *other.m_value.object; break; } case value_t::array: { m_value = *other.m_value.array; break; } case value_t::string: { m_value = *other.m_value.string; break; } case value_t::boolean: { m_value = other.m_value.boolean; break; } case value_t::number_integer: { m_value = other.m_value.number_integer; break; } case value_t::number_unsigned: { m_value = other.m_value.number_unsigned; break; } case value_t::number_float: { m_value = other.m_value.number_float; break; } case value_t::binary: { m_value = *other.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
O3
cpp
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::basic_json(nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&): movzbl (%rsi), %eax movb %al, (%rdi) movq $0x0, 0x8(%rdi) decl %eax cmpl $0x7, %eax ja 0x6cb23 pushq %rbx movq %rdi, %rbx leaq 0x52c49(%rip), %rcx # 0xbf728 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsi), %rax jmp 0x6cb1e movq 0x8(%rsi), %rdi callq 0x74d80 jmp 0x6cb1e movq 0x8(%rsi), %rdi callq 0x77c92 jmp 0x6cb1e movzbl 0x8(%rsi), %eax jmp 0x6cb1e movq 0x8(%rsi), %rdi callq 0x778a4 jmp 0x6cb1e movq 0x8(%rsi), %rdi callq 0x77b40 movq %rax, 0x8(%rbx) popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEEC2ERKSD_: movzx eax, byte ptr [rsi] mov [rdi], al mov qword ptr [rdi+8], 0 dec eax; switch 8 cases cmp eax, 7 ja short def_6CAE6; jumptable 000000000006CAE6 default case push rbx mov rbx, rdi lea rcx, jpt_6CAE6 movsxd rax, ds:(jpt_6CAE6 - 0BF728h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6CAE8: mov rax, [rsi+8]; jumptable 000000000006CAE6 cases 5-7 jmp short loc_6CB1E loc_6CAEE: mov rdi, [rsi+8]; jumptable 000000000006CAE6 case 3 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::string,std::string const&>(std::string const&) jmp short loc_6CB1E loc_6CAF9: mov rdi, [rsi+8]; jumptable 000000000006CAE6 case 8 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_6CB1E loc_6CB04: movzx eax, byte ptr [rsi+8]; jumptable 000000000006CAE6 case 4 jmp short loc_6CB1E loc_6CB0A: mov rdi, [rsi+8]; jumptable 000000000006CAE6 case 1 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) jmp short loc_6CB1E loc_6CB15: mov rdi, [rsi+8]; jumptable 000000000006CAE6 case 2 call _ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&>(std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>> const&) loc_6CB1E: mov [rbx+8], rax pop rbx def_6CAE6: retn; jumptable 000000000006CAE6 default case
long long nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::basic_json( long long a1, unsigned __int8 *a2) { int v2; // eax long long result; // rax v2 = *a2; *(_BYTE *)a1 = v2; *(_QWORD *)(a1 + 8) = 0LL; result = (unsigned int)(v2 - 1); switch ( (int)result ) { case 0: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>,std::map<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>> const&>(*((_QWORD *)a2 + 1)); goto LABEL_8; case 1: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>> const&>(*((_QWORD *)a2 + 1)); goto LABEL_8; case 2: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<std::string,std::string const&>(*((_QWORD *)a2 + 1)); goto LABEL_8; case 3: result = a2[8]; goto LABEL_8; case 4: case 5: case 6: result = *((_QWORD *)a2 + 1); goto LABEL_8; case 7: result = nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::create<nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::byte_container_with_subtype<std::vector<unsigned char>> const&>(*((_QWORD *)a2 + 1)); LABEL_8: *(_QWORD *)(a1 + 8) = result; break; default: return result; } return result; }
10,125
spdlog::details::r_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 11; ScopedPadder p(field_size, padinfo_, dest); fmt_helper::pad2(to12h(tm_time), dest); dest.push_back(':'); fmt_helper::pad2(tm_time.tm_min, dest); dest.push_back(':'); fmt_helper::pad2(tm_time.tm_sec, dest); dest.push_back(' '); fmt_helper::append_string_view(ampm(tm_time), dest); }
O0
c
spdlog::details::r_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq 0x40(%rsp), %rdx movq $0xb, 0x20(%rsp) addq $0x8, %rdx movq 0x28(%rsp), %rcx leaq 0x1f(%rsp), %rdi movl $0xb, %esi callq 0x8eaa0 movq 0x30(%rsp), %rdi callq 0x7b4c0 movl %eax, %edi movq 0x28(%rsp), %rsi callq 0x8f390 movq 0x28(%rsp), %rdi movb $0x3a, 0x1e(%rsp) leaq 0x1e(%rsp), %rsi callq 0x24c60 movq 0x30(%rsp), %rax movl 0x4(%rax), %edi movq 0x28(%rsp), %rsi callq 0x8f390 movq 0x28(%rsp), %rdi movb $0x3a, 0x1d(%rsp) leaq 0x1d(%rsp), %rsi callq 0x24c60 movq 0x30(%rsp), %rax movl (%rax), %edi movq 0x28(%rsp), %rsi callq 0x8f390 movq 0x28(%rsp), %rdi movb $0x20, 0x1c(%rsp) leaq 0x1c(%rsp), %rsi callq 0x24c60 movq 0x30(%rsp), %rdi callq 0x7b500 leaq 0x8(%rsp), %rcx movq %rcx, 0x50(%rsp) movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rax movq %rax, (%rsp) movq 0x48(%rsp), %rcx movq %rcx, (%rax) movq 0x48(%rsp), %rdi callq 0x152e0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x8(%rax) movq 0x28(%rsp), %rdx movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x7e1d0 addq $0x58, %rsp retq nopl (%rax,%rax)
_ZN6spdlog7details11r_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov [rsp+58h+var_28], rdx mov [rsp+58h+var_30], rcx mov rdx, [rsp+58h+var_18] mov [rsp+58h+var_38], 0Bh add rdx, 8 mov rcx, [rsp+58h+var_30] lea rdi, [rsp+58h+var_39] mov esi, 0Bh call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+58h+var_28] call _ZN6spdlog7detailsL5to12hERK2tm; spdlog::details::to12h(tm const&) mov edi, eax mov rsi, [rsp+58h+var_30] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+58h+var_30] mov [rsp+58h+var_3A], 3Ah ; ':' lea rsi, [rsp+58h+var_3A] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) mov rax, [rsp+58h+var_28] mov edi, [rax+4] mov rsi, [rsp+58h+var_30] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+58h+var_30] mov [rsp+58h+var_3B], 3Ah ; ':' lea rsi, [rsp+58h+var_3B] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) mov rax, [rsp+58h+var_28] mov edi, [rax] mov rsi, [rsp+58h+var_30] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+58h+var_30] mov [rsp+58h+var_3C], 20h ; ' ' lea rsi, [rsp+58h+var_3C] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) mov rdi, [rsp+58h+var_28] call _ZN6spdlog7detailsL4ampmERK2tm; spdlog::details::ampm(tm const&) lea rcx, [rsp+58h+var_50] mov [rsp+58h+var_8], rcx mov [rsp+58h+var_10], rax mov rax, [rsp+58h+var_8] mov [rsp+58h+var_58], rax mov rcx, [rsp+58h+var_10] mov [rax], rcx mov rdi, [rsp+58h+var_10] call _strlen mov rcx, rax mov rax, [rsp+58h+var_58] mov [rax+8], rcx mov rdx, [rsp+58h+var_30] mov rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_48] call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) add rsp, 58h retn
long long spdlog::details::r_formatter<spdlog::details::null_scoped_padder>::format( long long a1, long long a2, int *a3, _QWORD *a4) { int v4; // eax const char *v5; // rax const char *v7; // [rsp+8h] [rbp-50h] BYREF long long v8; // [rsp+10h] [rbp-48h] char v9; // [rsp+1Ch] [rbp-3Ch] BYREF char v10; // [rsp+1Dh] [rbp-3Bh] BYREF char v11; // [rsp+1Eh] [rbp-3Ah] BYREF long long v12; // [rsp+20h] [rbp-38h] _QWORD *v13; // [rsp+28h] [rbp-30h] int *v14; // [rsp+30h] [rbp-28h] long long v15; // [rsp+38h] [rbp-20h] long long v16; // [rsp+40h] [rbp-18h] const char *v17; // [rsp+48h] [rbp-10h] long long *v18; // [rsp+50h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = 11LL; spdlog::details::null_scoped_padder::null_scoped_padder(); v4 = spdlog::details::to12h((long long)v14); spdlog::details::fmt_helper::pad2(v4, (long long)v13); v11 = 58; fmt::v10::detail::buffer<char>::push_back((long long)v13, &v11); spdlog::details::fmt_helper::pad2(v14[1], (long long)v13); v10 = 58; fmt::v10::detail::buffer<char>::push_back((long long)v13, &v10); spdlog::details::fmt_helper::pad2(*v14, (long long)v13); v9 = 32; fmt::v10::detail::buffer<char>::push_back((long long)v13, &v9); v5 = spdlog::details::ampm((long long)v14); v18 = (long long *)&v7; v17 = v5; v7 = v5; v8 = strlen(v5); return spdlog::details::fmt_helper::append_string_view((long long)v7, v8, v13); }
format: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x28],RCX MOV RDX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],0xb ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x1f] MOV ESI,0xb CALL 0x0018eaa0 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0017b4c0 MOV EDI,EAX MOV RSI,qword ptr [RSP + 0x28] CALL 0x0018f390 MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x1e],0x3a LEA RSI,[RSP + 0x1e] CALL 0x00124c60 MOV RAX,qword ptr [RSP + 0x30] MOV EDI,dword ptr [RAX + 0x4] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0018f390 MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x1d],0x3a LEA RSI,[RSP + 0x1d] CALL 0x00124c60 MOV RAX,qword ptr [RSP + 0x30] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0018f390 MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x1c],0x20 LEA RSI,[RSP + 0x1c] CALL 0x00124c60 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0017b500 LEA RCX,[RSP + 0x8] MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP],RAX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x48] CALL 0x001152e0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0017e1d0 ADD RSP,0x58 RET
/* spdlog::details::r_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::r_formatter<spdlog::details::null_scoped_padder>::format (r_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { int iVar1; size_t sVar2; fmt_helper *local_50 [2]; char local_3c [3]; null_scoped_padder local_39; int8 local_38; basic_memory_buffer *local_30; tm *local_28; log_msg *local_20; r_formatter<spdlog::details::null_scoped_padder> *local_18; fmt_helper *local_10; fmt_helper **local_8; local_38 = 0xb; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_18 = this; null_scoped_padder::null_scoped_padder(&local_39,0xb,(padding_info *)(this + 8),param_3); iVar1 = to12h(local_28); fmt_helper::pad2(iVar1,local_30); local_3c[2] = 0x3a; fmt::v10::detail::buffer<char>::push_back((buffer<char> *)local_30,local_3c + 2); fmt_helper::pad2(local_28->tm_min,local_30); local_3c[1] = 0x3a; fmt::v10::detail::buffer<char>::push_back((buffer<char> *)local_30,local_3c + 1); fmt_helper::pad2(local_28->tm_sec,local_30); local_3c[0] = ' '; fmt::v10::detail::buffer<char>::push_back((buffer<char> *)local_30,local_3c); local_50[0] = (fmt_helper *)ampm(local_28); local_8 = local_50; local_10 = local_50[0]; sVar2 = strlen((char *)local_50[0]); fmt_helper::append_string_view(local_50[0],sVar2,local_30); return; }
10,126
arena_alloc_aligned
tsotchke[P]eshkol/src/core/memory/arena.c
void* arena_alloc_aligned(Arena* arena, size_t size, size_t alignment) { assert(arena != NULL); // Add debug output for zero-sized allocations if (size == 0) { fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n"); // Print stack trace if possible void* buffer[100]; int nptrs = backtrace(buffer, 100); backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO); // Continue with a minimum size of 1 instead of failing size = 1; } assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2 // Try to allocate from current block void* result = arena_alloc_from_block(arena, arena->current, size, alignment); if (result) return result; // Need a new block size_t min_size = size + alignment - 1; // Ensure enough space for alignment Block* block = arena_add_block(arena, min_size); if (!block) return NULL; // Allocate from the new block result = arena_alloc_from_block(arena, block, size, alignment); assert(result != NULL); // Should always succeed return result; }
O0
c
arena_alloc_aligned: pushq %rbp movq %rsp, %rbp subq $0x360, %rsp # imm = 0x360 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1c80 jmp 0x1c9f leaq 0x1439c(%rip), %rdi # 0x16023 leaq 0x145dd(%rip), %rsi # 0x1626b movl $0x8b, %edx leaq 0x14623(%rip), %rcx # 0x162bd callq 0x1120 cmpq $0x0, -0x18(%rbp) jne 0x1cf4 movq 0x1e34b(%rip), %rax # 0x1fff8 movq (%rax), %rdi leaq 0x14639(%rip), %rsi # 0x162f0 movb $0x0, %al callq 0x1170 leaq -0x340(%rbp), %rdi movl $0x64, %esi callq 0x10c0 movl %eax, -0x344(%rbp) leaq -0x340(%rbp), %rdi movl -0x344(%rbp), %esi movl $0x2, %edx callq 0x1040 movq $0x1, -0x18(%rbp) cmpq $0x0, -0x20(%rbp) jbe 0x1d12 movq -0x20(%rbp), %rax movq -0x20(%rbp), %rcx subq $0x1, %rcx andq %rcx, %rax cmpq $0x0, %rax jne 0x1d12 jmp 0x1d31 leaq 0x14614(%rip), %rdi # 0x1632d leaq 0x1454b(%rip), %rsi # 0x1626b movl $0x98, %edx leaq 0x14591(%rip), %rcx # 0x162bd callq 0x1120 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x1e10 movq %rax, -0x350(%rbp) cmpq $0x0, -0x350(%rbp) je 0x1d6a movq -0x350(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x1dfd movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax subq $0x1, %rax movq %rax, -0x358(%rbp) movq -0x10(%rbp), %rdi movq -0x358(%rbp), %rsi callq 0x1f90 movq %rax, -0x360(%rbp) cmpq $0x0, -0x360(%rbp) jne 0x1da8 movq $0x0, -0x8(%rbp) jmp 0x1dfd movq -0x10(%rbp), %rdi movq -0x360(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x1e10 movq %rax, -0x350(%rbp) cmpq $0x0, -0x350(%rbp) je 0x1dd3 jmp 0x1df2 leaq 0x14587(%rip), %rdi # 0x16361 leaq 0x1448a(%rip), %rsi # 0x1626b movl $0xa5, %edx leaq 0x144d0(%rip), %rcx # 0x162bd callq 0x1120 movq -0x350(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x360, %rsp # imm = 0x360 popq %rbp retq nopw (%rax,%rax)
arena_alloc_aligned: push rbp mov rbp, rsp sub rsp, 360h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_1C80 jmp short loc_1C9F loc_1C80: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 8Bh lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... call ___assert_fail loc_1C9F: cmp [rbp+var_18], 0 jnz short loc_1CF4 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorAttempted; "ERROR: Attempted to allocate 0 bytes in"... mov al, 0 call _fprintf lea rdi, [rbp+var_340] mov esi, 64h ; 'd' call _backtrace mov [rbp+var_344], eax lea rdi, [rbp+var_340] mov esi, [rbp+var_344] mov edx, 2 call _backtrace_symbols_fd mov [rbp+var_18], 1 loc_1CF4: cmp [rbp+var_20], 0 jbe short loc_1D12 mov rax, [rbp+var_20] mov rcx, [rbp+var_20] sub rcx, 1 and rax, rcx cmp rax, 0 jnz short loc_1D12 jmp short loc_1D31 loc_1D12: lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 98h lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... call ___assert_fail loc_1D31: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call arena_alloc_from_block mov [rbp+var_350], rax cmp [rbp+var_350], 0 jz short loc_1D6A mov rax, [rbp+var_350] mov [rbp+var_8], rax jmp loc_1DFD loc_1D6A: mov rax, [rbp+var_18] add rax, [rbp+var_20] sub rax, 1 mov [rbp+var_358], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_358] call arena_add_block mov [rbp+var_360], rax cmp [rbp+var_360], 0 jnz short loc_1DA8 mov [rbp+var_8], 0 jmp short loc_1DFD loc_1DA8: mov rdi, [rbp+var_10] mov rsi, [rbp+var_360] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call arena_alloc_from_block mov [rbp+var_350], rax cmp [rbp+var_350], 0 jz short loc_1DD3 jmp short loc_1DF2 loc_1DD3: lea rdi, aResultNull; "result != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 0A5h lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... call ___assert_fail loc_1DF2: mov rax, [rbp+var_350] mov [rbp+var_8], rax loc_1DFD: mov rax, [rbp+var_8] add rsp, 360h pop rbp retn
long long arena_alloc_aligned(_QWORD *a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-360h] long long v5; // [rsp+10h] [rbp-350h] long long v6; // [rsp+10h] [rbp-350h] unsigned int v7; // [rsp+1Ch] [rbp-344h] _BYTE v8[800]; // [rsp+20h] [rbp-340h] BYREF long long v9; // [rsp+340h] [rbp-20h] long long v10; // [rsp+348h] [rbp-18h] _QWORD *v11; // [rsp+350h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 139LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); if ( !v10 ) { fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n"); v7 = backtrace(v8, 100LL); backtrace_symbols_fd(v8, v7, 2LL); v10 = 1LL; } if ( !v9 || ((v9 - 1) & v9) != 0 ) __assert_fail( "alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 152LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); v5 = arena_alloc_from_block(v11, *v11, v10, v9); if ( v5 ) return v5; v4 = arena_add_block(v11, v9 + v10 - 1); if ( !v4 ) return 0LL; v6 = arena_alloc_from_block(v11, v4, v10, v9); if ( !v6 ) __assert_fail( "result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 165LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); return v6; }
arena_alloc_aligned: PUSH RBP MOV RBP,RSP SUB RSP,0x360 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00101c80 JMP 0x00101c9f LAB_00101c80: LEA RDI,[0x116023] LEA RSI,[0x11626b] MOV EDX,0x8b LEA RCX,[0x1162bd] CALL 0x00101120 LAB_00101c9f: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00101cf4 MOV RAX,qword ptr [0x0011fff8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1162f0] MOV AL,0x0 CALL 0x00101170 LEA RDI,[RBP + -0x340] MOV ESI,0x64 CALL 0x001010c0 MOV dword ptr [RBP + -0x344],EAX LEA RDI,[RBP + -0x340] MOV ESI,dword ptr [RBP + -0x344] MOV EDX,0x2 CALL 0x00101040 MOV qword ptr [RBP + -0x18],0x1 LAB_00101cf4: CMP qword ptr [RBP + -0x20],0x0 JBE 0x00101d12 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x1 AND RAX,RCX CMP RAX,0x0 JNZ 0x00101d12 JMP 0x00101d31 LAB_00101d12: LEA RDI,[0x11632d] LEA RSI,[0x11626b] MOV EDX,0x98 LEA RCX,[0x1162bd] CALL 0x00101120 LAB_00101d31: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x00101e10 MOV qword ptr [RBP + -0x350],RAX CMP qword ptr [RBP + -0x350],0x0 JZ 0x00101d6a MOV RAX,qword ptr [RBP + -0x350] MOV qword ptr [RBP + -0x8],RAX JMP 0x00101dfd LAB_00101d6a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] SUB RAX,0x1 MOV qword ptr [RBP + -0x358],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x358] CALL 0x00101f90 MOV qword ptr [RBP + -0x360],RAX CMP qword ptr [RBP + -0x360],0x0 JNZ 0x00101da8 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00101dfd LAB_00101da8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x360] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x00101e10 MOV qword ptr [RBP + -0x350],RAX CMP qword ptr [RBP + -0x350],0x0 JZ 0x00101dd3 JMP 0x00101df2 LAB_00101dd3: LEA RDI,[0x116361] LEA RSI,[0x11626b] MOV EDX,0xa5 LEA RCX,[0x1162bd] CALL 0x00101120 LAB_00101df2: MOV RAX,qword ptr [RBP + -0x350] MOV qword ptr [RBP + -0x8],RAX LAB_00101dfd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x360 POP RBP RET
long arena_alloc_aligned(int8 *param_1,long param_2,ulong param_3) { int4 uVar1; long lVar2; int1 local_348 [800]; ulong local_28; long local_20; int8 *local_18; long local_10; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x8b,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } if (param_2 == 0) { fprintf(*(FILE **)PTR_stderr_0011fff8, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n"); uVar1 = backtrace(local_348,100); backtrace_symbols_fd(local_348,uVar1,2); local_20 = 1; } if ((local_28 != 0) && ((local_28 & local_28 - 1) == 0)) { local_10 = arena_alloc_from_block(local_18,*local_18,local_20,local_28); if (local_10 == 0) { lVar2 = arena_add_block(local_18,local_20 + local_28 + -1); if (lVar2 == 0) { local_10 = 0; } else { local_10 = arena_alloc_from_block(local_18,lVar2,local_20,local_28); if (local_10 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xa5,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } } } return local_10; } /* WARNING: Subroutine does not return */ __assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 0x98,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); }
10,127
void ImPlot::PlotErrorBars<signed char>(char const*, signed char const*, signed char const*, signed char const*, signed char const*, int, int, int, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags, int offset, int stride) { IndexerIdx<T> indexer_x(xs, count,offset,stride); IndexerIdx<T> indexer_y(ys, count,offset,stride); IndexerIdx<T> indexer_n(neg,count,offset,stride); IndexerIdx<T> indexer_p(pos,count,offset,stride); GetterError<T> getter(xs, ys, neg, pos, count, offset, stride); if (ImHasFlag(flags, ImPlotErrorBarsFlags_Horizontal)) { IndexerAdd<IndexerIdx<T>,IndexerIdx<T>> indexer_xp(indexer_x, indexer_p, 1, 1); IndexerAdd<IndexerIdx<T>,IndexerIdx<T>> indexer_xn(indexer_x, indexer_n, 1, -1); GetterXY<IndexerAdd<IndexerIdx<T>,IndexerIdx<T>>,IndexerIdx<T>> getter_p(indexer_xp, indexer_y, count); GetterXY<IndexerAdd<IndexerIdx<T>,IndexerIdx<T>>,IndexerIdx<T>> getter_n(indexer_xn, indexer_y, count); PlotErrorBarsHEx(label_id, getter_p, getter_n, flags); } else { IndexerAdd<IndexerIdx<T>,IndexerIdx<T>> indexer_yp(indexer_y, indexer_p, 1, 1); IndexerAdd<IndexerIdx<T>,IndexerIdx<T>> indexer_yn(indexer_y, indexer_n, 1, -1); GetterXY<IndexerIdx<T>,IndexerAdd<IndexerIdx<T>,IndexerIdx<T>>> getter_p(indexer_x, indexer_yp, count); GetterXY<IndexerIdx<T>,IndexerAdd<IndexerIdx<T>,IndexerIdx<T>>> getter_n(indexer_x, indexer_yn, count); PlotErrorBarsVEx(label_id, getter_p, getter_n, flags); } }
O1
cpp
void ImPlot::PlotErrorBars<signed char>(char const*, signed char const*, signed char const*, signed char const*, signed char const*, int, int, int, int): pushq %rbx subq $0x100, %rsp # imm = 0x100 movq %rcx, %r10 movq %rdx, %rcx movl 0x120(%rsp), %ebx movl 0x118(%rsp), %r11d movq %rsi, 0x18(%rsp) movl %r9d, 0x20(%rsp) testl %r9d, %r9d je 0xe03fa movl %r11d, %eax cltd idivl %r9d leal (%rdx,%r9), %eax cltd idivl %r9d movl %edx, 0x24(%rsp) movl %ebx, 0x28(%rsp) movq %rcx, (%rsp) movl %r9d, 0x8(%rsp) jmp 0xe0411 movl $0x0, 0x24(%rsp) movl %ebx, 0x28(%rsp) movq %rcx, (%rsp) movl %r9d, 0x8(%rsp) xorl %edx, %edx movl 0x110(%rsp), %ecx movl %edx, 0xc(%rsp) movl %ebx, 0x10(%rsp) movq %r10, 0x48(%rsp) movl %r9d, 0x50(%rsp) testl %r9d, %r9d je 0xe0452 movl %r11d, %eax cltd idivl %r9d leal (%rdx,%r9), %eax cltd idivl %r9d movl %edx, 0x54(%rsp) movl %ebx, 0x58(%rsp) movq %r8, 0x30(%rsp) movl %r9d, 0x38(%rsp) jmp 0xe046a movl $0x0, 0x54(%rsp) movl %ebx, 0x58(%rsp) movq %r8, 0x30(%rsp) movl %r9d, 0x38(%rsp) xorl %edx, %edx movl %edx, 0x3c(%rsp) movl %ebx, 0x40(%rsp) btl $0xa, %ecx jb 0xe04e7 movq 0x28(%rsp), %rax leaq 0xb0(%rsp), %rsi movq %rax, 0x10(%rsi) movups 0x18(%rsp), %xmm0 movaps %xmm0, (%rsi) movq %rsp, %r8 movq %r8, 0x18(%rsi) leaq 0x30(%rsp), %rdx movq %rdx, 0x20(%rsi) movaps 0x1bb748(%rip), %xmm1 # 0x29bbf0 movups %xmm1, 0x28(%rsi) movl %r9d, 0x38(%rsi) movl %r9d, 0x40(%rsi) leaq 0x60(%rsp), %rdx movq %rax, 0x10(%rdx) movaps %xmm0, (%rdx) movq %r8, 0x18(%rdx) leaq 0x48(%rsp), %rax movq %rax, 0x20(%rdx) movaps 0x1bb72c(%rip), %xmm0 # 0x29bc00 movups %xmm0, 0x28(%rdx) movl %r9d, 0x38(%rdx) movl %r9d, 0x40(%rdx) callq 0xe0a0d jmp 0xe0555 movq 0x10(%rsp), %rax leaq 0xb0(%rsp), %rsi movq %rax, 0x38(%rsi) movups (%rsp), %xmm0 movups %xmm0, 0x28(%rsi) leaq 0x18(%rsp), %r8 movq %r8, (%rsi) leaq 0x30(%rsp), %rdx movq %rdx, 0x8(%rsi) movaps 0x1bb6d8(%rip), %xmm1 # 0x29bbf0 movups %xmm1, 0x10(%rsi) movl %r9d, 0x20(%rsi) movl %r9d, 0x40(%rsi) leaq 0x60(%rsp), %rdx movq %rax, 0x38(%rdx) movups %xmm0, 0x28(%rdx) movq %r8, (%rdx) leaq 0x48(%rsp), %rax movq %rax, 0x8(%rdx) movaps 0x1bb6bc(%rip), %xmm0 # 0x29bc00 movups %xmm0, 0x10(%rdx) movl %r9d, 0x20(%rdx) movl %r9d, 0x40(%rdx) callq 0xe055e addq $0x100, %rsp # imm = 0x100 popq %rbx retq
_ZN6ImPlot13PlotErrorBarsIiEEvPKcPKT_S5_S5_S5_iiii: push rbx sub rsp, 100h mov r10, rcx mov rcx, rdx mov ebx, [rsp+108h+arg_10] mov r11d, [rsp+108h+arg_8] mov qword ptr [rsp+108h+var_F0], rsi mov dword ptr [rsp+108h+var_F0+8], r9d test r9d, r9d jz short loc_E03FA mov eax, r11d cdq idiv r9d lea eax, [rdx+r9] cdq idiv r9d mov dword ptr [rsp+108h+var_F0+0Ch], edx mov dword ptr [rsp+108h+var_E0], ebx mov qword ptr [rsp+108h+var_108], rcx mov dword ptr [rsp+108h+var_108+8], r9d jmp short loc_E0411 loc_E03FA: mov dword ptr [rsp+108h+var_F0+0Ch], 0 mov dword ptr [rsp+108h+var_E0], ebx mov qword ptr [rsp+108h+var_108], rcx mov dword ptr [rsp+108h+var_108+8], r9d xor edx, edx loc_E0411: mov ecx, [rsp+108h+arg_0] mov dword ptr [rsp+108h+var_108+0Ch], edx mov dword ptr [rsp+108h+var_F8], ebx mov [rsp+108h+var_C0], r10 mov [rsp+108h+var_B8], r9d test r9d, r9d jz short loc_E0452 mov eax, r11d cdq idiv r9d lea eax, [rdx+r9] cdq idiv r9d mov [rsp+108h+var_B4], edx mov [rsp+108h+var_B0], ebx mov [rsp+108h+var_D8], r8 mov [rsp+108h+var_D0], r9d jmp short loc_E046A loc_E0452: mov [rsp+108h+var_B4], 0 mov [rsp+108h+var_B0], ebx mov [rsp+108h+var_D8], r8 mov [rsp+108h+var_D0], r9d xor edx, edx loc_E046A: mov [rsp+108h+var_CC], edx mov [rsp+108h+var_C8], ebx bt ecx, 0Ah jb short loc_E04E7 mov rax, [rsp+108h+var_E0] lea rsi, [rsp+108h+var_58] mov [rsi+10h], rax movups xmm0, [rsp+108h+var_F0] movaps xmmword ptr [rsi], xmm0 mov r8, rsp mov [rsi+18h], r8 lea rdx, [rsp+108h+var_D8] mov [rsi+20h], rdx movaps xmm1, cs:xmmword_29BBF0 movups xmmword ptr [rsi+28h], xmm1 mov [rsi+38h], r9d mov [rsi+40h], r9d lea rdx, [rsp+108h+var_A8] mov [rdx+10h], rax movaps xmmword ptr [rdx], xmm0 mov [rdx+18h], r8 lea rax, [rsp+108h+var_C0] mov [rdx+20h], rax movaps xmm0, cs:xmmword_29BC00 movups xmmword ptr [rdx+28h], xmm0 mov [rdx+38h], r9d mov [rdx+40h], r9d call _ZN6ImPlot16PlotErrorBarsVExINS_8GetterXYINS_10IndexerIdxIiEENS_10IndexerAddIS3_S3_EEEES6_EEvPKcRKT_RKT0_i; ImPlot::PlotErrorBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>> const&,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>> const&,int) jmp short loc_E0555 loc_E04E7: mov rax, [rsp+108h+var_F8] lea rsi, [rsp+108h+var_58] mov [rsi+38h], rax movups xmm0, [rsp+108h+var_108] movups xmmword ptr [rsi+28h], xmm0 lea r8, [rsp+108h+var_F0] mov [rsi], r8 lea rdx, [rsp+108h+var_D8] mov [rsi+8], rdx movaps xmm1, cs:xmmword_29BBF0 movups xmmword ptr [rsi+10h], xmm1 mov [rsi+20h], r9d mov [rsi+40h], r9d lea rdx, [rsp+108h+var_A8] mov [rdx+38h], rax movups xmmword ptr [rdx+28h], xmm0 mov [rdx], r8 lea rax, [rsp+108h+var_C0] mov [rdx+8], rax movaps xmm0, cs:xmmword_29BC00 movups xmmword ptr [rdx+10h], xmm0 mov [rdx+20h], r9d mov [rdx+40h], r9d call _ZN6ImPlot16PlotErrorBarsHExINS_8GetterXYINS_10IndexerAddINS_10IndexerIdxIiEES4_EES4_EES6_EEvPKcRKT_RKT0_i; ImPlot::PlotErrorBarsHEx<ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>>(char const*,ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>> const&,ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>> const&,int) loc_E0555: add rsp, 100h pop rbx retn
long long ImPlot::PlotErrorBars<int>( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, __int16 a7, int a8, int a9) { int v11; // edx int v12; // edx __int128 v14; // [rsp+0h] [rbp-108h] BYREF long long v15; // [rsp+10h] [rbp-F8h] __int128 v16; // [rsp+18h] [rbp-F0h] BYREF long long v17; // [rsp+28h] [rbp-E0h] long long v18; // [rsp+30h] [rbp-D8h] BYREF int v19; // [rsp+38h] [rbp-D0h] int v20; // [rsp+3Ch] [rbp-CCh] int v21; // [rsp+40h] [rbp-C8h] long long v22; // [rsp+48h] [rbp-C0h] BYREF int v23; // [rsp+50h] [rbp-B8h] int v24; // [rsp+54h] [rbp-B4h] int v25; // [rsp+58h] [rbp-B0h] __int128 v26; // [rsp+60h] [rbp-A8h] __int128 v27; // [rsp+70h] [rbp-98h] long long *v28; // [rsp+80h] [rbp-88h] __int128 v29; // [rsp+88h] [rbp-80h] long long v30; // [rsp+98h] [rbp-70h] int v31; // [rsp+A0h] [rbp-68h] __int128 v32; // [rsp+B0h] [rbp-58h] __int128 v33; // [rsp+C0h] [rbp-48h] long long *v34; // [rsp+D0h] [rbp-38h] __int128 v35; // [rsp+D8h] [rbp-30h] long long v36; // [rsp+E8h] [rbp-20h] int v37; // [rsp+F0h] [rbp-18h] *(_QWORD *)&v16 = a2; DWORD2(v16) = a6; if ( a6 ) { v11 = (a8 % a6 + a6) % a6; HIDWORD(v16) = v11; LODWORD(v17) = a9; *(_QWORD *)&v14 = a3; DWORD2(v14) = a6; } else { *((_QWORD *)&v16 + 1) = 0LL; LODWORD(v17) = a9; *(_QWORD *)&v14 = a3; DWORD2(v14) = 0; v11 = 0; } HIDWORD(v14) = v11; LODWORD(v15) = a9; v22 = a4; v23 = a6; if ( a6 ) { v12 = (a8 % a6 + a6) % a6; v24 = v12; v25 = a9; v18 = a5; v19 = a6; } else { v24 = 0; v25 = a9; v18 = a5; v19 = 0; v12 = 0; } v20 = v12; v21 = a9; if ( (a7 & 0x400) != 0 ) { v36 = v15; v35 = v14; *(_QWORD *)&v32 = &v16; *((_QWORD *)&v32 + 1) = &v18; v33 = xmmword_29BBF0; LODWORD(v34) = a6; v37 = a6; v30 = v15; v29 = v14; *(_QWORD *)&v26 = &v16; *((_QWORD *)&v26 + 1) = &v22; v27 = xmmword_29BC00; LODWORD(v28) = a6; v31 = a6; return ImPlot::PlotErrorBarsHEx<ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>>(); } else { *(_QWORD *)&v33 = v17; v32 = v16; *((_QWORD *)&v33 + 1) = &v14; v34 = &v18; v35 = xmmword_29BBF0; LODWORD(v36) = a6; v37 = a6; *(_QWORD *)&v27 = v17; v26 = v16; *((_QWORD *)&v27 + 1) = &v14; v28 = &v22; v29 = xmmword_29BC00; LODWORD(v30) = a6; v31 = a6; return ImPlot::PlotErrorBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>>(); } }
PlotErrorBars<int>: PUSH RBX SUB RSP,0x100 MOV R10,RCX MOV RCX,RDX MOV EBX,dword ptr [RSP + 0x120] MOV R11D,dword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x18],RSI MOV dword ptr [RSP + 0x20],R9D TEST R9D,R9D JZ 0x001e03fa MOV EAX,R11D CDQ IDIV R9D LEA EAX,[RDX + R9*0x1] CDQ IDIV R9D MOV dword ptr [RSP + 0x24],EDX MOV dword ptr [RSP + 0x28],EBX MOV qword ptr [RSP],RCX MOV dword ptr [RSP + 0x8],R9D JMP 0x001e0411 LAB_001e03fa: MOV dword ptr [RSP + 0x24],0x0 MOV dword ptr [RSP + 0x28],EBX MOV qword ptr [RSP],RCX MOV dword ptr [RSP + 0x8],R9D XOR EDX,EDX LAB_001e0411: MOV ECX,dword ptr [RSP + 0x110] MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x10],EBX MOV qword ptr [RSP + 0x48],R10 MOV dword ptr [RSP + 0x50],R9D TEST R9D,R9D JZ 0x001e0452 MOV EAX,R11D CDQ IDIV R9D LEA EAX,[RDX + R9*0x1] CDQ IDIV R9D MOV dword ptr [RSP + 0x54],EDX MOV dword ptr [RSP + 0x58],EBX MOV qword ptr [RSP + 0x30],R8 MOV dword ptr [RSP + 0x38],R9D JMP 0x001e046a LAB_001e0452: MOV dword ptr [RSP + 0x54],0x0 MOV dword ptr [RSP + 0x58],EBX MOV qword ptr [RSP + 0x30],R8 MOV dword ptr [RSP + 0x38],R9D XOR EDX,EDX LAB_001e046a: MOV dword ptr [RSP + 0x3c],EDX MOV dword ptr [RSP + 0x40],EBX BT ECX,0xa JC 0x001e04e7 MOV RAX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0xb0] MOV qword ptr [RSI + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVAPS xmmword ptr [RSI],XMM0 MOV R8,RSP MOV qword ptr [RSI + 0x18],R8 LEA RDX,[RSP + 0x30] MOV qword ptr [RSI + 0x20],RDX MOVAPS XMM1,xmmword ptr [0x0039bbf0] MOVUPS xmmword ptr [RSI + 0x28],XMM1 MOV dword ptr [RSI + 0x38],R9D MOV dword ptr [RSI + 0x40],R9D LEA RDX,[RSP + 0x60] MOV qword ptr [RDX + 0x10],RAX MOVAPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x18],R8 LEA RAX,[RSP + 0x48] MOV qword ptr [RDX + 0x20],RAX MOVAPS XMM0,xmmword ptr [0x0039bc00] MOVUPS xmmword ptr [RDX + 0x28],XMM0 MOV dword ptr [RDX + 0x38],R9D MOV dword ptr [RDX + 0x40],R9D CALL 0x001e0a0d JMP 0x001e0555 LAB_001e04e7: MOV RAX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0xb0] MOV qword ptr [RSI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RSP] MOVUPS xmmword ptr [RSI + 0x28],XMM0 LEA R8,[RSP + 0x18] MOV qword ptr [RSI],R8 LEA RDX,[RSP + 0x30] MOV qword ptr [RSI + 0x8],RDX MOVAPS XMM1,xmmword ptr [0x0039bbf0] MOVUPS xmmword ptr [RSI + 0x10],XMM1 MOV dword ptr [RSI + 0x20],R9D MOV dword ptr [RSI + 0x40],R9D LEA RDX,[RSP + 0x60] MOV qword ptr [RDX + 0x38],RAX MOVUPS xmmword ptr [RDX + 0x28],XMM0 MOV qword ptr [RDX],R8 LEA RAX,[RSP + 0x48] MOV qword ptr [RDX + 0x8],RAX MOVAPS XMM0,xmmword ptr [0x0039bc00] MOVUPS xmmword ptr [RDX + 0x10],XMM0 MOV dword ptr [RDX + 0x20],R9D MOV dword ptr [RDX + 0x40],R9D CALL 0x001e055e LAB_001e0555: ADD RSP,0x100 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void ImPlot::PlotErrorBars<int>(char const*, int const*, int const*, int const*, int const*, int, int, int, int) */ void ImPlot::PlotErrorBars<int> (char *param_1,int *param_2,int *param_3,int *param_4,int *param_5,int param_6, int param_7,int param_8,int param_9) { int *local_108; int iStack_100; int iStack_fc; int local_f8; int4 uStack_f4; int *local_f0; int iStack_e8; int iStack_e4; int local_e0; int4 uStack_dc; int *local_d8; int local_d0; int local_cc; int local_c8; int *local_c0; int local_b8; int local_b4; int local_b0; int **local_a8; int **ppiStack_a0; int8 local_98; int1 *puStack_90; int **local_88; int *local_80; int8 uStack_78; int8 local_70; int local_68; int **local_58; int **ppiStack_50; int8 local_48; int1 *puStack_40; int **local_38; int *local_30; int8 uStack_28; int8 local_20; int local_18; puStack_40 = (int1 *)&local_108; puStack_90 = (int1 *)&local_108; if (param_6 == 0) { iStack_e4 = 0; } else { iStack_e4 = (param_8 % param_6 + param_6) % param_6; } local_e0 = param_9; local_f8 = param_9; if (param_6 == 0) { local_b4 = 0; } else { local_b4 = (param_8 % param_6 + param_6) % param_6; } local_b0 = param_9; local_c8 = param_9; local_108 = param_3; iStack_100 = param_6; iStack_fc = iStack_e4; local_f0 = param_2; iStack_e8 = param_6; local_d8 = param_5; local_d0 = param_6; local_cc = local_b4; local_c0 = param_4; local_b8 = param_6; local_68 = param_6; local_18 = param_6; if (((uint)param_7 >> 10 & 1) == 0) { local_98 = CONCAT44(uStack_dc,param_9); ppiStack_a0 = (int **)CONCAT44(iStack_e4,param_6); local_38 = &local_d8; local_30 = (int *)_DAT_0039bbf0; uStack_28 = _UNK_0039bbf8; local_20 = CONCAT44(local_20._4_4_,param_6); local_88 = &local_c0; local_80 = (int *)_DAT_0039bc00; uStack_78 = _UNK_0039bc08; local_70 = CONCAT44(local_70._4_4_,param_6); local_a8 = (int **)param_2; local_58 = (int **)param_2; ppiStack_50 = ppiStack_a0; local_48 = local_98; PlotErrorBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>>> (param_1,(GetterXY *)&local_58,(GetterXY *)&local_a8,param_7); } else { local_70 = CONCAT44(uStack_f4,param_9); uStack_78 = CONCAT44(iStack_e4,param_6); local_a8 = &local_f0; ppiStack_50 = &local_d8; local_48 = _DAT_0039bbf0; puStack_40 = (int1 *)_UNK_0039bbf8; local_38 = (int **)CONCAT44(local_38._4_4_,param_6); ppiStack_a0 = &local_c0; local_98 = _DAT_0039bc00; puStack_90 = (int1 *)_UNK_0039bc08; local_88 = (int **)CONCAT44(local_88._4_4_,param_6); local_80 = param_3; local_58 = local_a8; local_30 = param_3; uStack_28 = uStack_78; local_20 = local_70; PlotErrorBarsHEx<ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerAdd<ImPlot::IndexerIdx<int>,ImPlot::IndexerIdx<int>>,ImPlot::IndexerIdx<int>>> (param_1,(GetterXY *)&local_58,(GetterXY *)&local_a8,param_7); } return; }
10,128
ma_remove_not_visible_states
eloqsql/storage/maria/ma_state.c
MARIA_STATE_HISTORY *_ma_remove_not_visible_states(MARIA_STATE_HISTORY *org_history, my_bool all, my_bool trnman_is_locked) { TrID last_trid; MARIA_STATE_HISTORY *history, **parent, *next; DBUG_ENTER("_ma_remove_not_visible_states"); if (!org_history) DBUG_RETURN(0); /* Not versioned table */ last_trid= org_history->trid; parent= &org_history->next; for (history= org_history->next; history; history= next) { next= history->next; if (!trnman_exists_active_transactions(history->trid, last_trid, trnman_is_locked)) { DBUG_PRINT("info", ("removing history->trid: %lu next: %lu", (ulong) history->trid, (ulong) last_trid)); my_free(history); continue; } *parent= history; parent= &history->next; last_trid= history->trid; } *parent= 0; if (all && parent == &org_history->next) { /* There is only one state left. Delete this if it's visible for all */ if (last_trid < trnman_get_min_trid()) { my_free(org_history); org_history= 0; } } DBUG_RETURN(org_history); }
O3
c
ma_remove_not_visible_states: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rdi, %rdi je 0x383a7 movl %esi, -0x2c(%rbp) movq (%rdi), %r13 movq 0x8(%rdi), %r14 testq %r13, %r13 movq %rdi, -0x38(%rbp) je 0x38373 movsbl %dl, %r12d movq %rdi, %rbx movq (%r13), %r15 movq 0x8(%r13), %rdi movq %r14, %rsi movl %r12d, %edx callq 0x47525 testb %al, %al je 0x38361 movq %r13, (%rbx) movq 0x8(%r13), %r14 movq %r13, %rbx jmp 0x38369 movq %r13, %rdi callq 0x9fec2 movq %r15, %r13 testq %r15, %r15 jne 0x3833e jmp 0x38376 movq %rdi, %rbx movq $0x0, (%rbx) cmpb $0x0, -0x2c(%rbp) sete %al movq -0x38(%rbp), %rcx cmpq %rcx, %rbx movq %rcx, %rbx setne %cl orb %al, %cl jne 0x383a9 callq 0x4743a cmpq %rax, %r14 jae 0x383a9 movq %rbx, %rdi callq 0x9fec2 xorl %ebx, %ebx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_remove_not_visible_states: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test rdi, rdi jz loc_383A7 mov [rbp+var_2C], esi mov r13, [rdi] mov r14, [rdi+8] test r13, r13 mov [rbp+var_38], rdi jz short loc_38373 movsx r12d, dl mov rbx, rdi loc_3833E: mov r15, [r13+0] mov rdi, [r13+8] mov rsi, r14 mov edx, r12d call trnman_exists_active_transactions test al, al jz short loc_38361 mov [rbx], r13 mov r14, [r13+8] mov rbx, r13 jmp short loc_38369 loc_38361: mov rdi, r13 call my_free loc_38369: mov r13, r15 test r15, r15 jnz short loc_3833E jmp short loc_38376 loc_38373: mov rbx, rdi loc_38376: mov qword ptr [rbx], 0 cmp byte ptr [rbp+var_2C], 0 setz al mov rcx, [rbp+var_38] cmp rbx, rcx mov rbx, rcx setnz cl or cl, al jnz short loc_383A9 call trnman_get_min_trid cmp r14, rax jnb short loc_383A9 mov rdi, rbx call my_free loc_383A7: xor ebx, ebx loc_383A9: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * ma_remove_not_visible_states(_QWORD *a1, char a2, char a3) { _QWORD *v3; // r13 unsigned long long v4; // r14 unsigned int v5; // r12d _QWORD *v6; // rbx _QWORD *v7; // r15 bool v8; // zf _QWORD *v9; // rbx _QWORD *v11; // [rsp+8h] [rbp-38h] if ( !a1 ) return 0LL; v3 = (_QWORD *)*a1; v4 = a1[1]; v11 = a1; if ( *a1 ) { v5 = a3; v6 = a1; do { v7 = (_QWORD *)*v3; a1 = (_QWORD *)v3[1]; if ( (unsigned __int8)trnman_exists_active_transactions(a1, v4, v5) ) { *v6 = v3; v4 = v3[1]; v6 = v3; } else { a1 = v3; my_free(v3); } v3 = v7; } while ( v7 ); } else { v6 = a1; } *v6 = 0LL; v8 = v6 == v11; v9 = v11; if ( a2 != 0 && v8 && v4 < trnman_get_min_trid(a1) ) { my_free(v11); return 0LL; } return v9; }
_ma_remove_not_visible_states: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST RDI,RDI JZ 0x001383a7 MOV dword ptr [RBP + -0x2c],ESI MOV R13,qword ptr [RDI] MOV R14,qword ptr [RDI + 0x8] TEST R13,R13 MOV qword ptr [RBP + -0x38],RDI JZ 0x00138373 MOVSX R12D,DL MOV RBX,RDI LAB_0013833e: MOV R15,qword ptr [R13] MOV RDI,qword ptr [R13 + 0x8] MOV RSI,R14 MOV EDX,R12D CALL 0x00147525 TEST AL,AL JZ 0x00138361 MOV qword ptr [RBX],R13 MOV R14,qword ptr [R13 + 0x8] MOV RBX,R13 JMP 0x00138369 LAB_00138361: MOV RDI,R13 CALL 0x0019fec2 LAB_00138369: MOV R13,R15 TEST R15,R15 JNZ 0x0013833e JMP 0x00138376 LAB_00138373: MOV RBX,RDI LAB_00138376: MOV qword ptr [RBX],0x0 CMP byte ptr [RBP + -0x2c],0x0 SETZ AL MOV RCX,qword ptr [RBP + -0x38] CMP RBX,RCX MOV RBX,RCX SETNZ CL OR CL,AL JNZ 0x001383a9 CALL 0x0014743a CMP R14,RAX JNC 0x001383a9 MOV RDI,RBX CALL 0x0019fec2 LAB_001383a7: XOR EBX,EBX LAB_001383a9: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * _ma_remove_not_visible_states(int8 *param_1,char param_2,char param_3) { int8 *puVar1; char cVar2; ulong uVar3; int8 *puVar4; int8 *puVar5; ulong uVar6; if (param_1 != (int8 *)0x0) { uVar6 = param_1[1]; puVar4 = param_1; if ((int8 *)*param_1 != (int8 *)0x0) { puVar5 = (int8 *)*param_1; do { puVar1 = (int8 *)*puVar5; cVar2 = trnman_exists_active_transactions(puVar5[1],uVar6,(int)param_3); if (cVar2 == '\0') { my_free(puVar5); } else { *puVar4 = puVar5; uVar6 = puVar5[1]; puVar4 = puVar5; } puVar5 = puVar1; } while (puVar1 != (int8 *)0x0); } *puVar4 = 0; if (puVar4 != param_1 || param_2 == '\0') { return param_1; } uVar3 = trnman_get_min_trid(); if (uVar3 <= uVar6) { return param_1; } my_free(param_1); } return (int8 *)0x0; }
10,129
google::protobuf::internal::ReflectionSchema::IsFieldInlined(google::protobuf::FieldDescriptor const*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.h
bool IsFieldInlined(const FieldDescriptor* field) const { return Inlined(offsets_[field->index()], field->type()); }
O3
c
google::protobuf::internal::ReflectionSchema::IsFieldInlined(google::protobuf::FieldDescriptor const*) const: pushq %rbp pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq 0x8(%rdi), %rax testb $0x8, 0x1(%rsi) jne 0x97ebf movq 0x20(%rbx), %rcx addq $0x28, %rcx jmp 0x97ed6 movq 0x28(%rbx), %rcx testq %rcx, %rcx je 0x97ece addq $0x50, %rcx jmp 0x97ed6 movq 0x10(%rbx), %rcx addq $0x70, %rcx movq %rbx, %rdx subq (%rcx), %rdx shrq $0x3, %rdx imull $0x38e38e39, %edx, %ecx # imm = 0x38E38E39 movslq %ecx, %rcx movl (%rax,%rcx,4), %ebp movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x97f11 leaq 0x45258(%rip), %rax # 0xdd154 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %rdx movq %rbx, (%rdx) callq 0x97dfb movzbl 0x2(%rbx), %eax cmpl $0xc, %eax je 0x97f1f cmpl $0x9, %eax jne 0x97f25 andb $0x1, %bpl jmp 0x97f27 xorl %ebp, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %rbp retq
_ZNK6google8protobuf8internal16ReflectionSchema14IsFieldInlinedEPKNS0_15FieldDescriptorE: push rbp push rbx sub rsp, 18h mov rbx, rsi mov rax, [rdi+8] test byte ptr [rsi+1], 8 jnz short loc_97EBF mov rcx, [rbx+20h] add rcx, 28h ; '(' jmp short loc_97ED6 loc_97EBF: mov rcx, [rbx+28h] test rcx, rcx jz short loc_97ECE add rcx, 50h ; 'P' jmp short loc_97ED6 loc_97ECE: mov rcx, [rbx+10h] add rcx, 70h ; 'p' loc_97ED6: mov rdx, rbx sub rdx, [rcx] shr rdx, 3 imul ecx, edx, 38E38E39h movsxd rcx, ecx mov ebp, [rax+rcx*4] mov rdi, [rbx+18h] test rdi, rdi jz short loc_97F11 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+28h+var_18] mov [rsi], rax lea rdx, [rsp+28h+var_20] mov [rdx], rbx call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_97F11: movzx eax, byte ptr [rbx+2] cmp eax, 0Ch jz short loc_97F1F cmp eax, 9 jnz short loc_97F25 loc_97F1F: and bpl, 1 jmp short loc_97F27 loc_97F25: xor ebp, ebp loc_97F27: mov eax, ebp add rsp, 18h pop rbx pop rbp retn
long long google::protobuf::internal::ReflectionSchema::IsFieldInlined( google::protobuf::internal::ReflectionSchema *this, const google::protobuf::FieldDescriptor *a2) { _QWORD *v2; // rcx long long v3; // rcx unsigned int v4; // ebp long long v5; // rdi int v6; // eax const google::protobuf::FieldDescriptor *v8; // [rsp+8h] [rbp-20h] BYREF long long ( *v9[3])(google::protobuf::FieldDescriptor *__hidden); // [rsp+10h] [rbp-18h] BYREF if ( (*((_BYTE *)a2 + 1) & 8) != 0 ) { v3 = *((_QWORD *)a2 + 5); if ( v3 ) v2 = (_QWORD *)(v3 + 80); else v2 = (_QWORD *)(*((_QWORD *)a2 + 2) + 112LL); } else { v2 = (_QWORD *)(*((_QWORD *)a2 + 4) + 40LL); } v4 = *(_DWORD *)(*((_QWORD *)this + 1) + 4LL * (int)(954437177 * (((unsigned long long)a2 - *v2) >> 3))); v5 = *((_QWORD *)a2 + 3); if ( v5 ) { v9[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v8 = a2; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v5, (long long)v9, (long long)&v8); } v6 = *((unsigned __int8 *)a2 + 2); if ( v6 == 12 || v6 == 9 ) LOBYTE(v4) = v4 & 1; else return 0; return v4; }
IsFieldInlined: PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV RAX,qword ptr [RDI + 0x8] TEST byte ptr [RSI + 0x1],0x8 JNZ 0x00197ebf MOV RCX,qword ptr [RBX + 0x20] ADD RCX,0x28 JMP 0x00197ed6 LAB_00197ebf: MOV RCX,qword ptr [RBX + 0x28] TEST RCX,RCX JZ 0x00197ece ADD RCX,0x50 JMP 0x00197ed6 LAB_00197ece: MOV RCX,qword ptr [RBX + 0x10] ADD RCX,0x70 LAB_00197ed6: MOV RDX,RBX SUB RDX,qword ptr [RCX] SHR RDX,0x3 IMUL ECX,EDX,0x38e38e39 MOVSXD RCX,ECX MOV EBP,dword ptr [RAX + RCX*0x4] MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00197f11 LEA RAX,[0x1dd154] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RBX CALL 0x00197dfb LAB_00197f11: MOVZX EAX,byte ptr [RBX + 0x2] CMP EAX,0xc JZ 0x00197f1f CMP EAX,0x9 JNZ 0x00197f25 LAB_00197f1f: AND BPL,0x1 JMP 0x00197f27 LAB_00197f25: XOR EBP,EBP LAB_00197f27: MOV EAX,EBP ADD RSP,0x18 POP RBX POP RBP RET
/* google::protobuf::internal::ReflectionSchema::IsFieldInlined(google::protobuf::FieldDescriptor const*) const */ uint __thiscall google::protobuf::internal::ReflectionSchema::IsFieldInlined (ReflectionSchema *this,FieldDescriptor *param_1) { long *plVar1; uint uVar2; FieldDescriptor *local_20; code *local_18; if (((byte)param_1[1] & 8) == 0) { plVar1 = (long *)(*(long *)(param_1 + 0x20) + 0x28); } else if (*(long *)(param_1 + 0x28) == 0) { plVar1 = (long *)(*(long *)(param_1 + 0x10) + 0x70); } else { plVar1 = (long *)(*(long *)(param_1 + 0x28) + 0x50); } uVar2 = *(uint *)(*(long *)(this + 8) + (long)((int)((ulong)((long)param_1 - *plVar1) >> 3) * 0x38e38e39) * 4); if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_18 = FieldDescriptor::TypeOnceInit; local_20 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_18,&local_20 ); } if ((param_1[2] == (FieldDescriptor)0xc) || (param_1[2] == (FieldDescriptor)0x9)) { uVar2 = uVar2 & 0xffffff01; } else { uVar2 = 0; } return uVar2; }
10,130
translog_max_lsn_to_header
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_max_lsn_to_header(File file, LSN lsn) { uchar lsn_buff[LSN_STORE_SIZE]; my_bool rc; DBUG_ENTER("translog_max_lsn_to_header"); DBUG_PRINT("enter", ("File descriptor: %ld " "lsn: " LSN_FMT, (long) file, LSN_IN_PARTS(lsn))); lsn_store(lsn_buff, lsn); rc= (my_pwrite(file, lsn_buff, LSN_STORE_SIZE, (LOG_HEADER_DATA_SIZE - LSN_STORE_SIZE), log_write_flags) != 0 || mysql_file_sync(file, MYF(MY_WME)) != 0); /* We should not increase counter in case of error above, but it is so unlikely that we can ignore this case */ translog_syncs++; DBUG_RETURN(rc); }
O3
c
translog_max_lsn_to_header: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movl %edi, %ebx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq %rsi, %rcx shrq $0x20, %rcx leaq -0x1f(%rbp), %rax movb %cl, (%rax) movq %rsi, %rcx shrq $0x28, %rcx movb %cl, 0x1(%rax) movq %rsi, %rcx shrq $0x30, %rcx movb %cl, 0x2(%rax) movl %esi, 0x3(%rax) movl $0x7, %edx movl $0x25, %ecx movl $0x34, %r8d movq %rax, %rsi callq 0xa07ee movq %rax, %rcx movb $0x1, %al testq %rcx, %rcx jne 0x4f4bf leaq 0x336b7b(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl %ebx, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4f4de movl $0x10, %esi movl %ebx, %edi callq 0xa14a4 testl %eax, %eax setne %al incq 0x3ae0f2(%rip) # 0x3fd5b8 movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x4f4f4 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x24(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rdx callq 0x2cdc2 movl (%r14), %eax jmp 0x4f4ba callq 0x29270
translog_max_lsn_to_header: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov ebx, edi mov rax, fs:28h mov [rbp+var_18], rax mov rcx, rsi shr rcx, 20h lea rax, [rbp+var_1F] mov [rax], cl mov rcx, rsi shr rcx, 28h mov [rax+1], cl mov rcx, rsi shr rcx, 30h mov [rax+2], cl mov [rax+3], esi mov edx, 7 mov ecx, 25h ; '%' mov r8d, 34h ; '4' mov rsi, rax call my_pwrite mov rcx, rax mov al, 1 test rcx, rcx jnz short loc_4F4BF lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov esi, ebx mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_4F4DE mov esi, 10h mov edi, ebx call my_sync loc_4F4BA: test eax, eax setnz al loc_4F4BF: inc cs:translog_syncs mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_4F4F4 add rsp, 60h pop rbx pop r14 pop rbp retn loc_4F4DE: lea r14, [rbp+var_24] mov rdi, rax mov esi, ebx mov rdx, r14 call translog_max_lsn_to_header_cold_1 mov eax, [r14] jmp short loc_4F4BA loc_4F4F4: call ___stack_chk_fail
bool translog_max_lsn_to_header(long long a1, long long a2) { long long v2; // rcx bool result; // al long long v4; // rax int v5; // eax _BYTE v6[76]; // [rsp+0h] [rbp-70h] BYREF int v7; // [rsp+4Ch] [rbp-24h] BYREF _BYTE v8[3]; // [rsp+51h] [rbp-1Fh] BYREF int v9; // [rsp+54h] [rbp-1Ch] unsigned long long v10; // [rsp+58h] [rbp-18h] v10 = __readfsqword(0x28u); v8[0] = BYTE4(a2); v8[1] = BYTE5(a2); v8[2] = BYTE6(a2); v9 = a2; v2 = my_pwrite(a1, v8, 7LL, 37LL, 52LL); result = 1; if ( !v2 ) { v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, (unsigned int)a1, 16LL); if ( v4 ) { translog_max_lsn_to_header_cold_1(v4, a1, &v7); v5 = v7; } else { v5 = my_sync((unsigned int)a1, 16LL); } result = v5 != 0; } ++translog_syncs; return result; }
translog_max_lsn_to_header: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV EBX,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RCX,RSI SHR RCX,0x20 LEA RAX,[RBP + -0x1f] MOV byte ptr [RAX],CL MOV RCX,RSI SHR RCX,0x28 MOV byte ptr [RAX + 0x1],CL MOV RCX,RSI SHR RCX,0x30 MOV byte ptr [RAX + 0x2],CL MOV dword ptr [RAX + 0x3],ESI MOV EDX,0x7 MOV ECX,0x25 MOV R8D,0x34 MOV RSI,RAX CALL 0x001a07ee MOV RCX,RAX MOV AL,0x1 TEST RCX,RCX JNZ 0x0014f4bf LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV ESI,EBX MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0014f4de MOV ESI,0x10 MOV EDI,EBX CALL 0x001a14a4 LAB_0014f4ba: TEST EAX,EAX SETNZ AL LAB_0014f4bf: INC qword ptr [0x004fd5b8] MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0014f4f4 ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_0014f4de: LEA R14,[RBP + -0x24] MOV RDI,RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012cdc2 MOV EAX,dword ptr [R14] JMP 0x0014f4ba LAB_0014f4f4: CALL 0x00129270
bool translog_max_lsn_to_header(ulong param_1,int8 param_2) { long lVar1; long in_FS_OFFSET; bool bVar2; int1 local_78 [76]; uint local_2c; int1 local_27; int1 local_26; int1 local_25; int4 local_24; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_27 = (int1)((ulong)param_2 >> 0x20); local_26 = (int1)((ulong)param_2 >> 0x28); local_25 = (int1)((ulong)param_2 >> 0x30); local_24 = (int4)param_2; lVar1 = my_pwrite(param_1,&local_27,7,0x25,0x34); bVar2 = true; if (lVar1 == 0) { lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1 & 0xffffffff,0x10); if (lVar1 == 0) { local_2c = my_sync(param_1 & 0xffffffff,0x10); } else { translog_max_lsn_to_header_cold_1(lVar1,param_1 & 0xffffffff,&local_2c); } bVar2 = local_2c != 0; } translog_syncs = translog_syncs + 1; if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return bVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,131
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O3
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rcx, %r15 movl %edx, %r12d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x3603aa(%rip), %rdi # 0x3ae810 leaq -0x9ae(%rip), %rsi # 0x4dabf callq 0x28330 movq %rbx, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x4dcaa testl %eax, %eax je 0x4e496 movq %r14, %rdi movl %eax, %esi movq %r15, %rdx callq 0x4df4e movq %rax, %r14 jmp 0x4e499 xorl %r14d, %r14d testq %r14, %r14 setne %al testb $0x10, %r15b sete %cl orb %al, %cl jne 0x4e4e3 leaq -0x240(%rbp), %r15 movq %r15, %rdi callq 0x4d87f movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x16, %edi movq %rbx, %rdx movq %r15, %rcx xorl %eax, %eax callq 0x588af movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x4e505 movq %r14, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x283d0
my_charset_get_by_name: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov r15, rcx mov r12d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov esi, r12d mov rdx, r15 call get_charset_number test eax, eax jz short loc_4E496 mov rdi, r14 mov esi, eax mov rdx, r15 call get_internal_charset mov r14, rax jmp short loc_4E499 loc_4E496: xor r14d, r14d loc_4E499: test r14, r14 setnz al test r15b, 10h setz cl or cl, al jnz short loc_4E4E3 lea r15, [rbp+var_240] mov rdi, r15 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 16h mov rdx, rbx mov rcx, r15 xor eax, eax call my_error loc_4E4E3: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_4E505 mov rax, r14 add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4E505: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int charset_number; // eax long long internal_charset; // r14 int v8; // r8d int v9; // r9d _BYTE v11[536]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+218h] [rbp-28h] v12 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( internal_charset == 0 && (a4 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v11), "Index.xml"); my_error(22, 4, a2, (unsigned int)v11, v8, v9); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV R15,RCX MOV R12D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[0x4ae810] LEA RSI,[0x14dabf] CALL 0x00128330 MOV RDI,RBX MOV ESI,R12D MOV RDX,R15 CALL 0x0014dcaa TEST EAX,EAX JZ 0x0014e496 MOV RDI,R14 MOV ESI,EAX MOV RDX,R15 CALL 0x0014df4e MOV R14,RAX JMP 0x0014e499 LAB_0014e496: XOR R14D,R14D LAB_0014e499: TEST R14,R14 SETNZ AL TEST R15B,0x10 SETZ CL OR CL,AL JNZ 0x0014e4e3 LEA R15,[RBP + -0x240] MOV RDI,R15 CALL 0x0014d87f MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x16 MOV RDX,RBX MOV RCX,R15 XOR EAX,EAX CALL 0x001588af LAB_0014e4e3: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0014e505 MOV RAX,R14 ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014e505: CALL 0x001283d0
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_248 [536]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_4); } if ((param_4 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_248); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x16,4,param_2,local_248); } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,132
set_user_key(PFS_user_key*, char const*, unsigned int)
eloqsql/storage/perfschema/pfs_user.cc
static void set_user_key(PFS_user_key *key, const char *user, uint user_length) { assert(user_length <= USERNAME_LENGTH); char *ptr= &key->m_hash_key[0]; if (user_length > 0) { memcpy(ptr, user, user_length); ptr+= user_length; } ptr[0]= 0; ptr++; key->m_key_length= (uint)(ptr - &key->m_hash_key[0]); }
O0
cpp
set_user_key(PFS_user_key*, char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) cmpl $0x0, -0x14(%rbp) jbe 0x4b583 movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %eax movl %eax, %edx callq 0x26280 movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x184(%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL12set_user_keyP12PFS_user_keyPKcj: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_20], rax cmp [rbp+var_14], 0 jbe short loc_4B583 mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] mov eax, [rbp+var_14] mov edx, eax call _memcpy mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax loc_4B583: mov rax, [rbp+var_20] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] sub rax, rcx mov ecx, eax mov rax, [rbp+var_8] mov [rax+184h], ecx add rsp, 20h pop rbp retn
long long set_user_key(long long a1, long long a2, unsigned int a3) { long long result; // rax _BYTE *v4; // [rsp+0h] [rbp-20h] v4 = (_BYTE *)a1; if ( a3 ) { memcpy(a1, a2, a3); v4 = (_BYTE *)(a3 + a1); } *v4 = 0; result = a1; *(_DWORD *)(a1 + 388) = (_DWORD)v4 + 1 - a1; return result; }
set_user_key: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x14],0x0 JBE 0x0014b583 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX CALL 0x00126280 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_0014b583: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x184],ECX ADD RSP,0x20 POP RBP RET
/* set_user_key(PFS_user_key*, char const*, unsigned int) */ void set_user_key(PFS_user_key *param_1,char *param_2,uint param_3) { PFS_user_key *local_28; local_28 = param_1; if (param_3 != 0) { memcpy(param_1,param_2,(ulong)param_3); local_28 = param_1 + param_3; } *local_28 = (PFS_user_key)0x0; *(int *)(param_1 + 0x184) = ((int)local_28 + 1) - (int)param_1; return; }
10,133
void gguf_writer::write<long>(long const&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void write(const T & val) const { for (size_t i = 0; i < sizeof(val); ++i) { buf.push_back(reinterpret_cast<const int8_t *>(&val)[i]); } }
O1
cpp
void gguf_writer::write<long>(long const&) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 xorl %r15d, %r15d movq (%r14), %rdi leaq (%rbx,%r15), %rdx movq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi je 0x4161b movb (%rdx), %al movb %al, (%rsi) incq 0x8(%rdi) jmp 0x41620 callq 0x17810 incq %r15 cmpq $0x8, %r15 jne 0x41600 popq %rbx popq %r14 popq %r15 retq nop
_ZNK11gguf_writer5writeIlEEvRKT_: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi xor r15d, r15d loc_41600: mov rdi, [r14] lea rdx, [rbx+r15] mov rsi, [rdi+8] cmp rsi, [rdi+10h] jz short loc_4161B mov al, [rdx] mov [rsi], al inc qword ptr [rdi+8] jmp short loc_41620 loc_4161B: call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&) loc_41620: inc r15 cmp r15, 8 jnz short loc_41600 pop rbx pop r14 pop r15 retn
char gguf_writer::write<long>(long long *a1, long long a2) { long long i; // r15 long long v5; // rdi char *v6; // rdx char *v7; // rsi char result; // al for ( i = 0LL; i != 8; ++i ) { v5 = *a1; v6 = (char *)(a2 + i); v7 = *(char **)(*a1 + 8); if ( v7 == *(char **)(*a1 + 16) ) { result = std::vector<signed char>::_M_realloc_insert<signed char const&>(v5, v7, v6); } else { result = *v6; *v7 = *v6; ++*(_QWORD *)(v5 + 8); } } return result; }
write<long>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI XOR R15D,R15D LAB_00141600: MOV RDI,qword ptr [R14] LEA RDX,[RBX + R15*0x1] MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x0014161b MOV AL,byte ptr [RDX] MOV byte ptr [RSI],AL INC qword ptr [RDI + 0x8] JMP 0x00141620 LAB_0014161b: CALL 0x00117810 LAB_00141620: INC R15 CMP R15,0x8 JNZ 0x00141600 POP RBX POP R14 POP R15 RET
/* void gguf_writer::write<long>(long const&) const */ void __thiscall gguf_writer::write<long>(gguf_writer *this,long *param_1) { long lVar1; long lVar2; lVar2 = 0; do { lVar1 = *(long *)this; if (*(int1 **)(lVar1 + 8) == *(int1 **)(lVar1 + 0x10)) { std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>(); } else { **(int1 **)(lVar1 + 8) = *(int1 *)((long)param_1 + lVar2); *(long *)(lVar1 + 8) = *(long *)(lVar1 + 8) + 1; } lVar2 = lVar2 + 1; } while (lVar2 != 8); return; }
10,134
void gguf_writer::write<long>(long const&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void write(const T & val) const { for (size_t i = 0; i < sizeof(val); ++i) { buf.push_back(reinterpret_cast<const int8_t *>(&val)[i]); } }
O3
cpp
void gguf_writer::write<long>(long const&) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 xorl %r15d, %r15d movq (%r14), %rdi leaq (%rbx,%r15), %rdx movq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi je 0x41ab7 movb (%rdx), %al movb %al, (%rsi) incq 0x8(%rdi) jmp 0x41abc callq 0x17800 incq %r15 cmpq $0x8, %r15 jne 0x41a9c popq %rbx popq %r14 popq %r15 retq nop
_ZNK11gguf_writer5writeImEEvRKT_: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi xor r15d, r15d loc_41A9C: mov rdi, [r14] lea rdx, [rbx+r15] mov rsi, [rdi+8] cmp rsi, [rdi+10h] jz short loc_41AB7 mov al, [rdx] mov [rsi], al inc qword ptr [rdi+8] jmp short loc_41ABC loc_41AB7: call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&) loc_41ABC: inc r15 cmp r15, 8 jnz short loc_41A9C pop rbx pop r14 pop r15 retn
char gguf_writer::write<unsigned long>(long long *a1, long long a2) { long long i; // r15 long long v5; // rdi char *v6; // rdx char *v7; // rsi char result; // al for ( i = 0LL; i != 8; ++i ) { v5 = *a1; v6 = (char *)(a2 + i); v7 = *(char **)(*a1 + 8); if ( v7 == *(char **)(*a1 + 16) ) { result = std::vector<signed char>::_M_realloc_insert<signed char const&>(v5, v7, v6); } else { result = *v6; *v7 = *v6; ++*(_QWORD *)(v5 + 8); } } return result; }
write<unsigned_long>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI XOR R15D,R15D LAB_00141a9c: MOV RDI,qword ptr [R14] LEA RDX,[RBX + R15*0x1] MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x00141ab7 MOV AL,byte ptr [RDX] MOV byte ptr [RSI],AL INC qword ptr [RDI + 0x8] JMP 0x00141abc LAB_00141ab7: CALL 0x00117800 LAB_00141abc: INC R15 CMP R15,0x8 JNZ 0x00141a9c POP RBX POP R14 POP R15 RET
/* void gguf_writer::write<unsigned long>(unsigned long const&) const */ void __thiscall gguf_writer::write<unsigned_long>(gguf_writer *this,ulong *param_1) { long lVar1; long lVar2; lVar2 = 0; do { lVar1 = *(long *)this; if (*(int1 **)(lVar1 + 8) == *(int1 **)(lVar1 + 0x10)) { std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>(); } else { **(int1 **)(lVar1 + 8) = *(int1 *)((long)param_1 + lVar2); *(long *)(lVar1 + 8) = *(long *)(lVar1 + 8) + 1; } lVar2 = lVar2 + 1; } while (lVar2 != 8); return; }
10,135
spdlog::details::registry::get_tp()
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/details/registry-inl.h
SPDLOG_INLINE std::shared_ptr<thread_pool> registry::get_tp() { std::lock_guard<std::recursive_mutex> lock(tp_mutex_); return tp_; }
O3
c
spdlog::details::registry::get_tp(): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx leaq 0x50(%rsi), %r14 movq %r14, %rdi callq 0x11350 testl %eax, %eax jne 0x2da5f movq 0x118(%r15), %rax movq %rax, (%rbx) movq 0x120(%r15), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x2da4e movq 0x86568(%rip), %rcx # 0xb3fa8 cmpb $0x0, (%rcx) je 0x2da4a incl 0x8(%rax) jmp 0x2da4e lock incl 0x8(%rax) movq %r14, %rdi callq 0x112d0 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movl %eax, %edi callq 0x114f0
_ZN6spdlog7details8registry6get_tpEv: push r15 push r14 push rbx mov r15, rsi mov rbx, rdi lea r14, [rsi+50h] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz short loc_2DA5F mov rax, [r15+118h] mov [rbx], rax mov rax, [r15+120h] mov [rbx+8], rax test rax, rax jz short loc_2DA4E mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_2DA4A inc dword ptr [rax+8] jmp short loc_2DA4E loc_2DA4A: lock inc dword ptr [rax+8] loc_2DA4E: mov rdi, r14 call _pthread_mutex_unlock mov rax, rbx pop rbx pop r14 pop r15 retn loc_2DA5F: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
spdlog::details::registry * spdlog::details::registry::get_tp(spdlog::details::registry *this, long long a2) { int v2; // eax long long v3; // rax v2 = pthread_mutex_lock(a2 + 80); if ( v2 ) std::__throw_system_error(v2); *(_QWORD *)this = *(_QWORD *)(a2 + 280); v3 = *(_QWORD *)(a2 + 288); *((_QWORD *)this + 1) = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } pthread_mutex_unlock(a2 + 80); return this; }
get_tp: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI LEA R14,[RSI + 0x50] MOV RDI,R14 CALL 0x00111350 TEST EAX,EAX JNZ 0x0012da5f MOV RAX,qword ptr [R15 + 0x118] MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R15 + 0x120] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x0012da4e MOV RCX,qword ptr [0x001b3fa8] CMP byte ptr [RCX],0x0 JZ 0x0012da4a INC dword ptr [RAX + 0x8] JMP 0x0012da4e LAB_0012da4a: INC.LOCK dword ptr [RAX + 0x8] LAB_0012da4e: MOV RDI,R14 CALL 0x001112d0 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_0012da5f: MOV EDI,EAX CALL 0x001114f0
/* spdlog::details::registry::get_tp() */ void spdlog::details::registry::get_tp(void) { long lVar1; int iVar2; long in_RSI; int8 *in_RDI; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(in_RSI + 0x50)); if (iVar2 == 0) { *in_RDI = *(int8 *)(in_RSI + 0x118); lVar1 = *(long *)(in_RSI + 0x120); in_RDI[1] = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001b3fa8 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } pthread_mutex_unlock((pthread_mutex_t *)(in_RSI + 0x50)); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
10,136
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_validate_filename(const std::string & filename) { if (!filename.length()) { // Empty filename invalid return false; } if (filename.length() > 255) { // Limit at common largest possible filename on Linux filesystems // to avoid unnecessary further validation // (On systems with smaller limits it will be caught by the OS) return false; } std::u32string filename_utf32; try { #if defined(__clang__) // disable C++17 deprecation warning for std::codecvt_utf8 # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter; #if defined(__clang__) # pragma clang diagnostic pop #endif filename_utf32 = converter.from_bytes(filename); // If the reverse conversion mismatches, it means overlong UTF-8 sequences were used, // or invalid encodings were encountered. Reject such attempts std::string filename_reencoded = converter.to_bytes(filename_utf32); if (filename_reencoded != filename) { return false; } } catch (const std::exception &) { return false; } // Check for forbidden codepoints: // - Control characters // - Unicode equivalents of illegal characters // - UTF-16 surrogate pairs // - UTF-8 replacement character // - Byte order mark (BOM) // - Illegal characters: / \ : * ? " < > | for (char32_t c : filename_utf32) { if (c <= 0x1F // Control characters (C0) || c == 0x7F // Control characters (DEL) || (c >= 0x80 && c <= 0x9F) // Control characters (C1) || c == 0xFF0E // Fullwidth Full Stop (period equivalent) || c == 0x2215 // Division Slash (forward slash equivalent) || c == 0x2216 // Set Minus (backslash equivalent) || (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs || c == 0xFFFD // Replacement Character (UTF-8) || c == 0xFEFF // Byte Order Mark (BOM) || c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') { return false; } } // Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename // Unicode and other whitespace is not affected, only 0x20 space if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') { return false; } // Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead) if (filename.find("..") != std::string::npos) { return false; } // Reject "." if (filename == ".") { return false; } return true; }
O0
cpp
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x118(%rsp) movq 0x118(%rsp), %rdi callq 0x5da10 cmpq $0x0, %rax jne 0xf024f movb $0x0, 0x127(%rsp) jmp 0xf05e7 movq 0x118(%rsp), %rdi callq 0x5da10 cmpq $0xff, %rax jbe 0xf0271 movb $0x0, 0x127(%rsp) jmp 0xf05e7 leaq 0xf8(%rsp), %rdi callq 0xf9c30 leaq 0x98(%rsp), %rdi callq 0xf9cb0 jmp 0xf028d movq 0x118(%rsp), %rdx leaq 0x68(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0xf9d70 jmp 0xf02a9 leaq 0xf8(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x68(%rsp), %rsi movq %rsi, 0x8(%rsp) callq 0xf9df0 movq 0x8(%rsp), %rdi callq 0xfa030 movq 0x10(%rsp), %rdx leaq 0x48(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0xfa070 jmp 0xf02e8 movq 0x118(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0xfa0f0 testb $0x1, %al jne 0xf0303 jmp 0xf0389 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf0391 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0xf034c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x98(%rsp), %rdi callq 0xfa120 movl 0x8c(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xf05d8 movq 0x90(%rsp), %rdi callq 0x5d0e0 movq %rax, 0x38(%rsp) movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) callq 0x5ddc0 jmp 0xf03b8 movl $0x0, 0x44(%rsp) leaq 0x48(%rsp), %rdi callq 0x5e548 leaq 0x98(%rsp), %rdi callq 0xfa120 movl 0x44(%rsp), %eax testl %eax, %eax jne 0xf05c9 jmp 0xf03b6 jmp 0xf03d6 jmp 0xf05c9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0xf05d8 leaq 0xf8(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi callq 0xfa160 movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi callq 0xfa190 movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0xfa1f0 testb $0x1, %al jne 0xf0419 jmp 0xf0502 leaq 0x28(%rsp), %rdi callq 0xfa230 movl (%rax), %eax movl %eax, 0x1c(%rsp) cmpl $0x1f, 0x1c(%rsp) jbe 0xf04dc cmpl $0x7f, 0x1c(%rsp) je 0xf04dc cmpl $0x80, 0x1c(%rsp) jb 0xf0457 cmpl $0x9f, 0x1c(%rsp) jbe 0xf04dc cmpl $0xff0e, 0x1c(%rsp) # imm = 0xFF0E je 0xf04dc cmpl $0x2215, 0x1c(%rsp) # imm = 0x2215 je 0xf04dc cmpl $0x2216, 0x1c(%rsp) # imm = 0x2216 je 0xf04dc cmpl $0xd800, 0x1c(%rsp) # imm = 0xD800 jb 0xf0489 cmpl $0xdfff, 0x1c(%rsp) # imm = 0xDFFF jbe 0xf04dc cmpl $0xfffd, 0x1c(%rsp) # imm = 0xFFFD je 0xf04dc cmpl $0xfeff, 0x1c(%rsp) # imm = 0xFEFF je 0xf04dc cmpl $0x2f, 0x1c(%rsp) je 0xf04dc cmpl $0x5c, 0x1c(%rsp) je 0xf04dc cmpl $0x3a, 0x1c(%rsp) je 0xf04dc cmpl $0x2a, 0x1c(%rsp) je 0xf04dc cmpl $0x3f, 0x1c(%rsp) je 0xf04dc cmpl $0x22, 0x1c(%rsp) je 0xf04dc cmpl $0x3c, 0x1c(%rsp) je 0xf04dc cmpl $0x3e, 0x1c(%rsp) je 0xf04dc cmpl $0x7c, 0x1c(%rsp) jne 0xf04f1 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf05c9 jmp 0xf04f3 leaq 0x28(%rsp), %rdi callq 0xfa240 jmp 0xf0401 movq 0x118(%rsp), %rdi callq 0x5d250 movsbl (%rax), %eax cmpl $0x20, %eax je 0xf0541 movq 0x118(%rsp), %rdi callq 0x5df30 movsbl (%rax), %eax cmpl $0x20, %eax je 0xf0541 movq 0x118(%rsp), %rdi callq 0x5df30 movsbl (%rax), %eax cmpl $0x2e, %eax jne 0xf0553 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf05c9 movq 0x118(%rsp), %rdi leaq 0x123042(%rip), %rsi # 0x2135a4 xorl %eax, %eax movl %eax, %edx callq 0x5d060 cmpq $-0x1, %rax je 0xf0583 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf05c9 movq 0x118(%rsp), %rdi leaq 0x123013(%rip), %rsi # 0x2135a5 callq 0x8dbd0 movb %al, 0x7(%rsp) jmp 0xf059d movb 0x7(%rsp), %al testb $0x1, %al jne 0xf05a7 jmp 0xf05b9 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf05c9 movb $0x1, 0x127(%rsp) movl $0x1, 0x44(%rsp) leaq 0xf8(%rsp), %rdi callq 0xfa030 jmp 0xf05e7 leaq 0xf8(%rsp), %rdi callq 0xfa030 jmp 0xf05f8 movb 0x127(%rsp), %al andb $0x1, %al addq $0x128, %rsp # imm = 0x128 retq movq 0x90(%rsp), %rdi callq 0x5dbc0 nopw %cs:(%rax,%rax)
_Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 128h mov [rsp+128h+var_10], rdi mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0 jnz short loc_F024F mov [rsp+128h+var_1], 0 jmp loc_F05E7 loc_F024F: mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0FFh jbe short loc_F0271 mov [rsp+128h+var_1], 0 jmp loc_F05E7 loc_F0271: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2Ev; std::basic_string<char32_t>::basic_string(void) lea rdi, [rsp+128h+var_90]; int call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void) jmp short $+2 loc_F028D: mov rdx, [rsp+128h+var_10] lea rdi, [rsp+128h+var_C0] lea rsi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&) jmp short $+2 loc_F02A9: lea rdi, [rsp+128h+var_30] mov [rsp+128h+var_118], rdi lea rsi, [rsp+128h+var_C0] mov [rsp+128h+var_120], rsi call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&) mov rdi, [rsp+128h+var_120] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() mov rdx, [rsp+128h+var_118] lea rdi, [rsp+128h+var_E0] lea rsi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&) jmp short $+2 loc_F02E8: mov rsi, [rsp+128h+var_10] lea rdi, [rsp+128h+var_E0] call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) test al, 1 jnz short loc_F0303 jmp loc_F0389 loc_F0303: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F0391 mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax jmp short loc_F034C mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax lea rdi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() loc_F034C: mov eax, [rsp+128h+var_9C] mov ecx, 1 cmp eax, ecx jnz loc_F05D8 mov rdi, [rsp+128h+var_98]; void * call ___cxa_begin_catch mov [rsp+128h+var_F0], rax mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 call ___cxa_end_catch jmp short loc_F03B8 loc_F0389: mov [rsp+128h+var_E4], 0 loc_F0391: lea rdi, [rsp+128h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() mov eax, [rsp+128h+var_E4] test eax, eax jnz loc_F05C9 jmp short $+2 loc_F03B6: jmp short loc_F03D6 loc_F03B8: jmp loc_F05C9 mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax jmp loc_F05D8 loc_F03D6: lea rax, [rsp+128h+var_30] mov [rsp+128h+var_F8], rax mov rdi, [rsp+128h+var_F8] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE5beginEv; std::basic_string<char32_t>::begin(void) mov [rsp+128h+var_100], rax mov rdi, [rsp+128h+var_F8] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE3endEv; std::basic_string<char32_t>::end(void) mov [rsp+128h+var_108], rax loc_F0401: lea rdi, [rsp+128h+var_100] lea rsi, [rsp+128h+var_108] call _ZN9__gnu_cxxneIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&,__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&) test al, 1 jnz short loc_F0419 jmp loc_F0502 loc_F0419: lea rdi, [rsp+128h+var_100] call _ZNK9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEdeEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(void) mov eax, [rax] mov [rsp+128h+var_10C], eax cmp [rsp+128h+var_10C], 1Fh jbe loc_F04DC cmp [rsp+128h+var_10C], 7Fh jz loc_F04DC cmp [rsp+128h+var_10C], 80h jb short loc_F0457 cmp [rsp+128h+var_10C], 9Fh jbe loc_F04DC loc_F0457: cmp [rsp+128h+var_10C], 0FF0Eh jz short loc_F04DC cmp [rsp+128h+var_10C], 2215h jz short loc_F04DC cmp [rsp+128h+var_10C], 2216h jz short loc_F04DC cmp [rsp+128h+var_10C], 0D800h jb short loc_F0489 cmp [rsp+128h+var_10C], 0DFFFh jbe short loc_F04DC loc_F0489: cmp [rsp+128h+var_10C], 0FFFDh jz short loc_F04DC cmp [rsp+128h+var_10C], 0FEFFh jz short loc_F04DC cmp [rsp+128h+var_10C], 2Fh ; '/' jz short loc_F04DC cmp [rsp+128h+var_10C], 5Ch ; '\' jz short loc_F04DC cmp [rsp+128h+var_10C], 3Ah ; ':' jz short loc_F04DC cmp [rsp+128h+var_10C], 2Ah ; '*' jz short loc_F04DC cmp [rsp+128h+var_10C], 3Fh ; '?' jz short loc_F04DC cmp [rsp+128h+var_10C], 22h ; '"' jz short loc_F04DC cmp [rsp+128h+var_10C], 3Ch ; '<' jz short loc_F04DC cmp [rsp+128h+var_10C], 3Eh ; '>' jz short loc_F04DC cmp [rsp+128h+var_10C], 7Ch ; '|' jnz short loc_F04F1 loc_F04DC: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp loc_F05C9 loc_F04F1: jmp short $+2 loc_F04F3: lea rdi, [rsp+128h+var_100] call _ZN9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEppEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(void) jmp loc_F0401 loc_F0502: mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void) movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_F0541 mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_F0541 mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz short loc_F0553 loc_F0541: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F05C9 loc_F0553: mov rdi, [rsp+128h+var_10] lea rsi, aN0N1+7; ".." xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_F0583 mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F05C9 loc_F0583: mov rdi, [rsp+128h+var_10] lea rsi, aN0N1+8; "." call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+128h+var_121], al jmp short $+2 loc_F059D: mov al, [rsp+128h+var_121] test al, 1 jnz short loc_F05A7 jmp short loc_F05B9 loc_F05A7: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F05C9 loc_F05B9: mov [rsp+128h+var_1], 1 mov [rsp+128h+var_E4], 1 loc_F05C9: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_F05E7 loc_F05D8: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_F05F8 loc_F05E7: mov al, [rsp+128h+var_1] and al, 1 add rsp, 128h retn loc_F05F8: mov rdi, [rsp+128h+var_98] call __Unwind_Resume
bool fs_validate_filename(long long a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v7; // [rsp+0h] [rbp-128h] int v8; // [rsp+8h] [rbp-120h] void *v9; // [rsp+10h] [rbp-118h] int v10; // [rsp+18h] [rbp-110h] unsigned int v11; // [rsp+1Ch] [rbp-10Ch] long long v12; // [rsp+20h] [rbp-108h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-100h] BYREF int v14; // [rsp+44h] [rbp-E4h] _BYTE v15[32]; // [rsp+48h] [rbp-E0h] BYREF _BYTE v16[36]; // [rsp+68h] [rbp-C0h] BYREF int v17[24]; // [rsp+98h] [rbp-90h] BYREF _BYTE v18[32]; // [rsp+F8h] [rbp-30h] BYREF long long v19; // [rsp+118h] [rbp-10h] bool v20; // [rsp+127h] [rbp-1h] v19 = a1; if ( std::string::length(a1) ) { if ( (unsigned long long)std::string::length(v19) <= 0xFF ) { std::basic_string<char32_t>::basic_string(v18); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert( (int)v17, a2, v2, v3, v4, v5, v7, v8, v9, v10, v12); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes( v16, v17, v19); std::basic_string<char32_t>::operator=(); std::basic_string<char32_t>::~basic_string(v16); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes( v15, v17, v18); if ( (std::operator!=<char>(v15, v19) & 1) != 0 ) { v20 = 0; v14 = 1; } else { v14 = 0; } std::string::~string(v15); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v17); if ( !v14 ) { v13[1] = v18; v13[0] = std::basic_string<char32_t>::begin(v18); v12 = std::basic_string<char32_t>::end(v18); while ( (__gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(v13, &v12) & 1) != 0 ) { v11 = *(_DWORD *)__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(v13); if ( v11 <= 0x1F || v11 == 127 || v11 >= 0x80 && v11 <= 0x9F || v11 == 65294 || v11 == 8725 || v11 == 8726 || v11 >= 0xD800 && v11 <= 0xDFFF || v11 == 65533 || v11 == 65279 || v11 == 47 || v11 == 92 || v11 == 58 || v11 == 42 || v11 == 63 || v11 == 34 || v11 == 60 || v11 == 62 || v11 == 124 ) { v20 = 0; v14 = 1; goto LABEL_41; } __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(v13); } if ( *(_BYTE *)std::string::front(v19) == 32 || *(_BYTE *)std::string::back(v19) == 32 || *(_BYTE *)std::string::back(v19) == 46 ) { v20 = 0; v14 = 1; } else { v20 = std::string::find(v19, "..", 0LL) == -1 && !std::operator==<char>(v19, (long long)"."); v14 = 1; } } LABEL_41: std::basic_string<char32_t>::~basic_string(v18); } else { return 0; } } else { return 0; } return v20; }
fs_validate_filename: SUB RSP,0x128 MOV qword ptr [RSP + 0x118],RDI MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015da10 CMP RAX,0x0 JNZ 0x001f024f MOV byte ptr [RSP + 0x127],0x0 JMP 0x001f05e7 LAB_001f024f: MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015da10 CMP RAX,0xff JBE 0x001f0271 MOV byte ptr [RSP + 0x127],0x0 JMP 0x001f05e7 LAB_001f0271: LEA RDI,[RSP + 0xf8] CALL 0x001f9c30 LAB_001f027e: LEA RDI,[RSP + 0x98] CALL 0x001f9cb0 JMP 0x001f028d LAB_001f028d: MOV RDX,qword ptr [RSP + 0x118] LAB_001f0295: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x98] CALL 0x001f9d70 JMP 0x001f02a9 LAB_001f02a9: LEA RDI,[RSP + 0xf8] MOV qword ptr [RSP + 0x10],RDI LEA RSI,[RSP + 0x68] MOV qword ptr [RSP + 0x8],RSI CALL 0x001f9df0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001fa030 MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x98] CALL 0x001fa070 LAB_001f02e6: JMP 0x001f02e8 LAB_001f02e8: MOV RSI,qword ptr [RSP + 0x118] LEA RDI,[RSP + 0x48] CALL 0x001fa0f0 TEST AL,0x1 JNZ 0x001f0303 JMP 0x001f0389 LAB_001f0303: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f0391 LAB_001f0389: MOV dword ptr [RSP + 0x44],0x0 LAB_001f0391: LEA RDI,[RSP + 0x48] CALL 0x0015e548 LEA RDI,[RSP + 0x98] CALL 0x001fa120 MOV EAX,dword ptr [RSP + 0x44] TEST EAX,EAX JNZ 0x001f05c9 JMP 0x001f03b6 LAB_001f03b6: JMP 0x001f03d6 LAB_001f03d6: LEA RAX,[RSP + 0xf8] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001fa160 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001fa190 MOV qword ptr [RSP + 0x20],RAX LAB_001f0401: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x20] CALL 0x001fa1f0 TEST AL,0x1 JNZ 0x001f0419 JMP 0x001f0502 LAB_001f0419: LEA RDI,[RSP + 0x28] CALL 0x001fa230 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX CMP dword ptr [RSP + 0x1c],0x1f JBE 0x001f04dc CMP dword ptr [RSP + 0x1c],0x7f JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x80 JC 0x001f0457 CMP dword ptr [RSP + 0x1c],0x9f JBE 0x001f04dc LAB_001f0457: CMP dword ptr [RSP + 0x1c],0xff0e JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x2215 JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x2216 JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0xd800 JC 0x001f0489 CMP dword ptr [RSP + 0x1c],0xdfff JBE 0x001f04dc LAB_001f0489: CMP dword ptr [RSP + 0x1c],0xfffd JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0xfeff JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x2f JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x5c JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x3a JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x2a JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x3f JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x22 JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x3c JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x3e JZ 0x001f04dc CMP dword ptr [RSP + 0x1c],0x7c JNZ 0x001f04f1 LAB_001f04dc: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f05c9 LAB_001f04f1: JMP 0x001f04f3 LAB_001f04f3: LEA RDI,[RSP + 0x28] CALL 0x001fa240 JMP 0x001f0401 LAB_001f0502: MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015d250 MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001f0541 MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015df30 MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001f0541 MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015df30 MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x001f0553 LAB_001f0541: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f05c9 LAB_001f0553: MOV RDI,qword ptr [RSP + 0x118] LEA RSI,[0x3135a4] XOR EAX,EAX MOV EDX,EAX CALL 0x0015d060 CMP RAX,-0x1 JZ 0x001f0583 MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f05c9 LAB_001f0583: MOV RDI,qword ptr [RSP + 0x118] LEA RSI,[0x3135a5] CALL 0x0018dbd0 LAB_001f0597: MOV byte ptr [RSP + 0x7],AL JMP 0x001f059d LAB_001f059d: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x001f05a7 JMP 0x001f05b9 LAB_001f05a7: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f05c9 LAB_001f05b9: MOV byte ptr [RSP + 0x127],0x1 MOV dword ptr [RSP + 0x44],0x1 LAB_001f05c9: LEA RDI,[RSP + 0xf8] CALL 0x001fa030 JMP 0x001f05e7 LAB_001f05e7: MOV AL,byte ptr [RSP + 0x127] AND AL,0x1 ADD RSP,0x128 RET
/* fs_validate_filename(std::__cxx11::string const&) */ ulong fs_validate_filename(string *param_1) { uint uVar1; bool bVar2; long lVar3; ulong uVar4; uint *puVar5; char *pcVar6; int8 local_108; int8 local_100; u32string *local_f8; uint local_e4; u32string local_e0 [32]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_c0 [48]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_90 [96]; u32string local_30 [32]; string *local_10; int1 local_1; local_10 = param_1; lVar3 = std::__cxx11::string::length(); if (lVar3 == 0) { local_1 = 0; uVar4 = 0; } else { uVar4 = std::__cxx11::string::length(); if (uVar4 < 0x100) { std::__cxx11::u32string::u32string(local_30); /* try { // try from 001f027e to 001f028a has its CatchHandler @ 001f0315 */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::wstring_convert(local_90); /* try { // try from 001f0295 to 001f02e5 has its CatchHandler @ 001f032b */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::from_bytes(local_c0,(string *)local_90); std::__cxx11::u32string::operator=(local_30,(u32string *)local_c0); std::__cxx11::u32string::~u32string((u32string *)local_c0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::to_bytes(local_e0); bVar2 = std::operator!=((string *)local_e0,local_10); if (bVar2) { local_1 = 0; } local_e4 = (uint)bVar2; std::__cxx11::string::~string((string *)local_e0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::~wstring_convert(local_90); if (local_e4 == 0) { local_f8 = local_30; local_100 = std::__cxx11::u32string::begin(local_f8); local_108 = std::__cxx11::u32string::end(local_f8); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_100,(__normal_iterator *)&local_108), bVar2) { puVar5 = (uint *)__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>:: operator*((__normal_iterator<char32_t*,std::__cxx11::u32string> *) &local_100); uVar1 = *puVar5; if ((((((uVar1 < 0x20) || (uVar1 == 0x7f)) || ((0x7f < uVar1 && (uVar1 < 0xa0)))) || ((uVar1 == 0xff0e || (uVar1 == 0x2215)))) || ((uVar1 == 0x2216 || ((((0xd7ff < uVar1 && (uVar1 < 0xe000)) || (uVar1 == 0xfffd)) || (((uVar1 == 0xfeff || (uVar1 == 0x2f)) || ((uVar1 == 0x5c || ((uVar1 == 0x3a || (uVar1 == 0x2a)))))))))))) || ((uVar1 == 0x3f || ((((uVar1 == 0x22 || (uVar1 == 0x3c)) || (uVar1 == 0x3e)) || (uVar1 == 0x7c)))))) { local_1 = 0; local_e4 = 1; goto LAB_001f05c9; } __gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::operator++ ((__normal_iterator<char32_t*,std::__cxx11::u32string> *)&local_100); } pcVar6 = (char *)std::__cxx11::string::front(); if (((*pcVar6 == ' ') || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == ' ')) || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == '.')) { local_1 = 0; local_e4 = 1; } else { lVar3 = std::__cxx11::string::find((char *)local_10,0x3135a4); if (lVar3 == -1) { bVar2 = std::operator==(local_10,"."); if (bVar2) { local_1 = 0; local_e4 = 1; } else { local_1 = 1; local_e4 = 1; } } else { local_1 = 0; local_e4 = 1; } } } LAB_001f05c9: uVar4 = std::__cxx11::u32string::~u32string(local_30); } else { local_1 = 0; } } return CONCAT71((int7)(uVar4 >> 8),local_1) & 0xffffffffffffff01; }
10,137
MemoryManager::setInt(unsigned int, unsigned int, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
bool MemoryManager::setInt(uint32_t addr, uint32_t val, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Int write to invalid addr 0x%x!\n", addr); return false; } this->setByte(addr, val & 0xFF, cycles); this->setByte(addr + 1, (val >> 8) & 0xFF); this->setByte(addr + 2, (val >> 16) & 0xFF); this->setByte(addr + 3, (val >> 24) & 0xFF); return true; }
O0
cpp
MemoryManager::setInt(unsigned int, unsigned int, unsigned int*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movl %edx, 0x10(%rsp) movq %rcx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x7140 testb $0x1, %al jne 0x74a8 movl 0x14(%rsp), %esi leaq 0x3c9f(%rip), %rdi # 0xb136 movb $0x0, %al callq 0x6930 movb $0x0, 0x27(%rsp) jmp 0x752e movq (%rsp), %rdi movl 0x14(%rsp), %esi movl 0x10(%rsp), %eax andl $0xff, %eax movq 0x8(%rsp), %rcx movzbl %al, %edx callq 0x7160 movq (%rsp), %rdi movl 0x14(%rsp), %esi addl $0x1, %esi movl 0x10(%rsp), %eax shrl $0x8, %eax andl $0xff, %eax xorl %ecx, %ecx movzbl %al, %edx callq 0x7160 movq (%rsp), %rdi movl 0x14(%rsp), %esi addl $0x2, %esi movl 0x10(%rsp), %eax shrl $0x10, %eax andl $0xff, %eax xorl %ecx, %ecx movzbl %al, %edx callq 0x7160 movq (%rsp), %rdi movl 0x14(%rsp), %esi addl $0x3, %esi movl 0x10(%rsp), %eax shrl $0x18, %eax andl $0xff, %eax xorl %ecx, %ecx movzbl %al, %edx callq 0x7160 movb $0x1, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopl (%rax)
_ZN13MemoryManager6setIntEjjPj: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_18], edx mov [rsp+28h+var_20], rcx mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, 1 jnz short loc_74A8 mov esi, [rsp+28h+var_14] lea rdi, aIntWriteToInva; "Int write to invalid addr 0x%x!\n" mov al, 0 call _Z9dbgprintfPKcz; dbgprintf(char const*,...) mov [rsp+28h+var_1], 0 jmp loc_752E loc_74A8: mov rdi, [rsp+28h+var_28]; this mov esi, [rsp+28h+var_14]; unsigned int mov eax, [rsp+28h+var_18] and eax, 0FFh mov rcx, [rsp+28h+var_20]; unsigned int * movzx edx, al; unsigned __int8 call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) mov rdi, [rsp+28h+var_28]; this mov esi, [rsp+28h+var_14] add esi, 1; unsigned int mov eax, [rsp+28h+var_18] shr eax, 8 and eax, 0FFh xor ecx, ecx; unsigned int * movzx edx, al; unsigned __int8 call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) mov rdi, [rsp+28h+var_28]; this mov esi, [rsp+28h+var_14] add esi, 2; unsigned int mov eax, [rsp+28h+var_18] shr eax, 10h and eax, 0FFh xor ecx, ecx; unsigned int * movzx edx, al; unsigned __int8 call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) mov rdi, [rsp+28h+var_28]; this mov esi, [rsp+28h+var_14] add esi, 3; unsigned int mov eax, [rsp+28h+var_18] shr eax, 18h and eax, 0FFh xor ecx, ecx; unsigned int * movzx edx, al; unsigned __int8 call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) mov [rsp+28h+var_1], 1 loc_752E: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char MemoryManager::setInt( Cache **this, unsigned int a2, int a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 double v18; // xmm4_8 double v19; // xmm5_8 double v20; // xmm4_8 double v21; // xmm5_8 double v22; // xmm4_8 double v23; // xmm5_8 if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) ) { MemoryManager::setByte(this, a2, a3, a4, a5, a6, a7, a8, *(double *)v16.m128_u64, *(double *)v17.m128_u64, a11, a12); MemoryManager::setByte(this, a2 + 1, BYTE1(a3), 0LL, a5, a6, a7, a8, v18, v19, a11, a12); MemoryManager::setByte(this, a2 + 2, BYTE2(a3), 0LL, a5, a6, a7, a8, v20, v21, a11, a12); MemoryManager::setByte(this, a2 + 3, HIBYTE(a3), 0LL, a5, a6, a7, a8, v22, v23, a11, a12); return 1; } else { dbgprintf( "Int write to invalid addr 0x%x!\n", a2, v12, v13, v14, v15, a5, a6, a7, a8, v16, v17, a11, a12, (char)this); return 0; } }
setInt: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV dword ptr [RSP + 0x10],EDX MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x00107140 TEST AL,0x1 JNZ 0x001074a8 MOV ESI,dword ptr [RSP + 0x14] LEA RDI,[0x10b136] MOV AL,0x0 CALL 0x00106930 MOV byte ptr [RSP + 0x27],0x0 JMP 0x0010752e LAB_001074a8: MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x14] MOV EAX,dword ptr [RSP + 0x10] AND EAX,0xff MOV RCX,qword ptr [RSP + 0x8] MOVZX EDX,AL CALL 0x00107160 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x14] ADD ESI,0x1 MOV EAX,dword ptr [RSP + 0x10] SHR EAX,0x8 AND EAX,0xff XOR ECX,ECX MOVZX EDX,AL CALL 0x00107160 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x14] ADD ESI,0x2 MOV EAX,dword ptr [RSP + 0x10] SHR EAX,0x10 AND EAX,0xff XOR ECX,ECX MOVZX EDX,AL CALL 0x00107160 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x14] ADD ESI,0x3 MOV EAX,dword ptr [RSP + 0x10] SHR EAX,0x18 AND EAX,0xff XOR ECX,ECX MOVZX EDX,AL CALL 0x00107160 MOV byte ptr [RSP + 0x27],0x1 LAB_0010752e: MOV AL,byte ptr [RSP + 0x27] AND AL,0x1 ADD RSP,0x28 RET
/* MemoryManager::setInt(unsigned int, unsigned int, unsigned int*) */ bool __thiscall MemoryManager::setInt(MemoryManager *this,uint param_1,uint param_2,uint *param_3) { ulong uVar1; bool bVar2; uVar1 = isAddrExist(this,param_1); bVar2 = (uVar1 & 1) != 0; if (bVar2) { setByte(this,param_1,(uchar)param_2,param_3); setByte(this,param_1 + 1,(uchar)(param_2 >> 8),(uint *)0x0); setByte(this,param_1 + 2,(uchar)(param_2 >> 0x10),(uint *)0x0); setByte(this,param_1 + 3,(uchar)(param_2 >> 0x18),(uint *)0x0); } else { dbgprintf("Int write to invalid addr 0x%x!\n",(ulong)param_1); } return bVar2; }
10,138
MemoryManager::setInt(unsigned int, unsigned int, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
bool MemoryManager::setInt(uint32_t addr, uint32_t val, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Int write to invalid addr 0x%x!\n", addr); return false; } this->setByte(addr, val & 0xFF, cycles); this->setByte(addr + 1, (val >> 8) & 0xFF); this->setByte(addr + 2, (val >> 16) & 0xFF); this->setByte(addr + 3, (val >> 24) & 0xFF); return true; }
O1
cpp
MemoryManager::setInt(unsigned int, unsigned int, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx cmpl $-0x1, %esi je 0x2a72 movl %edx, %ebp movq %rdi, %r14 movl $0xff, %r15d andl %r15d, %edx movl %ebx, %esi callq 0x28c4 leal 0x1(%rbx), %esi movl %ebp, %edx shrl $0x8, %edx andl %r15d, %edx movq %r14, %rdi xorl %ecx, %ecx callq 0x28c4 leal 0x2(%rbx), %esi movl %ebp, %edx shrl $0x10, %edx andl %r15d, %edx movq %r14, %rdi xorl %ecx, %ecx callq 0x28c4 leal 0x3(%rbx), %esi shrl $0x18, %ebp movq %r14, %rdi movl %ebp, %edx xorl %ecx, %ecx callq 0x28c4 cmpl $-0x1, %ebx setne %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x16e4(%rip), %rdi # 0x415d movl %ebx, %esi xorl %eax, %eax callq 0x21f0 jmp 0x2a61
_ZN13MemoryManager6setIntEjjPj: push rbp push r15 push r14 push rbx push rax mov ebx, esi cmp esi, 0FFFFFFFFh jz short loc_2A72 mov ebp, edx mov r14, rdi mov r15d, 0FFh and edx, r15d; unsigned __int8 mov esi, ebx; unsigned int call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) lea esi, [rbx+1]; unsigned int mov edx, ebp shr edx, 8 and edx, r15d; unsigned __int8 mov rdi, r14; this xor ecx, ecx; unsigned int * call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) lea esi, [rbx+2]; unsigned int mov edx, ebp shr edx, 10h and edx, r15d; unsigned __int8 mov rdi, r14; this xor ecx, ecx; unsigned int * call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) lea esi, [rbx+3]; unsigned int shr ebp, 18h mov rdi, r14; this mov edx, ebp; unsigned __int8 xor ecx, ecx; unsigned int * call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *) loc_2A61: cmp ebx, 0FFFFFFFFh setnz al add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_2A72: lea rdi, aIntWriteToInva; "Int write to invalid addr 0x%x!\n" mov esi, ebx xor eax, eax call _Z9dbgprintfPKcz; dbgprintf(char const*,...) jmp short loc_2A61
bool MemoryManager::setInt( Cache **this, unsigned int a2, long long a3, unsigned int *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; // ebp long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 if ( a2 == -1 ) { dbgprintf( "Int write to invalid addr 0x%x!\n", 0xFFFFFFFFLL, a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); } else { v15 = a3; MemoryManager::setByte(this, a2, (unsigned __int8)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); MemoryManager::setByte(this, a2 + 1, BYTE1(v15), 0LL, v16, v17, a7, a8, a9, a10, v18, v19, a13, a14); MemoryManager::setByte(this, a2 + 2, BYTE2(v15), 0LL, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14); MemoryManager::setByte(this, a2 + 3, HIBYTE(v15), 0LL, v24, v25, a7, a8, a9, a10, v26, v27, a13, a14); } return a2 != -1; }
setInt: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI CMP ESI,-0x1 JZ 0x00102a72 MOV EBP,EDX MOV R14,RDI MOV R15D,0xff AND EDX,R15D MOV ESI,EBX CALL 0x001028c4 LEA ESI,[RBX + 0x1] MOV EDX,EBP SHR EDX,0x8 AND EDX,R15D MOV RDI,R14 XOR ECX,ECX CALL 0x001028c4 LEA ESI,[RBX + 0x2] MOV EDX,EBP SHR EDX,0x10 AND EDX,R15D MOV RDI,R14 XOR ECX,ECX CALL 0x001028c4 LEA ESI,[RBX + 0x3] SHR EBP,0x18 MOV RDI,R14 MOV EDX,EBP XOR ECX,ECX CALL 0x001028c4 LAB_00102a61: CMP EBX,-0x1 SETNZ AL ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00102a72: LEA RDI,[0x10415d] MOV ESI,EBX XOR EAX,EAX CALL 0x001021f0 JMP 0x00102a61
/* MemoryManager::setInt(unsigned int, unsigned int, unsigned int*) */ bool MemoryManager::setInt(uint param_1,uint param_2,uint *param_3) { uchar uVar1; if (param_2 == 0xffffffff) { dbgprintf("Int write to invalid addr 0x%x!\n",0xffffffff); } else { uVar1 = (uchar)param_2; setByte(param_1,uVar1,(uint *)(ulong)((uint)param_3 & 0xff)); setByte(param_1,uVar1 + '\x01',(uint *)(ulong)((uint)((ulong)param_3 >> 8) & 0xff)); setByte(param_1,uVar1 + '\x02',(uint *)(ulong)((uint)((ulong)param_3 >> 0x10) & 0xff)); setByte(param_1,uVar1 + '\x03',(uint *)((ulong)param_3 >> 0x18 & 0xff)); } return param_2 != 0xffffffff; }
10,139
ftxui::ContainerBase::MoveSelectorWrap(int)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/container.cpp
void MoveSelectorWrap(int dir) { if (children_.empty()) { return; } for (size_t offset = 1; offset < children_.size(); ++offset) { const size_t i = (*selector_ + offset * dir + children_.size()) % children_.size(); if (children_[i]->Focusable()) { *selector_ = int(i); return; } } }
O0
cpp
ftxui::ContainerBase::MoveSelectorWrap(int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) addq $0x8, %rdi callq 0x51460 testb $0x1, %al jne 0x54356 jmp 0x5435b jmp 0x54425 movq $0x1, -0x18(%rbp) movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) addq $0x8, %rdi callq 0x51300 movq %rax, %rcx movq -0x30(%rbp), %rax cmpq %rcx, %rax jae 0x54425 movq -0x28(%rbp), %rdi movq 0x30(%rdi), %rax movslq (%rax), %rax movq -0x18(%rbp), %rcx movslq -0xc(%rbp), %rdx imulq %rdx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) addq $0x8, %rdi callq 0x51300 movq -0x28(%rbp), %rdi movq %rax, %rcx movq -0x40(%rbp), %rax addq %rcx, %rax movq %rax, -0x38(%rbp) addq $0x8, %rdi callq 0x51300 movq -0x28(%rbp), %rdi movq %rax, %rcx movq -0x38(%rbp), %rax xorl %edx, %edx divq %rcx movq %rdx, -0x20(%rbp) addq $0x8, %rdi movq -0x20(%rbp), %rsi callq 0x512e0 movq %rax, %rdi callq 0x23bd0 movq %rax, %rdi movq (%rdi), %rax callq *0x30(%rax) testb $0x1, %al jne 0x54402 jmp 0x54412 movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x30(%rax), %rax movl %ecx, (%rax) jmp 0x54425 jmp 0x54414 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x54363 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN5ftxui13ContainerBase16MoveSelectorWrapEi: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rdi, [rbp+var_8] mov [rbp+var_28], rdi add rdi, 8 call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE5emptyEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::empty(void) test al, 1 jnz short loc_54356 jmp short loc_5435B loc_54356: jmp loc_54425 loc_5435B: mov [rbp+var_18], 1 loc_54363: mov rdi, [rbp+var_28] mov rax, [rbp+var_18] mov [rbp+var_30], rax add rdi, 8 call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void) mov rcx, rax mov rax, [rbp+var_30] cmp rax, rcx jnb loc_54425 mov rdi, [rbp+var_28] mov rax, [rdi+30h] movsxd rax, dword ptr [rax] mov rcx, [rbp+var_18] movsxd rdx, [rbp+var_C] imul rcx, rdx add rax, rcx mov [rbp+var_40], rax add rdi, 8 call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void) mov rdi, [rbp+var_28] mov rcx, rax mov rax, [rbp+var_40] add rax, rcx mov [rbp+var_38], rax add rdi, 8 call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void) mov rdi, [rbp+var_28] mov rcx, rax mov rax, [rbp+var_38] xor edx, edx div rcx mov [rbp+var_20], rdx add rdi, 8 mov rsi, [rbp+var_20] call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::ComponentBase>>::operator[](ulong) mov rdi, rax call _ZNKSt19__shared_ptr_accessIN5ftxui13ComponentBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] call qword ptr [rax+30h] test al, 1 jnz short loc_54402 jmp short loc_54412 loc_54402: mov rax, [rbp+var_28] mov rcx, [rbp+var_20] mov rax, [rax+30h] mov [rax], ecx jmp short loc_54425 loc_54412: jmp short $+2 loc_54414: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_54363 loc_54425: add rsp, 40h pop rbp retn
char ftxui::ContainerBase::MoveSelectorWrap(ftxui::ContainerBase *this, int a2) { _DWORD *v2; // rax unsigned long long v3; // rcx long long v4; // rax long long v5; // rax unsigned long long v7; // [rsp+0h] [rbp-40h] unsigned long long v8; // [rsp+8h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-20h] unsigned long long i; // [rsp+28h] [rbp-18h] LOBYTE(v2) = std::vector<std::shared_ptr<ftxui::ComponentBase>>::empty((long long)this + 8); if ( ((unsigned __int8)v2 & 1) == 0 ) { for ( i = 1LL; ; ++i ) { v3 = std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)this + 1); LOBYTE(v2) = i; if ( i >= v3 ) break; v7 = a2 * i + **((int **)this + 6); v8 = std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)this + 1) + v7; v9 = v8 % std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)this + 1); v4 = std::vector<std::shared_ptr<ftxui::ComponentBase>>::operator[]((_QWORD *)this + 1, v9); v5 = std::__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v4); if ( ((*(long long ( **)(long long))(*(_QWORD *)v5 + 48LL))(v5) & 1) != 0 ) { v2 = (_DWORD *)*((_QWORD *)this + 6); *v2 = v9; return (char)v2; } } } return (char)v2; }
MoveSelectorWrap: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI ADD RDI,0x8 CALL 0x00151460 TEST AL,0x1 JNZ 0x00154356 JMP 0x0015435b LAB_00154356: JMP 0x00154425 LAB_0015435b: MOV qword ptr [RBP + -0x18],0x1 LAB_00154363: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX ADD RDI,0x8 CALL 0x00151300 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,RCX JNC 0x00154425 MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RDI + 0x30] MOVSXD RAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0xc] IMUL RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX ADD RDI,0x8 CALL 0x00151300 MOV RDI,qword ptr [RBP + -0x28] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX ADD RDI,0x8 CALL 0x00151300 MOV RDI,qword ptr [RBP + -0x28] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x20],RDX ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x20] CALL 0x001512e0 MOV RDI,RAX CALL 0x00123bd0 MOV RDI,RAX MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x30] TEST AL,0x1 JNZ 0x00154402 JMP 0x00154412 LAB_00154402: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x30] MOV dword ptr [RAX],ECX JMP 0x00154425 LAB_00154412: JMP 0x00154414 LAB_00154414: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00154363 LAB_00154425: ADD RSP,0x40 POP RBP RET
/* ftxui::ContainerBase::MoveSelectorWrap(int) */ void __thiscall ftxui::ContainerBase::MoveSelectorWrap(ContainerBase *this,int param_1) { int iVar1; ulong uVar2; long lVar3; __shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> *this_00; long *plVar4; ulong uVar5; ulong local_20; uVar2 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::empty((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8)); if ((uVar2 & 1) == 0) { for (local_20 = 1; uVar2 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8)), local_20 < uVar2; local_20 = local_20 + 1) { iVar1 = **(int **)(this + 0x30); lVar3 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8)); uVar2 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8)); uVar2 = ((long)iVar1 + local_20 * (long)param_1 + lVar3) % uVar2; this_00 = (__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> *) std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::operator[]((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8),uVar2); plVar4 = (long *)std:: __shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(this_00); uVar5 = (**(code **)(*plVar4 + 0x30))(); if ((uVar5 & 1) != 0) { **(int4 **)(this + 0x30) = (int)uVar2; return; } } } return; }
10,140
js_new_uint8array
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer) { if (JS_IsException(buffer)) return JS_EXCEPTION; JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY); if (JS_IsException(obj)) { JS_FreeValue(ctx, buffer); return JS_EXCEPTION; } JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer); assert(abuf != NULL); if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) { // 'buffer' is freed on error above. JS_FreeValue(ctx, obj); return JS_EXCEPTION; } return obj; }
O1
c
js_new_uint8array: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movl $0x6, %ebx cmpl $0x6, %r12d je 0x39858 movq %rsi, %r13 movq %rdi, %r15 movl $0x3, %edx xorl %esi, %esi movl $0x17, %ecx callq 0x36d56 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x39870 movq 0x18(%r15), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x38fcf movslq (%rax), %r9 movl $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x12b13 testl %eax, %eax je 0x398af movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbp, %rdx jmp 0x39853 movq %rbp, %rbx jmp 0x3985b
js_new_uint8array: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov ebx, 6 cmp r12d, 6 jz short loc_39858 mov r13, rsi mov r15, rdi mov edx, 3 xor esi, esi mov ecx, 17h call js_create_from_ctor mov rbp, rdx cmp ebp, 6 jnz short loc_39870 mov rdi, [r15+18h] mov rsi, r13 mov rdx, r12 loc_39853: call JS_FreeValueRT loc_39858: xor r14d, r14d loc_3985B: mov rax, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39870: mov r14, rax mov rdi, r15 mov rsi, r13 mov rdx, r12 call js_get_array_buffer movsxd r9, dword ptr [rax] mov [rsp+38h+var_38], 0 mov rdi, r15 mov rsi, r14 mov rdx, r13 mov rcx, r12 xor r8d, r8d call typed_array_init test eax, eax jz short loc_398AF mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbp jmp short loc_39853 loc_398AF: mov rbx, rbp jmp short loc_3985B
long long js_new_uint8array( long long a1, _DWORD *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { unsigned long long v12; // rax double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // rdx long long v16; // rbp long long v17; // rdi long long v18; // rdx long long v19; // r14 int *array_buffer; // rax if ( (_DWORD)a3 != 6 ) { v12 = js_create_from_ctor(a1, 0LL, 3LL, 23); v16 = v15; if ( (_DWORD)v15 == 6 ) { v17 = *(_QWORD *)(a1 + 24); v18 = a3; } else { v19 = v12; array_buffer = (int *)js_get_array_buffer(a1, (long long)a2, a3, a4, a5, a6, a7, v13, v14, a10, a11); if ( !(unsigned int)typed_array_init(a1, v19, (long long)a2, a3, 0LL, *array_buffer, 0) ) return v19; v17 = *(_QWORD *)(a1 + 24); a2 = (_DWORD *)v19; v18 = v16; } JS_FreeValueRT(v17, a2, v18); } return 0LL; }
10,141
js_new_uint8array
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer) { if (JS_IsException(buffer)) return JS_EXCEPTION; JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY); if (JS_IsException(obj)) { JS_FreeValue(ctx, buffer); return JS_EXCEPTION; } JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer); assert(abuf != NULL); if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) { // 'buffer' is freed on error above. JS_FreeValue(ctx, obj); return JS_EXCEPTION; } return obj; }
O2
c
js_new_uint8array: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 pushq $0x6 popq %rbx cmpl $0x6, %r12d je 0x329e4 movq %rsi, %r13 movq %rdi, %r15 pushq $0x3 popq %rdx pushq $0x17 popq %rcx xorl %esi, %esi callq 0x3045a movq %rdx, %rbp cmpl $0x6, %ebp jne 0x329a6 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx jmp 0x329df movq %rax, %r14 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x320fa movslq (%rax), %r9 andl $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x6a950 testl %eax, %eax je 0x329fc movq %r15, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1801e xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, %rbx jmp 0x329e7
js_new_uint8array: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx push 6 pop rbx cmp r12d, 6 jz short loc_329E4 mov r13, rsi mov r15, rdi push 3 pop rdx push 17h pop rcx xor esi, esi call js_create_from_ctor mov rbp, rdx cmp ebp, 6 jnz short loc_329A6 mov rdi, r15 mov rsi, r13 mov rdx, r12 jmp short loc_329DF loc_329A6: mov r14, rax mov rdi, r15 mov rsi, r13 mov rdx, r12 call js_get_array_buffer movsxd r9, dword ptr [rax] and [rsp+38h+var_38], 0 mov rdi, r15 mov rsi, r14 mov rdx, r13 mov rcx, r12 xor r8d, r8d call typed_array_init test eax, eax jz short loc_329FC mov rdi, r15 mov rsi, r14 mov rdx, rbp loc_329DF: call JS_FreeValue loc_329E4: xor r14d, r14d loc_329E7: mov rax, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_329FC: mov rbx, rbp jmp short loc_329E7
unsigned long long js_new_uint8array(long long a1, long long a2, long long a3) { unsigned long long v4; // rax long long v5; // rdx long long v6; // rbp long long v7; // rdx unsigned long long v8; // r14 _DWORD *array_buffer; // rax if ( (_DWORD)a3 != 6 ) { v4 = js_create_from_ctor(a1, 0LL, 3LL, 23); v6 = v5; if ( (_DWORD)v5 == 6 ) { v7 = a3; } else { v8 = v4; array_buffer = (_DWORD *)js_get_array_buffer(a1, a2, a3); if ( !(unsigned int)typed_array_init(a1, v8, a2, a3, 0, *array_buffer, 0) ) return v8; a2 = v8; v7 = v6; } JS_FreeValue(a1, a2, v7); } return 0LL; }
js_new_uint8array: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX PUSH 0x6 POP RBX CMP R12D,0x6 JZ 0x001329e4 MOV R13,RSI MOV R15,RDI PUSH 0x3 POP RDX PUSH 0x17 POP RCX XOR ESI,ESI CALL 0x0013045a MOV RBP,RDX CMP EBP,0x6 JNZ 0x001329a6 MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 JMP 0x001329df LAB_001329a6: MOV R14,RAX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 CALL 0x001320fa MOVSXD R9,dword ptr [RAX] AND dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 MOV RCX,R12 XOR R8D,R8D CALL 0x0016a950 TEST EAX,EAX JZ 0x001329fc MOV RDI,R15 MOV RSI,R14 MOV RDX,RBP LAB_001329df: CALL 0x0011801e LAB_001329e4: XOR R14D,R14D LAB_001329e7: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001329fc: MOV RBX,RBP JMP 0x001329e7
int1 [16] js_new_uint8array(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; ulong in_RAX; int *piVar3; int1 auVar4 [16]; auVar1._8_8_ = param_3; auVar1._0_8_ = param_2; if ((int)param_3 != 6) { auVar4 = js_create_from_ctor(param_1,0,3,0x17); if (auVar4._8_4_ != 6) { piVar3 = (int *)js_get_array_buffer(param_1,param_2,param_3); iVar2 = typed_array_init(param_1,auVar4._0_8_,param_2,param_3,0,(long)*piVar3, in_RAX & 0xffffffff00000000); auVar1 = auVar4; if (iVar2 == 0) { return auVar4; } } JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_); } return ZEXT816(6) << 0x40; }
10,142
uf_space_prespace
eloqsql/storage/maria/ma_packrec.c
static void uf_space_prespace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } }
O0
c
uf_space_prespace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x496f7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4971b jmp 0x49739 movq -0x10(%rbp), %rdi callq 0x487c0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x49739 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2b0 jmp 0x497f1 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x4977c movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x27ec5c(%rip), %rcx # 0x2c83d0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x4978f movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x47f70 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x497b1 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x497f1 movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2b0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x497ef movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0x48b00 jmp 0x497f1 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
uf_space_prespace: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_496F7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4971B jmp short loc_49739 loc_496F7: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_49739 loc_4971B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_497F1 loc_49739: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_4977C mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_4978F loc_4977C: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_4978F: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_497B1 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_497F1 loc_497B1: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_497EF mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes loc_497EF: jmp short $+2 loc_497F1: add rsp, 30h pop rbp retn
long long uf_space_prespace(long long a1, int *a2, long long a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax unsigned int v7; // eax int v8; // ecx unsigned int bits; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 32LL, &a4[-a3]); } fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 32LL, &a4[-a3]); LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v7 = *a2; v8 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v8; bits = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v8); } if ( (unsigned long long)bits + a3 <= (unsigned long long)a4 ) { memset(a3, 32LL, bits); result = bits + a3; if ( (_BYTE *)result != a4 ) return decode_bytes(a1, (long long)a2, (_BYTE *)(bits + a3), a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_prespace: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001496f7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014971b JMP 0x00149739 LAB_001496f7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001487c0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x00149739 LAB_0014971b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2b0 JMP 0x001497f1 LAB_00149739: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x0014977c MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3c83d0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0014978f LAB_0014977c: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x00147f70 MOV dword ptr [RBP + -0x28],EAX LAB_0014978f: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001497b1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001497f1 LAB_001497b1: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2b0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001497ef MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x00148b00 LAB_001497ef: JMP 0x001497f1 LAB_001497f1: ADD RSP,0x30 POP RBP RET
void uf_space_prespace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
10,143
js_object_list_find
bluesky950520[P]quickjs/quickjs.c
static int js_object_list_find(JSContext *ctx, JSObjectList *s, JSObject *obj) { JSObjectListEntry *e; uint32_t h, p; /* must test empty size because there is no hash table */ if (s->object_count == 0) return -1; h = js_object_list_get_hash(obj, s->hash_size); p = s->hash_table[h]; while (p != -1) { e = &s->object_tab[p]; if (e->obj == obj) return p; p = e->hash_next; } return -1; }
O0
c
js_object_list_find: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq 0x20(%rsp), %rax cmpl $0x0, 0x8(%rax) jne 0x786a8 movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x78720 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl 0x18(%rax), %esi callq 0x79e70 movl %eax, 0xc(%rsp) movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movl 0xc(%rsp), %ecx movl (%rax,%rcx,4), %eax movl %eax, 0x8(%rsp) cmpl $-0x1, 0x8(%rsp) je 0x78718 movq 0x20(%rsp), %rax movq (%rax), %rax movl 0x8(%rsp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq (%rax), %rax cmpq 0x18(%rsp), %rax jne 0x7870a movl 0x8(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0x78720 movq 0x10(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x8(%rsp) jmp 0x786d2 movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
js_object_list_find: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov rax, [rsp+38h+var_18] cmp dword ptr [rax+8], 0 jnz short loc_786A8 mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_78720 loc_786A8: mov rdi, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov esi, [rax+18h] call js_object_list_get_hash mov [rsp+38h+var_2C], eax mov rax, [rsp+38h+var_18] mov rax, [rax+10h] mov ecx, [rsp+38h+var_2C] mov eax, [rax+rcx*4] mov [rsp+38h+var_30], eax loc_786D2: cmp [rsp+38h+var_30], 0FFFFFFFFh jz short loc_78718 mov rax, [rsp+38h+var_18] mov rax, [rax] mov ecx, [rsp+38h+var_30] shl rcx, 4 add rax, rcx mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_28] mov rax, [rax] cmp rax, [rsp+38h+var_20] jnz short loc_7870A mov eax, [rsp+38h+var_30] mov [rsp+38h+var_4], eax jmp short loc_78720 loc_7870A: mov rax, [rsp+38h+var_28] mov eax, [rax+8] mov [rsp+38h+var_30], eax jmp short loc_786D2 loc_78718: mov [rsp+38h+var_4], 0FFFFFFFFh loc_78720: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long js_object_list_find(long long a1, long long a2, long long a3) { unsigned int i; // [rsp+8h] [rbp-30h] long long v5; // [rsp+10h] [rbp-28h] if ( *(_DWORD *)(a2 + 8) ) { for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 16) + 4LL * (unsigned int)js_object_list_get_hash(a3, *(unsigned int *)(a2 + 24))); i != -1; i = *(_DWORD *)(v5 + 8) ) { v5 = 16LL * i + *(_QWORD *)a2; if ( *(_QWORD *)v5 == a3 ) return i; } return (unsigned int)-1; } else { return (unsigned int)-1; } }
js_object_list_find: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x001786a8 MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x00178720 LAB_001786a8: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RAX + 0x18] CALL 0x00179e70 MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x8],EAX LAB_001786d2: CMP dword ptr [RSP + 0x8],-0x1 JZ 0x00178718 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0x8] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x0017870a MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x34],EAX JMP 0x00178720 LAB_0017870a: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x8],EAX JMP 0x001786d2 LAB_00178718: MOV dword ptr [RSP + 0x34],0xffffffff LAB_00178720: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
uint js_object_list_find(int8 param_1,long *param_2,long param_3) { uint uVar1; long *plVar2; uint local_30; if ((int)param_2[1] != 0) { uVar1 = js_object_list_get_hash(param_3,(int)param_2[3]); local_30 = *(uint *)(param_2[2] + (ulong)uVar1 * 4); while (local_30 != 0xffffffff) { plVar2 = (long *)(*param_2 + (ulong)local_30 * 0x10); if (*plVar2 == param_3) { return local_30; } local_30 = *(uint *)(plVar2 + 1); } } return 0xffffffff; }
10,144
ggml_sub_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_sub_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, bool inplace) { GGML_ASSERT(ggml_can_repeat(b, a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); result->op = GGML_OP_SUB; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_sub_impl: subq $0x38, %rsp movb %cl, %al movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) andb $0x1, %al movb %al, 0x1f(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x44e70 testb $0x1, %al jne 0x4b3ef leaq 0x691e2(%rip), %rdi # 0xb45b7 movl $0x7d7, %esi # imm = 0x7D7 leaq 0x69221(%rip), %rdx # 0xb4602 leaq 0x69399(%rip), %rcx # 0xb4781 movb $0x0, %al callq 0x46780 testb $0x1, 0x1f(%rsp) je 0x4b40c movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x408f0 movq %rax, 0x8(%rsp) jmp 0x4b420 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x43c20 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movl $0x5, 0x50(%rax) movq 0x28(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x20(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xa0(%rax) movq 0x10(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
ggml_sub_impl: sub rsp, 38h mov al, cl mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx and al, 1 mov [rsp+38h+var_19], al mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_10] call _ggml_can_repeat test al, 1 jnz short loc_4B3EF lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 7D7h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)" mov al, 0 call _ggml_abort loc_4B3EF: test [rsp+38h+var_19], 1 jz short loc_4B40C mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call _ggml_view_tensor mov [rsp+38h+var_30], rax jmp short loc_4B420 loc_4B40C: mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call _ggml_dup_tensor mov [rsp+38h+var_30], rax loc_4B420: mov rax, [rsp+38h+var_30] mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_28] mov dword ptr [rax+50h], 5 mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_28] mov [rax+98h], rcx mov rcx, [rsp+38h+var_18] mov rax, [rsp+38h+var_28] mov [rax+0A0h], rcx mov rax, [rsp+38h+var_28] add rsp, 38h retn
long long ggml_sub_impl( long long a1, long long *a2, _QWORD *a3, char a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { double v12; // xmm4_8 double v13; // xmm5_8 long long v15; // [rsp+8h] [rbp-30h] char v16; // [rsp+1Fh] [rbp-19h] v16 = a4 & 1; if ( !ggml_can_repeat(a3, a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 2007, (long long)"GGML_ASSERT(%s) failed", "ggml_can_repeat(b, a)"); if ( (v16 & 1) != 0 ) v15 = (long long)ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v12, v13, a11, a12); else v15 = ggml_dup_tensor(a1, (unsigned int *)a2); *(_DWORD *)(v15 + 80) = 5; *(_QWORD *)(v15 + 152) = a2; *(_QWORD *)(v15 + 160) = a3; return v15; }
ggml_sub_impl: SUB RSP,0x38 MOV AL,CL MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX AND AL,0x1 MOV byte ptr [RSP + 0x1f],AL MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00144e70 TEST AL,0x1 JNZ 0x0014b3ef LEA RDI,[0x1b45b7] MOV ESI,0x7d7 LEA RDX,[0x1b4602] LEA RCX,[0x1b4781] MOV AL,0x0 CALL 0x00146780 LAB_0014b3ef: TEST byte ptr [RSP + 0x1f],0x1 JZ 0x0014b40c MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001408f0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0014b420 LAB_0014b40c: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00143c20 MOV qword ptr [RSP + 0x8],RAX LAB_0014b420: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x50],0x5 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x38 RET
long ggml_sub_impl(int8 param_1,int8 param_2,int8 param_3,byte param_4) { ulong uVar1; long local_30; uVar1 = ggml_can_repeat(param_3,param_2); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x7d7, "GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)"); } if ((param_4 & 1) == 0) { local_30 = ggml_dup_tensor(param_1,param_2); } else { local_30 = ggml_view_tensor(param_1,param_2); } *(int4 *)(local_30 + 0x50) = 5; *(int8 *)(local_30 + 0x98) = param_2; *(int8 *)(local_30 + 0xa0) = param_3; return local_30; }
10,145
ggml_sub_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_sub_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, bool inplace) { GGML_ASSERT(ggml_can_repeat(b, a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); result->op = GGML_OP_SUB; result->src[0] = a; result->src[1] = b; return result; }
O1
c
ggml_sub_impl: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rdx, %rdi callq 0x17570 testb %al, %al je 0x1a7cb testb %bpl, %bpl je 0x1a791 movq %r15, %rdi movq %r14, %rsi callq 0x16260 jmp 0x1a7ab movl (%r14), %esi leaq 0x10(%r14), %rcx movq %r15, %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19cd9 movl $0x5, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x2fe3d(%rip), %rdi # 0x4a60f leaq 0x2fe81(%rip), %rdx # 0x4a65a leaq 0x2fff9(%rip), %rcx # 0x4a7d9 movl $0x7d7, %esi # imm = 0x7D7 xorl %eax, %eax callq 0x17c70
ggml_sub_impl: push rbp push r15 push r14 push rbx push rax mov ebp, ecx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rdx call _ggml_can_repeat test al, al jz short loc_1A7CB test bpl, bpl jz short loc_1A791 mov rdi, r15 mov rsi, r14 call _ggml_view_tensor jmp short loc_1A7AB loc_1A791: mov esi, [r14] lea rcx, [r14+10h] mov rdi, r15 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1A7AB: mov dword ptr [rax+50h], 5 mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_1A7CB: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)" mov esi, 7D7h xor eax, eax call _ggml_abort
long long ggml_sub_impl(long long a1, long long *a2, _QWORD *a3, char a4) { int v6; // r8d int v7; // r9d long long result; // rax if ( !ggml_can_repeat(a3, a2) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 2007, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"ggml_can_repeat(b, a)", v6, v7); if ( a4 ) result = ggml_view_tensor(a1, (long long)a2); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, a2 + 2, 0LL, 0LL); *(_DWORD *)(result + 80) = 5; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_sub_impl: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RDX CALL 0x00117570 TEST AL,AL JZ 0x0011a7cb TEST BPL,BPL JZ 0x0011a791 MOV RDI,R15 MOV RSI,R14 CALL 0x00116260 JMP 0x0011a7ab LAB_0011a791: MOV ESI,dword ptr [R14] LEA RCX,[R14 + 0x10] MOV RDI,R15 MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119cd9 LAB_0011a7ab: MOV dword ptr [RAX + 0x50],0x5 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0011a7cb: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14a7d9] MOV ESI,0x7d7 XOR EAX,EAX CALL 0x00117c70
void ggml_sub_impl(int8 param_1,int4 *param_2,int8 param_3,char param_4) { char cVar1; long lVar2; cVar1 = ggml_can_repeat(param_3); if (cVar1 != '\0') { if (param_4 == '\0') { lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0); } else { lVar2 = ggml_view_tensor(param_1,param_2); } *(int4 *)(lVar2 + 0x50) = 5; *(int4 **)(lVar2 + 0x98) = param_2; *(int8 *)(lVar2 + 0xa0) = param_3; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x7d7, "GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)"); }
10,146
PFS_table_share::aggregate_io()
eloqsql/storage/perfschema/pfs_instr_class.cc
void PFS_table_share::aggregate_io(void) { uint index; uint safe_key_count= sanitize_index_count(m_key_count); PFS_table_share_index *from_stat; PFS_table_io_stat sum_io; /* Aggregate stats for each index, if any */ for (index= 0; index < safe_key_count; index++) { from_stat= find_index_stat(index); if (from_stat != NULL) { sum_io.aggregate(& from_stat->m_stat); from_stat->m_stat.reset(); } } /* Aggregate stats for the table */ from_stat= find_index_stat(MAX_INDEXES); if (from_stat != NULL) { sum_io.aggregate(& from_stat->m_stat); from_stat->m_stat.reset(); } /* Add this table stats to the global sink. */ global_table_io_stat.aggregate(& sum_io); }
O0
cpp
PFS_table_share::aggregate_io(): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xa8(%rbp) movl 0x1ac(%rax), %edi callq 0x49650 movl %eax, -0x10(%rbp) leaq -0xa0(%rbp), %rdi callq 0x50020 movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax cmpl -0x10(%rbp), %eax jae 0x4fab1 movq -0xa8(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x4d4b0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x4faa4 movq -0x18(%rbp), %rsi addq $0xc8, %rsi leaq -0xa0(%rbp), %rdi callq 0x49680 movq -0x18(%rbp), %rdi addq $0xc8, %rdi callq 0x50f30 jmp 0x4faa6 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x4fa5b movq -0xa8(%rbp), %rdi movl $0x40, %esi callq 0x4d4b0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x4faf4 movq -0x18(%rbp), %rsi addq $0xc8, %rsi leaq -0xa0(%rbp), %rdi callq 0x49680 movq -0x18(%rbp), %rdi addq $0xc8, %rdi callq 0x50f30 leaq 0x3bc585(%rip), %rdi # 0x40c080 leaq -0xa0(%rbp), %rsi callq 0x49680 addq $0xb0, %rsp popq %rbp retq
_ZN15PFS_table_share12aggregate_ioEv: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_A8], rax mov edi, [rax+1ACh]; unsigned int call _Z20sanitize_index_countj; sanitize_index_count(uint) mov [rbp+var_10], eax lea rdi, [rbp+var_A0]; this call _ZN17PFS_table_io_statC2Ev; PFS_table_io_stat::PFS_table_io_stat(void) mov [rbp+var_C], 0 loc_4FA5B: mov eax, [rbp+var_C] cmp eax, [rbp+var_10] jnb short loc_4FAB1 mov rdi, [rbp+var_A8]; this mov esi, [rbp+var_C]; unsigned int call _ZNK15PFS_table_share15find_index_statEj; PFS_table_share::find_index_stat(uint) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_4FAA4 mov rsi, [rbp+var_18] add rsi, 0C8h; PFS_table_io_stat * lea rdi, [rbp+var_A0]; this call _ZN17PFS_table_io_stat9aggregateEPKS_; PFS_table_io_stat::aggregate(PFS_table_io_stat const*) mov rdi, [rbp+var_18] add rdi, 0C8h; this call _ZN17PFS_table_io_stat5resetEv; PFS_table_io_stat::reset(void) loc_4FAA4: jmp short $+2 loc_4FAA6: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_4FA5B loc_4FAB1: mov rdi, [rbp+var_A8]; this mov esi, 40h ; '@'; unsigned int call _ZNK15PFS_table_share15find_index_statEj; PFS_table_share::find_index_stat(uint) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_4FAF4 mov rsi, [rbp+var_18] add rsi, 0C8h; PFS_table_io_stat * lea rdi, [rbp+var_A0]; this call _ZN17PFS_table_io_stat9aggregateEPKS_; PFS_table_io_stat::aggregate(PFS_table_io_stat const*) mov rdi, [rbp+var_18] add rdi, 0C8h; this call _ZN17PFS_table_io_stat5resetEv; PFS_table_io_stat::reset(void) loc_4FAF4: lea rdi, global_table_io_stat; this lea rsi, [rbp+var_A0]; PFS_table_io_stat * call _ZN17PFS_table_io_stat9aggregateEPKS_; PFS_table_io_stat::aggregate(PFS_table_io_stat const*) add rsp, 0B0h pop rbp retn
const PFS_table_io_stat * PFS_table_share::aggregate_io(PFS_table_share *this) { _BYTE v2[136]; // [rsp+10h] [rbp-A0h] BYREF long long index_stat; // [rsp+98h] [rbp-18h] unsigned int v4; // [rsp+A0h] [rbp-10h] unsigned int i; // [rsp+A4h] [rbp-Ch] PFS_table_share *v6; // [rsp+A8h] [rbp-8h] v6 = this; v4 = sanitize_index_count(*((_DWORD *)this + 107)); PFS_table_io_stat::PFS_table_io_stat((PFS_table_io_stat *)v2); for ( i = 0; i < v4; ++i ) { index_stat = PFS_table_share::find_index_stat(this, i); if ( index_stat ) { PFS_table_io_stat::aggregate((PFS_table_io_stat *)v2, (const PFS_table_io_stat *)(index_stat + 200)); PFS_table_io_stat::reset((PFS_table_io_stat *)(index_stat + 200)); } } index_stat = PFS_table_share::find_index_stat(this, 0x40u); if ( index_stat ) { PFS_table_io_stat::aggregate((PFS_table_io_stat *)v2, (const PFS_table_io_stat *)(index_stat + 200)); PFS_table_io_stat::reset((PFS_table_io_stat *)(index_stat + 200)); } return PFS_table_io_stat::aggregate((PFS_table_io_stat *)&global_table_io_stat, (const PFS_table_io_stat *)v2); }
aggregate_io: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xa8],RAX MOV EDI,dword ptr [RAX + 0x1ac] CALL 0x00149650 MOV dword ptr [RBP + -0x10],EAX LEA RDI,[RBP + -0xa0] CALL 0x00150020 MOV dword ptr [RBP + -0xc],0x0 LAB_0014fa5b: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x10] JNC 0x0014fab1 MOV RDI,qword ptr [RBP + -0xa8] MOV ESI,dword ptr [RBP + -0xc] CALL 0x0014d4b0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0014faa4 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0xc8 LEA RDI,[RBP + -0xa0] CALL 0x00149680 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0xc8 CALL 0x00150f30 LAB_0014faa4: JMP 0x0014faa6 LAB_0014faa6: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0014fa5b LAB_0014fab1: MOV RDI,qword ptr [RBP + -0xa8] MOV ESI,0x40 CALL 0x0014d4b0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0014faf4 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0xc8 LEA RDI,[RBP + -0xa0] CALL 0x00149680 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0xc8 CALL 0x00150f30 LAB_0014faf4: LEA RDI,[0x50c080] LEA RSI,[RBP + -0xa0] CALL 0x00149680 ADD RSP,0xb0 POP RBP RET
/* PFS_table_share::aggregate_io() */ void __thiscall PFS_table_share::aggregate_io(PFS_table_share *this) { PFS_table_io_stat local_a8 [136]; long local_20; uint local_18; uint local_14; PFS_table_share *local_10; local_10 = this; local_18 = sanitize_index_count(*(uint *)(this + 0x1ac)); PFS_table_io_stat::PFS_table_io_stat(local_a8); for (local_14 = 0; local_14 < local_18; local_14 = local_14 + 1) { local_20 = find_index_stat(this,local_14); if (local_20 != 0) { PFS_table_io_stat::aggregate(local_a8,(PFS_table_io_stat *)(local_20 + 200)); PFS_table_io_stat::reset((PFS_table_io_stat *)(local_20 + 200)); } } local_20 = find_index_stat(this,0x40); if (local_20 != 0) { PFS_table_io_stat::aggregate(local_a8,(PFS_table_io_stat *)(local_20 + 200)); PFS_table_io_stat::reset((PFS_table_io_stat *)(local_20 + 200)); } PFS_table_io_stat::aggregate((PFS_table_io_stat *)global_table_io_stat,local_a8); return; }
10,147
JS_ToIntegerFree
bluesky950520[P]quickjs/quickjs.c
static __maybe_unused JSValue JS_ToIntegerFree(JSContext *ctx, JSValue val) { uint32_t tag; JSValue ret; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = js_int32(JS_VALUE_GET_INT(val)); break; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { ret = js_int32(0); } else { /* convert -0 to +0 */ d = trunc(d) + 0.0; ret = js_number(d); } } break; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) return val; goto redo; } return ret; }
O3
c
JS_ToIntegerFree: pushq %rbx movq %rsi, %rax movq %rdi, %rbx cmpl $0x4, %edx jb 0x74dff cmpl $0x7, %edx je 0x74e05 movq %rbx, %rdi movq %rax, %rsi xorl %ecx, %ecx callq 0x43a59 cmpl $0x6, %edx jne 0x74de1 jmp 0x74e03 movl %eax, %eax xorl %edx, %edx popq %rbx retq movq %rax, %xmm0 ucomisd %xmm0, %xmm0 jp 0x74e7d callq 0xe140 xorpd %xmm1, %xmm1 addsd %xmm0, %xmm1 movq %xmm1, %rax movq %rax, %rcx shrq $0x34, %rcx andl $0x7ff, %ecx # imm = 0x7FF addq $-0x3ff, %rcx # imm = 0xFC01 cmpq $0x1f, %rcx jb 0x74e56 testq %rax, %rax sete %dl movabsq $-0x3e20000000000000, %rcx # imm = 0xC1E0000000000000 cmpq %rcx, %rax sete %cl orb %dl, %cl jmp 0x74e66 movq %rax, %rdx shlq $0xc, %rdx shlq %cl, %rdx testq %rdx, %rdx sete %cl cvttsd2si %xmm1, %edx xorl %esi, %esi testb %cl, %cl cmovneq %rdx, %rax movl $0x7, %edx cmovneq %rsi, %rdx jmp 0x74e03 xorl %eax, %eax jmp 0x74e01
JS_ToIntegerFree: push rbx mov rax, rsi mov rbx, rdi loc_74DE1: cmp edx, 4 jb short loc_74DFF cmp edx, 7 jz short loc_74E05 mov rdi, rbx mov rsi, rax xor ecx, ecx call JS_ToNumberHintFree cmp edx, 6 jnz short loc_74DE1 jmp short loc_74E03 loc_74DFF: mov eax, eax loc_74E01: xor edx, edx loc_74E03: pop rbx retn loc_74E05: movq xmm0, rax ucomisd xmm0, xmm0 jp short loc_74E7D call _trunc xorpd xmm1, xmm1 addsd xmm1, xmm0 movq rax, xmm1 mov rcx, rax shr rcx, 34h and ecx, 7FFh add rcx, 0FFFFFFFFFFFFFC01h cmp rcx, 1Fh jb short loc_74E56 test rax, rax setz dl mov rcx, 0C1E0000000000000h cmp rax, rcx setz cl or cl, dl jmp short loc_74E66 loc_74E56: mov rdx, rax shl rdx, 0Ch shl rdx, cl test rdx, rdx setz cl loc_74E66: cvttsd2si edx, xmm1 xor esi, esi test cl, cl cmovnz rax, rdx mov edx, 7 cmovnz rdx, rsi jmp short loc_74E03 loc_74E7D: xor eax, eax jmp short loc_74E01
int * JS_ToIntegerFree( long long a1, int *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) { int *result; // rax long long v15; // rbx double v16; // xmm0_8 bool v17; // cl result = a2; v15 = a1; while ( 1 ) { if ( (unsigned int)a3 < 4 ) return (int *)(unsigned int)result; if ( (_DWORD)a3 == 7 ) break; a1 = v15; a2 = result; *(double *)&result = COERCE_DOUBLE(JS_ToNumberHintFree(v15, result, a3, 0, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11)); if ( (_DWORD)a3 == 6 ) return result; } v16 = trunc(a1, a2, a3); *(double *)&result = v16 + 0.0; if ( ((COERCE_UNSIGNED_INT64(v16 + 0.0) >> 52) & 0x7FF) - 1023 < 0x1F ) v17 = (_QWORD)result << 12 << ((unsigned __int8)(COERCE_UNSIGNED_INT64(v16 + 0.0) >> 52) + 1) == 0LL; else v17 = result == 0LL || result == (int *)0xC1E0000000000000LL; if ( v17 ) return (int *)(unsigned int)(int)(v16 + 0.0); return result; }
JS_ToIntegerFree: PUSH RBX MOV RAX,RSI MOV RBX,RDI LAB_00174de1: CMP EDX,0x4 JC 0x00174dff CMP EDX,0x7 JZ 0x00174e05 MOV RDI,RBX MOV RSI,RAX XOR ECX,ECX CALL 0x00143a59 CMP EDX,0x6 JNZ 0x00174de1 JMP 0x00174e03 LAB_00174dff: MOV EAX,EAX LAB_00174e01: XOR EDX,EDX LAB_00174e03: POP RBX RET LAB_00174e05: MOVQ XMM0,RAX UCOMISD XMM0,XMM0 JP 0x00174e7d CALL 0x0010e140 XORPD XMM1,XMM1 ADDSD XMM1,XMM0 MOVQ RAX,XMM1 MOV RCX,RAX SHR RCX,0x34 AND ECX,0x7ff ADD RCX,-0x3ff CMP RCX,0x1f JC 0x00174e56 TEST RAX,RAX SETZ DL MOV RCX,-0x3e20000000000000 CMP RAX,RCX SETZ CL OR CL,DL JMP 0x00174e66 LAB_00174e56: MOV RDX,RAX SHL RDX,0xc SHL RDX,CL TEST RDX,RDX SETZ CL LAB_00174e66: CVTTSD2SI EDX,XMM1 XOR ESI,ESI TEST CL,CL CMOVNZ RAX,RDX MOV EDX,0x7 CMOVNZ RDX,RSI JMP 0x00174e03 LAB_00174e7d: XOR EAX,EAX JMP 0x00174e01
double JS_ToIntegerFree(int8 param_1,int8 param_2,int8 param_3) { bool bVar1; ulong uVar2; int8 extraout_RDX; long lVar3; double dVar4; int1 auVar5 [16]; auVar5._8_8_ = param_3; auVar5._0_8_ = param_2; while( true ) { dVar4 = auVar5._0_8_; if (auVar5._8_4_ < 4) { return (double)((ulong)dVar4 & 0xffffffff); } if (auVar5._8_4_ == 7) break; auVar5 = JS_ToNumberHintFree(param_1,dVar4,auVar5._8_8_,0); if (auVar5._8_4_ == 6) { return auVar5._0_8_; } } if (NAN(dVar4)) { return 0.0; } dVar4 = trunc(dVar4); dVar4 = dVar4 + 0.0; uVar2 = (ulong)((uint)((ulong)dVar4 >> 0x34) & 0x7ff) - 0x3ff; if (uVar2 < 0x1f) { lVar3 = ((long)dVar4 << 0xc) << ((byte)uVar2 & 0x3f); bVar1 = lVar3 == 0; } else { lVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),dVar4 == 0.0); bVar1 = dVar4 == -2147483648.0 || dVar4 == 0.0; } if (!bVar1) { return dVar4; } return (double)CONCAT44((int)((ulong)lVar3 >> 0x20),(int)dVar4); }
10,148
minja::Parser::parseMathPow()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O1
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x6dbb0 cmpq $0x0, (%rbx) je 0x6db02 leaq 0x30(%rsp), %rbp leaq 0x20(%rsp), %r13 leaq 0x8017e(%rip), %rax # 0xedaf8 addq $0x10, %rax movq %rax, 0x40(%rsp) movq %rbp, 0x20(%rsp) movq %r13, %rdi leaq 0x50727(%rip), %rsi # 0xbe0b9 leaq 0x50722(%rip), %rdx # 0xbe0bb callq 0x32ea4 movq %rsp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x6a26e movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x6d9d1 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x6d9e8 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 testq %r15, %r15 je 0x6dabc movq %r13, %rdi movq %r14, %rsi callq 0x6dbb0 cmpq $0x0, 0x20(%rsp) je 0x6dace movq (%r14), %rax movq %rax, (%rsp) movq 0x8(%r14), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x6da32 movq 0x8156c(%rip), %rcx # 0xeef90 cmpb $0x0, (%rcx) je 0x6da2e incl 0x8(%rax) jmp 0x6da32 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movl $0x58, %edi callq 0x196a0 movq %rax, %r15 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r15) movq 0x40(%rsp), %rax movq %rax, (%r15) movq %r15, %r12 addq $0x10, %r12 movq %r12, %rdi movq %rsp, %rsi movq %rbx, %rdx movq %r13, %rcx movl $0x4, %r8d callq 0x7af6a movq %r12, (%rbx) movq 0x8(%rbx), %rdi movq %r15, 0x8(%rbx) testq %rdi, %rdi je 0x6da95 callq 0x42d00 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6daa4 callq 0x42d00 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6d983 callq 0x42d00 jmp 0x6d983 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x505da(%rip), %rsi # 0xbe0bc movq %rax, %rdi callq 0x19270 movq 0x814f7(%rip), %rsi # 0xeefe8 movq 0x81470(%rip), %rdx # 0xeef68 movq %r15, %rdi callq 0x19b70 jmp 0x6db34 movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x50577(%rip), %rsi # 0xbe08d movq %rax, %rdi callq 0x19270 movq 0x814c3(%rip), %rsi # 0xeefe8 movq 0x8143c(%rip), %rdx # 0xeef68 movq %r15, %rdi callq 0x19b70 jmp 0x6db7a movq %rax, %r14 movq %r15, %rdi callq 0x19510 jmp 0x6db99 movq %rax, %r14 jmp 0x6db69 movq %rax, %r14 movq %r15, %rdi callq 0x19510 jmp 0x6db69 jmp 0x6db7a movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6db69 callq 0x42d00 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6db99 callq 0x42d00 jmp 0x6db99 movq %rax, %r14 jmp 0x6db99 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x6db99 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6dba7 callq 0x42d00 movq %r14, %rdi callq 0x19be0 nop
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_6DB02 lea rbp, [rsp+78h+var_48] lea r13, [rsp+78h+var_58] lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [rsp+78h+var_38], rax loc_6D983: mov [rsp+78h+var_58], rbp mov rdi, r13 lea rsi, asc_BE0B9; "**" lea rdx, asc_BE0B9+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+78h+var_78]; void * mov r15, [rsp+78h+var_70] lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_6D9D1 mov rsi, [rsp+78h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6D9D1: mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_6D9E8 mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6D9E8: test r15, r15 jz loc_6DABC mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+78h+var_58], 0 jz loc_6DACE mov rax, [r14] mov [rsp+78h+var_78], rax mov rax, [r14+8] mov [rsp+78h+var_70], rax test rax, rax jz short loc_6DA32 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_6DA2E inc dword ptr [rax+8] jmp short loc_6DA32 loc_6DA2E: lock inc dword ptr [rax+8] loc_6DA32: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_68], rax mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rax, 100000001h mov [r15+8], rax mov rax, [rsp+78h+var_38] mov [r15], rax mov r12, r15 add r12, 10h mov rdi, r12 mov rsi, rsp mov rdx, rbx mov rcx, r13 mov r8d, 4 call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r12 mov rdi, [rbx+8] mov [rbx+8], r15 test rdi, rdi jz short loc_6DA95 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DA95: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_6DAA4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DAA4: mov rdi, [rsp+78h+var_50] test rdi, rdi jz loc_6D983 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_6D983 loc_6DABC: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6DACE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_6DB34 loc_6DB02: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_6DB34: jmp short loc_6DB7A mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6DB99 mov r14, rax jmp short loc_6DB69 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6DB69 jmp short loc_6DB7A mov r14, rax mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_6DB69 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DB69: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_6DB99 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_6DB99 loc_6DB7A: mov r14, rax jmp short loc_6DB99 mov r14, rax mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_6DB99 mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6DB99: mov rdi, [rbx+8] test rdi, rdi jz short loc_6DBA7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DBA7: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2) { volatile signed __int32 *v3; // r15 volatile signed __int32 *v4; // rax long long **v5; // r15 volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-78h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-70h] long long v12; // [rsp+10h] [rbp-68h] BYREF void *v13; // [rsp+20h] [rbp-58h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] _QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF long long *v16; // [rsp+40h] [rbp-38h] minja::Parser::parseMathPlusMinus((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; while ( 1 ) { v13 = v15; std::string::_M_construct<char const*>(&v13, "**", (long long)""); minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u); v3 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13 != v15 ) operator delete(v13, v15[0] + 1LL); if ( !v3 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v13); if ( !v13 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v10 = *(void **)a2; v4 = *(volatile signed __int32 **)(a2 + 8); v11 = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v4 + 2); else _InterlockedIncrement(v4 + 2); } v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v5 = (long long **)operator new(0x58uLL); v5[1] = (long long *)0x100000001LL; *v5 = v16; minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL); *this = (volatile signed __int32 *)(v5 + 2); v6 = this[1]; this[1] = (volatile signed __int32 *)v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); } return (minja::Parser *)this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI CALL 0x0016dbb0 CMP qword ptr [RBX],0x0 JZ 0x0016db02 LEA RBP,[RSP + 0x30] LEA R13,[RSP + 0x20] LEA RAX,[0x1edaf8] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX LAB_0016d983: MOV qword ptr [RSP + 0x20],RBP LAB_0016d988: MOV RDI,R13 LEA RSI,[0x1be0b9] LEA RDX,[0x1be0bb] CALL 0x00132ea4 LAB_0016d99e: MOV RDI,RSP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x0016a26e MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0016d9d1 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001196b0 LAB_0016d9d1: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,RBP JZ 0x0016d9e8 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001196b0 LAB_0016d9e8: TEST R15,R15 JZ 0x0016dabc LAB_0016d9f1: MOV RDI,R13 MOV RSI,R14 CALL 0x0016dbb0 CMP qword ptr [RSP + 0x20],0x0 JZ 0x0016dace MOV RAX,qword ptr [R14] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0016da32 MOV RCX,qword ptr [0x001eef90] CMP byte ptr [RCX],0x0 JZ 0x0016da2e INC dword ptr [RAX + 0x8] JMP 0x0016da32 LAB_0016da2e: INC.LOCK dword ptr [RAX + 0x8] LAB_0016da32: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_0016da3f: MOV EDI,0x58 CALL 0x001196a0 LAB_0016da49: MOV R15,RAX MOV RAX,0x100000001 MOV qword ptr [R15 + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [R15],RAX MOV R12,R15 ADD R12,0x10 MOV RDI,R12 MOV RSI,RSP MOV RDX,RBX MOV RCX,R13 MOV R8D,0x4 CALL 0x0017af6a MOV qword ptr [RBX],R12 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],R15 TEST RDI,RDI JZ 0x0016da95 CALL 0x00142d00 LAB_0016da95: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0016daa4 CALL 0x00142d00 LAB_0016daa4: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0016d983 CALL 0x00142d00 JMP 0x0016d983 LAB_0016dabc: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016dace: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_0016dadb: LEA RSI,[0x1be0bc] MOV RDI,RAX CALL 0x00119270 LAB_0016daea: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R15 CALL 0x00119b70 LAB_0016db02: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_0016db0f: LEA RSI,[0x1be08d] MOV RDI,RAX CALL 0x00119270 LAB_0016db1e: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R15 CALL 0x00119b70
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int8 *puVar2; runtime_error *prVar3; int8 *in_RSI; long *in_RDI; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68 [2]; long *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48 [2]; int **local_38; parseMathPlusMinus(); if (*in_RDI == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016db0f to 0016db1d has its CatchHandler @ 0016db36 */ std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression"); /* try { // try from 0016db1e to 0016db33 has its CatchHandler @ 0016db34 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } local_38 = &PTR___Sp_counted_ptr_inplace_001edb08; while( true ) { local_58 = local_48; /* try { // try from 0016d988 to 0016d99d has its CatchHandler @ 0016db7a */ std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001be0b9,&DAT_001be0bb); /* try { // try from 0016d99e to 0016d9b0 has its CatchHandler @ 0016db7f */ consumeToken(&local_78); p_Var1 = local_70; if (local_78 != local_68) { operator_delete(local_78,local_68[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 0016d9f1 to 0016d9fb has its CatchHandler @ 0016db55 */ parseMathPlusMinus(); if (local_58 == (long *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016dadb to 0016dae9 has its CatchHandler @ 0016db48 */ std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression"); /* try { // try from 0016daea to 0016daff has its CatchHandler @ 0016db43 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } local_78 = (long *)*in_RSI; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; UNLOCK(); } else { *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; } } local_68[0] = in_RSI[4] - in_RSI[2]; /* try { // try from 0016da3f to 0016da48 has its CatchHandler @ 0016db57 */ puVar2 = (int8 *)operator_new(0x58); puVar2[1] = 0x100000001; *puVar2 = local_38; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78); *in_RDI = (long)(puVar2 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar2; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } 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); } } return; }
10,149
minja::Parser::parseMathPow()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O3
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x6beb6 cmpq $0x0, (%rbx) je 0x6be08 leaq 0x30(%rsp), %rbp leaq 0x20(%rsp), %r13 leaq 0x7ee78(%rip), %rax # 0xeaaf8 addq $0x10, %rax movq %rax, 0x40(%rsp) movq %rbp, 0x20(%rsp) movq %r13, %rdi leaq 0x4f411(%rip), %rsi # 0xbb0a9 leaq 0x4f40c(%rip), %rdx # 0xbb0ab callq 0x320e8 movq %rsp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x68586 movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x6bcd7 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x6bcee movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 testq %r15, %r15 je 0x6bdc2 movq %r13, %rdi movq %r14, %rsi callq 0x6beb6 cmpq $0x0, 0x20(%rsp) je 0x6bdd4 movq (%r14), %rax movq %rax, (%rsp) movq 0x8(%r14), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x6bd38 movq 0x80266(%rip), %rcx # 0xebf90 cmpb $0x0, (%rcx) je 0x6bd34 incl 0x8(%rax) jmp 0x6bd38 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movl $0x58, %edi callq 0x196a0 movq %rax, %r15 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r15) movq 0x40(%rsp), %rax movq %rax, (%r15) movq %r15, %r12 addq $0x10, %r12 movq %r12, %rdi movq %rsp, %rsi movq %rbx, %rdx movq %r13, %rcx movl $0x4, %r8d callq 0x79088 movq %r12, (%rbx) movq 0x8(%rbx), %rdi movq %r15, 0x8(%rbx) testq %rdi, %rdi je 0x6bd9b callq 0x4200c movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6bdaa callq 0x4200c movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6bc89 callq 0x4200c jmp 0x6bc89 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x4f2c4(%rip), %rsi # 0xbb0ac movq %rax, %rdi callq 0x19270 movq 0x801f1(%rip), %rsi # 0xebfe8 movq 0x8016a(%rip), %rdx # 0xebf68 movq %r15, %rdi callq 0x19b70 jmp 0x6be3a movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x4f261(%rip), %rsi # 0xbb07d movq %rax, %rdi callq 0x19270 movq 0x801bd(%rip), %rsi # 0xebfe8 movq 0x80136(%rip), %rdx # 0xebf68 movq %r15, %rdi callq 0x19b70 jmp 0x6be80 movq %rax, %r14 movq %r15, %rdi callq 0x19510 jmp 0x6be9f movq %rax, %r14 jmp 0x6be6f movq %rax, %r14 movq %r15, %rdi callq 0x19510 jmp 0x6be6f jmp 0x6be80 movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6be6f callq 0x4200c movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6be9f callq 0x4200c jmp 0x6be9f movq %rax, %r14 jmp 0x6be9f movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x6be9f movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6bead callq 0x4200c movq %r14, %rdi callq 0x19be0 nop
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_6BE08 lea rbp, [rsp+78h+var_48] lea r13, [rsp+78h+var_58] lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [rsp+78h+var_38], rax loc_6BC89: mov [rsp+78h+var_58], rbp mov rdi, r13 lea rsi, asc_BB0A9; "**" lea rdx, asc_BB0A9+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+78h+var_78]; void * mov r15, [rsp+78h+var_70] lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_6BCD7 mov rsi, [rsp+78h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6BCD7: mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_6BCEE mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6BCEE: test r15, r15 jz loc_6BDC2 mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+78h+var_58], 0 jz loc_6BDD4 mov rax, [r14] mov [rsp+78h+var_78], rax mov rax, [r14+8] mov [rsp+78h+var_70], rax test rax, rax jz short loc_6BD38 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_6BD34 inc dword ptr [rax+8] jmp short loc_6BD38 loc_6BD34: lock inc dword ptr [rax+8] loc_6BD38: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_68], rax mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rax, 100000001h mov [r15+8], rax mov rax, [rsp+78h+var_38] mov [r15], rax mov r12, r15 add r12, 10h mov rdi, r12 mov rsi, rsp mov rdx, rbx mov rcx, r13 mov r8d, 4 call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r12 mov rdi, [rbx+8] mov [rbx+8], r15 test rdi, rdi jz short loc_6BD9B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6BD9B: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_6BDAA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6BDAA: mov rdi, [rsp+78h+var_50] test rdi, rdi jz loc_6BC89 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_6BC89 loc_6BDC2: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6BDD4: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_6BE3A loc_6BE08: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_6BE3A: jmp short loc_6BE80 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6BE9F mov r14, rax jmp short loc_6BE6F mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6BE6F jmp short loc_6BE80 mov r14, rax mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_6BE6F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6BE6F: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_6BE9F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_6BE9F loc_6BE80: mov r14, rax jmp short loc_6BE9F mov r14, rax mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_6BE9F mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6BE9F: mov rdi, [rbx+8] test rdi, rdi jz short loc_6BEAD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6BEAD: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2) { volatile signed __int32 *v3; // r15 volatile signed __int32 *v4; // rax long long **v5; // r15 volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-78h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-70h] long long v12; // [rsp+10h] [rbp-68h] BYREF void *v13; // [rsp+20h] [rbp-58h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] _QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF long long *v16; // [rsp+40h] [rbp-38h] minja::Parser::parseMathPlusMinus((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; while ( 1 ) { v13 = v15; std::string::_M_construct<char const*>((long long)&v13, "**", (long long)""); minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u); v3 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13 != v15 ) operator delete(v13, v15[0] + 1LL); if ( !v3 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v13); if ( !v13 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v10 = *(void **)a2; v4 = *(volatile signed __int32 **)(a2 + 8); v11 = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v4 + 2); else _InterlockedIncrement(v4 + 2); } v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v5 = (long long **)operator new(0x58uLL); v5[1] = (long long *)0x100000001LL; *v5 = v16; minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL); *this = (volatile signed __int32 *)(v5 + 2); v6 = this[1]; this[1] = (volatile signed __int32 *)v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); } return (minja::Parser *)this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI CALL 0x0016beb6 CMP qword ptr [RBX],0x0 JZ 0x0016be08 LEA RBP,[RSP + 0x30] LEA R13,[RSP + 0x20] LEA RAX,[0x1eaaf8] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX LAB_0016bc89: MOV qword ptr [RSP + 0x20],RBP LAB_0016bc8e: MOV RDI,R13 LEA RSI,[0x1bb0a9] LEA RDX,[0x1bb0ab] CALL 0x001320e8 LAB_0016bca4: MOV RDI,RSP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x00168586 MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0016bcd7 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001196b0 LAB_0016bcd7: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,RBP JZ 0x0016bcee MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001196b0 LAB_0016bcee: TEST R15,R15 JZ 0x0016bdc2 LAB_0016bcf7: MOV RDI,R13 MOV RSI,R14 CALL 0x0016beb6 CMP qword ptr [RSP + 0x20],0x0 JZ 0x0016bdd4 MOV RAX,qword ptr [R14] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0016bd38 MOV RCX,qword ptr [0x001ebf90] CMP byte ptr [RCX],0x0 JZ 0x0016bd34 INC dword ptr [RAX + 0x8] JMP 0x0016bd38 LAB_0016bd34: INC.LOCK dword ptr [RAX + 0x8] LAB_0016bd38: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_0016bd45: MOV EDI,0x58 CALL 0x001196a0 LAB_0016bd4f: MOV R15,RAX MOV RAX,0x100000001 MOV qword ptr [R15 + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [R15],RAX MOV R12,R15 ADD R12,0x10 MOV RDI,R12 MOV RSI,RSP MOV RDX,RBX MOV RCX,R13 MOV R8D,0x4 CALL 0x00179088 MOV qword ptr [RBX],R12 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],R15 TEST RDI,RDI JZ 0x0016bd9b CALL 0x0014200c LAB_0016bd9b: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0016bdaa CALL 0x0014200c LAB_0016bdaa: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0016bc89 CALL 0x0014200c JMP 0x0016bc89 LAB_0016bdc2: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016bdd4: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_0016bde1: LEA RSI,[0x1bb0ac] MOV RDI,RAX CALL 0x00119270 LAB_0016bdf0: MOV RSI,qword ptr [0x001ebfe8] MOV RDX,qword ptr [0x001ebf68] MOV RDI,R15 CALL 0x00119b70 LAB_0016be08: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_0016be15: LEA RSI,[0x1bb07d] MOV RDI,RAX CALL 0x00119270 LAB_0016be24: MOV RSI,qword ptr [0x001ebfe8] MOV RDX,qword ptr [0x001ebf68] MOV RDI,R15 CALL 0x00119b70
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int8 *puVar2; runtime_error *prVar3; int8 *in_RSI; long *in_RDI; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68 [2]; long *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48 [2]; int **local_38; parseMathPlusMinus(); if (*in_RDI == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016be15 to 0016be23 has its CatchHandler @ 0016be3c */ std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression"); /* try { // try from 0016be24 to 0016be39 has its CatchHandler @ 0016be3a */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ebfe8,PTR__runtime_error_001ebf68); } local_38 = &PTR___Sp_counted_ptr_inplace_001eab08; while( true ) { local_58 = local_48; /* try { // try from 0016bc8e to 0016bca3 has its CatchHandler @ 0016be80 */ std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001bb0a9,&DAT_001bb0ab); /* try { // try from 0016bca4 to 0016bcb6 has its CatchHandler @ 0016be85 */ consumeToken(&local_78); p_Var1 = local_70; if (local_78 != local_68) { operator_delete(local_78,local_68[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 0016bcf7 to 0016bd01 has its CatchHandler @ 0016be5b */ parseMathPlusMinus(); if (local_58 == (long *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016bde1 to 0016bdef has its CatchHandler @ 0016be4e */ std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression"); /* try { // try from 0016bdf0 to 0016be05 has its CatchHandler @ 0016be49 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ebfe8,PTR__runtime_error_001ebf68); } local_78 = (long *)*in_RSI; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001ebf90 == '\0') { LOCK(); *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; UNLOCK(); } else { *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; } } local_68[0] = in_RSI[4] - in_RSI[2]; /* try { // try from 0016bd45 to 0016bd4e has its CatchHandler @ 0016be5d */ puVar2 = (int8 *)operator_new(0x58); puVar2[1] = 0x100000001; *puVar2 = local_38; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78); *in_RDI = (long)(puVar2 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar2; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } 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); } } return; }
10,150
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O0
c
str2int: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x30(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) cmpq $0x0, %rax jle 0x14f291 xorl %eax, %eax subq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) cmpq $0x0, %rax jle 0x14f2a9 xorl %eax, %eax subq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax jge 0x14f2bb movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x14f2bd leaq 0x217c6c(%rip), %rax # 0x366f30 movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x14f2ea movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x14f2bd movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x14f30b movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x14f32c movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x14f32a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x1, -0x34(%rbp) jmp 0x14f32c movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jne 0x14f34e movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x14f334 movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x14f37f movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jg 0x14f37f movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, -0xe4(%rbp) jmp 0x14f3fe movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x41, %eax jl 0x14f3ac movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5a, %eax jg 0x14f3ac movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x41, %eax addl $0xa, %eax movl %eax, -0xe8(%rbp) jmp 0x14f3f2 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x61, %eax jl 0x14f3d9 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7a, %eax jg 0x14f3d9 movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x61, %eax addl $0xa, %eax movl %eax, -0xec(%rbp) jmp 0x14f3e6 movl $0x7f, %eax movl %eax, -0xec(%rbp) jmp 0x14f3e6 movl -0xec(%rbp), %eax movl %eax, -0xe8(%rbp) movl -0xe8(%rbp), %eax movl %eax, -0xe4(%rbp) movl -0xe4(%rbp), %ecx movslq -0x38(%rbp), %rax movl %ecx, -0xe0(%rbp,%rax,4) xorl %eax, %eax cmpl -0x14(%rbp), %ecx movb %al, -0xed(%rbp) jge 0x14f429 cmpl $0x14, -0x38(%rbp) setl %al movb %al, -0xed(%rbp) movb -0xed(%rbp), %al testb $0x1, %al jne 0x14f435 jmp 0x14f451 jmp 0x14f437 movl -0x38(%rbp), %eax addl $0x1, %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x14f355 movq -0x60(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x14f473 callq 0x296d0 movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x14f5c0 movq $0x0, -0x50(%rbp) movq $-0x1, -0x48(%rbp) movl -0x38(%rbp), %eax addl $-0x1, %eax movl %eax, -0x38(%rbp) cmpl $0x1, %eax jl 0x14f4fb movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x14f4c3 callq 0x296d0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x14f5c0 movq -0x40(%rbp), %rax movslq -0x54(%rbp), %rcx addq %rcx, %rax movslq -0x14(%rbp), %rcx cqto idivq %rcx movq %rax, -0x40(%rbp) movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movslq -0x14(%rbp), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x14f483 cmpl $0x0, -0x38(%rbp) jne 0x14f544 movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x14f533 callq 0x296d0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x14f5c0 movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpl $0x0, -0x34(%rbp) jge 0x14f581 movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001 cmpq %rax, -0x50(%rbp) jl 0x14f56a xorl %eax, %eax subq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpq -0x28(%rbp), %rax jle 0x14f57f callq 0x296d0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x14f5c0 jmp 0x14f5a2 movq -0x50(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x14f5a0 callq 0x296d0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x14f5c0 jmp 0x14f5a2 movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) callq 0x296d0 movl $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xf0, %rsp popq %rbp retq nopl (%rax)
str2int: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_30] mov qword ptr [rax], 0 mov rax, [rbp+var_20] mov [rbp+var_40], rax cmp rax, 0 jle short loc_14F291 xor eax, eax sub rax, [rbp+var_40] mov [rbp+var_40], rax loc_14F291: mov rax, [rbp+var_28] mov [rbp+var_48], rax cmp rax, 0 jle short loc_14F2A9 xor eax, eax sub rax, [rbp+var_48] mov [rbp+var_48], rax loc_14F2A9: mov rax, [rbp+var_48] cmp rax, [rbp+var_40] jge short loc_14F2BB mov rax, [rbp+var_48] mov [rbp+var_40], rax loc_14F2BB: jmp short $+2 loc_14F2BD: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_14F2EA mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_14F2BD loc_14F2EA: mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_14F30B mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_14F32C loc_14F30B: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_14F32A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_34], 1 loc_14F32A: jmp short $+2 loc_14F32C: mov rax, [rbp+var_10] mov [rbp+var_60], rax loc_14F334: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jnz short loc_14F34E mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_14F334 loc_14F34E: mov [rbp+var_38], 0 loc_14F355: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_14F37F mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jg short loc_14F37F mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov [rbp+var_E4], eax jmp short loc_14F3FE loc_14F37F: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 41h ; 'A' jl short loc_14F3AC mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ah ; 'Z' jg short loc_14F3AC mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_E8], eax jmp short loc_14F3F2 loc_14F3AC: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 61h ; 'a' jl short loc_14F3D9 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Ah ; 'z' jg short loc_14F3D9 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_EC], eax jmp short loc_14F3E6 loc_14F3D9: mov eax, 7Fh mov [rbp+var_EC], eax jmp short $+2 loc_14F3E6: mov eax, [rbp+var_EC] mov [rbp+var_E8], eax loc_14F3F2: mov eax, [rbp+var_E8] mov [rbp+var_E4], eax loc_14F3FE: mov ecx, [rbp+var_E4] movsxd rax, [rbp+var_38] mov [rbp+rax*4+var_E0], ecx xor eax, eax cmp ecx, [rbp+var_14] mov [rbp+var_ED], al jge short loc_14F429 cmp [rbp+var_38], 14h setl al mov [rbp+var_ED], al loc_14F429: mov al, [rbp+var_ED] test al, 1 jnz short loc_14F435 jmp short loc_14F451 loc_14F435: jmp short $+2 loc_14F437: mov eax, [rbp+var_38] add eax, 1 mov [rbp+var_38], eax mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_14F355 loc_14F451: mov rax, [rbp+var_60] cmp rax, [rbp+var_10] jnz short loc_14F473 call ___errno_location mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp loc_14F5C0 loc_14F473: mov [rbp+var_50], 0 mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh loc_14F483: mov eax, [rbp+var_38] add eax, 0FFFFFFFFh mov [rbp+var_38], eax cmp eax, 1 jl short loc_14F4FB movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_14F4C3 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_14F5C0 loc_14F4C3: mov rax, [rbp+var_40] movsxd rcx, [rbp+var_54] add rax, rcx movsxd rcx, [rbp+var_14] cqo idiv rcx mov [rbp+var_40], rax movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax movsxd rax, [rbp+var_14] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short loc_14F483 loc_14F4FB: cmp [rbp+var_38], 0 jnz short loc_14F544 movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_14F533 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_14F5C0 loc_14F533: movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax loc_14F544: cmp [rbp+var_34], 0 jge short loc_14F581 mov rax, 8000000000000001h cmp [rbp+var_50], rax jl short loc_14F56A xor eax, eax sub rax, [rbp+var_50] mov [rbp+var_50], rax cmp rax, [rbp+var_28] jle short loc_14F57F loc_14F56A: call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_14F5C0 loc_14F57F: jmp short loc_14F5A2 loc_14F581: mov rax, [rbp+var_50] cmp rax, [rbp+var_20] jge short loc_14F5A0 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_14F5C0 loc_14F5A0: jmp short $+2 loc_14F5A2: mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx call ___errno_location mov dword ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_14F5C0: mov rax, [rbp+var_8] add rsp, 0F0h pop rbp retn
_BYTE * str2int(_BYTE *a1, int a2, long long a3, long long a4, long long *a5) { bool v6; // [rsp+3h] [rbp-EDh] int v7; // [rsp+4h] [rbp-ECh] int v8; // [rsp+8h] [rbp-E8h] int v9; // [rsp+Ch] [rbp-E4h] _DWORD v10[32]; // [rsp+10h] [rbp-E0h] _BYTE *v11; // [rsp+90h] [rbp-60h] int v12; // [rsp+9Ch] [rbp-54h] long long v13; // [rsp+A0h] [rbp-50h] long long i; // [rsp+A8h] [rbp-48h] long long v15; // [rsp+B0h] [rbp-40h] int v16; // [rsp+B8h] [rbp-38h] int v17; // [rsp+BCh] [rbp-34h] long long *v18; // [rsp+C0h] [rbp-30h] long long v19; // [rsp+C8h] [rbp-28h] long long v20; // [rsp+D0h] [rbp-20h] int v21; // [rsp+DCh] [rbp-14h] _BYTE *v22; // [rsp+E0h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; *a5 = 0LL; v15 = v20; if ( v20 > 0 ) v15 = -v15; i = v19; if ( v19 > 0 ) i = -i; if ( i < v15 ) v15 = i; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + (unsigned __int8)*v22 + 1LL) & 8) != 0 ) ++v22; v17 = -1; if ( *v22 == 43 ) { ++v22; } else if ( *v22 == 45 ) { ++v22; v17 = 1; } v11 = v22; while ( *v22 == 48 ) ++v22; v16 = 0; while ( 1 ) { if ( (char)*v22 < 48 || (char)*v22 > 57 ) { if ( (char)*v22 < 65 || (char)*v22 > 90 ) { v7 = (char)*v22 < 97 || (char)*v22 > 122 ? 127 : (char)*v22 - 97 + 10; v8 = v7; } else { v8 = (char)*v22 - 65 + 10; } v9 = v8; } else { v9 = (char)*v22 - 48; } v10[v16] = v9; v6 = 0; if ( v9 < v21 ) v6 = v16 < 20; if ( !v6 ) break; ++v16; ++v22; } if ( v11 != v22 ) { v13 = 0LL; for ( i = -1LL; --v16 >= 1; i *= v21 ) { v12 = v10[v16]; if ( -v12 < v15 ) goto LABEL_49; v15 = (v12 + v15) / v21; v13 += i * v12; } if ( !v16 ) { v12 = v10[0]; if ( -v10[0] < v15 ) goto LABEL_49; v13 += i * v12; } if ( v17 < 0 ) { if ( v13 == 0x8000000000000000LL ) goto LABEL_49; v13 = -v13; if ( v13 > v19 ) goto LABEL_49; LABEL_50: *v18 = v13; *(_DWORD *)__errno_location() = 0; return v22; } if ( v13 >= v20 ) goto LABEL_50; LABEL_49: *(_DWORD *)__errno_location() = 34; return 0LL; } *(_DWORD *)__errno_location() = 33; return 0LL; }
10,151
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2d4a65(%rip), %r10 # 0x3acf60 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0xd84ff negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0xd852c cmpl $0x2d, %r10d jne 0xd8529 xorl %r10d, %r10d jmp 0xd852f decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0xd8533 xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0xd8555 movzbl %r15b, %r15d jmp 0xd8581 leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0xd8569 movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0xd8581 leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0xd8581 movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0xd85a3 cmpq $0x13, %rdx ja 0xd85a3 incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0xd8545 cmpq %rdi, %rbx je 0xd85eb cmpq $0x2, %rdx jb 0xd85f3 movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0xd862e addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0xd85ba jmp 0xd8600 movl $0x21, %r14d jmp 0xd8634 xorl %esi, %esi decl %edx jne 0xd8619 movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0xd862e imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0xd8651 negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0xd8656 movl $0x22, %r14d xorl %ebx, %ebx callq 0x29720 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0xd862e movq %rsi, (%r8) xorl %r14d, %r14d jmp 0xd8636 nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_D84FF: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_D84FF neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_D852C cmp r10d, 2Dh ; '-' jnz short loc_D8529 xor r10d, r10d jmp short loc_D852F loc_D8529: dec rdi loc_D852C: mov r10b, 1 loc_D852F: lea rbx, [rdi-1] loc_D8533: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_D8533 xor r11d, r11d xor edx, edx loc_D8545: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_D8555 movzx r15d, r15b jmp short loc_D8581 loc_D8555: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_D8569 movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_D8581 loc_D8569: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_D8581 movzx r15d, r14b add r15d, 0FFFFFFA9h loc_D8581: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_D85A3 cmp rdx, 13h ja short loc_D85A3 inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_D8545 loc_D85A3: cmp rbx, rdi jz short loc_D85EB cmp rdx, 2 jb short loc_D85F3 movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_D85BA: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_D862E add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_D85BA jmp short loc_D8600 loc_D85EB: mov r14d, 21h ; '!' jmp short loc_D8634 loc_D85F3: xor esi, esi dec edx jnz short loc_D8619 mov rdi, 0FFFFFFFFFFFFFFFFh loc_D8600: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_D862E imul rdi, rdx add rsi, rdi loc_D8619: test r10b, r10b jz short loc_D8651 neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_D8656 loc_D862E: mov r14d, 22h ; '"' loc_D8634: xor ebx, ebx loc_D8636: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_D8651: cmp rsi, r9 jl short loc_D862E loc_D8656: mov [r8], rsi xor r14d, r14d jmp short loc_D8636
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x4acf60] MOV R11,qword ptr [R10 + 0x40] LAB_001d84ff: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x001d84ff NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x001d852c CMP R10D,0x2d JNZ 0x001d8529 XOR R10D,R10D JMP 0x001d852f LAB_001d8529: DEC RDI LAB_001d852c: MOV R10B,0x1 LAB_001d852f: LEA RBX,[RDI + -0x1] LAB_001d8533: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x001d8533 XOR R11D,R11D XOR EDX,EDX LAB_001d8545: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x001d8555 MOVZX R15D,R15B JMP 0x001d8581 LAB_001d8555: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x001d8569 MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x001d8581 LAB_001d8569: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x001d8581 MOVZX R15D,R14B ADD R15D,-0x57 LAB_001d8581: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x001d85a3 CMP RDX,0x13 JA 0x001d85a3 INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x001d8545 LAB_001d85a3: CMP RBX,RDI JZ 0x001d85eb CMP RDX,0x2 JC 0x001d85f3 MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_001d85ba: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x001d862e ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x001d85ba JMP 0x001d8600 LAB_001d85eb: MOV R14D,0x21 JMP 0x001d8634 LAB_001d85f3: XOR ESI,ESI DEC EDX JNZ 0x001d8619 MOV RDI,-0x1 LAB_001d8600: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x001d862e IMUL RDI,RDX ADD RSI,RDI LAB_001d8619: TEST R10B,R10B JZ 0x001d8651 NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x001d8656 LAB_001d862e: MOV R14D,0x22 LAB_001d8634: XOR EBX,EBX LAB_001d8636: CALL 0x00129720 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001d8651: CMP RSI,R9 JL 0x001d862e LAB_001d8656: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x001d8636
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_004acfa0[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_001d8600; } LAB_001d8619: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_001d8656: *param_5 = lVar5; iVar10 = 0; goto LAB_001d8636; } } else if (param_3 <= lVar5) goto LAB_001d8656; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_001d862e; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_001d8600: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_001d8619; } } LAB_001d862e: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_001d8636: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
10,152
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 0x30936 movl %eax, -0xe4(%rbp) leaq -0x88(%rbp), %rax movl %r13d, 0x50(%rax) movl 0x1c0(%r14), %esi leaq -0x88(%rbp), %rdi movq %r15, %rdx callq 0x3042f cmpl $0x3, %eax ja 0x2fd07 movq -0x50(%rbp), %rbx subq %r15, %rbx addq -0x60(%rbp), %rbx cmpl $0x13, %ebx jbe 0x2fd07 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 0x3042f testb $0x4, %al sete %al addq -0xb8(%rbp), %r15 cmpq $0xfffffc, %r15 # imm = 0xFFFFFC setae %r12b orb %al, %r12b jne 0x2fc40 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 0x2fc82 movq -0x48(%rbp), %rcx bswapq %rcx movq %rcx, -0x7c(%rbp) jmp 0x2fc8a 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 0x2fd12 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 0x2fcfb movq %r14, %rdi leaq -0xe0(%rbp), %rsi callq 0x30805 testb %al, %al movl -0xe4(%rbp), %eax movl $0x1, %ecx cmovnel %ecx, %eax movl %eax, -0xe4(%rbp) cmpl $0x2, %r13d jb 0x2fbbd jmp 0x2fd1c callq 0x5cfd2 movl $0x7f, (%rax) movl $0x1, -0xe4(%rbp) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2fd43 movl -0xe4(%rbp), %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x28430
delete_dynamic_record: 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 mov [rbp+var_E4], eax lea rax, [rbp+var_88] mov [rax+50h], r13d loc_2FBBD: mov esi, [r14+1C0h] lea rdi, [rbp+var_88] mov rdx, r15 call _mi_get_block_info cmp eax, 3 ja loc_2FD07 mov rbx, [rbp+var_50] sub rbx, r15 add rbx, [rbp+var_60] cmp ebx, 13h jbe loc_2FD07 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_2FC40 mov rbx, r15 loc_2FC40: 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_2FC82 mov rcx, [rbp+var_48] bswap rcx mov [rbp+var_7C], rcx jmp short loc_2FC8A loc_2FC82: mov [rbp+var_7C], 0FFFFFFFFFFFFFFFFh loc_2FC8A: 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_2FD12 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_2FCFB mov rdi, r14 lea rsi, [rbp+var_E0] call unlink_deleted_block test al, al mov eax, [rbp+var_E4] mov ecx, 1 cmovnz eax, ecx mov [rbp+var_E4], eax loc_2FCFB: cmp r13d, 2 jb loc_2FBBD jmp short loc_2FD1C loc_2FD07: call _my_thread_var mov dword ptr [rax], 7Fh loc_2FD12: mov [rbp+var_E4], 1 loc_2FD1C: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2FD43 mov eax, [rbp+var_E4] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FD43: call ___stack_chk_fail
long long delete_dynamic_record(unsigned int *a1, unsigned long long a2, int a3) { unsigned long long v4; // r15 long long v5; // rsi unsigned int block_info; // eax long long v7; // rdx unsigned int v8; // ebx unsigned int v9; // r13d char v10; // al bool v11; // r12 long long v12; // rax bool v13; // zf int v14; // eax unsigned int v16; // [rsp+Ch] [rbp-E4h] _BYTE v17[40]; // [rsp+10h] [rbp-E0h] BYREF long long v18; // [rsp+38h] [rbp-B8h] int v19; // [rsp+60h] [rbp-90h] _BYTE v20[4]; // [rsp+68h] [rbp-88h] BYREF unsigned long long v21; // [rsp+6Ch] [rbp-84h] unsigned long long v22; // [rsp+74h] [rbp-7Ch] long long v23; // [rsp+90h] [rbp-60h] long long v24; // [rsp+A0h] [rbp-50h] unsigned long long v25; // [rsp+A8h] [rbp-48h] int v26; // [rsp+B8h] [rbp-38h] unsigned long long v27; // [rsp+C0h] [rbp-30h] v4 = a2; v27 = __readfsqword(0x28u); v16 = update_backward_delete_link(a1, *(_QWORD *)(*(_QWORD *)a1 + 88LL), a2); v26 = a3; while ( 1 ) { v5 = a1[112]; block_info = mi_get_block_info(v20, v5, v4); if ( block_info > 3 ) break; v8 = v23 + v24 - v4; if ( v8 <= 0x13 ) break; v9 = block_info; v19 = 0; v10 = mi_get_block_info(v17, a1[112], v8 + v4); v11 = (v10 & 4) == 0 || v18 + (unsigned long long)v8 >= 0xFFFFFC; if ( !v11 ) v8 += v18; v20[0] = 0; v20[2] = BYTE1(v8); v20[3] = v8; v20[1] = BYTE2(v8); v12 = *(_QWORD *)a1; v21 = _byteswap_uint64(*(_QWORD *)(*(_QWORD *)a1 + 88LL)); if ( v9 >= 2 ) v22 = -1LL; else v22 = _byteswap_uint64(v25); if ( (*(long long ( **)(unsigned int *, _BYTE *, long long, unsigned long long, long long))(v12 + 744))( a1, v20, 20LL, v4, 4LL) ) { return 1; } *(_QWORD *)(*(_QWORD *)a1 + 88LL) = v4; ++*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) += v8; v4 = v25; if ( !v11 ) { v13 = (unsigned __int8)unlink_deleted_block(a1, v17) == 0; v14 = v16; if ( !v13 ) v14 = 1; v16 = v14; } if ( v9 >= 2 ) return v16; } *(_DWORD *)my_thread_var(v20, v5, v7) = 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 0x00130936 MOV dword ptr [RBP + -0xe4],EAX LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],R13D LAB_0012fbbd: MOV ESI,dword ptr [R14 + 0x1c0] LEA RDI,[RBP + -0x88] MOV RDX,R15 CALL 0x0013042f CMP EAX,0x3 JA 0x0012fd07 MOV RBX,qword ptr [RBP + -0x50] SUB RBX,R15 ADD RBX,qword ptr [RBP + -0x60] CMP EBX,0x13 JBE 0x0012fd07 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 0x0013042f TEST AL,0x4 SETZ AL ADD R15,qword ptr [RBP + -0xb8] CMP R15,0xfffffc SETNC R12B OR R12B,AL JNZ 0x0012fc40 MOV RBX,R15 LAB_0012fc40: 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 0x0012fc82 MOV RCX,qword ptr [RBP + -0x48] BSWAP RCX MOV qword ptr [RBP + -0x7c],RCX JMP 0x0012fc8a LAB_0012fc82: MOV qword ptr [RBP + -0x7c],-0x1 LAB_0012fc8a: 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 0x0012fd12 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 0x0012fcfb MOV RDI,R14 LEA RSI,[RBP + -0xe0] CALL 0x00130805 TEST AL,AL MOV EAX,dword ptr [RBP + -0xe4] MOV ECX,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0xe4],EAX LAB_0012fcfb: CMP R13D,0x2 JC 0x0012fbbd JMP 0x0012fd1c LAB_0012fd07: CALL 0x0015cfd2 MOV dword ptr [RAX],0x7f LAB_0012fd12: MOV dword ptr [RBP + -0xe4],0x1 LAB_0012fd1c: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012fd43 MOV EAX,dword ptr [RBP + -0xe4] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012fd43: CALL 0x00128430
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_0012fd12: 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_0012fd12; *(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; }
10,153
js_parse_expr_paren
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_expr_paren(JSParseState *s) { if (js_parse_expect(s, '(')) return -1; if (js_parse_expr(s)) return -1; if (js_parse_expect(s, ')')) return -1; return 0; }
O3
c
js_parse_expr_paren: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x28, %esi callq 0x654fc movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x6a1f2 movq %r14, %rdi movl $0x1, %esi callq 0x6bfae testl %eax, %eax jne 0x6a1f2 movq %r14, %rdi movl $0x29, %esi callq 0x654fc xorl %ebx, %ebx negl %eax sbbl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
js_parse_expr_paren: push r14 push rbx push rax mov r14, rdi mov esi, 28h ; '(' call js_parse_expect mov ebx, 0FFFFFFFFh test eax, eax jnz short loc_6A1F2 mov rdi, r14 mov esi, 1 call js_parse_expr2 test eax, eax jnz short loc_6A1F2 mov rdi, r14 mov esi, 29h ; ')' call js_parse_expect xor ebx, ebx neg eax sbb ebx, ebx loc_6A1F2: mov eax, ebx add rsp, 8 pop rbx pop r14 retn
long long js_parse_expr_paren( long long *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { unsigned int v14; // ebx long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 v14 = -1; if ( !(unsigned int)js_parse_expect(a1, 40LL, a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9) && !(unsigned int)js_parse_expr2(a1, 1LL) ) { return (unsigned int)-((unsigned int)js_parse_expect(a1, 41LL, v15, v16, v17, v18, a2, a3, a4, a5, v19, v20, a8, a9) != 0); } return v14; }
js_parse_expr_paren: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV ESI,0x28 CALL 0x001654fc MOV EBX,0xffffffff TEST EAX,EAX JNZ 0x0016a1f2 MOV RDI,R14 MOV ESI,0x1 CALL 0x0016bfae TEST EAX,EAX JNZ 0x0016a1f2 MOV RDI,R14 MOV ESI,0x29 CALL 0x001654fc XOR EBX,EBX NEG EAX SBB EBX,EBX LAB_0016a1f2: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 RET
int js_parse_expr_paren(int8 param_1) { int iVar1; int iVar2; iVar1 = js_parse_expect(param_1,0x28); iVar2 = -1; if (iVar1 == 0) { iVar1 = js_parse_expr2(param_1,1); if (iVar1 == 0) { iVar2 = js_parse_expect(param_1,0x29); iVar2 = -(uint)(iVar2 != 0); } } return iVar2; }
10,154
ma_scramble_323
eloqsql/libmariadb/libmariadb/ma_password.c
char *ma_scramble_323(char *to, const char *message, const char *password) { struct rand_struct rand_st; ulong hash_pass[2], hash_message[2]; if (password && password[0]) { char extra, *to_start=to; const char *end_scramble323= message + SCRAMBLE_LENGTH_323; ma_hash_password(hash_pass,password, (uint) strlen(password)); /* Don't use strlen, could be > SCRAMBLE_LENGTH_323 ! */ ma_hash_password(hash_message, message, SCRAMBLE_LENGTH_323); ma_randominit(&rand_st, hash_pass[0] ^ hash_message[0], hash_pass[1] ^ hash_message[1]); for (; message < end_scramble323; message++) *to++= (char) (floor(rnd(&rand_st) * 31) + 64); extra=(char) (floor(rnd(&rand_st) * 31)); while (to_start != to) *(to_start++)^= extra; } *to= 0; return to; }
O3
c
ma_scramble_323: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx testq %rdx, %rdx je 0x37ac7 movq %rdx, %r15 cmpb $0x0, (%rdx) je 0x37ac7 movq %rsi, %r14 movq %r15, %rdi callq 0x131c0 movl %eax, %edx leaq -0x50(%rbp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x37718 leaq -0x40(%rbp), %r15 movl $0x8, %edx movq %r15, %rdi movq %r14, %rsi callq 0x37718 movq (%r15), %rsi movq 0x8(%r15), %rcx xorq (%r12), %rsi xorq 0x8(%r12), %rcx movabsq $0x400000011, %r12 # imm = 0x400000011 movq %rsi, %rax mulq %r12 movq %rsi, %r13 subq %rdx, %r13 shrq %r13 addq %rdx, %r13 shrq $0x1d, %r13 movq %r13, %rax shlq $0x1e, %rax subq %rax, %r13 addq %rsi, %r13 movq %rcx, %rax mulq %r12 movq %rcx, %rsi subq %rdx, %rsi shrq %rsi addq %rdx, %rsi shrq $0x1d, %rsi movq %rsi, %rax shlq $0x1e, %rax subq %rax, %rsi addq %rcx, %rsi xorl %r15d, %r15d leaq (,%r13,2), %rcx addq %r13, %rcx addq %rsi, %rcx movq %rcx, %rax mulq %r12 movq %rcx, %r13 subq %rdx, %r13 shrq %r13 addq %rdx, %r13 shrq $0x1d, %r13 movq %r13, %rax shlq $0x1e, %rax subq %rax, %r13 addq %rcx, %r13 leaq (%rsi,%r13), %r14 addq $0x21, %r14 xorps %xmm0, %xmm0 cvtsi2sd %r13d, %xmm0 divsd 0x1665(%rip), %xmm0 # 0x39080 mulsd 0x1665(%rip), %xmm0 # 0x39088 callq 0x13780 addsd 0x1660(%rip), %xmm0 # 0x39090 cvttsd2si %xmm0, %eax movb %al, (%rbx,%r15) movq %r14, %rax mulq %r12 incq %r15 movq %r14, %rsi subq %rdx, %rsi shrq %rsi addq %rdx, %rsi shrq $0x1d, %rsi movq %rsi, %rax shlq $0x1e, %rax subq %rax, %rsi addq %r14, %rsi cmpq $0x8, %r15 jne 0x379d2 leal (%r13,%r13,2), %eax addl %eax, %esi leaq (%rsi,%rsi,4), %rax shrq $0x20, %rax movl %esi, %ecx subl %eax, %ecx shrl %ecx addl %eax, %ecx shrl $0x1d, %ecx movl %ecx, %eax shll $0x1e, %eax subl %eax, %ecx addl %esi, %ecx xorps %xmm0, %xmm0 cvtsi2sd %ecx, %xmm0 divsd 0x15e6(%rip), %xmm0 # 0x39080 mulsd 0x15e6(%rip), %xmm0 # 0x39088 callq 0x13780 cvttsd2si %xmm0, %eax movd %eax, %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] pshuflw $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0,4,5,6,7] movq (%rbx), %xmm1 pxor %xmm0, %xmm1 movq %xmm1, (%rbx) addq %r15, %rbx movb $0x0, (%rbx) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_scramble_323: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi test rdx, rdx jz loc_37AC7 mov r15, rdx cmp byte ptr [rdx], 0 jz loc_37AC7 mov r14, rsi mov rdi, r15 call _strlen mov edx, eax lea r12, [rbp+var_50] mov rdi, r12 mov rsi, r15 call ma_hash_password lea r15, [rbp+var_40] mov edx, 8 mov rdi, r15 mov rsi, r14 call ma_hash_password mov rsi, [r15] mov rcx, [r15+8] xor rsi, [r12] xor rcx, [r12+8] mov r12, 400000011h mov rax, rsi mul r12 mov r13, rsi sub r13, rdx shr r13, 1 add r13, rdx shr r13, 1Dh mov rax, r13 shl rax, 1Eh sub r13, rax add r13, rsi mov rax, rcx mul r12 mov rsi, rcx sub rsi, rdx shr rsi, 1 add rsi, rdx shr rsi, 1Dh mov rax, rsi shl rax, 1Eh sub rsi, rax add rsi, rcx xor r15d, r15d loc_379D2: lea rcx, ds:0[r13*2] add rcx, r13 add rcx, rsi mov rax, rcx mul r12 mov r13, rcx sub r13, rdx shr r13, 1 add r13, rdx shr r13, 1Dh mov rax, r13 shl rax, 1Eh sub r13, rax add r13, rcx lea r14, [rsi+r13] add r14, 21h ; '!' xorps xmm0, xmm0 cvtsi2sd xmm0, r13d divsd xmm0, cs:qword_39080 mulsd xmm0, cs:qword_39088 call _floor addsd xmm0, cs:qword_39090 cvttsd2si eax, xmm0 mov [rbx+r15], al mov rax, r14 mul r12 inc r15 mov rsi, r14 sub rsi, rdx shr rsi, 1 add rsi, rdx shr rsi, 1Dh mov rax, rsi shl rax, 1Eh sub rsi, rax add rsi, r14 cmp r15, 8 jnz loc_379D2 lea eax, [r13+r13*2+0] add esi, eax lea rax, [rsi+rsi*4] shr rax, 20h mov ecx, esi sub ecx, eax shr ecx, 1 add ecx, eax shr ecx, 1Dh mov eax, ecx shl eax, 1Eh sub ecx, eax add ecx, esi xorps xmm0, xmm0 cvtsi2sd xmm0, ecx divsd xmm0, cs:qword_39080 mulsd xmm0, cs:qword_39088 call _floor cvttsd2si eax, xmm0 movd xmm0, eax punpcklbw xmm0, xmm0 pshuflw xmm0, xmm0, 0 movq xmm1, qword ptr [rbx] pxor xmm1, xmm0 movq qword ptr [rbx], xmm1 add rbx, r15 loc_37AC7: mov byte ptr [rbx], 0 mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
__m128i * ma_scramble_323(__m128i *a1, unsigned __int8 *a2, unsigned __int8 *a3) { __m128i *v3; // rbx unsigned int v5; // eax unsigned long long v6; // r13 unsigned long long v7; // rsi long long i; // r15 __m128i v9; // xmm0 long long v11[2]; // [rsp+0h] [rbp-50h] BYREF long long v12[8]; // [rsp+10h] [rbp-40h] BYREF v3 = a1; if ( a3 && *a3 ) { v5 = strlen(a3); ma_hash_password(v11, a3, v5); ma_hash_password(v12, a2, 8LL); v6 = (v11[0] ^ v12[0]) % 0x3FFFFFFFuLL; v7 = (v11[1] ^ v12[1]) % 0x3FFFFFFFuLL; for ( i = 0LL; i != 8; ++i ) { v6 = (v7 + 3 * v6) % 0x3FFFFFFF; a1->m128i_i8[i] = (int)(floor((double)(int)v6 / 1073741823.0 * 31.0) + 64.0); v7 = (v7 + v6 + 33) % 0x3FFFFFFF; } v9 = _mm_cvtsi32_si128((int)floor((double)((3 * (int)v6 + (int)v7) % 0x3FFFFFFFu) / 1073741823.0 * 31.0)); a1->m128i_i64[0] = _mm_xor_si128(_mm_loadl_epi64(a1), _mm_shufflelo_epi16(_mm_unpacklo_epi8(v9, v9), 0)).m128i_u64[0]; v3 = (__m128i *)&a1->m128i_u64[1]; } v3->m128i_i8[0] = 0; return v3; }
ma_scramble_323: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI TEST RDX,RDX JZ 0x00137ac7 MOV R15,RDX CMP byte ptr [RDX],0x0 JZ 0x00137ac7 MOV R14,RSI MOV RDI,R15 CALL 0x001131c0 MOV EDX,EAX LEA R12,[RBP + -0x50] MOV RDI,R12 MOV RSI,R15 CALL 0x00137718 LEA R15,[RBP + -0x40] MOV EDX,0x8 MOV RDI,R15 MOV RSI,R14 CALL 0x00137718 MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] XOR RSI,qword ptr [R12] XOR RCX,qword ptr [R12 + 0x8] MOV R12,0x400000011 MOV RAX,RSI MUL R12 MOV R13,RSI SUB R13,RDX SHR R13,0x1 ADD R13,RDX SHR R13,0x1d MOV RAX,R13 SHL RAX,0x1e SUB R13,RAX ADD R13,RSI MOV RAX,RCX MUL R12 MOV RSI,RCX SUB RSI,RDX SHR RSI,0x1 ADD RSI,RDX SHR RSI,0x1d MOV RAX,RSI SHL RAX,0x1e SUB RSI,RAX ADD RSI,RCX XOR R15D,R15D LAB_001379d2: LEA RCX,[R13*0x2] ADD RCX,R13 ADD RCX,RSI MOV RAX,RCX MUL R12 MOV R13,RCX SUB R13,RDX SHR R13,0x1 ADD R13,RDX SHR R13,0x1d MOV RAX,R13 SHL RAX,0x1e SUB R13,RAX ADD R13,RCX LEA R14,[RSI + R13*0x1] ADD R14,0x21 XORPS XMM0,XMM0 CVTSI2SD XMM0,R13D DIVSD XMM0,qword ptr [0x00139080] MULSD XMM0,qword ptr [0x00139088] CALL 0x00113780 ADDSD XMM0,qword ptr [0x00139090] CVTTSD2SI EAX,XMM0 MOV byte ptr [RBX + R15*0x1],AL MOV RAX,R14 MUL R12 INC R15 MOV RSI,R14 SUB RSI,RDX SHR RSI,0x1 ADD RSI,RDX SHR RSI,0x1d MOV RAX,RSI SHL RAX,0x1e SUB RSI,RAX ADD RSI,R14 CMP R15,0x8 JNZ 0x001379d2 LEA EAX,[R13 + R13*0x2] ADD ESI,EAX LEA RAX,[RSI + RSI*0x4] SHR RAX,0x20 MOV ECX,ESI SUB ECX,EAX SHR ECX,0x1 ADD ECX,EAX SHR ECX,0x1d MOV EAX,ECX SHL EAX,0x1e SUB ECX,EAX ADD ECX,ESI XORPS XMM0,XMM0 CVTSI2SD XMM0,ECX DIVSD XMM0,qword ptr [0x00139080] MULSD XMM0,qword ptr [0x00139088] CALL 0x00113780 CVTTSD2SI EAX,XMM0 MOVD XMM0,EAX PUNPCKLBW XMM0,XMM0 PSHUFLW XMM0,XMM0,0x0 MOVQ XMM1,qword ptr [RBX] PXOR XMM1,XMM0 MOVQ qword ptr [RBX],XMM1 ADD RBX,R15 LAB_00137ac7: MOV byte ptr [RBX],0x0 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong * ma_scramble_323(ulong *param_1,int8 param_2,char *param_3) { int iVar1; size_t sVar2; ulong uVar3; ulong uVar4; long lVar5; int1 uVar8; int1 uVar9; int1 uVar10; double dVar6; int1 auVar7 [16]; ulong local_58; ulong local_50; ulong local_48; ulong local_40; if ((param_3 != (char *)0x0) && (*param_3 != '\0')) { sVar2 = strlen(param_3); ma_hash_password(&local_58,param_3,sVar2 & 0xffffffff); ma_hash_password(&local_48,param_2,8); uVar4 = (local_48 ^ local_58) % 0x3fffffff; uVar3 = (local_40 ^ local_50) % 0x3fffffff; lVar5 = 0; do { uVar4 = (uVar4 * 3 + uVar3) % 0x3fffffff; dVar6 = floor(((double)(int)uVar4 / _DAT_00139080) * _DAT_00139088); *(char *)((long)param_1 + lVar5) = (char)(int)(dVar6 + _DAT_00139090); lVar5 = lVar5 + 1; uVar3 = (uVar3 + uVar4 + 0x21) % 0x3fffffff; } while (lVar5 != 8); dVar6 = floor(((double)((uint)((int)uVar3 + (int)uVar4 * 3) % 0x3fffffff) / _DAT_00139080) * _DAT_00139088); iVar1 = (int)dVar6; uVar10 = (int1)((uint)iVar1 >> 0x18); uVar9 = (int1)((uint)iVar1 >> 0x10); uVar8 = (int1)((uint)iVar1 >> 8); auVar7._4_4_ = (int)(CONCAT35(CONCAT21(CONCAT11(uVar10,uVar10),uVar9),CONCAT14(uVar9,iVar1)) >> 0x20); auVar7[3] = uVar8; auVar7[2] = uVar8; auVar7[0] = (int1)iVar1; auVar7[1] = auVar7[0]; auVar7._8_8_ = 0; auVar7 = pshuflw(auVar7,auVar7,0); *param_1 = *param_1 ^ auVar7._0_8_; param_1 = param_1 + 1; } *(int1 *)param_1 = 0; return param_1; }
10,155
my_charlen_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; return 4; } return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb4: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x4f7be movb (%rsi), %cl cmpb $-0x11, %cl ja 0x4f72a movl $0x1, %eax testb %cl, %cl jns 0x4f7be cmpb $-0x3e, %cl jb 0x4f7bc cmpb $-0x21, %cl ja 0x4f783 leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0x4f7be xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0x4f7be cmpb $-0xc, %cl ja 0x4f7bc leaq 0x4(%rsi), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %rdi ja 0x4f7be movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x4f7bc cmpb $-0x41, 0x2(%rsi) jg 0x4f7bc cmpb $-0x41, 0x3(%rsi) jg 0x4f7bc cmpb $-0x10, %cl sete %sil cmpb $-0x70, %dl setb %dil movl $0x0, %eax testb %dil, %sil jne 0x4f7be cmpb $-0xc, %cl setne %al cmpb $-0x70, %dl setb %cl orb %al, %cl movzbl %cl, %eax shll $0x2, %eax jmp 0x4f7be leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0x4f7be movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x4f7bc cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0x4f7be xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0x4f7be xorl %eax, %eax popq %rbp retq
my_charlen_utf8mb4: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb loc_4F7BE mov cl, [rsi] cmp cl, 0EFh ja short loc_4F72A mov eax, 1 test cl, cl jns loc_4F7BE cmp cl, 0C2h jb loc_4F7BC cmp cl, 0DFh ja short loc_4F783 lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja loc_4F7BE xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp loc_4F7BE loc_4F72A: cmp cl, 0F4h ja loc_4F7BC lea rdi, [rsi+4] mov eax, 0FFFFFF98h cmp rdi, rdx ja short loc_4F7BE mov dl, [rsi+1] cmp dl, 0BFh jg short loc_4F7BC cmp byte ptr [rsi+2], 0BFh jg short loc_4F7BC cmp byte ptr [rsi+3], 0BFh jg short loc_4F7BC cmp cl, 0F0h setz sil cmp dl, 90h setb dil mov eax, 0 test sil, dil jnz short loc_4F7BE cmp cl, 0F4h setnz al cmp dl, 90h setb cl or cl, al movzx eax, cl shl eax, 2 jmp short loc_4F7BE loc_4F783: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_4F7BE mov dl, [rsi+1] cmp dl, 0BFh jg short loc_4F7BC cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_4F7BE xor eax, eax cmp dl, 0A0h setnb al cmp cl, 0E0h lea ecx, [rax+rax*2] mov eax, 3 cmovz eax, ecx jmp short loc_4F7BE loc_4F7BC: xor eax, eax loc_4F7BE: pop rbp retn
long long my_charlen_utf8mb4(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl char v6; // dl result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (unsigned __int8)*a2 <= 0xEFu ) { result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 >= 0xC2u ) { if ( (unsigned __int8)v4 <= 0xDFu ) { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); return result; } result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v6 = a2[1]; if ( v6 <= -65 ) { result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v6 >= 0xA0u); } return result; } } return 0LL; } if ( (unsigned __int8)v4 > 0xF4u ) return 0LL; result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v5 = a2[1]; if ( v5 > -65 || a2[2] > -65 || a2[3] > -65 ) return 0LL; result = 0LL; if ( (unsigned __int8)v5 >= 0x90u || v4 != -16 ) return 4 * (unsigned int)(v4 != -12 || (unsigned __int8)v5 < 0x90u); return result; }
my_charlen_utf8mb4: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x0014f7be MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x0014f72a MOV EAX,0x1 TEST CL,CL JNS 0x0014f7be CMP CL,0xc2 JC 0x0014f7bc CMP CL,0xdf JA 0x0014f783 LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x0014f7be XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x0014f7be LAB_0014f72a: CMP CL,0xf4 JA 0x0014f7bc LEA RDI,[RSI + 0x4] MOV EAX,0xffffff98 CMP RDI,RDX JA 0x0014f7be MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x0014f7bc CMP byte ptr [RSI + 0x2],0xbf JG 0x0014f7bc CMP byte ptr [RSI + 0x3],0xbf JG 0x0014f7bc CMP CL,0xf0 SETZ SIL CMP DL,0x90 SETC DIL MOV EAX,0x0 TEST SIL,DIL JNZ 0x0014f7be CMP CL,0xf4 SETNZ AL CMP DL,0x90 SETC CL OR CL,AL MOVZX EAX,CL SHL EAX,0x2 JMP 0x0014f7be LAB_0014f783: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x0014f7be MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x0014f7bc CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x0014f7be XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x0014f7be LAB_0014f7bc: XOR EAX,EAX LAB_0014f7be: POP RBP RET
ulong my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; if (bVar1 < 0xf0) { if (-1 < (char)bVar1) { return 1; } if (0xc1 < bVar1) { if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } return (ulong)((uint)((char)param_2[1] < -0x40) * 2); } if (param_3 < param_2 + 3) { return 0xffffff99; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (ulong)((uint)(0x9f < param_2[1]) * 3); } } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar2 = param_2[1]; if ((((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) { if (bVar1 == 0xf0 && bVar2 < 0x90) { return 0; } return (ulong)(bVar2 < 0x90 || bVar1 != 0xf4) << 2; } } return 0; }
10,156
stop_waiting
eloqsql/mysys/waiting_threads.c
static int stop_waiting(WT_THD *thd) { int ret; WT_RESOURCE *rc= thd->waiting_for; DBUG_ENTER("stop_waiting"); if (!rc) DBUG_RETURN(WT_OK); /* nobody's trying to free the resource now, as its waiter_count is guaranteed to be non-zero */ rc_wrlock(rc); ret= stop_waiting_locked(thd); DBUG_RETURN(ret); }
O3
c
stop_waiting: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x28(%rdi), %rdi testq %rdi, %rdi je 0xadb89 addq $0x18, %rdi callq 0xaaa79 movq 0x28(%rbx), %rsi decl 0x10(%rsi) movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq 0xadecd cmpb $0x0, 0x60(%rbx) setne %cl testl %eax, %eax setne %al orb %cl, %al movzbl %al, %eax negl %eax jmp 0xadb8b xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
stop_waiting: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+28h] test rdi, rdi jz short loc_ADB89 add rdi, 18h call my_rw_wrlock mov rsi, [rbx+28h] dec dword ptr [rsi+10h] mov qword ptr [rbx+28h], 0 mov rdi, rbx call unlock_lock_and_free_resource cmp byte ptr [rbx+60h], 0 setnz cl test eax, eax setnz al or al, cl movzx eax, al neg eax jmp short loc_ADB8B loc_ADB89: xor eax, eax loc_ADB8B: add rsp, 8 pop rbx pop rbp retn
long long stop_waiting(long long a1) { long long v2; // rdi v2 = *(_QWORD *)(a1 + 40); if ( !v2 ) return 0LL; my_rw_wrlock(v2 + 24); --*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL); *(_QWORD *)(a1 + 40) = 0LL; return (unsigned int)-((*(_BYTE *)(a1 + 96) != 0) | ((unsigned int)unlock_lock_and_free_resource(a1) != 0)); }
stop_waiting: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x28] TEST RDI,RDI JZ 0x001adb89 ADD RDI,0x18 CALL 0x001aaa79 MOV RSI,qword ptr [RBX + 0x28] DEC dword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x28],0x0 MOV RDI,RBX CALL 0x001adecd CMP byte ptr [RBX + 0x60],0x0 SETNZ CL TEST EAX,EAX SETNZ AL OR AL,CL MOVZX EAX,AL NEG EAX JMP 0x001adb8b LAB_001adb89: XOR EAX,EAX LAB_001adb8b: ADD RSP,0x8 POP RBX POP RBP RET
int stop_waiting(long param_1) { int *piVar1; int iVar2; if (*(long *)(param_1 + 0x28) == 0) { iVar2 = 0; } else { my_rw_wrlock(*(long *)(param_1 + 0x28) + 0x18); piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10); *piVar1 = *piVar1 + -1; *(int8 *)(param_1 + 0x28) = 0; iVar2 = unlock_lock_and_free_resource(param_1); iVar2 = -(uint)(iVar2 != 0 || *(char *)(param_1 + 0x60) != '\0'); } return iVar2; }
10,157
LefDefParser::defiPartition::setName(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPartition.cpp
void defiPartition::setName(const char* name) { int len = strlen(name) + 1; clear(); if (len > nameLength_) { if (name_) free(name_); nameLength_ = len; name_ = (char*)malloc(len); } strcpy(name_, defData->DEFCASE(name)); }
O0
cpp
LefDefParser::defiPartition::setName(char const*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0x70e0 movq 0x8(%rsp), %rdi addq $0x1, %rax movl %eax, 0x14(%rsp) callq 0x4a990 movq 0x8(%rsp), %rcx movl 0x14(%rsp), %eax cmpl 0x8(%rcx), %eax jle 0x4abfb movq 0x8(%rsp), %rax cmpq $0x0, (%rax) je 0x4abda movq 0x8(%rsp), %rax movq (%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movl 0x14(%rsp), %ecx movl %ecx, 0x8(%rax) movslq 0x14(%rsp), %rdi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movq 0x8(%rsp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0xc0(%rax), %rdi movq 0x18(%rsp), %rsi callq 0x250b0 movq (%rsp), %rdi movq %rax, %rsi callq 0x7220 addq $0x28, %rsp retq nopl (%rax)
_ZN12LefDefParser13defiPartition7setNameEPKc: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] call _strlen mov rdi, [rsp+28h+var_20]; this add rax, 1 mov [rsp+28h+var_14], eax call _ZN12LefDefParser13defiPartition5clearEv; LefDefParser::defiPartition::clear(void) mov rcx, [rsp+28h+var_20] mov eax, [rsp+28h+var_14] cmp eax, [rcx+8] jle short loc_4ABFB mov rax, [rsp+28h+var_20] cmp qword ptr [rax], 0 jz short loc_4ABDA mov rax, [rsp+28h+var_20] mov rdi, [rax] call _free loc_4ABDA: mov rax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_14] mov [rax+8], ecx movsxd rdi, [rsp+28h+var_14] call _malloc mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax], rcx loc_4ABFB: mov rax, [rsp+28h+var_20] mov rcx, [rax] mov [rsp+28h+var_28], rcx mov rdi, [rax+0C0h]; this mov rsi, [rsp+28h+var_10]; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, [rsp+28h+var_28] mov rsi, rax call _strcpy add rsp, 28h retn
long long LefDefParser::defiPartition::setName(LefDefParser::defrData **this, const char *a2) { const char *v2; // rax LefDefParser::defrData *v4; // [rsp+0h] [rbp-28h] int v5; // [rsp+14h] [rbp-14h] v5 = strlen(a2) + 1; LefDefParser::defiPartition::clear((LefDefParser::defiPartition *)this); if ( v5 > *((_DWORD *)this + 2) ) { if ( *this ) free(*this); *((_DWORD *)this + 2) = v5; *this = (LefDefParser::defrData *)malloc(v5); } v4 = *this; v2 = LefDefParser::defrData::DEFCASE(this[24], a2); return strcpy(v4, v2); }
setName: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x001070e0 MOV RDI,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV dword ptr [RSP + 0x14],EAX CALL 0x0014a990 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RCX + 0x8] JLE 0x0014abfb MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX],0x0 JZ 0x0014abda MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX] CALL 0x001072a0 LAB_0014abda: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x14] MOV dword ptr [RAX + 0x8],ECX MOVSXD RDI,dword ptr [RSP + 0x14] CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX LAB_0014abfb: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001250b0 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x00107220 ADD RSP,0x28 RET
/* LefDefParser::defiPartition::setName(char const*) */ void __thiscall LefDefParser::defiPartition::setName(defiPartition *this,char *param_1) { char *__dest; int iVar1; size_t sVar2; void *pvVar3; char *__src; sVar2 = strlen(param_1); iVar1 = (int)sVar2 + 1; clear(this); if (*(int *)(this + 8) < iVar1) { if (*(long *)this != 0) { free(*(void **)this); } *(int *)(this + 8) = iVar1; pvVar3 = malloc((long)iVar1); *(void **)this = pvVar3; } __dest = *(char **)this; __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0xc0),param_1); strcpy(__dest,__src); return; }
10,158
fmt::v10::detail::bigint::align(fmt::v10::detail::bigint const&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 void align(const bigint& other) { int exp_difference = exp_ - other.exp_; if (exp_difference <= 0) return; int num_bigits = static_cast<int>(bigits_.size()); bigits_.resize(to_unsigned(num_bigits + exp_difference)); for (int i = num_bigits - 1, j = i + exp_difference; i >= 0; --i, --j) bigits_[j] = bigits_[i]; std::uninitialized_fill_n(bigits_.data(), exp_difference, 0u); exp_ -= exp_difference; }
O0
c
fmt::v10::detail::bigint::align(fmt::v10::detail::bigint const&): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movl 0xa0(%rax), %eax movq 0x28(%rsp), %rcx subl 0xa0(%rcx), %eax movl %eax, 0x24(%rsp) cmpl $0x0, 0x24(%rsp) jg 0xdc3b9 jmp 0xdc47a movq 0x8(%rsp), %rdi callq 0xdb3a0 movl %eax, 0x20(%rsp) movl 0x20(%rsp), %edi addl 0x24(%rsp), %edi callq 0xc7930 movq 0x8(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0xdb530 movl 0x20(%rsp), %eax subl $0x1, %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax addl 0x24(%rsp), %eax movl %eax, 0x18(%rsp) cmpl $0x0, 0x1c(%rsp) jl 0xdc440 movq 0x8(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0xdbb30 movq 0x8(%rsp), %rdi movl (%rax), %eax movl %eax, 0x4(%rsp) movl 0x18(%rsp), %esi callq 0xdbb30 movl 0x4(%rsp), %ecx movl %ecx, (%rax) movl 0x1c(%rsp), %eax addl $-0x1, %eax movl %eax, 0x1c(%rsp) movl 0x18(%rsp), %eax addl $-0x1, %eax movl %eax, 0x18(%rsp) jmp 0xdc3f9 movq 0x8(%rsp), %rdi callq 0xdb390 movq %rax, %rdi movl 0x24(%rsp), %esi movl $0x0, 0x14(%rsp) leaq 0x14(%rsp), %rdx callq 0xdc5b0 movq 0x8(%rsp), %rax movl 0x24(%rsp), %edx movl 0xa0(%rax), %ecx subl %edx, %ecx movl %ecx, 0xa0(%rax) addq $0x38, %rsp retq nop
_ZN3fmt3v106detail6bigint5alignERKS2_: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax mov eax, [rax+0A0h] mov rcx, [rsp+38h+var_10] sub eax, [rcx+0A0h] mov [rsp+38h+var_14], eax cmp [rsp+38h+var_14], 0 jg short loc_DC3B9 jmp loc_DC47A loc_DC3B9: mov rdi, [rsp+38h+var_30] call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void) mov [rsp+38h+var_18], eax mov edi, [rsp+38h+var_18] add edi, [rsp+38h+var_14] call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int) mov rdi, [rsp+38h+var_30] mov eax, eax mov esi, eax call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE6resizeEm; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::resize(ulong) mov eax, [rsp+38h+var_18] sub eax, 1 mov [rsp+38h+var_1C], eax mov eax, [rsp+38h+var_1C] add eax, [rsp+38h+var_14] mov [rsp+38h+var_20], eax loc_DC3F9: cmp [rsp+38h+var_1C], 0 jl short loc_DC440 mov rdi, [rsp+38h+var_30] mov esi, [rsp+38h+var_1C] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov rdi, [rsp+38h+var_30] mov eax, [rax] mov [rsp+38h+var_34], eax mov esi, [rsp+38h+var_20] call _ZN3fmt3v106detail6bufferIjEixIiEERjT_; fmt::v10::detail::buffer<uint>::operator[]<int>(int) mov ecx, [rsp+38h+var_34] mov [rax], ecx mov eax, [rsp+38h+var_1C] add eax, 0FFFFFFFFh mov [rsp+38h+var_1C], eax mov eax, [rsp+38h+var_20] add eax, 0FFFFFFFFh mov [rsp+38h+var_20], eax jmp short loc_DC3F9 loc_DC440: mov rdi, [rsp+38h+var_30] call _ZN3fmt3v106detail6bufferIjE4dataEv; fmt::v10::detail::buffer<uint>::data(void) mov rdi, rax mov esi, [rsp+38h+var_14] mov [rsp+38h+var_24], 0 lea rdx, [rsp+38h+var_24] call _ZSt20uninitialized_fill_nIPjijET_S1_T0_RKT1_; std::uninitialized_fill_n<uint *,int,uint>(uint *,int,uint const&) mov rax, [rsp+38h+var_30] mov edx, [rsp+38h+var_14] mov ecx, [rax+0A0h] sub ecx, edx mov [rax+0A0h], ecx loc_DC47A: add rsp, 38h retn
long long fmt::v10::detail::bigint::align(fmt::v10::detail::bigint *this, const fmt::v10::detail::bigint *a2) { long long result; // rax unsigned int v3; // eax long long v4; // rax int v5; // [rsp+4h] [rbp-34h] int v6; // [rsp+14h] [rbp-24h] BYREF int v7; // [rsp+18h] [rbp-20h] int v8; // [rsp+1Ch] [rbp-1Ch] int v9; // [rsp+20h] [rbp-18h] int v10; // [rsp+24h] [rbp-14h] const fmt::v10::detail::bigint *v11; // [rsp+28h] [rbp-10h] fmt::v10::detail::bigint *v12; // [rsp+30h] [rbp-8h] v12 = this; v11 = a2; result = (unsigned int)(*((_DWORD *)this + 40) - *((_DWORD *)a2 + 40)); v10 = *((_DWORD *)this + 40) - *((_DWORD *)a2 + 40); if ( v10 > 0 ) { v9 = fmt::v10::detail::buffer<unsigned int>::size((long long)this); v3 = fmt::v10::detail::to_unsigned<int>(v10 + v9); fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::resize((long long)this, v3); v8 = v9 - 1; v7 = v10 + v9 - 1; while ( v8 >= 0 ) { v5 = *(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>((long long)this, v8); *(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<int>((long long)this, v7) = v5; --v8; --v7; } v4 = fmt::v10::detail::buffer<unsigned int>::data((long long)this); v6 = 0; std::uninitialized_fill_n<unsigned int *,int,unsigned int>(v4, (unsigned int)v10, &v6); result = (long long)this; *((_DWORD *)this + 40) -= v10; } return result; }
align: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV EAX,dword ptr [RAX + 0xa0] MOV RCX,qword ptr [RSP + 0x28] SUB EAX,dword ptr [RCX + 0xa0] MOV dword ptr [RSP + 0x24],EAX CMP dword ptr [RSP + 0x24],0x0 JG 0x001dc3b9 JMP 0x001dc47a LAB_001dc3b9: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001db3a0 MOV dword ptr [RSP + 0x20],EAX MOV EDI,dword ptr [RSP + 0x20] ADD EDI,dword ptr [RSP + 0x24] CALL 0x001c7930 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,EAX MOV ESI,EAX CALL 0x001db530 MOV EAX,dword ptr [RSP + 0x20] SUB EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x18],EAX LAB_001dc3f9: CMP dword ptr [RSP + 0x1c],0x0 JL 0x001dc440 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x1c] CALL 0x001dbb30 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x4],EAX MOV ESI,dword ptr [RSP + 0x18] CALL 0x001dbb30 MOV ECX,dword ptr [RSP + 0x4] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,-0x1 MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x18] ADD EAX,-0x1 MOV dword ptr [RSP + 0x18],EAX JMP 0x001dc3f9 LAB_001dc440: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001db390 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x14],0x0 LEA RDX,[RSP + 0x14] CALL 0x001dc5b0 MOV RAX,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x24] MOV ECX,dword ptr [RAX + 0xa0] SUB ECX,EDX MOV dword ptr [RAX + 0xa0],ECX LAB_001dc47a: ADD RSP,0x38 RET
/* fmt::v10::detail::bigint::align(fmt::v10::detail::bigint const&) */ void __thiscall fmt::v10::detail::bigint::align(bigint *this,bigint *param_1) { uint uVar1; uint *puVar2; uint local_24; int local_20; int local_1c; int local_18; int local_14; bigint *local_10; bigint *local_8; local_14 = *(int *)(this + 0xa0) - *(int *)(param_1 + 0xa0); if (0 < local_14) { local_10 = param_1; local_8 = this; local_18 = buffer<unsigned_int>::size((buffer<unsigned_int> *)this); uVar1 = to_unsigned<int>(local_18 + local_14); basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::resize ((basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *)this, (ulong)uVar1); local_1c = local_18 + -1; local_20 = local_1c + local_14; for (; -1 < local_1c; local_1c = local_1c + -1) { puVar2 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)this,local_1c); uVar1 = *puVar2; puVar2 = buffer<unsigned_int>::operator[]<int>((buffer<unsigned_int> *)this,local_20); *puVar2 = uVar1; local_20 = local_20 + -1; } puVar2 = (uint *)buffer<unsigned_int>::data((buffer<unsigned_int> *)this); local_24 = 0; std::uninitialized_fill_n<unsigned_int*,int,unsigned_int>(puVar2,local_14,&local_24); *(int *)(this + 0xa0) = *(int *)(this + 0xa0) - local_14; } return; }
10,159
js_shr_slow
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_shr_slow(JSContext *ctx, JSValue *sp) { JSValue op1, op2; uint32_t v1, v2, r; op1 = sp[-2]; op2 = sp[-1]; op1 = JS_ToNumericFree(ctx, op1); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToNumericFree(ctx, op2); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } if ((JS_VALUE_GET_TAG(op1) == JS_TAG_BIG_INT || JS_VALUE_GET_TAG(op2) == JS_TAG_BIG_INT)) { JS_ThrowTypeError(ctx, "BigInt operands are forbidden for >>>"); JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); goto exception; } /* cannot give an exception */ JS_ToUint32Free(ctx, &v1, op1); JS_ToUint32Free(ctx, &v2, op2); r = v1 >> (v2 & 0x1f); sp[-2] = js_uint32(r); return 0; exception: sp[-2] = JS_UNDEFINED; sp[-1] = JS_UNDEFINED; return -1; }
O0
c
js_shr_slow: subq $0xb8, %rsp movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq -0x20(%rax), %rcx movq %rcx, 0x90(%rsp) movq -0x18(%rax), %rax movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rax movq -0x10(%rax), %rcx movq %rcx, 0x80(%rsp) movq -0x8(%rax), %rax movq %rax, 0x88(%rsp) movq 0xa8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x6f770 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x6af74 movq 0xa8(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 jmp 0x6b106 movq 0xa8(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x6f770 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x6aff1 movq 0xa8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 jmp 0x6b106 movq 0x98(%rsp), %rax cmpl $-0x9, %eax je 0x6b00b movq 0x88(%rsp), %rax cmpl $-0x9, %eax jne 0x6b06a movq 0xa8(%rsp), %rdi leaq 0xa1f7f(%rip), %rsi # 0x10cf99 movb $0x0, %al callq 0x2c040 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0xa8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 movq 0xa8(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 jmp 0x6b106 movq 0xa8(%rsp), %rdi movq 0x90(%rsp), %rdx movq 0x98(%rsp), %rcx leaq 0x7c(%rsp), %rsi callq 0x6c950 movq 0xa8(%rsp), %rdi movq 0x80(%rsp), %rdx movq 0x88(%rsp), %rcx leaq 0x78(%rsp), %rsi callq 0x6c950 movl 0x7c(%rsp), %eax movl 0x78(%rsp), %ecx andl $0x1f, %ecx shrl %cl, %eax movl %eax, 0x74(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x74(%rsp), %edi callq 0x328a0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rcx movq %rcx, -0x20(%rax) movq 0x38(%rsp), %rcx movq %rcx, -0x18(%rax) movl $0x0, 0xb4(%rsp) jmp 0x6b167 movq 0xa0(%rsp), %rax movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, -0x20(%rax) movq 0x28(%rsp), %rcx movq %rcx, -0x18(%rax) movq 0xa0(%rsp), %rax movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, -0x10(%rax) movq 0x18(%rsp), %rcx movq %rcx, -0x8(%rax) movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF movl 0xb4(%rsp), %eax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_shr_slow: sub rsp, 0B8h mov [rsp+0B8h+var_10], rdi mov [rsp+0B8h+var_18], rsi mov rax, [rsp+0B8h+var_18] mov rcx, [rax-20h] mov [rsp+0B8h+var_28], rcx mov rax, [rax-18h] mov [rsp+0B8h+var_20], rax mov rax, [rsp+0B8h+var_18] mov rcx, [rax-10h] mov [rsp+0B8h+var_38], rcx mov rax, [rax-8] mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_28] mov rdx, [rsp+0B8h+var_20] call JS_ToNumericFree mov [rsp+0B8h+var_58], rax mov [rsp+0B8h+var_50], rdx mov rax, [rsp+0B8h+var_58] mov [rsp+0B8h+var_28], rax mov rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_20], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_20] call JS_IsException_1 cmp eax, 0 jz short loc_6AF74 mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue jmp loc_6B106 loc_6AF74: mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_ToNumericFree mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_60], rdx mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_38], rax mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_6AFF1 mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_28] mov rdx, [rsp+0B8h+var_20] call JS_FreeValue jmp loc_6B106 loc_6AFF1: mov rax, [rsp+0B8h+var_20] cmp eax, 0FFFFFFF7h jz short loc_6B00B mov rax, [rsp+0B8h+var_30] cmp eax, 0FFFFFFF7h jnz short loc_6B06A loc_6B00B: mov rdi, [rsp+0B8h+var_10] lea rsi, aBigintOperands; "BigInt operands are forbidden for >>>" mov al, 0 call JS_ThrowTypeError mov [rsp+0B8h+var_78], rax mov [rsp+0B8h+var_70], rdx mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_28] mov rdx, [rsp+0B8h+var_20] call JS_FreeValue mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue jmp loc_6B106 loc_6B06A: mov rdi, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_28] mov rcx, [rsp+0B8h+var_20] lea rsi, [rsp+0B8h+var_3C] call JS_ToUint32Free mov rdi, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_38] mov rcx, [rsp+0B8h+var_30] lea rsi, [rsp+0B8h+var_40] call JS_ToUint32Free mov eax, [rsp+0B8h+var_3C] mov ecx, [rsp+0B8h+var_40] and ecx, 1Fh shr eax, cl mov [rsp+0B8h+var_44], eax mov rax, [rsp+0B8h+var_18] mov [rsp+0B8h+var_B0], rax mov edi, [rsp+0B8h+var_44] call js_uint32 mov rcx, rax mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_88], rcx mov [rsp+0B8h+var_80], rdx mov rcx, [rsp+0B8h+var_88] mov [rax-20h], rcx mov rcx, [rsp+0B8h+var_80] mov [rax-18h], rcx mov [rsp+0B8h+var_4], 0 jmp short loc_6B167 loc_6B106: mov rax, [rsp+0B8h+var_18] mov dword ptr [rsp+0B8h+var_98], 0 mov [rsp+0B8h+var_90], 3 mov rcx, [rsp+0B8h+var_98] mov [rax-20h], rcx mov rcx, [rsp+0B8h+var_90] mov [rax-18h], rcx mov rax, [rsp+0B8h+var_18] mov dword ptr [rsp+0B8h+var_A8], 0 mov [rsp+0B8h+var_A0], 3 mov rcx, [rsp+0B8h+var_A8] mov [rax-10h], rcx mov rcx, [rsp+0B8h+var_A0] mov [rax-8], rcx mov [rsp+0B8h+var_4], 0FFFFFFFFh loc_6B167: mov eax, [rsp+0B8h+var_4] add rsp, 0B8h retn
long long js_shr_slow( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rdx long long v11; // rdx long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rdx long long v19; // rax long long v20; // rax char v22; // [rsp+0h] [rbp-B8h] long long v23; // [rsp+8h] [rbp-B0h] long long v24; // [rsp+10h] [rbp-A8h] long long v25; // [rsp+20h] [rbp-98h] int v26; // [rsp+78h] [rbp-40h] BYREF unsigned int v27; // [rsp+7Ch] [rbp-3Ch] BYREF long long v28; // [rsp+80h] [rbp-38h] long long v29; // [rsp+88h] [rbp-30h] long long v30; // [rsp+90h] [rbp-28h] long long v31; // [rsp+98h] [rbp-20h] long long v32; // [rsp+A0h] [rbp-18h] long long v33; // [rsp+A8h] [rbp-10h] v33 = a1; v32 = a2; v30 = *(_QWORD *)(a2 - 32); v31 = *(_QWORD *)(a2 - 24); v28 = *(_QWORD *)(a2 - 16); v29 = *(_QWORD *)(a2 - 8); v30 = JS_ToNumericFree(a1, v30, v31); v31 = v10; if ( JS_IsException_1(v30, v10) ) { JS_FreeValue(v33, v28, v29); LABEL_9: v19 = v32; LODWORD(v25) = 0; *(_QWORD *)(v32 - 32) = v25; *(_QWORD *)(v19 - 24) = 3LL; v20 = v32; LODWORD(v24) = 0; *(_QWORD *)(v32 - 16) = v24; *(_QWORD *)(v20 - 8) = 3LL; return (unsigned int)-1; } v28 = JS_ToNumericFree(v33, v28, v29); v29 = v11; if ( JS_IsException_1(v28, v11) ) { JS_FreeValue(v33, v30, v31); goto LABEL_9; } if ( (_DWORD)v31 == -9 || (_DWORD)v29 == -9 ) { JS_ThrowTypeError( v33, (long long)"BigInt operands are forbidden for >>>", v12, v13, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v22); JS_FreeValue(v33, v30, v31); JS_FreeValue(v33, v28, v29); goto LABEL_9; } JS_ToUint32Free(v33, &v27, v30, v31); JS_ToUint32Free(v33, &v26, v28, v29); v23 = v32; *(_QWORD *)(v23 - 32) = js_uint32(v27 >> (v26 & 0x1F)); *(_QWORD *)(v23 - 24) = v18; return 0; }
js_shr_slow: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa8],RDI MOV qword ptr [RSP + 0xa0],RSI MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RAX + -0x20] MOV qword ptr [RSP + 0x90],RCX MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RAX + -0x10] MOV qword ptr [RSP + 0x80],RCX MOV RAX,qword ptr [RAX + -0x8] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x0016f770 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00122a00 CMP EAX,0x0 JZ 0x0016af74 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 JMP 0x0016b106 LAB_0016af74: MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x0016f770 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00122a00 CMP EAX,0x0 JZ 0x0016aff1 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 JMP 0x0016b106 LAB_0016aff1: MOV RAX,qword ptr [RSP + 0x98] CMP EAX,-0x9 JZ 0x0016b00b MOV RAX,qword ptr [RSP + 0x88] CMP EAX,-0x9 JNZ 0x0016b06a LAB_0016b00b: MOV RDI,qword ptr [RSP + 0xa8] LEA RSI,[0x20cf99] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 JMP 0x0016b106 LAB_0016b06a: MOV RDI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0x98] LEA RSI,[RSP + 0x7c] CALL 0x0016c950 MOV RDI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x88] LEA RSI,[RSP + 0x78] CALL 0x0016c950 MOV EAX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] AND ECX,0x1f SHR EAX,CL MOV dword ptr [RSP + 0x74],EAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x74] CALL 0x001328a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x38],RDX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + -0x20],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + -0x18],RCX MOV dword ptr [RSP + 0xb4],0x0 JMP 0x0016b167 LAB_0016b106: MOV RAX,qword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + -0x20],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + -0x18],RCX MOV RAX,qword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + -0x10],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + -0x8],RCX MOV dword ptr [RSP + 0xb4],0xffffffff LAB_0016b167: MOV EAX,dword ptr [RSP + 0xb4] ADD RSP,0xb8 RET
int4 js_shr_slow(int8 param_1,long param_2) { long lVar1; int iVar2; int1 auVar3 [16]; uint uStack_a4; uint uStack_94; byte local_40 [4]; uint local_3c; int1 local_38 [16]; int1 local_28 [16]; long local_18; int8 local_10; local_28._0_8_ = *(int8 *)(param_2 + -0x20); local_28._8_8_ = *(int8 *)(param_2 + -0x18); local_38._0_8_ = *(int8 *)(param_2 + -0x10); local_38._8_8_ = *(int8 *)(param_2 + -8); local_18 = param_2; local_10 = param_1; local_28 = JS_ToNumericFree(param_1,local_28._0_8_,local_28._8_8_); iVar2 = JS_IsException(local_28._0_8_,local_28._8_8_); if (iVar2 == 0) { local_38 = JS_ToNumericFree(local_10,local_38._0_8_,local_38._8_8_); iVar2 = JS_IsException(local_38._0_8_,local_38._8_8_); if (iVar2 == 0) { if ((local_28._8_4_ != -9) && (local_38._8_4_ != -9)) { JS_ToUint32Free(local_10,&local_3c,local_28._0_8_,local_28._8_8_); JS_ToUint32Free(local_10,local_40,local_38._0_8_,local_38._8_8_); lVar1 = local_18; auVar3 = js_uint32(local_3c >> (local_40[0] & 0x1f)); *(int1 (*) [16])(lVar1 + -0x20) = auVar3; return 0; } JS_ThrowTypeError(local_10,"BigInt operands are forbidden for >>>"); JS_FreeValue(local_10,local_28._0_8_,local_28._8_8_); JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_); } else { JS_FreeValue(local_10,local_28._0_8_,local_28._8_8_); } } else { JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_); } *(ulong *)(local_18 + -0x20) = (ulong)uStack_94 << 0x20; *(int8 *)(local_18 + -0x18) = 3; *(ulong *)(local_18 + -0x10) = (ulong)uStack_a4 << 0x20; *(int8 *)(local_18 + -8) = 3; return 0xffffffff; }
10,160
js_shr_slow
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_shr_slow(JSContext *ctx, JSValue *sp) { JSValue op1, op2; uint32_t v1, v2, r; op1 = sp[-2]; op2 = sp[-1]; op1 = JS_ToNumericFree(ctx, op1); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToNumericFree(ctx, op2); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } if ((JS_VALUE_GET_TAG(op1) == JS_TAG_BIG_INT || JS_VALUE_GET_TAG(op2) == JS_TAG_BIG_INT)) { JS_ThrowTypeError(ctx, "BigInt operands are forbidden for >>>"); JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); goto exception; } /* cannot give an exception */ JS_ToUint32Free(ctx, &v1, op1); JS_ToUint32Free(ctx, &v2, op2); r = v1 >> (v2 & 0x1f); sp[-2] = js_uint32(r); return 0; exception: sp[-2] = JS_UNDEFINED; sp[-1] = JS_UNDEFINED; return -1; }
O1
c
js_shr_slow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq -0x20(%rsi), %rsi movq -0x18(%rbx), %rdx movq -0x10(%rbx), %rbp movq -0x8(%rbx), %r13 movl $0x1, %ecx callq 0x41f0c movq %rdx, %r15 movl %r15d, %r12d cmpq $0x6, %r12 jne 0x40347 movq 0x18(%r14), %rdi movq %rbp, %rsi movq %r13, %rdx jmp 0x4037a movq %rax, 0x8(%rsp) movq %r14, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x41f0c movq %rax, %rbp movq %rdx, %r13 movl %r13d, %eax cmpq $0x6, %rax jne 0x403a8 movq 0x18(%r14), %rdi movq 0x8(%rsp), %rsi movq %r15, %rdx callq 0x1ccb2 xorl %eax, %eax movl %eax, -0x20(%rbx) movl $0x3, %ecx movq %rcx, -0x18(%rbx) movl %eax, -0x10(%rbx) movq %rcx, -0x8(%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xfffffff7, %ecx # imm = 0xFFFFFFF7 cmpl %ecx, %r12d je 0x40412 cmpl %ecx, %eax je 0x40412 leaq 0x14(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi movq 0x8(%rsp), %rdx movq %r15, %rcx callq 0x26daf leaq 0x10(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r13, %rcx callq 0x26daf movl (%r12), %edx movb (%r15), %cl shrl %cl, %edx xorl %eax, %eax testl %edx, %edx cvtsi2sd %rdx, %xmm0 movq %xmm0, %rcx cmovnsq %rdx, %rcx movl $0x7, %edx cmovnsq %rax, %rdx movq %rcx, -0x20(%rbx) movq %rdx, -0x18(%rbx) jmp 0x40399 leaq 0x5db84(%rip), %rsi # 0x9df9d movq %r14, %rdi xorl %eax, %eax callq 0x21953 movq 0x18(%r14), %rdi movq 0x8(%rsp), %rsi movq %r15, %rdx callq 0x1ccb2 jmp 0x4033b
js_shr_slow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov rsi, [rsi-20h] mov rdx, [rbx-18h] mov rbp, [rbx-10h] mov r13, [rbx-8] mov ecx, 1 call JS_ToNumberHintFree mov r15, rdx mov r12d, r15d cmp r12, 6 jnz short loc_40347 loc_4033B: mov rdi, [r14+18h] mov rsi, rbp mov rdx, r13 jmp short loc_4037A loc_40347: mov [rsp+48h+var_40], rax mov rdi, r14 mov rsi, rbp mov rdx, r13 mov ecx, 1 call JS_ToNumberHintFree mov rbp, rax mov r13, rdx mov eax, r13d cmp rax, 6 jnz short loc_403A8 mov rdi, [r14+18h] mov rsi, [rsp+48h+var_40] mov rdx, r15 loc_4037A: call JS_FreeValueRT xor eax, eax mov [rbx-20h], eax mov ecx, 3 mov [rbx-18h], rcx mov [rbx-10h], eax mov [rbx-8], rcx mov eax, 0FFFFFFFFh loc_40399: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_403A8: mov ecx, 0FFFFFFF7h cmp r12d, ecx jz short loc_40412 cmp eax, ecx jz short loc_40412 lea r12, [rsp+48h+var_34] mov rdi, r14 mov rsi, r12 mov rdx, [rsp+48h+var_40] mov rcx, r15 call JS_ToInt32Free lea r15, [rsp+48h+var_38] mov rdi, r14 mov rsi, r15 mov rdx, rbp mov rcx, r13 call JS_ToInt32Free mov edx, [r12] mov cl, [r15] shr edx, cl xor eax, eax test edx, edx cvtsi2sd xmm0, rdx movq rcx, xmm0 cmovns rcx, rdx mov edx, 7 cmovns rdx, rax mov [rbx-20h], rcx mov [rbx-18h], rdx jmp short loc_40399 loc_40412: lea rsi, aBigintOperands; "BigInt operands are forbidden for >>>" mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov rdi, [r14+18h] mov rsi, [rsp+48h+var_40] mov rdx, r15 call JS_FreeValueRT jmp loc_4033B
long long js_shr_slow( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { unsigned long long v11; // rbp long long v12; // r13 long long v13; // rax long long v14; // rdx long long v15; // r15 int v16; // r12d long long v17; // rdi _DWORD *v18; // rsi long long v19; // rdx long long v20; // rdx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long result; // rax char v26; // [rsp+0h] [rbp-48h] _DWORD *v27; // [rsp+8h] [rbp-40h] int v28; // [rsp+10h] [rbp-38h] BYREF unsigned int v29[13]; // [rsp+14h] [rbp-34h] BYREF v11 = *(_QWORD *)(a2 - 16); v12 = *(_QWORD *)(a2 - 8); v13 = JS_ToNumberHintFree(a1, *(_QWORD *)(a2 - 32), *(_QWORD *)(a2 - 24), 1LL); v15 = v14; v16 = v14; if ( (unsigned int)v14 == 6LL ) goto LABEL_2; v27 = (_DWORD *)v13; v11 = JS_ToNumberHintFree(a1, v11, v12, 1LL); v12 = v20; if ( (unsigned int)v20 == 6LL ) { v17 = *(_QWORD *)(a1 + 24); v18 = v27; v19 = v15; goto LABEL_5; } if ( v16 == -9 || (_DWORD)v20 == -9 ) { JS_ThrowTypeError( a1, (long long)"BigInt operands are forbidden for >>>", v20, 4294967287LL, v21, v22, a3, a4, a5, a6, v23, v24, a9, a10, v26); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v27, v15); LABEL_2: v17 = *(_QWORD *)(a1 + 24); v18 = (_DWORD *)v11; v19 = v12; LABEL_5: JS_FreeValueRT(v17, v18, v19); *(_DWORD *)(a2 - 32) = 0; *(_QWORD *)(a2 - 24) = 3LL; *(_DWORD *)(a2 - 16) = 0; *(_QWORD *)(a2 - 8) = 3LL; return 0xFFFFFFFFLL; } JS_ToInt32Free(a1, (int *)v29, (unsigned long long)v27, v15); JS_ToInt32Free(a1, &v28, v11, v12); result = 0LL; *(_QWORD *)(a2 - 32) = v29[0] >> v28; *(_QWORD *)(a2 - 24) = 0LL; return result; }
js_shr_slow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI + -0x20] MOV RDX,qword ptr [RBX + -0x18] MOV RBP,qword ptr [RBX + -0x10] MOV R13,qword ptr [RBX + -0x8] MOV ECX,0x1 CALL 0x00141f0c MOV R15,RDX MOV R12D,R15D CMP R12,0x6 JNZ 0x00140347 LAB_0014033b: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,RBP MOV RDX,R13 JMP 0x0014037a LAB_00140347: MOV qword ptr [RSP + 0x8],RAX MOV RDI,R14 MOV RSI,RBP MOV RDX,R13 MOV ECX,0x1 CALL 0x00141f0c MOV RBP,RAX MOV R13,RDX MOV EAX,R13D CMP RAX,0x6 JNZ 0x001403a8 MOV RDI,qword ptr [R14 + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R15 LAB_0014037a: CALL 0x0011ccb2 XOR EAX,EAX MOV dword ptr [RBX + -0x20],EAX MOV ECX,0x3 MOV qword ptr [RBX + -0x18],RCX MOV dword ptr [RBX + -0x10],EAX MOV qword ptr [RBX + -0x8],RCX MOV EAX,0xffffffff LAB_00140399: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001403a8: MOV ECX,0xfffffff7 CMP R12D,ECX JZ 0x00140412 CMP EAX,ECX JZ 0x00140412 LEA R12,[RSP + 0x14] MOV RDI,R14 MOV RSI,R12 MOV RDX,qword ptr [RSP + 0x8] MOV RCX,R15 CALL 0x00126daf LEA R15,[RSP + 0x10] MOV RDI,R14 MOV RSI,R15 MOV RDX,RBP MOV RCX,R13 CALL 0x00126daf MOV EDX,dword ptr [R12] MOV CL,byte ptr [R15] SHR EDX,CL XOR EAX,EAX TEST EDX,EDX CVTSI2SD XMM0,RDX MOVQ RCX,XMM0 CMOVNS RCX,RDX MOV EDX,0x7 CMOVNS RDX,RAX MOV qword ptr [RBX + -0x20],RCX MOV qword ptr [RBX + -0x18],RDX JMP 0x00140399 LAB_00140412: LEA RSI,[0x19df9d] MOV RDI,R14 XOR EAX,EAX CALL 0x00121953 MOV RDI,qword ptr [R14 + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R15 CALL 0x0011ccb2 JMP 0x0014033b
int8 js_shr_slow(long param_1,long param_2) { int8 uVar1; double dVar2; ulong uVar3; int8 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; byte local_38 [4]; uint local_34; uVar4 = *(int8 *)*(int1 (*) [16])(param_2 + -0x10); uVar1 = *(int8 *)(param_2 + -8); auVar6 = *(int1 (*) [16])(param_2 + -0x10); auVar5 = JS_ToNumberHintFree(param_1,*(int8 *)(param_2 + -0x20), *(int8 *)(param_2 + -0x18),1); uVar3 = auVar5._8_8_; if ((uVar3 & 0xffffffff) != 6) { auVar6 = JS_ToNumberHintFree(param_1,uVar4,uVar1,1); if ((auVar6._8_8_ & 0xffffffff) == 6) { uVar4 = *(int8 *)(param_1 + 0x18); goto LAB_0014037a; } if ((auVar5._8_4_ != -9) && (auVar6._8_4_ != -9)) { JS_ToInt32Free(param_1,&local_34,auVar5._0_8_,uVar3); JS_ToInt32Free(param_1,local_38,auVar6._0_8_,auVar6._8_8_); local_34 = local_34 >> (local_38[0] & 0x1f); dVar2 = (double)local_34; if (-1 < (int)local_34) { dVar2 = (double)(ulong)local_34; } uVar4 = 7; if (-1 < (int)local_34) { uVar4 = 0; } *(double *)(param_2 + -0x20) = dVar2; *(int8 *)(param_2 + -0x18) = uVar4; return 0; } JS_ThrowTypeError(param_1,"BigInt operands are forbidden for >>>"); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar5._0_8_,uVar3); } auVar5 = auVar6; uVar4 = *(int8 *)(param_1 + 0x18); LAB_0014037a: JS_FreeValueRT(uVar4,auVar5._0_8_,auVar5._8_8_); *(int4 *)(param_2 + -0x20) = 0; *(int8 *)(param_2 + -0x18) = 3; *(int4 *)(param_2 + -0x10) = 0; *(int8 *)(param_2 + -8) = 3; return 0xffffffff; }
10,161
js_shr_slow
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_shr_slow(JSContext *ctx, JSValue *sp) { JSValue op1, op2; uint32_t v1, v2, r; op1 = sp[-2]; op2 = sp[-1]; op1 = JS_ToNumericFree(ctx, op1); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToNumericFree(ctx, op2); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } if ((JS_VALUE_GET_TAG(op1) == JS_TAG_BIG_INT || JS_VALUE_GET_TAG(op2) == JS_TAG_BIG_INT)) { JS_ThrowTypeError(ctx, "BigInt operands are forbidden for >>>"); JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); goto exception; } /* cannot give an exception */ JS_ToUint32Free(ctx, &v1, op1); JS_ToUint32Free(ctx, &v2, op2); r = v1 >> (v2 & 0x1f); sp[-2] = js_uint32(r); return 0; exception: sp[-2] = JS_UNDEFINED; sp[-1] = JS_UNDEFINED; return -1; }
O3
c
js_shr_slow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq -0x20(%rsi), %rsi movq -0x18(%rbx), %rdx movq -0x10(%rbx), %r13 movq -0x8(%rbx), %r15 movl $0x1, %ecx callq 0x43a59 movq %rdx, %r12 movl %r12d, %ebp cmpq $0x6, %rbp jne 0x41cd2 cmpl $-0x9, %r15d jb 0x41dd4 movq 0x18(%r14), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x41dd4 movq %r13, %rsi movq %r15, %rdx jmp 0x41d1f movq %rax, 0x8(%rsp) movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x43a59 movq %rax, %r13 movq %rdx, %r15 movl %r15d, %eax cmpq $0x6, %rax jne 0x41d29 cmpl $-0x9, %r12d movq 0x8(%rsp), %rsi jb 0x41dd4 movq 0x18(%r14), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x41dd4 movq %r12, %rdx callq 0x20d90 jmp 0x41dd4 movl $0xfffffff7, %ecx # imm = 0xFFFFFFF7 cmpl %ecx, %ebp je 0x41d92 cmpl %ecx, %eax je 0x41d92 leaq 0x14(%rsp), %rbp movq %r14, %rdi movq %rbp, %rsi movq 0x8(%rsp), %rdx movq %r12, %rcx callq 0x27408 leaq 0x10(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %r15, %rcx callq 0x27408 movl (%rbp), %edx movb (%r12), %cl shrl %cl, %edx xorl %eax, %eax testl %edx, %edx cvtsi2sd %rdx, %xmm0 movq %xmm0, %rcx cmovnsq %rdx, %rcx movl $0x7, %edx cmovnsq %rax, %rdx movq %rcx, -0x20(%rbx) movq %rdx, -0x18(%rbx) jmp 0x41dee leaq 0x5f1d4(%rip), %rsi # 0xa0f6d movq %r14, %rdi xorl %eax, %eax callq 0x2214f movq 0x18(%r14), %rdi cmpl $-0x9, %r12d jb 0x41dca movq 0x8(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x41dca movq %r12, %rdx callq 0x20d90 movq 0x18(%r14), %rdi cmpl $-0x9, %r15d jae 0x41cb6 xorl %eax, %eax movl %eax, -0x20(%rbx) movl $0x3, %ecx movq %rcx, -0x18(%rbx) movl %eax, -0x10(%rbx) movq %rcx, -0x8(%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_shr_slow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov rsi, [rsi-20h] mov rdx, [rbx-18h] mov r13, [rbx-10h] mov r15, [rbx-8] mov ecx, 1 call JS_ToNumberHintFree mov r12, rdx mov ebp, r12d cmp rbp, 6 jnz short loc_41CD2 cmp r15d, 0FFFFFFF7h jb loc_41DD4 mov rdi, [r14+18h] loc_41CB6: mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg loc_41DD4 mov rsi, r13 mov rdx, r15 jmp short loc_41D1F loc_41CD2: mov [rsp+48h+var_40], rax mov rdi, r14 mov rsi, r13 mov rdx, r15 mov ecx, 1 call JS_ToNumberHintFree mov r13, rax mov r15, rdx mov eax, r15d cmp rax, 6 jnz short loc_41D29 cmp r12d, 0FFFFFFF7h mov rsi, [rsp+48h+var_40] jb loc_41DD4 mov rdi, [r14+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg loc_41DD4 mov rdx, r12 loc_41D1F: call js_free_value_rt jmp loc_41DD4 loc_41D29: mov ecx, 0FFFFFFF7h cmp ebp, ecx jz short loc_41D92 cmp eax, ecx jz short loc_41D92 lea rbp, [rsp+48h+var_34] mov rdi, r14 mov rsi, rbp mov rdx, [rsp+48h+var_40] mov rcx, r12 call JS_ToInt32Free lea r12, [rsp+48h+var_38] mov rdi, r14 mov rsi, r12 mov rdx, r13 mov rcx, r15 call JS_ToInt32Free mov edx, [rbp+0] mov cl, [r12] shr edx, cl xor eax, eax test edx, edx cvtsi2sd xmm0, rdx movq rcx, xmm0 cmovns rcx, rdx mov edx, 7 cmovns rdx, rax mov [rbx-20h], rcx mov [rbx-18h], rdx jmp short loc_41DEE loc_41D92: lea rsi, aBigintOperands; "BigInt operands are forbidden for >>>" mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov rdi, [r14+18h] cmp r12d, 0FFFFFFF7h jb short loc_41DCA mov rsi, [rsp+48h+var_40] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_41DCA mov rdx, r12 call js_free_value_rt mov rdi, [r14+18h] loc_41DCA: cmp r15d, 0FFFFFFF7h jnb loc_41CB6 loc_41DD4: xor eax, eax mov [rbx-20h], eax mov ecx, 3 mov [rbx-18h], rcx mov [rbx-10h], eax mov [rbx-8], rcx mov eax, 0FFFFFFFFh loc_41DEE: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_shr_slow( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { int *v12; // r13 long long v13; // r15 long long v14; // rax long long v15; // r8 long long v16; // r9 long long v17; // rdx long long v18; // r12 int v19; // ebp long long v20; // rdi int v21; // eax long long v22; // rcx int *v23; // rsi long long v24; // rdx long long v25; // rdx __m128 v26; // xmm4 __m128 v27; // xmm5 int v28; // eax long long result; // rax int v30; // eax long long v31; // rcx char v32; // [rsp+0h] [rbp-48h] int *v33; // [rsp+8h] [rbp-40h] int v34; // [rsp+10h] [rbp-38h] BYREF unsigned int v35[13]; // [rsp+14h] [rbp-34h] BYREF v12 = *(int **)(a2 - 16); v13 = *(_QWORD *)(a2 - 8); v14 = JS_ToNumberHintFree(a1, *(_QWORD *)(a2 - 32), *(_QWORD *)(a2 - 24), 1LL); v18 = v17; v19 = v17; if ( (unsigned int)v17 == 6LL ) { if ( (unsigned int)v13 < 0xFFFFFFF7 ) goto LABEL_18; v20 = *(_QWORD *)(a1 + 24); goto LABEL_4; } v33 = (int *)v14; v12 = (int *)JS_ToNumberHintFree(a1, v12, v13, 1LL); v13 = v25; if ( (unsigned int)v25 == 6LL ) { v23 = v33; if ( (unsigned int)v18 < 0xFFFFFFF7 ) goto LABEL_18; v20 = *(_QWORD *)(a1 + 24); v28 = *v33; v22 = (unsigned int)(*v33 - 1); *v33 = v22; if ( v28 > 1 ) goto LABEL_18; v24 = v18; goto LABEL_10; } if ( v19 != -9 && (_DWORD)v25 != -9 ) { JS_ToInt32Free(a1, (int *)v35, (unsigned long long)v33, v18); JS_ToInt32Free(a1, &v34, (unsigned long long)v12, v13); result = 0LL; *(_QWORD *)(a2 - 32) = v35[0] >> v34; *(_QWORD *)(a2 - 24) = 0LL; return result; } JS_ThrowTypeError( a1, (long long)"BigInt operands are forbidden for >>>", v25, 4294967287LL, v15, v16, a3, a4, a5, a6, v26, v27, a9, a10, v32); v20 = *(_QWORD *)(a1 + 24); if ( (unsigned int)v18 >= 0xFFFFFFF7 ) { v30 = *v33; v31 = (unsigned int)(*v33 - 1); *v33 = v31; if ( v30 <= 1 ) { js_free_value_rt(v20, v33, v18, v31, v15, v16); v20 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)v13 >= 0xFFFFFFF7 ) { LABEL_4: v21 = *v12; v22 = (unsigned int)(*v12 - 1); *v12 = v22; if ( v21 <= 1 ) { v23 = v12; v24 = v13; LABEL_10: js_free_value_rt(v20, v23, v24, v22, v15, v16); } } LABEL_18: *(_DWORD *)(a2 - 32) = 0; *(_QWORD *)(a2 - 24) = 3LL; *(_DWORD *)(a2 - 16) = 0; *(_QWORD *)(a2 - 8) = 3LL; return 0xFFFFFFFFLL; }
js_shr_slow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI + -0x20] MOV RDX,qword ptr [RBX + -0x18] MOV R13,qword ptr [RBX + -0x10] MOV R15,qword ptr [RBX + -0x8] MOV ECX,0x1 CALL 0x00143a59 MOV R12,RDX MOV EBP,R12D CMP RBP,0x6 JNZ 0x00141cd2 CMP R15D,-0x9 JC 0x00141dd4 MOV RDI,qword ptr [R14 + 0x18] LAB_00141cb6: MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x00141dd4 MOV RSI,R13 MOV RDX,R15 JMP 0x00141d1f LAB_00141cd2: MOV qword ptr [RSP + 0x8],RAX MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 MOV ECX,0x1 CALL 0x00143a59 MOV R13,RAX MOV R15,RDX MOV EAX,R15D CMP RAX,0x6 JNZ 0x00141d29 CMP R12D,-0x9 MOV RSI,qword ptr [RSP + 0x8] JC 0x00141dd4 MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00141dd4 MOV RDX,R12 LAB_00141d1f: CALL 0x00120d90 JMP 0x00141dd4 LAB_00141d29: MOV ECX,0xfffffff7 CMP EBP,ECX JZ 0x00141d92 CMP EAX,ECX JZ 0x00141d92 LEA RBP,[RSP + 0x14] MOV RDI,R14 MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x8] MOV RCX,R12 CALL 0x00127408 LEA R12,[RSP + 0x10] MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV RCX,R15 CALL 0x00127408 MOV EDX,dword ptr [RBP] MOV CL,byte ptr [R12] SHR EDX,CL XOR EAX,EAX TEST EDX,EDX CVTSI2SD XMM0,RDX MOVQ RCX,XMM0 CMOVNS RCX,RDX MOV EDX,0x7 CMOVNS RDX,RAX MOV qword ptr [RBX + -0x20],RCX MOV qword ptr [RBX + -0x18],RDX JMP 0x00141dee LAB_00141d92: LEA RSI,[0x1a0f6d] MOV RDI,R14 XOR EAX,EAX CALL 0x0012214f MOV RDI,qword ptr [R14 + 0x18] CMP R12D,-0x9 JC 0x00141dca MOV RSI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00141dca MOV RDX,R12 CALL 0x00120d90 MOV RDI,qword ptr [R14 + 0x18] LAB_00141dca: CMP R15D,-0x9 JNC 0x00141cb6 LAB_00141dd4: XOR EAX,EAX MOV dword ptr [RBX + -0x20],EAX MOV ECX,0x3 MOV qword ptr [RBX + -0x18],RCX MOV dword ptr [RBX + -0x10],EAX MOV qword ptr [RBX + -0x8],RCX MOV EAX,0xffffffff LAB_00141dee: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 js_shr_slow(long param_1,long param_2) { int iVar1; int8 uVar2; int *piVar3; double dVar4; ulong uVar5; int8 uVar6; uint uVar7; int1 auVar8 [16]; int1 auVar9 [16]; byte local_38 [4]; uint local_34; uVar6 = *(int8 *)*(int1 (*) [16])(param_2 + -0x10); uVar2 = *(int8 *)(param_2 + -8); auVar9 = *(int1 (*) [16])(param_2 + -0x10); auVar8 = JS_ToNumberHintFree(param_1,*(int8 *)(param_2 + -0x20), *(int8 *)(param_2 + -0x18),1); uVar5 = auVar8._8_8_; piVar3 = auVar8._0_8_; uVar7 = auVar8._8_4_; if ((uVar5 & 0xffffffff) == 6) { if ((uint)uVar2 < 0xfffffff7) goto LAB_00141dd4; uVar6 = *(int8 *)(param_1 + 0x18); LAB_00141cb6: iVar1 = *auVar9._0_8_; *auVar9._0_8_ = iVar1 + -1; } else { auVar9 = JS_ToNumberHintFree(param_1,uVar6,uVar2,1); if ((auVar9._8_8_ & 0xffffffff) != 6) { if ((uVar7 != 0xfffffff7) && (auVar9._8_4_ != 0xfffffff7)) { JS_ToInt32Free(param_1,&local_34,piVar3,uVar5); JS_ToInt32Free(param_1,local_38,auVar9._0_8_,auVar9._8_8_); local_34 = local_34 >> (local_38[0] & 0x1f); dVar4 = (double)local_34; if (-1 < (int)local_34) { dVar4 = (double)(ulong)local_34; } uVar6 = 7; if (-1 < (int)local_34) { uVar6 = 0; } *(double *)(param_2 + -0x20) = dVar4; *(int8 *)(param_2 + -0x18) = uVar6; return 0; } JS_ThrowTypeError(param_1,"BigInt operands are forbidden for >>>"); uVar6 = *(int8 *)(param_1 + 0x18); if ((0xfffffff6 < uVar7) && (iVar1 = *piVar3, *piVar3 = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(uVar6,piVar3,uVar5); uVar6 = *(int8 *)(param_1 + 0x18); } if (auVar9._8_4_ < 0xfffffff7) goto LAB_00141dd4; goto LAB_00141cb6; } if (uVar7 < 0xfffffff7) goto LAB_00141dd4; uVar6 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar3; *piVar3 = iVar1 + -1; auVar9 = auVar8; } if (iVar1 < 2) { js_free_value_rt(uVar6,auVar9._0_8_,auVar9._8_8_); } LAB_00141dd4: *(int4 *)(param_2 + -0x20) = 0; *(int8 *)(param_2 + -0x18) = 3; *(int4 *)(param_2 + -0x10) = 0; *(int8 *)(param_2 + -8) = 3; return 0xffffffff; }
10,162
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
bool LogFileObject::CreateLogfile(const string& time_pid_string) { string string_filename = base_filename_; if (FLAGS_timestamp_in_logfile_name) { string_filename += time_pid_string; } string_filename += filename_extension_; const char* filename = string_filename.c_str(); // only write to files, create if non-existant. int flags = O_WRONLY | O_CREAT; if (FLAGS_timestamp_in_logfile_name) { // demand that the file is unique for our timestamp (fail if it exists). flags = flags | O_EXCL; } else { // logs are written to a single file, where: a log file is created for the // the first time or a file is being recreated due to exceeding max size struct stat statbuf; if (stat(filename, &statbuf) == 0) { // truncate the file if it exceeds the max size if ((static_cast<uint32>(statbuf.st_size) >> 20U) >= MaxLogSize()) { flags |= O_TRUNC; } // update file length to sync file size file_length_ = static_cast<uint32>(statbuf.st_size); } } FileDescriptor fd{ open(filename, flags, static_cast<mode_t>(FLAGS_logfile_mode))}; if (!fd) return false; #ifdef HAVE_FCNTL // Mark the file close-on-exec. We don't really care if this fails fcntl(fd.get(), F_SETFD, FD_CLOEXEC); // Mark the file as exclusive write access to avoid two clients logging to the // same file. This applies particularly when !FLAGS_timestamp_in_logfile_name // (otherwise open would fail because the O_EXCL flag on similar filename). // locks are released on unlock or close() automatically, only after log is // released. // This will work after a fork as it is not inherited (not stored in the fd). // Lock will not be lost because the file is opened with exclusive lock // (write) and we will never read from it inside the process. // TODO: windows implementation of this (as flock is not available on // mingw). static struct flock w_lock; w_lock.l_type = F_WRLCK; w_lock.l_start = 0; w_lock.l_whence = SEEK_SET; w_lock.l_len = 0; int wlock_ret = fcntl(fd.get(), F_SETLK, &w_lock); if (wlock_ret == -1) { return false; } #endif // fdopen in append mode so if the file exists it will fseek to the end file_.reset(fdopen(fd.release(), "a")); // Make a FILE*. if (file_ == nullptr) { // Man, we're screwed! if (FLAGS_timestamp_in_logfile_name) { unlink(filename); // Erase the half-baked evidence: an unusable log file, // only if we just created it. } return false; } #ifdef NGLOG_OS_WINDOWS // https://github.com/golang/go/issues/27638 - make sure we seek to the end to // append empirically replicated with wine over mingw build if (!FLAGS_timestamp_in_logfile_name) { if (fseek(file_.get(), 0, SEEK_END) != 0) { return false; } } #endif // We try to create a symlink called <program_name>.<severity>, // which is easier to use. (Every time we create a new logfile, // we destroy the old symlink and create a new one, so it always // points to the latest logfile.) If it fails, we're sad but it's // no error. if (!symlink_basename_.empty()) { // take directory from filename const char* slash = strrchr(filename, PATH_SEPARATOR); const string linkname = symlink_basename_ + '.' + LogSeverityNames[severity_]; string linkpath; if (slash) linkpath = string( filename, static_cast<size_t>(slash - filename + 1)); // get dirname linkpath += linkname; unlink(linkpath.c_str()); // delete old one if it exists #if defined(NGLOG_OS_WINDOWS) // TODO(hamaji): Create lnk file on Windows? #elif defined(HAVE_UNISTD_H) // We must have unistd.h. // Make the symlink be relative (in the same dir) so that if the // entire log directory gets relocated the link is still valid. const char* linkdest = slash ? (slash + 1) : filename; if (symlink(linkdest, linkpath.c_str()) != 0) { // silently ignore failures } // Make an additional link to the log file in a place specified by // FLAGS_log_link, if indicated if (!FLAGS_log_link.empty()) { linkpath = FLAGS_log_link + "/" + linkname; unlink(linkpath.c_str()); // delete old one if it exists if (symlink(filename, linkpath.c_str()) != 0) { // silently ignore failures } } #endif } return true; // Everything worked }
O1
cpp
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(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 $0x118, %rsp # imm = 0x118 movq %rsi, %rbx movq %rdi, %r15 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) movq 0x38(%rdi), %rsi movq 0x40(%rdi), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0x11320 movq 0x20164(%rip), %r12 # 0x39ec0 cmpb $0x1, (%r12) jne 0x19d74 movq (%rbx), %rsi movq 0x8(%rbx), %rdx leaq 0x28(%rsp), %rdi callq 0x11200 movq 0x78(%r15), %rsi movq 0x80(%r15), %rdx leaq 0x28(%rsp), %rdi callq 0x11200 movq 0x28(%rsp), %r14 movl $0xc1, %esi cmpb $0x0, (%r12) jne 0x19dec leaq 0x88(%rsp), %rsi movq %r14, %rdi callq 0x11820 movl $0x41, %esi testl %eax, %eax jne 0x19dec movl 0xb8(%rsp), %eax movq 0x2009f(%rip), %rcx # 0x39e60 movl (%rcx), %ecx movl %eax, 0xac(%r15) shrl $0x14, %eax leal -0x1(%rcx), %edx cmpl $0xfff, %edx # imm = 0xFFF movl $0x1, %edx cmovbl %ecx, %edx xorl %esi, %esi cmpl %edx, %eax setae %sil shll $0x9, %esi orl $0x41, %esi movq 0x1ffcd(%rip), %rax # 0x39dc0 movl (%rax), %edx movq %r14, %rdi xorl %eax, %eax callq 0x11660 movl %eax, %ebx cmpl $-0x1, %eax je 0x19f45 movl %ebx, %edi movl $0x2, %esi movl $0x1, %edx xorl %eax, %eax callq 0x114a0 movl $0x1, 0x30279(%rip) # 0x4a0a0 leaq 0x30272(%rip), %rdx # 0x4a0a0 xorps %xmm0, %xmm0 movups %xmm0, 0x30270(%rip) # 0x4a0a8 movl %ebx, %edi movl $0x6, %esi xorl %eax, %eax callq 0x114a0 cmpl $-0x1, %eax je 0x19f45 leaq 0x13e8e(%rip), %rsi # 0x2dce4 movl %ebx, %edi callq 0x119f0 movq 0x98(%r15), %rdi movq %rax, 0x98(%r15) testq %rdi, %rdi je 0x19e75 callq 0x118f0 cmpq $0x0, 0x98(%r15) je 0x19f31 movq 0x60(%r15), %r13 movb $0x1, %bpl movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r13, %r13 je 0x19f7e movq %r14, %rdi movl $0x2f, %esi callq 0x11a40 movq %rax, %r12 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq 0x58(%r15), %rsi addq %rsi, %r13 leaq 0x8(%rsp), %rdi movq %r13, %rdx callq 0x11320 leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rsi movl $0x1, %ecx xorl %edx, %edx movl $0x2e, %r8d callq 0x12230 movl 0xa0(%r15), %eax leaq 0x1f462(%rip), %rcx # 0x39350 movq (%rcx,%rax,8), %rsi leaq 0x8(%rsp), %rdi leaq 0x38(%rsp), %r13 callq 0x122a0 leaq 0x98(%rsp), %rsi movq %rsi, -0x10(%rsi) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x19f85 movq %rdx, 0x88(%rsp) movq (%rcx), %rdx movq %rdx, 0x98(%rsp) jmp 0x19f8b movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpb $0x1, (%r12) jne 0x19f45 movq %r14, %rdi callq 0x11380 xorl %ebp, %ebp cmpl $-0x1, %ebx je 0x19f53 movl %ebx, %edi callq 0x12310 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x19f6a movq 0x38(%rsp), %rsi incq %rsi callq 0x11960 movl %ebp, %eax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x38(%rsp), %r13 jmp 0x19f47 movups (%rcx), %xmm0 movups %xmm0, (%rsi) movq 0x8(%rax), %rdx movq %rdx, 0x90(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x19fc2 movq 0x18(%rsp), %rsi incq %rsi callq 0x11960 leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) testq %r12, %r12 je 0x1a026 leaq 0x78(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x1(%r12), %rdx leaq 0x68(%rsp), %rdi movq %r14, %rsi callq 0x11310 leaq 0x8(%rsp), %rdi leaq 0x68(%rsp), %r15 movq %r15, %rsi callq 0x11b50 movq (%r15), %rdi cmpq %r13, %rdi je 0x1a021 movq 0x78(%rsp), %rsi incq %rsi callq 0x11960 leaq 0x38(%rsp), %r13 movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x11200 movq 0x8(%rsp), %rdi callq 0x11380 leaq 0x1(%r12), %rdi testq %r12, %r12 cmoveq %r14, %rdi movq 0x8(%rsp), %rsi callq 0x11080 movq 0x1fd21(%rip), %rax # 0x39d88 movq (%rax), %rax cmpq $0x0, 0x8(%rax) je 0x1a15e leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x48(%rsp), %rdi callq 0x11320 leaq 0x135bf(%rip), %rsi # 0x2d659 leaq 0x48(%rsp), %rdi callq 0x122a0 movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0x11200 leaq 0x78(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x1a0e5 movq %rdx, 0x68(%rsp) movq (%rcx), %rdx movq %rdx, 0x78(%rsp) jmp 0x1a0ed movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x68(%rsp), %r15 movq %rdx, 0x8(%r15) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x11b50 movq (%r15), %rdi cmpq %r13, %rdi je 0x1a12b movq 0x78(%rsp), %rsi incq %rsi callq 0x11960 movq 0x48(%rsp), %rdi cmpq %r12, %rdi leaq 0x38(%rsp), %r13 je 0x1a147 movq 0x58(%rsp), %rsi incq %rsi callq 0x11960 movq 0x8(%rsp), %rdi callq 0x11380 movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x11080 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x1a17a movq 0x18(%rsp), %rsi incq %rsi callq 0x11960 movq 0x88(%rsp), %rdi leaq 0x98(%rsp), %rax cmpq %rax, %rdi je 0x19f47 movq 0x98(%rsp), %rsi incq %rsi callq 0x11960 jmp 0x19f47 jmp 0x1a1aa movq %rax, %r14 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x1a1cd movq 0x58(%rsp), %rsi incq %rsi callq 0x11960 jmp 0x1a1cd jmp 0x1a1ca jmp 0x1a1ca movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x1a1e9 movq 0x18(%rsp), %rsi incq %rsi callq 0x11960 movq 0x88(%rsp), %rdi leaq 0x98(%rsp), %rax cmpq %rax, %rdi je 0x1a22e movq 0x98(%rsp), %rsi jmp 0x1a221 jmp 0x1a20a movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x1a22e movq 0x18(%rsp), %rsi incq %rsi callq 0x11960 jmp 0x1a22e movq %rax, %r14 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x1a23c jmp 0x1a24a jmp 0x1a239 movq %rax, %r14 cmpl $-0x1, %ebx je 0x1a257 movl %ebx, %edi callq 0x12310 jmp 0x1a257 movq %rax, %rdi callq 0x1ac1f jmp 0x1a254 movq %rax, %r14 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x1a273 movq 0x38(%rsp), %rsi incq %rsi callq 0x11960 movq %r14, %rdi callq 0x121a0 nop
_ZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, rsi mov r15, rdi lea r13, [rsp+148h+var_110] mov [r13-10h], r13 mov rsi, [rdi+38h] mov rdx, [rdi+40h] add rdx, rsi lea rdi, [rsp+148h+var_120] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov r12, cs:_ZN3fLB31FLAGS_timestamp_in_logfile_nameE_ptr cmp byte ptr [r12], 1 jnz short loc_19D74 mov rsi, [rbx] mov rdx, [rbx+8] lea rdi, [rsp+148h+var_120] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) loc_19D74: mov rsi, [r15+78h] mov rdx, [r15+80h] lea rdi, [rsp+148h+var_120] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov r14, [rsp+148h+var_120] mov esi, 0C1h cmp byte ptr [r12], 0 jnz short loc_19DEC lea rsi, [rsp+148h+var_C0] mov rdi, r14 call _stat mov esi, 41h ; 'A' test eax, eax jnz short loc_19DEC mov eax, [rsp+148h+var_90] mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag mov ecx, [rcx] mov [r15+0ACh], eax shr eax, 14h lea edx, [rcx-1] cmp edx, 0FFFh mov edx, 1 cmovb edx, ecx xor esi, esi cmp eax, edx setnb sil shl esi, 9 or esi, 41h loc_19DEC: mov rax, cs:_ZN3fLI18FLAGS_logfile_modeE_ptr mov edx, [rax] mov rdi, r14 xor eax, eax call _open mov ebx, eax cmp eax, 0FFFFFFFFh jz loc_19F45 mov edi, ebx mov esi, 2 mov edx, 1 xor eax, eax call _fcntl mov cs:_ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock, 1; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock lea rdx, _ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock xorps xmm0, xmm0 movups cs:xmmword_4A0A8, xmm0 mov edi, ebx mov esi, 6 xor eax, eax call _fcntl cmp eax, 0FFFFFFFFh jz loc_19F45 lea rsi, aAlpha+4; "a" mov edi, ebx call _fdopen mov rdi, [r15+98h] mov [r15+98h], rax test rdi, rdi jz short loc_19E75 call _fclose loc_19E75: cmp qword ptr [r15+98h], 0 jz loc_19F31 mov r13, [r15+60h] mov bpl, 1 mov ebx, 0FFFFFFFFh test r13, r13 jz loc_19F7E mov rdi, r14 mov esi, 2Fh ; '/' call _strrchr mov r12, rax lea rax, [rsp+148h+var_130] mov [rax-10h], rax mov rsi, [r15+58h] add r13, rsi lea rdi, [rsp+148h+var_140] mov rdx, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+148h+var_140] mov rsi, [rdi+8] mov ecx, 1 xor edx, edx mov r8d, 2Eh ; '.' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char) mov eax, [r15+0A0h] lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rsi, [rcx+rax*8] lea rdi, [rsp+148h+var_140] lea r13, [rsp+148h+var_110] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+148h+var_B0] mov [rsi-10h], rsi mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_19F85 mov [rsp+148h+var_C0], rdx mov rdx, [rcx] mov [rsp+148h+var_B0], rdx jmp short loc_19F8B loc_19F31: mov ebx, 0FFFFFFFFh cmp byte ptr [r12], 1 jnz short loc_19F45 mov rdi, r14 call _unlink loc_19F45: xor ebp, ebp loc_19F47: cmp ebx, 0FFFFFFFFh jz short loc_19F53 mov edi, ebx call _close loc_19F53: mov rdi, [rsp+148h+var_120]; void * cmp rdi, r13 jz short loc_19F6A mov rsi, [rsp+148h+var_110] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19F6A: mov eax, ebp add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_19F7E: lea r13, [rsp+148h+var_110] jmp short loc_19F47 loc_19F85: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi], xmm0 loc_19F8B: mov rdx, [rax+8] mov [rsp+148h+var_B8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_19FC2 mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19FC2: lea rax, [rsp+148h+var_130] mov [rsp+148h+var_140], rax mov [rsp+148h+var_138], 0 mov byte ptr [rsp+148h+var_130], 0 test r12, r12 jz short loc_1A026 lea r13, [rsp+148h+var_D0] mov [r13-10h], r13 lea rdx, [r12+1] lea rdi, [rsp+148h+var_E0] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+148h+var_140] lea r15, [rsp+148h+var_E0] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r13 jz short loc_1A021 mov rsi, [rsp+148h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A021: lea r13, [rsp+148h+var_110] loc_1A026: mov rsi, [rsp+148h+var_C0] mov rdx, [rsp+148h+var_B8] lea rdi, [rsp+148h+var_140] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+148h+var_140] call _unlink lea rdi, [r12+1] test r12, r12 cmovz rdi, r14 mov rsi, [rsp+148h+var_140] call _symlink mov rax, cs:_ZN3fLS14FLAGS_log_linkB5cxx11E_ptr mov rax, [rax] cmp qword ptr [rax+8], 0 jz loc_1A15E lea r12, [rsp+148h+var_F0] mov [r12-10h], r12 mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi lea rdi, [rsp+148h+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_2D658+1; "/" lea rdi, [rsp+148h+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+148h+var_C0] mov rdx, [rsp+148h+var_B8] lea rdi, [rsp+148h+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r13, [rsp+148h+var_D0] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_1A0E5 mov [rsp+148h+var_E0], rdx mov rdx, [rcx] mov [rsp+148h+var_D0], rdx jmp short loc_1A0ED loc_1A0E5: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_1A0ED: mov rdx, [rax+8] lea r15, [rsp+148h+var_E0] mov [r15+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+148h+var_140] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r13 jz short loc_1A12B mov rsi, [rsp+148h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A12B: mov rdi, [rsp+148h+var_100]; void * cmp rdi, r12 lea r13, [rsp+148h+var_110] jz short loc_1A147 mov rsi, [rsp+148h+var_F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A147: mov rdi, [rsp+148h+var_140] call _unlink mov rsi, [rsp+148h+var_140] mov rdi, r14 call _symlink loc_1A15E: mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_1A17A mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A17A: mov rdi, [rsp+148h+var_C0]; void * lea rax, [rsp+148h+var_B0] cmp rdi, rax jz loc_19F47 mov rsi, [rsp+148h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_19F47 jmp short $+2 loc_1A1AA: mov r14, rax mov rdi, [rsp+148h+var_100]; void * cmp rdi, r12 jz short loc_1A1CD mov rsi, [rsp+148h+var_F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1A1CD jmp short loc_1A1CA jmp short $+2 loc_1A1CA: mov r14, rax loc_1A1CD: mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_1A1E9 mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A1E9: mov rdi, [rsp+148h+var_C0] lea rax, [rsp+148h+var_B0] cmp rdi, rax jz short loc_1A22E mov rsi, [rsp+148h+var_B0] jmp short loc_1A221 jmp short $+2 loc_1A20A: mov r14, rax mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_1A22E mov rsi, [rsp+148h+var_130] loc_1A221: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1A22E mov r14, rax loc_1A22E: mov ebx, 0FFFFFFFFh jmp short loc_1A23C jmp short loc_1A24A jmp short $+2 loc_1A239: mov r14, rax loc_1A23C: cmp ebx, 0FFFFFFFFh jz short loc_1A257 mov edi, ebx call _close jmp short loc_1A257 loc_1A24A: mov rdi, rax call __clang_call_terminate jmp short $+2 loc_1A254: mov r14, rax loc_1A257: mov rdi, [rsp+148h+var_120]; void * lea rax, [rsp+148h+var_110] cmp rdi, rax jz short loc_1A273 mov rsi, [rsp+148h+var_110] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A273: mov rdi, r14 call __Unwind_Resume
long long nglog::`anonymous namespace'::LogFileObject::CreateLogfile(long long a1, _QWORD *a2) { unsigned int v2; // ebp void *v4; // r14 long long v5; // rsi unsigned int v6; // eax unsigned int v7; // ecx unsigned int v8; // eax unsigned int v9; // edx unsigned int v10; // eax unsigned int v11; // ebx long long v12; // rax long long v13; // rdi long long v14; // r13 long long v15; // r12 long long v16; // rax _OWORD *v17; // rcx void *v19; // rdi long long v20; // rax __int128 *v21; // rcx void *v22; // [rsp+8h] [rbp-140h] BYREF long long v23; // [rsp+10h] [rbp-138h] _QWORD v24[2]; // [rsp+18h] [rbp-130h] BYREF void *v25[2]; // [rsp+28h] [rbp-120h] BYREF _QWORD v26[2]; // [rsp+38h] [rbp-110h] BYREF void *v27[2]; // [rsp+48h] [rbp-100h] BYREF _QWORD v28[2]; // [rsp+58h] [rbp-F0h] BYREF void *v29[2]; // [rsp+68h] [rbp-E0h] BYREF __int128 v30; // [rsp+78h] [rbp-D0h] BYREF void *v31[2]; // [rsp+88h] [rbp-C0h] BYREF _OWORD v32[2]; // [rsp+98h] [rbp-B0h] BYREF unsigned int v33; // [rsp+B8h] [rbp-90h] v25[0] = v26; std::string::_M_construct<char *>(v25, *(_QWORD *)(a1 + 56), *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 64)); if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) std::string::_M_append(v25, *a2); std::string::_M_append(v25, *(_QWORD *)(a1 + 120)); v4 = v25[0]; v5 = 193LL; if ( !fLB::FLAGS_timestamp_in_logfile_name ) { v5 = 65LL; if ( !(unsigned int)stat(v25[0], v31) ) { v6 = v33; v7 = fLU::FLAGS_max_log_size; *(_DWORD *)(a1 + 172) = v33; v8 = v6 >> 20; v9 = 1; if ( v7 - 1 < 0xFFF ) v9 = v7; v5 = ((v8 >= v9) << 9) | 0x41u; } } v10 = open(v4, v5); v11 = v10; if ( v10 == -1 ) goto LABEL_18; fcntl(v10, 2LL, 1LL); nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock = 1; xmmword_4A0A8 = 0LL; if ( (unsigned int)fcntl( v11, 6LL, &nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock) == -1 ) goto LABEL_18; v12 = fdopen(v11, "a"); v13 = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v12; if ( v13 ) fclose(); if ( !*(_QWORD *)(a1 + 152) ) { v11 = -1; if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) unlink(v4); LABEL_18: v2 = 0; goto LABEL_19; } v14 = *(_QWORD *)(a1 + 96); LOBYTE(v2) = 1; v11 = -1; if ( v14 ) { v15 = strrchr(v4, 47LL); v22 = v24; std::string::_M_construct<char *>(&v22, *(_QWORD *)(a1 + 88), *(_QWORD *)(a1 + 88) + v14); std::string::_M_replace_aux(&v22, v23, 0LL, 1LL, 46LL); v16 = std::string::append(&v22, nglog::LogSeverityNames[*(unsigned int *)(a1 + 160)]); v31[0] = v32; v17 = (_OWORD *)(v16 + 16); if ( *(_QWORD *)v16 == v16 + 16 ) { v32[0] = *v17; } else { v31[0] = *(void **)v16; *(_QWORD *)&v32[0] = *(_QWORD *)v17; } v31[1] = *(void **)(v16 + 8); *(_QWORD *)v16 = v17; *(_QWORD *)(v16 + 8) = 0LL; *(_BYTE *)(v16 + 16) = 0; if ( v22 != v24 ) operator delete(v22, v24[0] + 1LL); v22 = v24; v23 = 0LL; LOBYTE(v24[0]) = 0; if ( v15 ) { v29[0] = &v30; std::string::_M_construct<char const*>(v29, v4, v15 + 1); std::string::operator=(&v22, v29); if ( v29[0] != &v30 ) operator delete(v29[0], v30 + 1); } std::string::_M_append(&v22, v31[0]); unlink(v22); v19 = (void *)(v15 + 1); if ( !v15 ) v19 = v4; symlink(v19, v22); if ( *(&fLS::FLAGS_log_link_buf[abi:cxx11] + 1) ) { v27[0] = v28; std::string::_M_construct<char *>( v27, fLS::FLAGS_log_link_buf[abi:cxx11], fLS::FLAGS_log_link_buf[abi:cxx11] + *(&fLS::FLAGS_log_link_buf[abi:cxx11] + 1)); std::string::append(v27, "/"); v20 = std::string::_M_append(v27, v31[0]); v29[0] = &v30; v21 = (__int128 *)(v20 + 16); if ( *(_QWORD *)v20 == v20 + 16 ) { v30 = *v21; } else { v29[0] = *(void **)v20; *(_QWORD *)&v30 = *(_QWORD *)v21; } v29[1] = *(void **)(v20 + 8); *(_QWORD *)v20 = v21; *(_QWORD *)(v20 + 8) = 0LL; *(_BYTE *)(v20 + 16) = 0; std::string::operator=(&v22, v29); if ( v29[0] != &v30 ) operator delete(v29[0], v30 + 1); if ( v27[0] != v28 ) operator delete(v27[0], v28[0] + 1LL); unlink(v22); symlink(v4, v22); } if ( v22 != v24 ) operator delete(v22, v24[0] + 1LL); if ( v31[0] != v32 ) operator delete(v31[0], *(_QWORD *)&v32[0] + 1LL); } LABEL_19: if ( v11 != -1 ) close(v11); if ( v25[0] != v26 ) operator delete(v25[0], v26[0] + 1LL); return v2; }
CreateLogfile: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,RSI MOV R15,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [RDI + 0x38] MOV RDX,qword ptr [RDI + 0x40] ADD RDX,RSI LEA RDI,[RSP + 0x28] CALL 0x00111320 MOV R12,qword ptr [0x00139ec0] CMP byte ptr [R12],0x1 JNZ 0x00119d74 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] LAB_00119d6a: LEA RDI,[RSP + 0x28] CALL 0x00111200 LAB_00119d74: MOV RSI,qword ptr [R15 + 0x78] MOV RDX,qword ptr [R15 + 0x80] LEA RDI,[RSP + 0x28] CALL 0x00111200 MOV R14,qword ptr [RSP + 0x28] MOV ESI,0xc1 CMP byte ptr [R12],0x0 JNZ 0x00119dec LEA RSI,[RSP + 0x88] MOV RDI,R14 CALL 0x00111820 MOV ESI,0x41 TEST EAX,EAX JNZ 0x00119dec MOV EAX,dword ptr [RSP + 0xb8] MOV RCX,qword ptr [0x00139e60] MOV ECX,dword ptr [RCX] MOV dword ptr [R15 + 0xac],EAX SHR EAX,0x14 LEA EDX,[RCX + -0x1] CMP EDX,0xfff MOV EDX,0x1 CMOVC EDX,ECX XOR ESI,ESI CMP EAX,EDX SETNC SIL SHL ESI,0x9 OR ESI,0x41 LAB_00119dec: MOV RAX,qword ptr [0x00139dc0] MOV EDX,dword ptr [RAX] LAB_00119df5: MOV RDI,R14 XOR EAX,EAX CALL 0x00111660 MOV EBX,EAX CMP EAX,-0x1 JZ 0x00119f45 LAB_00119e0a: MOV EDI,EBX MOV ESI,0x2 MOV EDX,0x1 XOR EAX,EAX CALL 0x001114a0 MOV dword ptr [0x0014a0a0],0x1 LEA RDX,[0x14a0a0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x0014a0a8],XMM0 LAB_00119e38: MOV EDI,EBX MOV ESI,0x6 XOR EAX,EAX CALL 0x001114a0 CMP EAX,-0x1 JZ 0x00119f45 LEA RSI,[0x12dce4] MOV EDI,EBX CALL 0x001119f0 MOV RDI,qword ptr [R15 + 0x98] MOV qword ptr [R15 + 0x98],RAX TEST RDI,RDI JZ 0x00119e75 CALL 0x001118f0 LAB_00119e75: CMP qword ptr [R15 + 0x98],0x0 JZ 0x00119f31 MOV R13,qword ptr [R15 + 0x60] MOV BPL,0x1 MOV EBX,0xffffffff TEST R13,R13 JZ 0x00119f7e MOV RDI,R14 MOV ESI,0x2f CALL 0x00111a40 MOV R12,RAX LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R15 + 0x58] ADD R13,RSI LAB_00119eb8: LEA RDI,[RSP + 0x8] MOV RDX,R13 CALL 0x00111320 LEA RDI,[RSP + 0x8] MOV RSI,qword ptr [RDI + 0x8] LAB_00119ece: MOV ECX,0x1 XOR EDX,EDX MOV R8D,0x2e CALL 0x00112230 MOV EAX,dword ptr [R15 + 0xa0] LEA RCX,[0x139350] MOV RSI,qword ptr [RCX + RAX*0x8] LAB_00119ef2: LEA RDI,[RSP + 0x8] LEA R13,[RSP + 0x38] CALL 0x001122a0 LEA RSI,[RSP + 0x98] MOV qword ptr [RSI + -0x10],RSI MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00119f85 MOV qword ptr [RSP + 0x88],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x98],RDX JMP 0x00119f8b LAB_00119f31: MOV EBX,0xffffffff CMP byte ptr [R12],0x1 JNZ 0x00119f45 MOV RDI,R14 CALL 0x00111380 LAB_00119f45: XOR EBP,EBP LAB_00119f47: CMP EBX,-0x1 JZ 0x00119f53 LAB_00119f4c: MOV EDI,EBX CALL 0x00112310 LAB_00119f53: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00119f6a MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00111960 LAB_00119f6a: MOV EAX,EBP ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00119f7e: LEA R13,[RSP + 0x38] JMP 0x00119f47 LAB_00119f85: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI],XMM0 LAB_00119f8b: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00119fc2 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111960 LAB_00119fc2: LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 TEST R12,R12 JZ 0x0011a026 LEA R13,[RSP + 0x78] MOV qword ptr [R13 + -0x10],R13 LEA RDX,[R12 + 0x1] LAB_00119fed: LEA RDI,[RSP + 0x68] MOV RSI,R14 CALL 0x00111310 LEA RDI,[RSP + 0x8] LEA R15,[RSP + 0x68] MOV RSI,R15 CALL 0x00111b50 MOV RDI,qword ptr [R15] CMP RDI,R13 JZ 0x0011a021 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00111960 LAB_0011a021: LEA R13,[RSP + 0x38] LAB_0011a026: MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LAB_0011a036: LEA RDI,[RSP + 0x8] CALL 0x00111200 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00111380 LEA RDI,[R12 + 0x1] TEST R12,R12 CMOVZ RDI,R14 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00111080 MOV RAX,qword ptr [0x00139d88] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011a15e LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LAB_0011a089: LEA RDI,[RSP + 0x48] CALL 0x00111320 LAB_0011a093: LEA RSI,[0x12d659] LEA RDI,[RSP + 0x48] CALL 0x001122a0 MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LAB_0011a0b4: LEA RDI,[RSP + 0x48] CALL 0x00111200 LEA R13,[RSP + 0x78] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0011a0e5 MOV qword ptr [RSP + 0x68],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x78],RDX JMP 0x0011a0ed LAB_0011a0e5: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_0011a0ed: MOV RDX,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x68] MOV qword ptr [R15 + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00111b50 MOV RDI,qword ptr [R15] CMP RDI,R13 JZ 0x0011a12b MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00111960 LAB_0011a12b: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 LEA R13,[RSP + 0x38] JZ 0x0011a147 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00111960 LAB_0011a147: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00111380 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x00111080 LAB_0011a15e: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0011a17a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111960 LAB_0011a17a: MOV RDI,qword ptr [RSP + 0x88] LEA RAX,[RSP + 0x98] CMP RDI,RAX JZ 0x00119f47 MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x00111960 JMP 0x00119f47
/* nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::string const&) */ ulong __thiscall nglog::(anonymous_namespace)::LogFileObject::CreateLogfile(LogFileObject *this,string *param_1) { FILE *__stream; long lVar1; int *puVar2; long *__file; int iVar3; int iVar4; FILE *pFVar5; char *pcVar6; long *plVar7; __nlink_t *p_Var8; long *plVar9; uint uVar10; int8 unaff_RBP; ulong uVar11; uint uVar12; char *local_140; ulong local_138; char local_130; int7 uStack_12f; long *local_120 [2]; long local_110 [2]; long *local_100 [2]; long local_f0 [2]; long *local_e0; long local_d8; long local_d0; long lStack_c8; stat local_c0; local_120[0] = local_110; std::__cxx11::string::_M_construct<char*> (local_120,*(long *)(this + 0x38),*(long *)(this + 0x40) + *(long *)(this + 0x38)); puVar2 = PTR_FLAGS_timestamp_in_logfile_name_00139ec0; if (*PTR_FLAGS_timestamp_in_logfile_name_00139ec0 == '\x01') { /* try { // try from 00119d6a to 00119d88 has its CatchHandler @ 0011a254 */ std::__cxx11::string::_M_append((char *)local_120,*(ulong *)param_1); } std::__cxx11::string::_M_append((char *)local_120,*(ulong *)(this + 0x78)); __file = local_120[0]; uVar12 = 0xc1; if (*puVar2 == '\0') { iVar3 = stat((char *)local_120[0],&local_c0); uVar12 = 0x41; if (iVar3 == 0) { uVar12 = *(uint *)PTR_FLAGS_max_log_size_00139e60; *(uint *)(this + 0xac) = (uint)local_c0.st_size; uVar10 = 1; if (uVar12 - 1 < 0xfff) { uVar10 = uVar12; } uVar12 = (uint)(uVar10 <= (uint)local_c0.st_size >> 0x14) << 9 | 0x41; } } /* try { // try from 00119df5 to 00119dfe has its CatchHandler @ 0011a252 */ iVar3 = open((char *)__file,uVar12,(ulong)*(uint *)PTR_FLAGS_logfile_mode_00139dc0); if (iVar3 != -1) { /* try { // try from 00119e0a to 00119e1c has its CatchHandler @ 0011a239 */ fcntl(iVar3,2,1); CreateLogfile(std::__cxx11::string_const&)::w_lock._0_4_ = 1; CreateLogfile(std::__cxx11::string_const&)::w_lock._8_8_ = 0; CreateLogfile(std::__cxx11::string_const&)::w_lock._16_8_ = 0; /* try { // try from 00119e38 to 00119e45 has its CatchHandler @ 0011a237 */ iVar4 = fcntl(iVar3,6,CreateLogfile(std::__cxx11::string_const&)::w_lock); if (iVar4 != -1) { pFVar5 = fdopen(iVar3,"a"); __stream = *(FILE **)(this + 0x98); *(FILE **)(this + 0x98) = pFVar5; if (__stream != (FILE *)0x0) { fclose(__stream); } if (*(long *)(this + 0x98) != 0) { lVar1 = *(long *)(this + 0x60); uVar11 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); iVar3 = -1; if (lVar1 != 0) { pcVar6 = strrchr((char *)__file,0x2f); local_140 = &local_130; /* try { // try from 00119eb8 to 00119ec4 has its CatchHandler @ 0011a22b */ std::__cxx11::string::_M_construct<char*> (&local_140,*(long *)(this + 0x58),lVar1 + *(long *)(this + 0x58)); /* try { // try from 00119ece to 00119edf has its CatchHandler @ 0011a20a */ std::__cxx11::string::_M_replace_aux((ulong)&local_140,local_138,0,'\x01'); /* try { // try from 00119ef2 to 00119f00 has its CatchHandler @ 0011a208 */ plVar7 = (long *)std::__cxx11::string::append((char *)&local_140); local_c0.st_dev = (__dev_t)&local_c0.st_nlink; p_Var8 = (__nlink_t *)(plVar7 + 2); if ((__nlink_t *)*plVar7 == p_Var8) { local_c0.st_nlink = *p_Var8; local_c0._24_8_ = plVar7[3]; } else { local_c0.st_nlink = *p_Var8; local_c0.st_dev = (__dev_t)*plVar7; } local_c0.st_ino = plVar7[1]; *plVar7 = (long)p_Var8; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; if (local_140 != &local_130) { operator_delete(local_140,CONCAT71(uStack_12f,local_130) + 1); } local_140 = &local_130; local_138 = 0; local_130 = '\0'; if (pcVar6 != (char *)0x0) { /* try { // try from 00119fed to 00119ff9 has its CatchHandler @ 0011a1c8 */ local_e0 = &local_d0; std::__cxx11::string::_M_construct<char_const*>(&local_e0,__file,pcVar6 + 1); std::__cxx11::string::operator=((string *)&local_140,(string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } } /* try { // try from 0011a036 to 0011a03f has its CatchHandler @ 0011a1ca */ std::__cxx11::string::_M_append((char *)&local_140,local_c0.st_dev); unlink(local_140); plVar7 = (long *)(pcVar6 + 1); if (pcVar6 == (char *)0x0) { plVar7 = __file; } symlink((char *)plVar7,local_140); plVar7 = *(long **)PTR_FLAGS_log_link_abi_cxx11__00139d88; if (plVar7[1] != 0) { /* try { // try from 0011a089 to 0011a092 has its CatchHandler @ 0011a1c6 */ local_100[0] = local_f0; std::__cxx11::string::_M_construct<char*>(local_100,*plVar7,plVar7[1] + *plVar7); /* try { // try from 0011a093 to 0011a0a3 has its CatchHandler @ 0011a1aa */ std::__cxx11::string::append((char *)local_100); /* try { // try from 0011a0b4 to 0011a0bd has its CatchHandler @ 0011a1a8 */ plVar7 = (long *)std::__cxx11::string::_M_append((char *)local_100,local_c0.st_dev); plVar9 = plVar7 + 2; if ((long *)*plVar7 == plVar9) { local_d0 = *plVar9; lStack_c8 = plVar7[3]; local_e0 = &local_d0; } else { local_d0 = *plVar9; local_e0 = (long *)*plVar7; } local_d8 = plVar7[1]; *plVar7 = (long)plVar9; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; std::__cxx11::string::operator=((string *)&local_140,(string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } if (local_100[0] != local_f0) { operator_delete(local_100[0],local_f0[0] + 1); } unlink(local_140); symlink((char *)__file,local_140); } if (local_140 != &local_130) { operator_delete(local_140,CONCAT71(uStack_12f,local_130) + 1); } if ((__nlink_t *)local_c0.st_dev != &local_c0.st_nlink) { operator_delete((void *)local_c0.st_dev,local_c0.st_nlink + 1); } } goto LAB_00119f47; } iVar3 = -1; if (*puVar2 == '\x01') { unlink((char *)__file); } } } uVar11 = 0; LAB_00119f47: if (iVar3 != -1) { /* try { // try from 00119f4c to 00119f52 has its CatchHandler @ 0011a235 */ close(iVar3); } if (local_120[0] != local_110) { operator_delete(local_120[0],local_110[0] + 1); } return uVar11 & 0xffffffff; }
10,163
ma_field_extension_init_type_info
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot, MA_FIELD_EXTENSION *ext, const char *ptr, size_t length) { const char *end= ptr + length; for ( ; ptr < end; ) { uint itype= (uchar) *ptr++; uint len= (uchar) *ptr++; if (ptr + len > end || len > 127) break; /*Badly encoded data*/ if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST) ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len); ptr+= len; } }
O0
c
ma_field_extension_init_type_info: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x34a67 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x30(%rbp) movq -0x18(%rbp), %rax movl -0x30(%rbp), %ecx addq %rcx, %rax cmpq -0x28(%rbp), %rax ja 0x34a02 cmpl $0x7f, -0x30(%rbp) jbe 0x34a04 jmp 0x34a67 cmpl $0x7f, -0x2c(%rbp) ja 0x34a52 cmpl $0x1, -0x2c(%rbp) ja 0x34a52 movq -0x10(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x30(%rbp), %eax movl %eax, %edx callq 0x34490 movq %rax, %rcx movq -0x48(%rbp), %rax movq %rcx, -0x40(%rbp) movq %rdx, -0x38(%rbp) movq -0x40(%rbp), %rcx movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x30(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x349b4 addq $0x50, %rsp popq %rbp retq nopl (%rax)
ma_field_extension_init_type_info: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_28], rax loc_349B4: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb loc_34A67 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_2C], eax mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_30], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_30] add rax, rcx cmp rax, [rbp+var_28] ja short loc_34A02 cmp [rbp+var_30], 7Fh jbe short loc_34A04 loc_34A02: jmp short loc_34A67 loc_34A04: cmp [rbp+var_2C], 7Fh ja short loc_34A52 cmp [rbp+var_2C], 1 ja short loc_34A52 mov rax, [rbp+var_10] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov eax, [rbp+var_30] mov edx, eax call ma_const_string_copy_root mov rcx, rax mov rax, [rbp+var_48] mov [rbp+var_40], rcx mov [rbp+var_38], rdx mov rcx, [rbp+var_40] mov [rax], rcx mov rcx, [rbp+var_38] mov [rax+8], rcx loc_34A52: mov ecx, [rbp+var_30] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax jmp loc_349B4 loc_34A67: add rsp, 50h pop rbp retn
unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4) { unsigned __int8 *result; // rax unsigned __int8 *v5; // rax long long v6; // rdx long long *v7; // [rsp+8h] [rbp-48h] unsigned int v8; // [rsp+20h] [rbp-30h] unsigned int v9; // [rsp+24h] [rbp-2Ch] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned __int8 *v11; // [rsp+38h] [rbp-18h] long long v12; // [rsp+38h] [rbp-18h] v11 = a3; v10 = (unsigned long long)&a3[a4]; while ( 1 ) { result = v11; if ( (unsigned long long)v11 >= v10 ) break; v9 = *v11; v5 = v11 + 1; v12 = (long long)(v11 + 2); v8 = *v5; result = (unsigned __int8 *)(*v5 + v12); if ( (unsigned long long)result > v10 || v8 > 0x7F ) break; if ( v9 <= 1 ) { v7 = (long long *)(16LL * v9 + a2); *v7 = ma_const_string_copy_root(a1, v12, v8); v7[1] = v6; } v11 = (unsigned __int8 *)(v8 + v12); } return result; }
ma_field_extension_init_type_info: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_001349b4: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x00134a67 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x30] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x28] JA 0x00134a02 CMP dword ptr [RBP + -0x30],0x7f JBE 0x00134a04 LAB_00134a02: JMP 0x00134a67 LAB_00134a04: CMP dword ptr [RBP + -0x2c],0x7f JA 0x00134a52 CMP dword ptr [RBP + -0x2c],0x1 JA 0x00134a52 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX CALL 0x00134490 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x38],RDX MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX LAB_00134a52: MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x001349b4 LAB_00134a67: ADD RSP,0x50 POP RBP RET
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4) { uint uVar1; uint uVar2; byte *pbVar3; int1 auVar4 [16]; byte *local_20; local_20 = param_3; while( true ) { if (param_3 + param_4 <= local_20) { return; } uVar1 = (uint)*local_20; pbVar3 = local_20 + 2; uVar2 = (uint)local_20[1]; if (param_3 + param_4 < pbVar3 + uVar2) break; if (0x7f < uVar2) { return; } if ((uVar1 < 0x80) && (uVar1 < 2)) { auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2); *(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4; } local_20 = pbVar3 + uVar2; } return; }
10,164
extend_directory
eloqsql/storage/maria/ma_blockrec.c
static my_bool extend_directory(MARIA_HA *info, uchar *buff, uint block_size, uint max_entry, uint new_entry, uint *empty_space, my_bool head_page) { uint length, first_pos; uchar *dir, *first_dir; DBUG_ENTER("extend_directory"); /* Note that in if max_entry is 0, then first_dir will point to an illegal directory entry. This is ok, as in this case we will not access anything through first_dir. */ first_dir= dir_entry_pos(buff, block_size, max_entry) + DIR_ENTRY_SIZE; if (make_space_for_directory(info, buff, max_entry, new_entry - max_entry + 1, first_dir, empty_space, &first_pos, head_page)) DBUG_RETURN(1); /* Set the new directory entry to cover the max possible length */ dir= first_dir - DIR_ENTRY_SIZE * (new_entry - max_entry + 1); length= (uint) (dir - buff - first_pos); int2store(dir, first_pos); int2store(dir+2, length); *empty_space-= length; if (new_entry-- > max_entry) { /* Link all row entries between new_entry and max_entry into free list */ uint free_entry= (uint) buff[DIR_FREE_OFFSET]; uint prev_entry= END_OF_DIR_FREE_LIST; buff[DIR_FREE_OFFSET]= new_entry; do { dir+= DIR_ENTRY_SIZE; dir[0]= dir[1]= 0; dir[2]= (uchar) prev_entry; dir[3]= (uchar) new_entry-1; prev_entry= new_entry; } while (new_entry-- > max_entry); if ((dir[3]= free_entry) != END_OF_DIR_FREE_LIST) { /* Relink next entry to point to newly freed entry */ uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT(uint2korr(next_entry) == 0 && next_entry[2] == END_OF_DIR_FREE_LIST); next_entry[2]= max_entry; } } check_directory(info->s, buff, block_size, head_page ? MY_MIN(info->s->base.min_block_length, length) : 0, *empty_space); DBUG_RETURN(0); }
O3
c
extend_directory: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %r14d movl %ecx, %ebx movq %rdi, %rax movl %edx, %r13d leaq (%rsi,%r13), %r15 leal (,%rbx,4), %r10d movq %r15, -0x50(%rbp) subq %r10, %r15 leaq -0x4(%r15), %r8 movl %r14d, %ecx subl %ebx, %ecx leal 0x4(,%rcx,4), %r11d movq (%rdi), %rdi testl %ebx, %ebx je 0x605b0 movzwl -0x4(%r15), %edx movzwl -0x2(%r15), %ecx addl %edx, %ecx movl %r8d, %edx subl %esi, %edx movq %r11, %r12 addl %ecx, %r11d cmpl %edx, %r11d movq %r12, %r11 jbe 0x6051d movq %r8, -0x30(%rbp) leal -0x1(%rbx), %edx cmpb $0x0, 0x10(%rbp) movq %r10, -0x38(%rbp) movq %r9, -0x40(%rbp) je 0x604db movq 0x8(%rax), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x604e1 xorl %r8d, %r8d xorl %r9d, %r9d xorl %ecx, %ecx movq %rsi, -0x48(%rbp) callq 0x5d050 movq -0x48(%rbp), %rsi movzwl -0x4(%r15), %edx movzwl -0x2(%r15), %ecx movzwl 0xa(%rsi), %edi movq -0x40(%rbp), %r9 movl %edi, (%r9) movb $0x1, %al movq %r12, %r11 cmpl %edi, %r11d ja 0x605a1 addl %edx, %ecx movq -0x38(%rbp), %r10 movq -0x30(%rbp), %r8 subl %r11d, (%r9) leal 0x1(%r14), %eax movb %al, 0x8(%rsi) movl %r11d, %edx subq %rdx, %r8 movl %ecx, %eax addq %rsi, %rax movq %r8, %rdi subq %rax, %rdi movw %cx, (%r8) movw %di, 0x2(%r8) subl %edi, (%r9) cmpl %ebx, %r14d jbe 0x6059f movb 0x9(%rsi), %cl movzbl %cl, %eax leal -0x1(%r14), %edi movb %dil, 0x9(%rsi) subq %r10, %r13 subq %rdx, %r13 addq %rsi, %r13 movl $0xff, %edx movw $0x0, (%r13) movb %dl, 0x2(%r13) leal -0x1(%r14), %esi addb $-0x2, %r14b movb %r14b, 0x3(%r13) addq $0x4, %r13 movl %esi, %r14d movl %esi, %edx cmpl %ebx, %esi ja 0x60565 movb %cl, -0x1(%r13) cmpb $-0x1, %cl je 0x6059f shll $0x2, %eax movq -0x50(%rbp), %rcx subq %rax, %rcx movb %bl, -0x6(%rcx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc18(%rdi), %ecx addl $0xc, %ecx jmp 0x6051d
extend_directory: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14d, r8d mov ebx, ecx mov rax, rdi mov r13d, edx lea r15, [rsi+r13] lea r10d, ds:0[rbx*4] mov [rbp+var_50], r15 sub r15, r10 lea r8, [r15-4] mov ecx, r14d sub ecx, ebx lea r11d, ds:4[rcx*4] mov rdi, [rdi] test ebx, ebx jz loc_605B0 movzx edx, word ptr [r15-4] movzx ecx, word ptr [r15-2] add ecx, edx mov edx, r8d sub edx, esi mov r12, r11 add r11d, ecx cmp r11d, edx mov r11, r12 jbe short loc_6051D mov [rbp+var_30], r8 lea edx, [rbx-1] cmp [rbp+arg_0], 0 mov [rbp+var_38], r10 mov [rbp+var_40], r9 jz short loc_604DB mov rax, [rax+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_604E1 loc_604DB: xor r8d, r8d xor r9d, r9d loc_604E1: xor ecx, ecx mov [rbp+var_48], rsi call _ma_compact_block_page mov rsi, [rbp+var_48] movzx edx, word ptr [r15-4] movzx ecx, word ptr [r15-2] movzx edi, word ptr [rsi+0Ah] mov r9, [rbp+var_40] mov [r9], edi mov al, 1 mov r11, r12 cmp r11d, edi ja loc_605A1 add ecx, edx mov r10, [rbp+var_38] mov r8, [rbp+var_30] loc_6051D: sub [r9], r11d lea eax, [r14+1] mov [rsi+8], al mov edx, r11d sub r8, rdx mov eax, ecx add rax, rsi mov rdi, r8 sub rdi, rax mov [r8], cx mov [r8+2], di sub [r9], edi cmp r14d, ebx jbe short loc_6059F mov cl, [rsi+9] movzx eax, cl lea edi, [r14-1] mov [rsi+9], dil sub r13, r10 sub r13, rdx add r13, rsi mov edx, 0FFh loc_60565: mov word ptr [r13+0], 0 mov [r13+2], dl lea esi, [r14-1] add r14b, 0FEh mov [r13+3], r14b add r13, 4 mov r14d, esi mov edx, esi cmp esi, ebx ja short loc_60565 mov [r13-1], cl cmp cl, 0FFh jz short loc_6059F shl eax, 2 mov rcx, [rbp+var_50] sub rcx, rax mov [rcx-6], bl loc_6059F: xor eax, eax loc_605A1: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_605B0: mov ecx, [rdi+0C18h] add ecx, 0Ch jmp loc_6051D
char extend_directory( long long *a1, long long a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int *a6, char a7) { long long v10; // r13 long long v11; // r10 long long v12; // r15 long long v13; // r8 unsigned int v14; // r11d long long v15; // rdi int v16; // ecx unsigned int v17; // r12d unsigned long long v18; // r8 unsigned int v19; // r9d int v20; // edx int v21; // ecx unsigned int v22; // edi char result; // al _WORD *v24; // r8 unsigned __int8 v25; // cl long long v26; // r13 char v27; // dl long long v28; // [rsp+0h] [rbp-50h] unsigned int *v29; // [rsp+10h] [rbp-40h] long long v30; // [rsp+18h] [rbp-38h] long long v31; // [rsp+20h] [rbp-30h] v10 = a3; v11 = 4 * a4; v28 = a2 + a3; v12 = v28 - v11; v13 = v28 - v11 - 4; v14 = 4 * (a5 - a4) + 4; v15 = *a1; if ( a4 ) { v16 = *(unsigned __int16 *)(v12 - 4) + *(unsigned __int16 *)(v12 - 2); v17 = v14; if ( v16 + v14 > (int)v13 - (int)a2 ) { v31 = v28 - v11 - 4; v30 = v11; v29 = a6; if ( a7 ) { v18 = *(_QWORD *)(a1[1] + 128); v19 = *(_DWORD *)(v15 + 952); } else { v18 = 0LL; v19 = 0; } ma_compact_block_page(v15, a2, a4 - 1, 0, v18, v19); v20 = *(unsigned __int16 *)(v12 - 4); v21 = *(unsigned __int16 *)(v12 - 2); v22 = *(unsigned __int16 *)(a2 + 10); a6 = v29; *v29 = v22; result = 1; v14 = v17; if ( v17 > v22 ) return result; v16 = v20 + v21; v11 = v30; v13 = v31; } } else { v16 = *(_DWORD *)(v15 + 3096) + 12; } *a6 -= v14; *(_BYTE *)(a2 + 8) = a5 + 1; v24 = (_WORD *)(v13 - v14); *v24 = v16; v24[1] = (_WORD)v24 - (a2 + v16); *a6 -= (_DWORD)v24 - (a2 + v16); if ( a5 > a4 ) { v25 = *(_BYTE *)(a2 + 9); *(_BYTE *)(a2 + 9) = a5 - 1; v26 = a2 + v10 - v11 - v14; v27 = -1; do { *(_WORD *)v26 = 0; *(_BYTE *)(v26 + 2) = v27; *(_BYTE *)(v26 + 3) = a5 - 2; v26 += 4LL; v27 = --a5; } while ( a5 > a4 ); *(_BYTE *)(v26 - 1) = v25; if ( v25 != 0xFF ) *(_BYTE *)(v28 - 4 * (unsigned int)v25 - 6) = a4; } return 0; }
extend_directory: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14D,R8D MOV EBX,ECX MOV RAX,RDI MOV R13D,EDX LEA R15,[RSI + R13*0x1] LEA R10D,[RBX*0x4] MOV qword ptr [RBP + -0x50],R15 SUB R15,R10 LEA R8,[R15 + -0x4] MOV ECX,R14D SUB ECX,EBX LEA R11D,[0x4 + RCX*0x4] MOV RDI,qword ptr [RDI] TEST EBX,EBX JZ 0x001605b0 MOVZX EDX,word ptr [R15 + -0x4] MOVZX ECX,word ptr [R15 + -0x2] ADD ECX,EDX MOV EDX,R8D SUB EDX,ESI MOV R12,R11 ADD R11D,ECX CMP R11D,EDX MOV R11,R12 JBE 0x0016051d MOV qword ptr [RBP + -0x30],R8 LEA EDX,[RBX + -0x1] CMP byte ptr [RBP + 0x10],0x0 MOV qword ptr [RBP + -0x38],R10 MOV qword ptr [RBP + -0x40],R9 JZ 0x001604db MOV RAX,qword ptr [RAX + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x001604e1 LAB_001604db: XOR R8D,R8D XOR R9D,R9D LAB_001604e1: XOR ECX,ECX MOV qword ptr [RBP + -0x48],RSI CALL 0x0015d050 MOV RSI,qword ptr [RBP + -0x48] MOVZX EDX,word ptr [R15 + -0x4] MOVZX ECX,word ptr [R15 + -0x2] MOVZX EDI,word ptr [RSI + 0xa] MOV R9,qword ptr [RBP + -0x40] MOV dword ptr [R9],EDI MOV AL,0x1 MOV R11,R12 CMP R11D,EDI JA 0x001605a1 ADD ECX,EDX MOV R10,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x30] LAB_0016051d: SUB dword ptr [R9],R11D LEA EAX,[R14 + 0x1] MOV byte ptr [RSI + 0x8],AL MOV EDX,R11D SUB R8,RDX MOV EAX,ECX ADD RAX,RSI MOV RDI,R8 SUB RDI,RAX MOV word ptr [R8],CX MOV word ptr [R8 + 0x2],DI SUB dword ptr [R9],EDI CMP R14D,EBX JBE 0x0016059f MOV CL,byte ptr [RSI + 0x9] MOVZX EAX,CL LEA EDI,[R14 + -0x1] MOV byte ptr [RSI + 0x9],DIL SUB R13,R10 SUB R13,RDX ADD R13,RSI MOV EDX,0xff LAB_00160565: MOV word ptr [R13],0x0 MOV byte ptr [R13 + 0x2],DL LEA ESI,[R14 + -0x1] ADD R14B,0xfe MOV byte ptr [R13 + 0x3],R14B ADD R13,0x4 MOV R14D,ESI MOV EDX,ESI CMP ESI,EBX JA 0x00160565 MOV byte ptr [R13 + -0x1],CL CMP CL,0xff JZ 0x0016059f SHL EAX,0x2 MOV RCX,qword ptr [RBP + -0x50] SUB RCX,RAX MOV byte ptr [RCX + -0x6],BL LAB_0016059f: XOR EAX,EAX LAB_001605a1: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001605b0: MOV ECX,dword ptr [RDI + 0xc18] ADD ECX,0xc JMP 0x0016051d
int8 extend_directory(long *param_1,long param_2,uint param_3,uint param_4,uint param_5,uint *param_6, char param_7) { long lVar1; uint uVar2; byte bVar3; ushort uVar4; ushort uVar5; ushort uVar6; uint uVar7; long lVar8; int8 uVar9; int2 *puVar10; int4 uVar11; int2 *puVar12; long lVar13; lVar1 = param_2 + (ulong)param_3; lVar13 = lVar1 - (ulong)(param_4 * 4); uVar2 = (param_5 - param_4) * 4 + 4; lVar8 = *param_1; if (param_4 == 0) { uVar7 = *(int *)(lVar8 + 0xc18) + 0xc; } else { uVar7 = (uint)*(ushort *)(lVar13 + -2) + (uint)*(ushort *)(lVar13 + -4); if ((uint)((int)(lVar13 + -4) - (int)param_2) < uVar2 + uVar7) { if (param_7 == '\0') { uVar9 = 0; uVar11 = 0; } else { uVar9 = *(int8 *)(param_1[1] + 0x80); uVar11 = *(int4 *)(lVar8 + 0x3b8); } _ma_compact_block_page(lVar8,param_2,param_4 - 1,0,uVar9,uVar11); uVar4 = *(ushort *)(lVar13 + -4); uVar5 = *(ushort *)(lVar13 + -2); uVar6 = *(ushort *)(param_2 + 10); *param_6 = (uint)uVar6; if (uVar6 <= uVar2 && uVar2 != uVar6) { return 1; } uVar7 = (uint)uVar5 + (uint)uVar4; } } *param_6 = *param_6 - uVar2; *(char *)(param_2 + 8) = (char)param_5 + '\x01'; puVar10 = (int2 *)((lVar13 + -4) - (ulong)uVar2); lVar8 = (long)puVar10 - ((ulong)uVar7 + param_2); *puVar10 = (short)uVar7; puVar10[1] = (short)lVar8; *param_6 = *param_6 - (int)lVar8; if (param_4 < param_5) { bVar3 = *(byte *)(param_2 + 9); *(char *)(param_2 + 9) = (char)param_5 + -1; uVar7 = 0xff; puVar10 = (int2 *)((((ulong)param_3 - (ulong)(param_4 * 4)) - (ulong)uVar2) + param_2); do { puVar12 = puVar10; *puVar12 = 0; *(char *)(puVar12 + 1) = (char)uVar7; uVar7 = param_5 - 1; *(char *)((long)puVar12 + 3) = (char)param_5 + -2; puVar10 = puVar12 + 2; param_5 = uVar7; } while (param_4 < uVar7); *(byte *)((long)puVar12 + 3) = bVar3; if (bVar3 != 0xff) { *(char *)(lVar1 + (ulong)bVar3 * -4 + -6) = (char)param_4; } } return 0; }
10,165
ELFIO::section_impl<ELFIO::Elf64_Shdr>::section_impl(ELFIO::endianess_convertor const*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp
section_impl( const endianess_convertor* convertor_ ) : convertor( convertor_ ) { std::fill_n( reinterpret_cast<char*>( &header ), sizeof( header ), '\0' ); is_address_set = false; data = 0; data_size = 0; }
O0
cpp
ELFIO::section_impl<ELFIO::Elf64_Shdr>::section_impl(ELFIO::endianess_convertor const*): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x18e50 movq 0x10(%rsp), %rdi leaq 0x19ab7(%rip), %rax # 0x32710 movq %rax, (%rdi) movq %rdi, %rax addq $0x10, %rax movq %rax, 0x18(%rsp) addq $0x58, %rdi movq %rdi, 0x8(%rsp) callq 0x152f0 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rdi movq 0x38(%rsp), %rcx movq %rcx, 0x88(%rax) movb $0x0, 0x37(%rsp) movl $0x40, %esi leaq 0x37(%rsp), %rdx callq 0x17920 jmp 0x18ca2 movq 0x10(%rsp), %rax movb $0x0, 0x90(%rax) movq $0x0, 0x78(%rax) movl $0x0, 0x80(%rax) addq $0x48, %rsp retq movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) callq 0x15140 movq 0x10(%rsp), %rdi callq 0x19b00 movq 0x28(%rsp), %rdi callq 0x153a0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5ELFIO12section_implINS_10Elf64_ShdrEEC2EPKNS_19endianess_convertorE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rdi, [rsp+48h+var_8]; this mov [rsp+48h+var_38], rdi call _ZN5ELFIO7sectionC2Ev; ELFIO::section::section(void) mov rdi, [rsp+48h+var_38] lea rax, off_32710 mov [rdi], rax mov rax, rdi add rax, 10h mov [rsp+48h+var_30], rax add rdi, 58h ; 'X' mov [rsp+48h+var_40], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rsp+48h+var_38] mov rdi, [rsp+48h+var_30] mov rcx, [rsp+48h+var_10] mov [rax+88h], rcx mov [rsp+48h+var_11], 0 mov esi, 40h ; '@' lea rdx, [rsp+48h+var_11] call _ZSt6fill_nIPcmcET_S1_T0_RKT1_; std::fill_n<char *,ulong,char>(char *,ulong,char const&) jmp short $+2 loc_18CA2: mov rax, [rsp+48h+var_38] mov byte ptr [rax+90h], 0 mov qword ptr [rax+78h], 0 mov dword ptr [rax+80h], 0 add rsp, 48h retn mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_8]; this call _ZN5ELFIO7sectionD2Ev; ELFIO::section::~section() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long ELFIO::section_impl<ELFIO::Elf64_Shdr>::section_impl(long long a1, long long a2) { long long result; // rax char v3; // [rsp+37h] [rbp-11h] BYREF long long v4; // [rsp+38h] [rbp-10h] ELFIO::section *v5; // [rsp+40h] [rbp-8h] v5 = (ELFIO::section *)a1; v4 = a2; ELFIO::section::section((ELFIO::section *)a1); *(_QWORD *)a1 = off_32710; std::string::basic_string(); *(_QWORD *)(a1 + 136) = v4; v3 = 0; std::fill_n<char *,unsigned long,char>(a1 + 16, 0x40uLL, (long long)&v3); result = a1; *(_BYTE *)(a1 + 144) = 0; *(_QWORD *)(a1 + 120) = 0LL; *(_DWORD *)(a1 + 128) = 0; return result; }
section_impl: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI CALL 0x00118e50 MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[0x132710] MOV qword ptr [RDI],RAX MOV RAX,RDI ADD RAX,0x10 MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x58 MOV qword ptr [RSP + 0x8],RDI CALL 0x001152f0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x88],RCX MOV byte ptr [RSP + 0x37],0x0 LAB_00118c91: MOV ESI,0x40 LEA RDX,[RSP + 0x37] CALL 0x00117920 LAB_00118ca0: JMP 0x00118ca2 LAB_00118ca2: MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + 0x90],0x0 MOV qword ptr [RAX + 0x78],0x0 MOV dword ptr [RAX + 0x80],0x0 ADD RSP,0x48 RET
/* ELFIO::section_impl<ELFIO::Elf64_Shdr>::section_impl(ELFIO::endianess_convertor const*) */ void __thiscall ELFIO::section_impl<ELFIO::Elf64_Shdr>::section_impl (section_impl<ELFIO::Elf64_Shdr> *this,endianess_convertor *param_1) { char local_11; endianess_convertor *local_10; section_impl<ELFIO::Elf64_Shdr> *local_8; local_10 = param_1; local_8 = this; section::section((section *)this); *(int ***)this = &PTR__section_impl_00132710; std::__cxx11::string::string((string *)(this + 0x58)); *(endianess_convertor **)(this + 0x88) = local_10; local_11 = '\0'; /* try { // try from 00118c91 to 00118c9f has its CatchHandler @ 00118cc5 */ std::fill_n<char*,unsigned_long,char>((char *)(this + 0x10),0x40,&local_11); this[0x90] = (section_impl<ELFIO::Elf64_Shdr>)0x0; *(int8 *)(this + 0x78) = 0; *(int4 *)(this + 0x80) = 0; return; }
10,166
ma_freeze_size
eloqsql/libmariadb/libmariadb/ma_array.c
void ma_freeze_size(DYNAMIC_ARRAY *array) { uint elements=max(array->elements,1); if (array->buffer && array->max_element != elements) { array->buffer=(char*) realloc(array->buffer, elements*array->size_of_element); array->max_element=elements; } }
O0
c
ma_freeze_size: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpl $0x1, 0x8(%rax) jbe 0x9db92 movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) jmp 0x9db9c movl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x9db9c movl -0x10(%rbp), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x9dbe7 movq -0x8(%rbp), %rax movl 0xc(%rax), %eax cmpl -0xc(%rbp), %eax je 0x9dbe7 movq -0x8(%rbp), %rax movq (%rax), %rdi movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi callq 0x3b0f0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
ma_freeze_size: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp dword ptr [rax+8], 1 jbe short loc_9DB92 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax jmp short loc_9DB9C loc_9DB92: mov eax, 1 mov [rbp+var_10], eax jmp short $+2 loc_9DB9C: mov eax, [rbp+var_10] mov [rbp+var_C], eax mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_9DBE7 mov rax, [rbp+var_8] mov eax, [rax+0Ch] cmp eax, [rbp+var_C] jz short loc_9DBE7 mov rax, [rbp+var_8] mov rdi, [rax] mov eax, [rbp+var_C] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax mov esi, eax call _realloc mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+0Ch], ecx loc_9DBE7: add rsp, 10h pop rbp retn
long long ma_freeze_size(long long a1) { long long result; // rax int v2; // [rsp+0h] [rbp-10h] if ( *(_DWORD *)(a1 + 8) <= 1u ) v2 = 1; else v2 = *(_DWORD *)(a1 + 8); result = a1; if ( *(_QWORD *)a1 ) { result = *(unsigned int *)(a1 + 12); if ( (_DWORD)result != v2 ) { *(_QWORD *)a1 = realloc(*(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 20) * v2)); result = a1; *(_DWORD *)(a1 + 12) = v2; } } return result; }
ma_freeze_size: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0x1 JBE 0x0019db92 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX JMP 0x0019db9c LAB_0019db92: MOV EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x0019db9c LAB_0019db9c: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0019dbe7 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0xc] JZ 0x0019dbe7 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX CALL 0x0013b0f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX LAB_0019dbe7: ADD RSP,0x10 POP RBP RET
void ma_freeze_size(long *param_1) { void *pvVar1; int local_18; if (*(uint *)(param_1 + 1) < 2) { local_18 = 1; } else { local_18 = (int)param_1[1]; } if ((*param_1 != 0) && (*(int *)((long)param_1 + 0xc) != local_18)) { pvVar1 = realloc((void *)*param_1,(ulong)(uint)(local_18 * *(int *)((long)param_1 + 0x14))); *param_1 = (long)pvVar1; *(int *)((long)param_1 + 0xc) = local_18; } return; }
10,167
Elevetor::add_out(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::add_out(int newstair,int direct_) { size_t ask_size = 0; if(direct_ == 1){ up_out->push_back(newstair); //std::sort(up_out->begin(),up_out->end()); return up_out->size(); }else{ down_out->push_back(newstair); //std::sort(down_out->begin(),down_out->end()); return down_out->size(); } return 0; }
O2
cpp
Elevetor::add_out(int, int): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r14d, %r14d cmpl $0x1, %edx setne %r14b movq 0x10(%rdi,%r14,8), %rdi callq 0x8c20 movq 0x10(%rbx,%r14,8), %rax movl 0x10(%rax), %eax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN8Elevetor7add_outEii: push r14 push rbx push rax mov rbx, rdi xor r14d, r14d cmp edx, 1 setnz r14b mov rdi, [rdi+r14*8+10h] call _ZN5QListIiE6appendEi; QList<int>::append(int) mov rax, [rbx+r14*8+10h] mov eax, [rax+10h] add rsp, 8 pop rbx pop r14 retn
long long Elevetor::add_out(Elevetor *this, long long a2, int a3) { _BOOL8 v3; // r14 v3 = a3 != 1; QList<int>::append(*((_QWORD *)this + v3 + 2), a2); return *(unsigned int *)(*((_QWORD *)this + v3 + 2) + 16LL); }
add_out: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI XOR R14D,R14D CMP EDX,0x1 SETNZ R14B MOV RDI,qword ptr [RDI + R14*0x8 + 0x10] CALL 0x00108c20 MOV RAX,qword ptr [RBX + R14*0x8 + 0x10] MOV EAX,dword ptr [RAX + 0x10] ADD RSP,0x8 POP RBX POP R14 RET
/* Elevetor::add_out(int, int) */ int4 __thiscall Elevetor::add_out(Elevetor *this,int param_1,int param_2) { QList<int>::append(*(QList<int> **)(this + (ulong)(param_2 != 1) * 8 + 0x10),param_1); return *(int4 *)(*(long *)(this + (ulong)(param_2 != 1) * 8 + 0x10) + 0x10); }
10,168
Elevetor::add_out(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::add_out(int newstair,int direct_) { size_t ask_size = 0; if(direct_ == 1){ up_out->push_back(newstair); //std::sort(up_out->begin(),up_out->end()); return up_out->size(); }else{ down_out->push_back(newstair); //std::sort(down_out->begin(),down_out->end()); return down_out->size(); } return 0; }
O3
cpp
Elevetor::add_out(int, int): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx cmpl $0x1, %edx jne 0x8efc movq 0x10(%rbx), %rdi addq $0x10, %rbx leaq 0x8(%rsp), %rdx jmp 0x8f09 movq 0x18(%rbx), %rdi addq $0x18, %rbx leaq 0xc(%rsp), %rdx movl %esi, (%rdx) movq 0x10(%rdi), %rsi callq 0x997a movq (%rbx), %rax movl 0x10(%rax), %eax addq $0x10, %rsp popq %rbx retq
_ZN8Elevetor7add_outEii: push rbx sub rsp, 10h mov rbx, rdi cmp edx, 1 jnz short loc_8EFC mov rdi, [rbx+10h] add rbx, 10h lea rdx, [rsp+18h+var_10] jmp short loc_8F09 loc_8EFC: mov rdi, [rbx+18h] add rbx, 18h lea rdx, [rsp+18h+var_C] loc_8F09: mov [rdx], esi mov rsi, [rdi+10h] call _ZN9QtPrivate12QPodArrayOpsIiE7emplaceIJRiEEEvxDpOT_; QtPrivate::QPodArrayOps<int>::emplace<int &>(long long,int &) mov rax, [rbx] mov eax, [rax+10h] add rsp, 10h pop rbx retn
long long Elevetor::add_out(Elevetor *this, int a2, int a3) { long long v4; // rdi char *v5; // rbx char *v6; // rdx char v8; // [rsp+8h] [rbp-10h] BYREF char v9; // [rsp+Ch] [rbp-Ch] BYREF if ( a3 == 1 ) { v4 = *((_QWORD *)this + 2); v5 = (char *)this + 16; v6 = &v8; } else { v4 = *((_QWORD *)this + 3); v5 = (char *)this + 24; v6 = &v9; } *(_DWORD *)v6 = a2; QtPrivate::QPodArrayOps<int>::emplace<int &>(v4, *(_QWORD *)(v4 + 16), v6); return *(unsigned int *)(*(_QWORD *)v5 + 16LL); }
add_out: PUSH RBX SUB RSP,0x10 MOV RBX,RDI CMP EDX,0x1 JNZ 0x00108efc MOV RDI,qword ptr [RBX + 0x10] ADD RBX,0x10 LEA RDX,[RSP + 0x8] JMP 0x00108f09 LAB_00108efc: MOV RDI,qword ptr [RBX + 0x18] ADD RBX,0x18 LEA RDX,[RSP + 0xc] LAB_00108f09: MOV dword ptr [RDX],ESI MOV RSI,qword ptr [RDI + 0x10] CALL 0x0010997a MOV RAX,qword ptr [RBX] MOV EAX,dword ptr [RAX + 0x10] ADD RSP,0x10 POP RBX RET
/* Elevetor::add_out(int, int) */ int4 __thiscall Elevetor::add_out(Elevetor *this,int param_1,int param_2) { int *piVar1; Elevetor *pEVar2; QPodArrayOps<int> *this_00; int local_10; int local_c; if (param_2 == 1) { this_00 = *(QPodArrayOps<int> **)(this + 0x10); pEVar2 = this + 0x10; piVar1 = &local_10; } else { this_00 = *(QPodArrayOps<int> **)(this + 0x18); pEVar2 = this + 0x18; piVar1 = &local_c; } *piVar1 = param_1; QtPrivate::QPodArrayOps<int>::emplace<int&>(this_00,*(longlong *)(this_00 + 0x10),piVar1); return *(int4 *)(*(long *)pEVar2 + 0x10); }
10,169
translog_get_file_max_lsn_stored
eloqsql/storage/maria/ma_loghandler.c
LSN translog_get_file_max_lsn_stored(uint32 file) { uint32 limit= FILENO_IMPOSSIBLE; DBUG_ENTER("translog_get_file_max_lsn_stored"); DBUG_PRINT("enter", ("file: %lu", (ulong)file)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); mysql_mutex_lock(&log_descriptor.unfinished_files_lock); /* find file with minimum file number "in progress" */ if (log_descriptor.unfinished_files.elements > 0) { struct st_file_counter *fc_ptr; fc_ptr= dynamic_element(&log_descriptor.unfinished_files, 0, struct st_file_counter *); limit= fc_ptr->file; /* minimal file number "in progress" */ } mysql_mutex_unlock(&log_descriptor.unfinished_files_lock); /* if there is no "in progress file" then unfinished file is in progress for sure */ if (limit == FILENO_IMPOSSIBLE) { TRANSLOG_ADDRESS horizon= translog_get_horizon(); limit= LSN_FILE_NO(horizon); } if (file >= limit) { DBUG_PRINT("info", ("The file in in progress")); DBUG_RETURN(LSN_IMPOSSIBLE); } { LOGHANDLER_FILE_INFO info; File fd; fd= open_logfile_by_number_no_cache(file); if(fd < 0) { DBUG_PRINT("error", ("Can't open file")); DBUG_RETURN(LSN_ERROR); } if (translog_read_file_header(&info, fd)) { DBUG_PRINT("error", ("Can't read file header")); info.max_lsn= LSN_ERROR; } if (mysql_file_close(fd, MYF(MY_WME))) { DBUG_PRINT("error", ("Can't close file")); info.max_lsn= LSN_ERROR; } DBUG_PRINT("info", ("Max lsn: " LSN_FMT, LSN_IN_PARTS(info.max_lsn))); DBUG_RETURN(info.max_lsn); } }
O3
c
translog_get_file_max_lsn_stored: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x90, %rsp movl %edi, %ebx cmpq $0x0, 0xb9d310(%rip) # 0xc015e8 jne 0x643ad leaq 0xb9d2c3(%rip), %rdi # 0xc015a8 callq 0x291d0 cmpl $0x0, 0xb9d307(%rip) # 0xc015f8 je 0x642ff movq 0xb9d2f6(%rip), %rax # 0xc015f0 movl (%rax), %r14d jmp 0x64302 xorl %r14d, %r14d movq 0xb9d2df(%rip), %rdi # 0xc015e8 testq %rdi, %rdi jne 0x643b7 leaq 0xb9d28f(%rip), %rdi # 0xc015a8 callq 0x291a0 testl %r14d, %r14d jne 0x6432f callq 0x67570 movq %rax, %r14 shrq $0x20, %r14 cmpl %ebx, %r14d jbe 0x64398 movl %ebx, %edi callq 0x64402 testl %eax, %eax js 0x6439c movl %eax, %ebx leaq -0x50(%rbp), %rdi movl %eax, %esi callq 0x641bc testb %al, %al je 0x64358 movq $0x1, -0x50(%rbp) leaq 0x322cf1(%rip), %rax # 0x387050 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %ebx, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x643cc movl $0x10, %esi movl %ebx, %edi callq 0xa1ac1 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x643a1 movq -0x50(%rbp), %rax jmp 0x643a1 xorl %eax, %eax jmp 0x643a1 movl $0x1, %eax addq $0x90, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x2c780 jmp 0x642ea leaq 0x322c92(%rip), %rax # 0x387050 movq (%rax), %rax callq *0x160(%rax) jmp 0x64312 leaq -0x14(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rdx callq 0x2c79d movl (%r14), %ecx jmp 0x64389
translog_get_file_max_lsn_stored: push rbp mov rbp, rsp push r14 push rbx sub rsp, 90h mov ebx, edi cmp cs:qword_C015E8, 0 jnz loc_643AD lea rdi, unk_C015A8 call _pthread_mutex_lock loc_642EA: cmp cs:dword_C015F8, 0 jz short loc_642FF mov rax, cs:qword_C015F0 mov r14d, [rax] jmp short loc_64302 loc_642FF: xor r14d, r14d loc_64302: mov rdi, cs:qword_C015E8 test rdi, rdi jnz loc_643B7 loc_64312: lea rdi, unk_C015A8 call _pthread_mutex_unlock test r14d, r14d jnz short loc_6432F call translog_get_horizon mov r14, rax shr r14, 20h loc_6432F: cmp r14d, ebx jbe short loc_64398 mov edi, ebx call open_logfile_by_number_no_cache test eax, eax js short loc_6439C mov ebx, eax lea rdi, [rbp+var_50] mov esi, eax call translog_read_file_header test al, al jz short loc_64358 mov [rbp+var_50], 1 loc_64358: lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, ebx mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_643CC mov esi, 10h mov edi, ebx call my_close mov ecx, eax loc_64389: mov eax, 1 test ecx, ecx jnz short loc_643A1 mov rax, [rbp+var_50] jmp short loc_643A1 loc_64398: xor eax, eax jmp short loc_643A1 loc_6439C: mov eax, 1 loc_643A1: add rsp, 90h pop rbx pop r14 pop rbp retn loc_643AD: call translog_get_file_max_lsn_stored_cold_1 jmp loc_642EA loc_643B7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_64312 loc_643CC: lea r14, [rbp+var_14] mov rdi, rax mov esi, ebx mov rdx, r14 call translog_get_file_max_lsn_stored_cold_2 mov ecx, [r14] jmp short loc_64389
unsigned long long translog_get_file_max_lsn_stored(unsigned int a1) { unsigned long long v1; // r14 int v2; // eax unsigned int v3; // ebx long long v4; // rax unsigned int v5; // ecx unsigned long long result; // rax _BYTE v7[72]; // [rsp+8h] [rbp-98h] BYREF __m128 v8[3]; // [rsp+50h] [rbp-50h] BYREF unsigned int v9[5]; // [rsp+8Ch] [rbp-14h] BYREF if ( qword_C015E8 ) translog_get_file_max_lsn_stored_cold_1(); else pthread_mutex_lock(&unk_C015A8); if ( dword_C015F8 ) LODWORD(v1) = *(_DWORD *)qword_C015F0; else LODWORD(v1) = 0; if ( qword_C015E8 ) PSI_server[44](); pthread_mutex_unlock(&unk_C015A8); if ( !(_DWORD)v1 ) v1 = (unsigned long long)translog_get_horizon(&unk_C015A8) >> 32; if ( (unsigned int)v1 <= a1 ) return 0LL; v2 = open_logfile_by_number_no_cache(a1); if ( v2 < 0 ) return 1LL; v3 = v2; if ( translog_read_file_header(v8, (unsigned int)v2) ) v8[0].m128_u64[0] = 1LL; v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, v3, 4LL); if ( v4 ) { translog_get_file_max_lsn_stored_cold_2(v4, v3, v9); v5 = v9[0]; } else { v5 = my_close(v3, 16LL); } result = 1LL; if ( !v5 ) return v8[0].m128_u64[0]; return result; }
translog_get_file_max_lsn_stored: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x90 MOV EBX,EDI CMP qword ptr [0x00d015e8],0x0 JNZ 0x001643ad LEA RDI,[0xd015a8] CALL 0x001291d0 LAB_001642ea: CMP dword ptr [0x00d015f8],0x0 JZ 0x001642ff MOV RAX,qword ptr [0x00d015f0] MOV R14D,dword ptr [RAX] JMP 0x00164302 LAB_001642ff: XOR R14D,R14D LAB_00164302: MOV RDI,qword ptr [0x00d015e8] TEST RDI,RDI JNZ 0x001643b7 LAB_00164312: LEA RDI,[0xd015a8] CALL 0x001291a0 TEST R14D,R14D JNZ 0x0016432f CALL 0x00167570 MOV R14,RAX SHR R14,0x20 LAB_0016432f: CMP R14D,EBX JBE 0x00164398 MOV EDI,EBX CALL 0x00164402 TEST EAX,EAX JS 0x0016439c MOV EBX,EAX LEA RDI,[RBP + -0x50] MOV ESI,EAX CALL 0x001641bc TEST AL,AL JZ 0x00164358 MOV qword ptr [RBP + -0x50],0x1 LAB_00164358: LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,EBX MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001643cc MOV ESI,0x10 MOV EDI,EBX CALL 0x001a1ac1 MOV ECX,EAX LAB_00164389: MOV EAX,0x1 TEST ECX,ECX JNZ 0x001643a1 MOV RAX,qword ptr [RBP + -0x50] JMP 0x001643a1 LAB_00164398: XOR EAX,EAX JMP 0x001643a1 LAB_0016439c: MOV EAX,0x1 LAB_001643a1: ADD RSP,0x90 POP RBX POP R14 POP RBP RET LAB_001643ad: CALL 0x0012c780 JMP 0x001642ea LAB_001643b7: LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00164312 LAB_001643cc: LEA R14,[RBP + -0x14] MOV RDI,RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012c79d MOV ECX,dword ptr [R14] JMP 0x00164389
int8 translog_get_file_max_lsn_stored(uint param_1) { char cVar1; int iVar2; uint extraout_var; long lVar3; int8 uVar4; uint uVar5; int1 local_a0 [72]; int8 local_58 [7]; int local_1c; if (DAT_00d015e8 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d015a8); } else { translog_get_file_max_lsn_stored_cold_1(); } if (DAT_00d015f8 == 0) { uVar5 = 0; } else { uVar5 = *DAT_00d015f0; } if (DAT_00d015e8 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d015a8); if (uVar5 == 0) { translog_get_horizon(); uVar5 = extraout_var; } if (param_1 < uVar5) { iVar2 = open_logfile_by_number_no_cache(param_1); if (iVar2 < 0) { uVar4 = 1; } else { cVar1 = translog_read_file_header(local_58,iVar2); if (cVar1 != '\0') { local_58[0] = 1; } lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,iVar2,4); if (lVar3 == 0) { local_1c = my_close(iVar2,0x10); } else { translog_get_file_max_lsn_stored_cold_2(lVar3,iVar2,&local_1c); } uVar4 = 1; if (local_1c == 0) { uVar4 = local_58[0]; } } } else { uVar4 = 0; } return uVar4; }
10,170
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string fs_get_cache_file(const std::string & filename) { GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); std::string cache_directory = fs_get_cache_directory(); const bool success = fs_create_directory_with_parents(cache_directory); if (!success) { throw std::runtime_error("failed to create cache directory: " + cache_directory); } return cache_directory + filename; }
O1
cpp
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi movl $0x2f, %esi xorl %edx, %edx callq 0x1dfb0 cmpq $-0x1, %rax jne 0x98335 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x97f47 movq %r15, %rdi callq 0x97e4c testb %al, %al je 0x98356 leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x9d408 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98327 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x7ef21(%rip), %rdi # 0x11725d leaq 0x75720(%rip), %rdx # 0x10da63 leaq 0x7f0c2(%rip), %rcx # 0x11740c movl $0x378, %esi # imm = 0x378 xorl %eax, %eax callq 0x1e4f0 movl $0x10, %edi callq 0x1d5b0 movq %rax, %rbx leaq 0x7f0da(%rip), %rsi # 0x117444 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x26b6b movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1e420 xorl %ebp, %ebp movq 0xc0c56(%rip), %rsi # 0x158fe8 movq 0xc0bbf(%rip), %rdx # 0x158f58 movq %rbx, %rdi callq 0x1e5a0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x983c7 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x983c7 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x983d9 movq %rbx, %rdi callq 0x1d8b0 jmp 0x983d9 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x983f4 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 movq %r14, %rdi callq 0x1e650
_Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; int push r14; int push rbx; __int64 sub rsp, 48h mov r14, rsi mov rbx, rdi mov rdi, rsi mov esi, 2Fh ; '/' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_98335 lea r15, [rsp+68h+var_60] mov rdi, r15; int call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void) mov rdi, r15 call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&) test al, al jz short loc_98356 lea rsi, [rsp+68h+var_60] mov rdi, rbx mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&) lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98327 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_98327: mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_98335: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"... mov esi, 378h xor eax, eax call _ggml_abort loc_98356: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToCreate; "failed to create cache directory: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_983C7 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_983C7 mov r14, rax mov bpl, 1 loc_983C7: test bpl, bpl jz short loc_983D9 mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_983D9 mov r14, rax loc_983D9: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_983F4 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_983F4: mov rdi, r14 call __Unwind_Resume
long long fs_get_cache_file(long long a1, long long a2) { void *exception; // rbx int v4[4]; // [rsp+8h] [rbp-60h] BYREF long long v5; // [rsp+18h] [rbp-50h] BYREF _BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF if ( std::string::find(a2, 47LL, 0LL) != -1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 888LL, "GGML_ASSERT(%s) failed", "filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); LABEL_7: exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } fs_get_cache_directory[abi:cxx11]((long long)v4); if ( !fs_create_directory_with_parents(v4) ) goto LABEL_7; std::operator+<char>(a1, v4, a2); if ( *(long long **)v4 != &v5 ) operator delete(*(void **)v4, v5 + 1); return a1; }
fs_get_cache_file: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RDI,RSI MOV ESI,0x2f XOR EDX,EDX CALL 0x0011dfb0 CMP RAX,-0x1 JNZ 0x00198335 LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00197f47 LAB_001982f0: MOV RDI,R15 CALL 0x00197e4c TEST AL,AL JZ 0x00198356 LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,R14 CALL 0x0019d408 LAB_0019830c: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00198327 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc40 LAB_00198327: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_00198335: LEA RDI,[0x21725d] LEA RDX,[0x20da63] LEA RCX,[0x21740c] MOV ESI,0x378 XOR EAX,EAX CALL 0x0011e4f0 LAB_00198356: MOV EDI,0x10 CALL 0x0011d5b0 MOV RBX,RAX LAB_00198363: LEA RSI,[0x217444] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00126b6b MOV BPL,0x1 LAB_0019837c: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011e420 XOR EBP,EBP MOV RSI,qword ptr [0x00258fe8] MOV RDX,qword ptr [0x00258f58] MOV RDI,RBX CALL 0x0011e5a0
/* fs_get_cache_file(std::__cxx11::string const&) */ string * fs_get_cache_file(string *param_1) { char cVar1; long lVar2; runtime_error *this; char in_SIL; long *local_60 [2]; long local_50 [2]; string local_40 [32]; lVar2 = std::__cxx11::string::find(in_SIL,0x2f); if (lVar2 != -1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378, "GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); } fs_get_cache_directory_abi_cxx11_(); /* try { // try from 001982f0 to 0019830b has its CatchHandler @ 001983d6 */ cVar1 = fs_create_directory_with_parents((string *)local_60); if (cVar1 != '\0') { std::operator+(param_1,(string *)local_60); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00198363 to 00198378 has its CatchHandler @ 001983c1 */ std::operator+((char *)local_40,(string *)"failed to create cache directory: "); /* try { // try from 0019837c to 001983a0 has its CatchHandler @ 001983a1 */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00258fe8,PTR__runtime_error_00258f58); }
10,171
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string fs_get_cache_file(const std::string & filename) { GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); std::string cache_directory = fs_get_cache_directory(); const bool success = fs_create_directory_with_parents(cache_directory); if (!success) { throw std::runtime_error("failed to create cache directory: " + cache_directory); } return cache_directory + filename; }
O3
cpp
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi movl $0x2f, %esi xorl %edx, %edx callq 0x1dfc0 cmpq $-0x1, %rax jne 0x9814a leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x97d5c movq %r15, %rdi callq 0x97c5e testb %al, %al je 0x9816b leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x9cf3e leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9813c movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x7c10c(%rip), %rdi # 0x11425d leaq 0x7291b(%rip), %rdx # 0x10aa73 leaq 0x7c2ad(%rip), %rcx # 0x11440c movl $0x378, %esi # imm = 0x378 xorl %eax, %eax callq 0x1e500 movl $0x10, %edi callq 0x1d5b0 movq %rax, %rbx leaq 0x7c2c5(%rip), %rsi # 0x114444 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x26b0d movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1e430 xorl %ebp, %ebp movq 0xbde41(%rip), %rsi # 0x155fe8 movq 0xbddaa(%rip), %rdx # 0x155f58 movq %rbx, %rdi callq 0x1e5b0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x981d4 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc50 testb %bpl, %bpl jne 0x981de jmp 0x981eb movq %rax, %r14 movq %rbx, %rdi callq 0x1d8c0 jmp 0x981eb movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98206 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %r14, %rdi callq 0x1e660
_Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; int push r14; int push rbx; __int64 sub rsp, 48h mov r14, rsi mov rbx, rdi mov rdi, rsi mov esi, 2Fh ; '/' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_9814A lea r15, [rsp+68h+var_60] mov rdi, r15; int call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void) mov rdi, r15 call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&) test al, al jz short loc_9816B lea rsi, [rsp+68h+var_60] mov rdi, rbx mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&) lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9813C mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9813C: mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_9814A: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"... mov esi, 378h xor eax, eax call _ggml_abort loc_9816B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToCreate; "failed to create cache directory: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_981D4 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_981D4: test bpl, bpl jnz short loc_981DE jmp short loc_981EB mov r14, rax loc_981DE: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_981EB mov r14, rax loc_981EB: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98206 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_98206: mov rdi, r14 call __Unwind_Resume
long long fs_get_cache_file(long long a1, long long a2) { void *exception; // rbx int v4[4]; // [rsp+8h] [rbp-60h] BYREF long long v5; // [rsp+18h] [rbp-50h] BYREF _BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF if ( std::string::find(a2, 47LL, 0LL) != -1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 888LL, "GGML_ASSERT(%s) failed", "filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); LABEL_7: exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } fs_get_cache_directory[abi:cxx11]((long long)v4); if ( !(unsigned __int8)fs_create_directory_with_parents(v4) ) goto LABEL_7; std::operator+<char>(a1, v4, a2); if ( *(long long **)v4 != &v5 ) operator delete(*(void **)v4, v5 + 1); return a1; }
fs_get_cache_file: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RDI,RSI MOV ESI,0x2f XOR EDX,EDX CALL 0x0011dfc0 CMP RAX,-0x1 JNZ 0x0019814a LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00197d5c LAB_00198105: MOV RDI,R15 CALL 0x00197c5e TEST AL,AL JZ 0x0019816b LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,R14 CALL 0x0019cf3e LAB_00198121: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019813c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc50 LAB_0019813c: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0019814a: LEA RDI,[0x21425d] LEA RDX,[0x20aa73] LEA RCX,[0x21440c] MOV ESI,0x378 XOR EAX,EAX CALL 0x0011e500 LAB_0019816b: MOV EDI,0x10 CALL 0x0011d5b0 MOV RBX,RAX LAB_00198178: LEA RSI,[0x214444] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00126b0d MOV BPL,0x1 LAB_00198191: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011e430 XOR EBP,EBP MOV RSI,qword ptr [0x00255fe8] MOV RDX,qword ptr [0x00255f58] MOV RDI,RBX CALL 0x0011e5b0
/* fs_get_cache_file(std::__cxx11::string const&) */ string * fs_get_cache_file(string *param_1) { char cVar1; long lVar2; runtime_error *this; char in_SIL; long *local_60 [2]; long local_50 [2]; string local_40 [32]; lVar2 = std::__cxx11::string::find(in_SIL,0x2f); if (lVar2 != -1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378, "GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); } fs_get_cache_directory_abi_cxx11_(); /* try { // try from 00198105 to 00198120 has its CatchHandler @ 001981e8 */ cVar1 = fs_create_directory_with_parents((string *)local_60); if (cVar1 != '\0') { std::operator+(param_1,(string *)local_60); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00198178 to 0019818d has its CatchHandler @ 001981db */ std::operator+((char *)local_40,(string *)"failed to create cache directory: "); /* try { // try from 00198191 to 001981b5 has its CatchHandler @ 001981b6 */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58); }
10,172
lunasvg::SVGGElement::render(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGGElement::render(SVGRenderState& state) const { if(isDisplayNone()) return; SVGBlendInfo blendInfo(this); SVGRenderState newState(this, state, localTransform()); newState.beginGroup(blendInfo); renderChildren(newState); newState.endGroup(blendInfo); }
O0
cpp
lunasvg::SVGGElement::render(lunasvg::SVGRenderState&) const: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x98(%rbp) callq 0x20470 testb $0x1, %al jne 0x1c179 jmp 0x1c17e jmp 0x1c21b movq -0x98(%rbp), %rsi leaq -0x28(%rbp), %rdi movq %rdi, -0xa0(%rbp) callq 0x4c890 movq -0x98(%rbp), %rsi movq -0x10(%rbp), %rax movq %rax, -0xb8(%rbp) leaq -0x80(%rbp), %rdi movq %rdi, -0xb0(%rbp) callq 0x20db0 movq -0x98(%rbp), %rsi movq -0xb8(%rbp), %rdx movq -0xb0(%rbp), %rcx leaq -0x68(%rbp), %rdi movq %rdi, -0xa8(%rbp) callq 0x20e00 movq -0xa8(%rbp), %rdi movq -0xa0(%rbp), %rsi callq 0x4c9d0 jmp 0x1c1f1 movq -0x98(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0x1a060 jmp 0x1c203 leaq -0x68(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x4cae0 jmp 0x1c212 leaq -0x68(%rbp), %rdi callq 0xe810 addq $0xc0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x88(%rbp) movl %eax, -0x8c(%rbp) leaq -0x68(%rbp), %rdi callq 0xe810 movq -0x88(%rbp), %rdi callq 0xb6c0 nopl (%rax,%rax)
_ZNK7lunasvg11SVGGElement6renderERNS_14SVGRenderStateE: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; this mov [rbp+var_98], rdi call _ZNK7lunasvg10SVGElement13isDisplayNoneEv; lunasvg::SVGElement::isDisplayNone(void) test al, 1 jnz short loc_1C179 jmp short loc_1C17E loc_1C179: jmp loc_1C21B loc_1C17E: mov rsi, [rbp+var_98]; lunasvg::SVGElement * lea rdi, [rbp+var_28]; this mov [rbp+var_A0], rdi call _ZN7lunasvg12SVGBlendInfoC2EPKNS_10SVGElementE; lunasvg::SVGBlendInfo::SVGBlendInfo(lunasvg::SVGElement const*) mov rsi, [rbp+var_98] mov rax, [rbp+var_10] mov [rbp+var_B8], rax lea rdi, [rbp+var_80]; this mov [rbp+var_B0], rdi call _ZNK7lunasvg18SVGGraphicsElement14localTransformEv; lunasvg::SVGGraphicsElement::localTransform(void) mov rsi, [rbp+var_98]; lunasvg::SVGElement * mov rdx, [rbp+var_B8]; lunasvg::SVGRenderState * mov rcx, [rbp+var_B0]; lunasvg::Transform * lea rdi, [rbp+var_68]; this mov [rbp+var_A8], rdi call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementERKS0_RKNS_9TransformE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const&,lunasvg::Transform const&) mov rdi, [rbp+var_A8]; this mov rsi, [rbp+var_A0]; lunasvg::SVGBlendInfo * call _ZN7lunasvg14SVGRenderState10beginGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::beginGroup(lunasvg::SVGBlendInfo const&) jmp short $+2 loc_1C1F1: mov rdi, [rbp+var_98]; this lea rsi, [rbp+var_68]; lunasvg::SVGRenderState * call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &) jmp short $+2 loc_1C203: lea rdi, [rbp+var_68]; this lea rsi, [rbp+var_28]; lunasvg::SVGBlendInfo * call _ZN7lunasvg14SVGRenderState8endGroupERKNS_12SVGBlendInfoE; lunasvg::SVGRenderState::endGroup(lunasvg::SVGBlendInfo const&) jmp short $+2 loc_1C212: lea rdi, [rbp+var_68]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() loc_1C21B: add rsp, 0C0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_88], rcx mov [rbp+var_8C], eax lea rdi, [rbp+var_68]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() mov rdi, [rbp+var_88] call __Unwind_Resume
void lunasvg::SVGGElement::render(lunasvg::SVGGElement *this, lunasvg::SVGRenderState *a2) { lunasvg::SVGRenderState *v2; // [rsp+8h] [rbp-B8h] _BYTE v3[24]; // [rsp+40h] [rbp-80h] BYREF _BYTE v4[64]; // [rsp+58h] [rbp-68h] BYREF _BYTE v5[24]; // [rsp+98h] [rbp-28h] BYREF lunasvg::SVGRenderState *v6; // [rsp+B0h] [rbp-10h] lunasvg::SVGElement *v7; // [rsp+B8h] [rbp-8h] v7 = this; v6 = a2; if ( (lunasvg::SVGElement::isDisplayNone(this) & 1) == 0 ) { lunasvg::SVGBlendInfo::SVGBlendInfo((lunasvg::SVGBlendInfo *)v5, this); v2 = v6; lunasvg::SVGGraphicsElement::localTransform((lunasvg::SVGGraphicsElement *)v3); lunasvg::SVGRenderState::SVGRenderState((lunasvg::SVGRenderState *)v4, this, v2, (const lunasvg::Transform *)v3); lunasvg::SVGRenderState::beginGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v5); lunasvg::SVGElement::renderChildren(this, (lunasvg::SVGRenderState *)v4); lunasvg::SVGRenderState::endGroup((lunasvg::SVGRenderState *)v4, (const lunasvg::SVGBlendInfo *)v5); lunasvg::SVGRenderState::~SVGRenderState((lunasvg::SVGRenderState *)v4); } }
render: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x98],RDI CALL 0x00120470 TEST AL,0x1 JNZ 0x0011c179 JMP 0x0011c17e LAB_0011c179: JMP 0x0011c21b LAB_0011c17e: MOV RSI,qword ptr [RBP + -0x98] LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0xa0],RDI CALL 0x0014c890 MOV RSI,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb8],RAX LEA RDI,[RBP + -0x80] MOV qword ptr [RBP + -0xb0],RDI CALL 0x00120db0 MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0xb8] MOV RCX,qword ptr [RBP + -0xb0] LEA RDI,[RBP + -0x68] MOV qword ptr [RBP + -0xa8],RDI CALL 0x00120e00 MOV RDI,qword ptr [RBP + -0xa8] MOV RSI,qword ptr [RBP + -0xa0] LAB_0011c1ea: CALL 0x0014c9d0 JMP 0x0011c1f1 LAB_0011c1f1: MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[RBP + -0x68] CALL 0x0011a060 JMP 0x0011c203 LAB_0011c203: LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x28] CALL 0x0014cae0 LAB_0011c210: JMP 0x0011c212 LAB_0011c212: LEA RDI,[RBP + -0x68] CALL 0x0010e810 LAB_0011c21b: ADD RSP,0xc0 POP RBP RET
/* lunasvg::SVGGElement::render(lunasvg::SVGRenderState&) const */ void __thiscall lunasvg::SVGGElement::render(SVGGElement *this,SVGRenderState *param_1) { SVGRenderState *pSVar1; ulong uVar2; Transform local_88 [24]; SVGRenderState local_70 [64]; SVGBlendInfo local_30 [24]; SVGRenderState *local_18; SVGGElement *local_10; local_18 = param_1; local_10 = this; uVar2 = SVGElement::isDisplayNone((SVGElement *)this); if ((uVar2 & 1) == 0) { SVGBlendInfo::SVGBlendInfo(local_30,(SVGElement *)this); pSVar1 = local_18; SVGGraphicsElement::localTransform(); SVGRenderState::SVGRenderState(local_70,(SVGElement *)this,pSVar1,local_88); /* try { // try from 0011c1ea to 0011c20f has its CatchHandler @ 0011c224 */ SVGRenderState::beginGroup((SVGBlendInfo *)local_70); SVGElement::renderChildren((SVGElement *)this,local_70); SVGRenderState::endGroup(local_70,local_30); SVGRenderState::~SVGRenderState(local_70); } return; }
10,173
SORT_INFO::free_data()
eloqsql/sql/filesort.h
void free_data() { close_cached_file(&io_cache); free_addon_buff(); my_free(record_pointers); my_free(buffpek.str); my_free(addon_fields); free_sort_buffer(); }
O0
c
SORT_INFO::free_data(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) addq $0x40, %rdi callq 0x13086e0 movq -0x10(%rbp), %rdi callq 0xd051d0 movq -0x10(%rbp), %rax movq 0x160(%rax), %rdi callq 0x1324630 movq -0x10(%rbp), %rax movq 0x148(%rax), %rdi callq 0x1324630 movq -0x10(%rbp), %rax movq 0x158(%rax), %rdi callq 0x1324630 movq -0x10(%rbp), %rdi callq 0x8cfbd0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN9SORT_INFO9free_dataEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_10], rdi add rdi, 40h ; '@' call close_cached_file mov rdi, [rbp+var_10]; this call _ZN9SORT_INFO15free_addon_buffEv; SORT_INFO::free_addon_buff(void) mov rax, [rbp+var_10] mov rdi, [rax+160h] call my_free mov rax, [rbp+var_10] mov rdi, [rax+148h] call my_free mov rax, [rbp+var_10] mov rdi, [rax+158h] call my_free mov rdi, [rbp+var_10]; this call _ZN9SORT_INFO16free_sort_bufferEv; SORT_INFO::free_sort_buffer(void) add rsp, 10h pop rbp retn
long long SORT_INFO::free_data(SORT_INFO *this) { close_cached_file((char *)this + 64); SORT_INFO::free_addon_buff(this); my_free(*((_QWORD *)this + 44)); my_free(*((_QWORD *)this + 41)); my_free(*((_QWORD *)this + 43)); return SORT_INFO::free_sort_buffer(this); }
__cxx_global_var_init.13: PUSH RBP MOV RBP,RSP SUB RSP,0x40 LEA RDX,[RBP + -0x21] MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_008cfb78: LEA RDI,[0x26cfa40] LEA RSI,[0x159a4f2] CALL 0x008fd800 LAB_008cfb8b: JMP 0x008cfb8d LAB_008cfb8d: LEA RAX,[RBP + -0x21] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00905dd0 MOV RDI,qword ptr [0x01c3bfd8] LEA RSI,[0x26cfa40] LEA RDX,[0x1c3c008] CALL 0x00875dc0 ADD RSP,0x40 POP RBP RET
void __cxx_global_var_init_13(void) { allocator local_29; allocator *local_28; __new_allocator<char> *local_20; allocator *local_10; local_28 = &local_29; local_10 = local_28; /* try { // try from 008cfb78 to 008cfb8a has its CatchHandler @ 008cfbbe */ std::__cxx11::string::string<std::allocator<char>> ((string *)wsrep_schema_str_abi_cxx11_,"mysql",local_28); local_20 = (__new_allocator<char> *)&local_29; std::__new_allocator<char>::~__new_allocator(local_20); __cxa_atexit(PTR__string_01c3bfd8,wsrep_schema_str_abi_cxx11_,&__dso_handle); return; }
10,174
c4_verify_blockroot_signature
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_blockhash_proof.c
c4_status_t c4_verify_blockroot_signature(verify_ctx_t* ctx, ssz_ob_t* header, ssz_ob_t* sync_committee_bits, ssz_ob_t* sync_committee_signature, uint64_t slot) { bytes32_t root = {0}; c4_sync_state_t sync_state = {0}; if (slot == 0) slot = ssz_get_uint64(header, "slot") + 1; if (slot == 0) THROW_ERROR("slot is missing in beacon header!"); // get the validators and make sure we have the right ones for the requested period TRY_ASYNC(c4_get_validators(ctx, slot >> 13, &sync_state)); // compute blockhash ssz_hash_tree_root(*header, root); // compute signing message and store it in root again calculate_signing_message(ctx, slot, root, root); // verify the signature bool valid = blst_verify(root, sync_committee_signature->bytes.data, sync_state.validators.data, 512, sync_committee_bits->bytes, sync_state.deserialized); #ifndef C4_STATIC_MEMORY safe_free(sync_state.validators.data); #endif if (!valid) THROW_ERROR("invalid blockhash signature!"); return C4_SUCCESS; }
O0
c
c4_verify_blockroot_signature: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x23140 leaq -0x70(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x23140 cmpq $0x0, -0x30(%rbp) jne 0x2e8ce movq -0x18(%rbp), %rdi leaq 0xabef9(%rip), %rsi # 0xda7ba callq 0x2e9d0 addq $0x1, %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x2e8f1 movq -0x10(%rbp), %rdi addq $0x70, %rdi leaq 0xace2f(%rip), %rsi # 0xdb713 callq 0xa6370 movl %eax, -0x4(%rbp) jmp 0x2e9bf jmp 0x2e8f3 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rax shrq $0xd, %rax movl %eax, %esi leaq -0x70(%rbp), %rdx callq 0x2db90 movl %eax, -0x74(%rbp) cmpl $0x0, -0x74(%rbp) je 0x2e91e movl -0x74(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x2e9bf jmp 0x2e920 movq -0x18(%rbp), %rax leaq -0x50(%rbp), %rdi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0a50 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi leaq -0x50(%rbp), %rdx leaq -0x50(%rbp), %rcx callq 0x2ea20 leaq -0x50(%rbp), %rdi movq -0x28(%rbp), %rax movq 0x8(%rax), %rsi movq -0x60(%rbp), %rdx movq -0x20(%rbp), %rcx movb -0x58(%rbp), %al movl (%rcx), %r8d movq 0x8(%rcx), %r9 movl $0x200, %ecx # imm = 0x200 andb $0x1, %al movzbl %al, %eax movl %eax, (%rsp) callq 0xa34c0 andb $0x1, %al movb %al, -0x75(%rbp) movq -0x60(%rbp), %rdi callq 0x9c5a0 testb $0x1, -0x75(%rbp) jne 0x2e9b8 movq -0x10(%rbp), %rdi addq $0x70, %rdi leaq 0xacd87(%rip), %rsi # 0xdb735 callq 0xa6370 movl %eax, -0x4(%rbp) jmp 0x2e9bf movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopl (%rax,%rax)
c4_verify_blockroot_signature: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 lea rdi, [rbp+var_50] xor esi, esi mov edx, 20h ; ' ' call _memset lea rdi, [rbp+var_70] xor esi, esi mov edx, 20h ; ' ' call _memset cmp [rbp+var_30], 0 jnz short loc_2E8CE mov rdi, [rbp+var_18] lea rsi, aSlot; "slot" call ssz_get_uint64_3 add rax, 1 mov [rbp+var_30], rax loc_2E8CE: cmp [rbp+var_30], 0 jnz short loc_2E8F1 mov rdi, [rbp+var_10] add rdi, 70h ; 'p' lea rsi, aSlotIsMissingI; "slot is missing in beacon header!" call c4_state_add_error mov [rbp+var_4], eax jmp loc_2E9BF loc_2E8F1: jmp short $+2 loc_2E8F3: mov rdi, [rbp+var_10] mov rax, [rbp+var_30] shr rax, 0Dh mov esi, eax lea rdx, [rbp+var_70] call c4_get_validators mov [rbp+var_74], eax cmp [rbp+var_74], 0 jz short loc_2E91E mov eax, [rbp+var_74] mov [rbp+var_4], eax jmp loc_2E9BF loc_2E91E: jmp short $+2 loc_2E920: mov rax, [rbp+var_18] lea rdi, [rbp+var_50] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call ssz_hash_tree_root mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] lea rdx, [rbp+var_50] lea rcx, [rbp+var_50] call calculate_signing_message lea rdi, [rbp+var_50] mov rax, [rbp+var_28] mov rsi, [rax+8] mov rdx, [rbp+var_60] mov rcx, [rbp+var_20] mov al, [rbp+var_58] mov r8d, [rcx] mov r9, [rcx+8] mov ecx, 200h and al, 1 movzx eax, al mov dword ptr [rsp+90h+var_90], eax call blst_verify and al, 1 mov [rbp+var_75], al mov rdi, [rbp+var_60] call safe_free test [rbp+var_75], 1 jnz short loc_2E9B8 mov rdi, [rbp+var_10] add rdi, 70h ; 'p' lea rsi, aInvalidBlockha_0; "invalid blockhash signature!" call c4_state_add_error mov [rbp+var_4], eax jmp short loc_2E9BF loc_2E9B8: mov [rbp+var_4], 0 loc_2E9BF: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long c4_verify_blockroot_signature(long long a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5) { unsigned int v5; // esi int v6; // edx int v7; // r8d int v8; // r9d int v10; // [rsp+1Bh] [rbp-75h] unsigned int validators; // [rsp+1Ch] [rbp-74h] _QWORD v12[2]; // [rsp+20h] [rbp-70h] BYREF long long v13; // [rsp+30h] [rbp-60h] char v14; // [rsp+38h] [rbp-58h] _BYTE v15[32]; // [rsp+40h] [rbp-50h] BYREF unsigned long long v16; // [rsp+60h] [rbp-30h] long long v17; // [rsp+68h] [rbp-28h] long long v18; // [rsp+70h] [rbp-20h] _QWORD *v19; // [rsp+78h] [rbp-18h] long long v20; // [rsp+80h] [rbp-10h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; memset(v15, 0LL, sizeof(v15)); memset(v12, 0LL, 32LL); if ( !v16 ) v16 = ssz_get_uint64_3(v19, "slot") + 1; if ( v16 ) { v5 = v16 >> 13; validators = c4_get_validators(v20, v5, v12); if ( validators ) { return validators; } else { ssz_hash_tree_root((unsigned int)v15, v5, v6, v19[1], v7, v8, *v19, v19[1], v19[2]); calculate_signing_message(v20, v16, v15, v15); v10 = blst_verify( (unsigned int)v15, *(_QWORD *)(v17 + 8), v13, 512, *(_DWORD *)v18, *(_QWORD *)(v18 + 8), v14 & 1) & 1; safe_free(v13); if ( (v10 & 1) != 0 ) return 0; else return (unsigned int)c4_state_add_error(v20 + 112, "invalid blockhash signature!"); } } else { return (unsigned int)c4_state_add_error(v20 + 112, "slot is missing in beacon header!"); } }
c4_verify_blockroot_signature: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x20 CALL 0x00123140 LEA RDI,[RBP + -0x70] XOR ESI,ESI MOV EDX,0x20 CALL 0x00123140 CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0012e8ce MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x1da7ba] CALL 0x0012e9d0 ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX LAB_0012e8ce: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0012e8f1 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x70 LEA RSI,[0x1db713] CALL 0x001a6370 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012e9bf LAB_0012e8f1: JMP 0x0012e8f3 LAB_0012e8f3: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0xd MOV ESI,EAX LEA RDX,[RBP + -0x70] CALL 0x0012db90 MOV dword ptr [RBP + -0x74],EAX CMP dword ptr [RBP + -0x74],0x0 JZ 0x0012e91e MOV EAX,dword ptr [RBP + -0x74] MOV dword ptr [RBP + -0x4],EAX JMP 0x0012e9bf LAB_0012e91e: JMP 0x0012e920 LAB_0012e920: MOV RAX,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x50] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0a50 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] LEA RDX,[RBP + -0x50] LEA RCX,[RBP + -0x50] CALL 0x0012ea20 LEA RDI,[RBP + -0x50] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RBP + -0x58] MOV R8D,dword ptr [RCX] MOV R9,qword ptr [RCX + 0x8] MOV ECX,0x200 AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP],EAX CALL 0x001a34c0 AND AL,0x1 MOV byte ptr [RBP + -0x75],AL MOV RDI,qword ptr [RBP + -0x60] CALL 0x0019c5a0 TEST byte ptr [RBP + -0x75],0x1 JNZ 0x0012e9b8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x70 LEA RSI,[0x1db735] CALL 0x001a6370 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012e9bf LAB_0012e9b8: MOV dword ptr [RBP + -0x4],0x0 LAB_0012e9bf: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int c4_verify_blockroot_signature (long param_1,int8 *param_2,int4 *param_3,long param_4,ulong param_5) { byte bVar1; long lVar2; int4 uVar3; int8 uVar4; int8 uVar5; int1 local_78 [16]; int8 local_68; byte local_60; int1 local_58 [32]; ulong local_38; long local_30; int4 *local_28; int8 *local_20; long local_18; int local_c; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; memset(local_58,0,0x20); memset(local_78,0,0x20); if (local_38 == 0) { lVar2 = ssz_get_uint64(local_20,&DAT_001da7ba); local_38 = lVar2 + 1; } if (local_38 == 0) { local_c = c4_state_add_error(local_18 + 0x70,"slot is missing in beacon header!"); } else { local_c = c4_get_validators(local_18,local_38 >> 0xd & 0xffffffff,local_78); if (local_c == 0) { uVar3 = (int4)((ulong)*local_20 >> 0x20); uVar4 = local_20[1]; uVar5 = local_20[2]; ssz_hash_tree_root(local_58); calculate_signing_message(local_18,local_38,local_58,local_58); bVar1 = blst_verify(local_58,*(int8 *)(local_30 + 8),local_68,0x200,*local_28, *(int8 *)(local_28 + 2),CONCAT44(uVar3,(uint)(local_60 & 1)),uVar4, uVar5); safe_free(local_68); if ((bVar1 & 1) == 0) { local_c = c4_state_add_error(local_18 + 0x70,"invalid blockhash signature!"); } else { local_c = 0; } } } return local_c; }
10,175
c4_verify_blockroot_signature
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_blockhash_proof.c
c4_status_t c4_verify_blockroot_signature(verify_ctx_t* ctx, ssz_ob_t* header, ssz_ob_t* sync_committee_bits, ssz_ob_t* sync_committee_signature, uint64_t slot) { bytes32_t root = {0}; c4_sync_state_t sync_state = {0}; if (slot == 0) slot = ssz_get_uint64(header, "slot") + 1; if (slot == 0) THROW_ERROR("slot is missing in beacon header!"); // get the validators and make sure we have the right ones for the requested period TRY_ASYNC(c4_get_validators(ctx, slot >> 13, &sync_state)); // compute blockhash ssz_hash_tree_root(*header, root); // compute signing message and store it in root again calculate_signing_message(ctx, slot, root, root); // verify the signature bool valid = blst_verify(root, sync_committee_signature->bytes.data, sync_state.validators.data, 512, sync_committee_bits->bytes, sync_state.deserialized); #ifndef C4_STATIC_MEMORY safe_free(sync_state.validators.data); #endif if (!valid) THROW_ERROR("invalid blockhash signature!"); return C4_SUCCESS; }
O3
c
c4_verify_blockroot_signature: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %r8, %r12 movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) testq %r8, %r8 jne 0x29687 leaq 0x56221(%rip), %rdx # 0x7f873 leaq 0x80(%rsp), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x53211 movl (%r12), %edi movq 0x8(%r12), %rsi callq 0x51c2a movq %rax, %r12 incq %r12 jne 0x29687 leaq 0x56f4f(%rip), %rsi # 0x805d1 jmp 0x2976a movq %r12, %rsi shrq $0xd, %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x28cf4 testl %eax, %eax jne 0x29776 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) leaq 0x60(%rsp), %r13 movq %r13, %rdi callq 0x53496 movl 0x80(%rbx), %edi leaq 0xa0(%rsp), %rdx xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movaps (%r13), %xmm0 movaps 0x10(%r13), %xmm1 movaps %xmm0, -0x20(%rdx) movaps %xmm1, -0x10(%rdx) movq %r12, %rsi callq 0x29560 movl $0x40, 0x48(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x815b0(%rip), %rax # 0xaacc0 movq %rax, 0x58(%rsp) movq %rax, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r13, %rdi callq 0x53496 movq 0x8(%r15), %rsi movq 0x30(%rsp), %rdx movzbl 0x38(%rsp), %eax movl (%r14), %r8d movq 0x8(%r14), %r9 movl %eax, (%rsp) movq %r13, %rdi movl $0x200, %ecx # imm = 0x200 callq 0x54e67 movl %eax, %ebp movq 0x30(%rsp), %rdi callq 0x50f4c xorl %eax, %eax testb %bpl, %bpl jne 0x29776 leaq 0x56e89(%rip), %rsi # 0x805f3 addq $0x70, %rbx movq %rbx, %rdi callq 0x56981 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
c4_verify_blockroot_signature: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r12, r8 mov r15, rcx mov r14, rdx mov r13, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+0F8h+var_88], xmm0 movaps [rsp+0F8h+var_98], xmm0 movaps [rsp+0F8h+var_C8], xmm0 movaps [rsp+0F8h+var_D8], xmm0 test r8, r8 jnz short loc_29687 lea rdx, aSlot; "slot" lea r12, [rsp+0F8h+var_78] mov rdi, r12 mov rsi, r13 call ssz_get mov edi, [r12] mov rsi, [r12+8] call bytes_as_le mov r12, rax inc r12 jnz short loc_29687 lea rsi, aSlotIsMissingI; "slot is missing in beacon header!" jmp loc_2976A loc_29687: mov rsi, r12 shr rsi, 0Dh lea rdx, [rsp+0F8h+var_D8] mov rdi, rbx call c4_get_validators test eax, eax jnz loc_29776 mov rax, [r13+10h] mov [rsp+0F8h+var_E8], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+0F8h+var_F8], xmm0 lea r13, [rsp+0F8h+var_98] mov rdi, r13 call ssz_hash_tree_root mov edi, [rbx+80h] lea rdx, [rsp+0F8h+var_58] xorps xmm0, xmm0 movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 movaps xmm0, xmmword ptr [r13+0] movaps xmm1, xmmword ptr [r13+10h] movaps xmmword ptr [rdx-20h], xmm0 movaps xmmword ptr [rdx-10h], xmm1 mov rsi, r12 call eth_calculate_domain mov dword ptr [rsp+0F8h+var_B0], 40h ; '@' lea rax, [rsp+0F8h+var_78] mov qword ptr [rsp+0F8h+var_B0+8], rax lea rax, SIGNING_DATA_CONTAINER mov [rsp+0F8h+var_A0], rax mov [rsp+0F8h+var_E8], rax movups xmm0, [rsp+0F8h+var_B0] movups [rsp+0F8h+var_F8], xmm0 mov rdi, r13 call ssz_hash_tree_root mov rsi, [r15+8] mov rdx, qword ptr [rsp+0F8h+var_C8] movzx eax, byte ptr [rsp+0F8h+var_C8+8] mov r8d, [r14] mov r9, [r14+8] mov dword ptr [rsp+0F8h+var_F8], eax mov rdi, r13 mov ecx, 200h call blst_verify mov ebp, eax mov rdi, qword ptr [rsp+0F8h+var_C8] call safe_free xor eax, eax test bpl, bpl jnz short loc_29776 lea rsi, aInvalidBlockha_0; "invalid blockhash signature!" loc_2976A: add rbx, 70h ; 'p' mov rdi, rbx call c4_state_add_error loc_29776: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long c4_verify_blockroot_signature(long long a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5) { unsigned long long v5; // r12 long long v9; // rax const char *v10; // rsi long long result; // rax long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 long long v16; // rdi long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 char v21; // bp __int128 v22; // [rsp+20h] [rbp-D8h] BYREF __int128 v23; // [rsp+30h] [rbp-C8h] long long v24; // [rsp+48h] [rbp-B0h] _OWORD *v25; // [rsp+50h] [rbp-A8h] char **v26; // [rsp+58h] [rbp-A0h] __int128 v27; // [rsp+60h] [rbp-98h] BYREF __int128 v28; // [rsp+70h] [rbp-88h] _OWORD v29[2]; // [rsp+80h] [rbp-78h] BYREF _BYTE v30[88]; // [rsp+A0h] [rbp-58h] BYREF v5 = a5; v28 = 0LL; v27 = 0LL; v23 = 0LL; v22 = 0LL; if ( !a5 ) { ssz_get(v29, a2); v9 = bytes_as_le(LODWORD(v29[0]), *((_QWORD *)&v29[0] + 1)); v5 = v9 + 1; if ( v9 == -1 ) { v10 = "slot is missing in beacon header!"; return c4_state_add_error(a1 + 112, v10); } } result = c4_get_validators(a1, v5 >> 13, &v22); if ( !(_DWORD)result ) { ssz_hash_tree_root(&v27, v5 >> 13, v12, v13, v14, v15, *a2, a2[1], a2[2]); v16 = *(unsigned int *)(a1 + 128); memset(v30, 0, 32); v29[0] = v27; v29[1] = v28; eth_calculate_domain(v16, v5, (long long)v30); LODWORD(v24) = 64; v25 = v29; v26 = &SIGNING_DATA_CONTAINER; ssz_hash_tree_root(&v27, v5, v17, v18, v19, v20, v24, v29, &SIGNING_DATA_CONTAINER); v21 = blst_verify( (unsigned int)&v27, *(_QWORD *)(a4 + 8), v23, 512, *(_DWORD *)a3, *(_QWORD *)(a3 + 8), SBYTE8(v23)); safe_free(v23); result = 0LL; if ( !v21 ) { v10 = "invalid blockhash signature!"; return c4_state_add_error(a1 + 112, v10); } } return result; }
c4_verify_blockroot_signature: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R12,R8 MOV R15,RCX MOV R14,RDX MOV R13,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 TEST R8,R8 JNZ 0x00129687 LEA RDX,[0x17f873] LEA R12,[RSP + 0x80] MOV RDI,R12 MOV RSI,R13 CALL 0x00153211 MOV EDI,dword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] CALL 0x00151c2a MOV R12,RAX INC R12 JNZ 0x00129687 LEA RSI,[0x1805d1] JMP 0x0012976a LAB_00129687: MOV RSI,R12 SHR RSI,0xd LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x00128cf4 TEST EAX,EAX JNZ 0x00129776 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 LEA R13,[RSP + 0x60] MOV RDI,R13 CALL 0x00153496 MOV EDI,dword ptr [RBX + 0x80] LEA RDX,[RSP + 0xa0] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOVAPS XMM0,xmmword ptr [R13] MOVAPS XMM1,xmmword ptr [R13 + 0x10] MOVAPS xmmword ptr [RDX + -0x20],XMM0 MOVAPS xmmword ptr [RDX + -0x10],XMM1 MOV RSI,R12 CALL 0x00129560 MOV dword ptr [RSP + 0x48],0x40 LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0x50],RAX LEA RAX,[0x1aacc0] MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R13 CALL 0x00153496 MOV RSI,qword ptr [R15 + 0x8] MOV RDX,qword ptr [RSP + 0x30] MOVZX EAX,byte ptr [RSP + 0x38] MOV R8D,dword ptr [R14] MOV R9,qword ptr [R14 + 0x8] MOV dword ptr [RSP],EAX MOV RDI,R13 MOV ECX,0x200 CALL 0x00154e67 MOV EBP,EAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x00150f4c XOR EAX,EAX TEST BPL,BPL JNZ 0x00129776 LEA RSI,[0x1805f3] LAB_0012976a: ADD RBX,0x70 MOV RDI,RBX CALL 0x00156981 LAB_00129776: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 c4_verify_blockroot_signature (long param_1,int8 param_2,int4 *param_3,long param_4,ulong param_5) { char cVar1; long lVar2; int8 uVar3; char *pcVar4; int4 uVar5; int1 *puVar6; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; int4 local_b0; int4 *puStack_a8; int1 *local_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; int4 local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; local_88 = 0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; if (param_5 == 0) { ssz_get(&local_78,param_2,&DAT_0017f873); lVar2 = bytes_as_le(local_78,CONCAT44(uStack_6c,uStack_70)); param_5 = lVar2 + 1; if (param_5 == 0) { pcVar4 = "slot is missing in beacon header!"; goto LAB_0012976a; } } uVar3 = c4_get_validators(param_1,param_5 >> 0xd,&local_d8); if ((int)uVar3 != 0) { return uVar3; } ssz_hash_tree_root(&local_98); local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_78 = (int4)local_98; uStack_74 = local_98._4_4_; uStack_70 = (int4)uStack_90; uStack_6c = uStack_90._4_4_; local_68 = (int4)local_88; uStack_64 = local_88._4_4_; uStack_60 = (int4)uStack_80; uStack_5c = uStack_80._4_4_; eth_calculate_domain(*(int4 *)(param_1 + 0x80),param_5); local_b0 = 0x40; puStack_a8 = &local_78; local_a0 = SIGNING_DATA_CONTAINER; puVar6 = SIGNING_DATA_CONTAINER; uVar5 = puStack_a8._0_4_; ssz_hash_tree_root(&local_98); cVar1 = blst_verify(&local_98,*(int8 *)(param_4 + 8),local_c8,0x200,*param_3, *(int8 *)(param_3 + 2),(int1)uStack_c0,uVar5,puVar6); safe_free(local_c8); if (cVar1 != '\0') { return 0; } pcVar4 = "invalid blockhash signature!"; LAB_0012976a: uVar3 = c4_state_add_error(param_1 + 0x70,pcVar4); return uVar3; }
10,176
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3f0 addq 0x8(%r14), %rax movq %rbx, %rdi movq %rax, %rsi callq 0x1bdd0 movq %rbx, %rdi movq %r15, %rsi callq 0x1c160 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1b270 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0xbd28d movq (%r12), %rsi incq %rsi callq 0x1b910 movq %r14, %rdi callq 0x1bff0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen add rax, [r14+8] mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_BD28D mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BD28D: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); std::string::reserve(a1, a3[1] + v4); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); return a1; }
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b3f0 ADD RAX,qword ptr [R14 + 0x8] LAB_001bd242: MOV RDI,RBX MOV RSI,RAX CALL 0x0011bdd0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c160 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011b270 LAB_001bd267: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string> (detail *this,char *param_1,string *param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); /* try { // try from 001bd242 to 001bd266 has its CatchHandler @ 001bd276 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2); return this; }
10,177
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x8bb6d movq %rbx, %rdi movq %rax, %rsi callq 0x24dd0 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %r14, %r8 callq 0x8bba3 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x25258 movq %r14, %rdi callq 0x24fe0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA5_cS8_EEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [5],std::string>(char const*,std::string,char [5],std::string const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],std::string,char const(&)[5],std::string>( long long a1, long long a2, long long a3, long long a4, long long a5) { long long v8; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [5],std::string>(a2, a3, a4, a5); std::string::reserve(a1, v8); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_( a1, a2, a3, a4, a5); return a1; }
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_0018ba7a: MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 CALL 0x0018bb6d MOV RDI,RBX MOV RSI,RAX CALL 0x00124dd0 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,R14 CALL 0x0018bba3 LAB_0018baaa: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [29], std::__cxx11::string, char const (&) [5], std::__cxx11::string >(char const (&) [29], std::__cxx11::string&&, char const (&) [5], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string> (detail *this,char *param_1,string *param_2,char *param_3,string *param_4) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; /* try { // try from 0018ba7a to 0018baa9 has its CatchHandler @ 0018bab7 */ concat_length<std::__cxx11::string,char[5],std::__cxx11::string>(param_1,param_2,param_3,param_4); std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJS8_RA5_S9_S8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ (this,param_1,param_2,param_3,param_4); return this; }
10,178
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], char const*>(char const (&) [26], char const*&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3f0 movq %rax, %rbp addq 0x8(%r12), %rbp movq %r15, %rdi callq 0x1b3f0 addq %rax, %rbp addq 0x8(%r14), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x1bdd0 movq %rbx, %rdi movq %r13, %rsi callq 0x1c160 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1b270 movq %rbx, %rdi movq %r15, %rsi callq 0x1c160 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1b270 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0xbc8bc movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x1b910 movq %r14, %rdi callq 0x1bff0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov rbp, rax add rbp, [r12+8] mov rdi, r15 call _strlen add rbp, rax add rbp, [r14+8] mov rdi, rbx mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_BC8BC mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BC8BC: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],std::string,char const(&)[5],std::string>( long long a1, long long a2, _QWORD *a3, long long a4, _QWORD *a5) { long long v8; // rbp long long v9; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = a3[1] + strlen(a2); v9 = strlen(a4); std::string::reserve(a1, a5[1] + v9 + v8); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); std::string::append(a1, a4); std::string::_M_append(a1, *a5, a5[1]); return a1; }
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b3f0 MOV RBP,RAX ADD RBP,qword ptr [R12 + 0x8] MOV RDI,R15 CALL 0x0011b3f0 ADD RBP,RAX ADD RBP,qword ptr [R14 + 0x8] LAB_001bc84e: MOV RDI,RBX MOV RSI,RBP CALL 0x0011bdd0 MOV RDI,RBX MOV RSI,R13 CALL 0x0011c160 MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,RBX CALL 0x0011b270 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c160 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011b270 LAB_001bc88f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [29], std::__cxx11::string, char const (&) [5], std::__cxx11::string >(char const (&) [29], std::__cxx11::string&&, char const (&) [5], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string> (detail *this,char *param_1,string *param_2,char *param_3,string *param_4) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(param_3); /* try { // try from 001bc84e to 001bc88e has its CatchHandler @ 001bc8a1 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2); std::__cxx11::string::append((char *)this); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_4); return this; }
10,179
mi_reset
eloqsql/storage/myisam/mi_extra.c
int mi_reset(MI_INFO *info) { int error= 0; MYISAM_SHARE *share=info->s; DBUG_ENTER("mi_reset"); /* Free buffers and reset the following flags: EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK If the row buffer cache is large (for dynamic tables), reduce it to save memory. */ if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); error= end_io_cache(&info->rec_cache); } if (share->base.blobs) mi_alloc_rec_buff(info, -1, &info->rec_buff); #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise((char*) share->file_map, share->state.state.data_file_length, MADV_RANDOM); #endif info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS); info->quick_mode=0; info->lastinx= 0; /* Use first index as def */ info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR; info->page_changed= 1; info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); DBUG_RETURN(error); }
O3
c
mi_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r15 movl 0x1c8(%rdi), %eax testb $0x12, %al je 0x7a50e andl $-0x13, %eax movl %eax, 0x1c8(%rbx) leaq 0x220(%rbx), %rdi callq 0x95e37 movl %eax, %r14d jmp 0x7a511 xorl %r14d, %r14d cmpl $0x0, 0x188(%r15) je 0x7a531 leaq 0x120(%rbx), %rdx movq %rbx, %rdi movq $-0x1, %rsi callq 0x7f62d movl 0x1c8(%rbx), %eax testb $0x20, %al je 0x7a556 movq 0x270(%r15), %rdi movq 0x40(%r15), %rsi movl $0x1, %edx callq 0x29480 movl 0x1c8(%rbx), %eax andl $-0x49, %eax movl %eax, 0x1c8(%rbx) movw $0x100, 0x33b(%rbx) # imm = 0x100 movl $0x0, 0x1d4(%rbx) movq $-0x1, %rax movq %rax, 0x170(%rbx) movq %rax, 0x198(%rbx) movl 0x1d0(%rbx), %eax andl $0x1, %eax orl $0x30, %eax movl %eax, 0x1d0(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mi_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r15, [rdi] mov eax, [rdi+1C8h] test al, 12h jz short loc_7A50E and eax, 0FFFFFFEDh mov [rbx+1C8h], eax lea rdi, [rbx+220h] call end_io_cache mov r14d, eax jmp short loc_7A511 loc_7A50E: xor r14d, r14d loc_7A511: cmp dword ptr [r15+188h], 0 jz short loc_7A531 lea rdx, [rbx+120h] mov rdi, rbx mov rsi, 0FFFFFFFFFFFFFFFFh call mi_alloc_rec_buff loc_7A531: mov eax, [rbx+1C8h] test al, 20h jz short loc_7A556 mov rdi, [r15+270h] mov rsi, [r15+40h] mov edx, 1 call _madvise mov eax, [rbx+1C8h] loc_7A556: and eax, 0FFFFFFB7h mov [rbx+1C8h], eax mov word ptr [rbx+33Bh], 100h mov dword ptr [rbx+1D4h], 0 mov rax, 0FFFFFFFFFFFFFFFFh mov [rbx+170h], rax mov [rbx+198h], rax mov eax, [rbx+1D0h] and eax, 1 or eax, 30h mov [rbx+1D0h], eax mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_reset(long long *a1) { long long v1; // r15 int v2; // eax unsigned int v3; // r14d int v4; // eax v1 = *a1; v2 = *((_DWORD *)a1 + 114); if ( (v2 & 0x12) != 0 ) { *((_DWORD *)a1 + 114) = v2 & 0xFFFFFFED; v3 = end_io_cache(a1 + 68); } else { v3 = 0; } if ( *(_DWORD *)(v1 + 392) ) mi_alloc_rec_buff(a1, -1LL, a1 + 36); v4 = *((_DWORD *)a1 + 114); if ( (v4 & 0x20) != 0 ) { madvise(*(_QWORD *)(v1 + 624), *(_QWORD *)(v1 + 64), 1LL); v4 = *((_DWORD *)a1 + 114); } *((_DWORD *)a1 + 114) = v4 & 0xFFFFFFB7; *(_WORD *)((char *)a1 + 827) = 256; *((_DWORD *)a1 + 117) = 0; a1[46] = -1LL; a1[51] = -1LL; *((_DWORD *)a1 + 116) = a1[58] & 1 | 0x30; return v3; }
mi_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R15,qword ptr [RDI] MOV EAX,dword ptr [RDI + 0x1c8] TEST AL,0x12 JZ 0x0017a50e AND EAX,0xffffffed MOV dword ptr [RBX + 0x1c8],EAX LEA RDI,[RBX + 0x220] CALL 0x00195e37 MOV R14D,EAX JMP 0x0017a511 LAB_0017a50e: XOR R14D,R14D LAB_0017a511: CMP dword ptr [R15 + 0x188],0x0 JZ 0x0017a531 LEA RDX,[RBX + 0x120] MOV RDI,RBX MOV RSI,-0x1 CALL 0x0017f62d LAB_0017a531: MOV EAX,dword ptr [RBX + 0x1c8] TEST AL,0x20 JZ 0x0017a556 MOV RDI,qword ptr [R15 + 0x270] MOV RSI,qword ptr [R15 + 0x40] MOV EDX,0x1 CALL 0x00129480 MOV EAX,dword ptr [RBX + 0x1c8] LAB_0017a556: AND EAX,0xffffffb7 MOV dword ptr [RBX + 0x1c8],EAX MOV word ptr [RBX + 0x33b],0x100 MOV dword ptr [RBX + 0x1d4],0x0 MOV RAX,-0x1 MOV qword ptr [RBX + 0x170],RAX MOV qword ptr [RBX + 0x198],RAX MOV EAX,dword ptr [RBX + 0x1d0] AND EAX,0x1 OR EAX,0x30 MOV dword ptr [RBX + 0x1d0],EAX MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mi_reset(long *param_1) { long lVar1; int4 uVar2; uint uVar3; lVar1 = *param_1; if ((*(uint *)(param_1 + 0x39) & 0x12) == 0) { uVar2 = 0; } else { *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed; uVar2 = end_io_cache(param_1 + 0x44); } if (*(int *)(lVar1 + 0x188) != 0) { mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24); } uVar3 = *(uint *)(param_1 + 0x39); if ((uVar3 & 0x20) != 0) { madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1); uVar3 = *(uint *)(param_1 + 0x39); } *(uint *)(param_1 + 0x39) = uVar3 & 0xffffffb7; *(int2 *)((long)param_1 + 0x33b) = 0x100; *(int4 *)((long)param_1 + 0x1d4) = 0; param_1[0x2e] = -1; param_1[0x33] = -1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30; return uVar2; }
10,180
wsrep_host_len(char const*, unsigned long)
eloqsql/sql/wsrep_utils.cc
size_t wsrep_host_len(const char* const addr, size_t const addr_len) { // check for IPv6 notation first const char* const bracket= ('[' == addr[0] ? strchr(addr, ']') : NULL); if (bracket) { // IPv6 return (bracket - addr + 1); } else { // host part ends at ':' or end of string const char* const colon= strchr(addr, ':'); return (colon ? colon - addr : addr_len); } }
O0
cpp
wsrep_host_len(char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %ecx movl $0x5b, %eax cmpl %ecx, %eax jne 0xd179c4 movq -0x10(%rbp), %rdi movl $0x5d, %esi callq 0x433c90 movq %rax, -0x30(%rbp) jmp 0xd179cc xorl %eax, %eax movq %rax, -0x30(%rbp) jmp 0xd179cc movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0xd179f0 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0xd17a2a movq -0x10(%rbp), %rdi movl $0x3a, %esi callq 0x433c90 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0xd17a1a movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0xd17a22 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_Z14wsrep_host_lenPKcm: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] mov eax, 5Bh ; '[' cmp eax, ecx jnz short loc_D179C4 mov rdi, [rbp+var_10] mov esi, 5Dh ; ']' call _strchr mov [rbp+var_30], rax jmp short loc_D179CC loc_D179C4: xor eax, eax mov [rbp+var_30], rax jmp short $+2 loc_D179CC: mov rax, [rbp+var_30] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_D179F0 mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx add rax, 1 mov [rbp+var_8], rax jmp short loc_D17A2A loc_D179F0: mov rdi, [rbp+var_10] mov esi, 3Ah ; ':' call _strchr mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_D17A1A mov rax, [rbp+var_28] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_38], rax jmp short loc_D17A22 loc_D17A1A: mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_D17A22: mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_D17A2A: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long wsrep_host_len(const char *a1, long long a2) { long long v4; // [rsp+10h] [rbp-30h] long long v5; // [rsp+18h] [rbp-28h] if ( *a1 == 91 ) v4 = strchr(a1, 93LL); else v4 = 0LL; if ( v4 ) return v4 - (_QWORD)a1 + 1; v5 = strchr(a1, 58LL); if ( v5 ) return v5 - (_QWORD)a1; else return a2; }
ha_key_cmp: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x0 LAB_00d179c4: CMP dword ptr [RBP + -0x24],0x0 JLE 0x00d195a8 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x100 CMP EAX,0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x7c],EAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x70] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x19],0x0 JZ 0x00d17ae7 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,-0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00d17a82 CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d17a82 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d17a6b XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x13c],EAX JMP 0x00d17a74 LAB_00d17a6b: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x13c],EAX LAB_00d17a74: MOV EAX,dword ptr [RBP + -0x13c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d17a82: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP byte ptr [RAX],0x0 JNZ 0x00d17ae5 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x28041 CMP EAX,0x20041 JNZ 0x00d17abf MOV EAX,dword ptr [RBP + -0x28] AND EAX,0xffffffbe OR EAX,0x4 MOV dword ptr [RBP + -0x28],EAX JMP 0x00d17ada LAB_00d17abf: MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x10000 CMP EAX,0x0 JZ 0x00d17ad8 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00d1977a LAB_00d17ad8: JMP 0x00d17ada LAB_00d17ada: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x64],EAX JMP 0x00d19591 LAB_00d17ae5: JMP 0x00d17ae7 LAB_00d17ae7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] CMP EAX,dword ptr [RBP + -0x24] JNC 0x00d17b0f MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x14c],EAX JMP 0x00d17b18 LAB_00d17b0f: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x14c],EAX LAB_00d17b18: MOV RAX,qword ptr [RBP + -0x148] MOV ECX,dword ptr [RBP + -0x14c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX + 0x14] SUB EAX,ECX MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x18] MOV qword ptr [RBP + -0x158],RAX SUB RAX,0x13 JA 0x00d1958f MOV RAX,qword ptr [RBP + -0x158] LEA RCX,[0x104271c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x1 CMP EAX,0x0 JZ 0x00d17d5b MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d17ba7 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x80],EAX JMP 0x00d17bd4 LAB_00d17ba7: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x80],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LAB_00d17bd4: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d17c06 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x84],EAX MOV dword ptr [RBP + -0x88],0x1 JMP 0x00d17c40 LAB_00d17c06: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x84],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x88],0x3 LAB_00d17c40: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0x84] SUB EAX,dword ptr [RBP + -0x88] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d17d31 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x188],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x180],RAX MOVSXD RAX,dword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x178],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x170],RAX MOVSXD RAX,dword ptr [RBP + -0x84] MOV qword ptr [RBP + -0x168],RAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x159],AL JZ 0x00d17cbc CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x159],AL LAB_00d17cbc: MOV R8,qword ptr [RBP + -0x168] MOV RCX,qword ptr [RBP + -0x170] MOV RDX,qword ptr [RBP + -0x178] MOV RSI,qword ptr [RBP + -0x180] MOV RDI,qword ptr [RBP + -0x188] MOV AL,byte ptr [RBP + -0x159] AND AL,0x1 MOVZX EAX,AL MOVSX R9D,AL CALL 0x00d17870 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d17d31 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d17d1a XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x18c],EAX JMP 0x00d17d23 LAB_00d17d1a: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x18c],EAX LAB_00d17d23: MOV EAX,dword ptr [RBP + -0x18c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d17d31: MOV ECX,dword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f LAB_00d17d5b: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV dword ptr [RBP + -0x8c],EAX MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x90],EAX MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x94],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d17e64 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x1b8],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x1b0],RAX MOV EAX,dword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x1a8],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1a0],RAX MOV EAX,dword ptr [RBP + -0x94] MOV qword ptr [RBP + -0x198],RAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x18d],AL JZ 0x00d17def CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x18d],AL LAB_00d17def: MOV R8,qword ptr [RBP + -0x198] MOV RCX,qword ptr [RBP + -0x1a0] MOV RDX,qword ptr [RBP + -0x1a8] MOV RSI,qword ptr [RBP + -0x1b0] MOV RDI,qword ptr [RBP + -0x1b8] MOV AL,byte ptr [RBP + -0x18d] AND AL,0x1 MOVZX EAX,AL MOVSX R9D,AL CALL 0x00d17870 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d17e64 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d17e4d XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1bc],EAX JMP 0x00d17e56 LAB_00d17e4d: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1bc],EAX LAB_00d17e56: MOV EAX,dword ptr [RBP + -0x1bc] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d17e64: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0x8c] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_2: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x1 CMP EAX,0x0 JZ 0x00d18068 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d17ec0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x98],EAX JMP 0x00d17ef0 LAB_00d17ec0: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x98],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LAB_00d17ef0: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d17f22 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x9c],EAX MOV dword ptr [RBP + -0xa0],0x1 JMP 0x00d17f5c LAB_00d17f22: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0xa0],0x3 LAB_00d17f5c: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0x9c] SUB EAX,dword ptr [RBP + -0xa0] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d1803b MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x1e0],RAX MOV EAX,dword ptr [RBP + -0x98] MOV dword ptr [RBP + -0x1d4],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1d0],RAX MOV EAX,dword ptr [RBP + -0x9c] MOV dword ptr [RBP + -0x1c4],EAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x1bd],AL JZ 0x00d17fc9 CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x1bd],AL LAB_00d17fc9: MOV ECX,dword ptr [RBP + -0x1c4] MOV RDX,qword ptr [RBP + -0x1d0] MOV ESI,dword ptr [RBP + -0x1d4] MOV RDI,qword ptr [RBP + -0x1e0] MOV AL,byte ptr [RBP + -0x1bd] AND AL,0x1 MOVZX EAX,AL MOV R9D,0x1 MOVSX R8D,AL CALL 0x00d19790 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d1803b MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18024 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1e4],EAX JMP 0x00d1802d LAB_00d18024: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1e4],EAX LAB_00d1802d: MOV EAX,dword ptr [RBP + -0x1e4] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d1803b: MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0x9c] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f LAB_00d18068: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0xa4],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18140 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x208],RAX MOV EAX,dword ptr [RBP + -0xa4] MOV dword ptr [RBP + -0x1fc],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1f8],RAX MOV EAX,dword ptr [RBP + -0xa4] MOV dword ptr [RBP + -0x1ec],EAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x1e5],AL JZ 0x00d180d1 CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x1e5],AL LAB_00d180d1: MOV ECX,dword ptr [RBP + -0x1ec] MOV RDX,qword ptr [RBP + -0x1f8] MOV ESI,dword ptr [RBP + -0x1fc] MOV RDI,qword ptr [RBP + -0x208] MOV AL,byte ptr [RBP + -0x1e5] AND AL,0x1 MOVZX EAX,AL XOR R9D,R9D MOVSX R8D,AL CALL 0x00d19790 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18140 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18129 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x20c],EAX JMP 0x00d18132 LAB_00d18129: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x20c],EAX LAB_00d18132: MOV EAX,dword ptr [RBP + -0x20c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18140: MOV ECX,dword ptr [RBP + -0xa4] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0xa4] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d18193 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xa8],EAX JMP 0x00d181c3 LAB_00d18193: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xa8],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LAB_00d181c3: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d181f5 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xac],EAX MOV dword ptr [RBP + -0xb0],0x1 JMP 0x00d1822f LAB_00d181f5: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xac],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0xb0],0x3 LAB_00d1822f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0xac] SUB EAX,dword ptr [RBP + -0xb0] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18323 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x230],RAX MOVSXD RAX,dword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x220],RAX MOVSXD RAX,dword ptr [RBP + -0xac] MOV qword ptr [RBP + -0x218],RAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x20d],AL JZ 0x00d182ae CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x20d],AL LAB_00d182ae: MOV R8,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] MOV RDX,qword ptr [RBP + -0x228] MOV RSI,qword ptr [RBP + -0x230] MOV RDI,qword ptr [RBP + -0x238] MOV AL,byte ptr [RBP + -0x20d] AND AL,0x1 MOVZX EAX,AL MOVSX R9D,AL CALL 0x00d17870 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18323 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d1830c XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x23c],EAX JMP 0x00d18315 LAB_00d1830c: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x23c],EAX LAB_00d18315: MOV EAX,dword ptr [RBP + -0x23c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18323: MOV ECX,dword ptr [RBP + -0xa8] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0xac] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_10: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d18378 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xb4],EAX JMP 0x00d183a8 LAB_00d18378: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xb4],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LAB_00d183a8: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00d183da MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xb8],EAX MOV dword ptr [RBP + -0xbc],0x1 JMP 0x00d18414 LAB_00d183da: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xb8],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0xbc],0x3 LAB_00d18414: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0xb8] SUB EAX,dword ptr [RBP + -0xbc] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d184f0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x260],RAX MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0x254],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x250],RAX MOV EAX,dword ptr [RBP + -0xb8] MOV dword ptr [RBP + -0x244],EAX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0x80 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x23d],AL JZ 0x00d18481 CMP dword ptr [RBP + -0x64],0x0 SETBE AL MOV byte ptr [RBP + -0x23d],AL LAB_00d18481: MOV ECX,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x250] MOV ESI,dword ptr [RBP + -0x254] MOV RDI,qword ptr [RBP + -0x260] MOV AL,byte ptr [RBP + -0x23d] AND AL,0x1 MOVZX EAX,AL XOR R9D,R9D MOVSX R8D,AL CALL 0x00d19790 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d184f0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d184d9 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x264],EAX JMP 0x00d184e2 LAB_00d184d9: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x264],EAX LAB_00d184e2: MOV EAX,dword ptr [RBP + -0x264] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d184f0: MOV ECX,dword ptr [RBP + -0xb4] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV ECX,dword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_e: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xc0],EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xc4],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d185ba MOV EAX,dword ptr [RBP + -0xc0] CMP EAX,dword ptr [RBP + -0xc4] JGE 0x00d18558 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x268],EAX JMP 0x00d18576 LAB_00d18558: MOV EDX,dword ptr [RBP + -0xc0] MOV ESI,dword ptr [RBP + -0xc4] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x268],EAX LAB_00d18576: MOV EAX,dword ptr [RBP + -0x268] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d185ba MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d185a3 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x26c],EAX JMP 0x00d185ac LAB_00d185a3: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x26c],EAX LAB_00d185ac: MOV EAX,dword ptr [RBP + -0x26c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d185ba: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CWDE MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVSX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV word ptr [RBP + -0x36],AX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CWDE MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] MOVSX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV word ptr [RBP + -0x38],AX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18688 MOVSX EAX,word ptr [RBP + -0x36] MOVSX ECX,word ptr [RBP + -0x38] CMP EAX,ECX JGE 0x00d1862a MOV EAX,0xffffffff MOV dword ptr [RBP + -0x270],EAX JMP 0x00d18644 LAB_00d1862a: MOVSX EDX,word ptr [RBP + -0x36] MOVSX ESI,word ptr [RBP + -0x38] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x270],EAX LAB_00d18644: MOV EAX,dword ptr [RBP + -0x270] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18688 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18671 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x274],EAX JMP 0x00d1867a LAB_00d18671: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x274],EAX LAB_00d1867a: MOV EAX,dword ptr [RBP + -0x274] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18688: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CWDE MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVSX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV word ptr [RBP + -0xc6],AX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CWDE MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] MOVSX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV word ptr [RBP + -0xc8],AX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d1876c MOVZX EAX,word ptr [RBP + -0xc6] MOVZX ECX,word ptr [RBP + -0xc8] CMP EAX,ECX JGE 0x00d18708 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x278],EAX JMP 0x00d18728 LAB_00d18708: MOVZX EDX,word ptr [RBP + -0xc6] MOVZX ESI,word ptr [RBP + -0xc8] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x278],EAX LAB_00d18728: MOV EAX,dword ptr [RBP + -0x278] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d1876c MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18755 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x27c],EAX JMP 0x00d1875e LAB_00d18755: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x27c],EAX LAB_00d1875e: MOV EAX,dword ptr [RBP + -0x27c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d1876c: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d1885e MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,dword ptr [RBP + -0x40] JGE 0x00d18802 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x280],EAX JMP 0x00d1881a LAB_00d18802: MOV EDX,dword ptr [RBP + -0x3c] MOV ESI,dword ptr [RBP + -0x40] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x280],EAX LAB_00d1881a: MOV EAX,dword ptr [RBP + -0x280] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d1885e MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18847 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x284],EAX JMP 0x00d18850 LAB_00d18847: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x284],EAX LAB_00d18850: MOV EAX,dword ptr [RBP + -0x284] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d1885e: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_9: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV dword ptr [RBP + -0x48],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18950 MOV EAX,dword ptr [RBP + -0x44] CMP EAX,dword ptr [RBP + -0x48] JNC 0x00d188f4 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x288],EAX JMP 0x00d1890c LAB_00d188f4: MOV EDX,dword ptr [RBP + -0x44] MOV ESI,dword ptr [RBP + -0x48] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x288],EAX LAB_00d1890c: MOV EAX,dword ptr [RBP + -0x288] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18950 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18939 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x28c],EAX JMP 0x00d18942 LAB_00d18939: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x28c],EAX LAB_00d18942: MOV EAX,dword ptr [RBP + -0x28c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18950: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_c: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d189a8 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x10 OR EAX,0xff000000 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] OR EAX,ECX MOV dword ptr [RBP + -0x290],EAX JMP 0x00d189cf LAB_00d189a8: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x10 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] OR EAX,ECX MOV dword ptr [RBP + -0x290],EAX LAB_00d189cf: MOV EAX,dword ptr [RBP + -0x290] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18a17 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] SHL EAX,0x10 OR EAX,0xff000000 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] OR EAX,ECX MOV dword ptr [RBP + -0x294],EAX JMP 0x00d18a3e LAB_00d18a17: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] SHL EAX,0x10 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] OR EAX,ECX MOV dword ptr [RBP + -0x294],EAX LAB_00d18a3e: MOV EAX,dword ptr [RBP + -0x294] MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18abe MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,dword ptr [RBP + -0x40] JGE 0x00d18a62 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x298],EAX JMP 0x00d18a7a LAB_00d18a62: MOV EDX,dword ptr [RBP + -0x3c] MOV ESI,dword ptr [RBP + -0x40] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x298],EAX LAB_00d18a7a: MOV EAX,dword ptr [RBP + -0x298] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18abe MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18aa7 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x29c],EAX JMP 0x00d18ab0 LAB_00d18aa7: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x29c],EAX LAB_00d18ab0: MOV EAX,dword ptr [RBP + -0x29c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18abe: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_d: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18b96 MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,dword ptr [RBP + -0x40] JGE 0x00d18b3a MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2a0],EAX JMP 0x00d18b52 LAB_00d18b3a: MOV EDX,dword ptr [RBP + -0x3c] MOV ESI,dword ptr [RBP + -0x40] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x2a0],EAX LAB_00d18b52: MOV EAX,dword ptr [RBP + -0x2a0] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18b96 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18b7f XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2a4],EAX JMP 0x00d18b88 LAB_00d18b7f: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2a4],EAX LAB_00d18b88: MOV EAX,dword ptr [RBP + -0x2a4] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18b96: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x3] MOV byte ptr [RBP + -0xcc],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x2] MOV byte ptr [RBP + -0xcb],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0xca],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0xc9],AL MOVSS XMM0,dword ptr [RBP + -0xcc] MOVSS dword ptr [RBP + -0x4c],XMM0 MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x3] MOV byte ptr [RBP + -0xd0],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x2] MOV byte ptr [RBP + -0xcf],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0xce],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0xcd],AL MOVSS XMM0,dword ptr [RBP + -0xd0] MOVSS dword ptr [RBP + -0x50],XMM0 CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18cc0 MOVSS XMM1,dword ptr [RBP + -0x4c] MOVSS XMM0,dword ptr [RBP + -0x50] UCOMISS XMM0,XMM1 JBE 0x00d18c55 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2a8],EAX JMP 0x00d18c7c LAB_00d18c55: MOVSS XMM0,dword ptr [RBP + -0x4c] MOVSS XMM1,dword ptr [RBP + -0x50] MOV EAX,0x1 XOR ECX,ECX UCOMISS XMM0,XMM1 SETNP SIL SETZ DL TEST DL,SIL CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x2a8],EAX LAB_00d18c7c: MOV EAX,dword ptr [RBP + -0x2a8] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18cc0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18ca9 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2ac],EAX JMP 0x00d18cb2 LAB_00d18ca9: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2ac],EAX LAB_00d18cb2: MOV EAX,dword ptr [RBP + -0x2ac] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18cc0: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x7] MOV byte ptr [RBP + -0xd8],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x6] MOV byte ptr [RBP + -0xd7],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x5] MOV byte ptr [RBP + -0xd6],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x4] MOV byte ptr [RBP + -0xd5],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x3] MOV byte ptr [RBP + -0xd4],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x2] MOV byte ptr [RBP + -0xd3],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0xd2],AL MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0xd1],AL MOVSD XMM0,qword ptr [RBP + -0xd8] MOVSD qword ptr [RBP + -0x58],XMM0 MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x7] MOV byte ptr [RBP + -0xe0],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x6] MOV byte ptr [RBP + -0xdf],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x5] MOV byte ptr [RBP + -0xde],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x4] MOV byte ptr [RBP + -0xdd],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x3] MOV byte ptr [RBP + -0xdc],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x2] MOV byte ptr [RBP + -0xdb],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0xda],AL MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0xd9],AL MOVSD XMM0,qword ptr [RBP + -0xe0] MOVSD qword ptr [RBP + -0x60],XMM0 CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d18e54 MOVSD XMM1,qword ptr [RBP + -0x58] MOVSD XMM0,qword ptr [RBP + -0x60] UCOMISD XMM0,XMM1 JBE 0x00d18de8 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2b0],EAX JMP 0x00d18e10 LAB_00d18de8: MOVSD XMM0,qword ptr [RBP + -0x58] MOVSD XMM1,qword ptr [RBP + -0x60] MOV EAX,0x1 XOR ECX,ECX UCOMISD XMM0,XMM1 SETNP SIL SETZ DL TEST DL,SIL CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x2b0],EAX LAB_00d18e10: MOV EAX,dword ptr [RBP + -0x2b0] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d18e54 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18e3d XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2b4],EAX JMP 0x00d18e46 LAB_00d18e3d: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2b4],EAX LAB_00d18e46: MOV EAX,dword ptr [RBP + -0x2b4] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d18e54: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_7: MOV dword ptr [RBP + -0xe4],0x0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d18ecc JMP 0x00d18e8b LAB_00d18e8b: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0xf8] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0xe4],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x20] SUB RCX,RDX MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX LAB_00d18ecc: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x1 CMP EAX,0x0 JZ 0x00d18f32 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xe8],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0xec],EAX MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0xe8] ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0xec] SUB EAX,0x1 MOV dword ptr [RBP + -0x64],EAX JMP 0x00d18ff3 LAB_00d18f32: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV dword ptr [RBP + -0xe8],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0xec],EAX LAB_00d18f51: XOR EAX,EAX CMP dword ptr [RBP + -0xe8],0x0 MOV byte ptr [RBP + -0x2b5],AL JZ 0x00d18f75 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b5],AL LAB_00d18f75: MOV AL,byte ptr [RBP + -0x2b5] TEST AL,0x1 JNZ 0x00d18f81 JMP 0x00d18fa0 LAB_00d18f81: JMP 0x00d18f83 LAB_00d18f83: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xe8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xe8],EAX JMP 0x00d18f51 LAB_00d18fa0: JMP 0x00d18fa2 LAB_00d18fa2: XOR EAX,EAX CMP dword ptr [RBP + -0xec],0x0 MOV byte ptr [RBP + -0x2b6],AL JZ 0x00d18fc6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b6],AL LAB_00d18fc6: MOV AL,byte ptr [RBP + -0x2b6] TEST AL,0x1 JNZ 0x00d18fd2 JMP 0x00d18ff1 LAB_00d18fd2: JMP 0x00d18fd4 LAB_00d18fd4: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0xec] ADD EAX,-0x1 MOV dword ptr [RBP + -0xec],EAX JMP 0x00d18fa2 LAB_00d18ff1: JMP 0x00d18ff3 LAB_00d18ff3: CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d1923f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x00d190c4 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2d JZ 0x00d19025 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00d1977a LAB_00d19025: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x100],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x100] MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1905d LAB_00d1905d: MOV EAX,dword ptr [RBP + -0xe8] MOV dword ptr [RBP + -0x104],EAX MOV EAX,dword ptr [RBP + -0xec] MOV dword ptr [RBP + -0xe8],EAX MOV EAX,dword ptr [RBP + -0x104] MOV dword ptr [RBP + -0xec],EAX MOV EAX,0x1 SUB EAX,dword ptr [RBP + -0xe4] MOV dword ptr [RBP + -0xe4],EAX MOV EAX,dword ptr [RBP + -0xe8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xe8],EAX MOV EAX,dword ptr [RBP + -0xec] ADD EAX,-0x1 MOV dword ptr [RBP + -0xec],EAX MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0xe8] ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX JMP 0x00d190de LAB_00d190c4: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x00d190dc MOV dword ptr [RBP + -0x4],0x1 JMP 0x00d1977a LAB_00d190dc: JMP 0x00d190de LAB_00d190de: JMP 0x00d190e0 LAB_00d190e0: XOR EAX,EAX CMP dword ptr [RBP + -0xe8],0x0 MOV byte ptr [RBP + -0x2b7],AL JZ 0x00d19124 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x2b MOV byte ptr [RBP + -0x2b8],AL JZ 0x00d19118 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x30 SETZ AL MOV byte ptr [RBP + -0x2b8],AL LAB_00d19118: MOV AL,byte ptr [RBP + -0x2b8] MOV byte ptr [RBP + -0x2b7],AL LAB_00d19124: MOV AL,byte ptr [RBP + -0x2b7] TEST AL,0x1 JNZ 0x00d19130 JMP 0x00d1914d LAB_00d19130: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xe8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xe8],EAX JMP 0x00d190e0 LAB_00d1914d: JMP 0x00d1914f LAB_00d1914f: XOR EAX,EAX CMP dword ptr [RBP + -0xec],0x0 MOV byte ptr [RBP + -0x2b9],AL JZ 0x00d19193 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x2b MOV byte ptr [RBP + -0x2ba],AL JZ 0x00d19187 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x30 SETZ AL MOV byte ptr [RBP + -0x2ba],AL LAB_00d19187: MOV AL,byte ptr [RBP + -0x2ba] MOV byte ptr [RBP + -0x2b9],AL LAB_00d19193: MOV AL,byte ptr [RBP + -0x2b9] TEST AL,0x1 JNZ 0x00d1919f JMP 0x00d191bc LAB_00d1919f: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0xec] ADD EAX,-0x1 MOV dword ptr [RBP + -0xec],EAX JMP 0x00d1914f LAB_00d191bc: MOV EAX,dword ptr [RBP + -0xe8] CMP EAX,dword ptr [RBP + -0xec] JZ 0x00d191ed MOV EDX,dword ptr [RBP + -0xe8] MOV ESI,dword ptr [RBP + -0xec] MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,ESI CMOVL EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d191ed: JMP 0x00d191ef LAB_00d191ef: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x78] JNC 0x00d1923d MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00d1923b MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d1923b: JMP 0x00d191ef LAB_00d1923d: JMP 0x00d1925a LAB_00d1923f: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX LAB_00d1925a: CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00d19285 JMP 0x00d19265 LAB_00d19265: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x20],RAX JMP 0x00d19285 LAB_00d19285: JMP 0x00d1958f caseD_a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x120],RAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d193f4 MOV RAX,qword ptr [RBP + -0x118] CMP RAX,qword ptr [RBP + -0x120] JGE 0x00d1938f MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2c0],EAX JMP 0x00d193b0 LAB_00d1938f: MOV RDX,qword ptr [RBP + -0x118] MOV RSI,qword ptr [RBP + -0x120] MOV EAX,0x1 XOR ECX,ECX CMP RDX,RSI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x2c0],EAX LAB_00d193b0: MOV EAX,dword ptr [RBP + -0x2c0] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d193f4 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d193dd XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c4],EAX JMP 0x00d193e6 LAB_00d193dd: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c4],EAX LAB_00d193e6: MOV EAX,dword ptr [RBP + -0x2c4] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d193f4: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_b: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x130],RAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00d19577 MOV RAX,qword ptr [RBP + -0x128] CMP RAX,qword ptr [RBP + -0x130] JNC 0x00d19512 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2c8],EAX JMP 0x00d19533 LAB_00d19512: MOV RDX,qword ptr [RBP + -0x128] MOV RSI,qword ptr [RBP + -0x130] MOV EAX,0x1 XOR ECX,ECX CMP RDX,RSI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x2c8],EAX LAB_00d19533: MOV EAX,dword ptr [RBP + -0x2c8] MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00d19577 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x80 CMP EAX,0x0 JZ 0x00d19560 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2cc],EAX JMP 0x00d19569 LAB_00d19560: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2cc],EAX LAB_00d19569: MOV EAX,dword ptr [RBP + -0x2cc] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d19577: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x00d1958f caseD_0: JMP 0x00d195b3 LAB_00d1958f: JMP 0x00d19591 default: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x20 MOV qword ptr [RBP + -0x10],RAX JMP 0x00d179c4 LAB_00d195a8: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00d195b3: MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x1 CMP EAX,0x0 JNZ 0x00d19773 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x102 CMP EAX,0x0 JZ 0x00d195f0 MOV EDX,dword ptr [RBP + -0x28] AND EDX,0x108 MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d195f0: MOV byte ptr [RBP + -0x135],0xff MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x180000 CMP EAX,0x0 JNZ 0x00d1961c MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x28] AND EAX,0xfffdffff MOV dword ptr [RBP + -0x28],EAX JMP 0x00d1964c LAB_00d1961c: MOV byte ptr [RBP + -0x135],0xfe MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x180000 CMP EAX,0x180000 JZ 0x00d1963f MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x24],EAX JMP 0x00d1964a LAB_00d1963f: MOV EAX,dword ptr [RBP + -0x28] AND EAX,0xfffdffff MOV dword ptr [RBP + -0x28],EAX LAB_00d1964a: JMP 0x00d1964c LAB_00d1964c: JMP 0x00d1964e LAB_00d1964e: JMP 0x00d19650 LAB_00d19650: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x1 MOV dword ptr [RBP + -0x134],EAX LAB_00d1965c: MOV EAX,dword ptr [RBP + -0x134] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x134],ECX CMP EAX,0x0 JLE 0x00d196b3 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00d196b1 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX JMP 0x00d19725 LAB_00d196b1: JMP 0x00d1965c LAB_00d196b3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOVZX ECX,byte ptr [RBP + -0x135] AND EAX,ECX MOV byte ptr [RBP + -0x136],AL MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOVZX ECX,byte ptr [RBP + -0x135] AND EAX,ECX MOV byte ptr [RBP + -0x137],AL MOVZX EAX,byte ptr [RBP + -0x136] MOVZX ECX,byte ptr [RBP + -0x137] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JNZ 0x00d19723 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x20000 CMP EAX,0x0 JZ 0x00d19723 MOV EDX,dword ptr [RBP + -0x28] AND EDX,0x80000 MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d19723: JMP 0x00d19725 LAB_00d19725: MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x4 CMP EAX,0x0 JZ 0x00d19738 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d19738: MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x8 CMP EAX,0x0 JZ 0x00d1975b MOV EDX,dword ptr [RBP + -0x34] MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d1975b: MOV EDX,dword ptr [RBP + -0x34] MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVL EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00d1977a LAB_00d19773: MOV dword ptr [RBP + -0x4],0x0 LAB_00d1977a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x2d0 POP RBP RET
uint ha_key_cmp(int8 *param_1,byte *param_2,byte *param_3,uint param_4,uint param_5, int *param_6) { byte bVar1; uint3 uVar2; uint3 uVar3; double dVar4; double dVar5; byte *pbVar6; ushort uVar7; ushort uVar8; int iVar9; int iVar10; uint uVar11; uint uVar12; long lVar13; long lVar14; ulong uVar15; ulong uVar16; byte *pbVar17; bool bVar18; bool bVar19; uint local_2d4; uint local_2d0; uint local_2cc; uint local_2c8; uint local_2bc; uint local_2b8; uint local_2b4; uint local_2b0; uint local_2ac; uint local_2a8; uint local_2a4; uint local_2a0; uint local_29c; uint local_298; uint local_294; uint local_290; uint local_28c; uint local_288; uint local_284; uint local_280; uint local_27c; uint local_278; uint local_274; uint local_270; uint local_26c; bool local_245; uint local_244; uint local_214; bool local_1ed; uint local_1ec; bool local_1c5; uint local_1c4; uint local_194; uint local_154; uint local_144; byte local_13d; uint local_13c; uint local_f4; uint local_f0; uint local_ec; int4 local_d8; int4 local_d4; int local_c4; uint local_c0; uint local_bc; int local_b8; uint local_b4; uint local_b0; int local_a8; uint local_a4; uint local_a0; int local_90; uint local_8c; uint local_88; byte *local_80; uint local_6c; uint local_3c; uint local_30; uint local_2c; byte *local_28; byte *local_20; int8 *local_18; uint local_c; *param_6 = 0; local_30 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; while (0 < (int)local_2c) { bVar18 = (*(ushort *)((long)local_18 + 0x12) & 0x100) == 0; *param_6 = *param_6 + 1; param_6[1] = (int)local_28 - (int)param_3; if (*(char *)((long)local_18 + 0x19) == '\0') { LAB_00d17ae7: pbVar6 = local_20; pbVar17 = local_28; if (*(ushort *)((long)local_18 + 0x14) < local_2c) { local_154 = (uint)*(ushort *)((long)local_18 + 0x14); } else { local_154 = local_2c; } local_80 = local_20 + local_154; local_6c = local_2c - *(ushort *)((long)local_18 + 0x14); iVar9 = (int)local_20; switch(*(int1 *)(local_18 + 3)) { case 0: goto LAB_00d195b3; case 1: if ((*(ushort *)((long)local_18 + 0x12) & 1) == 0) { uVar11 = (int)local_80 - iVar9; if ((bVar18) && (local_1c4 = ha_compare_text(*local_18,local_20,uVar11,local_28,uVar11), local_1c4 != 0 )) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_1c4 = -local_1c4; } return local_1c4; } local_28 = local_28 + uVar11; local_20 = local_80; } else { if (*local_20 == 0xff) { local_88 = (uint)CONCAT11(local_20[1],local_20[2]); local_20 = local_20 + 3; } else { local_88 = (uint)*local_20; local_20 = local_20 + 1; } if (*local_28 == 0xff) { local_8c = (uint)CONCAT11(local_28[1],local_28[2]); local_28 = local_28 + 3; local_90 = 3; } else { local_8c = (uint)*local_28; local_90 = 1; local_28 = local_28 + 1; } local_6c = (local_2c - local_8c) - local_90; if ((bVar18) && (local_194 = ha_compare_text(*local_18,local_20,local_88,local_28,local_8c), local_194 != 0)) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_194 = -local_194; } return local_194; } local_28 = local_28 + (int)local_8c; local_20 = local_20 + (int)local_88; } break; case 2: case 0x13: if ((*(ushort *)((long)local_18 + 0x12) & 1) == 0) { uVar11 = (uint)*(ushort *)((long)local_18 + 0x14); if (bVar18) { local_1ed = (local_30 & 0x80) != 0 && local_6c == 0; local_214 = compare_bin(local_20,uVar11,local_28,uVar11,local_1ed,0); if (local_214 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_214 = -local_214; } return local_214; } } local_28 = local_28 + uVar11; local_20 = local_20 + uVar11; } else { if (*local_20 == 0xff) { local_a0 = (uint)CONCAT11(local_20[1],local_20[2]); local_20 = local_20 + 3; } else { local_a0 = (uint)*local_20; local_20 = local_20 + 1; } if (*local_28 == 0xff) { local_a4 = (uint)CONCAT11(local_28[1],local_28[2]); local_28 = local_28 + 3; local_a8 = 3; } else { local_a4 = (uint)*local_28; local_a8 = 1; local_28 = local_28 + 1; } local_6c = (local_2c - local_a4) - local_a8; if (bVar18) { local_1c5 = (local_30 & 0x80) != 0 && local_6c == 0; local_1ec = compare_bin(local_20,local_a0,local_28,local_a4,local_1c5,1); if (local_1ec != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_1ec = -local_1ec; } return local_1ec; } } local_28 = local_28 + (int)local_a4; local_20 = local_20 + (int)local_a0; } break; case 3: uVar7 = (ushort)local_20[1] | (ushort)((int)(short)(ushort)*local_20 << 8); uVar8 = (ushort)local_28[1] | (ushort)((int)(short)(ushort)*local_28 << 8); if (bVar18) { if ((short)uVar7 < (short)uVar8) { local_278 = 0xffffffff; } else { local_278 = (uint)(uVar7 != uVar8); } if (local_278 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_27c = local_278; } else { local_27c = -local_278; } return local_27c; } } local_28 = local_28 + 2; local_20 = local_80; break; case 4: iVar9 = CONCAT13(*local_20,CONCAT12(local_20[1],CONCAT11(local_20[2],local_20[3]))); iVar10 = CONCAT13(*local_28,CONCAT12(local_28[1],CONCAT11(local_28[2],local_28[3]))); if (bVar18) { if (iVar9 < iVar10) { local_288 = 0xffffffff; } else { local_288 = (uint)(iVar9 != iVar10); } if (local_288 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_28c = local_288; } else { local_28c = -local_288; } return local_28c; } } local_28 = local_28 + 4; local_20 = local_80; break; case 5: local_d4 = (float)CONCAT13(*local_20,CONCAT12(local_20[1],CONCAT11(local_20[2],local_20[3])) ); local_d8 = (float)CONCAT13(*local_28,CONCAT12(local_28[1],CONCAT11(local_28[2],local_28[3])) ); if (bVar18) { if (local_d8 <= local_d4) { local_2b0 = (uint)(local_d4 != local_d8); } else { local_2b0 = 0xffffffff; } if (local_2b0 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2b4 = local_2b0; } else { local_2b4 = -local_2b0; } return local_2b4; } } local_28 = local_28 + 4; local_20 = local_80; break; case 6: dVar5 = (double)CONCAT17(*local_20, CONCAT16(local_20[1], CONCAT15(local_20[2], CONCAT14(local_20[3], CONCAT13(local_20[4], CONCAT12(local_20[5], CONCAT11(local_20[6], local_20[7])) ))))); dVar4 = (double)CONCAT17(*local_28, CONCAT16(local_28[1], CONCAT15(local_28[2], CONCAT14(local_28[3], CONCAT13(local_28[4], CONCAT12(local_28[5], CONCAT11(local_28[6], local_28[7])) ))))); if (bVar18) { if (dVar4 <= dVar5) { local_2b8 = (uint)(dVar5 != dVar4); } else { local_2b8 = 0xffffffff; } if (local_2b8 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2bc = local_2b8; } else { local_2bc = -local_2b8; } return local_2bc; } } local_28 = local_28 + 8; local_20 = local_80; break; case 7: bVar19 = (*(ushort *)((long)local_18 + 0x12) & 0x80) != 0; if (bVar19) { local_20 = local_28; local_28 = pbVar6; local_80 = pbVar17 + ((int)local_80 - iVar9); } local_ec = (uint)bVar19; if ((*(ushort *)((long)local_18 + 0x12) & 1) == 0) { local_f0 = (int)local_80 - (int)local_20; local_f4 = (uint)*(ushort *)((long)local_18 + 0x14); while( true ) { bVar19 = false; if (local_f0 != 0) { bVar19 = *local_20 == 0x20; } if (!bVar19) break; local_20 = local_20 + 1; local_f0 = local_f0 - 1; } while( true ) { bVar19 = false; if (local_f4 != 0) { bVar19 = *local_28 == 0x20; } if (!bVar19) break; local_28 = local_28 + 1; local_f4 = local_f4 - 1; } } else { local_f0 = (uint)*local_20; local_f4 = (uint)*local_28; local_80 = local_20 + 1 + (int)local_f0; local_6c = (local_2c - local_f4) - 1; local_28 = local_28 + 1; local_20 = local_20 + 1; } if (bVar18) { if (*local_20 == 0x2d) { if (*local_28 != 0x2d) { return 0xffffffff; } pbVar17 = local_20 + 1; local_20 = local_28 + 1; local_ec = 1 - local_ec; uVar11 = local_f4 - 1; local_f4 = local_f0 - 1; local_80 = local_20 + (int)uVar11; local_f0 = uVar11; local_28 = pbVar17; } else if (*local_28 == 0x2d) { return 1; } while( true ) { bVar18 = false; if ((local_f0 != 0) && (bVar18 = true, *local_20 != 0x2b)) { bVar18 = *local_20 == 0x30; } if (!bVar18) break; local_20 = local_20 + 1; local_f0 = local_f0 - 1; } while( true ) { bVar18 = false; if ((local_f4 != 0) && (bVar18 = true, *local_28 != 0x2b)) { bVar18 = *local_28 == 0x30; } if (!bVar18) break; local_28 = local_28 + 1; local_f4 = local_f4 - 1; } pbVar17 = local_28; pbVar6 = local_20; if (local_f0 != local_f4) { if ((int)local_f4 <= (int)local_f0) { return 1; } return 0xffffffff; } while (local_20 = pbVar6, local_28 = pbVar17, local_20 < local_80) { pbVar17 = local_28 + 1; pbVar6 = local_20 + 1; if (*local_20 != *local_28) { return (uint)*local_20 - (uint)*local_28; } } } else { local_28 = local_28 + ((long)local_80 - (long)local_20); local_20 = local_80; } pbVar17 = local_20; if (local_ec != 0) { local_20 = local_28; local_28 = pbVar17; } break; case 8: uVar7 = (ushort)local_20[1] | (ushort)((int)(short)(ushort)*local_20 << 8); uVar8 = (ushort)local_28[1] | (ushort)((int)(short)(ushort)*local_28 << 8); if (bVar18) { if (uVar7 < uVar8) { local_280 = 0xffffffff; } else { local_280 = (uint)(uVar7 != uVar8); } if (local_280 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_284 = local_280; } else { local_284 = -local_280; } return local_284; } } local_28 = local_28 + 2; local_20 = local_80; break; case 9: uVar11 = CONCAT13(*local_20,CONCAT12(local_20[1],CONCAT11(local_20[2],local_20[3]))); uVar12 = CONCAT13(*local_28,CONCAT12(local_28[1],CONCAT11(local_28[2],local_28[3]))); if (bVar18) { if (uVar11 < uVar12) { local_290 = 0xffffffff; } else { local_290 = (uint)(uVar11 != uVar12); } if (local_290 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_294 = local_290; } else { local_294 = -local_290; } return local_294; } } local_28 = local_28 + 4; local_20 = local_80; break; case 10: lVar13 = CONCAT44(CONCAT13(*local_20,CONCAT12(local_20[1],CONCAT11(local_20[2],local_20[3])) ), CONCAT13(local_20[4], CONCAT12(local_20[5],CONCAT11(local_20[6],local_20[7])))); lVar14 = CONCAT44(CONCAT13(*local_28,CONCAT12(local_28[1],CONCAT11(local_28[2],local_28[3])) ), CONCAT13(local_28[4], CONCAT12(local_28[5],CONCAT11(local_28[6],local_28[7])))); if (bVar18) { if (lVar13 < lVar14) { local_2c8 = 0xffffffff; } else { local_2c8 = (uint)(lVar13 != lVar14); } if (local_2c8 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2cc = local_2c8; } else { local_2cc = -local_2c8; } return local_2cc; } } local_28 = local_28 + 8; local_20 = local_80; break; case 0xb: uVar15 = CONCAT44(CONCAT13(*local_20,CONCAT12(local_20[1],CONCAT11(local_20[2],local_20[3])) ), CONCAT13(local_20[4], CONCAT12(local_20[5],CONCAT11(local_20[6],local_20[7])))); uVar16 = CONCAT44(CONCAT13(*local_28,CONCAT12(local_28[1],CONCAT11(local_28[2],local_28[3])) ), CONCAT13(local_28[4], CONCAT12(local_28[5],CONCAT11(local_28[6],local_28[7])))); if (bVar18) { if (uVar15 < uVar16) { local_2d0 = 0xffffffff; } else { local_2d0 = (uint)(uVar15 != uVar16); } if (local_2d0 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2d4 = local_2d0; } else { local_2d4 = -local_2d0; } return local_2d4; } } local_28 = local_28 + 8; local_20 = local_80; break; case 0xc: if ((*local_20 & 0x80) == 0) { local_298 = (uint)*local_20 << 0x10 | (uint)local_20[1] << 8 | (uint)local_20[2]; } else { local_298 = (uint)*local_20 << 0x10 | 0xff000000 | (uint)local_20[1] << 8 | (uint)local_20[2]; } if ((*local_28 & 0x80) == 0) { local_29c = (uint)*local_28 << 0x10 | (uint)local_28[1] << 8 | (uint)local_28[2]; } else { local_29c = (uint)*local_28 << 0x10 | 0xff000000 | (uint)local_28[1] << 8 | (uint)local_28[2]; } if (bVar18) { if ((int)local_298 < (int)local_29c) { local_2a0 = 0xffffffff; } else { local_2a0 = (uint)(local_298 != local_29c); } if (local_2a0 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2a4 = local_2a0; } else { local_2a4 = -local_2a0; } return local_2a4; } } local_28 = local_28 + 3; local_20 = local_80; break; case 0xd: uVar2 = CONCAT12(*local_20,CONCAT11(local_20[1],local_20[2])); uVar3 = CONCAT12(*local_28,CONCAT11(local_28[1],local_28[2])); if (bVar18) { if (uVar2 < uVar3) { local_2a8 = 0xffffffff; } else { local_2a8 = (uint)(uVar2 != uVar3); } if (local_2a8 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_2ac = local_2a8; } else { local_2ac = -local_2a8; } return local_2ac; } } local_28 = local_28 + 3; local_20 = local_80; break; case 0xe: if (bVar18) { if ((char)*local_20 < (char)*local_28) { local_270 = 0xffffffff; } else { local_270 = (uint)(*local_20 != *local_28); } if (local_270 != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) == 0) { local_274 = local_270; } else { local_274 = -local_270; } return local_274; } } local_28 = local_28 + 1; local_20 = local_80; break; case 0xf: case 0x11: if (*local_20 == 0xff) { local_b0 = (uint)CONCAT11(local_20[1],local_20[2]); local_20 = local_20 + 3; } else { local_b0 = (uint)*local_20; local_20 = local_20 + 1; } if (*local_28 == 0xff) { local_b4 = (uint)CONCAT11(local_28[1],local_28[2]); local_28 = local_28 + 3; local_b8 = 3; } else { local_b4 = (uint)*local_28; local_b8 = 1; local_28 = local_28 + 1; } local_6c = (local_2c - local_b4) - local_b8; if ((bVar18) && (local_244 = ha_compare_text(*local_18,local_20,local_b0,local_28,local_b4), local_244 != 0)) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_244 = -local_244; } return local_244; } local_28 = local_28 + (int)local_b4; local_20 = local_20 + (int)local_b0; break; case 0x10: case 0x12: if (*local_20 == 0xff) { local_bc = (uint)CONCAT11(local_20[1],local_20[2]); local_20 = local_20 + 3; } else { local_bc = (uint)*local_20; local_20 = local_20 + 1; } if (*local_28 == 0xff) { local_c0 = (uint)CONCAT11(local_28[1],local_28[2]); local_28 = local_28 + 3; local_c4 = 3; } else { local_c0 = (uint)*local_28; local_c4 = 1; local_28 = local_28 + 1; } local_6c = (local_2c - local_c0) - local_c4; if (bVar18) { local_245 = (local_30 & 0x80) != 0 && local_6c == 0; local_26c = compare_bin(local_20,local_bc,local_28,local_c0,local_245,0); if (local_26c != 0) { if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_26c = -local_26c; } return local_26c; } } local_28 = local_28 + (int)local_c0; local_20 = local_20 + (int)local_bc; } } else { local_6c = local_2c - 1; if ((*local_20 != *local_28) && (bVar18)) { local_144 = (uint)*local_20 - (uint)*local_28; if ((*(ushort *)((long)local_18 + 0x12) & 0x80) != 0) { local_144 = -local_144; } return local_144; } local_28 = local_28 + 1; pbVar17 = local_20 + 1; bVar1 = *local_20; local_2c = local_6c; local_20 = pbVar17; if (bVar1 != 0) goto LAB_00d17ae7; if ((local_30 & 0x28041) == 0x20041) { local_30 = local_30 & 0xffffffbe | 4; } else if ((local_30 & 0x10000) != 0) { return 0xffffffff; } } local_18 = local_18 + 4; local_2c = local_6c; } *param_6 = *param_6 + 1; LAB_00d195b3: if ((local_30 & 1) == 0) { if ((local_30 & 0x102) == 0) { local_13d = 0xff; pbVar17 = local_28; pbVar6 = local_20; if ((local_30 & 0x180000) == 0) { local_2c = (uint)*(ushort *)((long)local_18 + 0x14); local_30 = local_30 & 0xfffdffff; } else { local_13d = 0xfe; if ((local_30 & 0x180000) == 0x180000) { local_30 = local_30 & 0xfffdffff; } else { local_2c = (uint)*(ushort *)((long)local_18 + 0x14); } } do { local_20 = pbVar6; local_28 = pbVar17; local_13c = local_2c - 1; if ((int)local_13c < 1) { local_3c = (uint)(*local_20 & local_13d) - (uint)(*local_28 & local_13d); if ((local_3c == 0) && ((local_30 & 0x20000) != 0)) { if ((local_30 & 0x80000) == 0) { return 1; } return 0xffffffff; } goto LAB_00d19725; } pbVar17 = local_28 + 1; pbVar6 = local_20 + 1; local_2c = local_13c; } while (*local_20 == *local_28); local_3c = (uint)*local_20 - (uint)*local_28; LAB_00d19725: if ((local_30 & 4) == 0) { if ((local_30 & 8) == 0) { local_c = 1; if ((int)local_3c < 0) { local_c = 0xffffffff; } } else { local_c = 1; if ((int)local_3c < 1) { local_c = 0xffffffff; } } } else { local_c = local_3c; } } else { local_c = 1; if ((local_30 & 0x108) != 0) { local_c = 0xffffffff; } } } else { local_c = 0; } return local_c; }
10,181
ggml_vec_dot_tq1_0_q8_K
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
void ggml_vec_dot_tq1_0_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) { assert(nrc == 1); UNUSED(nrc); UNUSED(bx); UNUSED(by); UNUSED(bs); const block_tq1_0 * GGML_RESTRICT x = vx; const block_q8_K * GGML_RESTRICT y = vy; const int nb = n / QK_K; #if defined(__ARM_NEON) float sumf = 0.0f; uint8_t k_shift[16] = {1, 1, 1, 1, 3, 3, 3, 3, 9, 9, 9, 9, 27, 27, 27, 27}; const uint8x16_t shift = vld1q_u8(k_shift); for (int i = 0; i < nb; ++i) { #if defined(__ARM_FEATURE_DOTPROD) int32x4_t sumi0 = vdupq_n_s32(0); int32x4_t sumi1 = vdupq_n_s32(0); #else int16x8_t sumi0 = vdupq_n_s16(0); int16x8_t sumi1 = vdupq_n_s16(0); #endif // first 32 bytes of 5 elements { uint8x16_t qx0 = vld1q_u8(x[i].qs + 0); uint8x16_t qx1 = vld1q_u8(x[i].qs + 16); uint8x16_t qx2 = vmulq_u8(qx0, vdupq_n_u8(3)); uint8x16_t qx3 = vmulq_u8(qx1, vdupq_n_u8(3)); uint8x16_t qx4 = vmulq_u8(qx0, vdupq_n_u8(9)); uint8x16_t qx5 = vmulq_u8(qx1, vdupq_n_u8(9)); uint8x16_t qx6 = vmulq_u8(qx0, vdupq_n_u8(27)); uint8x16_t qx7 = vmulq_u8(qx1, vdupq_n_u8(27)); uint8x16_t qx8 = vmulq_u8(qx0, vdupq_n_u8(81)); uint8x16_t qx9 = vmulq_u8(qx1, vdupq_n_u8(81)); // multiply by 3 and keep the 2 bits above 8 bits int8x16_t sqx0 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx0, vshrq_n_u8(qx0, 1)), 6)); int8x16_t sqx1 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx1, vshrq_n_u8(qx1, 1)), 6)); int8x16_t sqx2 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx2, vshrq_n_u8(qx2, 1)), 6)); int8x16_t sqx3 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx3, vshrq_n_u8(qx3, 1)), 6)); int8x16_t sqx4 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx4, vshrq_n_u8(qx4, 1)), 6)); int8x16_t sqx5 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx5, vshrq_n_u8(qx5, 1)), 6)); int8x16_t sqx6 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx6, vshrq_n_u8(qx6, 1)), 6)); int8x16_t sqx7 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx7, vshrq_n_u8(qx7, 1)), 6)); int8x16_t sqx8 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx8, vshrq_n_u8(qx8, 1)), 6)); int8x16_t sqx9 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx9, vshrq_n_u8(qx9, 1)), 6)); const int8x16_t qy0 = vld1q_s8(y[i].qs + 0); const int8x16_t qy1 = vld1q_s8(y[i].qs + 16); const int8x16_t qy2 = vld1q_s8(y[i].qs + 32); const int8x16_t qy3 = vld1q_s8(y[i].qs + 48); const int8x16_t qy4 = vld1q_s8(y[i].qs + 64); const int8x16_t qy5 = vld1q_s8(y[i].qs + 80); const int8x16_t qy6 = vld1q_s8(y[i].qs + 96); const int8x16_t qy7 = vld1q_s8(y[i].qs + 112); const int8x16_t qy8 = vld1q_s8(y[i].qs + 128); const int8x16_t qy9 = vld1q_s8(y[i].qs + 144); #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vdotq_s32(sumi0, sqx0, qy0); sumi1 = vdotq_s32(sumi1, sqx1, qy1); sumi0 = vdotq_s32(sumi0, sqx2, qy2); sumi1 = vdotq_s32(sumi1, sqx3, qy3); sumi0 = vdotq_s32(sumi0, sqx4, qy4); sumi1 = vdotq_s32(sumi1, sqx5, qy5); sumi0 = vdotq_s32(sumi0, sqx6, qy6); sumi1 = vdotq_s32(sumi1, sqx7, qy7); sumi0 = vdotq_s32(sumi0, sqx8, qy8); sumi1 = vdotq_s32(sumi1, sqx9, qy9); #else sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx6), vget_low_s8(qy6)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx6), vget_high_s8(qy6)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx7), vget_low_s8(qy7)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx7), vget_high_s8(qy7)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx8), vget_low_s8(qy8)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx8), vget_high_s8(qy8)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx9), vget_low_s8(qy9)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx9), vget_high_s8(qy9)); #endif } // last 16 bytes of 5-element, along with the 4 bytes of 4 elements { uint8x16_t qx0 = vld1q_u8(x[i].qs + 32); uint8x16_t qx1 = vmulq_u8(qx0, vdupq_n_u8(3)); uint8x16_t qx2 = vmulq_u8(qx0, vdupq_n_u8(9)); uint8x16_t qx3 = vmulq_u8(qx0, vdupq_n_u8(27)); uint8x16_t qx4 = vmulq_u8(qx0, vdupq_n_u8(81)); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); // potentially unaligned uint8x16_t qx5 = vreinterpretq_u8_u32(vdupq_n_u32(qh)); qx5 = vmulq_u8(qx5, shift); // multiply by 3 and keep the 2 bits above 8 bits int8x16_t sqx0 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx0, vshrq_n_u8(qx0, 1)), 6)); int8x16_t sqx1 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx1, vshrq_n_u8(qx1, 1)), 6)); int8x16_t sqx2 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx2, vshrq_n_u8(qx2, 1)), 6)); int8x16_t sqx3 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx3, vshrq_n_u8(qx3, 1)), 6)); int8x16_t sqx4 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx4, vshrq_n_u8(qx4, 1)), 6)); int8x16_t sqx5 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx5, vshrq_n_u8(qx5, 1)), 6)); const int8x16_t qy0 = vld1q_s8(y[i].qs + 160); const int8x16_t qy1 = vld1q_s8(y[i].qs + 176); const int8x16_t qy2 = vld1q_s8(y[i].qs + 192); const int8x16_t qy3 = vld1q_s8(y[i].qs + 208); const int8x16_t qy4 = vld1q_s8(y[i].qs + 224); const int8x16_t qy5 = vld1q_s8(y[i].qs + 240); #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vdotq_s32(sumi0, sqx0, qy0); sumi1 = vdotq_s32(sumi1, sqx1, qy1); sumi0 = vdotq_s32(sumi0, sqx2, qy2); sumi1 = vdotq_s32(sumi1, sqx3, qy3); sumi0 = vdotq_s32(sumi0, sqx4, qy4); sumi1 = vdotq_s32(sumi1, sqx5, qy5); #else sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5)); #endif } const int16x8_t ysum0 = vld1q_s16(y[i].bsums); const int16x8_t ysum1 = vld1q_s16(y[i].bsums + 8); const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d; #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vaddq_s32(sumi0, sumi1); sumi0 = vsubq_s32(sumi0, vpaddlq_s16(vaddq_s16(ysum0, ysum1))); sumf += d * (float) vaddvq_s32(sumi0); #else sumi0 = vaddq_s16(sumi0, sumi1); sumi0 = vsubq_s16(sumi0, vaddq_s16(ysum0, ysum1)); sumf += d * (float) vaddlvq_s16(sumi0); #endif } *s = sumf; #elif defined(__AVX2__) __m256 sumf = _mm256_setzero_ps(); for (int i = 0; i < nb; ++i) { // 16-bit sums __m256i sumi0 = _mm256_setzero_si256(); __m256i sumi1 = _mm256_setzero_si256(); __m256i sumi2 = _mm256_setzero_si256(); // first 32 bytes of 5 elements { __m256i qx0 = _mm256_loadu_si256((const __m256i *) (x[i].qs)); // 8-bit multiplies with shifts, masks and adds __m256i qx1 = _mm256_add_epi8(qx0, _mm256_add_epi8(qx0, qx0)); // 1 * 3 __m256i qx2 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx0, 3), _mm256_set1_epi8(-8)), qx0); // 1 * 9 __m256i qx3 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx1, 3), _mm256_set1_epi8(-8)), qx1); // 3 * 9 __m256i qx4 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx2, 3), _mm256_set1_epi8(-8)), qx2); // 9 * 9 // TODO: can _mm256_mulhi_epu16 be faster even if 16-bits? // Cancel the +1 from avg so that it behaves like a halving add qx0 = _mm256_subs_epu8(qx0, _mm256_set1_epi8(1)); qx1 = _mm256_subs_epu8(qx1, _mm256_set1_epi8(1)); qx2 = _mm256_subs_epu8(qx2, _mm256_set1_epi8(1)); qx3 = _mm256_subs_epu8(qx3, _mm256_set1_epi8(1)); qx4 = _mm256_subs_epu8(qx4, _mm256_set1_epi8(1)); // Multiply by 3 and get the top 2 bits qx0 = _mm256_avg_epu8(qx0, _mm256_avg_epu8(qx0, _mm256_setzero_si256())); qx1 = _mm256_avg_epu8(qx1, _mm256_avg_epu8(qx1, _mm256_setzero_si256())); qx2 = _mm256_avg_epu8(qx2, _mm256_avg_epu8(qx2, _mm256_setzero_si256())); qx3 = _mm256_avg_epu8(qx3, _mm256_avg_epu8(qx3, _mm256_setzero_si256())); qx4 = _mm256_avg_epu8(qx4, _mm256_avg_epu8(qx4, _mm256_setzero_si256())); qx0 = _mm256_and_si256(_mm256_srli_epi16(qx0, 6), _mm256_set1_epi8(3)); qx1 = _mm256_and_si256(_mm256_srli_epi16(qx1, 6), _mm256_set1_epi8(3)); qx2 = _mm256_and_si256(_mm256_srli_epi16(qx2, 6), _mm256_set1_epi8(3)); qx3 = _mm256_and_si256(_mm256_srli_epi16(qx3, 6), _mm256_set1_epi8(3)); qx4 = _mm256_and_si256(_mm256_srli_epi16(qx4, 6), _mm256_set1_epi8(3)); const __m256i qy0 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 0)); const __m256i qy1 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 32)); const __m256i qy2 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 64)); const __m256i qy3 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 96)); const __m256i qy4 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 128)); qx0 = _mm256_maddubs_epi16(qx0, qy0); qx1 = _mm256_maddubs_epi16(qx1, qy1); qx2 = _mm256_maddubs_epi16(qx2, qy2); qx3 = _mm256_maddubs_epi16(qx3, qy3); qx4 = _mm256_maddubs_epi16(qx4, qy4); sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(qx0, qx1)); sumi1 = _mm256_add_epi16(sumi1, _mm256_add_epi16(qx2, qx3)); sumi2 = _mm256_add_epi16(sumi2, qx4); } // last 16 bytes of 5-element, along with the 4 bytes of 4 elements { __m128i qx0 = _mm_loadu_si128((const __m128i *) (x[i].qs + 32)); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); // potentially unaligned __m256i qx5_l = _mm256_cvtepu8_epi16(_mm_set1_epi32(qh)); __m128i qx1 = _mm_add_epi8(qx0, _mm_add_epi8(qx0, qx0)); // 1 * 3 __m128i qx2 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx0, 3), _mm_set1_epi8(-8)), qx0); // 1 * 9 __m128i qx3 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx1, 3), _mm_set1_epi8(-8)), qx1); // 3 * 9 __m128i qx4 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx2, 3), _mm_set1_epi8(-8)), qx2); // 9 * 9 __m256i qx01 = MM256_SET_M128I(qx1, qx0); __m256i qx23 = MM256_SET_M128I(qx3, qx2); // avx2 does not have 8-bit multiplies, so 16-bit it is. qx5_l = _mm256_mullo_epi16(qx5_l, _mm256_set_epi16(27, 27, 27, 27, 9, 9, 9, 9, 3, 3, 3, 3, 1, 1, 1, 1)); qx5_l = _mm256_and_si256(qx5_l, _mm256_set1_epi16(0xFF)); __m128i qx5 = _mm_packus_epi16(_mm256_castsi256_si128(qx5_l), _mm256_extracti128_si256(qx5_l, 1)); __m256i qx45 = MM256_SET_M128I(qx5, qx4); // Cancel the +1 from avg so that it behaves like a halving add qx01 = _mm256_subs_epu8(qx01, _mm256_set1_epi8(1)); qx23 = _mm256_subs_epu8(qx23, _mm256_set1_epi8(1)); qx45 = _mm256_subs_epu8(qx45, _mm256_set1_epi8(1)); // Multiply by 3 and get the top 2 bits qx01 = _mm256_avg_epu8(qx01, _mm256_avg_epu8(qx01, _mm256_setzero_si256())); qx23 = _mm256_avg_epu8(qx23, _mm256_avg_epu8(qx23, _mm256_setzero_si256())); qx45 = _mm256_avg_epu8(qx45, _mm256_avg_epu8(qx45, _mm256_setzero_si256())); qx01 = _mm256_and_si256(_mm256_srli_epi16(qx01, 6), _mm256_set1_epi8(3)); qx23 = _mm256_and_si256(_mm256_srli_epi16(qx23, 6), _mm256_set1_epi8(3)); qx45 = _mm256_and_si256(_mm256_srli_epi16(qx45, 6), _mm256_set1_epi8(3)); const __m256i qy01 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 160)); const __m256i qy23 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 192)); const __m256i qy45 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 224)); qx01 = _mm256_maddubs_epi16(qx01, qy01); qx23 = _mm256_maddubs_epi16(qx23, qy23); qx45 = _mm256_maddubs_epi16(qx45, qy45); sumi0 = _mm256_add_epi16(sumi0, qx01); sumi1 = _mm256_add_epi16(sumi1, qx23); sumi2 = _mm256_add_epi16(sumi2, qx45); } const __m256i ysum = _mm256_loadu_si256((const __m256i *) y[i].bsums); const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(x[i].d)); sumi0 = _mm256_sub_epi16(sumi0, ysum); sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(sumi1, sumi2)); sumi0 = _mm256_madd_epi16(sumi0, _mm256_set1_epi16(1)); sumf = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(sumi0), d), sumf); } *s = hsum_float_8(sumf); #else const uint8_t pow3[6] = {1, 3, 9, 27, 81, 243}; float sumf = 0.0f; for (int i = 0; i < nb; ++i) { int sum = 0; for (size_t j = 0; j < sizeof(x->qs) - sizeof(x->qs) % 32; j += 32) { for (size_t l = 0; l < 5; ++l) { for (size_t m = 0; m < 32; ++m) { uint8_t q = x[i].qs[j + m] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[j*5 + l*32 + m]; } } } for (size_t j = sizeof(x->qs) - sizeof(x->qs) % 32; j < sizeof(x->qs); j += 16) { for (size_t l = 0; l < 5; ++l) { for (size_t m = 0; m < 16; ++m) { uint8_t q = x[i].qs[j + m] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[j*5 + l*16 + m]; } } } for (size_t l = 0; l < 4; ++l) { for (size_t j = 0; j < sizeof(x->qh); ++j) { uint8_t q = x[i].qh[j] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[sizeof(x->qs)*5 + l*sizeof(x->qh) + j]; } } sumf += (float) sum * (GGML_FP16_TO_FP32(x[i].d) * y[i].d); } *s = sumf; #endif }
O1
c
ggml_vec_dot_tq1_0_q8_K: vxorps %xmm3, %xmm3, %xmm3 cmpl $0x100, %edi # imm = 0x100 jl 0x1e42b shrl $0x8, %edi imulq $0x36, %rdi, %rax vpxor %xmm0, %xmm0, %xmm0 xorl %edx, %edx vpbroadcastb 0x2c6b8(%rip), %ymm1 # 0x4a896 vpbroadcastb 0x2c6b0(%rip), %ymm2 # 0x4a897 vpbroadcastb 0x2c6a8(%rip), %ymm4 # 0x4a898 vpmovsxbw 0x35057(%rip), %ymm5 # 0x53250 vpbroadcastw 0x2c69a(%rip), %ymm6 # 0x4a89c movq 0x3dd57(%rip), %rdi # 0x5bf60 vpbroadcastw 0x2c688(%rip), %ymm7 # 0x4a89a vmovdqu (%rcx,%rdx), %ymm8 vpaddb %ymm8, %ymm8, %ymm9 vpaddb %ymm8, %ymm9, %ymm9 vpsllw $0x3, %ymm8, %ymm10 vpand %ymm2, %ymm10, %ymm10 vpaddb %ymm8, %ymm10, %ymm10 vpsllw $0x3, %ymm9, %ymm11 vpand %ymm2, %ymm11, %ymm11 vpaddb %ymm9, %ymm11, %ymm11 vpsllw $0x3, %ymm10, %ymm12 vpand %ymm2, %ymm12, %ymm12 vpsubusb %ymm4, %ymm8, %ymm8 vpsubusb %ymm4, %ymm9, %ymm9 vpsubusb %ymm4, %ymm10, %ymm13 vpavgb %ymm0, %ymm8, %ymm14 vpavgb %ymm14, %ymm8, %ymm8 vpaddb %ymm10, %ymm12, %ymm10 vpavgb %ymm0, %ymm9, %ymm12 vpavgb %ymm12, %ymm9, %ymm9 vpavgb %ymm0, %ymm13, %ymm12 vmovdqu 0x20(%rcx,%rdx), %xmm14 vpsubusb %ymm4, %ymm11, %ymm11 vpavgb %ymm12, %ymm13, %ymm12 vpbroadcastd 0x30(%rcx,%rdx), %xmm13 vpmovzxbw %xmm13, %ymm13 # ymm13 = xmm13[0],zero,xmm13[1],zero,xmm13[2],zero,xmm13[3],zero,xmm13[4],zero,xmm13[5],zero,xmm13[6],zero,xmm13[7],zero,xmm13[8],zero,xmm13[9],zero,xmm13[10],zero,xmm13[11],zero,xmm13[12],zero,xmm13[13],zero,xmm13[14],zero,xmm13[15],zero vpmullw %ymm5, %ymm13, %ymm13 vpand %ymm6, %ymm13, %ymm13 vpaddb %xmm14, %xmm14, %xmm15 vpaddb %xmm14, %xmm15, %xmm15 vpsllw $0x3, %xmm14, %xmm16 vpandq %xmm2, %xmm16, %xmm16 vpaddb %xmm14, %xmm16, %xmm16 vpsubusb %ymm4, %ymm10, %ymm10 vpsllw $0x3, %xmm15, %xmm17 vpandq %xmm2, %xmm17, %xmm17 vpaddb %xmm15, %xmm17, %xmm17 vinserti128 $0x1, %xmm15, %ymm14, %ymm14 vextracti128 $0x1, %ymm13, %xmm15 vpackuswb %xmm15, %xmm13, %xmm13 vpsllw $0x3, %xmm16, %xmm15 vpand %xmm2, %xmm15, %xmm15 vpaddb %xmm16, %xmm15, %xmm15 vinserti32x4 $0x1, %xmm17, %ymm16, %ymm16 vpavgb %ymm0, %ymm11, %ymm17 vpavgb %ymm17, %ymm11, %ymm11 vpavgb %ymm0, %ymm10, %ymm17 vpsrlw $0x6, %ymm8, %ymm8 vpsrlw $0x6, %ymm9, %ymm9 vpsrlw $0x6, %ymm12, %ymm12 vpand %ymm1, %ymm8, %ymm8 vpavgb %ymm17, %ymm10, %ymm10 vpmaddubsw 0x4(%r9), %ymm8, %ymm8 vpand %ymm1, %ymm9, %ymm9 vpmaddubsw 0x24(%r9), %ymm9, %ymm9 vpsrlw $0x6, %ymm11, %ymm11 vpand %ymm1, %ymm12, %ymm12 vpmaddubsw 0x44(%r9), %ymm12, %ymm12 vpand %ymm1, %ymm11, %ymm11 vpmaddubsw 0x64(%r9), %ymm11, %ymm11 vpsrlw $0x6, %ymm10, %ymm10 vpand %ymm1, %ymm10, %ymm10 vpmaddubsw 0x84(%r9), %ymm10, %ymm10 vpsubusb %ymm4, %ymm14, %ymm14 vpaddw %ymm8, %ymm9, %ymm8 vpsubusb %ymm4, %ymm16, %ymm9 vinserti128 $0x1, %xmm13, %ymm15, %ymm13 vpsubusb %ymm4, %ymm13, %ymm13 vpavgb %ymm0, %ymm14, %ymm15 vpavgb %ymm15, %ymm14, %ymm14 vpaddw %ymm12, %ymm8, %ymm8 vpavgb %ymm0, %ymm9, %ymm12 vpavgb %ymm12, %ymm9, %ymm9 vpavgb %ymm0, %ymm13, %ymm12 vpavgb %ymm12, %ymm13, %ymm12 vpsrlw $0x6, %ymm14, %ymm13 vpaddw %ymm11, %ymm8, %ymm8 vpsrlw $0x6, %ymm9, %ymm9 vpsrlw $0x6, %ymm12, %ymm11 vpand %ymm1, %ymm13, %ymm12 vpmaddubsw 0xa4(%r9), %ymm12, %ymm12 vpaddw %ymm10, %ymm8, %ymm8 vpaddw %ymm12, %ymm8, %ymm8 vpand %ymm1, %ymm9, %ymm9 vpmaddubsw 0xc4(%r9), %ymm9, %ymm9 vpand %ymm1, %ymm11, %ymm10 vpaddw %ymm9, %ymm8, %ymm8 vpmaddubsw 0xe4(%r9), %ymm10, %ymm9 vmovss (%r9), %xmm10 movzwl 0x34(%rcx,%rdx), %r8d vpaddw %ymm9, %ymm8, %ymm8 vmulss (%rdi,%r8,4), %xmm10, %xmm9 vpsubw 0x104(%r9), %ymm8, %ymm8 vpmaddwd %ymm7, %ymm8, %ymm8 vbroadcastss %xmm9, %ymm9 vcvtdq2ps %ymm8, %ymm8 vmulps %ymm8, %ymm9, %ymm8 vaddps %ymm3, %ymm8, %ymm3 addq $0x124, %r9 # imm = 0x124 addq $0x36, %rdx cmpq %rdx, %rax jne 0x1e212 vextractf128 $0x1, %ymm3, %xmm0 vaddps %xmm3, %xmm0, %xmm0 vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0] vaddps %xmm1, %xmm0, %xmm0 vhaddps %xmm0, %xmm0, %xmm0 vmovss %xmm0, (%rsi) vzeroupper retq
ggml_vec_dot_tq1_0_q8_K: vxorps xmm3, xmm3, xmm3 cmp edi, 100h jl loc_1E42B shr edi, 8 imul rax, rdi, 36h ; '6' vpxor xmm0, xmm0, xmm0 xor edx, edx vpbroadcastb ymm1, cs:byte_4A896 vpbroadcastb ymm2, cs:byte_4A897 vpbroadcastb ymm4, cs:byte_4A898 vpmovsxbw ymm5, cs:xmmword_53250 vpbroadcastw ymm6, cs:word_4A89C mov rdi, cs:ggml_table_f32_f16_ptr vpbroadcastw ymm7, cs:word_4A89A loc_1E212: vmovdqu ymm8, ymmword ptr [rcx+rdx] vpaddb ymm9, ymm8, ymm8 vpaddb ymm9, ymm9, ymm8 vpsllw ymm10, ymm8, 3 vpand ymm10, ymm10, ymm2 vpaddb ymm10, ymm10, ymm8 vpsllw ymm11, ymm9, 3 vpand ymm11, ymm11, ymm2 vpaddb ymm11, ymm11, ymm9 vpsllw ymm12, ymm10, 3 vpand ymm12, ymm12, ymm2 vpsubusb ymm8, ymm8, ymm4 vpsubusb ymm9, ymm9, ymm4 vpsubusb ymm13, ymm10, ymm4 vpavgb ymm14, ymm8, ymm0 vpavgb ymm8, ymm8, ymm14 vpaddb ymm10, ymm12, ymm10 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpavgb ymm12, ymm13, ymm0 vmovdqu xmm14, xmmword ptr [rcx+rdx+20h] vpsubusb ymm11, ymm11, ymm4 vpavgb ymm12, ymm13, ymm12 vpbroadcastd xmm13, dword ptr [rcx+rdx+30h] vpmovzxbw ymm13, xmm13 vpmullw ymm13, ymm13, ymm5 vpand ymm13, ymm13, ymm6 vpaddb xmm15, xmm14, xmm14 vpaddb xmm15, xmm15, xmm14 vpsllw xmm16, xmm14, 3 vpandq xmm16, xmm16, xmm2 vpaddb xmm16, xmm16, xmm14 vpsubusb ymm10, ymm10, ymm4 vpsllw xmm17, xmm15, 3 vpandq xmm17, xmm17, xmm2 vpaddb xmm17, xmm17, xmm15 vinserti128 ymm14, ymm14, xmm15, 1 vextracti128 xmm15, ymm13, 1 vpackuswb xmm13, xmm13, xmm15 vpsllw xmm15, xmm16, 3 vpand xmm15, xmm15, xmm2 vpaddb xmm15, xmm15, xmm16 vinserti32x4 ymm16, ymm16, xmm17, 1 vpavgb ymm17, ymm11, ymm0 vpavgb ymm11, ymm11, ymm17 vpavgb ymm17, ymm10, ymm0 vpsrlw ymm8, ymm8, 6 vpsrlw ymm9, ymm9, 6 vpsrlw ymm12, ymm12, 6 vpand ymm8, ymm8, ymm1 vpavgb ymm10, ymm10, ymm17 vpmaddubsw ymm8, ymm8, ymmword ptr [r9+4] vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+24h] vpsrlw ymm11, ymm11, 6 vpand ymm12, ymm12, ymm1 vpmaddubsw ymm12, ymm12, ymmword ptr [r9+44h] vpand ymm11, ymm11, ymm1 vpmaddubsw ymm11, ymm11, ymmword ptr [r9+64h] vpsrlw ymm10, ymm10, 6 vpand ymm10, ymm10, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+84h] vpsubusb ymm14, ymm14, ymm4 vpaddw ymm8, ymm9, ymm8 vpsubusb ymm9, ymm16, ymm4 vinserti128 ymm13, ymm15, xmm13, 1 vpsubusb ymm13, ymm13, ymm4 vpavgb ymm15, ymm14, ymm0 vpavgb ymm14, ymm14, ymm15 vpaddw ymm8, ymm8, ymm12 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpavgb ymm12, ymm13, ymm0 vpavgb ymm12, ymm13, ymm12 vpsrlw ymm13, ymm14, 6 vpaddw ymm8, ymm8, ymm11 vpsrlw ymm9, ymm9, 6 vpsrlw ymm11, ymm12, 6 vpand ymm12, ymm13, ymm1 vpmaddubsw ymm12, ymm12, ymmword ptr [r9+0A4h] vpaddw ymm8, ymm8, ymm10 vpaddw ymm8, ymm8, ymm12 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+0C4h] vpand ymm10, ymm11, ymm1 vpaddw ymm8, ymm8, ymm9 vpmaddubsw ymm9, ymm10, ymmword ptr [r9+0E4h] vmovss xmm10, dword ptr [r9] movzx r8d, word ptr [rcx+rdx+34h] vpaddw ymm8, ymm8, ymm9 vmulss xmm9, xmm10, dword ptr [rdi+r8*4] vpsubw ymm8, ymm8, ymmword ptr [r9+104h] vpmaddwd ymm8, ymm8, ymm7 vbroadcastss ymm9, xmm9 vcvtdq2ps ymm8, ymm8 vmulps ymm8, ymm9, ymm8 vaddps ymm3, ymm8, ymm3 add r9, 124h add rdx, 36h ; '6' cmp rax, rdx jnz loc_1E212 loc_1E42B: vextractf128 xmm0, ymm3, 1 vaddps xmm0, xmm0, xmm3 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 vzeroupper retn
void ggml_vec_dot_tq1_0_q8_K( int a1, long long _RSI, __m128 _XMM0, double a4, double a5, __m128 _XMM3, long long a7, long long _RCX, long long a9, long long _R9) { __asm { vxorps xmm3, xmm3, xmm3 } if ( a1 >= 256 ) { __asm { vpxor xmm0, xmm0, xmm0 } _RDX = 0LL; __asm { vpbroadcastb ymm1, cs:byte_4A896 vpbroadcastb ymm2, cs:byte_4A897 vpbroadcastb ymm4, cs:byte_4A898 vpmovsxbw ymm5, cs:xmmword_53250 vpbroadcastw ymm6, cs:word_4A89C vpbroadcastw ymm7, cs:word_4A89A } do { __asm { vmovdqu ymm8, ymmword ptr [rcx+rdx] vpaddb ymm9, ymm8, ymm8 vpaddb ymm9, ymm9, ymm8 vpsllw ymm10, ymm8, 3 vpand ymm10, ymm10, ymm2 vpaddb ymm10, ymm10, ymm8 vpsllw ymm11, ymm9, 3 vpand ymm11, ymm11, ymm2 vpaddb ymm11, ymm11, ymm9 vpsllw ymm12, ymm10, 3 vpand ymm12, ymm12, ymm2 vpsubusb ymm8, ymm8, ymm4 vpsubusb ymm9, ymm9, ymm4 vpsubusb ymm13, ymm10, ymm4 vpavgb ymm14, ymm8, ymm0 vpavgb ymm8, ymm8, ymm14 vpaddb ymm10, ymm12, ymm10 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpavgb ymm12, ymm13, ymm0 vmovdqu xmm14, xmmword ptr [rcx+rdx+20h] vpsubusb ymm11, ymm11, ymm4 vpavgb ymm12, ymm13, ymm12 vpbroadcastd xmm13, dword ptr [rcx+rdx+30h] vpmovzxbw ymm13, xmm13 vpmullw ymm13, ymm13, ymm5 vpand ymm13, ymm13, ymm6 vpaddb xmm15, xmm14, xmm14 vpaddb xmm15, xmm15, xmm14 vpsllw xmm16, xmm14, 3 vpandq xmm16, xmm16, xmm2 vpaddb xmm16, xmm16, xmm14 vpsubusb ymm10, ymm10, ymm4 vpsllw xmm17, xmm15, 3 vpandq xmm17, xmm17, xmm2 vpaddb xmm17, xmm17, xmm15 vinserti128 ymm14, ymm14, xmm15, 1 vextracti128 xmm15, ymm13, 1 vpackuswb xmm13, xmm13, xmm15 vpsllw xmm15, xmm16, 3 vpand xmm15, xmm15, xmm2 vpaddb xmm15, xmm15, xmm16 vinserti32x4 ymm16, ymm16, xmm17, 1 vpavgb ymm17, ymm11, ymm0 vpavgb ymm11, ymm11, ymm17 vpavgb ymm17, ymm10, ymm0 vpsrlw ymm8, ymm8, 6 vpsrlw ymm9, ymm9, 6 vpsrlw ymm12, ymm12, 6 vpand ymm8, ymm8, ymm1 vpavgb ymm10, ymm10, ymm17 vpmaddubsw ymm8, ymm8, ymmword ptr [r9+4] vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+24h] vpsrlw ymm11, ymm11, 6 vpand ymm12, ymm12, ymm1 vpmaddubsw ymm12, ymm12, ymmword ptr [r9+44h] vpand ymm11, ymm11, ymm1 vpmaddubsw ymm11, ymm11, ymmword ptr [r9+64h] vpsrlw ymm10, ymm10, 6 vpand ymm10, ymm10, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+84h] vpsubusb ymm14, ymm14, ymm4 vpaddw ymm8, ymm9, ymm8 vpsubusb ymm9, ymm16, ymm4 vinserti128 ymm13, ymm15, xmm13, 1 vpsubusb ymm13, ymm13, ymm4 vpavgb ymm15, ymm14, ymm0 vpavgb ymm14, ymm14, ymm15 vpaddw ymm8, ymm8, ymm12 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpavgb ymm12, ymm13, ymm0 vpavgb ymm12, ymm13, ymm12 vpsrlw ymm13, ymm14, 6 vpaddw ymm8, ymm8, ymm11 vpsrlw ymm9, ymm9, 6 vpsrlw ymm11, ymm12, 6 vpand ymm12, ymm13, ymm1 vpmaddubsw ymm12, ymm12, ymmword ptr [r9+0A4h] vpaddw ymm8, ymm8, ymm10 vpaddw ymm8, ymm8, ymm12 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+0C4h] vpand ymm10, ymm11, ymm1 vpaddw ymm8, ymm8, ymm9 vpmaddubsw ymm9, ymm10, ymmword ptr [r9+0E4h] vmovss xmm10, dword ptr [r9] vpaddw ymm8, ymm8, ymm9 vmulss xmm9, xmm10, dword ptr [rdi+r8*4] vpsubw ymm8, ymm8, ymmword ptr [r9+104h] vpmaddwd ymm8, ymm8, ymm7 vbroadcastss ymm9, xmm9 vcvtdq2ps ymm8, ymm8 vmulps ymm8, ymm9, ymm8 vaddps ymm3, ymm8, ymm3 } _R9 += 292LL; _RDX += 54LL; } while ( 54LL * ((unsigned int)a1 >> 8) != _RDX ); } __asm { vextractf128 xmm0, ymm3, 1 vaddps xmm0, xmm0, xmm3 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 vzeroupper } }
ggml_vec_dot_tq1_0_q8_K: VXORPS XMM3,XMM3,XMM3 CMP EDI,0x100 JL 0x0011e42b SHR EDI,0x8 IMUL RAX,RDI,0x36 VPXOR XMM0,XMM0,XMM0 XOR EDX,EDX VPBROADCASTB YMM1,byte ptr [0x0014a896] VPBROADCASTB YMM2,byte ptr [0x0014a897] VPBROADCASTB YMM4,byte ptr [0x0014a898] VPMOVSXBW YMM5,xmmword ptr [0x00153250] VPBROADCASTW YMM6,word ptr [0x0014a89c] MOV RDI,qword ptr [0x0015bf60] VPBROADCASTW YMM7,word ptr [0x0014a89a] LAB_0011e212: VMOVDQU YMM8,ymmword ptr [RCX + RDX*0x1] VPADDB YMM9,YMM8,YMM8 VPADDB YMM9,YMM9,YMM8 VPSLLW YMM10,YMM8,0x3 VPAND YMM10,YMM10,YMM2 VPADDB YMM10,YMM10,YMM8 VPSLLW YMM11,YMM9,0x3 VPAND YMM11,YMM11,YMM2 VPADDB YMM11,YMM11,YMM9 VPSLLW YMM12,YMM10,0x3 VPAND YMM12,YMM12,YMM2 VPSUBUSB YMM8,YMM8,YMM4 VPSUBUSB YMM9,YMM9,YMM4 VPSUBUSB YMM13,YMM10,YMM4 VPAVGB YMM14,YMM8,YMM0 VPAVGB YMM8,YMM8,YMM14 VPADDB YMM10,YMM12,YMM10 VPAVGB YMM12,YMM9,YMM0 VPAVGB YMM9,YMM9,YMM12 VPAVGB YMM12,YMM13,YMM0 VMOVDQU XMM14,xmmword ptr [RCX + RDX*0x1 + 0x20] VPSUBUSB YMM11,YMM11,YMM4 VPAVGB YMM12,YMM13,YMM12 VPBROADCASTD XMM13,dword ptr [RCX + RDX*0x1 + 0x30] VPMOVZXBW YMM13,XMM13 VPMULLW YMM13,YMM13,YMM5 VPAND YMM13,YMM13,YMM6 VPADDB XMM15,XMM14,XMM14 VPADDB XMM15,XMM15,XMM14 VPSLLW XMM0,XMM14,0x3 VPANDQ XMM0,XMM0,XMM2 VPADDB XMM0,XMM0,XMM14 VPSUBUSB YMM10,YMM10,YMM4 VPSLLW XMM1,XMM15,0x3 VPANDQ XMM1,XMM1,XMM2 VPADDB XMM1,XMM1,XMM15 VINSERTI128 YMM14,YMM14,XMM15,0x1 VEXTRACTI128 XMM15,YMM13,0x1 VPACKUSWB XMM13,XMM13,XMM15 VPSLLW XMM15,XMM0,0x3 VPAND XMM15,XMM15,XMM2 VPADDB XMM15,XMM15,XMM0 VINSERTI32X4 YMM0,YMM0,XMM1,0x1 VPAVGB YMM1,YMM11,YMM0 VPAVGB YMM11,YMM11,YMM1 VPAVGB YMM1,YMM10,YMM0 VPSRLW YMM8,YMM8,0x6 VPSRLW YMM9,YMM9,0x6 VPSRLW YMM12,YMM12,0x6 VPAND YMM8,YMM8,YMM1 VPAVGB YMM10,YMM10,YMM1 VPMADDUBSW YMM8,YMM8,ymmword ptr [R9 + 0x4] VPAND YMM9,YMM9,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0x24] VPSRLW YMM11,YMM11,0x6 VPAND YMM12,YMM12,YMM1 VPMADDUBSW YMM12,YMM12,ymmword ptr [R9 + 0x44] VPAND YMM11,YMM11,YMM1 VPMADDUBSW YMM11,YMM11,ymmword ptr [R9 + 0x64] VPSRLW YMM10,YMM10,0x6 VPAND YMM10,YMM10,YMM1 VPMADDUBSW YMM10,YMM10,ymmword ptr [R9 + 0x84] VPSUBUSB YMM14,YMM14,YMM4 VPADDW YMM8,YMM9,YMM8 VPSUBUSB YMM9,YMM0,YMM4 VINSERTI128 YMM13,YMM15,XMM13,0x1 VPSUBUSB YMM13,YMM13,YMM4 VPAVGB YMM15,YMM14,YMM0 VPAVGB YMM14,YMM14,YMM15 VPADDW YMM8,YMM8,YMM12 VPAVGB YMM12,YMM9,YMM0 VPAVGB YMM9,YMM9,YMM12 VPAVGB YMM12,YMM13,YMM0 VPAVGB YMM12,YMM13,YMM12 VPSRLW YMM13,YMM14,0x6 VPADDW YMM8,YMM8,YMM11 VPSRLW YMM9,YMM9,0x6 VPSRLW YMM11,YMM12,0x6 VPAND YMM12,YMM13,YMM1 VPMADDUBSW YMM12,YMM12,ymmword ptr [R9 + 0xa4] VPADDW YMM8,YMM8,YMM10 VPADDW YMM8,YMM8,YMM12 VPAND YMM9,YMM9,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0xc4] VPAND YMM10,YMM11,YMM1 VPADDW YMM8,YMM8,YMM9 VPMADDUBSW YMM9,YMM10,ymmword ptr [R9 + 0xe4] VMOVSS XMM10,dword ptr [R9] MOVZX R8D,word ptr [RCX + RDX*0x1 + 0x34] VPADDW YMM8,YMM8,YMM9 VMULSS XMM9,XMM10,dword ptr [RDI + R8*0x4] VPSUBW YMM8,YMM8,ymmword ptr [R9 + 0x104] VPMADDWD YMM8,YMM8,YMM7 VBROADCASTSS YMM9,XMM9 VCVTDQ2PS YMM8,YMM8 VMULPS YMM8,YMM9,YMM8 VADDPS YMM3,YMM8,YMM3 ADD R9,0x124 ADD RDX,0x36 CMP RAX,RDX JNZ 0x0011e212 LAB_0011e42b: VEXTRACTF128 XMM0,YMM3,0x1 VADDPS XMM0,XMM0,XMM3 VSHUFPD XMM1,XMM0,XMM0,0x1 VADDPS XMM0,XMM0,XMM1 VHADDPS XMM0,XMM0,XMM0 VMOVSS dword ptr [RSI],XMM0 VZEROUPPER RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ggml_vec_dot_tq1_0_q8_K (uint param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5, float *param_6) { int4 uVar1; int1 auVar2 [32]; int1 auVar3 [32]; long lVar4; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [32]; int1 auVar9 [32]; int1 auVar10 [32]; int1 auVar11 [32]; int1 auVar12 [32]; int1 auVar13 [16]; int1 auVar14 [64]; int1 auVar15 [16]; float fVar17; float fVar18; float fVar19; float fVar20; float fVar21; float fVar22; float fVar23; float fVar24; float fVar25; float fVar26; float fVar27; float fVar28; float fVar29; float fVar30; float fVar31; float fVar32; int1 auVar33 [32]; int1 auVar34 [32]; int1 auVar35 [32]; int1 auVar36 [32]; int1 auVar37 [32]; int1 auVar38 [32]; int1 auVar39 [32]; int1 auVar40 [32]; int1 auVar16 [32]; fVar21 = 0.0; fVar23 = 0.0; fVar17 = 0.0; fVar19 = 0.0; fVar25 = 0.0; fVar27 = 0.0; fVar29 = 0.0; fVar31 = 0.0; fVar18 = 0.0; fVar20 = 0.0; fVar22 = 0.0; fVar24 = 0.0; fVar26 = 0.0; fVar28 = 0.0; fVar30 = 0.0; fVar32 = 0.0; if (0xff < (int)param_1) { auVar14 = ZEXT1664((int1 [16])0x0); lVar4 = 0; auVar15[1] = DAT_0014a897; auVar15[0] = DAT_0014a897; auVar15[2] = DAT_0014a897; auVar15[3] = DAT_0014a897; auVar15[4] = DAT_0014a897; auVar15[5] = DAT_0014a897; auVar15[6] = DAT_0014a897; auVar15[7] = DAT_0014a897; auVar15[8] = DAT_0014a897; auVar15[9] = DAT_0014a897; auVar15[10] = DAT_0014a897; auVar15[0xb] = DAT_0014a897; auVar15[0xc] = DAT_0014a897; auVar15[0xd] = DAT_0014a897; auVar15[0xe] = DAT_0014a897; auVar15[0xf] = DAT_0014a897; auVar16[0x10] = DAT_0014a897; auVar16._0_16_ = auVar15; auVar16[0x11] = DAT_0014a897; auVar16[0x12] = DAT_0014a897; auVar16[0x13] = DAT_0014a897; auVar16[0x14] = DAT_0014a897; auVar16[0x15] = DAT_0014a897; auVar16[0x16] = DAT_0014a897; auVar16[0x17] = DAT_0014a897; auVar16[0x18] = DAT_0014a897; auVar16[0x19] = DAT_0014a897; auVar16[0x1a] = DAT_0014a897; auVar16[0x1b] = DAT_0014a897; auVar16[0x1c] = DAT_0014a897; auVar16[0x1d] = DAT_0014a897; auVar16[0x1e] = DAT_0014a897; auVar16[0x1f] = DAT_0014a897; auVar33[1] = DAT_0014a898; auVar33[0] = DAT_0014a898; auVar33[2] = DAT_0014a898; auVar33[3] = DAT_0014a898; auVar33[4] = DAT_0014a898; auVar33[5] = DAT_0014a898; auVar33[6] = DAT_0014a898; auVar33[7] = DAT_0014a898; auVar33[8] = DAT_0014a898; auVar33[9] = DAT_0014a898; auVar33[10] = DAT_0014a898; auVar33[0xb] = DAT_0014a898; auVar33[0xc] = DAT_0014a898; auVar33[0xd] = DAT_0014a898; auVar33[0xe] = DAT_0014a898; auVar33[0xf] = DAT_0014a898; auVar33[0x10] = DAT_0014a898; auVar33[0x11] = DAT_0014a898; auVar33[0x12] = DAT_0014a898; auVar33[0x13] = DAT_0014a898; auVar33[0x14] = DAT_0014a898; auVar33[0x15] = DAT_0014a898; auVar33[0x16] = DAT_0014a898; auVar33[0x17] = DAT_0014a898; auVar33[0x18] = DAT_0014a898; auVar33[0x19] = DAT_0014a898; auVar33[0x1a] = DAT_0014a898; auVar33[0x1b] = DAT_0014a898; auVar33[0x1c] = DAT_0014a898; auVar33[0x1d] = DAT_0014a898; auVar33[0x1e] = DAT_0014a898; auVar33[0x1f] = DAT_0014a898; auVar2 = vpmovsxbw_avx2(_DAT_00153250); auVar34._2_2_ = DAT_0014a89c; auVar34._0_2_ = DAT_0014a89c; auVar34._4_2_ = DAT_0014a89c; auVar34._6_2_ = DAT_0014a89c; auVar34._8_2_ = DAT_0014a89c; auVar34._10_2_ = DAT_0014a89c; auVar34._12_2_ = DAT_0014a89c; auVar34._14_2_ = DAT_0014a89c; auVar34._16_2_ = DAT_0014a89c; auVar34._18_2_ = DAT_0014a89c; auVar34._20_2_ = DAT_0014a89c; auVar34._22_2_ = DAT_0014a89c; auVar34._24_2_ = DAT_0014a89c; auVar34._26_2_ = DAT_0014a89c; auVar34._28_2_ = DAT_0014a89c; auVar34._30_2_ = DAT_0014a89c; auVar35._2_2_ = DAT_0014a89a; auVar35._0_2_ = DAT_0014a89a; auVar35._4_2_ = DAT_0014a89a; auVar35._6_2_ = DAT_0014a89a; auVar35._8_2_ = DAT_0014a89a; auVar35._10_2_ = DAT_0014a89a; auVar35._12_2_ = DAT_0014a89a; auVar35._14_2_ = DAT_0014a89a; auVar35._16_2_ = DAT_0014a89a; auVar35._18_2_ = DAT_0014a89a; auVar35._20_2_ = DAT_0014a89a; auVar35._22_2_ = DAT_0014a89a; auVar35._24_2_ = DAT_0014a89a; auVar35._26_2_ = DAT_0014a89a; auVar35._28_2_ = DAT_0014a89a; auVar35._30_2_ = DAT_0014a89a; do { auVar9 = *(int1 (*) [32])(param_4 + lVar4); auVar39 = vpaddb_avx2(auVar9,auVar9); auVar39 = vpaddb_avx2(auVar39,auVar9); auVar36 = vpsllw_avx2(auVar9,3); auVar36 = vpand_avx2(auVar36,auVar16); auVar36 = vpaddb_avx2(auVar36,auVar9); auVar37 = vpsllw_avx2(auVar39,3); auVar37 = vpand_avx2(auVar37,auVar16); auVar37 = vpaddb_avx2(auVar37,auVar39); auVar38 = vpsllw_avx2(auVar36,3); auVar38 = vpand_avx2(auVar38,auVar16); auVar11 = vpsubusb_avx2(auVar9,auVar33); auVar3 = vpsubusb_avx2(auVar39,auVar33); auVar40 = vpsubusb_avx2(auVar36,auVar33); auVar8 = auVar14._0_32_; auVar9 = vpavgb_avx2(auVar11,auVar8); auVar11 = vpavgb_avx2(auVar11,auVar9); auVar9 = vpaddb_avx2(auVar38,auVar36); auVar39 = vpavgb_avx2(auVar3,auVar8); auVar36 = vpavgb_avx2(auVar3,auVar39); auVar39 = vpavgb_avx2(auVar40,auVar8); auVar13 = *(int1 (*) [16])(param_4 + 0x20 + lVar4); auVar38 = vpsubusb_avx2(auVar37,auVar33); auVar37 = vpavgb_avx2(auVar40,auVar39); uVar1 = *(int4 *)(param_4 + 0x30 + lVar4); auVar7._4_4_ = uVar1; auVar7._0_4_ = uVar1; auVar7._8_4_ = uVar1; auVar7._12_4_ = uVar1; auVar39 = vpmovzxbw_avx2(auVar7); auVar39 = vpmullw_avx2(auVar39,auVar2); auVar39 = vpand_avx2(auVar39,auVar34); auVar7 = vpaddb_avx(auVar13,auVar13); auVar7 = vpaddb_avx(auVar7,auVar13); auVar5 = vpsllw_avx512vl(auVar13,3); auVar5 = vpandq_avx512vl(auVar5,auVar15); auVar5 = vpaddb_avx512vl(auVar5,auVar13); auVar3 = vpsubusb_avx2(auVar9,auVar33); auVar6 = vpsllw_avx512vl(auVar7,3); auVar6 = vpandq_avx512vl(auVar6,auVar15); auVar6 = vpaddb_avx512vl(auVar6,auVar7); auVar40._0_16_ = ZEXT116(0) * auVar7 + ZEXT116(1) * auVar13; auVar40._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar7; auVar13 = vpackuswb_avx(auVar39._0_16_,auVar39._16_16_); auVar7 = vpsllw_avx512vl(auVar5,3); auVar7 = vpand_avx(auVar7,auVar15); auVar7 = vpaddb_avx512vl(auVar7,auVar5); auVar8 = vinserti32x4_avx512vl(ZEXT1632(auVar5),auVar6,1); auVar14 = ZEXT3264(auVar8); auVar9 = vpavgb_avx512vl(auVar38,auVar8); auVar38 = vpavgb_avx512vl(auVar38,auVar9); auVar10 = vpavgb_avx512vl(auVar3,auVar8); auVar9 = vpsrlw_avx2(auVar11,6); auVar36 = vpsrlw_avx2(auVar36,6); auVar37 = vpsrlw_avx2(auVar37,6); auVar9 = vpand_avx2(auVar9,auVar10); auVar11 = vpavgb_avx512vl(auVar3,auVar10); auVar39 = vpmaddubsw_avx2(auVar9,*(int1 (*) [32])(param_6 + 1)); auVar9 = vpand_avx2(auVar36,auVar10); auVar36 = vpmaddubsw_avx2(auVar9,*(int1 (*) [32])(param_6 + 9)); auVar38 = vpsrlw_avx2(auVar38,6); auVar9 = vpand_avx2(auVar37,auVar10); auVar37 = vpmaddubsw_avx2(auVar9,*(int1 (*) [32])(param_6 + 0x11)); auVar9 = vpand_avx2(auVar38,auVar10); auVar38 = vpmaddubsw_avx2(auVar9,*(int1 (*) [32])(param_6 + 0x19)); auVar9 = vpsrlw_avx2(auVar11,6); auVar9 = vpand_avx2(auVar9,auVar10); auVar11 = vpmaddubsw_avx2(auVar9,*(int1 (*) [32])(param_6 + 0x21)); auVar3 = vpsubusb_avx2(auVar40,auVar33); auVar9 = vpaddw_avx2(auVar36,auVar39); auVar12 = vpsubusb_avx512vl(auVar8,auVar33); auVar39._0_16_ = ZEXT116(0) * auVar13 + ZEXT116(1) * auVar7; auVar39._16_16_ = ZEXT116(1) * auVar13; auVar40 = vpsubusb_avx2(auVar39,auVar33); auVar39 = vpavgb_avx2(auVar3,auVar8); auVar39 = vpavgb_avx2(auVar3,auVar39); auVar9 = vpaddw_avx2(auVar9,auVar37); auVar36 = vpavgb_avx2(auVar12,auVar8); auVar36 = vpavgb_avx2(auVar12,auVar36); auVar37 = vpavgb_avx2(auVar40,auVar8); auVar37 = vpavgb_avx2(auVar40,auVar37); auVar39 = vpsrlw_avx2(auVar39,6); auVar9 = vpaddw_avx2(auVar9,auVar38); auVar36 = vpsrlw_avx2(auVar36,6); auVar37 = vpsrlw_avx2(auVar37,6); auVar39 = vpand_avx2(auVar39,auVar10); auVar39 = vpmaddubsw_avx2(auVar39,*(int1 (*) [32])(param_6 + 0x29)); auVar9 = vpaddw_avx2(auVar9,auVar11); auVar9 = vpaddw_avx2(auVar9,auVar39); auVar39 = vpand_avx2(auVar36,auVar10); auVar36 = vpmaddubsw_avx2(auVar39,*(int1 (*) [32])(param_6 + 0x31)); auVar39 = vpand_avx2(auVar37,auVar10); auVar9 = vpaddw_avx2(auVar9,auVar36); auVar39 = vpmaddubsw_avx2(auVar39,*(int1 (*) [32])(param_6 + 0x39)); auVar9 = vpaddw_avx2(auVar9,auVar39); fVar18 = *param_6 * *(float *)(PTR_ggml_table_f32_f16_0015bf60 + (ulong)*(ushort *)(param_4 + 0x34 + lVar4) * 4); auVar9 = vpsubw_avx2(auVar9,*(int1 (*) [32])(param_6 + 0x41)); auVar9 = vpmaddwd_avx2(auVar9,auVar35); auVar9 = vcvtdq2ps_avx(auVar9); fVar17 = fVar18 * auVar9._0_4_ + fVar17; fVar19 = fVar18 * auVar9._4_4_ + fVar19; fVar21 = fVar18 * auVar9._8_4_ + fVar21; fVar23 = fVar18 * auVar9._12_4_ + fVar23; fVar25 = fVar18 * auVar9._16_4_ + fVar25; fVar27 = fVar18 * auVar9._20_4_ + fVar27; fVar29 = fVar18 * auVar9._24_4_ + fVar29; fVar31 = auVar9._28_4_ + fVar31; param_6 = param_6 + 0x49; lVar4 = lVar4 + 0x36; fVar18 = fVar17; fVar20 = fVar19; fVar22 = fVar21; fVar24 = fVar23; fVar26 = fVar25; fVar28 = fVar27; fVar30 = fVar29; fVar32 = fVar31; } while ((ulong)(param_1 >> 8) * 0x36 - lVar4 != 0); } auVar13._0_4_ = fVar26 + fVar18; auVar13._4_4_ = fVar28 + fVar20; auVar13._8_4_ = fVar30 + fVar22; auVar13._12_4_ = fVar32 + fVar24; auVar15 = vshufpd_avx(auVar13,auVar13,1); auVar5._0_4_ = auVar13._0_4_ + auVar15._0_4_; auVar5._4_4_ = auVar13._4_4_ + auVar15._4_4_; auVar5._8_4_ = auVar13._8_4_ + auVar15._8_4_; auVar5._12_4_ = auVar13._12_4_ + auVar15._12_4_; auVar15 = vhaddps_avx(auVar5,auVar5); *param_2 = auVar15._0_4_; return; }
10,182
ggml_vec_dot_tq1_0_q8_K
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
void ggml_vec_dot_tq1_0_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) { assert(nrc == 1); UNUSED(nrc); UNUSED(bx); UNUSED(by); UNUSED(bs); const block_tq1_0 * GGML_RESTRICT x = vx; const block_q8_K * GGML_RESTRICT y = vy; const int nb = n / QK_K; #if defined(__ARM_NEON) float sumf = 0.0f; uint8_t k_shift[16] = {1, 1, 1, 1, 3, 3, 3, 3, 9, 9, 9, 9, 27, 27, 27, 27}; const uint8x16_t shift = vld1q_u8(k_shift); for (int i = 0; i < nb; ++i) { #if defined(__ARM_FEATURE_DOTPROD) int32x4_t sumi0 = vdupq_n_s32(0); int32x4_t sumi1 = vdupq_n_s32(0); #else int16x8_t sumi0 = vdupq_n_s16(0); int16x8_t sumi1 = vdupq_n_s16(0); #endif // first 32 bytes of 5 elements { uint8x16_t qx0 = vld1q_u8(x[i].qs + 0); uint8x16_t qx1 = vld1q_u8(x[i].qs + 16); uint8x16_t qx2 = vmulq_u8(qx0, vdupq_n_u8(3)); uint8x16_t qx3 = vmulq_u8(qx1, vdupq_n_u8(3)); uint8x16_t qx4 = vmulq_u8(qx0, vdupq_n_u8(9)); uint8x16_t qx5 = vmulq_u8(qx1, vdupq_n_u8(9)); uint8x16_t qx6 = vmulq_u8(qx0, vdupq_n_u8(27)); uint8x16_t qx7 = vmulq_u8(qx1, vdupq_n_u8(27)); uint8x16_t qx8 = vmulq_u8(qx0, vdupq_n_u8(81)); uint8x16_t qx9 = vmulq_u8(qx1, vdupq_n_u8(81)); // multiply by 3 and keep the 2 bits above 8 bits int8x16_t sqx0 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx0, vshrq_n_u8(qx0, 1)), 6)); int8x16_t sqx1 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx1, vshrq_n_u8(qx1, 1)), 6)); int8x16_t sqx2 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx2, vshrq_n_u8(qx2, 1)), 6)); int8x16_t sqx3 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx3, vshrq_n_u8(qx3, 1)), 6)); int8x16_t sqx4 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx4, vshrq_n_u8(qx4, 1)), 6)); int8x16_t sqx5 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx5, vshrq_n_u8(qx5, 1)), 6)); int8x16_t sqx6 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx6, vshrq_n_u8(qx6, 1)), 6)); int8x16_t sqx7 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx7, vshrq_n_u8(qx7, 1)), 6)); int8x16_t sqx8 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx8, vshrq_n_u8(qx8, 1)), 6)); int8x16_t sqx9 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx9, vshrq_n_u8(qx9, 1)), 6)); const int8x16_t qy0 = vld1q_s8(y[i].qs + 0); const int8x16_t qy1 = vld1q_s8(y[i].qs + 16); const int8x16_t qy2 = vld1q_s8(y[i].qs + 32); const int8x16_t qy3 = vld1q_s8(y[i].qs + 48); const int8x16_t qy4 = vld1q_s8(y[i].qs + 64); const int8x16_t qy5 = vld1q_s8(y[i].qs + 80); const int8x16_t qy6 = vld1q_s8(y[i].qs + 96); const int8x16_t qy7 = vld1q_s8(y[i].qs + 112); const int8x16_t qy8 = vld1q_s8(y[i].qs + 128); const int8x16_t qy9 = vld1q_s8(y[i].qs + 144); #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vdotq_s32(sumi0, sqx0, qy0); sumi1 = vdotq_s32(sumi1, sqx1, qy1); sumi0 = vdotq_s32(sumi0, sqx2, qy2); sumi1 = vdotq_s32(sumi1, sqx3, qy3); sumi0 = vdotq_s32(sumi0, sqx4, qy4); sumi1 = vdotq_s32(sumi1, sqx5, qy5); sumi0 = vdotq_s32(sumi0, sqx6, qy6); sumi1 = vdotq_s32(sumi1, sqx7, qy7); sumi0 = vdotq_s32(sumi0, sqx8, qy8); sumi1 = vdotq_s32(sumi1, sqx9, qy9); #else sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx6), vget_low_s8(qy6)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx6), vget_high_s8(qy6)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx7), vget_low_s8(qy7)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx7), vget_high_s8(qy7)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx8), vget_low_s8(qy8)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx8), vget_high_s8(qy8)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx9), vget_low_s8(qy9)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx9), vget_high_s8(qy9)); #endif } // last 16 bytes of 5-element, along with the 4 bytes of 4 elements { uint8x16_t qx0 = vld1q_u8(x[i].qs + 32); uint8x16_t qx1 = vmulq_u8(qx0, vdupq_n_u8(3)); uint8x16_t qx2 = vmulq_u8(qx0, vdupq_n_u8(9)); uint8x16_t qx3 = vmulq_u8(qx0, vdupq_n_u8(27)); uint8x16_t qx4 = vmulq_u8(qx0, vdupq_n_u8(81)); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); // potentially unaligned uint8x16_t qx5 = vreinterpretq_u8_u32(vdupq_n_u32(qh)); qx5 = vmulq_u8(qx5, shift); // multiply by 3 and keep the 2 bits above 8 bits int8x16_t sqx0 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx0, vshrq_n_u8(qx0, 1)), 6)); int8x16_t sqx1 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx1, vshrq_n_u8(qx1, 1)), 6)); int8x16_t sqx2 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx2, vshrq_n_u8(qx2, 1)), 6)); int8x16_t sqx3 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx3, vshrq_n_u8(qx3, 1)), 6)); int8x16_t sqx4 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx4, vshrq_n_u8(qx4, 1)), 6)); int8x16_t sqx5 = vreinterpretq_s8_u8(vshrq_n_u8(vhaddq_u8(qx5, vshrq_n_u8(qx5, 1)), 6)); const int8x16_t qy0 = vld1q_s8(y[i].qs + 160); const int8x16_t qy1 = vld1q_s8(y[i].qs + 176); const int8x16_t qy2 = vld1q_s8(y[i].qs + 192); const int8x16_t qy3 = vld1q_s8(y[i].qs + 208); const int8x16_t qy4 = vld1q_s8(y[i].qs + 224); const int8x16_t qy5 = vld1q_s8(y[i].qs + 240); #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vdotq_s32(sumi0, sqx0, qy0); sumi1 = vdotq_s32(sumi1, sqx1, qy1); sumi0 = vdotq_s32(sumi0, sqx2, qy2); sumi1 = vdotq_s32(sumi1, sqx3, qy3); sumi0 = vdotq_s32(sumi0, sqx4, qy4); sumi1 = vdotq_s32(sumi1, sqx5, qy5); #else sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4)); sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5)); sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5)); #endif } const int16x8_t ysum0 = vld1q_s16(y[i].bsums); const int16x8_t ysum1 = vld1q_s16(y[i].bsums + 8); const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d; #if defined(__ARM_FEATURE_DOTPROD) sumi0 = vaddq_s32(sumi0, sumi1); sumi0 = vsubq_s32(sumi0, vpaddlq_s16(vaddq_s16(ysum0, ysum1))); sumf += d * (float) vaddvq_s32(sumi0); #else sumi0 = vaddq_s16(sumi0, sumi1); sumi0 = vsubq_s16(sumi0, vaddq_s16(ysum0, ysum1)); sumf += d * (float) vaddlvq_s16(sumi0); #endif } *s = sumf; #elif defined(__AVX2__) __m256 sumf = _mm256_setzero_ps(); for (int i = 0; i < nb; ++i) { // 16-bit sums __m256i sumi0 = _mm256_setzero_si256(); __m256i sumi1 = _mm256_setzero_si256(); __m256i sumi2 = _mm256_setzero_si256(); // first 32 bytes of 5 elements { __m256i qx0 = _mm256_loadu_si256((const __m256i *) (x[i].qs)); // 8-bit multiplies with shifts, masks and adds __m256i qx1 = _mm256_add_epi8(qx0, _mm256_add_epi8(qx0, qx0)); // 1 * 3 __m256i qx2 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx0, 3), _mm256_set1_epi8(-8)), qx0); // 1 * 9 __m256i qx3 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx1, 3), _mm256_set1_epi8(-8)), qx1); // 3 * 9 __m256i qx4 = _mm256_add_epi8(_mm256_and_si256(_mm256_slli_epi16(qx2, 3), _mm256_set1_epi8(-8)), qx2); // 9 * 9 // TODO: can _mm256_mulhi_epu16 be faster even if 16-bits? // Cancel the +1 from avg so that it behaves like a halving add qx0 = _mm256_subs_epu8(qx0, _mm256_set1_epi8(1)); qx1 = _mm256_subs_epu8(qx1, _mm256_set1_epi8(1)); qx2 = _mm256_subs_epu8(qx2, _mm256_set1_epi8(1)); qx3 = _mm256_subs_epu8(qx3, _mm256_set1_epi8(1)); qx4 = _mm256_subs_epu8(qx4, _mm256_set1_epi8(1)); // Multiply by 3 and get the top 2 bits qx0 = _mm256_avg_epu8(qx0, _mm256_avg_epu8(qx0, _mm256_setzero_si256())); qx1 = _mm256_avg_epu8(qx1, _mm256_avg_epu8(qx1, _mm256_setzero_si256())); qx2 = _mm256_avg_epu8(qx2, _mm256_avg_epu8(qx2, _mm256_setzero_si256())); qx3 = _mm256_avg_epu8(qx3, _mm256_avg_epu8(qx3, _mm256_setzero_si256())); qx4 = _mm256_avg_epu8(qx4, _mm256_avg_epu8(qx4, _mm256_setzero_si256())); qx0 = _mm256_and_si256(_mm256_srli_epi16(qx0, 6), _mm256_set1_epi8(3)); qx1 = _mm256_and_si256(_mm256_srli_epi16(qx1, 6), _mm256_set1_epi8(3)); qx2 = _mm256_and_si256(_mm256_srli_epi16(qx2, 6), _mm256_set1_epi8(3)); qx3 = _mm256_and_si256(_mm256_srli_epi16(qx3, 6), _mm256_set1_epi8(3)); qx4 = _mm256_and_si256(_mm256_srli_epi16(qx4, 6), _mm256_set1_epi8(3)); const __m256i qy0 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 0)); const __m256i qy1 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 32)); const __m256i qy2 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 64)); const __m256i qy3 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 96)); const __m256i qy4 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 128)); qx0 = _mm256_maddubs_epi16(qx0, qy0); qx1 = _mm256_maddubs_epi16(qx1, qy1); qx2 = _mm256_maddubs_epi16(qx2, qy2); qx3 = _mm256_maddubs_epi16(qx3, qy3); qx4 = _mm256_maddubs_epi16(qx4, qy4); sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(qx0, qx1)); sumi1 = _mm256_add_epi16(sumi1, _mm256_add_epi16(qx2, qx3)); sumi2 = _mm256_add_epi16(sumi2, qx4); } // last 16 bytes of 5-element, along with the 4 bytes of 4 elements { __m128i qx0 = _mm_loadu_si128((const __m128i *) (x[i].qs + 32)); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); // potentially unaligned __m256i qx5_l = _mm256_cvtepu8_epi16(_mm_set1_epi32(qh)); __m128i qx1 = _mm_add_epi8(qx0, _mm_add_epi8(qx0, qx0)); // 1 * 3 __m128i qx2 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx0, 3), _mm_set1_epi8(-8)), qx0); // 1 * 9 __m128i qx3 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx1, 3), _mm_set1_epi8(-8)), qx1); // 3 * 9 __m128i qx4 = _mm_add_epi8(_mm_and_si128(_mm_slli_epi16(qx2, 3), _mm_set1_epi8(-8)), qx2); // 9 * 9 __m256i qx01 = MM256_SET_M128I(qx1, qx0); __m256i qx23 = MM256_SET_M128I(qx3, qx2); // avx2 does not have 8-bit multiplies, so 16-bit it is. qx5_l = _mm256_mullo_epi16(qx5_l, _mm256_set_epi16(27, 27, 27, 27, 9, 9, 9, 9, 3, 3, 3, 3, 1, 1, 1, 1)); qx5_l = _mm256_and_si256(qx5_l, _mm256_set1_epi16(0xFF)); __m128i qx5 = _mm_packus_epi16(_mm256_castsi256_si128(qx5_l), _mm256_extracti128_si256(qx5_l, 1)); __m256i qx45 = MM256_SET_M128I(qx5, qx4); // Cancel the +1 from avg so that it behaves like a halving add qx01 = _mm256_subs_epu8(qx01, _mm256_set1_epi8(1)); qx23 = _mm256_subs_epu8(qx23, _mm256_set1_epi8(1)); qx45 = _mm256_subs_epu8(qx45, _mm256_set1_epi8(1)); // Multiply by 3 and get the top 2 bits qx01 = _mm256_avg_epu8(qx01, _mm256_avg_epu8(qx01, _mm256_setzero_si256())); qx23 = _mm256_avg_epu8(qx23, _mm256_avg_epu8(qx23, _mm256_setzero_si256())); qx45 = _mm256_avg_epu8(qx45, _mm256_avg_epu8(qx45, _mm256_setzero_si256())); qx01 = _mm256_and_si256(_mm256_srli_epi16(qx01, 6), _mm256_set1_epi8(3)); qx23 = _mm256_and_si256(_mm256_srli_epi16(qx23, 6), _mm256_set1_epi8(3)); qx45 = _mm256_and_si256(_mm256_srli_epi16(qx45, 6), _mm256_set1_epi8(3)); const __m256i qy01 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 160)); const __m256i qy23 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 192)); const __m256i qy45 = _mm256_loadu_si256((const __m256i *) (y[i].qs + 224)); qx01 = _mm256_maddubs_epi16(qx01, qy01); qx23 = _mm256_maddubs_epi16(qx23, qy23); qx45 = _mm256_maddubs_epi16(qx45, qy45); sumi0 = _mm256_add_epi16(sumi0, qx01); sumi1 = _mm256_add_epi16(sumi1, qx23); sumi2 = _mm256_add_epi16(sumi2, qx45); } const __m256i ysum = _mm256_loadu_si256((const __m256i *) y[i].bsums); const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(x[i].d)); sumi0 = _mm256_sub_epi16(sumi0, ysum); sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(sumi1, sumi2)); sumi0 = _mm256_madd_epi16(sumi0, _mm256_set1_epi16(1)); sumf = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(sumi0), d), sumf); } *s = hsum_float_8(sumf); #else const uint8_t pow3[6] = {1, 3, 9, 27, 81, 243}; float sumf = 0.0f; for (int i = 0; i < nb; ++i) { int sum = 0; for (size_t j = 0; j < sizeof(x->qs) - sizeof(x->qs) % 32; j += 32) { for (size_t l = 0; l < 5; ++l) { for (size_t m = 0; m < 32; ++m) { uint8_t q = x[i].qs[j + m] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[j*5 + l*32 + m]; } } } for (size_t j = sizeof(x->qs) - sizeof(x->qs) % 32; j < sizeof(x->qs); j += 16) { for (size_t l = 0; l < 5; ++l) { for (size_t m = 0; m < 16; ++m) { uint8_t q = x[i].qs[j + m] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[j*5 + l*16 + m]; } } } for (size_t l = 0; l < 4; ++l) { for (size_t j = 0; j < sizeof(x->qh); ++j) { uint8_t q = x[i].qh[j] * pow3[l]; uint16_t xi = ((uint16_t) q * 3) >> 8; sum += (xi - 1) * y[i].qs[sizeof(x->qs)*5 + l*sizeof(x->qh) + j]; } } sumf += (float) sum * (GGML_FP16_TO_FP32(x[i].d) * y[i].d); } *s = sumf; #endif }
O2
c
ggml_vec_dot_tq1_0_q8_K: movl %edi, %eax movl $0x100, %edi # imm = 0x100 cltd idivl %edi movl %eax, %edx sarl $0x1f, %edx andnl %eax, %edx, %eax imulq $0x36, %rax, %rax vpxor %xmm0, %xmm0, %xmm0 xorl %edx, %edx vpbroadcastb 0x286b5(%rip), %ymm1 # 0x4572e vpbroadcastb 0x286ad(%rip), %ymm2 # 0x4572f vpbroadcastb 0x286a5(%rip), %ymm3 # 0x45730 vpmovsxbw 0x3104c(%rip), %ymm4 # 0x4e0e0 vpbroadcastw 0x28697(%rip), %ymm5 # 0x45734 movq 0x39ebc(%rip), %rdi # 0x56f60 vpbroadcastw 0x28685(%rip), %ymm7 # 0x45732 vxorps %xmm6, %xmm6, %xmm6 cmpq %rdx, %rax je 0x1d2bc vmovdqu (%rcx,%rdx), %ymm8 vpaddb %ymm8, %ymm8, %ymm9 vpaddb %ymm8, %ymm9, %ymm9 vpsllw $0x3, %ymm8, %ymm10 vpand %ymm2, %ymm10, %ymm10 vpaddb %ymm8, %ymm10, %ymm10 vpsllw $0x3, %ymm9, %ymm11 vpand %ymm2, %ymm11, %ymm11 vpaddb %ymm9, %ymm11, %ymm11 vpsllw $0x3, %ymm10, %ymm12 vpand %ymm2, %ymm12, %ymm12 vpaddb %ymm10, %ymm12, %ymm12 vpsubusb %ymm3, %ymm8, %ymm8 vpsubusb %ymm3, %ymm9, %ymm9 vpsubusb %ymm3, %ymm10, %ymm10 vpsubusb %ymm3, %ymm11, %ymm11 vpsubusb %ymm3, %ymm12, %ymm12 vpavgb %ymm0, %ymm8, %ymm13 vpavgb %ymm13, %ymm8, %ymm8 vpavgb %ymm0, %ymm9, %ymm13 vpavgb %ymm13, %ymm9, %ymm9 vpavgb %ymm0, %ymm10, %ymm13 vpavgb %ymm13, %ymm10, %ymm10 vpavgb %ymm0, %ymm11, %ymm13 vpavgb %ymm13, %ymm11, %ymm11 vpavgb %ymm0, %ymm12, %ymm13 vpavgb %ymm13, %ymm12, %ymm12 vpsrlw $0x6, %ymm8, %ymm8 vpsrlw $0x6, %ymm9, %ymm9 vpsrlw $0x6, %ymm10, %ymm10 vpsrlw $0x6, %ymm11, %ymm11 vpand %ymm1, %ymm8, %ymm8 vpmaddubsw 0x4(%r9), %ymm8, %ymm8 vpsrlw $0x6, %ymm12, %ymm12 vpand %ymm1, %ymm9, %ymm9 vpmaddubsw 0x24(%r9), %ymm9, %ymm9 vpaddw %ymm8, %ymm9, %ymm8 vpand %ymm1, %ymm10, %ymm9 vpmaddubsw 0x44(%r9), %ymm9, %ymm9 vpaddw %ymm9, %ymm8, %ymm8 vpand %ymm1, %ymm11, %ymm9 vpmaddubsw 0x64(%r9), %ymm9, %ymm9 vpaddw %ymm9, %ymm8, %ymm8 vpand %ymm1, %ymm12, %ymm9 vpmaddubsw 0x84(%r9), %ymm9, %ymm9 vmovdqu 0x20(%rcx,%rdx), %xmm10 vpaddw %ymm9, %ymm8, %ymm8 vpbroadcastd 0x30(%rcx,%rdx), %xmm9 vpmovzxbw %xmm9, %ymm9 # ymm9 = xmm9[0],zero,xmm9[1],zero,xmm9[2],zero,xmm9[3],zero,xmm9[4],zero,xmm9[5],zero,xmm9[6],zero,xmm9[7],zero,xmm9[8],zero,xmm9[9],zero,xmm9[10],zero,xmm9[11],zero,xmm9[12],zero,xmm9[13],zero,xmm9[14],zero,xmm9[15],zero vpmullw %ymm4, %ymm9, %ymm9 vpand %ymm5, %ymm9, %ymm9 vpaddb %xmm10, %xmm10, %xmm11 vpaddb %xmm10, %xmm11, %xmm11 vpsllw $0x3, %xmm10, %xmm12 vpand %xmm2, %xmm12, %xmm12 vpaddb %xmm10, %xmm12, %xmm12 vpsllw $0x3, %xmm11, %xmm13 vpand %xmm2, %xmm13, %xmm13 vpaddb %xmm11, %xmm13, %xmm13 vpsllw $0x3, %xmm12, %xmm14 vpand %xmm2, %xmm14, %xmm14 vpaddb %xmm12, %xmm14, %xmm14 vextracti128 $0x1, %ymm9, %xmm15 vpackuswb %xmm15, %xmm9, %xmm9 vinserti128 $0x1, %xmm11, %ymm10, %ymm10 vpsubusb %ymm3, %ymm10, %ymm10 vinserti128 $0x1, %xmm13, %ymm12, %ymm11 vpsubusb %ymm3, %ymm11, %ymm11 vinserti128 $0x1, %xmm9, %ymm14, %ymm9 vpsubusb %ymm3, %ymm9, %ymm9 vpavgb %ymm0, %ymm10, %ymm12 vpavgb %ymm12, %ymm10, %ymm10 vpavgb %ymm0, %ymm11, %ymm12 vpavgb %ymm12, %ymm11, %ymm11 vpavgb %ymm0, %ymm9, %ymm12 vpavgb %ymm12, %ymm9, %ymm9 vpsrlw $0x6, %ymm10, %ymm10 vpsrlw $0x6, %ymm11, %ymm11 vpand %ymm1, %ymm10, %ymm10 vpmaddubsw 0xa4(%r9), %ymm10, %ymm10 vpsrlw $0x6, %ymm9, %ymm9 vpaddw %ymm10, %ymm8, %ymm8 vpand %ymm1, %ymm11, %ymm10 vpmaddubsw 0xc4(%r9), %ymm10, %ymm10 vpaddw %ymm10, %ymm8, %ymm8 vpand %ymm1, %ymm9, %ymm9 vpmaddubsw 0xe4(%r9), %ymm9, %ymm9 vpaddw %ymm9, %ymm8, %ymm8 vmovss (%r9), %xmm9 movzwl 0x34(%rcx,%rdx), %r8d vmulss (%rdi,%r8,4), %xmm9, %xmm9 vbroadcastss %xmm9, %ymm9 vpsubw 0x104(%r9), %ymm8, %ymm8 vpmaddwd %ymm7, %ymm8, %ymm8 vcvtdq2ps %ymm8, %ymm8 vmulps %ymm8, %ymm9, %ymm8 vaddps %ymm6, %ymm8, %ymm6 addq $0x36, %rdx addq $0x124, %r9 # imm = 0x124 jmp 0x1d0b1 vextractf128 $0x1, %ymm6, %xmm0 vaddps %xmm6, %xmm0, %xmm0 vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0] vaddps %xmm1, %xmm0, %xmm0 vhaddps %xmm0, %xmm0, %xmm0 vmovss %xmm0, (%rsi) vzeroupper retq
ggml_vec_dot_tq1_0_q8_K: mov eax, edi mov edi, 100h cdq idiv edi mov edx, eax sar edx, 1Fh andn eax, edx, eax imul rax, 36h ; '6' vpxor xmm0, xmm0, xmm0 xor edx, edx vpbroadcastb ymm1, cs:byte_4572E vpbroadcastb ymm2, cs:byte_4572F vpbroadcastb ymm3, cs:byte_45730 vpmovsxbw ymm4, cs:xmmword_4E0E0 vpbroadcastw ymm5, cs:word_45734 mov rdi, cs:ggml_table_f32_f16_ptr vpbroadcastw ymm7, cs:word_45732 vxorps xmm6, xmm6, xmm6 loc_1D0B1: cmp rax, rdx jz loc_1D2BC vmovdqu ymm8, ymmword ptr [rcx+rdx] vpaddb ymm9, ymm8, ymm8 vpaddb ymm9, ymm9, ymm8 vpsllw ymm10, ymm8, 3 vpand ymm10, ymm10, ymm2 vpaddb ymm10, ymm10, ymm8 vpsllw ymm11, ymm9, 3 vpand ymm11, ymm11, ymm2 vpaddb ymm11, ymm11, ymm9 vpsllw ymm12, ymm10, 3 vpand ymm12, ymm12, ymm2 vpaddb ymm12, ymm12, ymm10 vpsubusb ymm8, ymm8, ymm3 vpsubusb ymm9, ymm9, ymm3 vpsubusb ymm10, ymm10, ymm3 vpsubusb ymm11, ymm11, ymm3 vpsubusb ymm12, ymm12, ymm3 vpavgb ymm13, ymm8, ymm0 vpavgb ymm8, ymm8, ymm13 vpavgb ymm13, ymm9, ymm0 vpavgb ymm9, ymm9, ymm13 vpavgb ymm13, ymm10, ymm0 vpavgb ymm10, ymm10, ymm13 vpavgb ymm13, ymm11, ymm0 vpavgb ymm11, ymm11, ymm13 vpavgb ymm13, ymm12, ymm0 vpavgb ymm12, ymm12, ymm13 vpsrlw ymm8, ymm8, 6 vpsrlw ymm9, ymm9, 6 vpsrlw ymm10, ymm10, 6 vpsrlw ymm11, ymm11, 6 vpand ymm8, ymm8, ymm1 vpmaddubsw ymm8, ymm8, ymmword ptr [r9+4] vpsrlw ymm12, ymm12, 6 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+24h] vpaddw ymm8, ymm9, ymm8 vpand ymm9, ymm10, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+44h] vpaddw ymm8, ymm8, ymm9 vpand ymm9, ymm11, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+64h] vpaddw ymm8, ymm8, ymm9 vpand ymm9, ymm12, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+84h] vmovdqu xmm10, xmmword ptr [rcx+rdx+20h] vpaddw ymm8, ymm8, ymm9 vpbroadcastd xmm9, dword ptr [rcx+rdx+30h] vpmovzxbw ymm9, xmm9 vpmullw ymm9, ymm9, ymm4 vpand ymm9, ymm9, ymm5 vpaddb xmm11, xmm10, xmm10 vpaddb xmm11, xmm11, xmm10 vpsllw xmm12, xmm10, 3 vpand xmm12, xmm12, xmm2 vpaddb xmm12, xmm12, xmm10 vpsllw xmm13, xmm11, 3 vpand xmm13, xmm13, xmm2 vpaddb xmm13, xmm13, xmm11 vpsllw xmm14, xmm12, 3 vpand xmm14, xmm14, xmm2 vpaddb xmm14, xmm14, xmm12 vextracti128 xmm15, ymm9, 1 vpackuswb xmm9, xmm9, xmm15 vinserti128 ymm10, ymm10, xmm11, 1 vpsubusb ymm10, ymm10, ymm3 vinserti128 ymm11, ymm12, xmm13, 1 vpsubusb ymm11, ymm11, ymm3 vinserti128 ymm9, ymm14, xmm9, 1 vpsubusb ymm9, ymm9, ymm3 vpavgb ymm12, ymm10, ymm0 vpavgb ymm10, ymm10, ymm12 vpavgb ymm12, ymm11, ymm0 vpavgb ymm11, ymm11, ymm12 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpsrlw ymm10, ymm10, 6 vpsrlw ymm11, ymm11, 6 vpand ymm10, ymm10, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+0A4h] vpsrlw ymm9, ymm9, 6 vpaddw ymm8, ymm8, ymm10 vpand ymm10, ymm11, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+0C4h] vpaddw ymm8, ymm8, ymm10 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+0E4h] vpaddw ymm8, ymm8, ymm9 vmovss xmm9, dword ptr [r9] movzx r8d, word ptr [rcx+rdx+34h] vmulss xmm9, xmm9, dword ptr [rdi+r8*4] vbroadcastss ymm9, xmm9 vpsubw ymm8, ymm8, ymmword ptr [r9+104h] vpmaddwd ymm8, ymm8, ymm7 vcvtdq2ps ymm8, ymm8 vmulps ymm8, ymm9, ymm8 vaddps ymm6, ymm8, ymm6 add rdx, 36h ; '6' add r9, 124h jmp loc_1D0B1 loc_1D2BC: vextractf128 xmm0, ymm6, 1 vaddps xmm0, xmm0, xmm6 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 vzeroupper retn
long long ggml_vec_dot_tq1_0_q8_K( int a1, long long _RSI, __m128 _XMM0, double a4, double a5, double a6, double a7, double a8, __m128 _XMM6, long long a10, long long _RCX, long long a12, long long _R9) { long long result; // rax result = 54LL * ((a1 / 256) & (unsigned int)~((a1 / 256) >> 31)); __asm { vpxor xmm0, xmm0, xmm0 } _RDX = 0LL; __asm { vpbroadcastb ymm1, cs:byte_4572E vpbroadcastb ymm2, cs:byte_4572F vpbroadcastb ymm3, cs:byte_45730 vpmovsxbw ymm4, cs:xmmword_4E0E0 vpbroadcastw ymm5, cs:word_45734 vpbroadcastw ymm7, cs:word_45732 vxorps xmm6, xmm6, xmm6 } while ( result != _RDX ) { __asm { vmovdqu ymm8, ymmword ptr [rcx+rdx] vpaddb ymm9, ymm8, ymm8 vpaddb ymm9, ymm9, ymm8 vpsllw ymm10, ymm8, 3 vpand ymm10, ymm10, ymm2 vpaddb ymm10, ymm10, ymm8 vpsllw ymm11, ymm9, 3 vpand ymm11, ymm11, ymm2 vpaddb ymm11, ymm11, ymm9 vpsllw ymm12, ymm10, 3 vpand ymm12, ymm12, ymm2 vpaddb ymm12, ymm12, ymm10 vpsubusb ymm8, ymm8, ymm3 vpsubusb ymm9, ymm9, ymm3 vpsubusb ymm10, ymm10, ymm3 vpsubusb ymm11, ymm11, ymm3 vpsubusb ymm12, ymm12, ymm3 vpavgb ymm13, ymm8, ymm0 vpavgb ymm8, ymm8, ymm13 vpavgb ymm13, ymm9, ymm0 vpavgb ymm9, ymm9, ymm13 vpavgb ymm13, ymm10, ymm0 vpavgb ymm10, ymm10, ymm13 vpavgb ymm13, ymm11, ymm0 vpavgb ymm11, ymm11, ymm13 vpavgb ymm13, ymm12, ymm0 vpavgb ymm12, ymm12, ymm13 vpsrlw ymm8, ymm8, 6 vpsrlw ymm9, ymm9, 6 vpsrlw ymm10, ymm10, 6 vpsrlw ymm11, ymm11, 6 vpand ymm8, ymm8, ymm1 vpmaddubsw ymm8, ymm8, ymmword ptr [r9+4] vpsrlw ymm12, ymm12, 6 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+24h] vpaddw ymm8, ymm9, ymm8 vpand ymm9, ymm10, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+44h] vpaddw ymm8, ymm8, ymm9 vpand ymm9, ymm11, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+64h] vpaddw ymm8, ymm8, ymm9 vpand ymm9, ymm12, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+84h] vmovdqu xmm10, xmmword ptr [rcx+rdx+20h] vpaddw ymm8, ymm8, ymm9 vpbroadcastd xmm9, dword ptr [rcx+rdx+30h] vpmovzxbw ymm9, xmm9 vpmullw ymm9, ymm9, ymm4 vpand ymm9, ymm9, ymm5 vpaddb xmm11, xmm10, xmm10 vpaddb xmm11, xmm11, xmm10 vpsllw xmm12, xmm10, 3 vpand xmm12, xmm12, xmm2 vpaddb xmm12, xmm12, xmm10 vpsllw xmm13, xmm11, 3 vpand xmm13, xmm13, xmm2 vpaddb xmm13, xmm13, xmm11 vpsllw xmm14, xmm12, 3 vpand xmm14, xmm14, xmm2 vpaddb xmm14, xmm14, xmm12 vextracti128 xmm15, ymm9, 1 vpackuswb xmm9, xmm9, xmm15 vinserti128 ymm10, ymm10, xmm11, 1 vpsubusb ymm10, ymm10, ymm3 vinserti128 ymm11, ymm12, xmm13, 1 vpsubusb ymm11, ymm11, ymm3 vinserti128 ymm9, ymm14, xmm9, 1 vpsubusb ymm9, ymm9, ymm3 vpavgb ymm12, ymm10, ymm0 vpavgb ymm10, ymm10, ymm12 vpavgb ymm12, ymm11, ymm0 vpavgb ymm11, ymm11, ymm12 vpavgb ymm12, ymm9, ymm0 vpavgb ymm9, ymm9, ymm12 vpsrlw ymm10, ymm10, 6 vpsrlw ymm11, ymm11, 6 vpand ymm10, ymm10, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+0A4h] vpsrlw ymm9, ymm9, 6 vpaddw ymm8, ymm8, ymm10 vpand ymm10, ymm11, ymm1 vpmaddubsw ymm10, ymm10, ymmword ptr [r9+0C4h] vpaddw ymm8, ymm8, ymm10 vpand ymm9, ymm9, ymm1 vpmaddubsw ymm9, ymm9, ymmword ptr [r9+0E4h] vpaddw ymm8, ymm8, ymm9 vmovss xmm9, dword ptr [r9] vmulss xmm9, xmm9, dword ptr [rdi+r8*4] vbroadcastss ymm9, xmm9 vpsubw ymm8, ymm8, ymmword ptr [r9+104h] vpmaddwd ymm8, ymm8, ymm7 vcvtdq2ps ymm8, ymm8 vmulps ymm8, ymm9, ymm8 vaddps ymm6, ymm8, ymm6 } _RDX += 54LL; _R9 += 292LL; } __asm { vextractf128 xmm0, ymm6, 1 vaddps xmm0, xmm0, xmm6 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 vzeroupper } return result; }
ggml_vec_dot_tq1_0_q8_K: MOV EAX,EDI MOV EDI,0x100 CDQ IDIV EDI MOV EDX,EAX SAR EDX,0x1f ANDN EAX,EDX,EAX IMUL RAX,RAX,0x36 VPXOR XMM0,XMM0,XMM0 XOR EDX,EDX VPBROADCASTB YMM1,byte ptr [0x0014572e] VPBROADCASTB YMM2,byte ptr [0x0014572f] VPBROADCASTB YMM3,byte ptr [0x00145730] VPMOVSXBW YMM4,xmmword ptr [0x0014e0e0] VPBROADCASTW YMM5,word ptr [0x00145734] MOV RDI,qword ptr [0x00156f60] VPBROADCASTW YMM7,word ptr [0x00145732] VXORPS XMM6,XMM6,XMM6 LAB_0011d0b1: CMP RAX,RDX JZ 0x0011d2bc VMOVDQU YMM8,ymmword ptr [RCX + RDX*0x1] VPADDB YMM9,YMM8,YMM8 VPADDB YMM9,YMM9,YMM8 VPSLLW YMM10,YMM8,0x3 VPAND YMM10,YMM10,YMM2 VPADDB YMM10,YMM10,YMM8 VPSLLW YMM11,YMM9,0x3 VPAND YMM11,YMM11,YMM2 VPADDB YMM11,YMM11,YMM9 VPSLLW YMM12,YMM10,0x3 VPAND YMM12,YMM12,YMM2 VPADDB YMM12,YMM12,YMM10 VPSUBUSB YMM8,YMM8,YMM3 VPSUBUSB YMM9,YMM9,YMM3 VPSUBUSB YMM10,YMM10,YMM3 VPSUBUSB YMM11,YMM11,YMM3 VPSUBUSB YMM12,YMM12,YMM3 VPAVGB YMM13,YMM8,YMM0 VPAVGB YMM8,YMM8,YMM13 VPAVGB YMM13,YMM9,YMM0 VPAVGB YMM9,YMM9,YMM13 VPAVGB YMM13,YMM10,YMM0 VPAVGB YMM10,YMM10,YMM13 VPAVGB YMM13,YMM11,YMM0 VPAVGB YMM11,YMM11,YMM13 VPAVGB YMM13,YMM12,YMM0 VPAVGB YMM12,YMM12,YMM13 VPSRLW YMM8,YMM8,0x6 VPSRLW YMM9,YMM9,0x6 VPSRLW YMM10,YMM10,0x6 VPSRLW YMM11,YMM11,0x6 VPAND YMM8,YMM8,YMM1 VPMADDUBSW YMM8,YMM8,ymmword ptr [R9 + 0x4] VPSRLW YMM12,YMM12,0x6 VPAND YMM9,YMM9,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0x24] VPADDW YMM8,YMM9,YMM8 VPAND YMM9,YMM10,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0x44] VPADDW YMM8,YMM8,YMM9 VPAND YMM9,YMM11,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0x64] VPADDW YMM8,YMM8,YMM9 VPAND YMM9,YMM12,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0x84] VMOVDQU XMM10,xmmword ptr [RCX + RDX*0x1 + 0x20] VPADDW YMM8,YMM8,YMM9 VPBROADCASTD XMM9,dword ptr [RCX + RDX*0x1 + 0x30] VPMOVZXBW YMM9,XMM9 VPMULLW YMM9,YMM9,YMM4 VPAND YMM9,YMM9,YMM5 VPADDB XMM11,XMM10,XMM10 VPADDB XMM11,XMM11,XMM10 VPSLLW XMM12,XMM10,0x3 VPAND XMM12,XMM12,XMM2 VPADDB XMM12,XMM12,XMM10 VPSLLW XMM13,XMM11,0x3 VPAND XMM13,XMM13,XMM2 VPADDB XMM13,XMM13,XMM11 VPSLLW XMM14,XMM12,0x3 VPAND XMM14,XMM14,XMM2 VPADDB XMM14,XMM14,XMM12 VEXTRACTI128 XMM15,YMM9,0x1 VPACKUSWB XMM9,XMM9,XMM15 VINSERTI128 YMM10,YMM10,XMM11,0x1 VPSUBUSB YMM10,YMM10,YMM3 VINSERTI128 YMM11,YMM12,XMM13,0x1 VPSUBUSB YMM11,YMM11,YMM3 VINSERTI128 YMM9,YMM14,XMM9,0x1 VPSUBUSB YMM9,YMM9,YMM3 VPAVGB YMM12,YMM10,YMM0 VPAVGB YMM10,YMM10,YMM12 VPAVGB YMM12,YMM11,YMM0 VPAVGB YMM11,YMM11,YMM12 VPAVGB YMM12,YMM9,YMM0 VPAVGB YMM9,YMM9,YMM12 VPSRLW YMM10,YMM10,0x6 VPSRLW YMM11,YMM11,0x6 VPAND YMM10,YMM10,YMM1 VPMADDUBSW YMM10,YMM10,ymmword ptr [R9 + 0xa4] VPSRLW YMM9,YMM9,0x6 VPADDW YMM8,YMM8,YMM10 VPAND YMM10,YMM11,YMM1 VPMADDUBSW YMM10,YMM10,ymmword ptr [R9 + 0xc4] VPADDW YMM8,YMM8,YMM10 VPAND YMM9,YMM9,YMM1 VPMADDUBSW YMM9,YMM9,ymmword ptr [R9 + 0xe4] VPADDW YMM8,YMM8,YMM9 VMOVSS XMM9,dword ptr [R9] MOVZX R8D,word ptr [RCX + RDX*0x1 + 0x34] VMULSS XMM9,XMM9,dword ptr [RDI + R8*0x4] VBROADCASTSS YMM9,XMM9 VPSUBW YMM8,YMM8,ymmword ptr [R9 + 0x104] VPMADDWD YMM8,YMM8,YMM7 VCVTDQ2PS YMM8,YMM8 VMULPS YMM8,YMM9,YMM8 VADDPS YMM6,YMM8,YMM6 ADD RDX,0x36 ADD R9,0x124 JMP 0x0011d0b1 LAB_0011d2bc: VEXTRACTF128 XMM0,YMM6,0x1 VADDPS XMM0,XMM0,XMM6 VSHUFPD XMM1,XMM0,XMM0,0x1 VADDPS XMM0,XMM0,XMM1 VHADDPS XMM0,XMM0,XMM0 VMOVSS dword ptr [RSI],XMM0 VZEROUPPER RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ggml_vec_dot_tq1_0_q8_K (int param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5, float *param_6) { int4 uVar1; float fVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [32]; int1 auVar7 [32]; int1 auVar8 [32]; int1 auVar9 [32]; int1 auVar10 [32]; long lVar11; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [32]; int1 auVar15 [32]; int1 auVar16 [16]; int1 auVar18 [32]; int1 auVar19 [32]; float fVar20; float fVar21; float fVar22; float fVar23; float fVar24; float fVar25; float fVar26; float fVar27; int1 auVar28 [32]; int1 auVar29 [32]; int1 auVar30 [32]; int1 auVar31 [32]; int1 auVar32 [32]; int1 auVar33 [32]; int1 auVar34 [16]; int1 auVar35 [32]; int1 auVar17 [32]; lVar11 = 0; auVar15[1] = DAT_0014572e; auVar15[0] = DAT_0014572e; auVar15[2] = DAT_0014572e; auVar15[3] = DAT_0014572e; auVar15[4] = DAT_0014572e; auVar15[5] = DAT_0014572e; auVar15[6] = DAT_0014572e; auVar15[7] = DAT_0014572e; auVar15[8] = DAT_0014572e; auVar15[9] = DAT_0014572e; auVar15[10] = DAT_0014572e; auVar15[0xb] = DAT_0014572e; auVar15[0xc] = DAT_0014572e; auVar15[0xd] = DAT_0014572e; auVar15[0xe] = DAT_0014572e; auVar15[0xf] = DAT_0014572e; auVar15[0x10] = DAT_0014572e; auVar15[0x11] = DAT_0014572e; auVar15[0x12] = DAT_0014572e; auVar15[0x13] = DAT_0014572e; auVar15[0x14] = DAT_0014572e; auVar15[0x15] = DAT_0014572e; auVar15[0x16] = DAT_0014572e; auVar15[0x17] = DAT_0014572e; auVar15[0x18] = DAT_0014572e; auVar15[0x19] = DAT_0014572e; auVar15[0x1a] = DAT_0014572e; auVar15[0x1b] = DAT_0014572e; auVar15[0x1c] = DAT_0014572e; auVar15[0x1d] = DAT_0014572e; auVar15[0x1e] = DAT_0014572e; auVar15[0x1f] = DAT_0014572e; auVar16[1] = DAT_0014572f; auVar16[0] = DAT_0014572f; auVar16[2] = DAT_0014572f; auVar16[3] = DAT_0014572f; auVar16[4] = DAT_0014572f; auVar16[5] = DAT_0014572f; auVar16[6] = DAT_0014572f; auVar16[7] = DAT_0014572f; auVar16[8] = DAT_0014572f; auVar16[9] = DAT_0014572f; auVar16[10] = DAT_0014572f; auVar16[0xb] = DAT_0014572f; auVar16[0xc] = DAT_0014572f; auVar16[0xd] = DAT_0014572f; auVar16[0xe] = DAT_0014572f; auVar16[0xf] = DAT_0014572f; auVar17[0x10] = DAT_0014572f; auVar17._0_16_ = auVar16; auVar17[0x11] = DAT_0014572f; auVar17[0x12] = DAT_0014572f; auVar17[0x13] = DAT_0014572f; auVar17[0x14] = DAT_0014572f; auVar17[0x15] = DAT_0014572f; auVar17[0x16] = DAT_0014572f; auVar17[0x17] = DAT_0014572f; auVar17[0x18] = DAT_0014572f; auVar17[0x19] = DAT_0014572f; auVar17[0x1a] = DAT_0014572f; auVar17[0x1b] = DAT_0014572f; auVar17[0x1c] = DAT_0014572f; auVar17[0x1d] = DAT_0014572f; auVar17[0x1e] = DAT_0014572f; auVar17[0x1f] = DAT_0014572f; auVar18[1] = DAT_00145730; auVar18[0] = DAT_00145730; auVar18[2] = DAT_00145730; auVar18[3] = DAT_00145730; auVar18[4] = DAT_00145730; auVar18[5] = DAT_00145730; auVar18[6] = DAT_00145730; auVar18[7] = DAT_00145730; auVar18[8] = DAT_00145730; auVar18[9] = DAT_00145730; auVar18[10] = DAT_00145730; auVar18[0xb] = DAT_00145730; auVar18[0xc] = DAT_00145730; auVar18[0xd] = DAT_00145730; auVar18[0xe] = DAT_00145730; auVar18[0xf] = DAT_00145730; auVar18[0x10] = DAT_00145730; auVar18[0x11] = DAT_00145730; auVar18[0x12] = DAT_00145730; auVar18[0x13] = DAT_00145730; auVar18[0x14] = DAT_00145730; auVar18[0x15] = DAT_00145730; auVar18[0x16] = DAT_00145730; auVar18[0x17] = DAT_00145730; auVar18[0x18] = DAT_00145730; auVar18[0x19] = DAT_00145730; auVar18[0x1a] = DAT_00145730; auVar18[0x1b] = DAT_00145730; auVar18[0x1c] = DAT_00145730; auVar18[0x1d] = DAT_00145730; auVar18[0x1e] = DAT_00145730; auVar18[0x1f] = DAT_00145730; auVar6 = vpmovsxbw_avx2(_DAT_0014e0e0); auVar19._2_2_ = DAT_00145734; auVar19._0_2_ = DAT_00145734; auVar19._4_2_ = DAT_00145734; auVar19._6_2_ = DAT_00145734; auVar19._8_2_ = DAT_00145734; auVar19._10_2_ = DAT_00145734; auVar19._12_2_ = DAT_00145734; auVar19._14_2_ = DAT_00145734; auVar19._16_2_ = DAT_00145734; auVar19._18_2_ = DAT_00145734; auVar19._20_2_ = DAT_00145734; auVar19._22_2_ = DAT_00145734; auVar19._24_2_ = DAT_00145734; auVar19._26_2_ = DAT_00145734; auVar19._28_2_ = DAT_00145734; auVar19._30_2_ = DAT_00145734; auVar28._2_2_ = DAT_00145732; auVar28._0_2_ = DAT_00145732; auVar28._4_2_ = DAT_00145732; auVar28._6_2_ = DAT_00145732; auVar28._8_2_ = DAT_00145732; auVar28._10_2_ = DAT_00145732; auVar28._12_2_ = DAT_00145732; auVar28._14_2_ = DAT_00145732; auVar28._16_2_ = DAT_00145732; auVar28._18_2_ = DAT_00145732; auVar28._20_2_ = DAT_00145732; auVar28._22_2_ = DAT_00145732; auVar28._24_2_ = DAT_00145732; auVar28._26_2_ = DAT_00145732; auVar28._28_2_ = DAT_00145732; auVar28._30_2_ = DAT_00145732; fVar22 = 0.0; fVar23 = 0.0; fVar20 = 0.0; fVar21 = 0.0; fVar24 = 0.0; fVar25 = 0.0; fVar26 = 0.0; fVar27 = 0.0; for (; (ulong)(uint)(~(param_1 / 0x100 >> 0x1f) & param_1 / 0x100) * 0x36 - lVar11 != 0; lVar11 = lVar11 + 0x36) { auVar29 = *(int1 (*) [32])(param_4 + lVar11); auVar32 = vpaddb_avx2(auVar29,auVar29); auVar32 = vpaddb_avx2(auVar32,auVar29); auVar31 = vpsllw_avx2(auVar29,3); auVar31 = vpand_avx2(auVar31,auVar17); auVar31 = vpaddb_avx2(auVar31,auVar29); auVar33 = vpsllw_avx2(auVar32,3); auVar33 = vpand_avx2(auVar33,auVar17); auVar33 = vpaddb_avx2(auVar33,auVar32); auVar35 = vpsllw_avx2(auVar31,3); auVar35 = vpand_avx2(auVar35,auVar17); auVar35 = vpaddb_avx2(auVar35,auVar31); auVar30 = vpsubusb_avx2(auVar29,auVar18); auVar7 = vpsubusb_avx2(auVar32,auVar18); auVar8 = vpsubusb_avx2(auVar31,auVar18); auVar9 = vpsubusb_avx2(auVar33,auVar18); auVar10 = vpsubusb_avx2(auVar35,auVar18); auVar14 = SUB6432(ZEXT1664((int1 [16])0x0),0); auVar29 = vpavgb_avx2(auVar30,auVar14); auVar29 = vpavgb_avx2(auVar30,auVar29); auVar32 = vpavgb_avx2(auVar7,auVar14); auVar32 = vpavgb_avx2(auVar7,auVar32); auVar31 = vpavgb_avx2(auVar8,auVar14); auVar31 = vpavgb_avx2(auVar8,auVar31); auVar33 = vpavgb_avx2(auVar9,auVar14); auVar33 = vpavgb_avx2(auVar9,auVar33); auVar35 = vpavgb_avx2(auVar10,auVar14); auVar35 = vpavgb_avx2(auVar10,auVar35); auVar29 = vpsrlw_avx2(auVar29,6); auVar30 = vpsrlw_avx2(auVar32,6); auVar31 = vpsrlw_avx2(auVar31,6); auVar33 = vpsrlw_avx2(auVar33,6); auVar29 = vpand_avx2(auVar29,auVar15); auVar32 = vpmaddubsw_avx2(auVar29,*(int1 (*) [32])(param_6 + 1)); auVar35 = vpsrlw_avx2(auVar35,6); auVar29 = vpand_avx2(auVar30,auVar15); auVar29 = vpmaddubsw_avx2(auVar29,*(int1 (*) [32])(param_6 + 9)); auVar29 = vpaddw_avx2(auVar29,auVar32); auVar32 = vpand_avx2(auVar31,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x11)); auVar29 = vpaddw_avx2(auVar29,auVar32); auVar32 = vpand_avx2(auVar33,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x19)); auVar29 = vpaddw_avx2(auVar29,auVar32); auVar32 = vpand_avx2(auVar35,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x21)); auVar12 = *(int1 (*) [16])(param_4 + 0x20 + lVar11); auVar29 = vpaddw_avx2(auVar29,auVar32); uVar1 = *(int4 *)(param_4 + 0x30 + lVar11); auVar34._4_4_ = uVar1; auVar34._0_4_ = uVar1; auVar34._8_4_ = uVar1; auVar34._12_4_ = uVar1; auVar32 = vpmovzxbw_avx2(auVar34); auVar32 = vpmullw_avx2(auVar32,auVar6); auVar32 = vpand_avx2(auVar32,auVar19); auVar34 = vpaddb_avx(auVar12,auVar12); auVar13 = vpaddb_avx(auVar34,auVar12); auVar34 = vpsllw_avx(auVar12,3); auVar34 = vpand_avx(auVar34,auVar16); auVar3 = vpaddb_avx(auVar34,auVar12); auVar34 = vpsllw_avx(auVar13,3); auVar34 = vpand_avx(auVar34,auVar16); auVar4 = vpaddb_avx(auVar34,auVar13); auVar34 = vpsllw_avx(auVar3,3); auVar34 = vpand_avx(auVar34,auVar16); auVar5 = vpaddb_avx(auVar34,auVar3); auVar34 = vpackuswb_avx(auVar32._0_16_,auVar32._16_16_); auVar31._0_16_ = ZEXT116(0) * auVar13 + ZEXT116(1) * auVar12; auVar31._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar13; auVar31 = vpsubusb_avx2(auVar31,auVar18); auVar33._0_16_ = ZEXT116(0) * auVar4 + ZEXT116(1) * auVar3; auVar33._16_16_ = ZEXT116(1) * auVar4; auVar33 = vpsubusb_avx2(auVar33,auVar18); auVar32._0_16_ = ZEXT116(0) * auVar34 + ZEXT116(1) * auVar5; auVar32._16_16_ = ZEXT116(1) * auVar34; auVar35 = vpsubusb_avx2(auVar32,auVar18); auVar32 = vpavgb_avx2(auVar31,auVar14); auVar32 = vpavgb_avx2(auVar31,auVar32); auVar31 = vpavgb_avx2(auVar33,auVar14); auVar31 = vpavgb_avx2(auVar33,auVar31); auVar33 = vpavgb_avx2(auVar35,auVar14); auVar33 = vpavgb_avx2(auVar35,auVar33); auVar32 = vpsrlw_avx2(auVar32,6); auVar35 = vpsrlw_avx2(auVar31,6); auVar32 = vpand_avx2(auVar32,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x29)); auVar31 = vpsrlw_avx2(auVar33,6); auVar29 = vpaddw_avx2(auVar29,auVar32); auVar32 = vpand_avx2(auVar35,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x31)); auVar29 = vpaddw_avx2(auVar29,auVar32); auVar32 = vpand_avx2(auVar31,auVar15); auVar32 = vpmaddubsw_avx2(auVar32,*(int1 (*) [32])(param_6 + 0x39)); auVar29 = vpaddw_avx2(auVar29,auVar32); fVar2 = *param_6 * *(float *)(PTR_ggml_table_f32_f16_00156f60 + (ulong)*(ushort *)(param_4 + 0x34 + lVar11) * 4); auVar29 = vpsubw_avx2(auVar29,*(int1 (*) [32])(param_6 + 0x41)); auVar29 = vpmaddwd_avx2(auVar29,auVar28); auVar29 = vcvtdq2ps_avx(auVar29); fVar20 = fVar2 * auVar29._0_4_ + fVar20; fVar21 = fVar2 * auVar29._4_4_ + fVar21; fVar22 = fVar2 * auVar29._8_4_ + fVar22; fVar23 = fVar2 * auVar29._12_4_ + fVar23; fVar24 = fVar2 * auVar29._16_4_ + fVar24; fVar25 = fVar2 * auVar29._20_4_ + fVar25; fVar26 = fVar2 * auVar29._24_4_ + fVar26; fVar27 = auVar29._28_4_ + fVar27; param_6 = param_6 + 0x49; } auVar12._0_4_ = fVar24 + fVar20; auVar12._4_4_ = fVar25 + fVar21; auVar12._8_4_ = fVar26 + fVar22; auVar12._12_4_ = fVar27 + fVar23; auVar16 = vshufpd_avx(auVar12,auVar12,1); auVar13._0_4_ = auVar12._0_4_ + auVar16._0_4_; auVar13._4_4_ = auVar12._4_4_ + auVar16._4_4_; auVar13._8_4_ = auVar12._8_4_ + auVar16._8_4_; auVar13._12_4_ = auVar12._12_4_ + auVar16._12_4_; auVar16 = vhaddps_avx(auVar13,auVar13); *param_2 = auVar16._0_4_; return; }
10,183
alaya::GraphUpdateJob<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>, float, float, unsigned int>::remove(unsigned int)
AlayaLite/include/executor/jobs/graph_update_job.hpp
auto remove(IDType node_id) -> void { auto nbrs = graph_->edges(node_id); for (IDType i = 0; i < graph_->max_nbrs_; i++) { auto nbr = nbrs[i]; if (nbr == -1) { break; } job_context_->removed_node_nbrs_[node_id].push_back(nbr); } job_context_->removed_vertices_.insert(node_id); graph_->remove(node_id); space_->remove(node_id); }
O0
cpp
alaya::GraphUpdateJob<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>, float, float, unsigned int>::remove(unsigned int): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) addq $0x10, %rdi callq 0x1e360 movq %rax, %rdi movl 0x3c(%rsp), %esi callq 0x51640 movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x10(%rsp), %rdi movl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) addq $0x10, %rdi callq 0x1e360 movq %rax, %rcx movl 0xc(%rsp), %eax cmpl 0x4(%rcx), %eax jae 0x585ed movq 0x30(%rsp), %rax movl 0x2c(%rsp), %ecx movl (%rax,%rcx,4), %eax movl %eax, 0x28(%rsp) cmpl $-0x1, 0x28(%rsp) jne 0x585b4 jmp 0x585ed movq 0x10(%rsp), %rdi addq $0x30, %rdi callq 0x58b10 movq %rax, %rdi addq $0x70, %rdi leaq 0x3c(%rsp), %rsi callq 0x5da20 movq %rax, %rdi leaq 0x28(%rsp), %rsi callq 0x35950 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x58579 movq 0x10(%rsp), %rdi addq $0x30, %rdi callq 0x58b10 movq %rax, %rdi addq $0x38, %rdi leaq 0x3c(%rsp), %rsi callq 0x5f060 movq 0x10(%rsp), %rdi movq %rax, 0x18(%rsp) movb %dl, 0x20(%rsp) addq $0x10, %rdi callq 0x1e360 movq %rax, %rdi movl 0x3c(%rsp), %esi callq 0x5fe10 movq 0x10(%rsp), %rdi callq 0x1c550 movq %rax, %rdi movl 0x3c(%rsp), %esi callq 0x5fe40 addq $0x48, %rsp retq nopw (%rax,%rax)
_ZN5alaya14GraphUpdateJobINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE6removeEj: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov rdi, [rsp+48h+var_8] mov [rsp+48h+var_38], rdi add rdi, 10h call _ZNKSt19__shared_ptr_accessIN5alaya5GraphIfjNS0_17SequentialStorageIjjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::Graph<float,uint,alaya::SequentialStorage<uint,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov esi, [rsp+48h+var_C] call _ZN5alaya5GraphIfjNS_17SequentialStorageIjjEEE5edgesEj; alaya::Graph<float,uint,alaya::SequentialStorage<uint,uint>>::edges(uint) mov [rsp+48h+var_18], rax mov [rsp+48h+var_1C], 0 loc_58579: mov rdi, [rsp+48h+var_38] mov eax, [rsp+48h+var_1C] mov [rsp+48h+var_3C], eax add rdi, 10h call _ZNKSt19__shared_ptr_accessIN5alaya5GraphIfjNS0_17SequentialStorageIjjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::Graph<float,uint,alaya::SequentialStorage<uint,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rcx, rax mov eax, [rsp+48h+var_3C] cmp eax, [rcx+4] jnb short loc_585ED mov rax, [rsp+48h+var_18] mov ecx, [rsp+48h+var_1C] mov eax, [rax+rcx*4] mov [rsp+48h+var_20], eax cmp [rsp+48h+var_20], 0FFFFFFFFh jnz short loc_585B4 jmp short loc_585ED loc_585B4: mov rdi, [rsp+48h+var_38] add rdi, 30h ; '0' call _ZNKSt19__shared_ptr_accessIN5alaya10JobContextIjEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::JobContext<uint>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax add rdi, 70h ; 'p' lea rsi, [rsp+48h+var_C] call _ZNSt13unordered_mapIjSt6vectorIjSaIjEESt4hashIjESt8equal_toIjESaISt4pairIKjS2_EEEixERS8_; std::unordered_map<uint,std::vector<uint>>::operator[](uint const&) mov rdi, rax lea rsi, [rsp+48h+var_20] call _ZNSt6vectorIjSaIjEE9push_backERKj; std::vector<uint>::push_back(uint const&) mov eax, [rsp+48h+var_1C] add eax, 1 mov [rsp+48h+var_1C], eax jmp short loc_58579 loc_585ED: mov rdi, [rsp+48h+var_38] add rdi, 30h ; '0' call _ZNKSt19__shared_ptr_accessIN5alaya10JobContextIjEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::JobContext<uint>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax add rdi, 38h ; '8' lea rsi, [rsp+48h+var_C] call _ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj; std::unordered_set<uint>::insert(uint const&) mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_30], rax mov [rsp+48h+var_28], dl add rdi, 10h call _ZNKSt19__shared_ptr_accessIN5alaya5GraphIfjNS0_17SequentialStorageIjjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::Graph<float,uint,alaya::SequentialStorage<uint,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov esi, [rsp+48h+var_C] call _ZN5alaya5GraphIfjNS_17SequentialStorageIjjEEE6removeEj; alaya::Graph<float,uint,alaya::SequentialStorage<uint,uint>>::remove(uint) mov rdi, [rsp+48h+var_38] call _ZNKSt19__shared_ptr_accessIN5alaya8RawSpaceIffjNS0_17SequentialStorageIfjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov esi, [rsp+48h+var_C] call _ZN5alaya8RawSpaceIffjNS_17SequentialStorageIfjEEE6removeEj; alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>::remove(uint) add rsp, 48h retn
long long alaya::GraphUpdateJob<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::remove( long long a1, unsigned int a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax unsigned int v9; // [rsp+Ch] [rbp-3Ch] int v10; // [rsp+28h] [rbp-20h] BYREF unsigned int i; // [rsp+2Ch] [rbp-1Ch] long long v12; // [rsp+30h] [rbp-18h] unsigned int v13; // [rsp+3Ch] [rbp-Ch] BYREF long long v14; // [rsp+40h] [rbp-8h] v14 = a1; v13 = a2; v2 = std::__shared_ptr_access<alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1 + 16); v12 = alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>::edges(v2, a2); for ( i = 0; ; ++i ) { v9 = i; if ( v9 >= *(_DWORD *)(std::__shared_ptr_access<alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1 + 16) + 4) ) break; v10 = *(_DWORD *)(v12 + 4LL * i); if ( v10 == -1 ) break; v3 = std::__shared_ptr_access<alaya::JobContext<unsigned int>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1 + 48); v4 = std::unordered_map<unsigned int,std::vector<unsigned int>>::operator[](v3 + 112, &v13); std::vector<unsigned int>::push_back(v4, (long long)&v10); } v5 = std::__shared_ptr_access<alaya::JobContext<unsigned int>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1 + 48); std::unordered_set<unsigned int>::insert(v5 + 56, &v13); v6 = std::__shared_ptr_access<alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1 + 16); alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>::remove(v6, v13); v7 = std::__shared_ptr_access<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); return alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>::remove(v7, v13); }
remove: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI ADD RDI,0x10 CALL 0x0011e360 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00151640 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_00158579: MOV RDI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX ADD RDI,0x10 CALL 0x0011e360 MOV RCX,RAX MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RCX + 0x4] JNC 0x001585ed MOV RAX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RSP + 0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x28],EAX CMP dword ptr [RSP + 0x28],-0x1 JNZ 0x001585b4 JMP 0x001585ed LAB_001585b4: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x30 CALL 0x00158b10 MOV RDI,RAX ADD RDI,0x70 LEA RSI,[RSP + 0x3c] CALL 0x0015da20 MOV RDI,RAX LEA RSI,[RSP + 0x28] CALL 0x00135950 MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x00158579 LAB_001585ed: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x30 CALL 0x00158b10 MOV RDI,RAX ADD RDI,0x38 LEA RSI,[RSP + 0x3c] CALL 0x0015f060 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV byte ptr [RSP + 0x20],DL ADD RDI,0x10 CALL 0x0011e360 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x3c] CALL 0x0015fe10 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011c550 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x3c] CALL 0x0015fe40 ADD RSP,0x48 RET
/* alaya::GraphUpdateJob<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int> >, float, float, unsigned int>::remove(unsigned int) */ void __thiscall alaya:: GraphUpdateJob<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> ::remove(GraphUpdateJob<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> *this,uint param_1) { uint uVar1; Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>> *pGVar2; long lVar3; vector<unsigned_int,std::allocator<unsigned_int>> *this_00; RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *this_01; uint local_20; uint local_1c; long local_18; uint local_c; GraphUpdateJob<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> *local_8; local_c = param_1; local_8 = this; pGVar2 = (Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>> *) std:: __shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); local_18 = Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>::edges (pGVar2,local_c); local_1c = 0; while ((uVar1 = local_1c, lVar3 = std:: __shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)), uVar1 < *(uint *)(lVar3 + 4) && (local_20 = *(uint *)(local_18 + (ulong)local_1c * 4), local_20 != 0xffffffff))) { lVar3 = std:: __shared_ptr_access<alaya::JobContext<unsigned_int>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::JobContext<unsigned_int>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x30)); this_00 = (vector<unsigned_int,std::allocator<unsigned_int>> *) std:: unordered_map<unsigned_int,std::vector<unsigned_int,std::allocator<unsigned_int>>,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<std::pair<unsigned_int_const,std::vector<unsigned_int,std::allocator<unsigned_int>>>>> ::operator[]((unordered_map<unsigned_int,std::vector<unsigned_int,std::allocator<unsigned_int>>,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<std::pair<unsigned_int_const,std::vector<unsigned_int,std::allocator<unsigned_int>>>>> *)(lVar3 + 0x70),&local_c); std::vector<unsigned_int,std::allocator<unsigned_int>>::push_back(this_00,&local_20); local_1c = local_1c + 1; } lVar3 = std:: __shared_ptr_access<alaya::JobContext<unsigned_int>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::JobContext<unsigned_int>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x30)); std:: unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>> ::insert((unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>> *)(lVar3 + 0x38),&local_c); pGVar2 = (Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>> *) std:: __shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>::remove (pGVar2,local_c); this_01 = (RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *) std:: __shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)this); RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>::remove (this_01,local_c); return; }
10,184
google::protobuf::EnumValueDescriptorProto::SharedCtor(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
inline void EnumValueDescriptorProto::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.name_){} , decltype(_impl_.options_){nullptr} , decltype(_impl_.number_){0} }; _impl_.name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.name_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING }
O0
cpp
google::protobuf::EnumValueDescriptorProto::SharedCtor(google::protobuf::Arena*, bool): subq $0x48, %rsp movb %dl, %al movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) andb $0x1, %al movb %al, 0x2f(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x8(%rsp) addq $0x10, %rax movq %rax, 0x10(%rsp) movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x18(%rsp) movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x18(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x20(%rsp) jne 0x2e1404 movq 0x10(%rsp), %rdi addq $0x4, %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x4, %edx callq 0x8db70 movq (%rsp), %rdi callq 0x1540e0 movq 0x10(%rsp), %rdi addq $0x8, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x8db70 movq 0x10(%rsp), %rax movq 0x8(%rsp), %rdi movq $0x0, 0x10(%rax) movl $0x0, 0x18(%rax) addq $0x10, %rdi addq $0x8, %rdi callq 0x1583d0 addq $0x48, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN6google8protobuf24EnumValueDescriptorProto10SharedCtorEPNS0_5ArenaEb: sub rsp, 48h mov al, dl mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi and al, 1 mov [rsp+48h+var_19], al mov rax, [rsp+48h+var_10] mov [rsp+48h+var_40], rax add rax, 10h mov [rsp+48h+var_38], rax mov [rsp+48h+var_8], rax mov rax, [rsp+48h+var_8] mov rcx, rax add rcx, 4 mov [rsp+48h+var_30], rcx mov [rsp+48h+var_28], rax loc_2E1404: mov rax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_30] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov [rsp+48h+var_28], rax jnz short loc_2E1404 mov rdi, [rsp+48h+var_38] add rdi, 4 mov [rsp+48h+var_48], rdi xor esi, esi mov edx, 4 call _memset mov rdi, [rsp+48h+var_48]; this call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) mov rdi, [rsp+48h+var_38] add rdi, 8 xor esi, esi mov edx, 8 call _memset mov rax, [rsp+48h+var_38] mov rdi, [rsp+48h+var_40] mov qword ptr [rax+10h], 0 mov dword ptr [rax+18h], 0 add rdi, 10h add rdi, 8; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) add rsp, 48h retn
google::protobuf::internal::ArenaStringPtr * google::protobuf::EnumValueDescriptorProto::SharedCtor( google::protobuf::EnumValueDescriptorProto *this, google::protobuf::Arena *a2) { google::protobuf::EnumValueDescriptorProto *v3; // [rsp+20h] [rbp-28h] v3 = (google::protobuf::EnumValueDescriptorProto *)((char *)this + 16); do { *(_DWORD *)v3 = 0; v3 = (google::protobuf::EnumValueDescriptorProto *)((char *)v3 + 4); } while ( v3 != (google::protobuf::EnumValueDescriptorProto *)((char *)this + 20) ); memset((char *)this + 20, 0LL, 4LL); google::protobuf::internal::CachedSize::CachedSize((google::protobuf::EnumValueDescriptorProto *)((char *)this + 20)); memset((char *)this + 24, 0LL, 8LL); *((_QWORD *)this + 4) = 0LL; *((_DWORD *)this + 10) = 0; return google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::EnumValueDescriptorProto *)((char *)this + 24)); }
IsEmpty: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x8] CALL 0x002e1720 MOV RDI,RAX CALL 0x0028dfc0 AND AL,0x1 ADD RSP,0x18 RET
/* google::protobuf::internal::RepeatedFieldWrapper<float>::IsEmpty(void const*) const */ byte __thiscall google::protobuf::internal::RepeatedFieldWrapper<float>::IsEmpty (RepeatedFieldWrapper<float> *this,void *param_1) { RepeatedField<float> *this_00; byte bVar1; this_00 = (RepeatedField<float> *)GetRepeatedField(param_1); bVar1 = RepeatedField<float>::empty(this_00); return bVar1 & 1; }
10,185
spdlog::details::os::is_color_terminal()
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/details/os-inl.h
SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { #ifdef _WIN32 return true; #else static const bool result = []() { const char *env_colorterm_p = std::getenv("COLORTERM"); if (env_colorterm_p != nullptr) { return true; } static constexpr std::array<const char *, 16> terms = {{"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm", "alacritty", "vt102"}}; const char *env_term_p = std::getenv("TERM"); if (env_term_p == nullptr) { return false; } return std::any_of(terms.begin(), terms.end(), [&](const char *term) { return std::strstr(env_term_p, term) != nullptr; }); }(); return result; #endif }
O0
c
spdlog::details::os::is_color_terminal(): pushq %rax cmpb $0x0, 0x90218(%rip) # 0x15c570 jne 0xcc393 leaq 0x9020f(%rip), %rdi # 0x15c570 callq 0x1bb80 cmpl $0x0, %eax je 0xcc393 leaq 0x7(%rsp), %rdi callq 0xcc3b0 movb %al, 0x6(%rsp) jmp 0xcc37b movb 0x6(%rsp), %al andb $0x1, %al movb %al, 0x901e1(%rip) # 0x15c568 leaq 0x901e2(%rip), %rdi # 0x15c570 callq 0x1bb90 movb 0x901cf(%rip), %al # 0x15c568 andb $0x1, %al popq %rcx retq movq %rax, %rdi callq 0x1d880 nopw %cs:(%rax,%rax)
_ZN6spdlog7details2os17is_color_terminalEv: push rax cmp cs:_ZGVZN6spdlog7details2os17is_color_terminalEvE6result, 0; `guard variable for'spdlog::details::os::is_color_terminal(void)::result jnz short loc_CC393 lea rdi, _ZGVZN6spdlog7details2os17is_color_terminalEvE6result; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_CC393 lea rdi, [rsp+8+var_1] call _ZZN6spdlog7details2os17is_color_terminalEvENK3$_0clEv; spdlog::details::os::is_color_terminal(void)::$_0::operator()(void) mov [rsp+8+var_2], al jmp short $+2 loc_CC37B: mov al, [rsp+8+var_2] and al, 1 mov cs:_ZZN6spdlog7details2os17is_color_terminalEvE6result, al; spdlog::details::os::is_color_terminal(void)::result lea rdi, _ZGVZN6spdlog7details2os17is_color_terminalEvE6result; __guard * call ___cxa_guard_release loc_CC393: mov al, cs:_ZZN6spdlog7details2os17is_color_terminalEvE6result; spdlog::details::os::is_color_terminal(void)::result and al, 1 pop rcx retn mov rdi, rax call __clang_call_terminate
char spdlog::details::os::is_color_terminal(spdlog::details::os *this) { long long v1; // rax char v3; // [rsp+1h] [rbp-1h] BYREF v3 = HIBYTE(v1); if ( !(_BYTE)`guard variable for'spdlog::details::os::is_color_terminal(void)::result && __cxa_guard_acquire(&`guard variable for'spdlog::details::os::is_color_terminal(void)::result) ) { spdlog::details::os::is_color_terminal(void)::result = spdlog::details::os::is_color_terminal(void)::$_0::operator()(&v3) & 1; __cxa_guard_release(&`guard variable for'spdlog::details::os::is_color_terminal(void)::result); } return spdlog::details::os::is_color_terminal(void)::result & 1; }
is_color_terminal: PUSH RAX CMP byte ptr [0x0025c570],0x0 JNZ 0x001cc393 LEA RDI,[0x25c570] CALL 0x0011bb80 CMP EAX,0x0 JZ 0x001cc393 LAB_001cc36b: LEA RDI,[RSP + 0x7] CALL 0x001cc3b0 MOV byte ptr [RSP + 0x6],AL JMP 0x001cc37b LAB_001cc37b: MOV AL,byte ptr [RSP + 0x6] AND AL,0x1 MOV byte ptr [0x0025c568],AL LEA RDI,[0x25c570] CALL 0x0011bb90 LAB_001cc393: MOV AL,byte ptr [0x0025c568] AND AL,0x1 POP RCX RET
/* spdlog::details::os::is_color_terminal() */ uint spdlog::details::os::is_color_terminal(void) { byte bVar1; int in_EAX; int4 in_register_00000004; int8 uStack_8; uStack_8 = CONCAT44(in_register_00000004,in_EAX); if (is_color_terminal()::result == '\0') { in_EAX = __cxa_guard_acquire(&is_color_terminal()::result); if (in_EAX != 0) { /* try { // try from 001cc36b to 001cc374 has its CatchHandler @ 001cc39d */ bVar1 = is_color_terminal()::$_0::operator()((__0 *)((long)&uStack_8 + 7)); uStack_8._0_7_ = CONCAT16(bVar1,(int6)uStack_8); is_color_terminal()::result = bVar1 & 1; in_EAX = __cxa_guard_release(&is_color_terminal()::result); } } return CONCAT31((int3)((uint)in_EAX >> 8),is_color_terminal()::result) & 0xffffff01; }
10,186
spdlog::details::os::is_color_terminal()
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/details/os-inl.h
SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { #ifdef _WIN32 return true; #else static const bool result = []() { const char *env_colorterm_p = std::getenv("COLORTERM"); if (env_colorterm_p != nullptr) { return true; } static constexpr std::array<const char *, 16> terms = {{"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm", "alacritty", "vt102"}}; const char *env_term_p = std::getenv("TERM"); if (env_term_p == nullptr) { return false; } return std::any_of(terms.begin(), terms.end(), [&](const char *term) { return std::strstr(env_term_p, term) != nullptr; }); }(); return result; #endif }
O3
c
spdlog::details::os::is_color_terminal(): movb 0x24b5c(%rip), %al # 0x5e6e0 testb %al, %al je 0x39b8f movb 0x24b4a(%rip), %al # 0x5e6d8 retq pushq %rax callq 0xb592 addq $0x8, %rsp jmp 0x39b88 nop
_ZN6spdlog7details2os17is_color_terminalEv: mov al, cs:_ZGVZN6spdlog7details2os17is_color_terminalEvE6result; `guard variable for'spdlog::details::os::is_color_terminal(void)::result test al, al jz short loc_39B8F loc_39B88: mov al, cs:_ZZN6spdlog7details2os17is_color_terminalEvE6result; spdlog::details::os::is_color_terminal(void)::result retn loc_39B8F: push rax call _ZN6spdlog7details2os17is_color_terminalEv_cold_1; spdlog::details::os::is_color_terminal(void) [clone] add rsp, 8 jmp short loc_39B88
char spdlog::details::os::is_color_terminal(spdlog::details::os *this) { if ( !(_BYTE)`guard variable for'spdlog::details::os::is_color_terminal(void)::result ) spdlog::details::os::is_color_terminal(); return spdlog::details::os::is_color_terminal(void)::result; }
is_color_terminal: MOV AL,byte ptr [0x0015e6e0] TEST AL,AL JZ 0x00139b8f LAB_00139b88: MOV AL,byte ptr [0x0015e6d8] RET LAB_00139b8f: PUSH RAX CALL 0x0010b592 ADD RSP,0x8 JMP 0x00139b88
/* spdlog::details::os::is_color_terminal() */ int1 spdlog::details::os::is_color_terminal(void) { if (is_color_terminal()::result == '\0') { is_color_terminal(); } return is_color_terminal()::result; }
10,187
translog_only_in_buffers
eloqsql/storage/maria/ma_loghandler.c
static TRANSLOG_ADDRESS translog_only_in_buffers() { register TRANSLOG_ADDRESS addr; DBUG_ENTER("translog_only_in_buffers"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); addr= log_descriptor.in_buffers_only; mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_RETURN(addr); }
O3
c
translog_only_in_buffers: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax cmpq $0x0, 0xbcc9ac(%rip) # 0xc07e80 jne 0x3b50b leaq 0xbcc963(%rip), %rdi # 0xc07e40 callq 0x2a220 movq 0xbcc94f(%rip), %rbx # 0xc07e38 movq 0xbcc990(%rip), %rdi # 0xc07e80 testq %rdi, %rdi jne 0x3b512 leaq 0xbcc944(%rip), %rdi # 0xc07e40 callq 0x2a1e0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x2d200 jmp 0x3b4e2 leaq 0x353d3f(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x160(%rax) jmp 0x3b4f5
translog_only_in_buffers: push rbp mov rbp, rsp push rbx push rax cmp cs:qword_C07E80, 0 jnz short loc_3B50B lea rdi, unk_C07E40 call _pthread_mutex_lock loc_3B4E2: mov rbx, cs:qword_C07E38 mov rdi, cs:qword_C07E80 test rdi, rdi jnz short loc_3B512 loc_3B4F5: lea rdi, unk_C07E40 call _pthread_mutex_unlock mov rax, rbx add rsp, 8 pop rbx pop rbp retn loc_3B50B: call translog_only_in_buffers_cold_1 jmp short loc_3B4E2 loc_3B512: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3B4F5
long long translog_only_in_buffers(long long a1) { long long v1; // rbx if ( qword_C07E80 ) translog_only_in_buffers_cold_1(a1); else pthread_mutex_lock(&unk_C07E40); v1 = qword_C07E38; if ( qword_C07E80 ) ((void ( *)(long long))PSI_server[44])(qword_C07E80); pthread_mutex_unlock(&unk_C07E40); return v1; }
translog_only_in_buffers: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CMP qword ptr [0x00d07e80],0x0 JNZ 0x0013b50b LEA RDI,[0xd07e40] CALL 0x0012a220 LAB_0013b4e2: MOV RBX,qword ptr [0x00d07e38] MOV RDI,qword ptr [0x00d07e80] TEST RDI,RDI JNZ 0x0013b512 LAB_0013b4f5: LEA RDI,[0xd07e40] CALL 0x0012a1e0 MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET LAB_0013b50b: CALL 0x0012d200 JMP 0x0013b4e2 LAB_0013b512: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013b4f5
int8 translog_only_in_buffers(void) { int8 uVar1; if (DAT_00d07e80 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d07e40); } else { translog_only_in_buffers_cold_1(); } uVar1 = DAT_00d07e38; if (DAT_00d07e80 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d07e40); return uVar1; }
10,188
google::protobuf::io::StringOutputStream::ByteCount() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
int64_t StringOutputStream::ByteCount() const { GOOGLE_CHECK(target_ != NULL); return target_->size(); }
O3
cpp
google::protobuf::io::StringOutputStream::ByteCount() const: pushq %r14 pushq %rbx subq $0x48, %rsp movq 0x8(%rdi), %rax testq %rax, %rax jne 0xfc7f7 movq %rdi, %rbx leaq 0xefc99(%rip), %rdx # 0x1ec44f leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0xaf, %ecx callq 0x1072ba leaq 0xefde2(%rip), %rsi # 0x1ec5b6 movq %r14, %rdi callq 0x106db8 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x10(%rsp), %rdi callq 0x1072d8 movq 0x8(%rbx), %rax movq 0x8(%rax), %rax addq $0x48, %rsp popq %rbx popq %r14 retq jmp 0xfc805 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1072d8 movq %rbx, %rdi callq 0x1f860
_ZNK6google8protobuf2io18StringOutputStream9ByteCountEv: push r14 push rbx sub rsp, 48h mov rax, [rdi+8] test rax, rax jnz short loc_FC7F7 mov rbx, rdi lea rdx, aWorkspaceLlm4b_51; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+58h+var_48] mov rdi, r14 mov esi, 3 mov ecx, 0AFh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedTar_0; "CHECK failed: target_ != NULL: " mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_49] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rax, [rbx+8] loc_FC7F7: mov rax, [rax+8] add rsp, 48h pop rbx pop r14 retn jmp short $+2 loc_FC805: mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
long long google::protobuf::io::StringOutputStream::ByteCount(google::protobuf::io::StringOutputStream *this) { long long v1; // rax long long v2; // rax char v4; // [rsp+Fh] [rbp-49h] BYREF _BYTE v5[72]; // [rsp+10h] [rbp-48h] BYREF v1 = *((_QWORD *)this + 1); if ( !v1 ) { google::protobuf::internal::LogMessage::LogMessage( v5, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 175LL); v2 = google::protobuf::internal::LogMessage::operator<<(v5, "CHECK failed: target_ != NULL: "); google::protobuf::internal::LogFinisher::operator=(&v4, v2); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v5); v1 = *((_QWORD *)this + 1); } return *(_QWORD *)(v1 + 8); }
ByteCount: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr [RDI + 0x8] TEST RAX,RAX JNZ 0x001fc7f7 MOV RBX,RDI LEA RDX,[0x2ec44f] LEA R14,[RSP + 0x10] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0xaf CALL 0x002072ba LAB_001fc7cd: LEA RSI,[0x2ec5b6] MOV RDI,R14 CALL 0x00206db8 LAB_001fc7dc: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x00206e92 LAB_001fc7e9: LEA RDI,[RSP + 0x10] CALL 0x002072d8 MOV RAX,qword ptr [RBX + 0x8] LAB_001fc7f7: MOV RAX,qword ptr [RAX + 0x8] ADD RSP,0x48 POP RBX POP R14 RET
/* google::protobuf::io::StringOutputStream::ByteCount() const */ int8 __thiscall google::protobuf::io::StringOutputStream::ByteCount(StringOutputStream *this) { LogMessage *pLVar1; long lVar2; LogFinisher local_49; LogMessage local_48 [56]; lVar2 = *(long *)(this + 8); if (lVar2 == 0) { internal::LogMessage::LogMessage (local_48,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc" ,0xaf); /* try { // try from 001fc7cd to 001fc7db has its CatchHandler @ 001fc805 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_48,"CHECK failed: target_ != NULL: "); /* try { // try from 001fc7dc to 001fc7e8 has its CatchHandler @ 001fc803 */ internal::LogFinisher::operator=(&local_49,pLVar1); internal::LogMessage::~LogMessage(local_48); lVar2 = *(long *)(this + 8); } return *(int8 *)(lVar2 + 8); }
10,189
ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short)
serhmarch[P]ModbusBridge/modbus/src/ModbusTcpPort.cpp
StatusCode ModbusTcpPort::writeBuffer(uint8_t unit, uint8_t func, uint8_t *buff, uint16_t szInBuff) { ModbusTcpPortPrivate *d = d_ModbusTcpPort(d_ptr); if (!d->modeServer) { d->transaction += d->autoIncrement; d->autoIncrement = true; } // if (!d->modeServer) // 8 = 6(TCP prefix size in bytes) + 2(unit and function bytes) if (szInBuff > MBCLIENTTCP_BUFF_SZ - 8) return d->setError(Status_BadWriteBufferOverflow, StringLiteral("TCP. Write-buffer overflow")); // standart TCP message prefix d->buff[0] = static_cast<uint8_t>(d->transaction >> 8); // transaction id d->buff[1] = static_cast<uint8_t>(d->transaction); // transaction id d->buff[2] = 0; d->buff[3] = 0; uint16_t cBytes = szInBuff + 2; // quantity of next bytes d->buff[4] = reinterpret_cast<uint8_t*>(&cBytes)[1]; // quantity of next bytes (MSB) d->buff[5] = reinterpret_cast<uint8_t*>(&cBytes)[0]; // quantity of next bytes (LSB) // unit, function, data d->buff[6] = unit; d->buff[7] = func; memcpy(&d->buff[8], buff, szInBuff); d->sz = szInBuff + 8; return Status_Good; }
O2
cpp
ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short): pushq %r14 pushq %rbx subq $0x28, %rsp movl %r8d, %r14d movq 0x8(%rdi), %rbx cmpb $0x0, 0xd(%rbx) jne 0x961a movzbl 0x68(%rbx), %eax addw %ax, 0x6a(%rbx) movb $0x1, 0x68(%rbx) cmpw $0x105, %r14w # imm = 0x105 jb 0x9662 leaq 0x9608(%rip), %rsi # 0x12c31 leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x8b48 movl $0x1000104, 0x10(%rbx) # imm = 0x1000104 addq $0x18, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x51e0 leaq 0x8(%rsp), %rdi callq 0x5190 movl $0x1000104, %eax # imm = 0x1000104 jmp 0x969f movzwl 0x6a(%rbx), %eax movb %ah, 0x6c(%rbx) movb %al, 0x6d(%rbx) andw $0x0, 0x6e(%rbx) leal 0x2(%r14), %eax movb %ah, 0x70(%rbx) movb %al, 0x71(%rbx) movb %sil, 0x72(%rbx) movb %dl, 0x73(%rbx) leaq 0x74(%rbx), %rdi movzwl %r14w, %edx movq %rcx, %rsi callq 0x52b0 leal 0x8(%r14), %eax movw %ax, 0x178(%rbx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5190 movq %rbx, %rdi callq 0x5570
_ZN13ModbusTcpPort11writeBufferEhhPht: push r14 push rbx sub rsp, 28h mov r14d, r8d mov rbx, [rdi+8] cmp byte ptr [rbx+0Dh], 0 jnz short loc_961A movzx eax, byte ptr [rbx+68h] add [rbx+6Ah], ax mov byte ptr [rbx+68h], 1 loc_961A: cmp r14w, 105h jb short loc_9662 lea rsi, aTcpWriteBuffer; "TCP. Write-buffer overflow" lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov dword ptr [rbx+10h], 1000104h add rbx, 18h mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+38h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, 1000104h jmp short loc_969F loc_9662: movzx eax, word ptr [rbx+6Ah] mov [rbx+6Ch], ah mov [rbx+6Dh], al and word ptr [rbx+6Eh], 0 lea eax, [r14+2] mov [rbx+70h], ah mov [rbx+71h], al mov [rbx+72h], sil mov [rbx+73h], dl lea rdi, [rbx+74h] movzx edx, r14w mov rsi, rcx call _memcpy lea eax, [r14+8] mov [rbx+178h], ax xor eax, eax loc_969F: add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long ModbusTcpPort::writeBuffer( ModbusTcpPort *this, char a2, char a3, unsigned __int8 *a4, unsigned __int16 a5) { long long v6; // rbx __int16 v8; // ax _QWORD v9[6]; // [rsp+8h] [rbp-30h] BYREF v6 = *((_QWORD *)this + 1); if ( !*(_BYTE *)(v6 + 13) ) { *(_WORD *)(v6 + 106) += *(unsigned __int8 *)(v6 + 104); *(_BYTE *)(v6 + 104) = 1; } if ( a5 < 0x105u ) { v8 = *(_WORD *)(v6 + 106); *(_BYTE *)(v6 + 108) = HIBYTE(v8); *(_BYTE *)(v6 + 109) = v8; *(_WORD *)(v6 + 110) = 0; *(_BYTE *)(v6 + 112) = (unsigned __int16)(a5 + 2) >> 8; *(_BYTE *)(v6 + 113) = a5 + 2; *(_BYTE *)(v6 + 114) = a2; *(_BYTE *)(v6 + 115) = a3; memcpy(v6 + 116, a4, a5); *(_WORD *)(v6 + 376) = a5 + 8; return 0LL; } else { std::string::basic_string<std::allocator<char>>(v9, (long long)"TCP. Write-buffer overflow"); *(_DWORD *)(v6 + 16) = 16777476; std::string::_M_assign(v6 + 24, v9); std::string::~string(v9); return 16777476LL; } }
writeBuffer: PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14D,R8D MOV RBX,qword ptr [RDI + 0x8] CMP byte ptr [RBX + 0xd],0x0 JNZ 0x0010961a MOVZX EAX,byte ptr [RBX + 0x68] ADD word ptr [RBX + 0x6a],AX MOV byte ptr [RBX + 0x68],0x1 LAB_0010961a: CMP R14W,0x105 JC 0x00109662 LEA RSI,[0x112c31] LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x00108b48 MOV dword ptr [RBX + 0x10],0x1000104 ADD RBX,0x18 LAB_00109646: MOV RDI,RBX MOV RSI,R14 CALL 0x001051e0 LAB_00109651: LEA RDI,[RSP + 0x8] CALL 0x00105190 MOV EAX,0x1000104 JMP 0x0010969f LAB_00109662: MOVZX EAX,word ptr [RBX + 0x6a] MOV byte ptr [RBX + 0x6c],AH MOV byte ptr [RBX + 0x6d],AL AND word ptr [RBX + 0x6e],0x0 LEA EAX,[R14 + 0x2] MOV byte ptr [RBX + 0x70],AH MOV byte ptr [RBX + 0x71],AL MOV byte ptr [RBX + 0x72],SIL MOV byte ptr [RBX + 0x73],DL LEA RDI,[RBX + 0x74] MOVZX EDX,R14W MOV RSI,RCX CALL 0x001052b0 LEA EAX,[R14 + 0x8] MOV word ptr [RBX + 0x178],AX XOR EAX,EAX LAB_0010969f: ADD RSP,0x28 POP RBX POP R14 RET
/* ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short) */ int8 __thiscall ModbusTcpPort::writeBuffer (ModbusTcpPort *this,uchar param_1,uchar param_2,uchar *param_3,ushort param_4) { long lVar1; int8 uVar2; allocator local_31; string local_30 [32]; lVar1 = *(long *)(this + 8); if (*(char *)(lVar1 + 0xd) == '\0') { *(short *)(lVar1 + 0x6a) = *(short *)(lVar1 + 0x6a) + (ushort)*(byte *)(lVar1 + 0x68); *(int1 *)(lVar1 + 0x68) = 1; } if (param_4 < 0x105) { *(char *)(lVar1 + 0x6c) = (char)((ushort)*(int2 *)(lVar1 + 0x6a) >> 8); *(char *)(lVar1 + 0x6d) = (char)*(int2 *)(lVar1 + 0x6a); *(int2 *)(lVar1 + 0x6e) = 0; *(char *)(lVar1 + 0x70) = (char)(param_4 + 2 >> 8); *(char *)(lVar1 + 0x71) = (char)(param_4 + 2); *(uchar *)(lVar1 + 0x72) = param_1; *(uchar *)(lVar1 + 0x73) = param_2; memcpy((void *)(lVar1 + 0x74),param_3,(ulong)param_4); *(ushort *)(lVar1 + 0x178) = param_4 + 8; uVar2 = 0; } else { std::__cxx11::string::string<std::allocator<char>> (local_30,"TCP. Write-buffer overflow",&local_31); *(int4 *)(lVar1 + 0x10) = 0x1000104; /* try { // try from 00109646 to 00109650 has its CatchHandler @ 001096a7 */ std::__cxx11::string::_M_assign((string *)(lVar1 + 0x18)); std::__cxx11::string::~string(local_30); uVar2 = 0x1000104; } return uVar2; }
10,190
ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short)
serhmarch[P]ModbusBridge/modbus/src/ModbusTcpPort.cpp
StatusCode ModbusTcpPort::writeBuffer(uint8_t unit, uint8_t func, uint8_t *buff, uint16_t szInBuff) { ModbusTcpPortPrivate *d = d_ModbusTcpPort(d_ptr); if (!d->modeServer) { d->transaction += d->autoIncrement; d->autoIncrement = true; } // if (!d->modeServer) // 8 = 6(TCP prefix size in bytes) + 2(unit and function bytes) if (szInBuff > MBCLIENTTCP_BUFF_SZ - 8) return d->setError(Status_BadWriteBufferOverflow, StringLiteral("TCP. Write-buffer overflow")); // standart TCP message prefix d->buff[0] = static_cast<uint8_t>(d->transaction >> 8); // transaction id d->buff[1] = static_cast<uint8_t>(d->transaction); // transaction id d->buff[2] = 0; d->buff[3] = 0; uint16_t cBytes = szInBuff + 2; // quantity of next bytes d->buff[4] = reinterpret_cast<uint8_t*>(&cBytes)[1]; // quantity of next bytes (MSB) d->buff[5] = reinterpret_cast<uint8_t*>(&cBytes)[0]; // quantity of next bytes (LSB) // unit, function, data d->buff[6] = unit; d->buff[7] = func; memcpy(&d->buff[8], buff, szInBuff); d->sz = szInBuff + 8; return Status_Good; }
O3
cpp
ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq 0x8(%rdi), %rbx cmpb $0x0, 0xd(%rbx) jne 0x9e6d movzbl 0x68(%rbx), %eax addw %ax, 0x6a(%rbx) movb $0x1, 0x68(%rbx) movzwl %r8w, %r14d cmpl $0x105, %r14d # imm = 0x105 jb 0x9ecf leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xeda6(%rip), %rsi # 0x18c30 leaq 0xedb9(%rip), %rdx # 0x18c4a movq %rsp, %r14 movq %r14, %rdi callq 0x92a8 movl $0x1000104, 0x10(%rbx) # imm = 0x1000104 addq $0x18, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x51c0 movq (%rsp), %rdi cmpq %r15, %rdi je 0x9ec8 movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 movl $0x1000104, %eax # imm = 0x1000104 jmp 0x9f0c movzwl 0x6a(%rbx), %eax movb %ah, 0x6c(%rbx) movb %al, 0x6d(%rbx) movw $0x0, 0x6e(%rbx) leal 0x2(%r14), %eax movb %ah, 0x70(%rbx) movb %al, 0x71(%rbx) movb %sil, 0x72(%rbx) movb %dl, 0x73(%rbx) leaq 0x74(%rbx), %rdi movq %rcx, %rsi movq %r14, %rdx callq 0x52a0 leal 0x8(%r14), %eax movw %ax, 0x178(%rbx) xorl %eax, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x9f2f movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 movq %rbx, %rdi callq 0x5550 nop
_ZN13ModbusTcpPort11writeBufferEhhPht: push r15 push r14 push rbx sub rsp, 20h mov rbx, [rdi+8] cmp byte ptr [rbx+0Dh], 0 jnz short loc_9E6D movzx eax, byte ptr [rbx+68h] add [rbx+6Ah], ax mov byte ptr [rbx+68h], 1 loc_9E6D: movzx r14d, r8w cmp r14d, 105h jb short loc_9ECF lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aTcpWriteBuffer; "TCP. Write-buffer overflow" lea rdx, aTcpWriteBuffer+1Ah; "" mov r14, rsp mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov dword ptr [rbx+10h], 1000104h add rbx, 18h mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+38h+var_38]; void * cmp rdi, r15 jz short loc_9EC8 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9EC8: mov eax, 1000104h jmp short loc_9F0C loc_9ECF: movzx eax, word ptr [rbx+6Ah] mov [rbx+6Ch], ah mov [rbx+6Dh], al mov word ptr [rbx+6Eh], 0 lea eax, [r14+2] mov [rbx+70h], ah mov [rbx+71h], al mov [rbx+72h], sil mov [rbx+73h], dl lea rdi, [rbx+74h] mov rsi, rcx mov rdx, r14 call _memcpy lea eax, [r14+8] mov [rbx+178h], ax xor eax, eax loc_9F0C: add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_9F2F mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9F2F: mov rdi, rbx call __Unwind_Resume
long long ModbusTcpPort::writeBuffer( ModbusTcpPort *this, char a2, char a3, unsigned __int8 *a4, unsigned __int16 a5) { long long v5; // rbx __int16 v8; // ax void *v9[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v10[5]; // [rsp+10h] [rbp-28h] BYREF v5 = *((_QWORD *)this + 1); if ( !*(_BYTE *)(v5 + 13) ) { *(_WORD *)(v5 + 106) += *(unsigned __int8 *)(v5 + 104); *(_BYTE *)(v5 + 104) = 1; } if ( a5 < 0x105u ) { v8 = *(_WORD *)(v5 + 106); *(_BYTE *)(v5 + 108) = HIBYTE(v8); *(_BYTE *)(v5 + 109) = v8; *(_WORD *)(v5 + 110) = 0; *(_BYTE *)(v5 + 112) = (unsigned __int16)(a5 + 2) >> 8; *(_BYTE *)(v5 + 113) = a5 + 2; *(_BYTE *)(v5 + 114) = a2; *(_BYTE *)(v5 + 115) = a3; memcpy(v5 + 116, a4, a5); *(_WORD *)(v5 + 376) = a5 + 8; return 0LL; } else { v9[0] = v10; std::string::_M_construct<char const*>((long long)v9, "TCP. Write-buffer overflow", (long long)""); *(_DWORD *)(v5 + 16) = 16777476; std::string::_M_assign(v5 + 24, v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return 16777476LL; } }
writeBuffer: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,qword ptr [RDI + 0x8] CMP byte ptr [RBX + 0xd],0x0 JNZ 0x00109e6d MOVZX EAX,byte ptr [RBX + 0x68] ADD word ptr [RBX + 0x6a],AX MOV byte ptr [RBX + 0x68],0x1 LAB_00109e6d: MOVZX R14D,R8W CMP R14D,0x105 JC 0x00109ecf LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x118c30] LEA RDX,[0x118c4a] MOV R14,RSP MOV RDI,R14 CALL 0x001092a8 MOV dword ptr [RBX + 0x10],0x1000104 ADD RBX,0x18 LAB_00109ea7: MOV RDI,RBX MOV RSI,R14 CALL 0x001051c0 LAB_00109eb2: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x00109ec8 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105310 LAB_00109ec8: MOV EAX,0x1000104 JMP 0x00109f0c LAB_00109ecf: MOVZX EAX,word ptr [RBX + 0x6a] MOV byte ptr [RBX + 0x6c],AH MOV byte ptr [RBX + 0x6d],AL MOV word ptr [RBX + 0x6e],0x0 LEA EAX,[R14 + 0x2] MOV byte ptr [RBX + 0x70],AH MOV byte ptr [RBX + 0x71],AL MOV byte ptr [RBX + 0x72],SIL MOV byte ptr [RBX + 0x73],DL LEA RDI,[RBX + 0x74] MOV RSI,RCX MOV RDX,R14 CALL 0x001052a0 LEA EAX,[R14 + 0x8] MOV word ptr [RBX + 0x178],AX XOR EAX,EAX LAB_00109f0c: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* ModbusTcpPort::writeBuffer(unsigned char, unsigned char, unsigned char*, unsigned short) */ int8 __thiscall ModbusTcpPort::writeBuffer (ModbusTcpPort *this,uchar param_1,uchar param_2,uchar *param_3,ushort param_4) { long lVar1; int8 uVar2; long *local_38 [2]; long local_28 [2]; lVar1 = *(long *)(this + 8); if (*(char *)(lVar1 + 0xd) == '\0') { *(short *)(lVar1 + 0x6a) = *(short *)(lVar1 + 0x6a) + (ushort)*(byte *)(lVar1 + 0x68); *(int1 *)(lVar1 + 0x68) = 1; } if (param_4 < 0x105) { *(char *)(lVar1 + 0x6c) = (char)((ushort)*(int2 *)(lVar1 + 0x6a) >> 8); *(char *)(lVar1 + 0x6d) = (char)*(int2 *)(lVar1 + 0x6a); *(int2 *)(lVar1 + 0x6e) = 0; *(char *)(lVar1 + 0x70) = (char)(param_4 + 2 >> 8); *(char *)(lVar1 + 0x71) = (char)(param_4 + 2); *(uchar *)(lVar1 + 0x72) = param_1; *(uchar *)(lVar1 + 0x73) = param_2; memcpy((void *)(lVar1 + 0x74),param_3,(ulong)param_4); *(ushort *)(lVar1 + 0x178) = param_4 + 8; uVar2 = 0; } else { local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*>(local_38,"TCP. Write-buffer overflow",""); *(int4 *)(lVar1 + 0x10) = 0x1000104; /* try { // try from 00109ea7 to 00109eb1 has its CatchHandler @ 00109f16 */ std::__cxx11::string::_M_assign((string *)(lVar1 + 0x18)); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } uVar2 = 0x1000104; } return uVar2; }
10,191
ma_log_key_middle
eloqsql/storage/maria/ma_write.c
static my_bool _ma_log_key_middle(MARIA_PAGE *ma_page, uint new_length, uint data_added_first, uint data_changed_first, uint data_deleted_last, const uchar *key_pos, uint key_length, int move_length) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 3+5+3+3+3 + 7]; uchar *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6]; uint key_offset; uint translog_parts, extra_length; MARIA_HA *info= ma_page->info; my_off_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_key_middle"); DBUG_PRINT("enter", ("page: %lu", (ulong) page)); DBUG_ASSERT(ma_page->size == new_length); /* new place of key after changes */ key_pos+= data_added_first; key_offset= (uint) (key_pos - ma_page->buff); if (key_offset < new_length) { /* key is on page; Calculate how much of the key is there */ uint max_key_length= new_length - key_offset; if (max_key_length < key_length) { /* Key is last on page */ key_length= max_key_length; move_length= 0; } /* Take into account that new data was added as part of original key that also needs to be removed from page */ data_deleted_last+= move_length; } /* First log changes to page */ log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; #ifdef EXTRA_DEBUG_KEY_CHANGES *log_pos++= KEY_OP_DEBUG; *log_pos++= KEY_OP_DEBUG_LOG_MIDDLE; #endif /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff); log_pos[0]= KEY_OP_DEL_SUFFIX; int2store(log_pos+1, data_deleted_last); log_pos+= 3; log_pos[0]= KEY_OP_ADD_PREFIX; int2store(log_pos+1, data_added_first); int2store(log_pos+3, data_changed_first); log_pos+= 5; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (ma_page->buff + info->s->keypage_header); log_array[TRANSLOG_INTERNAL_PARTS + 1].length= data_changed_first; translog_parts= 2; extra_length= data_changed_first; /* If changed key is on page, log those changes too */ if (key_offset < new_length) { uchar *start_log_pos= log_pos; log_pos[0]= KEY_OP_OFFSET; int2store(log_pos+1, key_offset); log_pos+= 3; if (move_length) { log_pos[0]= KEY_OP_SHIFT; int2store(log_pos+1, move_length); log_pos+= 3; } log_pos[0]= KEY_OP_CHANGE; int2store(log_pos+1, key_length); log_pos+= 3; log_array[TRANSLOG_INTERNAL_PARTS + 2].str= start_log_pos; log_array[TRANSLOG_INTERNAL_PARTS + 2].length= (uint) (log_pos - start_log_pos); log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_pos; log_array[TRANSLOG_INTERNAL_PARTS + 3].length= key_length; translog_parts+=2; extra_length+= (uint) (log_array[TRANSLOG_INTERNAL_PARTS + 2].length + key_length); } _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) (log_array[TRANSLOG_INTERNAL_PARTS + 0].length + extra_length), TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O0
c
ma_log_key_middle: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x38(%rbp) movl %esi, -0x3c(%rbp) movl %edx, -0x40(%rbp) movl %ecx, -0x44(%rbp) movl %r8d, -0x48(%rbp) movq %r9, -0x50(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0xf8(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq -0xf8(%rbp), %rcx movq (%rcx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x100(%rbp) jmp 0x6be07 jmp 0x6be09 jmp 0x6be0b movl -0x40(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movl %eax, -0xe4(%rbp) movl -0xe4(%rbp), %eax cmpl -0x3c(%rbp), %eax jae 0x6be6e movl -0x3c(%rbp), %eax subl -0xe4(%rbp), %eax movl %eax, -0x104(%rbp) movl -0x104(%rbp), %eax cmpl 0x10(%rbp), %eax jae 0x6be65 movl -0x104(%rbp), %eax movl %eax, 0x10(%rbp) movl $0x0, 0x18(%rbp) movl 0x18(%rbp), %eax addl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) leaq -0x30(%rbp), %rax addq $0x2, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x100(%rbp), %rax movl %eax, %ecx movq -0x110(%rbp), %rax movl %ecx, (%rax) movq -0x100(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x110(%rbp), %rax movb %cl, 0x4(%rax) movq -0x60(%rbp), %rax addq $0x5, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0xa, (%rax) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq -0xf8(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb (%rax,%rcx), %cl movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %cl, (%rax) movq -0x60(%rbp), %rax movb $0x7, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x118(%rbp) movl -0x48(%rbp), %eax movw %ax, %cx movq -0x118(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movb $0x4, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x120(%rbp) movl -0x40(%rbp), %eax movw %ax, %cx movq -0x120(%rbp), %rax movw %cx, (%rax) jmp 0x6bf5a movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x128(%rbp) movl -0x44(%rbp), %eax movw %ax, %cx movq -0x128(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x5, %rax movq %rax, -0x60(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x60(%rbp), %rax leaq -0x30(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movq %rax, -0xb8(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq -0xf8(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movq %rax, -0xb0(%rbp) movl -0x44(%rbp), %eax movq %rax, -0xa8(%rbp) movl $0x2, -0xe8(%rbp) movl -0x44(%rbp), %eax movl %eax, -0xec(%rbp) movl -0xe4(%rbp), %eax cmpl -0x3c(%rbp), %eax jae 0x6c0fe movq -0x60(%rbp), %rax movq %rax, -0x130(%rbp) movq -0x60(%rbp), %rax movb $0x1, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x138(%rbp) movl -0xe4(%rbp), %eax movw %ax, %cx movq -0x138(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) cmpl $0x0, 0x18(%rbp) je 0x6c06a movq -0x60(%rbp), %rax movb $0x2, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x140(%rbp) movl 0x18(%rbp), %eax movw %ax, %cx movq -0x140(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movb $0x3, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x148(%rbp) movl 0x10(%rbp), %eax movw %ax, %cx movq -0x148(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x3, %rax movq %rax, -0x60(%rbp) movq -0x130(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x60(%rbp), %rax movq -0x130(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movq %rax, -0x98(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x90(%rbp) movl 0x10(%rbp), %eax movq %rax, -0x88(%rbp) movl -0xe8(%rbp), %eax addl $0x2, %eax movl %eax, -0xe8(%rbp) movq -0x98(%rbp), %rax movl 0x10(%rbp), %ecx addq %rcx, %rax addl -0xec(%rbp), %eax movl %eax, -0xec(%rbp) movq -0x38(%rbp), %rax movl 0x20(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x24(%rax) movq -0xf8(%rbp), %rax movq 0x8(%rax), %rdx movq -0xf8(%rbp), %rcx movq -0xb8(%rbp), %rax movl -0xec(%rbp), %esi addq %rsi, %rax movl %eax, %r8d movl -0xe8(%rbp), %r9d addl $0x2, %r9d leaq -0xe0(%rbp), %r10 leaq -0x30(%rbp), %rax leaq -0x58(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e50 movb %al, -0x149(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6c191 movb -0x149(%rbp), %al addq $0x170, %rsp # imm = 0x170 popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
_ma_log_key_middle: push rbp mov rbp, rsp sub rsp, 170h mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov [rbp+var_44], ecx mov [rbp+var_48], r8d mov [rbp+var_50], r9 mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_F8], rax mov rax, [rbp+var_38] mov rax, [rax+18h] mov rcx, [rbp+var_F8] mov rcx, [rcx] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_100], rax jmp short $+2 loc_6BE07: jmp short $+2 loc_6BE09: jmp short $+2 loc_6BE0B: mov ecx, [rbp+var_40] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] sub rax, rcx mov [rbp+var_E4], eax mov eax, [rbp+var_E4] cmp eax, [rbp+var_3C] jnb short loc_6BE6E mov eax, [rbp+var_3C] sub eax, [rbp+var_E4] mov [rbp+var_104], eax mov eax, [rbp+var_104] cmp eax, [rbp+arg_0] jnb short loc_6BE65 mov eax, [rbp+var_104] mov [rbp+arg_0], eax mov [rbp+arg_8], 0 loc_6BE65: mov eax, [rbp+arg_8] add eax, [rbp+var_48] mov [rbp+var_48], eax loc_6BE6E: lea rax, [rbp+var_30] add rax, 2 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov [rbp+var_110], rax mov rax, [rbp+var_100] mov ecx, eax mov rax, [rbp+var_110] mov [rax], ecx mov rax, [rbp+var_100] shr rax, 20h mov cl, al mov rax, [rbp+var_110] mov [rax+4], cl mov rax, [rbp+var_60] add rax, 5 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 0Ah mov rax, [rbp+var_38] mov rax, [rax+10h] mov rcx, [rbp+var_F8] mov rcx, [rcx] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov cl, [rax+rcx] mov rax, [rbp+var_60] mov rdx, rax add rdx, 1 mov [rbp+var_60], rdx mov [rax], cl mov rax, [rbp+var_60] mov byte ptr [rax], 7 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_118], rax mov eax, [rbp+var_48] mov cx, ax mov rax, [rbp+var_118] mov [rax], cx mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov byte ptr [rax], 4 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_120], rax mov eax, [rbp+var_40] mov cx, ax mov rax, [rbp+var_120] mov [rax], cx jmp short $+2 loc_6BF5A: mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_128], rax mov eax, [rbp+var_44] mov cx, ax mov rax, [rbp+var_128] mov [rax], cx mov rax, [rbp+var_60] add rax, 5 mov [rbp+var_60], rax lea rax, [rbp+var_30] mov [rbp+var_C0], rax mov rax, [rbp+var_60] lea rcx, [rbp+var_30] sub rax, rcx mov eax, eax mov [rbp+var_B8], rax mov rax, [rbp+var_38] mov rax, [rax+10h] mov rcx, [rbp+var_F8] mov rcx, [rcx] mov ecx, [rcx+744h] add rax, rcx mov [rbp+var_B0], rax mov eax, [rbp+var_44] mov [rbp+var_A8], rax mov [rbp+var_E8], 2 mov eax, [rbp+var_44] mov [rbp+var_EC], eax mov eax, [rbp+var_E4] cmp eax, [rbp+var_3C] jnb loc_6C0FE mov rax, [rbp+var_60] mov [rbp+var_130], rax mov rax, [rbp+var_60] mov byte ptr [rax], 1 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_138], rax mov eax, [rbp+var_E4] mov cx, ax mov rax, [rbp+var_138] mov [rax], cx mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax cmp [rbp+arg_8], 0 jz short loc_6C06A mov rax, [rbp+var_60] mov byte ptr [rax], 2 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_140], rax mov eax, [rbp+arg_8] mov cx, ax mov rax, [rbp+var_140] mov [rax], cx mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax loc_6C06A: mov rax, [rbp+var_60] mov byte ptr [rax], 3 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_148], rax mov eax, [rbp+arg_0] mov cx, ax mov rax, [rbp+var_148] mov [rax], cx mov rax, [rbp+var_60] add rax, 3 mov [rbp+var_60], rax mov rax, [rbp+var_130] mov [rbp+var_A0], rax mov rax, [rbp+var_60] mov rcx, [rbp+var_130] sub rax, rcx mov eax, eax mov [rbp+var_98], rax mov rax, [rbp+var_50] mov [rbp+var_90], rax mov eax, [rbp+arg_0] mov [rbp+var_88], rax mov eax, [rbp+var_E8] add eax, 2 mov [rbp+var_E8], eax mov rax, [rbp+var_98] mov ecx, [rbp+arg_0] add rax, rcx add eax, [rbp+var_EC] mov [rbp+var_EC], eax loc_6C0FE: mov rax, [rbp+var_38] mov ecx, [rax+20h] mov rax, [rbp+var_38] mov [rax+24h], ecx mov rax, [rbp+var_F8] mov rdx, [rax+8] mov rcx, [rbp+var_F8] mov rax, [rbp+var_B8] mov esi, [rbp+var_EC] add rax, rsi mov r8d, eax mov r9d, [rbp+var_E8] add r9d, 2 lea r10, [rbp+var_E0] lea rax, [rbp+var_30] lea rdi, [rbp+var_58] mov esi, 0Ch xor r11d, r11d mov [rsp+170h+var_170], r10 mov [rsp+170h+var_168], rax mov [rsp+170h+var_160], 0 call translog_write_record mov [rbp+var_149], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6C191 mov al, [rbp+var_149] add rsp, 170h pop rbp retn loc_6C191: call ___stack_chk_fail
char ma_log_key_middle( long long **a1, unsigned int a2, unsigned int a3, unsigned int a4, int a5, long long a6, unsigned int a7, int a8) { _BYTE *v9; // [rsp+40h] [rbp-130h] unsigned long long v10; // [rsp+70h] [rbp-100h] long long *v11; // [rsp+78h] [rbp-F8h] unsigned int v12; // [rsp+84h] [rbp-ECh] int v13; // [rsp+88h] [rbp-E8h] unsigned int v14; // [rsp+8Ch] [rbp-E4h] _QWORD v15[5]; // [rsp+90h] [rbp-E0h] BYREF long long v16; // [rsp+B8h] [rbp-B8h] char *v17; // [rsp+C0h] [rbp-B0h] long long v18; // [rsp+C8h] [rbp-A8h] _BYTE *v19; // [rsp+D0h] [rbp-A0h] long long v20; // [rsp+D8h] [rbp-98h] long long v21; // [rsp+E0h] [rbp-90h] long long v22; // [rsp+E8h] [rbp-88h] _BYTE *v23; // [rsp+110h] [rbp-60h] char v24[8]; // [rsp+118h] [rbp-58h] BYREF long long v25; // [rsp+120h] [rbp-50h] int v26; // [rsp+128h] [rbp-48h] unsigned int v27; // [rsp+12Ch] [rbp-44h] unsigned int v28; // [rsp+130h] [rbp-40h] unsigned int v29; // [rsp+134h] [rbp-3Ch] long long **v30; // [rsp+138h] [rbp-38h] __int16 v31; // [rsp+140h] [rbp-30h] BYREF int v32; // [rsp+142h] [rbp-2Eh] char v33; // [rsp+146h] [rbp-2Ah] char v34; // [rsp+147h] [rbp-29h] _BYTE v35[2]; // [rsp+148h] [rbp-28h] BYREF __int16 v36; // [rsp+14Ah] [rbp-26h] char v37; // [rsp+14Ch] [rbp-24h] __int16 v38; // [rsp+14Dh] [rbp-23h] __int16 v39; // [rsp+14Fh] [rbp-21h] _BYTE v40[31]; // [rsp+151h] [rbp-1Fh] BYREF long long savedregs; // [rsp+170h] [rbp+0h] BYREF *(_QWORD *)&v40[23] = __readfsqword(0x28u); v30 = a1; v29 = a2; v28 = a3; v27 = a4; v26 = a5; v25 = a6; v11 = *a1; v10 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980); v25 = a3 + a6; v14 = v25 - (unsigned int)a1[2]; if ( v14 < a2 ) { if ( v29 - v14 < a7 ) { a7 = v29 - v14; a8 = 0; } v26 += a8; } v32 = v10; v33 = BYTE4(v10); v23 = v35; v34 = 10; v35[0] = *((_BYTE *)v30[2] + (unsigned int)(*(_DWORD *)(*v11 + 1860) - 3)); v35[1] = 7; v36 = v26; v37 = 4; v38 = v28; v39 = v27; v23 = v40; v15[4] = &v31; v16 = (unsigned int)v40 - ((unsigned int)&savedregs - 48); v17 = (char *)v30[2] + *(unsigned int *)(*v11 + 1860); v18 = v27; v13 = 2; v12 = v27; if ( v14 < v29 ) { v9 = v23; *v23 = 1; *(_WORD *)(v23 + 1) = v14; v23 += 3; if ( a8 ) { *v23 = 2; *(_WORD *)(v23 + 1) = a8; v23 += 3; } *v23 = 3; *(_WORD *)(v23 + 1) = a7; v23 += 3; v19 = v9; v20 = (unsigned int)((_DWORD)v23 - (_DWORD)v9); v21 = v25; v22 = a7; v13 = 4; v12 += a7 + (_DWORD)v23 - (_DWORD)v9; } *((_DWORD *)v30 + 9) = *((_DWORD *)v30 + 8); return translog_write_record((long long)v24, 0xCu, v11[1], v11, v12 + v16, v13 + 2, v15, &v31, 0LL); }
_ma_log_key_middle: PUSH RBP MOV RBP,RSP SUB RSP,0x170 MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV dword ptr [RBP + -0x44],ECX MOV dword ptr [RBP + -0x48],R8D MOV qword ptr [RBP + -0x50],R9 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0xf8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x100],RAX JMP 0x0016be07 LAB_0016be07: JMP 0x0016be09 LAB_0016be09: JMP 0x0016be0b LAB_0016be0b: MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX MOV dword ptr [RBP + -0xe4],EAX MOV EAX,dword ptr [RBP + -0xe4] CMP EAX,dword ptr [RBP + -0x3c] JNC 0x0016be6e MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,dword ptr [RBP + -0xe4] MOV dword ptr [RBP + -0x104],EAX MOV EAX,dword ptr [RBP + -0x104] CMP EAX,dword ptr [RBP + 0x10] JNC 0x0016be65 MOV EAX,dword ptr [RBP + -0x104] MOV dword ptr [RBP + 0x10],EAX MOV dword ptr [RBP + 0x18],0x0 LAB_0016be65: MOV EAX,dword ptr [RBP + 0x18] ADD EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX LAB_0016be6e: LEA RAX,[RBP + -0x30] ADD RAX,0x2 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr [RBP + -0x100] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x110] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x100] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x110] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x5 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0xf8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],0x7 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x118],RAX MOV EAX,dword ptr [RBP + -0x48] MOV CX,AX MOV RAX,qword ptr [RBP + -0x118] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],0x4 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + -0x40] MOV CX,AX MOV RAX,qword ptr [RBP + -0x120] MOV word ptr [RAX],CX JMP 0x0016bf5a LAB_0016bf5a: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x128],RAX MOV EAX,dword ptr [RBP + -0x44] MOV CX,AX MOV RAX,qword ptr [RBP + -0x128] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x5 MOV qword ptr [RBP + -0x60],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x60] LEA RCX,[RBP + -0x30] SUB RAX,RCX MOV EAX,EAX MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0xf8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV qword ptr [RBP + -0xb0],RAX MOV EAX,dword ptr [RBP + -0x44] MOV qword ptr [RBP + -0xa8],RAX MOV dword ptr [RBP + -0xe8],0x2 MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0xec],EAX MOV EAX,dword ptr [RBP + -0xe4] CMP EAX,dword ptr [RBP + -0x3c] JNC 0x0016c0fe MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x130],RAX MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x138],RAX MOV EAX,dword ptr [RBP + -0xe4] MOV CX,AX MOV RAX,qword ptr [RBP + -0x138] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX CMP dword ptr [RBP + 0x18],0x0 JZ 0x0016c06a MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],0x2 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x140],RAX MOV EAX,dword ptr [RBP + 0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x140] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX LAB_0016c06a: MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],0x3 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x148],RAX MOV EAX,dword ptr [RBP + 0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x148] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x3 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x130] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x130] SUB RAX,RCX MOV EAX,EAX MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x90],RAX MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RBP + -0xe8] ADD EAX,0x2 MOV dword ptr [RBP + -0xe8],EAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,dword ptr [RBP + 0x10] ADD RAX,RCX ADD EAX,dword ptr [RBP + -0xec] MOV dword ptr [RBP + -0xec],EAX LAB_0016c0fe: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0xf8] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0xf8] MOV RAX,qword ptr [RBP + -0xb8] MOV ESI,dword ptr [RBP + -0xec] ADD RAX,RSI MOV R8D,EAX MOV R9D,dword ptr [RBP + -0xe8] ADD R9D,0x2 LEA R10,[RBP + -0xe0] LEA RAX,[RBP + -0x30] LEA RDI,[RBP + -0x58] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e50 MOV byte ptr [RBP + -0x149],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016c191 MOV AL,byte ptr [RBP + -0x149] ADD RSP,0x170 POP RBP RET LAB_0016c191: CALL 0x0012a250
int8 _ma_log_key_middle(long *param_1,uint param_2,uint param_3,uint param_4,int param_5,long param_6, uint param_7,int param_8) { long *plVar1; int iVar2; int1 uVar3; uint uVar4; uint uVar5; ulong uVar6; long in_FS_OFFSET; uint local_f4; int local_f0; int1 local_e8 [32]; int1 *local_c8; ulong local_c0; long local_b8; ulong local_b0; int1 *local_a8; ulong local_a0; long local_98; ulong local_90; int1 *local_68; int1 local_60 [8]; long local_58; int local_50; uint local_4c; uint local_48; uint local_44; long *local_40; int1 local_38 [2]; int4 local_36; int1 local_32; int1 local_31; int1 local_30; int1 local_2f; int2 local_2e; int1 local_2c; int2 local_2b; int2 local_29; int1 local_27; int2 local_26; int1 local_24; int2 local_23; int1 local_21 [17]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; uVar6 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc); local_58 = param_6 + (ulong)param_3; uVar4 = (int)local_58 - (int)param_1[2]; local_50 = param_5; if (uVar4 < param_2) { if (param_2 - uVar4 < param_7) { param_8 = 0; param_7 = param_2 - uVar4; } local_50 = param_8 + param_5; } local_36 = (int4)uVar6; local_32 = (int1)(uVar6 >> 0x20); local_31 = 10; local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3)); local_2f = 7; local_2e = (int2)local_50; local_2c = 4; local_2b = (int2)param_3; local_29 = (int2)param_4; local_c8 = local_38; iVar2 = (int)&local_27; uVar5 = iVar2 - (int)local_38; local_c0 = (ulong)uVar5; local_b8 = param_1[2] + (ulong)*(uint *)(*plVar1 + 0x744); local_b0 = (ulong)param_4; local_f0 = 2; local_f4 = param_4; local_68 = &local_27; if (uVar4 < param_2) { local_27 = 1; local_26 = (int2)uVar4; local_68 = &local_24; if (param_8 != 0) { local_24 = 2; local_23 = (int2)param_8; local_68 = local_21; } *local_68 = 3; *(short *)(local_68 + 1) = (short)param_7; local_68 = local_68 + 3; uVar4 = (int)local_68 - iVar2; local_a0 = (ulong)uVar4; local_90 = (ulong)param_7; local_f0 = 4; local_f4 = uVar4 + param_7 + param_4; local_a8 = &local_27; local_98 = local_58; } *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_4c = param_4; local_48 = param_3; local_44 = param_2; local_40 = param_1; uVar3 = translog_write_record (local_60,0xc,plVar1[1],plVar1,uVar5 + local_f4,local_f0 + 2,local_e8,local_38,0 ); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar3); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,192
uint64_to_le
corpus-core[P]colibri-stateless/src/util/bytes.c
void uint64_to_le(uint8_t* data, uint64_t value) { data[7] = (value >> 56) & 0xFF; data[6] = (value >> 48) & 0xFF; data[5] = (value >> 40) & 0xFF; data[4] = (value >> 32) & 0xFF; data[3] = (value >> 24) & 0xFF; data[2] = (value >> 16) & 0xFF; data[1] = (value >> 8) & 0xFF; data[0] = value & 0xFF; }
O0
c
uint64_to_le: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax shrq $0x38, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x7(%rax) movq -0x10(%rbp), %rax shrq $0x30, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x6(%rax) movq -0x10(%rbp), %rax shrq $0x28, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x5(%rax) movq -0x10(%rbp), %rax shrq $0x20, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x4(%rax) movq -0x10(%rbp), %rax shrq $0x18, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax shrq $0x10, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax shrq $0x8, %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
uint64_to_le: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] shr rax, 38h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+7], cl mov rax, [rbp+var_10] shr rax, 30h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+6], cl mov rax, [rbp+var_10] shr rax, 28h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+5], cl mov rax, [rbp+var_10] shr rax, 20h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+4], cl mov rax, [rbp+var_10] shr rax, 18h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+3], cl mov rax, [rbp+var_10] shr rax, 10h and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+2], cl mov rax, [rbp+var_10] shr rax, 8 and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax+1], cl mov rax, [rbp+var_10] and rax, 0FFh mov cl, al mov rax, [rbp+var_8] mov [rax], cl pop rbp retn
long long uint64_to_le(long long a1, unsigned long long a2) { long long result; // rax *(_BYTE *)(a1 + 7) = HIBYTE(a2); *(_DWORD *)(a1 + 3) = a2 >> 24; *(_WORD *)(a1 + 1) = (unsigned int)a2 >> 8; result = a1; *(_BYTE *)a1 = a2; return result; }
uint64_to_le: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x38 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x7],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x30 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x28 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x20 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x18 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x10 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x8 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL POP RBP RET
void uint64_to_le(int1 *param_1,int8 param_2) { param_1[7] = (char)((ulong)param_2 >> 0x38); param_1[6] = (char)((ulong)param_2 >> 0x30); param_1[5] = (char)((ulong)param_2 >> 0x28); param_1[4] = (char)((ulong)param_2 >> 0x20); param_1[3] = (char)((ulong)param_2 >> 0x18); param_1[2] = (char)((ulong)param_2 >> 0x10); param_1[1] = (char)((ulong)param_2 >> 8); *param_1 = (char)param_2; return; }
10,193
uint64_to_le
corpus-core[P]colibri-stateless/src/util/bytes.c
void uint64_to_le(uint8_t* data, uint64_t value) { data[7] = (value >> 56) & 0xFF; data[6] = (value >> 48) & 0xFF; data[5] = (value >> 40) & 0xFF; data[4] = (value >> 32) & 0xFF; data[3] = (value >> 24) & 0xFF; data[2] = (value >> 16) & 0xFF; data[1] = (value >> 8) & 0xFF; data[0] = value & 0xFF; }
O3
c
uint64_to_le: movq %rsi, (%rdi) retq
uint64_to_le: mov [rdi], rsi retn
void uint64_to_le(_QWORD *a1, long long a2) { *a1 = a2; }
uint64_to_le: MOV qword ptr [RDI],RSI RET
void uint64_to_le(int8 *param_1,int8 param_2) { *param_1 = param_2; return; }
10,194
pvio_socket_blocking
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode) { my_bool is_blocking; struct st_pvio_socket *csock; int new_fcntl_mode; if (!pvio || !pvio->data) return 1; csock = (struct st_pvio_socket *)pvio->data; is_blocking = !(csock->fcntl_mode & O_NONBLOCK); if (previous_mode) *previous_mode = is_blocking; if (is_blocking == block) return 0; if (block) new_fcntl_mode = csock->fcntl_mode & ~O_NONBLOCK; else new_fcntl_mode = csock->fcntl_mode | O_NONBLOCK; #ifdef _WIN32 { ulong arg = block ? 0 : 1; if (ioctlsocket(csock->socket, FIONBIO, (void *)&arg)) { return(WSAGetLastError()); } } #else if (fcntl(csock->socket, F_SETFL, new_fcntl_mode) == -1) { return errno; } #endif csock->fcntl_mode = new_fcntl_mode; return 0; }
O3
c
pvio_socket_blocking: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0x1, %ebx testq %rdi, %rdi je 0x2f5a5 movq (%rdi), %r15 testq %r15, %r15 je 0x2f5a5 movl $0x800, %eax # imm = 0x800 andl 0x4(%r15), %eax testq %rdx, %rdx je 0x2f555 testl %eax, %eax sete (%rdx) shrl $0xb, %eax movsbl %sil, %ecx xorl %eax, %ecx xorl %ebx, %ebx cmpl $0x1, %ecx je 0x2f5a5 xorl %r14d, %r14d testb %sil, %sil sete %r14b movl $0xfffff7ff, %eax # imm = 0xFFFFF7FF andl 0x4(%r15), %eax shll $0xb, %r14d orl %eax, %r14d movl (%r15), %edi xorl %ebx, %ebx movl $0x4, %esi movl %r14d, %edx xorl %eax, %eax callq 0x13710 cmpl $-0x1, %eax je 0x2f59e movl %r14d, 0x4(%r15) jmp 0x2f5a5 callq 0x13060 movl (%rax), %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
pvio_socket_blocking: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, 1 test rdi, rdi jz short loc_2F5A5 mov r15, [rdi] test r15, r15 jz short loc_2F5A5 mov eax, 800h and eax, [r15+4] test rdx, rdx jz short loc_2F555 test eax, eax setz byte ptr [rdx] loc_2F555: shr eax, 0Bh movsx ecx, sil xor ecx, eax xor ebx, ebx cmp ecx, 1 jz short loc_2F5A5 xor r14d, r14d test sil, sil setz r14b mov eax, 0FFFFF7FFh and eax, [r15+4] shl r14d, 0Bh or r14d, eax mov edi, [r15] xor ebx, ebx mov esi, 4 mov edx, r14d xor eax, eax call _fcntl64 cmp eax, 0FFFFFFFFh jz short loc_2F59E mov [r15+4], r14d jmp short loc_2F5A5 loc_2F59E: call ___errno_location mov ebx, [rax] loc_2F5A5: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long pvio_socket_blocking(unsigned int **a1, char a2, bool *a3) { unsigned int v3; // ebx unsigned int *v4; // r15 unsigned int v5; // eax unsigned int v6; // r14d long long v7; // rdi v3 = 1; if ( a1 ) { v4 = *a1; if ( *a1 ) { v5 = v4[1] & 0x800; if ( a3 ) *a3 = v5 == 0; v3 = 0; if ( ((v5 >> 11) ^ a2) != 1 ) { v6 = v4[1] & 0xFFFFF7FF | ((a2 == 0) << 11); v7 = *v4; v3 = 0; if ( (unsigned int)fcntl64(v7, 4LL, v6) == -1 ) return *(unsigned int *)__errno_location(v7); else v4[1] = v6; } } } return v3; }
pvio_socket_blocking: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,0x1 TEST RDI,RDI JZ 0x0012f5a5 MOV R15,qword ptr [RDI] TEST R15,R15 JZ 0x0012f5a5 MOV EAX,0x800 AND EAX,dword ptr [R15 + 0x4] TEST RDX,RDX JZ 0x0012f555 TEST EAX,EAX SETZ byte ptr [RDX] LAB_0012f555: SHR EAX,0xb MOVSX ECX,SIL XOR ECX,EAX XOR EBX,EBX CMP ECX,0x1 JZ 0x0012f5a5 XOR R14D,R14D TEST SIL,SIL SETZ R14B MOV EAX,0xfffff7ff AND EAX,dword ptr [R15 + 0x4] SHL R14D,0xb OR R14D,EAX MOV EDI,dword ptr [R15] XOR EBX,EBX MOV ESI,0x4 MOV EDX,R14D XOR EAX,EAX CALL 0x00113710 CMP EAX,-0x1 JZ 0x0012f59e MOV dword ptr [R15 + 0x4],R14D JMP 0x0012f5a5 LAB_0012f59e: CALL 0x00113060 MOV EBX,dword ptr [RAX] LAB_0012f5a5: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int pvio_socket_blocking(int8 *param_1,char param_2,long param_3) { int4 *puVar1; int iVar2; int *piVar3; int iVar4; uint uVar5; iVar4 = 1; if ((param_1 != (int8 *)0x0) && (puVar1 = (int4 *)*param_1, puVar1 != (int4 *)0x0)) { uVar5 = puVar1[1]; if (param_3 != 0) { *(bool *)param_3 = (uVar5 & 0x800) == 0; } iVar4 = 0; if (((int)param_2 ^ (uVar5 & 0x800) >> 0xb) != 1) { uVar5 = (uint)(param_2 == '\0') << 0xb | puVar1[1] & 0xfffff7ff; iVar4 = 0; iVar2 = fcntl64(*puVar1,4,uVar5); if (iVar2 == -1) { piVar3 = __errno_location(); iVar4 = *piVar3; } else { puVar1[1] = uVar5; } } } return iVar4; }
10,195
init_default_directories
eloqsql/mysys/my_default.c
static const char **init_default_directories(MEM_ROOT *alloc) { const char **dirs; char *env; int errors= 0; DBUG_ENTER("init_default_directories"); dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *)); if (dirs == NULL) DBUG_RETURN(NULL); bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *)); #ifdef _WIN32 { char fname_buffer[FN_REFLEN]; if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); errors += add_directory(alloc, "C:/", dirs); if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) { errors += add_directory(alloc, fname_buffer, dirs); strcat_s(fname_buffer, sizeof(fname_buffer), "/data"); errors += add_directory(alloc, fname_buffer, dirs); } } #else #if defined(DEFAULT_SYSCONFDIR) if (DEFAULT_SYSCONFDIR[0]) errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); #else errors += add_directory(alloc, "/etc/", dirs); errors += add_directory(alloc, "/etc/mysql/", dirs); #endif /* DEFAULT_SYSCONFDIR */ #endif /* If value of $MARIADB_HOME environment variable name is NULL, check for $MYSQL_HOME */ if ((env= getenv("MARIADB_HOME"))) errors += add_directory(alloc, env, dirs); else { if ((env= getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs); } /* Placeholder for --defaults-extra-file=<path> */ errors += add_directory(alloc, "", dirs); #if !defined(_WIN32) errors += add_directory(alloc, "~/", dirs); #endif DBUG_RETURN(errors > 0 ? NULL : dirs); }
O0
c
init_default_directories: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi movl $0x40, %esi callq 0x84880 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x7f6db jmp 0x7f6ce movq $0x0, -0x8(%rbp) jmp 0x7f7cf movq -0x18(%rbp), %rdi xorl %esi, %esi movl $0x40, %edx callq 0x38300 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x637c5(%rip), %rsi # 0xe2ebf callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x637b1(%rip), %rsi # 0xe2ec5 callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) leaq 0x627ae(%rip), %rdi # 0xe1ed4 callq 0x387a0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x7f74e movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x7f77d leaq 0x6278c(%rip), %rdi # 0xe1ee1 callq 0x387a0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x7f77b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x7f77d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x5d3c0(%rip), %rsi # 0xdcb4c callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x6372b(%rip), %rsi # 0xe2ed1 callq 0x813e0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jle 0x7f7bf xorl %eax, %eax movq %rax, -0x30(%rbp) jmp 0x7f7c7 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
init_default_directories: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_24], 0 mov rdi, [rbp+var_10] mov esi, 40h ; '@' call alloc_root mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_7F6DB jmp short $+2 loc_7F6CE: mov [rbp+var_8], 0 jmp loc_7F7CF loc_7F6DB: mov rdi, [rbp+var_18] xor esi, esi mov edx, 40h ; '@' call _memset mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, aEtc_0; "/etc/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, aEtcMysql_0; "/etc/mysql/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax lea rdi, aMariadbHome; "MARIADB_HOME" call _getenv mov [rbp+var_20], rax cmp rax, 0 jz short loc_7F74E mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax jmp short loc_7F77D loc_7F74E: lea rdi, aMysqlHome; "MYSQL_HOME" call _getenv mov [rbp+var_20], rax cmp rax, 0 jz short loc_7F77B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax loc_7F77B: jmp short $+2 loc_7F77D: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, asc_DCB4A+2; "" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, asc_E2ED1; "~/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax cmp [rbp+var_24], 0 jle short loc_7F7BF xor eax, eax mov [rbp+var_30], rax jmp short loc_7F7C7 loc_7F7BF: mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_7F7C7: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_7F7CF: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long init_default_directories(long long a1) { int v3; // [rsp+Ch] [rbp-24h] int v4; // [rsp+Ch] [rbp-24h] int v5; // [rsp+Ch] [rbp-24h] long long v6; // [rsp+10h] [rbp-20h] long long v7; // [rsp+18h] [rbp-18h] v7 = alloc_root(a1, 64LL); if ( !v7 ) return 0LL; memset(v7, 0LL, 64LL); v3 = add_directory(a1, "/etc/", v7); v4 = v3 + add_directory(a1, "/etc/mysql/", v7); v6 = getenv("MARIADB_HOME"); if ( v6 || (v6 = getenv("MYSQL_HOME")) != 0 ) v4 += add_directory(a1, v6, v7); v5 = v4 + add_directory(a1, "", v7); if ( (int)(v5 + add_directory(a1, "~/", v7)) <= 0 ) return v7; else return 0LL; }
init_default_directories: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x24],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x40 CALL 0x00184880 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0017f6db JMP 0x0017f6ce LAB_0017f6ce: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017f7cf LAB_0017f6db: MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI MOV EDX,0x40 CALL 0x00138300 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x1e2ebf] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x1e2ec5] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX LEA RDI,[0x1e1ed4] CALL 0x001387a0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0017f74e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX JMP 0x0017f77d LAB_0017f74e: LEA RDI,[0x1e1ee1] CALL 0x001387a0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0017f77b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX LAB_0017f77b: JMP 0x0017f77d LAB_0017f77d: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x1dcb4c] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x1e2ed1] CALL 0x001813e0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JLE 0x0017f7bf XOR EAX,EAX MOV qword ptr [RBP + -0x30],RAX JMP 0x0017f7c7 LAB_0017f7bf: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_0017f7c7: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0017f7cf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
void * init_default_directories(int8 param_1) { int iVar1; int iVar2; char *pcVar3; void *local_38; int local_2c; void *local_10; local_38 = (void *)alloc_root(param_1); if (local_38 == (void *)0x0) { local_10 = (void *)0x0; } else { memset(local_38,0,0x40); iVar1 = add_directory(param_1,"/etc/",local_38); local_2c = add_directory(param_1,"/etc/mysql/",local_38); local_2c = local_2c + iVar1; pcVar3 = getenv("MARIADB_HOME"); if (pcVar3 == (char *)0x0) { pcVar3 = getenv("MYSQL_HOME"); if (pcVar3 != (char *)0x0) { iVar1 = add_directory(param_1,pcVar3,local_38); local_2c = iVar1 + local_2c; } } else { iVar1 = add_directory(param_1,pcVar3,local_38); local_2c = iVar1 + local_2c; } iVar1 = add_directory(param_1,&DAT_001dcb4c,local_38); iVar2 = add_directory(param_1,&DAT_001e2ed1,local_38); if (0 < iVar2 + iVar1 + local_2c) { local_38 = (void *)0x0; } local_10 = local_38; } return local_10; }
10,196
minja::FilterTemplateToken::~FilterTemplateToken()
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O3
cpp
minja::FilterTemplateToken::~FilterTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x92689(%rip), %rax # 0x12ee48 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x9c7d4 callq 0x7140a leaq 0x91b0d(%rip), %rax # 0x12e2e8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x9c7f0 callq 0x7140a movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1ba60
_ZN5minja19FilterTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_9C7D4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9C7D4: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_9C7F0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9C7F0: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::FilterTemplateToken::~FilterTemplateToken(minja::FilterTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::FilterTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~FilterTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22ee48] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0019c7d4 CALL 0x0017140a LAB_0019c7d4: LEA RAX,[0x22e2e8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0019c7f0 CALL 0x0017140a LAB_0019c7f0: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011ba60
/* minja::FilterTemplateToken::~FilterTemplateToken() */ void __thiscall minja::FilterTemplateToken::~FilterTemplateToken(FilterTemplateToken *this) { *(int ***)this = &PTR__FilterTemplateToken_0022ee58; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_0022e2f8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x40); return; }
10,197
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&)
mnn-tts/MNN/3rd_party/rapidjson/reader.h
void ParseTrue(InputStream& is, Handler& handler) { RAPIDJSON_ASSERT(is.Peek() == 't'); is.Take(); if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) { if (RAPIDJSON_UNLIKELY(!handler.Bool(true))) RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); } else RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); }
O0
c
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0xb750 movsbl %al, %eax cmpl $0x74, %eax jne 0xbc31 jmp 0xbc50 leaq 0x7ce4(%rip), %rdi # 0x1391c leaq 0x78bc(%rip), %rsi # 0x134fb movl $0x364, %edx # imm = 0x364 leaq 0x7ce2(%rip), %rcx # 0x1392d callq 0x30e0 movq 0x18(%rsp), %rdi callq 0xb9e0 movq 0x18(%rsp), %rdi movl $0x72, %esi callq 0xdcb0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0xbc78 jmp 0xbca9 movq 0x18(%rsp), %rdi movl $0x75, %esi callq 0xdcb0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0xbc96 jmp 0xbca9 movq 0x18(%rsp), %rdi movl $0x65, %esi callq 0xdcb0 movb %al, 0x7(%rsp) movb 0x7(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xbcba jmp 0xbd48 movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0xe060 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xbcd5 jmp 0xbd46 jmp 0xbcd7 jmp 0xbcd9 movq 0x8(%rsp), %rdi callq 0xb730 xorb $-0x1, %al testb $0x1, %al jne 0xbceb jmp 0xbced jmp 0xbd0c leaq 0x77f6(%rip), %rdi # 0x134ea leaq 0x7800(%rip), %rsi # 0x134fb movl $0x369, %edx # imm = 0x369 leaq 0x7c26(%rip), %rcx # 0x1392d callq 0x30e0 movq 0x18(%rsp), %rdi callq 0xb790 movq 0x8(%rsp), %rdi movq %rax, %rdx movl $0x10, %esi callq 0xb760 jmp 0xbd2a movq 0x8(%rsp), %rdi callq 0xb730 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xbd3e jmp 0xbd40 jmp 0xbdb9 jmp 0xbd42 jmp 0xbd44 jmp 0xbd46 jmp 0xbdb9 jmp 0xbd4a jmp 0xbd4c movq 0x8(%rsp), %rdi callq 0xb730 xorb $-0x1, %al testb $0x1, %al jne 0xbd5e jmp 0xbd60 jmp 0xbd7f leaq 0x7783(%rip), %rdi # 0x134ea leaq 0x778d(%rip), %rsi # 0x134fb movl $0x36c, %edx # imm = 0x36C leaq 0x7bb3(%rip), %rcx # 0x1392d callq 0x30e0 movq 0x18(%rsp), %rdi callq 0xb790 movq 0x8(%rsp), %rdi movq %rax, %rdx movl $0x3, %esi callq 0xb760 jmp 0xbd9d movq 0x8(%rsp), %rdi callq 0xb730 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xbdb1 jmp 0xbdb3 jmp 0xbdb9 jmp 0xbdb5 jmp 0xbdb7 jmp 0xbdb9 addq $0x28, %rsp retq nop
_ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE9ParseTrueILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4PeekEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek(void) movsx eax, al cmp eax, 74h ; 't' jnz short loc_BC31 jmp short loc_BC50 loc_BC31: lea rdi, aIsPeekT; "is.Peek() == 't'" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 364h lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_BC50: mov rdi, [rsp+28h+var_10] call _ZN9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TakeEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(void) mov rdi, [rsp+28h+var_10] mov esi, 72h ; 'r' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov cl, al xor eax, eax test cl, 1 mov [rsp+28h+var_21], al jnz short loc_BC78 jmp short loc_BCA9 loc_BC78: mov rdi, [rsp+28h+var_10] mov esi, 75h ; 'u' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov cl, al xor eax, eax test cl, 1 mov [rsp+28h+var_21], al jnz short loc_BC96 jmp short loc_BCA9 loc_BC96: mov rdi, [rsp+28h+var_10] mov esi, 65h ; 'e' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov [rsp+28h+var_21], al loc_BCA9: mov al, [rsp+28h+var_21] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BCBA jmp loc_BD48 loc_BCBA: mov rdi, [rsp+28h+var_18] mov esi, 1 call _ZN9rapidjson15GenericDocumentINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEES4_E4BoolEb; rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>::Bool(bool) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BCD5 jmp short loc_BD46 loc_BCD5: jmp short $+2 loc_BCD7: jmp short $+2 loc_BCD9: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh test al, 1 jnz short loc_BCEB jmp short loc_BCED loc_BCEB: jmp short loc_BD0C loc_BCED: lea rdi, aHasparseerror; "!HasParseError()" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 369h lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_BD0C: mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TellEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(void) mov rdi, [rsp+28h+var_20] mov rdx, rax mov esi, 10h call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13SetParseErrorENS_14ParseErrorCodeEm; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError(rapidjson::ParseErrorCode,ulong) jmp short $+2 loc_BD2A: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BD3E jmp short loc_BD40 loc_BD3E: jmp short loc_BDB9 loc_BD40: jmp short $+2 loc_BD42: jmp short $+2 loc_BD44: jmp short $+2 loc_BD46: jmp short loc_BDB9 loc_BD48: jmp short $+2 loc_BD4A: jmp short $+2 loc_BD4C: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh test al, 1 jnz short loc_BD5E jmp short loc_BD60 loc_BD5E: jmp short loc_BD7F loc_BD60: lea rdi, aHasparseerror; "!HasParseError()" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 36Ch lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_BD7F: mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TellEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(void) mov rdi, [rsp+28h+var_20] mov rdx, rax mov esi, 3 call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13SetParseErrorENS_14ParseErrorCodeEm; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError(rapidjson::ParseErrorCode,ulong) jmp short $+2 loc_BD9D: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BDB1 jmp short loc_BDB3 loc_BDB1: jmp short loc_BDB9 loc_BDB3: jmp short $+2 loc_BDB5: jmp short $+2 loc_BDB7: jmp short $+2 loc_BDB9: add rsp, 28h retn
char rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( long long a1, _QWORD *a2, long long a3) { char result; // al long long v4; // rax long long v5; // rax char v6; // [rsp+7h] [rbp-21h] if ( rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek((long long)a2) != 116 ) __assert_fail( "is.Peek() == 't'", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 868LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEn" "coding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFla" "gs = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rap" "idjson::UTF8<>>]"); rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(a2); v6 = 0; if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 114LL) & 1) != 0 ) { v6 = 0; if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 117LL) & 1) != 0 ) v6 = rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 101LL); } if ( (v6 & 1) != 0 ) { result = ~(unsigned __int8)rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>::Bool( a3, 1LL); if ( (result & 1) != 0 ) { if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1) & 1) != 0 ) __assert_fail( "!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 873LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [Sour" "ceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, " "parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::Generic" "Document<rapidjson::UTF8<>>]"); v4 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(a2); rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError( a1, 0x10u, v4); return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1); } } else { if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1) & 1) != 0 ) __assert_fail( "!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 876LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [Source" "Encoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, pars" "eFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocume" "nt<rapidjson::UTF8<>>]"); v5 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(a2); rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError( a1, 3u, v5); return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1); } return result; }
ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010b750 MOVSX EAX,AL CMP EAX,0x74 JNZ 0x0010bc31 JMP 0x0010bc50 LAB_0010bc31: LEA RDI,[0x11391c] LEA RSI,[0x1134fb] MOV EDX,0x364 LEA RCX,[0x11392d] CALL 0x001030e0 LAB_0010bc50: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010b9e0 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x72 CALL 0x0010dcb0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x7],AL JNZ 0x0010bc78 JMP 0x0010bca9 LAB_0010bc78: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x75 CALL 0x0010dcb0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x7],AL JNZ 0x0010bc96 JMP 0x0010bca9 LAB_0010bc96: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x65 CALL 0x0010dcb0 MOV byte ptr [RSP + 0x7],AL LAB_0010bca9: MOV AL,byte ptr [RSP + 0x7] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0010bcba JMP 0x0010bd48 LAB_0010bcba: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x1 CALL 0x0010e060 XOR AL,0xff XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0010bcd5 JMP 0x0010bd46 LAB_0010bcd5: JMP 0x0010bcd7 LAB_0010bcd7: JMP 0x0010bcd9 LAB_0010bcd9: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010b730 XOR AL,0xff TEST AL,0x1 JNZ 0x0010bceb JMP 0x0010bced LAB_0010bceb: JMP 0x0010bd0c LAB_0010bced: LEA RDI,[0x1134ea] LEA RSI,[0x1134fb] MOV EDX,0x369 LEA RCX,[0x11392d] CALL 0x001030e0 LAB_0010bd0c: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010b790 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ESI,0x10 CALL 0x0010b760 JMP 0x0010bd2a LAB_0010bd2a: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010b730 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0010bd3e JMP 0x0010bd40 LAB_0010bd3e: JMP 0x0010bdb9 LAB_0010bd40: JMP 0x0010bd42 LAB_0010bd42: JMP 0x0010bd44 LAB_0010bd44: JMP 0x0010bd46 LAB_0010bd46: JMP 0x0010bdb9 LAB_0010bd48: JMP 0x0010bd4a LAB_0010bd4a: JMP 0x0010bd4c LAB_0010bd4c: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010b730 XOR AL,0xff TEST AL,0x1 JNZ 0x0010bd5e JMP 0x0010bd60 LAB_0010bd5e: JMP 0x0010bd7f LAB_0010bd60: LEA RDI,[0x1134ea] LEA RSI,[0x1134fb] MOV EDX,0x36c LEA RCX,[0x11392d] CALL 0x001030e0 LAB_0010bd7f: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010b790 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ESI,0x3 CALL 0x0010b760 JMP 0x0010bd9d LAB_0010bd9d: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010b730 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0010bdb1 JMP 0x0010bdb3 LAB_0010bdb1: JMP 0x0010bdb9 LAB_0010bdb3: JMP 0x0010bdb5 LAB_0010bdb5: JMP 0x0010bdb7 LAB_0010bdb7: JMP 0x0010bdb9 LAB_0010bdb9: ADD RSP,0x28 RET
/* void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char> >, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >(rapidjson::GenericStringStream<rapidjson::UTF8<char> >&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&) */ void __thiscall rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>:: ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator> *this, GenericStringStream *param_1,GenericDocument *param_2) { char cVar1; bool bVar2; byte bVar3; int8 uVar4; bool local_21; cVar1 = GenericStringStream<rapidjson::UTF8<char>>::Peek ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); if (cVar1 != 't') { /* WARNING: Subroutine does not return */ __assert_fail("is.Peek() == \'t\'", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h",0x364, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } GenericStringStream<rapidjson::UTF8<char>>::Take ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); bVar2 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x72); local_21 = false; if (bVar2) { bVar2 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x75); local_21 = false; if (bVar2) { local_21 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x65); } } if (local_21 == false) { bVar3 = HasParseError(this); if (((bVar3 ^ 0xff) & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 0x36c, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } uVar4 = GenericStringStream<rapidjson::UTF8<char>>::Tell ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); SetParseError(this,3,uVar4); HasParseError(this); } else { bVar3 = GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> ::Bool((GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> *)param_2,true); if (((bVar3 ^ 0xff) & 1) != 0) { bVar3 = HasParseError(this); if (((bVar3 ^ 0xff) & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 0x369, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } uVar4 = GenericStringStream<rapidjson::UTF8<char>>::Tell ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); SetParseError(this,0x10,uVar4); HasParseError(this); } } return; }
10,198
dump_hex
bluesky950520[P]quickjs/qjsc.c
static void dump_hex(FILE *f, const uint8_t *buf, size_t len) { size_t i, col; col = 0; for(i = 0; i < len; i++) { fprintf(f, " 0x%02x,", buf[i]); if (++col == 8) { fprintf(f, "\n"); col = 0; } } if (col != 0) fprintf(f, "\n"); }
O0
c
dump_hex: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq $0x0, (%rsp) movq $0x0, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x10(%rsp), %rax jae 0xfeb0 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movzbl (%rax,%rcx), %edx leaq 0xf9a79(%rip), %rsi # 0x1098e3 movb $0x0, %al callq 0xe550 movq (%rsp), %rax addq $0x1, %rax movq %rax, (%rsp) cmpq $0x8, %rax jne 0xfe9e movq 0x20(%rsp), %rdi leaq 0xf97d0(%rip), %rsi # 0x10965f movb $0x0, %al callq 0xe550 movq $0x0, (%rsp) jmp 0xfea0 movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0xfe44 cmpq $0x0, (%rsp) je 0xfeca movq 0x20(%rsp), %rdi leaq 0xf979c(%rip), %rsi # 0x10965f movb $0x0, %al callq 0xe550 addq $0x28, %rsp retq nop
dump_hex: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov [rsp+28h+var_28], 0 mov [rsp+28h+var_20], 0 loc_FE44: mov rax, [rsp+28h+var_20] cmp rax, [rsp+28h+var_18] jnb short loc_FEB0 mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_20] movzx edx, byte ptr [rax+rcx] lea rsi, a0x02x; " 0x%02x," mov al, 0 call _fprintf mov rax, [rsp+28h+var_28] add rax, 1 mov [rsp+28h+var_28], rax cmp rax, 8 jnz short loc_FE9E mov rdi, [rsp+28h+var_8] lea rsi, aIncludeQuickjs+1Ah; "\n" mov al, 0 call _fprintf mov [rsp+28h+var_28], 0 loc_FE9E: jmp short $+2 loc_FEA0: mov rax, [rsp+28h+var_20] add rax, 1 mov [rsp+28h+var_20], rax jmp short loc_FE44 loc_FEB0: cmp [rsp+28h+var_28], 0 jz short loc_FECA mov rdi, [rsp+28h+var_8] lea rsi, aIncludeQuickjs+1Ah; "\n" mov al, 0 call _fprintf loc_FECA: add rsp, 28h retn
long long dump_hex(long long a1, long long a2, unsigned long long a3) { long long result; // rax long long v4; // [rsp+0h] [rbp-28h] unsigned long long i; // [rsp+8h] [rbp-20h] v4 = 0LL; for ( i = 0LL; ; ++i ) { result = i; if ( i >= a3 ) break; fprintf(a1, " 0x%02x,", *(unsigned __int8 *)(a2 + i)); if ( ++v4 == 8 ) { fprintf(a1, "\n"); v4 = 0LL; } } if ( v4 ) return fprintf(a1, "\n"); return result; }
dump_hex: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x0 LAB_0010fe44: MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP + 0x10] JNC 0x0010feb0 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOVZX EDX,byte ptr [RAX + RCX*0x1] LEA RSI,[0x2098e3] MOV AL,0x0 CALL 0x0010e550 MOV RAX,qword ptr [RSP] ADD RAX,0x1 MOV qword ptr [RSP],RAX CMP RAX,0x8 JNZ 0x0010fe9e MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x20965f] MOV AL,0x0 CALL 0x0010e550 MOV qword ptr [RSP],0x0 LAB_0010fe9e: JMP 0x0010fea0 LAB_0010fea0: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX JMP 0x0010fe44 LAB_0010feb0: CMP qword ptr [RSP],0x0 JZ 0x0010feca MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x20965f] MOV AL,0x0 CALL 0x0010e550 LAB_0010feca: ADD RSP,0x28 RET
void dump_hex(FILE *param_1,long param_2,ulong param_3) { long local_28; ulong local_20; local_28 = 0; for (local_20 = 0; local_20 < param_3; local_20 = local_20 + 1) { fprintf(param_1," 0x%02x,",(ulong)*(byte *)(param_2 + local_20)); local_28 = local_28 + 1; if (local_28 == 8) { fprintf(param_1,"\n"); local_28 = 0; } } if (local_28 != 0) { fprintf(param_1,"\n"); } return; }
10,199
my_uca_copy_page
eloqsql/strings/ctype-uca.c
static my_bool my_uca_copy_page(MY_CHARSET_LOADER *loader, const MY_UCA_WEIGHT_LEVEL *src, MY_UCA_WEIGHT_LEVEL *dst, size_t page) { uint chc, size= 256 * dst->lengths[page] * sizeof(uint16); if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size))) return TRUE; DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]); memset(dst->weights[page], 0, size); for (chc=0 ; chc < 256; chc++) { memcpy(dst->weights[page] + chc * dst->lengths[page], src->weights[page] + chc * src->lengths[page], src->lengths[page] * sizeof(uint16)); } return FALSE; }
O0
c
my_uca_copy_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax shll $0x8, %eax cltq shlq %rax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x80(%rax), %rax movl -0x30(%rbp), %ecx movl %ecx, %edi callq *%rax movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x28(%rbp), %rdx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x4f904 movb $0x1, -0x1(%rbp) jmp 0x4f9c0 jmp 0x4f906 jmp 0x4f908 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x30(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x24170 movl $0x0, -0x2c(%rbp) cmpl $0x100, -0x2c(%rbp) # imm = 0x100 jae 0x4f9bc movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x2c(%rbp), %eax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx shlq %rdx callq 0x24210 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x4f92b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_uca_copy_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] shl eax, 8 cdqe shl rax, 1 mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax+80h] mov ecx, [rbp+var_30] mov edi, ecx call rax mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov rdx, [rbp+var_28] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_4F904 mov [rbp+var_1], 1 jmp loc_4F9C0 loc_4F904: jmp short $+2 loc_4F906: jmp short $+2 loc_4F908: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_30] mov edx, eax xor esi, esi call _memset mov [rbp+var_2C], 0 loc_4F92B: cmp [rbp+var_2C], 100h jnb loc_4F9BC mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rdi, rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rsi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rsi, rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] mov edx, eax shl rdx, 1 call _memcpy mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_4F92B loc_4F9BC: mov [rbp+var_1], 0 loc_4F9C0: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int v6; // [rsp+0h] [rbp-30h] unsigned int i; // [rsp+4h] [rbp-2Ch] v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9; v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6); *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6); for ( i = 0; i < 0x100; ++i ) memcpy( 2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4)); return 0; }
my_uca_copy_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 CDQE SHL RAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x30] MOV EDI,ECX CALL RAX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x0014f904 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014f9c0 LAB_0014f904: JMP 0x0014f906 LAB_0014f906: JMP 0x0014f908 LAB_0014f908: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX XOR ESI,ESI CALL 0x00124170 MOV dword ptr [RBP + -0x2c],0x0 LAB_0014f92b: CMP dword ptr [RBP + -0x2c],0x100 JNC 0x0014f9bc MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX SHL RDX,0x1 CALL 0x00124210 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014f92b LAB_0014f9bc: MOV byte ptr [RBP + -0x1],0x0 LAB_0014f9c0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4) { size_t __n; long lVar1; int4 local_34; int1 local_9; __n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1; lVar1 = (**(code **)(param_1 + 0x80))(__n); *(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1; if (lVar1 == 0) { local_9 = 1; } else { memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n); for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) { memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2), (void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2), (ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1); } local_9 = 0; } return local_9; }